sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [plugin idea] hide double edges in different context

    Scheduled Pinned Locked Moved Plugins
    21 Posts 7 Posters 780 Views 7 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.
    • cottyC Offline
      cotty
      last edited by

      I would like to have a plugin that hides all edges that are in the same place but in different groups/components.

      Example usage:

      • convexify a group (part of FredoTools)
      • select all 25 groups (or group of 25 groups)
      • hide all "internal" edges (same position, different context)

      hidelines.jpg

      Or is there a fast workaround to achieve this manually?

      my SketchUp gallery

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

        @cotty said:

        I would like to have a plugin that hides all edges that are in the same place but in different groups/components.

        Example usage:

        • convexify a group (part of FredoTools)
        • select all 25 groups (or group of 25 groups)
        • hide all "internal" edges (same position, different context)

        [attachment=1:2t7wh1k2]<!-- ia1 -->hidelines.jpg<!-- ia1 -->[/attachment:2t7wh1k2]

        Or is there a fast workaround to achieve this manually?

        The attached script may do what you want. It should hide edges that overlap completely, partial overlap is not handled though.


        HideOverlappingEdges.rb

        1 Reply Last reply Reply Quote 0
        • cottyC Offline
          cotty
          last edited by

          Thank you for your fast reply. With my test model (see attached model), not all edges are hidden...


          deconvexify2.zip

          my SketchUp gallery

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

            Carsten, this is a great idea. It would be useful to hide the faces, too, to prevent them from showing through at the seams.

            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

              @dave r said:

              Carsten, this is a great idea. It would be useful to hide the faces, too, to prevent them from showing through at the seams.

              Yes and what's cool about hiding edges and faces on solids is that they still are kept solids, while if you erase faces they obviously cease to be solids.

              www.casca.pt
              Visit us on facebook!

              1 Reply Last reply Reply Quote 0
              • cottyC Offline
                cotty
                last edited by

                @dave r said:

                Carsten, this is a great idea. It would be useful to hide the faces, too, to prevent them from showing through at the seams.

                Yes, nice idea!

                my SketchUp gallery

                1 Reply Last reply Reply Quote 0
                • pbacotP Offline
                  pbacot
                  last edited by

                  I wonder what it is you are doing this for.

                  MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

                  1 Reply Last reply Reply Quote 0
                  • cottyC Offline
                    cotty
                    last edited by

                    @pbacot said:

                    I wonder what it is you are doing this for.

                    The example image (first post) shows a gearwheel which can be used for Sketchyphysics e.g., but for this, the individual parts need a "convex hull friendly" shape. The mentioned convexify plugin does this, but the gear will look much nicer without the inner lines.

                    Or if you create a thing consisting of different smaller components, it will look like one part this way...
                    hideseams.jpg

                    Or...

                    my SketchUp gallery

                    1 Reply Last reply Reply Quote 0
                    • pbacotP Offline
                      pbacot
                      last edited by

                      So I could have for example, a house with components for the first and second story walls and in SU I could stack them and quickly hide the edges where they meet? That would help.

                      MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

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

                        @pbacot said:

                        So I could have for example, a house with components for the first and second story walls and in SU I could stack them and quickly hide the edges where they meet? That would help.

                        Definetelly!

                        www.casca.pt
                        Visit us on facebook!

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

                          @cotty said:

                          Thank you for your fast reply. With my test model (see attached model), not all edges are hidden...

                          Ok, the problem was partially overlapping edges. That is a somewhat trickier problem. Below is a second try. A problem is that all overlapping edges should probably not be hidden. The vertical edges in the inner corner of the cogs should ideally still be visible even though they overlap.


                          HideOverLappingEdges2.rb

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

                            @caul said:

                            @cotty said:

                            Thank you for your fast reply. With my test model (see attached model), not all edges are hidden...

                            Ok, the problem was partially overlapping edges. That is a somewhat trickier problem. Below is a second try. A problem is that all overlapping edges should probably not be hidden. The vertical edges in the inner corner of the cogs should ideally still be visible even though they overlap.

                            Caul I think the edges we are talking about meet the following requirements:

                            1. Overlap.
                            2. Adjacent faces are coplanar.
                            3. Make a 180 degree angle from edge.

                            I don't know how that angle would be measured within the different solids (maybe check them against model axis?)

                            All the inner faces that should be hidden and are attached on those edges:

                            1. Are coplanar.
                            2. But make an angle different from 180 degrees from edge.

                            I guess that covers all cases but I might be wrong...

                            www.casca.pt
                            Visit us on facebook!

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

                              @pbacot said:

                              So I could have for example, a house with components for the first and second story walls and in SU I could stack them and quickly hide the edges where they meet? That would help.

                              Peter, that would be a good application for this plugin. Here are a few examples where I would find a plugin like this useful to help reduce file size.

                              The column in this drawing is actually made of eight instances of the component on the right.

                              https://farm5.staticflickr.com/4001/5169372316_db2dce793a_z.jpg

                              Not only does dividing the column up reduce file size, if makes it dead easy to create a quarter, half or 3/4 column.

                              The same sort of thing was applied to the turned portion of these flame finials which, while very detailed, would normally be a fairly small detail in an overall model.

                              https://farm9.staticflickr.com/8664/16515729680_fb47b3cd6c_z.jpg

                              And in this pipe clamp model, the crank and the orange parts are symmetrical. To keep file size down, I drew half of each and made them components with flipped copies to make the other half.


                              https://farm8.staticflickr.com/7162/6733484733_d29d75f500_z.jpg

                              Even the thread on the screw is made up of small components with edges hidden.

                              https://farm8.staticflickr.com/7007/6733484345_c0c99635e2_z.jpg

                              Those pipe clamps were drawn for a work bench model. Even with four of those clamps and all the rest of the work bench parts, the entire model file size was under 700Kb.

                              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

                                700Kb of pure cool modelling.

                                www.casca.pt
                                Visit us on facebook!

                                1 Reply Last reply Reply Quote 0
                                • cottyC Offline
                                  cotty
                                  last edited by

                                  @caul said:

                                  Ok, the problem was partially overlapping edges. That is a somewhat trickier problem. Below is a second try.

                                  Great improvement!

                                  @caul said:

                                  A problem is that all overlapping edges should probably not be hidden. The vertical edges in the inner corner of the cogs should ideally still be visible even though they overlap.

                                  Yes, but maybe this is difficult to distinguish with a script for all cases?

                                  It would be nice if the inner faces are hidden too as suggested by Dave.

                                  my SketchUp gallery

                                  1 Reply Last reply Reply Quote 0
                                  • BoxB Offline
                                    Box
                                    last edited by

                                    Another use for this would be to help solve bleed through problems by hiding the relevant edges automatically.


                                    Hidden edges.gif

                                    1 Reply Last reply Reply Quote 0
                                    • ntxdaveN Offline
                                      ntxdave
                                      last edited by

                                      @dave r said:

                                      @pbacot said:

                                      So I could have for example, a house with components for the first and second story walls and in SU I could stack them and quickly hide the edges where they meet? That would help.

                                      Peter, that would be a good application for this plugin. Here are a few examples where I would find a plugin like this useful to help reduce file size.

                                      The column in this drawing is actually made of eight instances of the component on the right.

                                      At first I was not sure I saw the advantage but Dave's example could be a huge benefit or me as well.

                                      When you look at the images of these models, the are many copies of a rather small component and perhaps this plugin could reduce some file sizes significantly as well (I have several components that are build along the same lines..)

                                      BottomMotorSideWasher_35.png
                                      BuffAndDry.png

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

                                        Dave, this plugin wouldn't reduce file size. It would just make it faster to hide the seam line edfes and faces between components. What I was trying to show is that I leverage this when working on symmetrical objects by drawing only half, making a flipped copy and putting them together. Hiding the seam edges and faces make the thing look like a whole.

                                        I don't see much if any benefit that way at least in the images you shared. It wouldn't do anything for your brushes. You could split the frame in half down the center but since the shapes are so simple to begin with, I don't think there'd be any benefit to you in doing so.

                                        Etaoin Shrdlu

                                        %

                                        (THERE'S NO PLACE LIKE)

                                        G28 X0.0 Y0.0 Z0.0

                                        M30

                                        %

                                        1 Reply Last reply Reply Quote 0
                                        • cottyC Offline
                                          cotty
                                          last edited by

                                          Dave, for your example, the second version of the plugin is working already...
                                          Thank you, CAUL!

                                          postcomp.jpg

                                          my SketchUp gallery

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

                                            Thank you for the heads up. I haven't had time to try it but I will.

                                            thank you, Caul.

                                            Etaoin Shrdlu

                                            %

                                            (THERE'S NO PLACE LIKE)

                                            G28 X0.0 Y0.0 Z0.0

                                            M30

                                            %

                                            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