sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    Importing .stl files

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    30 Posts 12 Posters 10.8k Views 12 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.
    • Didier BurD
      Didier Bur
      last edited by

      I have published an import STL script here:
      http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=8081
      It's added to the previous su2stl.rb script.
      Plugins menu -> Export STL file / Import STL file
      There are 2 samples for tests in the zip archive.
      Supported format is the most common STL ascii format.
      Regards,

      DB

      1 Reply Last reply
      Reply Quote 0
      • W
        watkins
        last edited by

        Dear Didier,

        Thank you so much for all your hard work. I am always amazed by how quickly a request becomes a reality. I will let you know how I get on with the new script.

        Once again, many thanks,
        Bob

        1 Reply Last reply
        Reply Quote 0
        • W
          watkins
          last edited by

          Dear Didier,

          Just a quick follow up on my previous post.

          I created a Sketchup model of simple machined/punched shapes (see the attached file), exported the model as a .stl file, then imported back into Sketchup using your new import option. Apart from some minor cleaning up it worked very well. I used the Delete Coplanar Edges script to remove a lot of the redundant lines and then the erase tool to remove the remaining lines. Interestingly, the through circular hole needed re-cutting, while the elliptical hole was just fine. Ah! The mysteries of life!

          Once again, thanks.

          Regards,
          Bob


          Test_piece.skp

          1 Reply Last reply
          Reply Quote 0
          • Didier BurD
            Didier Bur
            last edited by

            Hi Watkins,
            Redundant lines you mention are due to the STL format which only contains triangles (as you probably know) and the re-cutting on some holes are sometimes due to decimal precision (10 e-14 in SU) and in some cases that is not even sufficient. I've encountered from time to time an error message from SU: "Points are not planar" when reconstructing a model from a STL file with this script. Go figure... This is rather stupid because 3 points are always coplanar.
            Regards,

            DB

            1 Reply Last reply
            Reply Quote 0
            • W
              watkins
              last edited by

              Dear Didier,

              Yes, I knew about the redundant lines issue, but the glich with precision was new. I'm sure this will become a very useful script. I have asked a colleague of mine to create a 3D model in AutoCAD's Mechanical Desktop, and then to export to as a .stl file. I will let you know the results.

              Thanks again,
              Bob

              1 Reply Last reply
              Reply Quote 0
              • C
                cdubea
                last edited by

                In any event, thank you for providing this. Hopefully it's better than the method I was using to get SolidWorks models into Sketchup. I'll test is later today and report back.

                chris

                http://www.dubea.org/chris_small.jpg

                1 Reply Last reply
                Reply Quote 0
                • W
                  watkins
                  last edited by

                  Dear Chris,

                  Let me know how you get on. I use Inventor myself, and would really like an .iges export option for Sketchup. I like to mass model in Sketchup because it is so quick and easy (creative juices and all that).

                  I recently tried importing a Swagelok coupling as a .dwf file (downloaded from the web) and it sort of worked (needed a lot of cleaning up, and the remaking of faces).

                  Regards,
                  Bob

                  1 Reply Last reply
                  Reply Quote 0
                  • C
                    cdubea
                    last edited by

                    @watkins said:

                    Dear Chris,

                    Let me know how you get on. I use Inventor myself, and would really like an .iges export option for Sketchup. I like to mass model in Sketchup because it is so quick and easy (creative juices and all that).

                    I recently tried importing a Swagelok coupling as a .dwf file (downloaded from the web) and it sort of worked (needed a lot of cleaning up, and the remaking of faces).

                    Regards,
                    Bob

                    I really didn't have much success. Attached is a zip file with a 3d pdf of the part I exported from SolidWorks, the .stl file and the resulting Sketchup file.

                    You can see the results leave something to be desired.

                    Thanks

                    chris


                    RMH.zip

                    http://www.dubea.org/chris_small.jpg

                    1 Reply Last reply
                    Reply Quote 0
                    • W
                      watkins
                      last edited by

                      Dear Chris,

                      As you say, disappointing.

                      Did you see the link to SpaceClaim posted a few days ago?

                      Invalid URL

                      favicon

                      (www.spaceclaim.com)

                      Regards,
                      Bob

                      1 Reply Last reply
                      Reply Quote 0
                      • C
                        cdubea
                        last edited by

                        @watkins said:

                        Dear Chris,

                        As you say, disappointing.

                        Did you see the link to SpaceClaim posted a few days ago?

                        Invalid URL

                        favicon

                        (www.spaceclaim.com)

                        Regards,
                        Bob

                        I'm familiar with SpaceClaim. Michael Payne was one of the architects of SolidWorks many years ago and left when Dassault Systemes bought SolidWorks. I've been involved with SolidWorks since '96.

                        The pricing on the LT version is very reasonable. If I'm not mistaken, the pro version is done on a perpetual lease basis. It's a nominal fee up front with an annual fee to use the software.

                        http://www.dubea.org/chris_small.jpg

                        1 Reply Last reply
                        Reply Quote 0
                        • W
                          watkins
                          last edited by

                          Dear Chris,

                          Thanks for the additional information. I will request a quote for the LT version and consider using it as a mechanical design alternative to Sketchup. I will check to see if SpaceClaim LT will export .sat, .stp and .igs formatted files.

                          Regards,
                          Bob

                          1 Reply Last reply
                          Reply Quote 0
                          • Didier BurD
                            Didier Bur
                            last edited by

                            Hi cdubea,

                            with rmh.skp, I got the following message in the console:
                            Error: #<ArgumentError: Not enough points - at least 3 required>
                            If you open the stl file in a text editor, you'll see that coordinates are given in scientific notation (vertex 4.613638e+000 2.150841e+000 7.951958e-002 for instance). That doesn't disturb Ruby, but values are very small, this may be the problem (with SU autosnap feature I guess).
                            An intersting test would be to scale your original model by 1000 or 10000, re-export the stl and see what's happening then when importing in SU.
                            Regards,

                            DB

                            1 Reply Last reply
                            Reply Quote 0
                            • C
                              cdubea
                              last edited by

                              @didier bur said:

                              Hi cdubea,

                              with rmh.skp, I got the following message in the console:
                              Error: #<ArgumentError: Not enough points - at least 3 required>
                              If you open the stl file in a text editor, you'll see that coordinates are given in scientific notation (vertex 4.613638e+000 2.150841e+000 7.951958e-002 for instance). That doesn't disturb Ruby, but values are very small, this may be the problem (with SU autosnap feature I guess).
                              An interesting test would be to scale your original model by 1000 or 10000, re-export the stl and see what's happening then when importing in SU.
                              Regards,

                              No problem. I'll give it a try and report back.

                              chris

                              http://www.dubea.org/chris_small.jpg

                              1 Reply Last reply
                              Reply Quote 0
                              • C
                                cdubea
                                last edited by

                                @didier bur said:

                                Hi cdubea,

                                with rmh.skp, I got the following message in the console:
                                Error: #<ArgumentError: Not enough points - at least 3 required>
                                If you open the stl file in a text editor, you'll see that coordinates are given in scientific notation (vertex 4.613638e+000 2.150841e+000 7.951958e-002 for instance). That doesn't disturb Ruby, but values are very small, this may be the problem (with SU autosnap feature I guess).
                                An intersting test would be to scale your original model by 1000 or 10000, re-export the stl and see what's happening then when importing in SU.
                                Regards,

                                Looks much better.

                                Thanks for making this available.


                                Wire Mold.zip

                                http://www.dubea.org/chris_small.jpg

                                1 Reply Last reply
                                Reply Quote 0
                                • S
                                  sorgesu
                                  last edited by

                                  Didier,

                                  I was so happy to find this script for IMPORTING STL and provide it to one of my students who was desperate. She told me I was a "Goddess". I confer it back on to you, you are a God.
                                  However, I lost my status fast. The script worked as a far as asking for a unit of measure, and then it proceeded to do nothing. It didn't even seem to try and provided no error message.
                                  I've attached the files which she sent to me.
                                  Can you help?
                                  Many thanks.


                                  PowerPlant-AllParts.zip


                                  PowerPlant-ExteriorComponents.zip

                                  Susan Sorger
                                  Former Seller Hand Rendered Entourage
                                  Former Canadian Authorized Training Centre, SketchUp

                                  1 Reply Last reply
                                  Reply Quote 0
                                  • Didier BurD
                                    Didier Bur
                                    last edited by

                                    Hi Susan,
                                    Your STL files are BINARY, and su2stl can only read ASCII.
                                    Get an ascii version of these files and it will work !
                                    Almost all exporters that I know (Autocad, etc) can export ascii stl files.

                                    I've translated your binaries into ascii with stl_util which can be downloaded here:
                                    http://www.ptcuser.org/rugs/U52/downloads/index.html (works also on XP,Vista...)
                                    See attached ZIP
                                    Regards (and don't loose your status 😉 )

                                    P.S. Reading ascii files can be long. I've updated the script so it now displays the number of triangles processed and the total number to convert.


                                    In the Zip you'll find the 2 ascii versions of your STL and the 2 corresponding SKP


                                    Replaces old version. Put it in Plugins folder.

                                    DB

                                    1 Reply Last reply
                                    Reply Quote 0
                                    • S
                                      sorgesu
                                      last edited by

                                      You are not just a God, you are top God. Zeus or something like that.
                                      Thanks Didier!!!!!

                                      Susan Sorger
                                      Former Seller Hand Rendered Entourage
                                      Former Canadian Authorized Training Centre, SketchUp

                                      1 Reply Last reply
                                      Reply Quote 0
                                      • L
                                        lgm
                                        last edited by

                                        Keep your eyes peeled for the CADspan plugin, I think the beta release will be out this fall. This plugin will offer several tools for 3D printing from Sketchup, including a very robust STL importer/exporter, a resurfacer, visualization tool, an I think a couple more features.
                                        I'll post again when I find out more information on this plugin.

                                        1 Reply Last reply
                                        Reply Quote 0
                                        • M
                                          mtraherne
                                          last edited by

                                          @didier bur said:

                                          I have published an import STL script here:
                                          http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=8081
                                          It's added to the previous su2stl.rb script.
                                          Plugins menu -> Export STL file / Import STL file
                                          There are 2 samples for tests in the zip archive.
                                          Supported format is the most common STL ascii format.
                                          Regards,

                                          This link appears to have been removed. Is there another location?

                                          1 Reply Last reply
                                          Reply Quote 0
                                          • AnssiA
                                            Anssi
                                            last edited by

                                            @mtraherne said:

                                            @didier bur said:

                                            I have published an import STL script here:
                                            http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=8081
                                            It's added to the previous su2stl.rb script.
                                            Plugins menu -> Export STL file / Import STL file
                                            There are 2 samples for tests in the zip archive.
                                            Supported format is the most common STL ascii format.
                                            Regards,

                                            This link appears to have been removed. Is there another location?

                                            look for it in
                                            http://www.crai.archi.fr/RubyLibraryDepot/Ruby/RUBY_Library_Depot.htm

                                            Anssi

                                            securi adversus homines, securi adversus deos rem difficillimam adsecuti sunt, ut illis ne voto quidem opus esset

                                            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
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement