by CAUL » Sun May 03, 2015 6:33 pm
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
Last edited by CAUL on Mon May 11, 2015 1:33 pm, edited 3 times in total.
-
CAUL
- PluginStore Author

-
- Posts: 62
- Joined: Sat Nov 30, 2013 4:17 pm
- Location: Scania
- Name: A L
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by TIG » Sun May 03, 2015 6:39 pm
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
-

TIG
- Global Moderator
-
- Posts: 20297
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by DOD3R » Mon May 04, 2015 3:01 am
wow, yes yes yes, dream come true.
Thanks for such a great plugin.
D.
-
DOD3R
-
- Posts: 102
- Joined: Thu May 06, 2010 8:48 pm
by pilou » Mon May 04, 2015 8:51 am
I don't very well understand that this script must do! 
-

pilou
- Top SketchUcator
-
- Posts: 21205
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by CAUL » Mon May 04, 2015 9:29 am
pilou wrote: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.
-
CAUL
- PluginStore Author

-
- Posts: 62
- Joined: Sat Nov 30, 2013 4:17 pm
- Location: Scania
- Name: A L
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by pilou » Mon May 04, 2015 10:18 am
Ok! But seems there is a little glitch!  A simple copy box (Group) overlap1.gif
Last edited by pilou on Mon May 04, 2015 10:53 am, edited 1 time in total.
-

pilou
- Top SketchUcator
-
- Posts: 21205
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by Dave R » Mon May 04, 2015 10:41 am
This works great, CAUL! Thank you!
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18196
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by pilou » Mon May 04, 2015 11:16 am
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
-

pilou
- Top SketchUcator
-
- Posts: 21205
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by Dave R » Mon May 04, 2015 12:07 pm
Why don't you use Flip Along instead, Pilou? 
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18196
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by JQL » Mon May 04, 2015 12:42 pm
pilou wrote:Ok! But seems there is a little glitch!  A simple copy box (Group) overlap1.gif
I bet if you double click edit any of the two groups, prior to running the script, you will get the result you expect.
-

JQL
- Premium Member

-
- Posts: 3045
- Joined: Tue Sep 20, 2011 7:32 pm
- Location: Lisbon
- Name: JQL
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by pilou » Mon May 04, 2015 12:57 pm
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 ? don't you use Flip Along instead
I take always the bad color anytime the first time!  I prefer mirror 
-

pilou
- Top SketchUcator
-
- Posts: 21205
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by Dave R » Mon May 04, 2015 1:01 pm
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
%
-

Dave R
- Global Moderator
-
- Posts: 18196
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by JQL » Mon May 04, 2015 1:56 pm
pilou wrote: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.
-

JQL
- Premium Member

-
- Posts: 3045
- Joined: Tue Sep 20, 2011 7:32 pm
- Location: Lisbon
- Name: JQL
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by pilou » Mon May 04, 2015 2:33 pm
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! 
-

pilou
- Top SketchUcator
-
- Posts: 21205
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by tt_su » Wed May 06, 2015 11:09 am
JQL wrote:pilou wrote: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.
-

tt_su
- SketchUp Team

-
- Posts: 1035
- Joined: Thu Aug 01, 2013 6:16 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Mac
- SketchUp version: 2014
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by JClements » Sat May 09, 2015 4:40 pm
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.
John | Illustrator | Beaverton, Oregon
-

JClements
- Premium Member

-
- Posts: 962
- Joined: Wed Nov 14, 2007 4:32 pm
- Location: Portland/Beaverton, Oregon
- Name: JClements
- Operating system: Windows
- SketchUp version: 2020
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Intermediate
by CAUL » Mon May 11, 2015 1:31 pm
JClements wrote: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.
-
CAUL
- PluginStore Author

-
- Posts: 62
- Joined: Sat Nov 30, 2013 4:17 pm
- Location: Scania
- Name: A L
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by Pixero » Mon May 11, 2015 2:27 pm
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.
-

Pixero
-
- Posts: 2654
- Joined: Thu May 24, 2018 12:49 pm
- Location: Halmstad, Sweden
- Name: Pixero
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by CAUL » Tue May 12, 2015 4:47 pm
Pixero wrote: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.
-
CAUL
- PluginStore Author

-
- Posts: 62
- Joined: Sat Nov 30, 2013 4:17 pm
- Location: Scania
- Name: A L
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by Pixero » Tue May 12, 2015 5:10 pm
Yes that would do. 
-

Pixero
-
- Posts: 2654
- Joined: Thu May 24, 2018 12:49 pm
- Location: Halmstad, Sweden
- Name: Pixero
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by JQL » Tue May 12, 2015 7:35 pm
If you're developing that, could we define the layer's name by tinkering with rb?
-

JQL
- Premium Member

-
- Posts: 3045
- Joined: Tue Sep 20, 2011 7:32 pm
- Location: Lisbon
- Name: JQL
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by ntxdave » Tue May 12, 2015 8:04 pm
Feeling really dumb. I created a box and then duplicated it and drug the corner of one box to the corners of the other box. I tried double clicking one of the boxes and then used the selection box to select both boxes. When I clicked on the Hide Overlapping Geometry, the overlapping geometry was not hidden.
I tried Dave's approach of flipping one of the boxes (that was the only change), clicked the Hide Overlapping Geometry and it worked as it should.
Not sure what I did wrong with the first approach.
-

