mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
TopoDS_Shape.center - call utility function instead of separate(and incomplete) implementation
This commit is contained in:
parent
b4ac7acd97
commit
85b909ef21
@ -733,15 +733,7 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
||||
}, "returns tuple of shape properties, currently ('mass', 'center'")
|
||||
|
||||
.def_property_readonly("center", [](const TopoDS_Shape & shape) {
|
||||
GProp_GProps props;
|
||||
switch (shape.ShapeType())
|
||||
{
|
||||
case TopAbs_FACE:
|
||||
BRepGProp::SurfaceProperties (shape, props); break;
|
||||
default:
|
||||
BRepGProp::LinearProperties(shape, props);
|
||||
}
|
||||
return props.CentreOfMass();
|
||||
return Center(shape);
|
||||
}, "returns center of gravity of shape")
|
||||
|
||||
.def_property_readonly("mass", [](const TopoDS_Shape & shape) {
|
||||
|
Loading…
Reference in New Issue
Block a user