Brep Surface Orientation via Control Point Creation

Hi There,

I am at a final step in my plugin geometry jazz.

I am dynamically drawing a BREP with a singular surface (only singular surfaces allowed) and I do so by copying the control points in the same U,V counts and degrees and creating a new NURBSsurface from it.

I have found however that in doing so sometimes the surface is oriented the opposite direction (not always) as the original.

I have not found a way to “copy” the orientation and would have expected it to be from the order the surface was given the points but I have not been able to well-isolate that behavior. Anybody shine any light on this?

1 Like

It could be that the original Brep has its orientation reversed, for example due to a Flip operation. You can see this by checking the property OrientationIsReversed on each BrepFace: http://4.rhino3d.com/5/rhinocommon/html/P_Rhino_Geometry_BrepFace_OrientationIsReversed.htm

Using this property will reverse the surface normal orientation, but only on the BrepFace, not on the underlying surface.

The “UV” orientation of surfaces in a Brep is arbitrary. If the BrepFace.OrientationIsReversed property returns false, then the face’s orientation agrees with it’s underlying surface’s natural UV orientation. When the property is true, the face’s orientation is opposite the surface’s natural UV orientation. If you need to reverse the direction of a surface, use Surface.Reverse.

Thank you gents! I believe this will fix it.