This commit is contained in:
James E McClure 2018-09-14 16:09:59 -04:00
parent bbc5aaeb0f
commit 07538d26ad

View File

@ -365,9 +365,6 @@ double DECL::EdgeAngle(int edge)
U = TriNormal(edge); U = TriNormal(edge);
V = TriNormal(halfedge.twin(edge)); V = TriNormal(halfedge.twin(edge));
double dotprod=U.x*V.x + U.y*V.y + U.z*V.z; double dotprod=U.x*V.x + U.y*V.y + U.z*V.z;
if (dotprod > 1.f) dotprod=1.f;
if (dotprod < -1.f) dotprod=-1.f;
angle = acos(dotprod);
if (halfedge.twin(edge) < 0 ){ if (halfedge.twin(edge) < 0 ){
// compute projection onto plane // compute projection onto plane
W = U - dotprod*V; W = U - dotprod*V;
@ -380,6 +377,9 @@ double DECL::EdgeAngle(int edge)
//angle-=1.570796326794897; //angle-=1.570796326794897;
} }
else{ else{
if (dotprod > 1.f) dotprod=1.f;
if (dotprod < -1.f) dotprod=-1.f;
angle = acos(dotprod);
// triangle corners // triangle corners
int e2 = halfedge.next(edge); int e2 = halfedge.next(edge);
int e3 = halfedge.next(e2); int e3 = halfedge.next(e2);