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

    3d to 2d

    Scheduled Pinned Locked Moved General Discussions
    6 Posts 3 Posters 1.6k Views 2 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.
    • Maria AlzateM Offline
      Maria Alzate
      last edited by

      Anyone have any suggestions on how i can go from an extruded shape back to 2d, like how i can make an extruded cylinder back to a circle? I'm asking since I'm trying to generate .svg files.

      z3devZ 2 Replies Last reply Reply Quote 0
      • z3devZ Offline
        z3dev @Maria Alzate
        last edited by

        @Maria-Alzate sadly, no.

        there's a concept call 'projection', which projects the outlines of a 3D shape to a plane, which becomes basically 2D. this functionality has been requested several times over the years, but there has never been a implementation provided.

        https://github.com/jscad/OpenJSCAD.org/issues/99

        i think others are basically taking a very thin slice, converting the points into 2D, and creating a 2D shape from the points.

        however, this doesn't work if there are holes in the 3D shape.

        1 Reply Last reply Reply Quote 0
        • gilboonetG Offline
          gilboonet
          last edited by

          I made a function (vol2surf) that returns a shape from a volume and an axis, but it's gross and wasn't fully tested. You'll maybe get a shape that needs winding reversal. code : https://github.com/gilboonet/gilboonet.github.io/blob/master/demos/gigi.js run : https://jscad.xyz/#https://raw.githubusercontent.com/gilboonet/gilboonet.github.io/master/demos/gigi.js

          Maria AlzateM 1 Reply Last reply Reply Quote 0
          • Maria AlzateM Offline
            Maria Alzate @gilboonet
            last edited by

            @gilboonet Thank you ! I will give this a try!

            1 Reply Last reply Reply Quote 0
            • Maria AlzateM Offline
              Maria Alzate
              last edited by

              @z3dev oh ok good to know! Thank you!

              1 Reply Last reply Reply Quote 0
              • z3devZ Offline
                z3dev @Maria Alzate
                last edited by

                @Maria-Alzate Just for your information, as part of the last release, there's a new project() function which can project a 3D shape to a 2D shape.

                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