Does anybody know how to make a deepcopy of shape TopoDS_Shape? Any code snippets..
Discussion
2 archived replies
Posts are displayed in their archived order.
01Commenter-1
a looong time ago, I was trying to do that ( maybe with BRepBuilerAPI_Copy ? I don't remember ) but it was not working as expected.
Some topological or geometrical elements were still shared and not deep copied.
The only solution I found at that time was to write + read the shape to/from a file or stream with BRepTools::Write and BRepTools::Read
but maybe the problem was fixed or some new or lower level method are available somewhere else.
Commenter-1
02Commenter-2
In my application I have some threads that need to work on the same shape and I make a copy to avoid conflicts. I use BRepBuilderAPI_Copy
and it works very well.
Here is a code snippet
BRepBuilderAPI_Copy Builder;