seanliu Sat, 09/18/2010 - 01:22 Forums: Other usage issuesHi If I have shape1, shape2, shapeN, how I can I put all these shapes into a shape (say shape_all) so that I can use BRepTools::Write(shape_all,"filename") to save all the shapes. Thanks. Sean Patrik Mueller Sat, 09/18/2010 - 17:42 Hi, try something like this: BRep_Builder builder; TopoDS_Compound shapeCollector; builder.MakeCompound(shapeCollector); builder.Add(shapeCollector,shape1); builder.Add(shapeCollector,shape2); ... BRepTools::Write(shapeCollector,"filename") Greets, Patrik Log in to post comments P G Mon, 09/20/2010 - 11:40 Thanks Patrick. But how do I retrieve those shapes again after using BRepTools::Read() function from the compound. thanks -PG Log in to post comments Patrik Mueller Mon, 09/20/2010 - 14:15 Hi, how about using TopoDS_Iterator? Greets, Patrik Log in to post comments
Sat, 09/18/2010 - 17:42
Hi, try something like this:
BRep_Builder builder;
TopoDS_Compound shapeCollector;
builder.MakeCompound(shapeCollector);
builder.Add(shapeCollector,shape1);
builder.Add(shapeCollector,shape2);
...
BRepTools::Write(shapeCollector,"filename")
Greets,
Patrik
Mon, 09/20/2010 - 11:40
Thanks Patrick.
But how do I retrieve those shapes again
after using BRepTools::Read() function
from the compound.
thanks
-PG
Mon, 09/20/2010 - 14:15
Hi,
how about using TopoDS_Iterator?
Greets,
Patrik