Open dshadowwolf opened 1 year ago
Thanks for the report. That's odd, I haven't been able to reproduce the problem on my side.
Can you send me your scad.tray file -- just to make sure we're both using the same version? And which version of OpenScad are you using?
The version I'm using I verified against the repository the same day I opened the comment and the files matched, but... Let me see if I can drag&drop a current copy from my local here... (attached with a .txt
added to make GitHub happy) -- tray.scad.txt
And I'm using OpenSCAD 2021.01 -- I should note that I've done some poking and adding some echo()
statements to a copy of it and found that, at the point of the crash, it appears to pull a 0 from the third element of the ry
array (ry
, as far as I can tell, only has non-zero values for the first two elements and passing a 0 to _tray_meniscus
causes the resulting cylinder to have a radius of 0)
I ran a diff on your file and the one in my repo and there are no differences. I am also running OpenSCAD 2021.01 -- on Linux/Ubuntu.
That is why I opened the issue -- I could not see what was going wrong, just that it was consistently spewing the above and not working. Thoughts ?
One thing I find odd is that your program crashed due to a warning. Could it be that there is indeed a call to cylinder with radius of zero, which causes a warning; only perhaps in your settings, any warnings would cause the app to crash (something in the software's preferences) while on mine the warnings are ignored?
Cause I mean: a warning is not an error. But perhaps you have a setting that makes your instance of OpenScad reject running the program is there is a warning.
Okay, facepalm time for me -- I did have "stop at first warning" enabled for an unrelated project being done for money where I couldn't have warnings in the work I was providing.
I'll still keep the issue open, I'll fix it when I can find the time.
just put if(r)
in front on line 316
There are multiple cases where this is called with r=0 (sharp corner) , newer Versions of openSCAD will warn you if an cylinder or circle has r=0 .. older versions (2021) just ignore that and remove the object.
Everything was working fine, then I loaded OpenSCAD today and tried to work on a design I'd been playing with and the tray module is throwing a warning and not generating any geometry:
Reproducible with just:
I have done everything I can to verify that I'm using the exact same version as is in the repo and cannot find any differences (
diff
andcmp
both report no differences) so... I'm at a loss as to what the issue is, beyond it appearing that thery[2]
value for the bevel/rounding is always 0 and this is causingcylinder()
to fail.