Make SU heal faces and edges?
-
See the video for visual presentation of the problem:
[flash=480,390:10izlq5q]http://www.youtube.com/v/IMFb8OGVLo4?fs=1&hl=en_GB[/flash:10izlq5q]
At first I use the native Move tool to move a vertex to another vertex so the triangular face disappear. The mesh automatically heals.
However, when I do the same operation using the Ruby API, moving the same vertex. But then mesh doesn't heal. The triangle doesn't disappear, it becomes a zero area face, and the related edges becomes zero length edges. And this also produce errors when you use the Fix Problems feature in SU.
I have tried intersecting connected edges and faces afterwards - but that did not help.
I have tried erasing the zero size faces and edges, but erasing the zero length edges cause neighbouring faces to disappear.
Anyone got any ideas of how SU's native Move tool is doing it?
-
After I use the Ruby API to merge two vertices, if I use the native Line tool to draw an edge from the point where they merged, the geometry heals.
But if I use the Ruby API to draw an edge - it doesn't heal... x_X -
Hi,
A clean way to merge coincident vertices would be as follows:
- create a dummy group containing a non-zero length edge emerging from one of the vertices to be merged
- explode that group
This forces the SketchUp geometry engine to repair connections.
-
Don't think you can create zero length edges via Ruby.
model.active_entities.add_line( ORIGIN, ORIGIN )
<- returnsnil
-
When the vertex is moved add a short edge to it in a direction that is not parallel to any of its edges.
Then erase that edge when the move is done - it should then force the geometry to reform and remove the spurious zero length edges/faces etc... -
@tig said:
When the vertex is moved add a short edge to it in a direction that is not parallel to any of its edges.
Then erase that edge when the move is done - it should then force the geometry to reform and remove the spurious zero length edges/faces etc...Tried that: http://forums.sketchucation.com/viewtopic.php?f=180&t=35470#p312799
-
@thomthom said:
Don't think you can create zero length edges via Ruby.
model.active_entities.add_line( ORIGIN, ORIGIN )
<- returnsnil
The first step in my note should have been "move the vertex on top of the other vertex you want to merge with" (then there may be an edge with zero length). After that follow the next two steps.
-
@gulcanocali said:
@thomthom said:
Don't think you can create zero length edges via Ruby.
model.active_entities.add_line( ORIGIN, ORIGIN )
<- returnsnil
The first step in my note should have been "move the vertex on top of the other vertex you want to merge with" (then there may be an edge with zero length). After that follow the next two steps.
That seem to have worked.
Though temp groups and edges feels a big hacky - I wonder if there's a cleaner way. Would be interesting to get some insight to how SU does this internally.
But thank you very much for this working method!
Advertisement