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: 255 seconds]
mtm has joined #openscad
Joel has quit [Ping timeout: 260 seconds]
<gbruno> [github] ochafik synchronize pull request #5235 (Enable Manifold by default in prod builds) https://github.com/openscad/openscad/pull/5235
<gbruno> [github] ochafik edited pull request #5235 (Enable Manifold by default in prod builds) https://github.com/openscad/openscad/pull/5235
<gbruno> [github] ochafik edited pull request #5235 (Add backend setting / flag to enable manifold in prod builds) https://github.com/openscad/openscad/pull/5235
J24k66 has quit [Quit: Client closed]
J24k66 has joined #openscad
<gbruno> [github] ochafik edited pull request #5235 (Add backend setting / flag to enable manifold in prod builds) https://github.com/openscad/openscad/pull/5235
<gbruno> [github] ochafik synchronize pull request #5235 (Add backend setting / flag to enable manifold in prod builds) https://github.com/openscad/openscad/pull/5235
pbsds3 has quit [Ping timeout: 244 seconds]
Joel has joined #openscad
LordOfBikes has quit [Ping timeout: 260 seconds]
LordOfBikes has joined #openscad
snaked has joined #openscad
Guest35 has joined #openscad
<Guest35> hi,I WANT TO OPEN OPENSCAD VIA VS WHICH MAY REQUIRE A DLL LIBRARY, HOW DO I IMPLEMENT THIS OR WHERE CAN I DOWNLOAD IT?
<buZz> do the nightlies have color exports yet?
<Guest35> someone can help me?
<buZz> i dont know if openscad can be a dll library
<Guest35>  thank you
<buZz> but hang aroung longer, devs arent here 24/7 :)
<nihil> THANKS BUZZ i WILL WAIT
J24k63 has joined #openscad
J24k66 has quit [Ping timeout: 256 seconds]
<InPhase> Guest35: There has been talk of the merit of making an OpenSCAD dll, and some effort was made toward restructuring that might facilitate that later. But most people use the executable as an engine which can be called.
<InPhase> When bundling it with some other infrastructure, that is.
Guest35 has quit [Quit: Client closed]
pbsds3 has joined #openscad
cave has quit [Remote host closed the connection]
cave has joined #openscad
ferdna has joined #openscad
ferdna has quit [Quit: Leaving]
arahael has joined #openscad
<gbruno> [github] chartan1990 opened issue #5238 (example009.scad preview different from render) https://github.com/openscad/openscad/issues/5238
<Scopeuk> I know they've gone (maybe they will read logs) but I think there was some talk about using the webasm version as embedable inside a vs code plugin
<gbruno> [github] chartan1990 closed issue #5238 (example009.scad preview different from render) https://github.com/openscad/openscad/issues/5238
JakeSays_ has joined #openscad
JakeSays has quit [Ping timeout: 260 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
mmu_man has joined #openscad
Guest24 has joined #openscad
krushia has quit [Quit: Konversation germinated!]
mmu_man has quit [Ping timeout: 260 seconds]
Guest24 has quit [Quit: Client closed]
ccox_ has quit [Ping timeout: 260 seconds]
ccox has joined #openscad
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
mmu_man has joined #openscad
JakeSays has joined #openscad
JakeSays_ has quit [Ping timeout: 255 seconds]
pca006132 has quit [Remote host closed the connection]
<arahael> J24k63: I want to pour water on that. Very good.
<J24k63> that will kill it or?  a spice blow only works for juveniles
ccox_ has joined #openscad
ccox has quit [Ping timeout: 276 seconds]
pca006132 has joined #openscad
mtm has quit [Ping timeout: 260 seconds]
mtm has joined #openscad
misterfish has joined #openscad
guso78k has joined #openscad
J24k63 has quit [Quit: Client closed]
J24k63 has joined #openscad
misterfish has quit [Quit: leaving]
misterfish has joined #openscad
guso78k has quit [Ping timeout: 256 seconds]
adigitoleo has quit [Remote host closed the connection]
adigitoleo has joined #openscad
J24k63 has quit [Ping timeout: 256 seconds]
misterfish has quit [Ping timeout: 252 seconds]
J24k has joined #openscad
misterfish has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
mmu_man has quit [Ping timeout: 252 seconds]
snaked has quit [Ping timeout: 252 seconds]
misterfish has quit [Ping timeout: 260 seconds]
misterfish has joined #openscad
snaked has joined #openscad
snakedGT has joined #openscad
snakedLX has joined #openscad
snakedLX has quit [Remote host closed the connection]
snaked has quit [Ping timeout: 272 seconds]
snakedGT has quit [Ping timeout: 260 seconds]
little_blossom has quit [Quit: little_blossom]
little_blossom has joined #openscad
J24k has quit [Quit: Client closed]
J24k has joined #openscad
krushia has joined #openscad
misterfish has quit [Ping timeout: 248 seconds]
Fleck has quit [Remote host closed the connection]
Fleck has joined #openscad
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
misterfish has joined #openscad
rawgreaze has quit [Quit: ZNC 1.8.2 - https://znc.in]
rawgreaze has joined #openscad
J24k has quit [Quit: Client closed]
J24k has joined #openscad
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 244 seconds]
mmu_man has joined #openscad
ferdna has joined #openscad
mmu_man has quit [Ping timeout: 260 seconds]
<J24k> anybody know why this does not compute function h(v=10 ,r=200)=0.54193 *(1.7321* sqrt(3* v^2 - 12.566* r^3* v) + 6.2832 *r^3 - 3 * v)^(1/3) + (1.8453* r^2)/(1.7321 *sqrt(3* v^2 - 12.566* r^3* v) + 6.2832* r^3 - 3 *v)^(1/3) + r; ?
mmu_man has joined #openscad
misterfish has quit [Ping timeout: 260 seconds]
ferdna has quit [Quit: Leaving]
<J24k> hm seems v need to be  huge
<Scopeuk> J24k perhaps a step back to what you are trying to do?
<J24k> Scopeuk calculate the volume of a sphere cap from h
<J24k> it seems the math in openSCAD is limited - if i replace the exponents with let( v2=v^2,… )  i get results but they are just wrong and if i have PI it always is "nan"
<J24k> probably i can only use the function for volume and then recursive iterate until i am at the volume i am looking for
<Scopeuk> all I've got would be to break it up into multiple chunks and try to identify where it goes wrong
<J24k> hadn't thought it would be so difficult to find out how high the water level for a certain volume  in a bowl is
<Scopeuk> I suspect this to be and attack of floating point maths but I have nothing concrete to hang that off
<J24k> maybe easier to fill an  array with the volumes for h=[0:r]  and then use a lookup
peeps[zen] has quit [Remote host closed the connection]
peeps[zen] has joined #openscad
RoyK^ is now known as RoyK
<peeps[zen]> J24k: why not use the builtin `PI` constant? makes it very hard to read and guess what multiple/fraction of pi you are intending all ovewr the equation
<J24k> because with PI i always get nan as result so i started to simplify it
<J24k> peeps[zen] here function h(v=10,r=d/2)= (sqrt(3) * sqrt(3 * v^2 - 4 * PI * r^3 * v) + 2 * PI * r^3 - 3 * v)^(1/3)/(2 * PI)^(1/3) + ((2 * PI)^(1/3) * r^2)/(sqrt(3) * sqrt(3 * v^2 - 4 * PI * r^3 * v) + 2 * PI * r^3 - 3 * v)^(1/3) + r;
<peeps[zen]> brb, need to reboot
peeps[zen] has quit [Quit: Connection reset by peep]
peepsalot has joined #openscad
<peepsalot> well, i'm still having my weird crashing issues that apparently only happen to me on the nightly
<peepsalot> open new doc, paste your function (with PI constants), try to type in another line like echo(h()); and it crashes before registering a single keypress
<J24k> hmm sorry to hear
<peepsalot> i would approach it by splitting the function into smaller let statements
<J24k> yes i have startet with that and then i got results for some values but they seems to be terrible wrong
<J24k> function h(v=1 ,r=20)=let(r2=r^2,r3=r^3,v2=v^2)0.54193 *(1.7321* sqrt(3* v2 - 12.566* r3* v) + 6.2832 *r3 - 3 * v)^(1/3) + (1.8453* r2)/(1.7321 *sqrt(3* v2 - 12.566* r3* v) + 6.2832* r^3 - 3 *v)^(1/3) + r;
<J24k> maybe the sqrt need to be separated.
<InPhase> J24k: Well we can start with that first sqrt going negative real fast.
<InPhase> r^3 is huge, v^2 is small, and you're subtracting v^2 minus r^3, plus some extra coefficients.
<InPhase> If this should not happen, then you derived something wrong.
<J24k> not me  wolfram alpha said this is it
<InPhase> Can you show the geometry you're trying to calculate the volume of?
<InPhase> I'm not sure what sphere cap means.
<J24k> a sphere cap
<InPhase> There's a volume equation on that page.
<J24k> the formular for volume with h and r
<InPhase> It is very different from the one in this equation.
<J24k> but it need to be solved for h .. which becomes ugly
<InPhase> Oh.
<InPhase> Let me try to rearrange it.
<gbruno> [github] gsohler synchronize pull request #5209 (Measurement improvement) https://github.com/openscad/openscad/pull/5209
<InPhase> J24k: So it works in Python returning a real value if I feed in real values of type complex.
<InPhase> v=1+0j, r=20+0j gives me an output of 59.999734739416084-5.551115123125783e-17j
<InPhase> Where 5e-17 is obviously just floating point error.
<InPhase> So what that says is that the equation is just not adequately simplified to be working with reals and not complex values.
<InPhase> Although that's the same problem I get when I solve the same expression in maxima.
<J24k> i hate computer math - Ü
<InPhase> I'm not sure that there's any variant of math which makes this one easier. ;)
<InPhase> But let me try some automated simplification routines and see if one gets lucky.
<J24k> Already said that just using the volume and fill a table then lookup()  that table would be my next aproach
<J24k> using a dipstick for a wok seems silly anyway but i thought it was a funny challenge until i got that formula back
<InPhase> Got it.
<InPhase> It was kind of obvious the expression had to be this when you think about it. <.< >.> https://bpa.st/A3SA
<InPhase> J24k: My secret was using maxima and calling the realpart() function on the solution.
<InPhase> Probably similar would have been doable with wolfram.
<InPhase> It's not simplifiable out of the complex calculation unless you clarify that you're willing to ignore the complex results that you get when the volume exceeds that obtainable with that radius of sphere.
<J24k> haha  that is some function
<InPhase> Fortunately, the copy-paste out of maxima is fully OpenSCAD code compatible except pi is lowercase.
<InPhase> Otherwise I surely would have typoed that beast.
<InPhase> Also, that expression can probably be radically simplified. It repeats a lot of stuff.
<InPhase> But, I leave that as an exercise for the reader.
<J24k> i don't care as long it is working ..  and so i can play with my Shai-Hulud https://imgur.com/a/EIpY8J2
<J24k> Thanks InPhase for solving!
<InPhase> Well that's an impressive beast of a model for OpenSCAD. :)
<J24k> So your formula is calculating something but it is not h for the volume
<J24k> if i put the result into the original i got something different
<J24k> function v(h=10,r=d/2)= ((PI * h^2) / 3) * (3*r - h);
<J24k> i can change v and the result stays nearly the same
<J24k> for h=2r the result seems correct but then h gets bigger when lowering the volume
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
mmu_man has quit [Ping timeout: 255 seconds]
<InPhase> Well, I don't get anything sensible out of the other two solutions to that degree 3 polynomial.
<InPhase> Maybe try asking wolfram to give you the real part solution to h from v.
<InPhase> I thought it correct when it returned the same value for me as what I got in python with complex values. But maybe there's a deeper issue with what I extracted from maxima, because I also see it lacking a proper dependence on v.
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
mmu_man has joined #openscad
ferdna has joined #openscad
pbsds3 has quit [Quit: The Lounge - https://thelounge.chat]
pbsds3 has joined #openscad
pbsds3 has quit [Quit: The Lounge - https://thelounge.chat]
pbsds3 has joined #openscad