Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

Commit a8449583 authored by Sylvain Thery's avatar Sylvain Thery
Browse files

bug mergeCloseVertices (pb possible avec petit maillage)

parent 69cbf02a
......@@ -1195,24 +1195,24 @@ bool MeshTablesSurface<PFP>::mergeCloseVertices()
newIndices[i] = 0xffffffff;
// compute EPSILON: average length of 50 of 100 first edges of first faces divide by 10000
int nb = 100;
if (m_nbEdges.size()< 100)
nb = m_nbEdges.size();
// compute EPSILON: average length of 50 of 100 first edges of faces divide by 10000 (very very closed)
unsigned int nbf = 100;
if (nbf> m_nbFaces)
nbf = m_nbFaces;
int k=0;
typename PFP::REAL d=0;
for (int i=0; i< nb; i+=2)
double d=0;
for (unsigned int i=0; i< nbf;++i)
typename PFP::VEC3 e1 = positions[m_emb[k+1]] - positions[m_emb[k]];
d += e1.norm();
d += double(e1.norm());
k += m_nbEdges[i];
d /= float(nb/2);
typename PFP::REAL EPSILON = d/10000.0f;
d /= double(nbf);
typename PFP::REAL EPSILON = d/10000.0;
// traverse vertices
for (unsigned int i = positions.begin(); i != positions.end();
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