[plugin idea] hide double edges in different context
-
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)
Or is there a fast workaround to achieve this manually?
-
@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.
-
Thank you for your fast reply. With my test model (see attached model), not all edges are hidden...
-
Carsten, this is a great idea. It would be useful to hide the faces, too, to prevent them from showing through at the seams.
-
@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.
-
@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!
-
I wonder what it is you are doing this for.
-
@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...
Or...
-
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.
-
@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!
-
@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 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:
- Overlap.
- Adjacent faces are coplanar.
- 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:
- Are coplanar.
- But make an angle different from 180 degrees from edge.
I guess that covers all cases but I might be wrong...
-
@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.
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.
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.
Even the thread on the screw is made up of small components with edges hidden.
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.
-
700Kb of pure cool modelling.
-
@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.
-
Another use for this would be to help solve bleed through problems by hiding the relevant edges automatically.
-
@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..)
-
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.
-
Dave, for your example, the second version of the plugin is working already...
Thank you, CAUL! -
Thank you for the heads up. I haven't had time to try it but I will.
thank you, Caul.
Advertisement