correct computation of shapes

This commit is contained in:
Julius Zimmermann 2022-04-20 00:08:54 +02:00
parent eb8276c132
commit 718c876fa7

View File

@ -717,6 +717,14 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
{
case TopAbs_FACE:
BRepGProp::SurfaceProperties (shape, props); break;
case TopAbs_SHELL:
BRepGProp::SurfaceProperties (shape, props); break;
case TopAbs_SOLID:
BRepGProp::VolumeProperties (shape, props); break;
case TopAbs_COMPOUND:
BRepGProp::VolumeProperties (shape, props); break;
case TopAbs_COMPSOLID:
BRepGProp::VolumeProperties (shape, props); break;
default:
BRepGProp::LinearProperties(shape, props);
// throw Exception("Properties implemented only for FACE");
@ -744,6 +752,14 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
{
case TopAbs_FACE:
BRepGProp::SurfaceProperties (shape, props); break;
case TopAbs_SHELL:
BRepGProp::SurfaceProperties (shape, props); break;
case TopAbs_SOLID:
BRepGProp::VolumeProperties (shape, props); break;
case TopAbs_COMPOUND:
BRepGProp::VolumeProperties (shape, props); break;
case TopAbs_COMPSOLID:
BRepGProp::VolumeProperties (shape, props); break;
default:
BRepGProp::LinearProperties(shape, props);
}