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

CascadeStudio parameter sanity checking #37

Open
udif opened this issue Nov 17, 2020 · 4 comments
Open

CascadeStudio parameter sanity checking #37

udif opened this issue Nov 17, 2020 · 4 comments

Comments

@udif
Copy link

udif commented Nov 17, 2020

It seems that CascadeStudio is not doing any sanity checking on parameters. As a result, a call such as:

Sphere(-10)

Will result in:

Line 75: Uncaught ReferenceError: ___cxa_is_pointer_type is not defined
Line 18: Uncaught There were no scene shapes returned!

When this is a part of a larger script, and the parameters are due to long calculations, it is very hard to debug the scripts.
This is an example only, there are other unchecked calls.

@brad
Copy link
Contributor

brad commented Dec 10, 2020

@udif As a workaround until something more robust is in place, you can simply log the computed radius (and anything else you want to debug) to the console using console.log commands

@udif
Copy link
Author

udif commented Dec 10, 2020

Yes, I am making use of console.log() and alert().

@zalo
Copy link
Owner

zalo commented Dec 18, 2020

Unfortunately, any errors that happen within the OpenCascade kernel are undebuggable due to the way it was compiled. :(

There's a PR for an Embind recompilation of OpenCascade (which should have better error reporting), but I haven't had a ton of time lately to work out all of the kinks in there, so it's been sitting in PR Queue hell since early October...

@udif
Copy link
Author

udif commented Dec 18, 2020

What I implied by this issue was to add individual sanity checks in OpenCascade for each command before it is issued to the OpenCascade kernel library.
The negative radius for Sphere() was an example.

In any case, the major issue I'm having is #38. If this was solved, there would be less need for issues such as this one (although it is pretty useful by itself).

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

3 participants