Berechnung des Volumens von TopoDS_Shape / TopoDS_Solid in OpenCASCADE
English
Deutsch
OCCUtils stellt eine Bequemerfunktion dafür bereit:
shape_volume_occ.cpp
#include <occutils/Shape.hxx>
using namespace OCCUtils;
TopoDS_Shape myShape = /* ... */;
double volume = Shape::Volume(myShape);Falls du dies ohne OCCUtils tun musst, verwende
shape_volume_manual.cpp
GProp_GProps gprops;
BRepGProp::VolumeProperties(shape, gprops);
double volume = gprops.Mass();Check out similar posts by category:
C/C++, OpenCASCADE
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow