Edit: This question is based on a mistake and the assumptions in it abut which methods work are not true. Duplicate() does work for breps. DuplicateGeometry() works specifically for docobjects. Python copy not working might be a bug.
I am trying to perform the seemingly simple task of copying a brep using Rhino.Geometry in python so I can perform a simple mirror transform and union. I managed to do it by deconstructing the brep into individual surfaces, duplicating them and using them to make a new brep. The new brep for some reason did not work with a boolean union, though, despite it working fine if I output it to grasshopper and performed the union there. No idea about the second part, but duplicating a brep in python is hard, I do not know about other objects.
Methods I have tried:
Duplicate() - does not actually duplicate the object, transformations to the new object apply to the original.
DuplicateBrep() - same
DuplicateGeometry() - Brep object has no attribute DuplicateGeometry
python copy() and deepcopy() - do not work because the brep object cannot be pickled
Would rather not touch rhinoscriptsyntax and its indirect way of referencing objects, but if I have to, I will.
Thank you, this is true. My mistake came from the boolean union returning wrong results, deleting the original half instead of creating a union. I am still figuring this out.
By the way, what was causing the issue with boolean union is that the mirroring flipped the brep normals. I have not tested it much, but this seems to happen as a rule. Is this how it is supposed to work?