Skip to content

Commit

Permalink
Merge branch 'master' into pathpocketshape_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Russ4262 committed Jun 13, 2019
2 parents 236e1da + fb94e46 commit 855cffd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Mod/Part/App/TopoShapePyImp.cpp
Expand Up @@ -2553,9 +2553,18 @@ PyObject* TopoShapePy::distToShape(PyObject *args)
PyErr_SetString(PyExc_TypeError, "distToShape: Shape parameter is invalid");
return 0;
}
BRepExtrema_DistShapeShape extss(s1, s2);
BRepExtrema_DistShapeShape extss;
extss.LoadS1(s1);
extss.LoadS2(s2);
try {
extss.Perform();
}
catch (const Standard_Failure& e) {
PyErr_SetString(PyExc_RuntimeError, e.GetMessageString());
return 0;
}
if (!extss.IsDone()) {
PyErr_SetString(PyExc_TypeError, "BRepExtrema_DistShapeShape failed");
PyErr_SetString(PyExc_RuntimeError, "BRepExtrema_DistShapeShape failed");
return 0;
}
PyObject* solnPts = PyList_New(0);
Expand Down

0 comments on commit 855cffd

Please sign in to comment.