Yet some other changes to the stat collecting functions for computing the average edge lenght on a mesh.
This commit is contained in:
parent
3d956d8b48
commit
87d01da58f
|
@ -252,11 +252,17 @@ class Stat
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
static ScalarType ComputeFaceEdgeAverage(MeshType & m)
|
||||
{
|
||||
Distribution<float> h;
|
||||
ComputeFaceEdgeDistribution(m,h);
|
||||
return h.Avg();
|
||||
double sum=0;
|
||||
for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
|
||||
if(!(*fi).IsD())
|
||||
{
|
||||
for(int i=0;i<3;++i)
|
||||
sum+=double(Distance<float>(fi->P0(i),fi->P1(i)));
|
||||
}
|
||||
return sum/(m.fn*3.0);
|
||||
}
|
||||
|
||||
}; // end class
|
||||
|
|
Loading…
Reference in New Issue