Does anybody know how to make a deepcopy of shape TopoDS_Shape? Any code snippets..
Stephane Routelous Thu, 04/22/2010 - 18:16
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.
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;
Thu, 04/22/2010 - 18:16
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.
Stephane
Fri, 04/23/2010 - 11:00
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;
TopoDS_Shape aShape;
aShape = aSequence1->Value(i);
Builder.Perform(aShape);
aSequence2->Append(Builder.Shape() );
Gianni