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

Safeguards for undef to avoid long computations #12

Open
ebigeon opened this issue Apr 23, 2023 · 1 comment
Open

Safeguards for undef to avoid long computations #12

ebigeon opened this issue Apr 23, 2023 · 1 comment

Comments

@ebigeon
Copy link

ebigeon commented Apr 23, 2023

If one of the parameters of the modules is undef, it can take for ever to return because of undefined value propagations.

For example :

ScrewThread(12, undef, pitch=0, tooth_angle=30, tolerance=0.4, tip_height=0, tooth_height=0, tip_min_fract=0);

Adding asserts or is_num tests at the relevant points should suffice to avoid it at very low cost.

@benzvan
Copy link

benzvan commented Feb 23, 2024

I just ran into this as well. Happy to open a PR for at least a couple obvious ones.

benzvan added a commit to benzvan/threads-scad that referenced this issue Feb 23, 2024
Avoids apparent infinite loop when values are undefined due to math or
syntax errors in file.

See rcolyer#12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants