DiscussionsIssue archiveOther usage issues

Archived discussion

Convert closed Shell to Solid

Other usage issuesWed, 04/28/2010 - 19:453 replies

Browse this forum
QuestionAuthor

Hi everyone:
I have a question about how to convert a closed shell to a solid.

By doing following steps, I get a Shape.

BRepBuilderAPI_Sewing sew;
sew.Add(face1);
sew.Add(face2);
sew.Add(face3);
sew.Add(face4);
sew.Add(face5);
sew.Add(face6); // face1 to face6 form a closed space

sew.Perform();

TopoDS_Shape sew_shape=sew.SewedShape();

When I print sew_shape.ShapeType(), it returns 3 (Shell).

How can I convert sew)shape to a solid? (i.e. sew_shape.ShapeType() can return 2)

Thanks.

Sean

Discussion

3 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hi Sean,

You can use the BRepBuilderAPI_MakeSolid class.

Just pass your shell to the .Add method, then get the result from the .Solid() method (it returns a TopoDS_Solid shape type).

Regards,

Commenter-1

02Author

Hi Thomas:
Thanks. It works.
I have another question about converting the shell to solid.
If the shell I have doesn't form a closed space, I still can convert the shell into a solid. Why is that?

Thanks.

Sean

03Commenter-2

Sean,

you need to check if there are open edges, by using the method "NbFreeEdges()"

regards,