extend mesh repair functions

This commit is contained in:
wmayer
2019-03-13 01:39:27 +01:00
parent 51aeb5867a
commit 4e018c506b
14 changed files with 289 additions and 56 deletions

View File

@@ -1128,6 +1128,15 @@ void MeshObject::refine()
this->_segments.clear();
}
void MeshObject::removeSmallEdges(float length)
{
unsigned long count = _kernel.CountFacets();
MeshCore::MeshRemoveSmallEdges eval(_kernel, length);
eval.Fixup();
if (_kernel.CountFacets() < count)
this->_segments.clear();
}
void MeshObject::optimizeTopology(float fMaxAngle)
{
MeshCore::MeshTopoAlgorithm topalg(_kernel);
@@ -1411,8 +1420,8 @@ void MeshObject::validateDeformations(float fMaxAngle, float fEps)
{
unsigned long count = _kernel.CountFacets();
MeshCore::MeshFixDeformedFacets eval(_kernel,
Base::toRadians(30.0f),
Base::toRadians(120.0f),
Base::toRadians(15.0f),
Base::toRadians(150.0f),
fMaxAngle, fEps);
eval.Fixup();
if (_kernel.CountFacets() < count)