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
mtm has quit [Ping timeout: 252 seconds]
mmu_man has joined #openscad
mtm has joined #openscad
ccox has quit [Ping timeout: 248 seconds]
foul_owl has quit [Ping timeout: 252 seconds]
califax has quit [Remote host closed the connection]
califax has joined #openscad
ccox has joined #openscad
J25k80 has joined #openscad
J25k92 has quit [Ping timeout: 240 seconds]
kintel has joined #openscad
<kintel> teepee can you GPU accelerate any of that? Not sure how fast the raspi GPU is these days..
<gbruno> [github] kintel pushed 2 modifications (Bump Clipper2 to 1.5.2) https://github.com/openscad/openscad/commit/f64e0a6e6555bc91379cbafb1348b9719f97c07c
<gbruno> [github] kintel opened pull request #5626 (Bump Clipper2 to 1.5.2) https://github.com/openscad/openscad/pull/5626
mmu_man has quit [Ping timeout: 272 seconds]
foul_owl has joined #openscad
<gbruno> [github] kintel pushed 3 modifications (Renamed vertex_array to vbo_builder) https://github.com/openscad/openscad/commit/06f6d3435d155f269393fee98117e163444ceb48
<gbruno> [github] kintel synchronize pull request #5622 (VBO Refactoring continues) https://github.com/openscad/openscad/pull/5622
<gbruno> [github] kintel pushed 10 modifications (Renamed vertex_array to vbo_builder) https://github.com/openscad/openscad/commit/682a7ef07262216fb11738b9365d9a0269de63b8
<gbruno> [github] kintel synchronize pull request #5622 (VBO Refactoring continues) https://github.com/openscad/openscad/pull/5622
<gbruno> [github] kintel edited pull request #5622 (VBO Refactoring continues) https://github.com/openscad/openscad/pull/5622
<gbruno> [github] kintel synchronize pull request #5622 (VBO Refactoring continues) https://github.com/openscad/openscad/pull/5622
<gbruno> [github] kintel pushed 1 modifications (Use VertexStateContainer in VBOPolyhedron) https://github.com/openscad/openscad/commit/45bb6093a908586d0a8d23a1c19de24a0cfc7cab
<gbruno> [github] kintel edited pull request #5622 (VBO Refactoring continues) https://github.com/openscad/openscad/pull/5622
<gbruno> [github] kintel closed pull request #5626 (Bump Clipper2 to 1.5.2) https://github.com/openscad/openscad/pull/5626
<gbruno> [github] kintel pushed 2 modifications (Bump Clipper2 to 1.5.2 (#5626)) https://github.com/openscad/openscad/commit/11c07a0d6194753bed16d61d4ba8dd2c9141cba8
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lastrodamo has joined #openscad
cart_ has joined #openscad
<ecraven> is there any way to model something like https://0x0.st/8X0O.webp in openscad?
<ecraven> it has so many "round" surfaces, I don't even know how to begin to think about this :-/
<ecraven> especially the "dimple" on the top surface :-/
Guest95 has joined #openscad
Guest95 has quit [Client Quit]
drkow has quit [Ping timeout: 244 seconds]
drfff has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 264 seconds]
teepee_ is now known as teepee
<Kehet> if you need keycaps https://github.com/rsheldiii/KeyV2
<Kehet> obviously not exactly same geometry but could be good starting point
<ecraven> yea, looking at that, but it doesn't fully work with current openscad
<J25k80> ecraven you can but either not that perfect or with a lot of math and work
<J25k80> ecraven try this https://bpa.st/MIBA
<ecraven> thanks! I've started doing something like this, this looks promising
<J25k80> building as a polyhedron would allow more detail but that is not easy if you are not used to work with points and faces.
<J25k80> https://imgur.com/a/ObBUmAY  you can slant the surface by moving the sphere
<J25k80> and if you want the curved outside just substract a sin or exp value from the size
<J25k80> ecraven here https://bpa.st/KR5A
<ecraven> thanks a lot, I'll look at this in detail to understand
<J25k80> feel free to ask if something remain unclear
<ecraven> hm.. is there a way to do a "bulging" rectangle, with non-straight sides?
J25k80 has quit [Quit: Client closed]
J25k80 has joined #openscad
<ecraven> do I understand correctly that I cannot do curved 2d lines?
<J25k80> ecraven a 2d line has two points .. a curve uses multiple points, so a circle is using multiple line segments to be roundish
<J25k80> there is a form called super Ellipse
<ecraven> hm.. so I could write a function that creates a bezier line (or rather find someone who already did this ;)
<J25k80> yes
<ecraven> the problem is, I want the center sides of the rectangle to bulge out a bit, not just rounded edges
<J25k80> a simple approach is to use scaled circles   and hull
<ecraven> hm.. maybe a squircle that is slightly *larger* than the square I want would work. thanks a lot for all the help!
<J25k80> ecraven the scale factor determine the bulge
<ecraven> thanks, I didn't understand that you can use hull to not get a hole at the edges!
<ecraven> (corners, not edges)
<ecraven> hm.. so I could do my own squircles by just running through theta for a full circle and creating a polygon, right?
<J25k80> yes polygon( points= [for (i=0:5:360)[cos(i),sin(i)]*r ] );
<J25k80> polygon( points= [for (i=[0:5:360])let(r=10)[cos(i),sin(i)]*r ] );
<J25k80> ecraven here polygon( points= [for (i=[0:5:360])let(r=10)[cos(i),sin(i)]*(r+(.5+0.5*sin(i*4))*+1) ] );
<ecraven> thanks!
buZz has joined #openscad
buZz is now known as Guest1115
Guest1115 is now known as buZz
<ecraven> can I get colors to apply to the rendered result too?
<J25k80> yes with the 2025 version
<J25k80> but STL will not save color, 3mf can
<J25k80> but slicer often ignore these .. some accept color on obj files
<ecraven> hm.. seems I have 2021.01, is that the latest release?
<J25k80> official yes but there are newer snapshots
<J25k80> which have the ability to render colors
mtm has quit [Ping timeout: 260 seconds]
snaked has quit [Quit: Leaving]
mtm has joined #openscad
mmu_man has joined #openscad
<ecraven> is there a way to combine two objects of different colors without a full union? if I run union(), the colors are lost.
guso78k has joined #openscad
<gbruno> [github] gsohler opened issue #5627 (OpenSCAD blocks/does not show GUI when started) https://github.com/openscad/openscad/issues/5627
<guso78k> ecraven, did you enable Manifold ? Manifold union can preserve the colors when unioning
<ecraven> no, I don't know about that. thank you, I'll read up!
<guso78k> In the settings somehwere you can setup backend to manifold
<ecraven> hm.. the problem seems to be that the *difference* I run after the union changes the colors again
<ecraven> ok, so I need to reorder things ;)
<guso78k> ahh , so colors are not maintained ;)
<guso78k> not=now
<ecraven> difference seems to recolor everything
J25k80 has quit [Quit: Client closed]
J25k80 has joined #openscad
<J25k80> manifold is under advanced
<J25k80> face colors of difference is the color of the differenced object
<ecraven> can I use manifold for preview? it seems to be fast enough for my simple models?
<InPhase> You can just render instead of preview. There's an aspiration to eventually replace the preview subsystem with manifold rendering, but as you are seeing it needs the coloring to work properly, and this is a new feature.
<InPhase> Preview was only created in the first place because of how slow rendering used to be.
<ecraven> but each time I change my file (in an external editor), I go back to preview, can I set it so that it always directly goes to render?
<ecraven> I'm trying to do a 2d cross with polygon (https://0x0.st/8Xkn.txt), and I see this: https://0x0.st/8Xk5.png what am I doing wrong here?
<ecraven> (there's a reason I want polygon instead of two squares, because I need the points to add rounded corners in some places)
<ecraven> ok, please ignore, found it .. missing a -
guso78k has quit [Quit: Client closed]
rapha has joined #openscad
<rapha> hi all!
<rapha> i'm running into the functional-paradigm / immutable-variables brick wall again
<rapha> so i have this thing where i have a number of parts and need to use as many as possible of them, but not more than i have
<rapha> so it'd be nice to have part_a_counter = 50 and then each time i use part A, part_a_count--, and in the end printf(part_a_counter)
Guest26 has joined #openscad
<rapha> is there anything in OpenSCAD that allows for something like this?
<Guest26> Hi there, can anyone help me understand the rules for inclusion?
<rapha> Inclusion of what, Guest26?
<Guest26> Other SCAD-files
<rapha> Oh. What about it are you having trouble with?
<rapha> s/printf/echo/
<Guest26> You see, (for testing) I've created three files: A, B and C. B includes A and C, C includes B and A and A includes nothing. Obviously, there's a cycle and OpenSCAD interrupts this cyclic inclusion. The second instance of C is ignored. What I do not get about this is: Why is the second instance of B not also ignored?
<rapha> o_O
<rapha> sorry then, someone more knowledgable will have to answer ... i only know https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Include_Statement , and that doesn't speak of such things
<rapha> which seems to confirm the behaviour described by you
<Guest26> Yeah I've read that too just now, but I'm not using "use" but "include", so this basically just tells me "nested calls work".
phryk has quit [Quit: ZNC 1.9.1 - https://znc.in]
phryk has joined #openscad
<rapha> there's people in here who work *on* openscad, so if you just idle around for a few hours, one of them will answer towards the evening
<rapha> (mostly middle european time zones, is my feeling of the channel)
<Guest26> My original idea was to write my own little libraries, because I've been copying the same functions and modules into several files, but those modules are now growing, so I'd like to keep them separate. However, I run into these pesky "variable has been overwritten"-warnings, so I read the page you linked and I've come across a common scenario (at
<Guest26> least that's how I'd classify it): A->B->C and A->C (with "->" meaning" includes"). In my library-files, this leads to those warnings and I don't quite get why, so I considered using "use" instead of "include" (and found out the global variables there *are* actually declared and then used, for example for default arguments), but... Well, I might
<Guest26> just be confused about all this. It just doesn't behave according to my intuition.
<Guest26> Alright, thanks! I'll linger and watch. :)
<rapha> good luck :)
<rapha> ah, and perhaps check out one of the existing libraries ... the biggest i know is https://github.com/BelfrySCAD/BOSL2
Guest26 has quit [Ping timeout: 240 seconds]
Non-ICE has quit [Quit: Screw you guys, im going home!]
Non-ICE has joined #openscad
<gbruno> [github] scrameta synchronize pull request #5584 (RFC: New general-purpose extrusion mechanism - 2025 refresh) https://github.com/openscad/openscad/pull/5584
fling has quit [Remote host closed the connection]
fling has joined #openscad
vinayakjeet has joined #openscad
vinayakjeet has quit [Client Quit]
<ecraven> openscad doesn't support complex numbers for math, does it?
<InPhase> Nope. But you can convert those operations to matrix ones, as this has some support, and can be augmented easily enough.
<InPhase> Most complex number operations relating to geometries are just a shorthand for some straightforward matrix ops. And ultimately all of them can be re-expressed as operations on vectors with appropriate steps.
<ecraven> I'd like to generate these: https://mathworld.wolfram.com/Rectellipse.html
<ecraven> however, I have no idea how to convert the formula to work with polar coordinates, and if I solve it for x (depending on y), this leads to complex numbers
drkow has joined #openscad
drfff has quit [Ping timeout: 252 seconds]
<InPhase> ecraven: a = 4; b = 3; polygon([for (t=[0:359]) let(xs=t<90||t>270?1:-1, ys=t<180?1:-1, tm=90-abs(t%180-90)) [xs*a*sqrt(cos(tm)), ys*b*sqrt(sin(tm))]]);
<InPhase> ecraven: I think.
<ecraven> thanks, I'll check!
<InPhase> ecraven: In summary, the superellipse parametric form, repeating quadrant 1 four times, and flipping things appropriately.
ali1234 has quit [Remote host closed the connection]
ali1234 has joined #openscad
<J25k80> rapha you can use a recursion for this, but i assume there is a better way to get the result - so why do you want to count?
cart_ has quit [Ping timeout: 246 seconds]
<J25k80> you can use parents for some kind of BOM
<J25k80> "allegedly"
Guest8 has joined #openscad
<J25k80> counting modules is probably not possible if they are in different scopes and not children of each other
<InPhase> rapha: I missed your question until I saw J25k80's reply. But maybe you can give a little more detail of the use case. Recursion-is-looping is the way to think about the problem. Either you do function recursion and count up what you're going to do ahead of time, and then just instantiate what you precalculated with your functions, or you do module recursion as looping and put everything you do
<InPhase> inside this module recursion looping.
<InPhase> rapha: But whether or not this has any secondary problems, or which of these is smarter to try, depends on some details of your scenario.
<InPhase> rapha: Toy proof of concept for fun: https://bpa.st/ID2A
<ecraven> InPhase: hm.. I don't understand how to add the parameter for the "amount" of rounding into that :-/
<InPhase> ecraven: There is no amount of rounding in the first definition.
<ecraven> I'm using the Fernandez-Guasti squircle.
<ecraven> I need to control the amount of rounding too :-/
<InPhase> ecraven: Well, a random mathematical guess lets me introduce this q parameter which works for values from 0 to 1: a = 4; b = 3; q = 1; polygon([for (t=[0:359]) let(xs=t<90||t>270?1:-1, ys=t<180?1:-1, tm=90-abs(t%180-90)) [xs*a*cos(tm)^q, ys*b*sin(tm)^q]]);
<InPhase> Oh, actually it works above 1 as well.
<InPhase> Just don't go negative.
<InPhase> But 1 is the ellipse it seems.
<InPhase> It's possible that the q I introduced is equivalent to 1-s from the bottom of that page, but if you want to prove they're the same, I'll leave that as an exercise for the reader. They have the same range though, just backwards. :)
<ecraven> thanks, I'll play around with this!
<ecraven> somehow playing with openscad always comes back to needing to understand more maths :D
<InPhase> Nice. 2 gives a diamond.
<InPhase> It kind of makes sense that 2 would give a diamond. :)
<InPhase> The diamond is not one of the shapes from that mathworld page, but I don't suppose you'd want those other asymptotic non-geometric shapes anyway.
<ecraven> no, I'm playing with keycaps, and just want "nice" rounded rectangles
<InPhase> That is within shape of a pretty shape for that.
Guest8 has quit [Ping timeout: 240 seconds]
<InPhase> ecraven: Looks like it's a good base shape for a keycap: https://imgur.com/a/4jfYId5 https://bpa.st/ADAQ
<ecraven> that looks nice, thank you!
Guest8 has joined #openscad
Guest8 has quit [Ping timeout: 240 seconds]
buZz has quit [Ping timeout: 252 seconds]
buZz has joined #openscad
buZz is now known as Guest7516
Guest7516 is now known as buZz
lastrodamo has quit [Quit: Leaving]
<gbruno> [github] damienmarchal closed pull request #5431 (FIX issue #5318) https://github.com/openscad/openscad/pull/5431
kintel has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stealth_ has joined #openscad
<stealth_> i 3d printed some cellphone stand and gave it to my mom to use, and her boss at work is asking me if i want to sell it at their store! is it worth it?
<gbruno> [github] damienmarchal opened pull request #5628 ([COSMETIC] Renames the method and attributes so they use camlCase) https://github.com/openscad/openscad/pull/5628
<gbruno> [github] damienmarchal synchronize pull request #5628 ([COSMETIC] Renames the method and attributes so they use camlCase) https://github.com/openscad/openscad/pull/5628
snaked has joined #openscad