Calculate surface and volume of a TopoDS_Shape

Hi to all, is possible to calculate the surface of tha faces of a topods_shape and the volume of the entire topods_shape? thanks

Pawel's picture

Hi Sandro,

try this

TopoDS_Shape shape;
...
GProp_GProps System;
BRepGProp::LinearProperties(shape, System);
BRepGProp::SurfaceProperties(shape, System);
BRepGProp::VolumeProperties(shape, System);
System.Mass();

Pawel