JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Openscad to Jscad

    General Discussions
    2
    8
    2095
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Nathan Apter
      Nathan Apter last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • DavidLyon66
        DavidLyon66 @Nathan Apter last edited by

        @Nathan-Apter ok, I upgraded by still not working.2024-05-04-050059.png

        1 Reply Last reply Reply Quote 0
        • Nathan Apter
          Nathan Apter @DavidLyon66 last edited by

          @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.

          DavidLyon66 1 Reply Last reply Reply Quote 0
          • DavidLyon66
            DavidLyon66 @Nathan Apter last edited by

            @Nathan-Apter

            The latest update reports some sort of error and is unable to run.

            2024-05-03-214246.png

            Nathan Apter 1 Reply Last reply Reply Quote 0
            • Nathan Apter
              Nathan Apter @DavidLyon66 last edited by

              @DavidLyon66 I just updated it with a readme - make sure to pull the latest commit before following the steps

              DavidLyon66 1 Reply Last reply Reply Quote 0
              • Nathan Apter
                Nathan Apter last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • DavidLyon66
                  DavidLyon66 last edited by

                  There's no instructions anywhere on how to use this.

                  653a6860-0dc4-44e3-a472-9770804294d5-image.png

                  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.

                  Nathan Apter 1 Reply Last reply Reply Quote 0
                  • DavidLyon66
                    DavidLyon66 last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Powered by NodeBB | Contributors