handle also B-spline and Bezier curves in GeomCurve::closestParameter

This commit is contained in:
wmayer
2019-01-21 13:47:41 +01:00
parent 79504462d1
commit 23fe2041d9
2 changed files with 5 additions and 6 deletions

View File

@@ -483,13 +483,13 @@ PyObject* GeometryCurvePy::parameter(PyObject *args)
if (!PyArg_ParseTuple(args, "O!", &(Base::VectorPy::Type), &p))
return 0;
Base::Vector3d v = Py::Vector(p, false).toVector();
double u;
if(static_cast<Part::GeomCurve *>(getGeometryPtr())->closestParameter(v,u))
if (static_cast<Part::GeomCurve *>(getGeometryPtr())->closestParameter(v,u))
return Py::new_reference_to(Py::Float(u));
}
catch (Base::RuntimeError& e) {
catch (Base::CADKernelError& e) {
PyErr_SetString(PartExceptionOCCError, e.what());
return 0;
}