Wed, 04/28/2010 - 19:45
Forums:
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
Wed, 04/28/2010 - 22:48
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,
Thomas
Thu, 04/29/2010 - 23:40
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
Thu, 04/14/2011 - 04:19
Sean,
you need to check if there are open edges, by using the method "NbFreeEdges()"
regards,