DiscussionsIssue archiveOther usage issues

Archived discussion

How to save multiple shapes?

Other usage issuesSat, 09/18/2010 - 01:223 replies

Browse this forum
QuestionAuthor

Hi
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

Discussion

3 archived replies

Posts are displayed in their archived order.

01Commenter-1

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,

Commenter-1

02Commenter-2

Thanks Patrick.

But how do I retrieve those shapes again
after using BRepTools::Read() function
from the compound.

thanks
-PG

03Commenter-1

Hi,

how about using TopoDS_Iterator?

Greets,

Commenter-1