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
mmu_man has quit [Read error: Connection reset by peer]
JordanBrown has quit [Ping timeout: 240 seconds]
<gbruno> [github] kintel pushed 1 modifications (Remove obsolete experimental_tests() macro) https://github.com/openscad/openscad/commit/9a2042d218b5d9eea97c02df6a8e54d65a6299e6
<gbruno> [github] kintel synchronize pull request #4796 (Make tests work in non-experimental mode) https://github.com/openscad/openscad/pull/4796
JordanBrown has joined #openscad
<gbruno> [github] kintel pushed 1 additions (Forgot one missing expected file) https://github.com/openscad/openscad/commit/fe52d7c73b7a91bfe6bfce0c91e73378a4310bfe
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
J23k42 has joined #openscad
J23k5 has quit [Ping timeout: 248 seconds]
TheAssassin has quit [Remote host closed the connection]
noonien8 has quit [Quit: Ping timeout (120 seconds)]
TheAssassin has joined #openscad
noonien8 has joined #openscad
kintel has joined #openscad
<gbruno> [github] kintel opened pull request #4803 (Remove fastcsg tests) https://github.com/openscad/openscad/pull/4803
snaked has joined #openscad
LordOfBikes has quit [Ping timeout: 264 seconds]
snaked has quit [Ping timeout: 260 seconds]
LordOfBikes has joined #openscad
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
foul_owl has quit [Ping timeout: 252 seconds]
teepee has quit [Ping timeout: 256 seconds]
teepee has joined #openscad
<gbruno> [github] kintel synchronize pull request #4803 (Remove fastcsg tests) https://github.com/openscad/openscad/pull/4803
<gbruno> [github] kintel pushed 1 modifications (Remove fast-csg tests) https://github.com/openscad/openscad/commit/d569fcb966c7706e2890dda2bb05f5d9aa063666
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
misterfish has joined #openscad
foul_owl has joined #openscad
foul_owl has quit [Ping timeout: 245 seconds]
foul_owl has joined #openscad
SamantazFox has quit [Quit: Bye]
SamantazFox has joined #openscad
arebil has joined #openscad
misterfish has quit [Ping timeout: 264 seconds]
ferdna_ has quit [Quit: Leaving]
misterfish has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
lastrodamo has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 256 seconds]
teepee_ is now known as teepee
mmu_man has joined #openscad
misterfish has quit [Ping timeout: 255 seconds]
arebil has quit [Quit: arebil]
misterfish has joined #openscad
arebil has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
cart_ has joined #openscad
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
GNUmoon has quit [Remote host closed the connection]
teepee has quit [Ping timeout: 256 seconds]
erectus has quit [Remote host closed the connection]
GNUmoon has joined #openscad
erectus has joined #openscad
teepee has joined #openscad
misterfish has quit [Ping timeout: 248 seconds]
greenbigfrog has quit [Ping timeout: 255 seconds]
greenbigfrog has joined #openscad
misterfish has joined #openscad
L29Ah has quit [Ping timeout: 255 seconds]
<lf94> InPhase: are you good at SDF math? or guso78 ? How could we get rid of this bulge at the bottom from the rounded union? http://0x0.st/HyFf.png
<lf94> I was thinking of some how specifying a normal vector, so the rounding only affects a particular plane.
<lf94> float fOpUnionRound(float a, float b, float r) {
<lf94> vec2 u = max(vec2(r - a,r - b), vec2(0));
<lf94> return max(r, min (a, b)) - length(u);
<lf94> }
<lf94> (this is glsl if you wanna go test on shadertoy)
<lf94> So I'm trying to smooth union walls and a "floor", like this: |_|
<lf94> But because I think this works on the whole shapes, the bottom of the floor is also being rounded as we see
<lf94> to the bottom of the walls
<lf94> The cuts I made were just so you can see the problem really clearly
<lf94> I think I'm gonna email Inigo if i cant figure this out
<lf94> He's responded to me before
Guest55 has joined #openscad
Guest55 has quit [Client Quit]
<InPhase> lf94: Do you have a working shadertoy example of the issue?
<lf94> I could get you one that would have the same output as the pic, yeah
<InPhase> lf94: The math of sdf's I have reasonable instincts for. The syntax I'm super rusty with.
<lf94> Plus it'd probably be good to give to inigo if I have to
<lf94> I'll do it in a bit!
<lf94> busy at work
<InPhase> I take examples sometimes and modify them to look like I want, just focusing my brain on the math. But I never put in the time to sit down and look at all the wrapper code that makes shadertoy designs do their thing. :)
<InPhase> It's just an extension of my physicist propensity to plot and combine scalar fields in my head.
<lf94> I think I actually understand the union round math-wise, but Im not sure what I can actually do to fix the problem
<lf94> max(..,..) is saying "if we're within r, return the distance, otherwise return 0"
<lf94> and if it's 0, we're just unioning the two shapes normally
<lf94> since x - length(0) would be a non-rounded shape right
<lf94> because offsets round
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
<lf94> So I just put some stuff down on graph paper
L29Ah has joined #openscad
<lf94> I think the demoscene guy that made this just "got what he needed" and moved on
<lf94> Because there's something about this that doesnt make much sense: max(r, min(a,b))
<lf94> The distance is at a minimum r, otherwise, it's the minimum of the distances a or b
<lf94> but that feels wrong to say. I think that breaks the L-continuity stuff
<lf94> if r is constant like that...
<lf94> maybe the smooth union stuff was indeed more correct and I should stick with that
<lf94> (and recommend that to everyone)
misterfish has quit [Ping timeout: 255 seconds]
qeed_ has quit [Quit: qeed_]
qeed has joined #openscad
<guso78> Lf94 will look later
<lf94> thanks :)
<lf94> ill cook up a shadertoy also
<guso78> Haha
cart_ has quit [Ping timeout: 240 seconds]
ferdna__ has joined #openscad
misterfish has joined #openscad
<gbruno> [github] rbielaws opened issue #4804 (Save Preset button is missing.) https://github.com/openscad/openscad/issues/4804
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
quiliro has joined #openscad
<quiliro> hello!
<quiliro> I came up with some photos
<quiliro> I want to combine those two shapes like yesterday
<quiliro> I had explained
<quiliro> I have learned 10 commands: cube, cylinder, hull, translate, rotate, for, color, union, intersection, difference
<quiliro> I do not know how to use them comlpetely yet
<quiliro> But I am tinkering
<quiliro> the cheatseet is very useful
<quiliro> cheatsheet
Guest38 has joined #openscad
<JordanBrown> quiliro: with no render(), I get a non-transparent pale blue thing. With render(), it's transparent, but yours is lit very oddly; it's like the brightness is reversed from what I see.
<quiliro> I do not have code in openscad...those are real life pictures
<quiliro> which code did you use, JordanBrown ?
<lf94> The roof looks basically exactly what J23k42 gave you yesterday
<lf94> (good job on the real life models by the way ;)
<quiliro> not quite...I do not think that they make a sine
<quiliro> it is rather a catenary
<lf94> right right
<lf94> the base will be very easy to do
<lf94> circle -> square lofting is pretty easy if i recall
<quiliro> but I do not know how to make a catenary in openscad
<quiliro> the base was incorrect also...it was flat on places which were not the base
<quiliro> (floor)
rawgreaze has quit [Ping timeout: 255 seconds]
guso78k has joined #openscad
<guso78k> lf94  my smooth union function looks different, it has one additional clamp function.
<guso78k> you can find in my fork in libraries/python/pylibfive.py:
<guso78k> def lv_union_smooth(a, b, r): #Credit: original algorithm in GLSL by Inigo Quilez
<guso78k>     h = lv_clamp (((b-a)/r+1)*0.5, 0, 1)
<guso78k>     return lv_lerp(b, a, h) + r*h*(h-1)
<guso78k> def lv_clamp(c,low, high):
<guso78k>     return lv.min(lv.max(c,low),high)
<guso78k> def lv_lerp(a,b,t):
<guso78k>     if type(a) is list:
<guso78k>         return lv_lerp(a[0],b[0],t), lv_lerp(a[1],b[1],t), lv_lerp(a[2],b[2],t)
<guso78k>     else:
<guso78k>         return a*(1-t) + b*t
teepee_ has joined #openscad
teepee has quit [Ping timeout: 256 seconds]
teepee_ is now known as teepee
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
rawgreaze has joined #openscad
JordanBrown_ has joined #openscad
JordanBrown has quit [Ping timeout: 255 seconds]
<lf94> guso78k: yeah, that's the typical smooth union
<lf94> I was doing a "round union" as found on the hg_sdf page
<lf94> afk, gym
<quiliro> hull() {
<quiliro> translate([10,10,20]) circle(10);
<quiliro> square(20);}
<quiliro> will not make the circle translate on the z axis
Guest38 has quit [Quit: Client closed]
<quiliro> like translate([30,0,0]){
<quiliro> translate([10,10,20]) circle(10);
<quiliro> square(20);}
<quiliro> the circle on the later expression does translate on the Z axis
ferdna__ has quit [Quit: Leaving]
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
<peepsalot> you shouodn't do 3d transformations on 2d geometry
<peepsalot> circle is 2d
<peepsalot> linear_extrude to make it 3d
<peepsalot> then transform
<peepsalot> or just use cylinder (and cube vs square), depending on the application
<peepsalot> doing as much as possible in 2d, then extruding is generally much more efficient, if the design allows for it
<peepsalot> quiliro: ^
misterfish has quit [Ping timeout: 255 seconds]
<quiliro> thanks, peepsalot
snaked has joined #openscad
<InPhase> quiliro: 3D transformations on 2D manifest in preview (depending on the operation, I think) but not in render, which causes mass chaos.
<InPhase> It probably warrants a warning.
<InPhase> Or we can wait until we purge preview and forget the problem ever existed.
<JordanBrown_> quiliro: You're saying that https://i.imgur.com/5qfwOV6.png is a photograph, not a screen capture from OpenSCAD?
<JordanBrown_> I was looking at https://termbin.com/9ggc with the semicolon on the first line removed and with (or without) a render() added at the end of the first line.
teepee has quit [Remote host closed the connection]
lastrodamo has quit [Quit: Leaving]
teepee has joined #openscad
<quiliro> JordanBrown_: These are the real-life pictures: https://imgur.com/a/F0upGdH https://imgur.com/a/en6L348
<quiliro> I don't think that those shapes deserve sin() because they are catenaries, not sines
<J23k42> quiliro  catenaries are https://en.wikipedia.org/w/index.php?title=Hyperbolic_cosine   so just use this instead of the sin
<quiliro> nice! thanks, J23k42
<quiliro> hcos()
<quiliro> Is that the function in OpenSCAD?
<J23k42> no you write it  cosh= function (x,e)(e^x+e^-x)/2;
<quiliro> Dankon, J23k42
<quiliro> wait, I do not understand the part after =
<J23k42> it is a function .. like you use  sin(x)   you use  cosh(x,e=2)
<quiliro> ok
<quiliro> dankon
<J23k42> here an example cosh= function (x,e=2.71828)(e^x+e^-x)/2;for (i =[-1:.01:1])translate([i,0])cube([.01,1,cosh(i)]);
<JordanBrown_> I like how you make e be a parameter, so that you can use a different value if you like. (But I should note that I don't understand hyperbolic trig at all; maybe it *is* meaningful.)
<quiliro> nice!
* quiliro tries it now
<J23k42> well e is e  so lazy me just don't need to write it twice
<quiliro> cosh= function (x,e=2.71828)(e^x+e^-x)/2
<quiliro> I will have to study that
<quiliro> cosh is the name of a variable?