Volume value changed

I created a shape(cube) using open cascade, and I use VolumeProperties to get its volume. It was correct.
however, after I exported it to iges file, and tried to load it in again. The volume value was changed and became negative. anyone has an idea what is going on?

thanks!

Ivan's picture

The face orientation is different.

gary's picture

Ivan

It works thanks a lot

Hesham Nasif's picture

Dear Gray
Can you tell me how to calculate shape volume and which functions you use
Thanks
Hesham

Hesham Nasif's picture

Dear Gray
Can you tell me how to calculate shape volume and which functions you use
Thanks
Hesham

Rob Bachrach's picture

Take a look at BRepGProp::VolumeProperties.

Example:

GProp_GProps massProps;
BRepGProp::VolumeProperties(myShape, massProps);
Standard_Real myVolume = massProps.Mass();

Hesham Nasif's picture

Dear Rob
I would like to thank you really about your reply
Best
Hesham