In the prior .NET SDK I could query a generic piece of geometry using the IOnGeometry method, HasBrepForm(). I don’t see an equivalent method in RhinoCommon on GeometryBase. Is there another way to determine if an object has a Brep form in RhinoCommon without specifically testing to see if it is a Brep, a Surface, an Extrusion, etc.?
Hi Larry,
It looks like this has not been added to RhinoCommon yet. I’ll try adding this for the next service release.
In the meantime, I would just write a single static helper function which just tests the types and call that in your code. Once I the function is in RhinoCommon, you can then just do a quick search/replace.
HasBrepForm is lighter in that it just returns true or false to tell you that the object could be converted to a brep. TryConvertBrep has to go through the process of actually creating a brep