i am an idiot

This commit is contained in:
James E McClure 2018-09-15 11:01:51 -04:00
parent ae774f3e8d
commit 130b2f823a
2 changed files with 3 additions and 4 deletions

View File

@ -206,7 +206,7 @@ void Minkowski::ComputeScalar(const DoubleArray Field, const double isovalue)
a1 = object.EdgeAngle(e1);
a2 = object.EdgeAngle(e2);
a3 = object.EdgeAngle(e3);
Ji += 0.16666666666666*(a1*s1+a2*s2+a3*s3);
Ji += (a1*s1+a2*s2+a3*s3);
//if (0.08333333333333*(a1*s1+a2*s2+a3*s3) < 0.f){
//double intcurv=0.08333333333333*(a1*s1+a2*s2+a3*s3);
//double surfarea=sqrt(s*(s-s1)*(s-s2)*(s-s3));

View File

@ -385,7 +385,7 @@ double DECL::EdgeAngle(int edge)
V.x = nx/length; V.y = ny/length; V.z = nz/length;
dotprod = U.x*V.x + U.y*V.y + U.z*V.z;
if (dotprod < 0.f){
printf("negative dot product on face\n");
//printf("negative dot product on face\n");
dotprod=-dotprod;
V.x = -V.x; V.y = -V.y; V.z = -V.z;
}
@ -423,8 +423,7 @@ double DECL::EdgeAngle(int edge)
// concave
angle = -angle;
}
printf("angle=%f,dot=%f (Edge=%i, twin=%i): P={%f, %f, %f}, Q={%f, %f, %f} U={%f, %f, %f}, V={%f, %f, %f}\n",angle,dotprod,edge,halfedge.twin(edge),P.x,P.y,P.z,Q.x,Q.y,Q.z,U.x,U.y,U.z,V.x,V.y,V.z);
//printf("angle=%f,dot=%f (Edge=%i, twin=%i): P={%f, %f, %f}, Q={%f, %f, %f} U={%f, %f, %f}, V={%f, %f, %f}\n",angle,dotprod,edge,halfedge.twin(edge),P.x,P.y,P.z,Q.x,Q.y,Q.z,U.x,U.y,U.z,V.x,V.y,V.z);
return angle;
}