Please help: Why I get negative volume value for a TopoDS_Solid.

Please help:

I create a TopoDS_Solid from a TopoDS_Shell.
The shell is valid & closed. After I get the
solid, I use BRepCheck_Analyzer() to check,
there is nothing wrong with it. Also I can show
it well on the viewer. But if I use BRepGProp::VolumeProperties() to check the volume value, I got a negative one. Could anyone tell me what's wrong?

The sequence of my coding is:

1. Creat a shell.
2. Check the shell face by face to make sure
all the faces are valid.
3. Sew the shell to avoid the gab(when creating
there is some small gabs maybe.)
4. Create the solid by BRepBuilderAPI_MakeSolid .
5. Check the volume of the solid.

ekiroglu's picture

Hello Lishubin

While creating a solid, face orientations are important. Please, check out the documentation with this in mind.

Best regards,

lishubin's picture

Thanks for your reply.

I check the shell, some faces in the shell got
reversed orientation. If I try to make all of them
to forward orientation, would it solve the problem?
By the way, how to change the orientation for shell? I mean all the faces inside a shell will
by changed into Forward.

DU's picture


you can try use the followed method,

then, you can use "BRepCheck_Analyzer".