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
Virindi has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
tcurdt has joined #openscad
tcurdt has quit [Ping timeout: 244 seconds]
tcurdt has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee has joined #openscad
LordOfBikes has quit [Ping timeout: 272 seconds]
ur5us has joined #openscad
LordOfBikes has joined #openscad
<peepsalot> strange way to chat a single correspondence every couple days, with no back and forth
<teepee> yeah, when things have sorted, it's probably a good idea to see if we can get things a bit more interactive
<peepsalot> what's the reason for going through docker? seems like an unnecessary additional obstacle with no clear benefit (for a personal dev setup)
fling has quit [Ping timeout: 268 seconds]
fling has joined #openscad
GNUmoon has joined #openscad
<teepee> hmm, not sure, I guess having the dev stuff neatly separated is not a bad thing. but it comes with other problems
<teepee> I might be tempted running even more stuff remotely on a more powerful machine
J1A848317 has joined #openscad
J1A8483 has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 268 seconds]
ur5us has joined #openscad
KimK has joined #openscad
ur5us has quit [Ping timeout: 248 seconds]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
la1yv_b has joined #openscad
la1yv_a has quit [Ping timeout: 240 seconds]
LordOfBikes has quit [Quit: Ex-Chat]
LordOfBikes has joined #openscad
LordOfBikes has quit [Remote host closed the connection]
LordOfBikes has joined #openscad
KimK has quit [Quit: Leaving]
KimK has joined #openscad
ur5us has joined #openscad
ur5us has quit [Ping timeout: 272 seconds]
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
<gbruno> [github] nfedyashev opened issue #4289 (Collapsed console area) https://github.com/openscad/openscad/issues/4289
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
tcurdt has quit [Quit: bye]
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
tcurdt has joined #openscad
tcurdt has quit [Client Quit]
J1A848317 has quit [Ping timeout: 252 seconds]
J1A84 has joined #openscad
aiyion has quit [Remote host closed the connection]
aiyion has joined #openscad
neur0 has quit [Quit: ZNC 1.8.2 - https://znc.in]
neur0 has joined #openscad
Guest68 has joined #openscad
<Guest68> Hi folks, I have 2 two questions re: openscad...
* InPhase inserts space for the questions: __________ ____________
<Guest68> Q1: I know I can import (stuff) in a program but I'd also like to export programmatically.  I have a program that makes 70 or so shapes, I'd like to render and then export these as .stl in turn from openscad without using the UI - I can't find any documentation about this - is it possible?
<InPhase> Yes, you do it from the command line, and pass in variables with the -D command line argument to set variables which determine which shape to display.
<InPhase> Do "openscad --help" to see all the arguments. A typical workflow involves making a small bash script or something to call OpenSCAD repeatedly for a set of things you want to make.
<InPhase> Bash is the simplest approach on all the decent platforms. For Windows you can suffer through one of the built-in Windows scripting languages, install bash and use that, or attempt to call it repeatedly with something like Python which gives you far more flexibility.
<Guest68> Q2: I think I know how for works in openscad as an array generator.  In my case I want to automatically layout my shapes inside a for (or other) loop.  I want to space the shapes automatically so they don't intersect.  My shape generating modules can be called from functions which return their footprint sizes which can then be used to iterate
<Guest68> the spacing: something like dx=0; for(i=...){dx=dx+shapesize(i);translate([dx,0,0])makeshape(i);} but I don't think this will work with openscad, any suggestions?
<Guest68> Ok A1: I can't programme it from inside openscad but I could script it from outside via the CLI and -D option.  The scripting is not a problem for me but it's a shame openscad is missing this property because it makes sharing the openscad program more difficult. - thanks for the answer!
<Guest68> Q2: I think I've worked this out (it's a slow brain day here): I use shapesize to generate a list of all the dxs I want, then transform that to give the xs I want then for(i=list)translate([i,0,0])makeshape(i); - just need to work out how to sum the list of dxs to get the xs.
<InPhase> Guest68: And here's an example of how I like to do model selection by variable: https://bpa.st/QVZQ
<InPhase> As for spacing shapes by known sizes, there are two ways. One is the recursive strategy, the other is the list summing strategy.
<Guest68> Thanks for the example, quick question, can -D be used to easily pass a list eg -D [1,4,5]?
<InPhase> Yes, but you might need to put quotes around some things like that, depending on how you're calling it.
<InPhase> Guest68: Here is an illustration of the recursive spacing strategy. In this case, it's showing the most elaborate case of spacing from a chain of objects of various lengths and orientations: https://bpa.st/H2KQ
<Guest68> Thanks! your help is much appreciated!
<InPhase> The general strategy goes exactly like that, but is sometimes much simpler. The key is simply that i=0, incrementing it, translating the recursive calls, and setting up that base-case to stop recursing if i is greater then the length (or some other variable passed in).
<InPhase> If you do View, Animate, and put in the values in the comments, you will amuse yourself and also see how flexible the recursive approach is.
<InPhase> https://bpa.st/H3IA This is an example of the integral strategy for determining spacings.
<InPhase> That integral function comes from the funcutils library peepsalot and I put together: https://github.com/thehans/funcutils/blob/master/math.scad
<InPhase> (It has many other convenience functions like that in the other files.)
<J1A84> Guest68 you can use a module and recursively call that module to relatively position your object to the one before
<InPhase> Guest68: Sometimes for the integral approach you might want to add a padding between as well. It is easy enough to add that in, you just have to add a parameter, carry it through, and add it at each step to the accumulating sum like this: https://bpa.st/5OAA
<InPhase> For the recursive approach you would just add that pad to the translate for each recursion.
tcurdt has joined #openscad
poisond has joined #openscad
<poisond> hi :) is there a way to add a chamfer to text without involving minkowski() ?
<poisond> (don't want to wait 30m for a render ...)
<InPhase> poisond: There's roof in experimental.
<InPhase> color("orange") roof() { text("The roof, the roof,"); translate([4, -12]) text("the roof is on fire"); }
<poisond> hmm .. compiled with -DEXPERIMENTAL=ON -> "WARNING: Experimental builtin module 'roof' is not enabled..."
<InPhase> You have to turn it on in preferences.
<InPhase> Under Features.
<poisond> aaahhh, thanks InPhase !
<InPhase> You can use some intersections and stuff to turn basic roof into a chamfer instead of a full roof.
<InPhase> Scaling is also an option to alter the angles involved.
<InPhase> There is some stalled work on a more flexible offset_extrude to do all of this in one go, but it hit some hurdles and stalled out.
<poisond> roof() works out perfectly for my use case, thanks :)
<poisond> is there some doc beside the source for it?
<InPhase> It seems not. Only the discussions here: https://github.com/openscad/openscad/pull/3486
<poisond> thanks ^^
TheAssass1n has joined #openscad
TheAssassin has quit [Ping timeout: 268 seconds]
TheAssassin has joined #openscad
TheAssass1n has quit [Ping timeout: 268 seconds]
<poisond> angle param for roof could be useful
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
<J1A84> i made this in my lib  . .but it is just a scale with tan()
<J1A84> there is a roof example within the examples with a little docu
<J1A84> basics ⇒ roof.scad
<InPhase> poisond: It was raised as a thought, but that's deferred for the offset_extrude for which it might be really nice if it went full-flexible and took function literals for the offset shape.
<InPhase> poisond: Until then, scale is good enough to provide that angle adjustment.
<poisond> fair enough
<InPhase> poisond: Having a functional form on offset_extrude could replace most of the minkowski needs.
<InPhase> We could trivially chamfer and fillet in all sorts of ways then.
<InPhase> It would cover at least everything that has a flat base.
<poisond> yeah. I meant creating a chamfer/fillet usually is easy enough, except for text/polygons/scg ... I'm looking forward to it
<poisond> *svg
<poisond> ok, polygon is also easy with scale()
<poisond> if it's centered ...
<gbruno> [github] nfedyashev closed issue #4289 (Collapsed console area) https://github.com/openscad/openscad/issues/4289
<J1A84> just realized that my new offset/delta function on points give me access to all these chamfer and rounding ..  and i only made wavy vases Ü
ur5us has joined #openscad
berndj has quit [Ping timeout: 248 seconds]
berndj has joined #openscad
<InPhase> J1A84: Nice. What syntax does that look like?
<J1A84> polyRund(points,ofs=0,delta=0)
<J1A84> (also r and ir for rounding without offset is possible .. delta and ofs can be combined .. and r can be list to round each point with different radii )
<InPhase> J1A84: I hope you're putting good attention to documentation. :) You're writing many treasure troves of things that are non-obvious how to do.
<InPhase> or perhaps also, non-obvious how to use. Both I suppose.
<J1A84> i am adding  doxy gen  comments on each (new)  with examples
<InPhase> Yeah, that should help.
<InPhase> Have you reached the point where include<ub.scad> has a noticeable lag? :)
<InPhase> I see you are over 10,000 lines.
ur5us has quit [Ping timeout: 248 seconds]
Guest68 has quit [Ping timeout: 252 seconds]
<J1A84> it is between 100 and <300ms  like all libs
<J1A84> more annoying is that i have {} for folding but doxygen will not work with them
<J1A84> the most delay is due to the echo  (which can now be turned off completely)
ur5us has joined #openscad
ur5us has quit [Ping timeout: 255 seconds]
teepee has quit [Ping timeout: 268 seconds]
la1yv_b is now known as la1yv
teepee has joined #openscad
ur5us has joined #openscad
teepee has quit [Quit: bye...]
teepee has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
Colere has joined #openscad
teepee has joined #openscad
ur5us has quit [Ping timeout: 248 seconds]