improve mesh repair functions
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <Base/Builder3D.h>
|
||||
#include <Base/GeometryPyCXX.h>
|
||||
#include <Base/MatrixPy.h>
|
||||
#include <Base/Tools.h>
|
||||
|
||||
#include "Mesh.h"
|
||||
#include "MeshPy.h"
|
||||
@@ -1191,6 +1192,20 @@ PyObject* MeshPy::fixIndices(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* MeshPy::fixCaps(PyObject *args)
|
||||
{
|
||||
float fMaxAngle = Base::toRadians<float>(150.0f);
|
||||
float fSplitFactor = 0.25f;
|
||||
if (!PyArg_ParseTuple(args, "|ff", &fMaxAngle, &fSplitFactor))
|
||||
return NULL;
|
||||
|
||||
PY_TRY {
|
||||
getMeshObjectPtr()->validateCaps(fMaxAngle, fSplitFactor);
|
||||
} PY_CATCH;
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* MeshPy::fixDeformations(PyObject *args)
|
||||
{
|
||||
float fMaxAngle;
|
||||
@@ -1254,14 +1269,38 @@ PyObject* MeshPy::refine(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* MeshPy::removeSmallEdges(PyObject *args)
|
||||
PyObject* MeshPy::removeNeedles(PyObject *args)
|
||||
{
|
||||
float length;
|
||||
if (!PyArg_ParseTuple(args, "f", &length))
|
||||
return NULL;
|
||||
|
||||
PY_TRY {
|
||||
getMeshObjectPtr()->removeSmallEdges(length);
|
||||
getMeshObjectPtr()->removeNeedles(length);
|
||||
} PY_CATCH;
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* MeshPy::removeFullBoundaryFacets(PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
|
||||
PY_TRY {
|
||||
getMeshObjectPtr()->removeFullBoundaryFacets();
|
||||
} PY_CATCH;
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* MeshPy::mergeFacets(PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
|
||||
PY_TRY {
|
||||
getMeshObjectPtr()->mergeFacets();
|
||||
} PY_CATCH;
|
||||
|
||||
Py_Return;
|
||||
|
||||
Reference in New Issue
Block a user