Commit 1adaac77 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'poissonrecon_check' into 'master'

avoid infinite looping if the input points are invalid (fixes #2)

fix for issue #2 

Skip input points that are out of bounds or have invalid normals. If there is no valid input point, abort processing.

See merge request !2
parents d0f671b0 4bbe0c5e
......@@ -51,6 +51,12 @@ run( std::vector< Real >& _pt_data, MeshT& _mesh, const Parameter& _parameter )
int pointCount = tree.setTreeMemory( _pt_data , m_parameter.Depth , m_parameter.MinDepth , m_parameter.Depth , Real(m_parameter.SamplesPerNode),
m_parameter.Scale , m_parameter.Confidence , m_parameter.PointWeight , m_parameter.AdaptiveExponent , xForm );
if (pointCount <= 0)
{
std::cerr << "Invalid Input Points" << std::endl;
return false;
}
std::cerr << "Tree Clipping" << std::endl;
tree.ClipTree();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment