Part: fix TopoShapePy::optimalBoundingBox
This commit is contained in:
@@ -2671,8 +2671,9 @@ PyObject* TopoShapePy::optimalBoundingBox(PyObject *args)
|
||||
{
|
||||
PyObject* useT = Py_True;
|
||||
PyObject* useS = Py_False;
|
||||
if (!PyArg_ParseTuple(args, "|O!O!", &PyBool_Type, &PyBool_Type, &useT, &useS))
|
||||
if (!PyArg_ParseTuple(args, "|O!O!", &PyBool_Type, &useT, &PyBool_Type, &useS)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
try {
|
||||
TopoDS_Shape shape = this->getTopoShapePtr()->getShape();
|
||||
|
||||
@@ -19,3 +19,7 @@ class RegressionTests(unittest.TestCase):
|
||||
# We should now have empty list...
|
||||
with self.assertRaises(IndexError):
|
||||
result.pop()
|
||||
|
||||
def test_OptimalBox(self):
|
||||
box = Part.makeBox(1, 1, 1)
|
||||
self.assertTrue(box.optimalBoundingBox(True, False).isValid())
|
||||
|
||||
Reference in New Issue
Block a user