Part: Expose Geometry::isSame() to Python

This commit is contained in:
wmayer
2024-11-19 22:46:17 +01:00
committed by wwmayer
parent 2819ca438e
commit ee18317e08
2 changed files with 22 additions and 0 deletions

View File

@@ -203,6 +203,20 @@ PyObject* GeometryPy::clone(PyObject *args)
return cpy;
}
PyObject* GeometryPy::isSame(PyObject *args)
{
PyObject* other {};
double tol {};
double angular {};
if (!PyArg_ParseTuple(args, "O!dd", &GeometryPy::Type, &other, &tol, &angular)) {
return nullptr;
}
Part::Geometry* geom = this->getGeometryPtr();
bool same = geom->isSame(*static_cast<GeometryPy*>(other)->getGeometryPtr(), tol, angular);
return Py::new_reference_to(Py::Boolean(same));
}
PyObject* GeometryPy::setExtension(PyObject *args)
{
PyObject* o;