JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Openscad to Jscad

    Scheduled Pinned Locked Moved General Discussions
    8 Posts 2 Posters 3.9k Views 1 Watching
    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 ApterN Offline
      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
      • DavidLyon66D Offline
        DavidLyon66
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • DavidLyon66D Offline
          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 ApterN 1 Reply Last reply Reply Quote 0
          • Nathan ApterN Offline
            Nathan Apter
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • Nathan ApterN Offline
              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

              DavidLyon66D 1 Reply Last reply Reply Quote 0
              • DavidLyon66D Offline
                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 ApterN 1 Reply Last reply Reply Quote 0
                • Nathan ApterN Offline
                  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.

                  DavidLyon66D 1 Reply Last reply Reply Quote 0
                  • DavidLyon66D Offline
                    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

                    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
                    • First post
                      Last post
                    Powered by NodeBB | Contributors