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!
    Mac User? | Join the Rayscaper Beta for Mac Learn More

    [Plugin] fixSolid v1.7 - updated 20/10/2012

    Scheduled Pinned Locked Moved Plugins
    46 Posts 24 Posters 65.6k Views 24 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.
    • EscapeArtistE
      EscapeArtist
      last edited by

      Looks like a good plugin. Will give it a try as it progresses with TT's suggestions.

      1 Reply Last reply
      Reply Quote 0
      • V
        vidy
        last edited by

        thanks Guy, for the plugin, but is it only for SU 8?? can not see it in the plugin menu? im using SU 7.1

        regards,

        still so much to learn..

        1 Reply Last reply
        Reply Quote 0
        • P
          Pherim
          last edited by

          That's because solids had not been included in SU 7 and are only available since SU 8.

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

            @pherim said:

            That's because solids had not been included in SU 7 and are only available since SU 8.

            Should be able to work anyway. There is not difference in the geometry, it's just that SU8 knows how to recognize solids.

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

            1 Reply Last reply
            Reply Quote 0
            • G
              GWD
              last edited by

              @thomthom said:

              @pherim said:

              That's because solids had not been included in SU 7 and are only available since SU 8.

              Should be able to work anyway. There is not difference in the geometry, it's just that SU8 knows how to recognize solids.

              The plugin works only on SU 8, because the function i use the check if it's a solid is a new function in v8.

              1 Reply Last reply
              Reply Quote 0
              • G
                GWD
                last edited by

                @thomthom said:

                Nice plugin. πŸ‘

                Got a couple of notes:

                1. It's advisable to wrap your plugin into a module and use module variables instead of global variables - this ensures there will be no conflict with other plugins.

                2. Detecting edges between co-planar faces: You are using this: if faces[0].normal == faces[1].normal then
                  I used that for CleanUp, but I ran into issues where it's either erase edges between non-coplanar faces or leave some edges that should have been erased in some cases. As it turns out, the correct way - according to the Googler I spoke to - is to take all the vertices of the two faces you compare and check if they all lie on the same plane.

                3. e.typename == "Edge" - .typename is very slow because you do string comparisons. Instead, compare it's class: e.is_a?( SketchUp::Edge )

                ThomThom,

                1. How can i wrap my plugin in a module?
                2. OK -> v1.4
                3. I tried to switch .typename == "Edge" but then I get errors, i also can't find info about the .is_a? function?

                regards,

                Guy

                1 Reply Last reply
                Reply Quote 0
                • dereiD
                  derei
                  last edited by

                  @unknownuser said:

                  3.can't find info about the .is_a? function?

                  http://ruby-doc.org/core/classes/Object.html#M000373 -first result after search on google πŸ’š

                  DESIGNER AND ARTIST DEREI.UK

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

                    @unknownuser said:

                    1. e.typename == "Edge" - .typename is very slow because you do string comparisons. Instead, compare it's class: e.is_a?( SketchUp::Edge )

                    [/quote]
                    What kind of error and what did you switch to?

                    As for modules:
                    http://ruby-doc.org/docs/ProgrammingRuby/html/tut_modules.html
                    http://forums.sketchucation.com/viewtopic.php?f=180&t=12423#p89313

                    Many other useful links in this sticky at the Developers section:
                    http://forums.sketchucation.com/viewtopic.php?f=180&t=10142

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

                    1 Reply Last reply
                    Reply Quote 0
                    • G
                      GWD
                      last edited by

                      @thomthom said:

                      1. e.typename == "Edge" - .typename is very slow because you do string comparisons. Instead, compare it's class: e.is_a?( SketchUp::Edge )

                      What kind of error and what did you switch to?

                      As for modules:
                      http://ruby-doc.org/docs/ProgrammingRuby/html/tut_modules.html
                      http://forums.sketchucation.com/viewtopic.php?f=180&t=12423#p89313

                      Many other useful links in this sticky at the Developers section:
                      http://forums.sketchucation.com/viewtopic.php?f=180&t=10142

                      ThomThom,

                      The module works, but when I recplace the .typename with the .is_a? I get the following error:

                      Error: #<NameError: uninitialized constant FixSolids::SketchUp>
                      (eval):373
                      (eval):318:in `call'
                      (eval):318

                      regards,

                      Guy
                      [mod=:2660fdfj]%(#FF0040)[**NOTE:
                      A newer version [posted under the OP's new login] is available here...**]
                      http://sketchucation.com/forums/viewtopic.php?p=436001#p436001
                      TIG[/mod:2660fdfj]


                      v1.5 NOTE: newer versions available...

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

                        Sorry - I made a typo. It's Sketchup - not SketchUp - the thing is case sensitive.

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

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

                          Btw, here's some stats to how slow .typename is compared to .is_a? http://forums.sketchucation.com/viewtopic.php?f=180&t=19576&view=unread#p162235
                          In case you where curious.

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

                          1 Reply Last reply
                          Reply Quote 0
                          • G
                            GWD
                            last edited by

                            @thomthom said:

                            Sorry - I made a typo. It's Sketchup - not SketchUp - the thing is case sensitive.

                            Thanks!

                            1 Reply Last reply
                            Reply Quote 0
                            • V
                              vidy
                              last edited by

                              @unknownuser said:

                              The plugin works only on SU 8, because the function i use the check if it's a solid is a new function in v8.

                              thanks for your confirmation πŸ˜„

                              still so much to learn..

                              1 Reply Last reply
                              Reply Quote 0
                              • K
                                kobus
                                last edited by

                                respect ! where thomthoms inspector was heading I presume.

                                you should be interested in the future. you will spend the rest of your life there

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

                                  @unknownuser said:

                                  @thomthom said:

                                  @pherim said:

                                  That's because solids had not been included in SU 7 and are only available since SU 8.

                                  Should be able to work anyway. There is not difference in the geometry, it's just that SU8 knows how to recognize solids.

                                  The plugin works only on SU 8, because the function i use the check if it's a solid is a new function in v8.

                                  You could use the method I use with Solid Inspector - check that all edges have two faces connected. Then it'd work on older versions. Of course for SU8 and newer you want to use the built in version that's very quick.

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

                                  1 Reply Last reply
                                  Reply Quote 0
                                  • Dave RD
                                    Dave R
                                    last edited by

                                    Nice plugin. It could be very useful. I tried it on a model that someone sent to me the other day. It fixed a few things in one component but still left errors. There were a lot of errors in that component to begin with and it certainly would reduce the time required to manually fix it. Unfortunately the plugin doesn't always seem to recognize that a component is not solid. At least it doesn't recognize that the component in the attached SKP is not solid although you can easily see several problems that keep it from being considered solid.


                                    Not Solid.skp

                                    Etaoin Shrdlu

                                    %

                                    (THERE'S NO PLACE LIKE)

                                    G28 X0.0 Y0.0 Z0.0

                                    M30

                                    %

                                    1 Reply Last reply
                                    Reply Quote 0
                                    • G
                                      GWD
                                      last edited by

                                      @dave r said:

                                      Nice plugin. It could be very useful. I tried it on a model that someone sent to me the other day. It fixed a few things in one component but still left errors. There were a lot of errors in that component to begin with and it certainly would reduce the time required to manually fix it. Unfortunately the plugin doesn't always seem to recognize that a component is not solid. At least it doesn't recognize that the component in the attached SKP is not solid although you can easily see several problems that keep it from being considered solid.

                                      At this moment fixSolid only work on groups not on components. I'll make it work on components to.

                                      1 Reply Last reply
                                      Reply Quote 0
                                      • Dave RD
                                        Dave R
                                        last edited by

                                        Thank you.

                                        Etaoin Shrdlu

                                        %

                                        (THERE'S NO PLACE LIKE)

                                        G28 X0.0 Y0.0 Z0.0

                                        M30

                                        %

                                        1 Reply Last reply
                                        Reply Quote 0
                                        • N
                                          nektares
                                          last edited by

                                          this might become handy when importing external geometry from other apps, thanks a lot!

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

                                            Guy,

                                            You saved my day today! Thanks a lot!

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

                                            Advertisement