Mesh has --- pairs of faces that intersect each other


#1

Hello!

I’m working with Rhino V5 and this is the read-out I’m getting when checking my mesh:

Mesh has 28 pairs of faces that intersect each other. Although this does not
necessarily mean that the mesh is bad, it can cause problems if you’re doing mesh boolean operations with it.

Everything else about the mesh is okay.

I’ve used the Trim command on the source polysurface occasionally. When hearing that it could cause these intersections, I’ve exploded the polysurface and rebuilt some problem areas, but that didn’t do the trick.

Is there any way to determine the location of these faces, or better still - repair the mesh?

Many thanks,

Anna


(Pascal Golay) #2

Hi Anna- right now, there is no good way to do either of these things I’m afraid.

-Pascal


(Gianpaolo Savio) #3

In a similar discussion http://v5.rhino3d.com/forum/topics/mesh-has-pairs-of-faces-that-intersect-how-to-identify-them Pascal suggested the testMSX command. I try it, but I have not found the awaited results.
If the software can compute the “pairs of faces that intersect each other”, it should not be difficult to select them.
g


(Pascal Golay) #4

Yes, testMSX is not really very reliable, I’ve found.

-Pascal


#5

Thank you for the replies.

Yes, I’ve read that thread. I tried the command as well, but it merely tells me this:

Found 50730 intersecting face pairs.
Overlaps: 2,
Segments: 29,
Points: 0

I have not found how to select the found intersecting face pairs. Also, I didn’t figure out why the TestMSX found so many, because Check found 26.

So I was just checking, if there would be another solution by now.

Thanks again!


(Pascal Golay) #6

Hi Anna - in theory, the command draws a line segment at each intersection, so SelCrv after the command will highlight those and you can change the color if that helps locate them. The problem I’ve found is that this command drawn many more lines than are actual intersections - that is, most of the time I cannot find any intersection where a line is drawn… It is a test command and not supported, so there is not much we can do about that at the moment, but I understand the underlying problem of locating and fixing these self intersections, and I’ve pointed it out to the developers… we’ll see.

-Pascal


#7

One possible way is to offset the mesh by a tiny amount and perform an intersection between the original and the offset mesh. Usually this will create polylines around or near the faces which intersect or which do have a large difference in the vertex and face normal directions. The Python script below will do this task, but be warned that it can take some time on large meshes and it can mark false positives as well. You might use _Zoom _Selected after it has found markings and determine visually if there is a mesh intersection or not.

MeshSelfIntersectionMarks.py (1.2 KB)

Once you get polylines (marks) inspect your mesh near those areas and try to remove the selfintersections manually, either by deleting mesh faces using the command _DeleteMeshFaces or by collapsing them using _CollapseMeshVertex

The script has been used mostly on mesh data coming from a laser scanner software. Since you´ve mentioned that your mesh comes from a polysurface, you might invest time and find the real source of the problem in the originating object.

c.


Self Intersecting Mesh
#8

Thank you very much, Pascal, I understand the problem now. Also, thanks for pointing that out to the developers.

Much appreciated, Clement! This is the most comprehensive solution for this problem I’ve heard of.


(Willem Derks) #9

Hi Pascal,

Just to be sure; did you point out the fact that TestMSX is unreliable, or did you point out that it is frustrating and Kafkaesque to read that message and have no way to find those intersections, when apparently the code did find and count them.

It’s like the IRS telling you there is a way to get an extra tax-return, yet not disclosing how

Cheers
-Willem


(Pascal Golay) #10

Hi Willem -

yeah, I don’t care so much about the test command, myself, as the discrepancy between the errors reported and the tools provided…

-Pascal


(Gianpaolo Savio) #11

Hi,
the following script shows the edges which intersect face. These edges are added to the document as lines and selected.
selectintrsectededge.py (1.0 KB)
g


#12

Hi Gianpaolo, this is great and should be made into a default Rhino command to delete or extract intersecting mesh faces for easier repair. Thanks for posting.

c.


HELP-How can I solve this problem when I get this message 'where the face normal differs substantially from the vertex normals"?
(Gianpaolo Savio) #13

In the latest version of “Rhino Open Projects” http://www.food4rhino.com/project/rp there is a tool which selects vertices of self-intesection edges. You can “fix” the mesh by deleting these vertices (just run the command and press Delete).


#14

Thanks gianpaolo for the update !

c.


#15

This thread just made my night. Thanks for all the help!


#16

Hi,

I need this fix, but when the link is clicked I don’t find it.

Could you give the current link please to solve this issue.

Also, can you give the equivalent C# code for the selectintrsectededge.py script.

thank you.


(Gianpaolo Savio) #17