From 91e9c72357bea2637c623dc9cdf8a42339fbfac9 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 15 Jul 2022 17:39:33 +0200 Subject: [PATCH] Mesh: [skip ci] allow to set third parameter in Python wrapper --- src/Mod/Mesh/App/MeshPyImp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Mesh/App/MeshPyImp.cpp b/src/Mod/Mesh/App/MeshPyImp.cpp index 6525da3fcc..c39f5a3d54 100644 --- a/src/Mod/Mesh/App/MeshPyImp.cpp +++ b/src/Mod/Mesh/App/MeshPyImp.cpp @@ -1663,7 +1663,8 @@ PyObject* MeshPy::foraminate(PyObject *args) { PyObject* pnt_p; PyObject* dir_p; - if (!PyArg_ParseTuple(args, "OO", &pnt_p, &dir_p)) + double maxAngle = MeshCore::Mathd::PI; + if (!PyArg_ParseTuple(args, "OO|d", &pnt_p, &dir_p, &maxAngle)) return nullptr; try { @@ -1682,7 +1683,7 @@ PyObject* MeshPy::foraminate(PyObject *args) Py::Dict dict; for (f_it.Begin(); f_it.More(); f_it.Next(), index++) { - if (f_it->Foraminate(pnt, dir, res)) { + if (f_it->Foraminate(pnt, dir, res, static_cast(maxAngle))) { Py::Tuple tuple(3); tuple.setItem(0, Py::Float(res.x)); tuple.setItem(1, Py::Float(res.y));