How to turn a Rhino.Geometry.Brep inward/outward in GHPython?

Hi,

I have constructed two Rhino.Geometry.Brep’s in GHPython.

One is the result of Rhino.Geometry.CreateFromLoft() and is solid but oriented outward.
The other is from Rhino.Geometry.NurbsSurface.CreateRailRevolvedSurface().ToBrep() and is also solid but oriented inward.

This causes an issue with Rhino.Geometry.Brep.CreateBooleanDifference(), where the wrong part remains. Namely, the first object is subtracted from the second, instead of vis versa.

How do I turn the second brep inward or first outward to match their orientations? Is that even possible after the fact?

Thanks for taking a look.

Brep.Flip ?
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/flip

1 Like

Haha, oh boy, that was obvious. :sweat_smile: Thanks, Tom.

1 Like