fix bug about angle thresholding
This commit is contained in:
parent
d4f5f73324
commit
96a8e0e08f
|
|
@ -123,6 +123,7 @@ public:
|
|||
params.stat.Reset();
|
||||
|
||||
if(cb) cb(100*i/params.iter, "Remeshing");
|
||||
|
||||
if(params.splitFlag)
|
||||
SplitLongEdges(toRemesh, params);
|
||||
|
||||
|
|
@ -134,12 +135,12 @@ public:
|
|||
CollapseShortEdges(toRemesh, params);
|
||||
CollapseCrosses(toRemesh, params);
|
||||
}
|
||||
|
||||
if(params.smoothFlag)
|
||||
ImproveByLaplacian(toRemesh, params);
|
||||
if(params.projectFlag)
|
||||
ProjectToSurface(toRemesh, t, mark);
|
||||
|
||||
printf("%4i %7i split %7i swap %7i collapse\n",i,params.stat.splitNum, params.stat.flipNum, params.stat.collapseNum);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +155,8 @@ private:
|
|||
static inline bool testCreaseEdge(PosType &p, ScalarType creaseCosineThr)
|
||||
{
|
||||
ScalarType angle = fastAngle(NormalizedTriangleNormal(*(p.F())), NormalizedTriangleNormal(*(p.FFlip())));
|
||||
return (angle <= creaseCosineThr && angle >= -creaseCosineThr);
|
||||
return angle <= creaseCosineThr;
|
||||
// return (angle <= creaseCosineThr && angle >= -creaseCosineThr);
|
||||
}
|
||||
// this stores in minQ the value of the 10th percentile of the VertQuality distribution and in
|
||||
// maxQ the value of the 90th percentile.
|
||||
|
|
@ -277,6 +279,7 @@ private:
|
|||
(newDist == oldDist && qNew > qOld * 1.f) || qNew > 1.5f * qOld;
|
||||
}
|
||||
|
||||
|
||||
// Edge swap step: edges are flipped in order to optimize valence and triangle quality across the mesh
|
||||
static void ImproveValence(MeshType &m, Params ¶ms)
|
||||
{
|
||||
|
|
@ -399,7 +402,7 @@ private:
|
|||
Point3<ScalarType> oldN = NormalizedTriangleNormal(*(pi.F()));
|
||||
Point3<ScalarType> newN = Normal(mp, v1->P(), v2->P()).Normalize();
|
||||
float div = fastAngle(oldN, newN);
|
||||
if(AngleN(oldN,newN) > math::ToRad(1.0)) return false;
|
||||
// if(AngleN(oldN,newN) > math::ToRad(1.0)) return false;
|
||||
if(div <= params.creaseAngleCosThr )
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue