Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_tray_meniscus appears broken #2

Open
dshadowwolf opened this issue Jan 26, 2023 · 10 comments
Open

_tray_meniscus appears broken #2

dshadowwolf opened this issue Jan 26, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@dshadowwolf
Copy link

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:

WARNING: cylinder(r1=0, r2=0, ...) in file libraries/tray.scad, line 316
TRACE: called by 'cylinder' in file OpenSCAD/libraries/tray.scad, line 316
TRACE: called by 'translate' in file OpenSCAD/libraries/tray.scad, line 316
TRACE: called by 'difference' in file OpenSCAD/libraries/tray.scad, line 313
TRACE: called by '_tray_meniscus' in file OpenSCAD/libraries/tray.scad, line 285
TRACE: called by 'children' in file OpenSCAD/libraries/tray.scad, line 320
TRACE: called by 'translate' in file OpenSCAD/libraries/tray.scad, line 320
TRACE: called by 'rotate' in file OpenSCAD/libraries/tray.scad, line 320
TRACE: called by 'translate' in file OpenSCAD/libraries/tray.scad, line 320
TRACE: called by '_tray_rotate_around' in file OpenSCAD/libraries/tray.scad, line 285
TRACE: called by 'translate' in file OpenSCAD/libraries/tray.scad, line 285
TRACE: called by 'if' in file OpenSCAD/libraries/tray.scad, line 284
TRACE: called by 'translate' in file OpenSCAD/libraries/tray.scad, line 278

Reproducible with just:

include <tray.scad>

tray([200,200,200]);

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 and cmp both report no differences) so... I'm at a loss as to what the issue is, beyond it appearing that the ry[2] value for the bevel/rounding is always 0 and this is causing cylinder() to fail.

@sofian
Copy link
Owner

sofian commented Jan 28, 2023

Thanks for the report. That's odd, I haven't been able to reproduce the problem on my side.

@sofian
Copy link
Owner

sofian commented Jan 28, 2023

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?

@dshadowwolf
Copy link
Author

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)

@sofian
Copy link
Owner

sofian commented Jan 29, 2023

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.

@dshadowwolf
Copy link
Author

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 ?

@sofian
Copy link
Owner

sofian commented Jan 29, 2023

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?

@sofian
Copy link
Owner

sofian commented Jan 29, 2023

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.

@dshadowwolf
Copy link
Author

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.

@sofian sofian added the bug Something isn't working label Jan 29, 2023
@sofian
Copy link
Owner

sofian commented Jan 29, 2023

I'll still keep the issue open, I'll fix it when I can find the time.

@UBaer21
Copy link

UBaer21 commented Feb 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants