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

Importing stl throws error #11

Open
Logical-sh opened this issue May 13, 2021 · 3 comments
Open

Importing stl throws error #11

Logical-sh opened this issue May 13, 2021 · 3 comments

Comments

@Logical-sh
Copy link

Trying to import an STL using require throws a parser error. I believe this means it is not trying to use the jscad importer, but instead import it as a js module. This project works perfectly fine when drug into the the jscad site for 2.0.

Rhinoceros Binary STL ( May  7 2019 )
           ^
ParseError: Unexpected token```
@danmarshall
Copy link
Owner

Hi @comwizz2, I guess I'm opinionated about the jscad importer. I should add this to the readme.

My belief is that it should just be plain Node.js and there is a lot of code in the importer that duplicates what already exists and is supported by a much larger community. Also, the importer would probably break the debugging capabilities of jscad-now since it uses a web worker in an opaque way.

Thank for filing the issue though. If there are others who feel strongly that this should be added perhaps there is a Browserify plugin that we can write to achieve this functionality.

@Logical-sh
Copy link
Author

Logical-sh commented May 18, 2021 via email

@danmarshall
Copy link
Owner

I think that you can just use the Node.js file api, and that Browserify will make it "just work" in the browser.

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