ntxdave
-
- Posts: 1663
- Joined: Wed Oct 02, 2013 3:32 pm
- Name: Dave Cahall
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Intermediate
by CAUL » Wed May 13, 2015 8:01 pm
JQL wrote:If you're developing that, could we define the layer's name by tinkering with rb?
The current version lets you select an existing layer. ntxdave wrote:Feeling really dumb. I created a box and then duplicated it and drug the corner of one box to the corners of the other box. I tried double clicking one of the boxes and then used the selection box to select both boxes. When I clicked on the Hide Overlapping Geometry, the overlapping geometry was not hidden.
I'm not sure what you're doing wrong (if anything). Do you have a sample model?
-
CAUL
- PluginStore Author

-
- Posts: 62
- Joined: Sat Nov 30, 2013 4:17 pm
- Location: Scania
- Name: A L
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by ntxdave » Wed May 13, 2015 8:25 pm
CAUL wrote:ntxdave wrote:Feeling really dumb. I created a box and then duplicated it and drug the corner of one box to the corners of the other box. I tried double clicking one of the boxes and then used the selection box to select both boxes. When I clicked on the Hide Overlapping Geometry, the overlapping geometry was not hidden.
I'm not sure what you're doing wrong (if anything). Do you have a sample model?
I have attached a VERY simple model that just has two boxes. Flipping one of them works fine. Where I am messing us is with the double click method. When I double click on one, how do I then select the other one so that I can then apply your plugin to the 2 of them. This is making me feel really dumb........
-

ntxdave
-
- Posts: 1663
- Joined: Wed Oct 02, 2013 3:32 pm
- Name: Dave Cahall
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Intermediate
by CAUL » Fri May 15, 2015 9:41 am
ntxdave wrote:I have attached a VERY simple model that just has two boxes. Flipping one of them works fine. Where I am messing us is with the double click method. When I double click on one, how do I then select the other one so that I can then apply your plugin to the 2 of them. This is making me feel really dumb........
You should not enter (double click) any of the components, just select the two components and run the script.
-
CAUL
- PluginStore Author

-
- Posts: 62
- Joined: Sat Nov 30, 2013 4:17 pm
- Location: Scania
- Name: A L
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by ntxdave » Fri May 15, 2015 5:39 pm
CAUL wrote:ntxdave wrote:I have attached a VERY simple model that just has two boxes. Flipping one of them works fine. Where I am messing us is with the double click method. When I double click on one, how do I then select the other one so that I can then apply your plugin to the 2 of them. This is making me feel really dumb........
You should not enter (double click) any of the components, just select the two components and run the script.
The problem I am having is exactly as Pilou described in this post: pilou wrote:Ok! But seems there is a little glitch!  A simple copy box (Group) overlap1.gif
In another post, @JQL summarized the situation very well: JQL wrote:pilou wrote: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.
However, I am doing something that should be very basic, very wrong. When I double-click one of the boxes it seems to not be becoming unique so I am not sure what I am doing wrong. Good news is that I do get it to work fine if I slect one of the boxes and then right-click and select make unique, it does work for me. So I guess my real question (based on these posts is why does the box not become unique when I double-click it or am I not understanding the instructions correctly?
-

ntxdave
-
- Posts: 1663
- Joined: Wed Oct 02, 2013 3:32 pm
- Name: Dave Cahall
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Intermediate
by Dave R » Fri May 15, 2015 5:54 pm
ntxdave wrote:Good news is that I do get it to work fine if I slect one of the boxes and then right-click and select make unique, it does work for me. So I guess my real question (based on these posts is why does the box not become unique when I double-click it or am I not understanding the instructions correctly?
The answer is in your question.  Your box is a component, not a group. If it were a group, you wouldn't see the Make Unique option in the Context menu. And just opening a component for editing won't make it unique. (That would be counterproductive.)
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18196
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by ntxdave » Fri May 15, 2015 6:01 pm
Dave R wrote:ntxdave wrote:Good news is that I do get it to work fine if I slect one of the boxes and then right-click and select make unique, it does work for me. So I guess my real question (based on these posts is why does the box not become unique when I double-click it or am I not understanding the instructions correctly?
The answer is in your question.  Your box is a component, not a group. If it were a group, you wouldn't see the Make Unique option in the Context menu. And just opening a component for editing won't make it unique. (That would be counterproductive.)
See, I told everyone it was a dumb question. I deleted the 2nd box, exploded the first one, and then made it a group. Used the move tool to make the 2nd copy, double-clicked it and you guessed it, it worked. Thanks Dave for pulling my head out of my posterior. 
-

ntxdave
-
- Posts: 1663
- Joined: Wed Oct 02, 2013 3:32 pm
- Name: Dave Cahall
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Intermediate
by Dave R » Fri May 15, 2015 6:12 pm
Not a dumb question. Sometimes it's the little things that make all the difference, though.
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18196
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|