How to convert from 3D STL to 2D SVG?












1














I found some [STL files for a 3D printer[(https://www.thingiverse.com/thing:2162969), which are mainly linear extrusions of a 2D shape:



3D STL file, extruded from a 2D shape



I would rather cut on a laser cutter. How can I convert them to a 2D SVG file?










share|improve this question



























    1














    I found some [STL files for a 3D printer[(https://www.thingiverse.com/thing:2162969), which are mainly linear extrusions of a 2D shape:



    3D STL file, extruded from a 2D shape



    I would rather cut on a laser cutter. How can I convert them to a 2D SVG file?










    share|improve this question

























      1












      1








      1







      I found some [STL files for a 3D printer[(https://www.thingiverse.com/thing:2162969), which are mainly linear extrusions of a 2D shape:



      3D STL file, extruded from a 2D shape



      I would rather cut on a laser cutter. How can I convert them to a 2D SVG file?










      share|improve this question













      I found some [STL files for a 3D printer[(https://www.thingiverse.com/thing:2162969), which are mainly linear extrusions of a 2D shape:



      3D STL file, extruded from a 2D shape



      I would rather cut on a laser cutter. How can I convert them to a 2D SVG file?







      svg 3d






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      mmorin

      1749




      1749






















          3 Answers
          3






          active

          oldest

          votes


















          1














          One solution is a script in OpenScad, inspired from batch processing in OpenScad, which projects the 3D shape along the Z axis, and then export it as SVG:



          param1=0; // param1 is the keyword of the first shell argument
          FileToLoad=param1;
          echo(FileToLoad);
          projection() import(FileToLoad);


          and then a bash script to process all STL files in the Downloads folder, including subdirectories, assuming that the above code is in ~/Downloads/slicer.scad:



          for entry in $(find ~/Downloads -type f -name *.stl)

          do
          new_entry=$(echo $entry | sed 's/.stl/.svg/g')

          openscad -o $new_entry -D param1="$entry" ~/Downloads/slicer.scad
          echo "$new_entry"
          done





          share|improve this answer





























            1














            If one opens the STL file in a cad program and watches the model in XY plane, he can see something which is at first quite promising:



            enter image description here



            I thought at first that saving the projection as PDF, opening it in Illustrator or Inkscape and deleting unwanted lines does the trick.



            BUT...



            The STL is actually a 3D surface made of thousands of small triangles. Here's a piece seen from tilted direction:



            enter image description here



            There's no curves. The XY plane projection contains thousands partially overlapping straight line segments. They freezed Inkscape and made Illustrator slow. Any attempt to make a single shape with the Shape builder freezed Illustrator.



            The downloaded shapes are quite simple so I recommend you to redraw them. If you get the XY plane projection to Illustrator as I did, you can lock it and draw with the pen tool your own version. As well you can use a screenshot as your model. You can get the screenshot for example from SketchUP.



            Screenshot is so light computer load that you can draw on it also in Inkscape.



            Drawing it is also the way to get non-overlapping contiguous paths. I bet the laser cutter wants them.






            share|improve this answer























            • I typically unify or de-triangulate such coplanar triangulated n-gons in CAD import data when working in modo or blender - makes for far faster renders and mesh ops to bring the polycount down by an order of magnitude - and easier to edit! That'd help with the ortho projection being less gnarly, but won't help define curves, beziers or NURBS out of polys... that'd probably be a manual process (though there are scripts) so overall I think you're exactly correct: redraw 'em will be least work / best results!
              – GerardFalla
              19 mins ago



















            0














            Any decent CAD app will open an STL, and you should be able to set up an orthographic projection and export or save out as SVG.



            Heck, you could do this with Blender, or OnShape... or even Draftsight or FreeCAD I think - and all of these are freeware.






            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "174"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgraphicdesign.stackexchange.com%2fquestions%2f118520%2fhow-to-convert-from-3d-stl-to-2d-svg%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              One solution is a script in OpenScad, inspired from batch processing in OpenScad, which projects the 3D shape along the Z axis, and then export it as SVG:



              param1=0; // param1 is the keyword of the first shell argument
              FileToLoad=param1;
              echo(FileToLoad);
              projection() import(FileToLoad);


              and then a bash script to process all STL files in the Downloads folder, including subdirectories, assuming that the above code is in ~/Downloads/slicer.scad:



              for entry in $(find ~/Downloads -type f -name *.stl)

              do
              new_entry=$(echo $entry | sed 's/.stl/.svg/g')

              openscad -o $new_entry -D param1="$entry" ~/Downloads/slicer.scad
              echo "$new_entry"
              done





              share|improve this answer


























                1














                One solution is a script in OpenScad, inspired from batch processing in OpenScad, which projects the 3D shape along the Z axis, and then export it as SVG:



                param1=0; // param1 is the keyword of the first shell argument
                FileToLoad=param1;
                echo(FileToLoad);
                projection() import(FileToLoad);


                and then a bash script to process all STL files in the Downloads folder, including subdirectories, assuming that the above code is in ~/Downloads/slicer.scad:



                for entry in $(find ~/Downloads -type f -name *.stl)

                do
                new_entry=$(echo $entry | sed 's/.stl/.svg/g')

                openscad -o $new_entry -D param1="$entry" ~/Downloads/slicer.scad
                echo "$new_entry"
                done





                share|improve this answer
























                  1












                  1








                  1






                  One solution is a script in OpenScad, inspired from batch processing in OpenScad, which projects the 3D shape along the Z axis, and then export it as SVG:



                  param1=0; // param1 is the keyword of the first shell argument
                  FileToLoad=param1;
                  echo(FileToLoad);
                  projection() import(FileToLoad);


                  and then a bash script to process all STL files in the Downloads folder, including subdirectories, assuming that the above code is in ~/Downloads/slicer.scad:



                  for entry in $(find ~/Downloads -type f -name *.stl)

                  do
                  new_entry=$(echo $entry | sed 's/.stl/.svg/g')

                  openscad -o $new_entry -D param1="$entry" ~/Downloads/slicer.scad
                  echo "$new_entry"
                  done





                  share|improve this answer












                  One solution is a script in OpenScad, inspired from batch processing in OpenScad, which projects the 3D shape along the Z axis, and then export it as SVG:



                  param1=0; // param1 is the keyword of the first shell argument
                  FileToLoad=param1;
                  echo(FileToLoad);
                  projection() import(FileToLoad);


                  and then a bash script to process all STL files in the Downloads folder, including subdirectories, assuming that the above code is in ~/Downloads/slicer.scad:



                  for entry in $(find ~/Downloads -type f -name *.stl)

                  do
                  new_entry=$(echo $entry | sed 's/.stl/.svg/g')

                  openscad -o $new_entry -D param1="$entry" ~/Downloads/slicer.scad
                  echo "$new_entry"
                  done






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 hours ago









                  mmorin

                  1749




                  1749























                      1














                      If one opens the STL file in a cad program and watches the model in XY plane, he can see something which is at first quite promising:



                      enter image description here



                      I thought at first that saving the projection as PDF, opening it in Illustrator or Inkscape and deleting unwanted lines does the trick.



                      BUT...



                      The STL is actually a 3D surface made of thousands of small triangles. Here's a piece seen from tilted direction:



                      enter image description here



                      There's no curves. The XY plane projection contains thousands partially overlapping straight line segments. They freezed Inkscape and made Illustrator slow. Any attempt to make a single shape with the Shape builder freezed Illustrator.



                      The downloaded shapes are quite simple so I recommend you to redraw them. If you get the XY plane projection to Illustrator as I did, you can lock it and draw with the pen tool your own version. As well you can use a screenshot as your model. You can get the screenshot for example from SketchUP.



                      Screenshot is so light computer load that you can draw on it also in Inkscape.



                      Drawing it is also the way to get non-overlapping contiguous paths. I bet the laser cutter wants them.






                      share|improve this answer























                      • I typically unify or de-triangulate such coplanar triangulated n-gons in CAD import data when working in modo or blender - makes for far faster renders and mesh ops to bring the polycount down by an order of magnitude - and easier to edit! That'd help with the ortho projection being less gnarly, but won't help define curves, beziers or NURBS out of polys... that'd probably be a manual process (though there are scripts) so overall I think you're exactly correct: redraw 'em will be least work / best results!
                        – GerardFalla
                        19 mins ago
















                      1














                      If one opens the STL file in a cad program and watches the model in XY plane, he can see something which is at first quite promising:



                      enter image description here



                      I thought at first that saving the projection as PDF, opening it in Illustrator or Inkscape and deleting unwanted lines does the trick.



                      BUT...



                      The STL is actually a 3D surface made of thousands of small triangles. Here's a piece seen from tilted direction:



                      enter image description here



                      There's no curves. The XY plane projection contains thousands partially overlapping straight line segments. They freezed Inkscape and made Illustrator slow. Any attempt to make a single shape with the Shape builder freezed Illustrator.



                      The downloaded shapes are quite simple so I recommend you to redraw them. If you get the XY plane projection to Illustrator as I did, you can lock it and draw with the pen tool your own version. As well you can use a screenshot as your model. You can get the screenshot for example from SketchUP.



                      Screenshot is so light computer load that you can draw on it also in Inkscape.



                      Drawing it is also the way to get non-overlapping contiguous paths. I bet the laser cutter wants them.






                      share|improve this answer























                      • I typically unify or de-triangulate such coplanar triangulated n-gons in CAD import data when working in modo or blender - makes for far faster renders and mesh ops to bring the polycount down by an order of magnitude - and easier to edit! That'd help with the ortho projection being less gnarly, but won't help define curves, beziers or NURBS out of polys... that'd probably be a manual process (though there are scripts) so overall I think you're exactly correct: redraw 'em will be least work / best results!
                        – GerardFalla
                        19 mins ago














                      1












                      1








                      1






                      If one opens the STL file in a cad program and watches the model in XY plane, he can see something which is at first quite promising:



                      enter image description here



                      I thought at first that saving the projection as PDF, opening it in Illustrator or Inkscape and deleting unwanted lines does the trick.



                      BUT...



                      The STL is actually a 3D surface made of thousands of small triangles. Here's a piece seen from tilted direction:



                      enter image description here



                      There's no curves. The XY plane projection contains thousands partially overlapping straight line segments. They freezed Inkscape and made Illustrator slow. Any attempt to make a single shape with the Shape builder freezed Illustrator.



                      The downloaded shapes are quite simple so I recommend you to redraw them. If you get the XY plane projection to Illustrator as I did, you can lock it and draw with the pen tool your own version. As well you can use a screenshot as your model. You can get the screenshot for example from SketchUP.



                      Screenshot is so light computer load that you can draw on it also in Inkscape.



                      Drawing it is also the way to get non-overlapping contiguous paths. I bet the laser cutter wants them.






                      share|improve this answer














                      If one opens the STL file in a cad program and watches the model in XY plane, he can see something which is at first quite promising:



                      enter image description here



                      I thought at first that saving the projection as PDF, opening it in Illustrator or Inkscape and deleting unwanted lines does the trick.



                      BUT...



                      The STL is actually a 3D surface made of thousands of small triangles. Here's a piece seen from tilted direction:



                      enter image description here



                      There's no curves. The XY plane projection contains thousands partially overlapping straight line segments. They freezed Inkscape and made Illustrator slow. Any attempt to make a single shape with the Shape builder freezed Illustrator.



                      The downloaded shapes are quite simple so I recommend you to redraw them. If you get the XY plane projection to Illustrator as I did, you can lock it and draw with the pen tool your own version. As well you can use a screenshot as your model. You can get the screenshot for example from SketchUP.



                      Screenshot is so light computer load that you can draw on it also in Inkscape.



                      Drawing it is also the way to get non-overlapping contiguous paths. I bet the laser cutter wants them.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited 21 mins ago

























                      answered 31 mins ago









                      user287001

                      19.8k21036




                      19.8k21036












                      • I typically unify or de-triangulate such coplanar triangulated n-gons in CAD import data when working in modo or blender - makes for far faster renders and mesh ops to bring the polycount down by an order of magnitude - and easier to edit! That'd help with the ortho projection being less gnarly, but won't help define curves, beziers or NURBS out of polys... that'd probably be a manual process (though there are scripts) so overall I think you're exactly correct: redraw 'em will be least work / best results!
                        – GerardFalla
                        19 mins ago


















                      • I typically unify or de-triangulate such coplanar triangulated n-gons in CAD import data when working in modo or blender - makes for far faster renders and mesh ops to bring the polycount down by an order of magnitude - and easier to edit! That'd help with the ortho projection being less gnarly, but won't help define curves, beziers or NURBS out of polys... that'd probably be a manual process (though there are scripts) so overall I think you're exactly correct: redraw 'em will be least work / best results!
                        – GerardFalla
                        19 mins ago
















                      I typically unify or de-triangulate such coplanar triangulated n-gons in CAD import data when working in modo or blender - makes for far faster renders and mesh ops to bring the polycount down by an order of magnitude - and easier to edit! That'd help with the ortho projection being less gnarly, but won't help define curves, beziers or NURBS out of polys... that'd probably be a manual process (though there are scripts) so overall I think you're exactly correct: redraw 'em will be least work / best results!
                      – GerardFalla
                      19 mins ago




                      I typically unify or de-triangulate such coplanar triangulated n-gons in CAD import data when working in modo or blender - makes for far faster renders and mesh ops to bring the polycount down by an order of magnitude - and easier to edit! That'd help with the ortho projection being less gnarly, but won't help define curves, beziers or NURBS out of polys... that'd probably be a manual process (though there are scripts) so overall I think you're exactly correct: redraw 'em will be least work / best results!
                      – GerardFalla
                      19 mins ago











                      0














                      Any decent CAD app will open an STL, and you should be able to set up an orthographic projection and export or save out as SVG.



                      Heck, you could do this with Blender, or OnShape... or even Draftsight or FreeCAD I think - and all of these are freeware.






                      share|improve this answer


























                        0














                        Any decent CAD app will open an STL, and you should be able to set up an orthographic projection and export or save out as SVG.



                        Heck, you could do this with Blender, or OnShape... or even Draftsight or FreeCAD I think - and all of these are freeware.






                        share|improve this answer
























                          0












                          0








                          0






                          Any decent CAD app will open an STL, and you should be able to set up an orthographic projection and export or save out as SVG.



                          Heck, you could do this with Blender, or OnShape... or even Draftsight or FreeCAD I think - and all of these are freeware.






                          share|improve this answer












                          Any decent CAD app will open an STL, and you should be able to set up an orthographic projection and export or save out as SVG.



                          Heck, you could do this with Blender, or OnShape... or even Draftsight or FreeCAD I think - and all of these are freeware.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 42 mins ago









                          GerardFalla

                          2,692215




                          2,692215






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Graphic Design Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgraphicdesign.stackexchange.com%2fquestions%2f118520%2fhow-to-convert-from-3d-stl-to-2d-svg%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              404 Error Contact Form 7 ajax form submitting

                              How to know if a Active Directory user can login interactively

                              TypeError: fit_transform() missing 1 required positional argument: 'X'