BaseGeometry.Duplicate() for Block Components - Supposed to Succeed?

Use case:
I want to report on the geometrical properties of RhinoObjects (such as Breps) and their components (such as faces) when they’re part of Block objects.

To do that, I need to run the appropriate transform on the RhinoObject or component.

Top level RhinoObjects seem to work fine.

Trying to invoke (face of brep).Duplicate() so I can then run (duplicate of face of brep).Transform(mytransform) returns null.

The documentation just says Duplicate() returns a deep copy, with no note that it might return null.

Is returning null in this case expected behavior?

Any suggestions for how I should do this? (get copies of things like Brep faces so I can draw and get geometrical properties for them where and in the orientation the block instance places them)

I guess I could make a copy of the entire Brep (or other top level object like SubD, Mesh, etc.) then duplicate that and look for the piece I need, but that seems awfully expensive if all I need is to examine one piece of it.

I think for BrepFace sub-objects, you could use DuplicateFace.

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brepface/duplicateface

1 Like

Thanks!