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!
-
@Nathan-Apter ok, I upgraded by still not working.
-
@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.
-
The latest update reports some sort of error and is unable to run.
-
@DavidLyon66 I just updated it with a readme - make sure to pull the latest commit before following the steps
-
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!