Part: replace PyObject_IsTrue with Base::asBoolean

This commit is contained in:
wmayer
2022-07-16 13:31:10 +02:00
parent 343aadf02b
commit 8ae3185e3b
38 changed files with 141 additions and 161 deletions

View File

@@ -252,14 +252,12 @@ PyObject* HLRToShapePy::compoundOfEdges(PyObject *args, PyObject *kwds)
if (shape) {
TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape();
TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->CompoundOfEdges(input, static_cast<HLRBRep_TypeOfResultingEdge>(type),
PyObject_IsTrue(visible) ? Standard_True : Standard_False,
PyObject_IsTrue(in3d) ? Standard_True : Standard_False);
Base::asBoolean(visible), Base::asBoolean(in3d));
return new TopoShapePy(new TopoShape(result));
}
else {
TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->CompoundOfEdges(static_cast<HLRBRep_TypeOfResultingEdge>(type),
PyObject_IsTrue(visible) ? Standard_True : Standard_False,
PyObject_IsTrue(in3d) ? Standard_True : Standard_False);
Base::asBoolean(visible), Base::asBoolean(in3d));
return new TopoShapePy(new TopoShape(result));
}
}