Mirroring Meshes in GH or via Rhinocommon always results in flipped normals

unhandled
bug-oversight

(Michael Pryor) #1

Dunno if intentional for some reason or not, but mirroring meshes causes flipped normals. Makes sense theoretically, however model wise I don’t think it does. For instance, mirroring directly in Rhino does not flip the normals.


Mirror Command visible in different color
(David S. Mavrov) #2

Any way to check the normals direction, compare them to the original and flip them if there is difference?


(David Rutten) #3

Yeah, the Mirror command must do some additional logic. Logged under RH-45369.


(Michael Pryor) #4

Also, Mirror transform in Rhinocommon flips open brep normals as well. The gh mirror component however does not.

rcMirror.gh (2.9 KB)


(David Rutten) #5

No I flip brep normals in GH, the problem was not the normals, it was mesh face orientation for meshes. Vertex and face normals were flipped already, but face orientation wasn’t.


(Michael Pryor) #6

So the winding direction?, which of course makes sense in a “mirror”. I see in the tracking it is being fixed in gh. Might I ask what the fix is if wanting to use mirror in a script with meshes. If there some method or common procedure for that? I was fixing it by recomputing the normals which is why I thought it was normals initially. Is that the way to go?


(David Rutten) #7

I used Mesh.Flip(true, true, false) after a mirror transform, should have been Mesh.Flip(true, true, true).

http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Mesh_Flip.htm