sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] IGES Export - 27 February 2012

    Scheduled Pinned Locked Moved Plugins
    58 Posts 32 Posters 62.6k Views 32 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
      rainer.ochs
      last edited by

      If you have problems it may be an option to convert the iges to step with an apropriate program. I have done this for Autodesc Inventor that will not import the iges into solids but wireframes. Converted to step it works fine.
      It is also a good idea to export one part at a time and not too many together. You then see what part causes the problems and I have the impression that complex collection of parts tend to be more difficult.

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Hi and welcome to the forum. πŸ˜„

        I had a quick scan through your plugin - got a couple of comments:
        .typename: Avoid at all cost! It's very slow to use! It has always bugged me that the API doc use it for its examples.

        I see you use attributes a lot - but they are all removed at the beginning of an export. Is that to keep track of entity information while you process the model? If so I'd suggest you use a Hash to keep track of entity data - instead of adding prosessing data to the model which will increase file size. In addition, attributes are slow - lots of string manipulation and lookups.

        I generally recommend people not to extend the base classes - due to the possibilities of conflict.

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

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          You should mention that the exporter might erase stuff.

          And that it makes all groups and components unique!

          It is not expected behavior that an exporter modifies the model it exports.

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

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            Exported data/files are not subject to an undo or an abort call...
            IF your exporter must change the model's data so it can work successfully, then the correct way to proceed is to satrt ALL of its actions after a Sketchup.active_model.start_operation('IGESexport') and after it's made the export use a closing Sketchup.active_model.abort_operation, which undoes ALL of the changes you have made to the model BUT leaves the external file[s] alone...
            That way you get your data exported correctly but the user gets no nasty surprises when he finds his model has be tampered with !
            πŸ€“

            TIG

            1 Reply Last reply Reply Quote 0
            • R Offline
              rainer.ochs
              last edited by

              Of course the exporter should not modify the model. It does it during work but afterwards undoes the changes. In V0.4 the undo was made a comment for testing, in V0.5 this is corrected.

              TIG: is there a difference whether I use "model.abort_operation" or "model.commit_operation" and "Sketchup.undo" as I do?

              thomthom: the exporter never was optimized for fast operation, I wanted to keep it simple. As I undo the changes it is no problem to adhere attributes to the entities, they never will be saved. IGES is constantly referring with pointers to its structural elements, keeping track with attributes was simpler to implement and more descriptive. I agree that hashes might be faster. But as the structure is still growing when I am going to implement splines I still prefer the more understandable approach.
              What do you recommend to use instead of "typename"?

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                @rainer.ochs said:

                What do you recommend to use instead of "typename"?

                Use .is_a?( Sketchup::Face ) etc...

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

                1 Reply Last reply Reply Quote 0
                • Z Offline
                  Zacchia
                  last edited by

                  I have some files in iges format I would like to import in SU, so an importer would also be nice to have...

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

                    One interesting part in this is that it creates "real" solid geometry out of SU "solids". Could it be expanded into the DXF format too? That would add a useful feature that the current DWG/DXF exporters lack.

                    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
                    • R Offline
                      rainer.ochs
                      last edited by

                      @anssi said:

                      Could it be expanded into the DXF format too?

                      I got good results with HeeksCAD ( http://heeks.net) a freeware CAD program.
                      It can import iges and once in Heeks you can save it to step, dxf and stl.
                      The programs file converting is based on open cascade (http://www.opencascade.org) a very sophisticated system. As far as I have been testing, the results are reliable.

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        rainer.ochs
                        last edited by

                        @zacchia said:

                        I have some files in iges format I would like to import in SU, so an importer would also be nice to have...

                        There is a description on http://eagleup.wordpress.com/?s=iges&searchbutton=go%21
                        on Importing a STEP or IGES file into Sketchup using FreeCAD and MeshLab.
                        file.step => FreeCAD => file.stl => MeshLab => file.dae => Sketchup => file.skp

                        1 Reply Last reply Reply Quote 0
                        • Z Offline
                          Zacchia
                          last edited by

                          @rainer.ochs said:

                          There is a description on http://eagleup.wordpress.com/?s=iges&searchbutton=go%21
                          on Importing a STEP or IGES file into Sketchup using FreeCAD and MeshLab.
                          file.step => FreeCAD => file.stl => MeshLab => file.dae => Sketchup => file.skp

                          Thank you for this information, it works! I already knew meshlab, freecad not...

                          1 Reply Last reply Reply Quote 0
                          • S Offline
                            sepo
                            last edited by

                            I tried to open .igs export from SU in Rhino. It bring geometry but geometry is broken. The model is made of separate surfs and some surfs (curved) are missing.

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              DavidVT
                              last edited by

                              Nice addition!
                              I am struggling to find the size limit that will work.
                              I have a very complex model the size of an aircraft that seems to lockup everytime.

                              I test this with a small box and it works great.

                              Suggestions???

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                jonorman
                                last edited by

                                This plugin is amazing. The possibility to export "solids" out of SU is for me close to the holy grale πŸ˜„ Thank you so much..

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  rainer.ochs
                                  last edited by

                                  @davidvt said:

                                  I am struggling to find the size limit that will work.
                                  I have a very complex model the size of an aircraft that seems to lockup everytime.

                                  @sepo said:

                                  I tried to open .igs export from SU in Rhino. It bring geometry but geometry is broken.

                                  I do not think, that the size itself is a problem. I usually scale my models in micron so I also have fairly big numbers and this worked fine. I think the problem is more the complexity. To convert from a face-model to solid it is very important that the outer shell has no gaps and no inner geometry. The exporter removes all parts it cannot convert to real shells.

                                  Suggestion 1: Try redo to see what the exporter does to the model. If the parts are deleted there it is a problem with the geometry.

                                  Suggestion 2: Try HeeksCAD to open the iges. If it is ok there, convert to step and import from there. If it is not ok the iges is the problem. Feel free to send me your model to the email that is given in the code.

                                  1 Reply Last reply Reply Quote 0
                                  • G Offline
                                    gordon_smith
                                    last edited by

                                    I haven't tried the plugin yet, but it is very exciting. This could make sketchup much more useful for me. Where I work the mechanical engineers use Catia, and it would be awseome to be able to send them my drawings in a format that they can use.
                                    I also want to second the FreeCad & MeshLabs method as a great way to get IGES files into sketchup. πŸ‘

                                    Irrationally held truths may be more harmful than reasoned errors.
                                    Thomas Huxley

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      rainer.ochs
                                      last edited by

                                      @gordon_smith said:

                                      I also want to second the FreeCad & MeshLabs method as a great way to get IGES files into sketchup. πŸ‘

                                      There is also a direct importer plug-in for stl into sketchup:
                                      http://sketchuptips.blogspot.com/2010/03/sketchup-stl-importer-redo.html

                                      A direct export to stl can be found at http://www.guitar-list.com/download-software/convert-sketchup-skp-files-dxf-or-stl

                                      STL from other formats can be converted with FreeCAD or the above mentioned HeeksCAD.

                                      All of these tools do not segment the model into different objects and the exporter does not generate a solid.

                                      The importer generates a lot of nasty inner edges, but with a small tweeking of the script this can be fixed.

                                      Just add the following lines into main after the import:

                                                 
                                      a = Array.new
                                      Sketchup.active_model.entities.each{|e|
                                      if (not e.deleted?) && (not e.hidden?)
                                        if e.is_a? Sketchup;;Edge
                                           if e.faces.size == 2
                                              if e.faces[0].normal == e.faces[1].normal
                                                 a << e
                                              end
                                           end
                                        end
                                      end
                                      Sketchup.active_model.entities.erase_entities(a)
                                      }
                                      
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        Adrian Berghorst
                                        last edited by

                                        This has helped me a LOT! Thank you very much.

                                        1 Reply Last reply Reply Quote 0
                                        • R Offline
                                          realwarder
                                          last edited by

                                          Great plugin. Helped me. Thank you!

                                          My model does export with one problem. If you want the file to test with, let me know.

                                          1 Reply Last reply Reply Quote 0
                                          • thomthomT Offline
                                            thomthom
                                            last edited by

                                            @realwarder said:

                                            My model does export with one problem. If you want the file to test with, let me know.

                                            You need to describe what this problem is. Otherwise it's completely impossible to know what is going on.

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

                                            Advertisement