add kd tree class

add mesh decimation algorithm
This commit is contained in:
wmayer
2017-11-14 11:37:30 +01:00
parent 7a755f0294
commit 3998eb964e
35 changed files with 5546 additions and 27 deletions

View File

@@ -51,6 +51,7 @@
#include "Core/Triangulation.h"
#include "Core/Trim.h"
#include "Core/Visitor.h"
#include "Core/Decimation.h"
#include "Mesh.h"
#include "MeshPy.h"
@@ -940,6 +941,12 @@ void MeshObject::smooth(int iterations, float d_max)
_kernel.Smooth(iterations, d_max);
}
void MeshObject::decimate(float fTolerance, float fReduction)
{
MeshCore::MeshSimplify dm(this->_kernel);
dm.simplify(fTolerance, fReduction);
}
Base::Vector3d MeshObject::getPointNormal(unsigned long index) const
{
std::vector<Base::Vector3f> temp = _kernel.CalcVertexNormals();