Part: [skip ci] add methods to determine continuity

This commit is contained in:
wmayer
2020-05-17 21:57:25 +02:00
parent 393cf75276
commit 065619d243
7 changed files with 160 additions and 1 deletions

View File

@@ -528,6 +528,37 @@ PyObject* TopoShapeWirePy::discretize(PyObject *args, PyObject *kwds)
return 0;
}
Py::String TopoShapeWirePy::getContinuity() const
{
BRepAdaptor_CompCurve adapt(TopoDS::Wire(getTopoShapePtr()->getShape()));
std::string cont;
switch (adapt.Continuity()) {
case GeomAbs_C0:
cont = "C0";
break;
case GeomAbs_G1:
cont = "G1";
break;
case GeomAbs_C1:
cont = "C1";
break;
case GeomAbs_G2:
cont = "G2";
break;
case GeomAbs_C2:
cont = "C2";
break;
case GeomAbs_C3:
cont = "C3";
break;
case GeomAbs_CN:
cont = "CN";
break;
}
return Py::String(cont);
}
Py::Object TopoShapeWirePy::getMass(void) const
{
GProp_GProps props;