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 or report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://libera.irclog.whitequark.org/openscad | don't ask to ask
LordOfBikes has quit [Ping timeout: 265 seconds]
hisacro has quit [Ping timeout: 264 seconds]
LordOfBikes has joined #openscad
ur5us has joined #openscad
hisacro has joined #openscad
califax- has joined #openscad
califax has quit [Ping timeout: 276 seconds]
califax- is now known as califax
luissen has quit [Ping timeout: 268 seconds]
ali1234 has quit [Ping timeout: 245 seconds]
ferdna has joined #openscad
arebil has joined #openscad
luissen has joined #openscad
arebil has quit [Quit: My keyboard has gone to sleep. ZZZzzz…]
qeed has quit [Quit: qeed]
qeed has joined #openscad
hyperair has joined #openscad
clemens3 has quit [Ping timeout: 246 seconds]
clemens3 has joined #openscad
<JakeSays> so when a .scad file is compiled, is the output CGAL primitives?
<InPhase> Perhaps click Design, Display CSG Tree.
<JakeSays> that looks like scad source
<JakeSays> i'm just trying to understand what ends up being displayed in preview mode
<InPhase> Design, Display CSG Products?
<InPhase> See "CSG rendering chain"
<JakeSays> what's the relationship between csg and cgal
<InPhase> CSG is "Constructive Solid Geometry", a subject, but we also have a CSG renderer which does the previews.
<JakeSays> ah ok
<InPhase> CGAL is "Computational Geometry Algorithms Library" which does the rendering.
arebil has joined #openscad
<JakeSays> yeah that part i got
<InPhase> Although this divide is not strictly true, since some preview steps require CGAL.
<JakeSays> so do you create an object model and then pass that to cgal to render?
<InPhase> It's a bit more back and forth.
<JakeSays> it'd be interesting to step through the code
<JakeSays> might do that
<InPhase> There are holes in my knowledge of that part. There just aren't enough hours in the days for all the fun stuff. :)
<JakeSays> ugh. true that.
<JakeSays> lol i used tinkercad for the first time in a couple of years and noticed you can design with code.
<JakeSays> using blocks. it's cute.
ur5us has quit [Ping timeout: 245 seconds]
<InPhase> Oh, did they go MIT scratch with it?
<InPhase> There's also this: https://www.blockscad3d.com/editor/
<InPhase> This one is nice because it spits out the OpenSCAD code corresponding to the MIT Scratch style block arrangement.
<JakeSays> InPhase: they did
<JakeSays> ohh interesting
<JakeSays> i've been fascinated with scratch since it first came out.
<InPhase> Actually, that should go on the About page as well... It's such a neat approach for kids, that we should probably highlight it.
<JakeSays> definitely
<JakeSays> LOL blockscad3d is really cool!
<JakeSays> need a scad to blocks converter. lol
<gbruno> [github] rcolyer pushed 1 modifications (Add BlocksCAD). https://github.com/openscad/openscad.github.com/commit/89d6e0facd4642ac7d701bd54556076ff9eed431
<JakeSays> well, at least it's not agpl licensed
<InPhase> I think that project stalled out on development. They had a fixed timeline grant that they used to build it. But it was an impressive product, and is GPL'd so it exists now as a base for further stuff.
<InPhase> Someone might need to fork it at some point if it's going to keep on working well.
<JakeSays> yeah i see that it's pretty dead
<JakeSays> interesting. the blockscad site is version 1.13 dated march of this year
<JakeSays> but the repo is years old
<InPhase> They might not even have access to their own github repos anymore. It was one person, and I suspect he doesn't work there anymore.
<InPhase> It's not really their core business. :)
<JakeSays> who, the blockscad company?
<InPhase> It's actually Einstein's Workshop, basically a daycare/enrichment school for kids.
<JakeSays> well, they should be keeping the repo current
<InPhase> It looks like they got some additional funding 3 years ago, but it's not clear what they're using it for. But yeah, they should probably be keeping their repo current, but the law doesn't really require them to because of the GPL services loophole.
<InPhase> I should sleep.
<JakeSays> the fact that my tax dollars paid for it should be enough to keep the repo current
ferdna has quit [Quit: Leaving]
<gbruno> [github] t-paul pushed 17 modifications (Merge pull request #3906 from themactep/fix-file-permissions
<gbruno> [github] t-paul closed issue #3707 (*nef3* test failures with CGAL 5.2 + security patch). https://github.com/openscad/openscad/issues/3707
mhroncok has joined #openscad
ali1234 has joined #openscad
lastrodamo has joined #openscad
NoGare[m] has quit [Quit: Bridge terminating on SIGTERM]
ali1234[m] has quit [Quit: Bridge terminating on SIGTERM]
t-paul[m] has quit [Quit: Bridge terminating on SIGTERM]
Cadair has quit [Quit: Bridge terminating on SIGTERM]
ali1234[m] has joined #openscad
Cadair has joined #openscad
NoGare[m] has joined #openscad
t-paul[m] has joined #openscad
Junxter has joined #openscad
arebil has quit [Quit: My keyboard has gone to sleep. ZZZzzz…]
snaked has quit [Remote host closed the connection]
snaked has joined #openscad
arebil has joined #openscad
arebil has quit [Quit: My keyboard has gone to sleep. ZZZzzz…]
mhroncok has quit [Quit: Leaving.]
invultri has joined #openscad
<invultri> Hi, could someone tell this blind bat why the following is going into infinite recursion? https://gist.github.com/christianvdstap/2d5502252c7180d615bec65d6e918066 I am probably screwing up syntax again
arebil has joined #openscad
<InPhase> JakeSays: Well, had they gone with AGPL in the initial release, that would have resulted. Maybe they had visions of a self-funding company to manage it though. They might be able to get funding selling lesson plans if they establish themselves as the one-true portal for it.
<teepee> invultri: the n seems a bit lonely
<invultri> testing it with: echo(filter([1,2,3])); which I would expect to be the identity
<teepee> ahh, no found it :)
<invultri> yer it is a bit silly now.. I created the tail and head after the fact to clean it up
<teepee> tail fails on single element lists
<InPhase> n > 1 should do it
<teepee> force range step 1
<teepee> or that :)
<teepee> problem is range [1:0] for crazy legacy reasons goes [0, 1]
<teepee> but [1:1:0] will result in empty range
<invultri> ah yes, I can remember that now from the docs
<teepee> but n > 1 is probable better
<teepee> *probably
<InPhase> teepee: Also, doesn't tail recursion prefer the recursive case to be the last one in the ?:, or does it work with both?
arebil has quit [Ping timeout: 240 seconds]
<invultri> btw, the ui could definately use a watchdog timer + error
<teepee> tail recursion should do both
<teepee> no, we need to make it possible to cancel :)
<InPhase> invultri: There is one, unless tail recursion optimization has kicked in and then it bypasses the counter check.
<InPhase> But proper cancelation and proper threading would be the correct solution. Work-in-progress-without-progress.
<invultri> InPhase: well.. that must have been it, luckily it loads in like 1sec and there is vim to add a quick //
<teepee> I don't think there's much work in progress on that part, there's 2 PRs for the geometry stuff
<invultri> btw, you guys nailed the sollution. Thanks
<teepee> but not much to cover the evaluation
<teepee> it should be slightly easier to solve than the geometry case I believe, but still quite some work
<invultri> (btw, there is no 'filter' baked in right?)
<teepee> filter?
<invultri> yes, to filter a vector based on a predicate
<invultri> echo(filter([1,2,3], function(x) x > 2)); <-- something like that
<teepee> no, but it's possible to write a fold() function now
<teepee> let me check the lib from peepsalot that might have this already
<InPhase> invultri: Not baked in. peepsalot and I were working two years ago on this library, to which peepsalot added a filter: https://github.com/thehans/funcutils/blob/master/func.scad#L7
<invultri> folds... yes that was in the fp classes a decade ago -_-
<teepee> sounds like the remove_if() would be that
<teepee> echo(remove_if([0,1,2,3,4,5,6,7,8,9],p=function(x)x%3==0));
<invultri> erm... 2 years ago? Function Literals
<invultri> [Note: Requires version 2021.01]
<InPhase> Well, late 2019. We were using the experimental feature.
<invultri> I see, that is probably why I am just encountering it
<invultri> new ui is pretty nice btw
<teepee> that library now really should go into the library list, no need for "needs experimental feature" anymore
<InPhase> Function literals are only really fully stable in the master branch. They work correctly in 2021.01 but leak a bit of memory.
<InPhase> The next release will have them properly stable.
<teepee> uh, next release...
<InPhase> teepee: Sorry for the trauma trigger. lol
<teepee> well, the discussion seems to have died, just like your PR
<InPhase> Yeah, I saw that got closed. But, whatever. Not my call.
<InPhase> An hour invested in proving it could be done.
<invultri> https://gist.github.com/christianvdstap/7378eada5b23d49b0ec7846494e55227 <-- and it's gone (formatting can be attributed to github).
<teepee> but I guess it's pretty clear without translation anyway :)
* InPhase chuckles.
<InPhase> invultri: The only insane thing I see there is you made use of a tab.
<teepee> it's important to learn from Dieter (the worm)
<invultri> nice
<invultri> InPhase: that should be handled by the ui imo, especially since i need to backspace 4 times for each tab
<invultri> so I though it was actually spaces
<teepee> there's a couple of settings for that, basically all the options the editor component allows
<InPhase> invultri: Edit, Preferences, Indentation, Tab key function, Indent.
<InPhase> invultri: And the other options in that area.
<InPhase> Also "Indent using" spaces
<InPhase> I don't remember what we have as default for those.
<invultri> https://imgur.com/aiuuCf9 <-- it is the gray bit
<invultri> ah thanks, fixing that immediatly
<InPhase> I don't know what I'm looking at in that image...
<InPhase> Is this some sort of polygonal abstract art?
<invultri> indent it set to spaces
<invultri> that would be my land with the correct allocations. red would be house, light red is other hardened area, gray is road, light green is 'farm land' and dark green would be public green space
<invultri> well.. half of the road, the neighbours have the other half
<invultri> is that indent using space part of the 2021.01 ?
<teepee> I think that's quite a bit older, might be even 2015.03
<invultri> then the config must have been updated when I started using it, the tabs are from 2 weeks ago with the old version (2019.05)
<InPhase> invultri: Ah, that does make sense as a property outline. :)
mhroncok has joined #openscad
peeps[zen] has joined #openscad
peepsalot has quit [Ping timeout: 265 seconds]
noonien has quit [Quit: The Lounge - https://thelounge.chat]
<invultri> hmm I though openscad would cache objects if I just stamp down multiple with a for
<teepee> if they are identical yes, if you pass in a parameter no
<teepee> well, it does cache, but if all are different, all need to be calculated and put into cache
<invultri> they are the same, only offset
<teepee> if the offset is inside the module, it's still different
<teepee> bad: for (pos = ...) part(pos);
<invultri> but rendering is pretty abysmal (126 each being 1 cube with 20 cylinder and 2 cube cutouts)
<teepee> good: for (pos = ...) translate(pos) part();
<invultri> for (i = [0:15], j = [0:8])
<invultri> translate([i*(gras_beton_tile_width()+1),j*(gras_beton_tile_depth()+1),0])
<invultri> gras_beton_tile();
<teepee> are you saying 126 * 20 cylinders?
<teepee> I hope that's not with $fn = 200; or something like that ;-)
<invultri> no, the default which is like 8 or so ?
<teepee> $fn is undefined, so $fa / $fs control resolution
<invultri> I just stuck in a if ($preview) and use a simple cube, fixed
<teepee> rendering 2520 cylinders will still take some time :)
<invultri> rendering is indeed a long process
<invultri> and technically rendering holes.
<invultri> or rather, does not seem to finish at all.
mhroncok has quit [Quit: Leaving.]
ran has joined #openscad
<InPhase> Optimization? for (pos = ...) part(pos); with above, module part(pos) { translate(pos) basepart(); }
qeed_ has joined #openscad
<InPhase> I hadn't thought about it before in my own designs, but I guess a superfluous module boundary facilitates more efficient cache utilization.
qeed has quit [Ping timeout: 246 seconds]
ran has quit [Remote host closed the connection]
ur5us has joined #openscad
<peeps[zen]> invultri: in case you are using the cylinders as perpendicular holes in a flat object, its orders of magnitude faster to do csg on a 2D profile with circles, then linear_extrude
peeps[zen] is now known as peepsalot
noonien has joined #openscad
invultri has quit [Quit: Lost terminal]
Guest20 has joined #openscad
ur5us has quit [Remote host closed the connection]
ur5us has joined #openscad
lastrodamo has quit [Quit: Leaving]
<gbruno> [github] MohanMaker opened issue #3907 (Icon for macOS Big Sur). https://github.com/openscad/openscad/issues/3907
qeed has joined #openscad
qeed_ has quit [Ping timeout: 245 seconds]
Guest20 has quit [Quit: Client closed]
ianliu has joined #openscad
<ianliu> Is there an arc primitive in OpenSCAD
<ianliu> ?
<ianliu> for 2D shapes
<ianliu> when I import a DXF drawing, the arcs from the drawing respect $fs variable, for instance, so I think there is an arc primitive, but I don't know how to use it when drawing a polygon, for example
<peepsalot> ianliu: OpenSCAD currently only supports solid 2D and 3D primitives, so you'd have to build a polygon from a list of points.
<peepsalot> you can use a function and concatenate point lists though. here is one such function: https://github.com/thehans/FunctionalOpenSCAD/blob/master/functional.scad#L115-L132
<peepsalot> an arc by itself is not a closed polygon so doesn't count as a "solid" 2D geometry
Junxter has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 245 seconds]