teepee changed the topic of #openscad to: OpenSCAD - The Programmers Solid 3D CAD Modeller | This channel is logged! | Website: http://www.openscad.org/ | FAQ: https://goo.gl/pcT7y3 | Request features / report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://bit.ly/32MfbH5
teepee has quit [Ping timeout: 255 seconds]
teepee has joined #openscad
<linext> not yet, i think threejs can render svg and dxf
<linext> maybe there's room for 2D
<teepee> web browsers can render SVG :)
<linext> i was reading the prusa blog about printables.com
<linext> prusa outsourced the entire site to a web development company and recently took over control
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
Virindi has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
Virindi has joined #openscad
califax has quit [Remote host closed the connection]
<teepee> of the site or the company?
califax has joined #openscad
marcus has quit [Ping timeout: 252 seconds]
marcus has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
<lf94> I asked GPT to create an OpenSCAD iPhone case: it basically made a saw blade lol
fling has joined #openscad
use-value1 has joined #openscad
use-value has quit [Ping timeout: 260 seconds]
use-value has joined #openscad
use-value1 has quit [Ping timeout: 265 seconds]
<JordanBrown[m]> linext: with respect to a text metrics equivalent for images: no, though it is an idea that has been bounced around. The geometry-as-data project (which I will probably soon publish an implementation of in a very-much-draft PR) will let you do it indirectly by using import() or surface(), rendering it, and extracting the min/max values.
<JordanBrown[m]> linext With respect to lithophanes, you can do it with Inkscape but better is to use a pixel-based tool and surface(). With Inkscape you would really want a development snapshot build so that you can use the import-svg-by-id feature. That’s more complex than surface() and a png. Basically you would do (at least) one import per depth, using the id to specify which part of the drawing to import, and extrude it to the right height.
<JordanBrown[m]> Yes, I think that link you gave is exactly the way to do it. Keep your image resolution reasonable. Slicing parameters matter; infill would be bad.
<JordanBrown[m]> Or, more precisely, non-solid infill would be bad.
fling has quit [Remote host closed the connection]
fling has joined #openscad
J2214 has joined #openscad
J22 has quit [Ping timeout: 260 seconds]
foul_owl has quit [Ping timeout: 256 seconds]
foul_owl has joined #openscad
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
aiyion has quit [Ping timeout: 255 seconds]
aiyion has joined #openscad
<lf94> > cant save my model because replicad.xyz is bugged
<lf94> openscad is the only reliable codecad
<lf94> I wish it were brep though
<lf94> too useful for fillet / chamfers
aiyion has quit [Read error: Connection reset by peer]
GNUmoon has quit [Write error: Connection reset by peer]
teepee has quit [Write error: Broken pipe]
califax has quit [Write error: Connection reset by peer]
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
aiyion has joined #openscad
GNUmoon has joined #openscad
teepee has joined #openscad
ur5us has joined #openscad
<lf94> I should just continue my wrapper that generates code for any codecad, it was working out well
<lf94> same syntax, different targets
aiyion has quit [Remote host closed the connection]
aiyion has joined #openscad
berndj has quit [Quit: ZNC - http://znc.in]
berndj has joined #openscad
Junxter has joined #openscad
ur5us has quit [Ping timeout: 260 seconds]
TheAssassin has quit [Remote host closed the connection]
<lf94> how would you fillet an arbitrary corner in openscad
<lf94> I wonder how well a octo-tree thing would work
TheAssassin has joined #openscad
<lf94> break down the space constantly, but using spheres or something for best-match
<J2214> SCADvent 6 missing days ...
<J2214> would be a shame to fill with primitives
Guest4317 has joined #openscad
Guest4317 has quit [Client Quit]
fling_ has joined #openscad
fling has quit [Ping timeout: 255 seconds]
fling_ has quit [Remote host closed the connection]
fling has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
RyotaroOda has quit [Quit: Client closed]
fling has quit [Remote host closed the connection]
fling has joined #openscad
fling_ has joined #openscad
fling has quit [Ping timeout: 255 seconds]
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
fling_ is now known as fling
foul_owl has quit [Ping timeout: 256 seconds]
TheAssassin has quit [Ping timeout: 255 seconds]
foul_owl has joined #openscad
TheAssassin has joined #openscad
la1yv_a has joined #openscad
la1yv has quit [Ping timeout: 260 seconds]
la1yv_a is now known as la1yv
Guest5299 has joined #openscad
Guest5299 has quit [Client Quit]
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
Guest6 has joined #openscad
<Guest6> Can anyone help me with the following: I'd like to apply a 2D shape - in my case an SVG shape with import() - onto a 3D surface created with dotSCAD/sf_splines(). The SVG file is variable, so I cannot transfer the shapes into a fixed photo/levels.
<Guest6> Any hint how to do this?
aiyion1 has joined #openscad
aiyion has quit [Ping timeout: 255 seconds]
fling has joined #openscad
aiyion1 has quit [Remote host closed the connection]
aiyion1 has joined #openscad
marcus has quit [Remote host closed the connection]
marcus has joined #openscad
fling has quit [Ping timeout: 255 seconds]
fling has joined #openscad
califax has joined #openscad
<J2214> Guest6 first your 3D shape will do nothing if onto a 3D surface ..
<J2214> it need to be 3D to have any effect
<J2214> i would suggest to use some UV mapping with blender
<J2214> but you will always get distortions
<J2214> if you apply this to a more flat region you could extrude it and make an intersection with the 3D form but bit smaller then a difference with the 3d form so you get an embossing/engraving that follows the surface but is still linear extruded
qeed has quit [Quit: qeed]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
Guest43 has joined #openscad
Guest43 has quit [Client Quit]
<InPhase> Guest6: J2214's suggestion depends on the target portion of the 3D surface being at least moderately flat, i.e. not more than say 45 degrees tilted away from the center orientation, and ideally 30 degrees or less. In that case you extrude the 2D shape and intersect with a translation of the 3D surface toward that center orientation.
<InPhase> Guest6: Follow up with questions if that process is unclear.
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
fling has joined #openscad
fling has quit [Client Quit]
fling has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
califax has quit [Remote host closed the connection]
califax has joined #openscad
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
fling has joined #openscad
qeed has joined #openscad
tsingi has joined #openscad
<tsingi> Hello OpenSCAD. What is the standard way to link source here? I have a question. :)
<teepee> paste?
<othx> paste is https://www.3dcustomizer.net/paste for .scad files, https://bpa.st for text, https://pasteboard.co/ or https://imgur.com/ for images
<tsingi> thx
<teepee> but that's just a suggestion :)
milza has quit [Quit: milza]
<tsingi> It's a good one but it's a bit of code.
<tsingi> let me try that, might be short on context
<tsingi> I am creating a node with pole join pins at listed vectors...
<tsingi> / makes a node with pins at each vector
<tsingi> module pinnedNode( list ) { // [[ rot, vector ], ... ]
<tsingi> difference() {
<tsingi> sphere( nodeSize ); // the node sphere
<tsingi> union() {
<tsingi> for( p = list )
<tsingi> rotate( p[0], p[1] )
<tsingi> pinMask(); // cut holes for the pins
<tsingi> }
<tsingi> }
<tsingi> for( p = list )
<tsingi> rotate( p[0], p[1] )
<tsingi> pin(); // put pins in holes
<tsingi> }
<tsingi> Y
<tsingi> YesY
<tsingi> Yes
<tsingi> oops
<tsingi> I create one of those...
<tsingi> /* bottom corners, also top rear corners (6) */
<tsingi> module bottomCorner() {
<tsingi> bottomCornerVectors = [[0, [0,0,0]], [90, [0,0,1]], [90, [0,1,0]]];
<tsingi> difference() {
<tsingi> pinnedNode( bottomCornerVectors );
<tsingi> //pinnedNode( [[0, [0,0,0]], [90, [0,0,1]], [90, [0,1,0]]] );
<tsingi> translate([0,0,-(10+(outerDia+tubeThick)/2)])
<tsingi> cube(20, true );
<tsingi> }
<tsingi> }
<tsingi> I create one and try to clip it, but the clip isn't working (bottom difference)
<tsingi> The cube is in the right place. If I take it out of the module and print it, it's there.
<tsingi> this worked before I factored it to use the vector lists.
<teepee> lol, linking would mean to just post the link here :D
<teepee> anyway
<tsingi> I see, I'll do that.
<tsingi> unless you have an idea.
<teepee> that may take a minute to reat through
<tsingi> yes, I'll try to add context, pinnedNode creates a sphere and then masks out where the pins go, then adds the pin back in.
<tsingi> I want to clip the bottom of the sphere but the difference is ignored.
<tsingi> AFTER the pinned node is created.
<teepee> couple of things missing, so putting a compilable version at one of those paste sites would help
<tsingi> Making a hood for my Prusa.
<teepee> e.g. nodeSize and pinMask
<tsingi> I will do so now.
<tsingi> include file with vars and primitives: https://www.3dcustomizer.net/paste/7A3F50B1
<tsingi> the file in question: https://www.3dcustomizer.net/paste/9C78DF40
<tsingi> module is bottomCorner(), problem is difference is not doing anything.
<tsingi> (line 42 of second paste)
<teepee> for me it seems to cut the bottome of the big center sphere
<tsingi> That's what I want it to do, but it's not doing it for me.
<teepee> hmm, strange, what version are you using?
<tsingi> OpenSCAD version 2021.01
<teepee> same result with that release and the nightly builds. that's odd then
<teepee> does it show up in half-transparent red like in my screenshot when you put a # in front of the translate?
<tsingi> Ahh, a new trick, sec.
<tsingi> No. I call this from another file, if this works for you, I can't imagine what but I'll try some test routines and get back to you.
<tsingi> thx
<teepee> true, I have just copied both of your pastes into the same file
<tsingi> At least I know that it isn't the module.
<teepee> that could result in some different behavior
<tsingi> I can try that too.
<tsingi> AFK a while.
<tsingi> I tried creating the object after the method instead of downstream, no joy, pasting in the include file, no joy. Doing exactly what you did, that works.
<tsingi> heh.
<tsingi> bugger. I'll find it, thank you for the assistance.
<tsingi> I now know it's me and not SCAD. It always is (almost)
<lf94> J2214: do you need help with ideas?
<lf94> @ "SCADvent missing 6 days"
<J2214> no we need designs
<lf94> Has a "bow" or "ribbon" been done yet?
<lf94> I'm not doing SCADvent this year, just no time
<lf94> But I can help with a design
<lf94> This little christmas tree I have also has these beads on a string
<lf94> It could be a for a simple day
califax has quit [Remote host closed the connection]
fling has quit [Remote host closed the connection]
fling has joined #openscad
califax has joined #openscad
<J2214> make a design and send it in (or paste it) .. make sure the name and CC0 text is there
<J2214> an image (color sceme ocean .. 900px )
<J2214> pff  https://pasteboard.co/OJ9MZP1qWLhC.png   the corner of that thing are so strange angles - no idea how to calculate them proper
ali1234 has quit [Remote host closed the connection]
ali1234 has joined #openscad
<tsingi> \help
<tsingi> :)
<tsingi> teepee: Found it. Spurious code in a module to create pole clips that needed tidying. My bad. Cheers!
<linext> is there a function to get a seed value for rands() ?
<linext> such as a unix timestamp in milliseconds
ali1234 has quit [Remote host closed the connection]
ali1234 has joined #openscad
<teepee> tsingi: yay!
<teepee> linext: yes, single rands() first, print and use for 2nd rands() with that seed
snaked has quit [Ping timeout: 260 seconds]
<J2214> hmm  render now opens an empty  playground without code
ur5us has joined #openscad
leptonix has joined #openscad
<linext> try again
<linext> clear your cache (F12, right click on reload button)
<linext> i updated the https://www.3dcustomizer.net/create/playground so that any POST or GET form submission of variable "scadCode" will fill the code box
milza has joined #openscad
<linext> is it possible to get 2 random numbers?
<JordanBrown[m]> Yes.
<JordanBrown[m]> First: unless you really understand what random seeds are and how they work, do not mess with them.
<JordanBrown[m]> Beyond that, if you call rands(a,b,n) it gives you an array of n random numbers between a and b.
<JordanBrown[m]> If you call it again, it gives you more.
<teepee> hey, cool. shall we make it a bit more colorful for an advent calendar entry?
<JordanBrown[m]> In the "practical applications for Christmas" category, I submit this replacement cap for my Christmas ornaments.
<JordanBrown[m]> Fit first try!
milza has quit [Quit: milza]
<Scopeuk> congrats
<Guest6> J2214: Thanks, great idea, but as InPhase points out, the surface needs to be relatively flat. In my case it comes with a 90
<Guest6> (oops) 90° arch.
<Guest6> Ideally the 2D shape will be extruded in a way that the new perimeter has the same shape as the original 3D shape. (Hope that was understandable)
<J2214> you don't have access to the points so you can't transform them - there may be a feature soon that will allow that but you still need to do the math for it
<J2214> if it is a cylindrical curve you can role the extruded  svg over .. but with spherical you can't  - you would need to cut the svg in tiny pieces and move them, probably takes a long time calculating this
<Guest6> I was looking at DotScad (great stuff btw), and there are ways to put a 2D picture (with pixels in txt) on a 3D shape and extrude, but not an SVG
<Guest6> I fear you're right. Puh, will be a tough one then.
<Guest6> But thanks for lending me your brain, appreciated ;)
<J2214> as i said . .you can pixelate the svg
<Guest6> Yep, but the SVG will be variable, so I'd need to write a conversion routine from SVG to pixel, and thus fix the size and ratios
<Guest6> my target size of the final shape shall be flexible between 20 and 200mm, so that fixing the size means either far too much details (which is not printable) or super-pixeled which looks ugly 😔
<Guest6> Potentially I can write a routine that creates 10~ish pixel versions and pick the one that best fits
<linext> PLA can be molded in boiling water
<J2214> this is what dotScad does . .it generate slices and bend them ..  There is also a huge difference if you have just a cylinder or  sphere  or a freeform 3D surface
<J2214> imagine the svg would be a stamp - could you roll it over the object - then it is easy .. if not you need much more math
<Guest6> J2214 agreed. Actually the SVG is used like a stamp (amongst other purposes). But maybe I give the math idea a try (time-boxed ;)
<Guest6> linext hey, I like your thinking out of the box. Would require to print the 3D "base" with a heat resistent filament, and then lay the PLA version on top. Needs a bit craftmenship which I fear I don't have 😳
<Guest6> J2214 - how would you roll over a stamp over an object?
<J2214> you can print thin (.2-.4mm)  stencils  .. put in hot water and just put on a massive pla print .. also using a hair dryer  and it will take that shape
<J2214> did you know how gear cutting works ?
<Guest6> actually no
<othx> J2214 linked to YouTube video "gear cutting - OpenSCAD library gears.scad explained" => 1 IRC mentions
<Guest6> thanks for the link. will check and get inspired
<J2214> you calculate the contact surface and rotate and move the extruded svg  - the more polygons and steps involved the more time this will need
<J2214> but only works on cylinder .. for spheres you need to use stripes and you will get distortions
<linext> J2214, what's the goal?
<J2214> linext surface texture on 3D forms
<linext> hmmm
<Guest6> I have a 3D shape (using bezier curves and splines) on which I'd like to apply (="spheric extrude") an SVG file - in my case different symbols, landscapes, figures, logos that you can freely pick (just needs to be SVG)
<linext> how about this: https://3dp.rocks/lithophane/
<linext> in openscad, i think you'll need to map your 2D image into grayscale points
<linext> then map those points onto the surface
<J2214> Guest6  as long the 3D form is unknown  a solution is only vage -  if you have a center an spherical surface you can use extrude with scale to get a https://openhome.cc/eGossip/OpenSCAD/lib3x-stereographic_extrude.html
califax_ has joined #openscad
califax has quit [Ping timeout: 255 seconds]
<Guest6> linext - lithopane seems to have 8 base shapes to project upon, right? In my case the base shape is a bezier-created splines, i.e. not extirely random, but not a "classical" form either
<linext> the bezier is a 3d curve?
califax_ is now known as califax
<linext> maybe you can show an image of the bezier
<linext> teepee: would you mind publishing the random seed crystal generator?
<Guest6> how can I paste an image here (sorry, new here)
<linext> i use imgbb.com
<teepee> linext: sure, once it's finished, I think it still needs a bit of tweaking :)
<J2214> !paste
<linext> paste?
<othx> paste is https://www.3dcustomizer.net/paste for .scad files, https://bpa.st for text, https://pasteboard.co/ or https://imgur.com/ for images
<J2214> paste!
<othx> paste is https://www.3dcustomizer.net/paste for .scad files, https://bpa.st for text, https://pasteboard.co/ or https://imgur.com/ for images
<linext> imgur.com is a bit too distracting for me
<Guest6> linext - here's an image https://ibb.co/TTDP1Mz
<teepee> linext: we could add the dices to the advent calendar too, if you are ok with CC0 and give me the author line
<linext> teepee, do they need to be printable as an ornamnet?
<teepee> nope, in that regard the only requirement is a nicely working script
<linext> Guest6, do you have the function that generated your base 3d model?
<linext> teepee, sure you can use it, is the author line similar to what i see in the regular (not old) examples?
<teepee> of course if we can make something printable, that's great and some of the designs have 3mf files, but fun looking with just the code is good too
<teepee> linext: yes, pretty much that footer and add another line for you whatever you would like to see there
<Guest6> sf_solidify(sf_splines(fatMF, bezMarkFront), sf_splines(fatMB, bezMarkBack)); with fatMF&MB with Bezier control points and bezMarkFront&Back the related bezier_curve functions
<teepee> linext: awesome so you mind if I add colors?
<linext> fine by me, the STL viewer only shows one so I started to forget about colors
<teepee> I figured :)
<teepee> that's fine, the calendar goes a bit more with the visuals
<linext> on the 12th day of christmas, my true love gave to me, 2 random dice
<linext> i just made a few changes, https://www.3dcustomizer.net/create/customization/122
<J2214> Guest6  that should work fine with just a linear extrusion as there is only little distortion when projecting
<J2214> you use a copy of your object to limit the embossing svg  and move it just 1mm back
<linext> Guest6, i think the problem you're having is that you're not describing the surface in openscad functions
<Guest6> J2214 - there are multiple such 3D base shapes, some are more bended, others less. What you see is already a linear extrusion, and the other side looks ugly...
<J2214> because you are not limiting it
<J2214> Guest6 https://bpa.st/N77A
<Guest6> understood. then the SVG would still be linearly extruded, but has the same height above the base shape. This looks fine if the base shape stays relatively flat. But for what I have in mind for now, it should be sufficient
<J2214> here  extruded https://bpa.st/S2PA
<Guest6> J2214 - thanks for the snippit, got your idea. Actually that's much better already than my attempts so far, thanks!
<Guest6> Still would be extremely cool to have a "spherical extrude" #dreamingoutloud
<J2214> you can use the scale factor in linear extrude to adapt to spherical and cylindrical distortions  scale=[.5,.7]
<J2214> if you parameterize this for your base shapes  you should get a good fit for the svg ..  maybe resize the svg  so the input size doesn't matter
<Guest6> yep, that fits my need, as the base shape is of limited convexity. good idea, thanks!
<J2214> just use an array that define the scale parameter for each selected base shape
<Guest6> That looks really good. Actually, when printing in 3D no one will be able to tell the difference (except the people in this chat :)
<Guest6> Btw, this is a glas marker for longdrink and wine glasses with an SVG on it that the people can send in upfront
<J2214> as long it is just  images and deco those distortions are negligible   -  if you need to make a mold or mating surface or gears it is something different
<Guest6> nice gimmick on a (christmas) party with multiple people (who know what an SVG is...)
<Guest6> J2214 - fully agree. But who want to make such gears?
<J2214> with "surface" you can also use png images
<J2214> who?  I do
<Guest6> gears with bezier-shaped solids?
<J2214> if you make pattern roller to emboss paper e.g.
<Guest6> sounds like a nice application as well 👍
<J2214> btw when printing i suggest you rotate the marker so holes are vertical
<Guest6> thanks for the hint, but actually I use an SLA printer ([my] FDMs have less detail)
<JordanBrown[m]> WRT pasting images... if you use Matrix and Element, you just paste them. I think Matrix users see them inline and everybody else sees a link.
<Guest6> with flex resin so the marker sticks nicely on the glass/stem
<J2214> ah so DLP printer not SLA
<teepee> linext: some colors? https://www.3dcustomizer.net/paste/B9DA6F7C