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

Symbolic export emits primitives not supported by OpenSCAD #475

Open
sorki opened this issue Jan 6, 2024 · 2 comments
Open

Symbolic export emits primitives not supported by OpenSCAD #475

sorki opened this issue Jan 6, 2024 · 2 comments

Comments

@sorki
Copy link
Contributor

sorki commented Jan 6, 2024

These should either throw an error or (even better) we would have some sort of language pragma or just a knob that would allow these (and they would also need escad parser counterparts).

With a knob, we could have a properly extended openscad engine, while also having an ability to disable it for OpenSCAD compatible mode.

cc @lepsa

@lepsa
Copy link
Contributor

lepsa commented Jan 8, 2024

@sorki Nice catch! I've done a quick fix using error like the other unsupported primitives, but it feels clunky. I think a type class based approach where the valid escad objects are separated from extended objects, and instances for exporting to escad ensure that nothing unsupported is sneaking in.

This would probably be a fairly decent change, so I think we can fix this specific problem now and fix the general case later.

@sorki
Copy link
Contributor Author

sorki commented Jan 8, 2024

Sounds good! You could also try to switch the function not to use error but rather return Either and for now throw an error in calling export one since the export functionality doesn't consider the case of exports failing.

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

No branches or pull requests

2 participants