Sketch: replace PyObject_IsTrue with Base::asBoolean

This commit is contained in:
wmayer
2022-07-16 12:41:53 +02:00
parent a34911605c
commit 832bdaa7dd
6 changed files with 25 additions and 25 deletions

View File

@@ -248,8 +248,8 @@ private:
Base::Vector3d v = Py::Vector(t.getItem(1)).toVector();
pc.SetUV(u, v);
}
pc.EnableSmoothing(PyObject_IsTrue(smooth) ? true : false, weight, grad, bend, curv);
hSurf = pc.CreateSurface(clPoints, iteration, PyObject_IsTrue(correction) ? true : false, factor);
pc.EnableSmoothing(Base::asBoolean(smooth), weight, grad, bend, curv);
hSurf = pc.CreateSurface(clPoints, iteration, Base::asBoolean(correction), factor);
if (!hSurf.IsNull()) {
return Py::asObject(new Part::BSplineSurfacePy(new Part::GeomBSplineSurface(hSurf)));
}