Openscad to Jscad
-
Hi! I mentioned a while back that I was working on a project to convert openscad to jscad. I've gotten a working POC and have published it to https://github.com/cookiecad/Openscad-to-JSCAD-converter/
The general idea is to use an openscad grammar to parse the openscad code into a syntax tree, then use the tree to jenerate jscad code. In order to make the resulting code more readable or when jscad is missing an equivalent operation the code adds helper functions.
I used the openscad version of the honeycomb storage wall (on printables) as my test case and it successfully converts it to jscad. Each language feature is added separately so there are still many more to add.
If anyone wants to try it out or contribute let me know. I haven't had time to work on it recently but would love to make more progress. Index.js is the starting point.
As a side note - you can run jscad code with auto-completion and typechecking in our site, cadit.app - let me know what you think!
-
This post is deleted! -
There's no instructions anywhere on how to use this.

I did a "git clone", put it in a directory, then what?
I think this utility needs basic instructions for ordinary users on how to use it.
-
This post is deleted! -
@DavidLyon66 I just updated it with a readme - make sure to pull the latest commit before following the steps
-
-
@DavidLyon66 What version of Node are you on? If it is an older version you can try import * as fs from 'fs'; or upgrading node.
-
@Nathan-Apter ok, I upgraded by still not working.

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login