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

    [Plugin] Hide Overlapping Geometry (Updated 20150511)

    Scheduled Pinned Locked Moved Plugins
    29 Posts 10 Posters 8.0k Views 10 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.
    • C Offline
      CAUL
      last edited by CAUL

      Hide Overlapping geometry is a script that, well, hides overlapping geometry. It works as follows:
      1) Overlapping faces are always hidden. Two faces overlap if they have exactly opposite normals and share an interior point.

      2) If two faces overlap, the script will check their edges for overlap. An edge will be hidden if it overlaps another edge and A) is connected to only overlapping faces, or B) is connected to overlapping and non overlapping faces where the latter have an angle between the normals < 22.5 degrees.

      The problem is somewhat subtle and it's not always obvious what to hide. The script works best with solids. If a face or edge is hidden, it will be hidden in all group and component instances.

      Usage

      Select one or more groups or components and run the script. The script appears as "Hide overlapping" in the Extensions menu. If only one group or component is selected the option
      "Hide within nesting" has to be true.

      v0.0.2

      Interface added with four options:

      1. The smooth angle can be explicitly defined
      2. The geometry can be transfered to a specific layer
      3. Groups and components can be made unique
      4. Groups and component can be compared within the same nesting

      Example.png


      Example2.png


      v0.0.2

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

        Please always attach your Plugin's RB [without versioning in its filename] as an RBZ [edit your post accordingly] - so then it might then be considered for inclusion in the SCF PluginStore.

        Contact Rich O Brien by PM, asking to become registered as an 'SCF PluginStore Author' so that you can publish your Plugin[s] there...

        TIG

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

          wow, yes yes yes,
          dream come true.

          Thanks for such a great plugin.

          D.

          1 Reply Last reply Reply Quote 0
          • pilouP Offline
            pilou
            last edited by

            I don't very well understand that this script must do! ๐Ÿ˜„


            overlapping.gif


            overlap.skp

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

            1 Reply Last reply Reply Quote 0
            • C Offline
              CAUL
              last edited by

              @pilou said:

              I don't very well understand that this script must do! ๐Ÿ˜„

              In your example the faces intersect. Overlap is when the faces are aligned (and have exactly opposite normals) and occupy the same space. In the image below there are 16 instances of a solid group. For visual reasons the seams between the groups should be hidden, and the way to do this is to hide the overlapping faces and edges. If you select two adjacent groups and run the script the seams disappear.


              Before


              After

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

                This works great, CAUL! Thank you!

                Etaoin Shrdlu

                %

                (THERE'S NO PLACE LIKE)

                G28 X0.0 Y0.0 Z0.0

                M30

                %

                1 Reply Last reply Reply Quote 0
                • pilouP Offline
                  pilou
                  last edited by

                  Ok! But seems there is a little glitch! ๐Ÿ˜‰
                  A simple copy box (Group)
                  overlap1.gif

                  Frenchy Pilou
                  Is beautiful that please without concept!
                  My Little site :)

                  1 Reply Last reply Reply Quote 0
                  • pilouP Offline
                    pilou
                    last edited by

                    AAAAAAAAAAaaaaaaaaaaahhhhh! ๐Ÿ˜„
                    But this is curious!
                    Better if that work in any positions! ๐Ÿ˜„

                    Now seems that is a glitch inside the "gifcam" ! ๐Ÿ˜’
                    Seems it don't like the rotations! ๐Ÿ’š

                    overlap2.gif

                    Frenchy Pilou
                    Is beautiful that please without concept!
                    My Little site :)

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

                      Why don't you use Flip Along instead, Pilou? ๐Ÿ˜’

                      Etaoin Shrdlu

                      %

                      (THERE'S NO PLACE LIKE)

                      G28 X0.0 Y0.0 Z0.0

                      M30

                      %

                      1 Reply Last reply Reply Quote 0
                      • JQLJ Offline
                        JQL
                        last edited by

                        @pilou said:

                        Ok! But seems there is a little glitch! ๐Ÿ˜‰
                        A simple copy box (Group)
                        [attachment=0:1tsgra7o]<!-- ia0 -->overlap1.gif<!-- ia0 -->[/attachment:1tsgra7o]

                        I bet if you double click edit any of the two groups, prior to running the script, you will get the result you expect.

                        www.casca.pt
                        Visit us on facebook!

                        1 Reply Last reply Reply Quote 0
                        • pilouP Offline
                          pilou
                          last edited by

                          @unknownuser said:

                          I bet if you double click edit any of the two groups, prior to running the script, you will get the result you expect.

                          YEP! Excellent! ๐Ÿ‘
                          What make exactly this double click ?

                          @unknownuser said:

                          don't you use Flip Along instead

                          I take always the bad color anytime the first time! ๐Ÿ˜„
                          I prefer mirror ๐Ÿ˜„

                          Frenchy Pilou
                          Is beautiful that please without concept!
                          My Little site :)

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

                            Mirror is nice but Flip Along can be done in a single key stroke.

                            Etaoin Shrdlu

                            %

                            (THERE'S NO PLACE LIKE)

                            G28 X0.0 Y0.0 Z0.0

                            M30

                            %

                            1 Reply Last reply Reply Quote 0
                            • JQLJ Offline
                              JQL
                              last edited by

                              @pilou said:

                              YEP! Excellent! ๐Ÿ‘
                              What make exactly this double click ?

                              When you create a group and copy it, it is just like any component, and you get duplicate instances of the same definition (duplicate groups behaving like duplicate components).

                              However, if you double-click it, you edit it, and even if you do nothing on it, it is made into a different definition, therefor "unique".

                              What happened is that the plugin hide the face of a group behaving as a component and in doing so it hid the face of both components. If you'd flipped it like Dave suggested, you wouldn't see the problem.

                              www.casca.pt
                              Visit us on facebook!

                              1 Reply Last reply Reply Quote 0
                              • pilouP Offline
                                pilou
                                last edited by

                                @unknownuser said:

                                if you double-click it, you edit it, and even if you do nothing on it, it is made into a different definition, therefor "unique".

                                I don't believe that many people knows that! ๐Ÿ˜ฎ
                                (maybe in the manual but don't have the luck to see it! ๐Ÿ˜„
                                It's the Dohdoh Duh of the day! ๐Ÿ‘

                                Frenchy Pilou
                                Is beautiful that please without concept!
                                My Little site :)

                                1 Reply Last reply Reply Quote 0
                                • tt_suT Offline
                                  tt_su
                                  last edited by

                                  @jql said:

                                  @pilou said:

                                  YEP! Excellent! ๐Ÿ‘
                                  What make exactly this double click ?

                                  When you create a group and copy it, it is just like any component, and you get duplicate instances of the same definition (duplicate groups behaving like duplicate components).

                                  However, if you double-click it, you edit it, and even if you do nothing on it, it is made into a different definition, therefor "unique".

                                  What happened is that the plugin hide the face of a group behaving as a component and in doing so it hid the face of both components. If you'd flipped it like Dave suggested, you wouldn't see the problem.

                                  This isn't documented well in the API either. Something we need to improve. Developers need to call group.make_unique to ensure groups are unique before modifying them.

                                  1 Reply Last reply Reply Quote 0
                                  • JClementsJ Offline
                                    JClements
                                    last edited by

                                    I noticed that if the normals of the two overlapping faces are the same (both are "pointing" in the same direction), then the script fails.


                                    Overlapping Fail.skp

                                    John | Illustrator | Beaverton, Oregon

                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      CAUL
                                      last edited by

                                      @jclements said:

                                      I noticed that if the normals of the two overlapping faces are the same (both are "pointing" in the same direction), then the script fails.

                                      This is not really a bug (nor a feature). It's mentioned in the initial post. The reason for this behaviour is that it's a very convenient simplification from a developers point of view. The extension is centered around solids with consistently oriented faces so it's a reasonable simplification.

                                      1 Reply Last reply Reply Quote 0
                                      • PixeroP Offline
                                        Pixero
                                        last edited by

                                        Thanks for version 2. That seems to work well now. ๐Ÿ‘
                                        Would you please also add a "Show overlapping edges"?
                                        When for example designing a multi floor facade it would be great to hide the edges to see how the whole facade looks and then it could be useful to turn the edges back on for viewing the different floors.

                                        1 Reply Last reply Reply Quote 0
                                        • C Offline
                                          CAUL
                                          last edited by

                                          @pixero said:

                                          Thanks for version 2. That seems to work well now. ๐Ÿ‘
                                          Would you please also add a "Show overlapping edges"?
                                          When for example designing a multi floor facade it would be great to hide the edges to see how the whole facade looks and then it could be useful to turn the edges back on for viewing the different floors.

                                          Maybe the possibility to move the geometry to a specific layer is enough? Then you can turn the visibility of the layer on and off.

                                          1 Reply Last reply Reply Quote 0
                                          • PixeroP Offline
                                            Pixero
                                            last edited by

                                            Yes that would do. ๐Ÿ˜„

                                            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