• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Import STL files

Scheduled Pinned Locked Moved Plugins
40 Posts 18 Posters 47.4k Views 18 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.
  • R Offline
    remus
    last edited by 20 May 2008, 19:57

    1. and 3) a .rb is really jsut a text file. You should be able to open it in any plain test editor, like notepad on windows (not sure what the mac equivalent is)

    2)Not sure about this one, im sure a more mac savy person will come along and tell you where to put it.

    http://remusrendering.wordpress.com/

    1 Reply Last reply Reply Quote 0
    • E Offline
      Eric_J
      last edited by 20 May 2008, 20:12

      OK, it seems to work when put into Library/Application Support.../plugins, and it seems to export properly!

      Thanks again!

      1 Reply Last reply Reply Quote 0
      • H Offline
        Howard leslie
        last edited by 13 Nov 2008, 20:51

        Didier,
        If possible, could you adjust your script so it mines down into all groups and components and converts all data in a model to *.stl ??? (or a *.sat file ???)
        Additionally, all stl objects are to retain the sketchup group and component names.
        ...........
        I know TIG has produced several very useful scripts with this mining ability that dig down into all groups and components.
        Some of his code could possibly help ???
        ............
        This would make your script so much more useful
        Anything you can do, hugely appreciated.

        Regards
        Howard L'

        1 Reply Last reply Reply Quote 0
        • D Offline
          Didier Bur
          last edited by 14 Nov 2008, 08:20

          Hi
          I'll see what I can do. Code exists also in su2pov for instance so it is just a question of time (which is hard to find these days for me...)
          Regards,

          DB

          1 Reply Last reply Reply Quote 0
          • C Offline
            casey344
            last edited by 19 Jan 2009, 12:25

            First, thank you for posting the utility - getting this to work will save us so much time.

            My STL file is not importing properly. I get the prompt to specify scale then a jumbled version of what I am importing. See image below.

            I am using Sketchup 7.0. Any ideas what I am doing wrong?

            Thank you.


            Screen Snaper Image.jpg

            1 Reply Last reply Reply Quote 0
            • D Offline
              Didier Bur
              last edited by 19 Jan 2009, 21:02

              Hi,

              @unknownuser said:

              I am using Sketchup 7.0. Any ideas what I am doing wrong?

              Not at all. It can be aproblem with SU7, or a problem with the STL file. Post it here so I can check it.
              Regards,

              DB

              1 Reply Last reply Reply Quote 0
              • C Offline
                casey344
                last edited by 19 Jan 2009, 21:44

                Thanks for offering to help.

                You should be able to pick it up here ...

                Link to file:
                https://download.yousendit.com/bVlCSXR3Mm1wTVYzZUE9PQ

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Didier Bur
                  last edited by 19 Jan 2009, 22:27

                  AAARGGHHHH 71 Mb !
                  Downloading it now, but I guess the file is too big for SU...

                  DB

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    casey344
                    last edited by 19 Jan 2009, 22:39

                    Sorry, not my doing. πŸ˜•

                    Manufacturer sent it that way.

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      jwelin
                      last edited by 20 Jan 2009, 06:01

                      Thanks for the work on this plugin. I have a three questions:

                      Is there a limit to the level of nested groups/components it exports?

                      The exported STL seems to be incompatible with some applications. Rhino sees the geometry, for instance, while Magics does not. Also an SU2stl generated stl, opened in Rhino and resaved as an STL is much smaller in file size. Would you like to see examples?

                      Is there a way to call this plugin from another? I have a need to batch export.

                      John Welin
                      architectural model maker
                      Chicago, USA

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        Didier Bur
                        last edited by 20 Jan 2009, 08:00

                        Hi,

                        @unknownuser said:

                        The exported STL seems to be incompatible with some applications

                        There are several STL formats which slightly differ in their syntax. The one I have choosen to export is the most standard one, as defined here for instance:
                        http://www.gom.com/CONTAINER/files/sp_stl_en.pdf
                        or here:
                        http://mech.fsv.cvut.cz/~dr/papers/Lisbon04/node2.html
                        Maybe some applications do not support every kind of STL ?

                        @unknownuser said:

                        an SU2stl generated stl, opened in Rhino and resaved as an STL is much smaller in file size

                        I don't have Rhino, but I suppose that it saves an STL in the binary format, while my script saves it in ASCII (text), which is 8 times bigger (average). You can see the same differences between an ascii dxf and a binary dxf (dxb) for instance.

                        @unknownuser said:

                        Is there a limit to the level of nested groups

                        No. Not tested here but as a recursive method is involved, there should be no limits.
                        Components are NOT supported, groups are.

                        @unknownuser said:

                        Is there a way to call this plugin from another?

                        Unfortunately no.

                        Regards,

                        DB

                        1 Reply Last reply Reply Quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by 20 Jan 2009, 08:44

                          @didier bur said:

                          @unknownuser said:

                          Is there a limit to the level of nested groups

                          No. Not tested here but as a recursive method is involved, there should be no limits.
                          Components are NOT supported, groups are.

                          I found that recursive methods might cause SU to bugsplat. http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=15585&p=120726 I had a method that looped over entities to find connected entities which used a recursive method. Had to change it to an iterative method.

                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            Didier Bur
                            last edited by 20 Jan 2009, 10:10

                            @unknownuser said:

                            I found that recursive methods might cause SU to bugsplat.

                            Bad news 😞

                            DB

                            1 Reply Last reply Reply Quote 0
                            • thomthomT Offline
                              thomthom
                              last edited by 20 Jan 2009, 11:13

                              Mind you, it happens when you do many recursions. When crawling geometry you quickly end up with hundreds iterations. So if the script never goes that deep you're ok. But it's something to be aware of.

                              Thomas Thomassen β€” SketchUp Monkey & Coding addict
                              List of my plugins and link to the CookieWare fund

                              1 Reply Last reply Reply Quote 0
                              • N Offline
                                NewOne
                                last edited by 21 Jul 2009, 13:29

                                When exporting STL from SolidWorks, here is an option to put all geometry in same file or to create separate file for each part. Mr. Didier Bur, could this script to be modified in a manner that allows multiple file selection and each geometry to be made group (or component if there are more identical parts) ? Or to specify a folder where stl part files are located?

                                Thank you.

                                1 Reply Last reply Reply Quote 0
                                • D Offline
                                  Didier Bur
                                  last edited by 22 Jul 2009, 17:21

                                  Dropped into the to-do list πŸ˜‰

                                  DB

                                  1 Reply Last reply Reply Quote 0
                                  • GaieusG Offline
                                    Gaieus
                                    last edited by 6 Jan 2010, 10:19

                                    bump
                                    (sorry Dider - no practical reason just testing some moderation stuff)

                                    Gai...

                                    1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      stefkeB
                                      last edited by 16 Dec 2010, 12:47

                                      Minor improvement:

                                      On line 54 you call the "openpanel" method when exporting. This should be "savepanel", so the user gets the correct dialog displayed. Still works on Windows but not on OSX, where you need to point to an already existing file.

                                      Also, the default "." file location could be replaced with ENV['USER'] or ENV['HOME'] or preferably the current file folder, as to make it more convenient. With 'USER' it works much better for me on OSX.

                                      (I refer to the unscrambled file, obviously, not the compacted one -- maybe the reason why people think it is a binary file)

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        Didier Bur
                                        last edited by 19 Dec 2010, 11:20

                                        Hi,
                                        @stefkeB: I'm using openpanel when importing, and savepanel when exporting. So I don't understand what you're talking about, propably you have an old version, because the latest one is v1.3. (Nov 2009) and is scrambled in a RBS file (so unreadable).

                                        DB

                                        1 Reply Last reply Reply Quote 0
                                        • thomthomT Offline
                                          thomthom
                                          last edited by 22 Aug 2011, 09:18

                                          I've been looking around at the various ruby based importers for SketchUp and I see that no one uses the Importer class. If this class is used the importer can be found in the native import list which would be very nice.
                                          http://code.google.com/apis/sketchup/docs/ourdoc/importer.html

                                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                          List of my plugins and link to the CookieWare fund

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