Skip to content

Commit

Permalink
fix inconsistency in threshold calc
Browse files Browse the repository at this point in the history
parallel and angle calculations are only comparable at small angles,
ignore possible symmetric polyhedron issues, these will be caught later
  • Loading branch information
mcodev31 committed Jun 15, 2016
1 parent 5e34168 commit c994703
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/symmetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,21 +414,13 @@ msym_error_t findSymmetrySymmetricPolyhedron(msym_equivalence_set_t *es, double
vsub(v0,vi, v0i);
vnorm(v0i);

double tangle = fabs((fabs(dot0)-fabs(doti))/(fabs(dot0)+fabs(doti)));

if(!(tangle <= thresholds->angle)){
msymSetErrorDetails("Elements in symmetric polyhedron do not lie on two parallel circles %e > %e (angle threshold)",tangle,thresholds->angle);
ret = MSYM_SYMMETRY_ERROR;
goto err;
}
theta = vangle(v0_proj, vi_proj);

if(vparallel(v0i,ev[prim],thresholds->angle)){
if(theta < asin(thresholds->angle)){
sigma_h = 1;
staggered = 0;
}

theta = vangle(v0_proj, vi_proj);

if(dot0*doti > 0.0){
theta_sigma = theta/2;
if(LT(theta, 4*M_PI/es->length, asin(thresholds->angle)) && es->length % 4 == 0){
Expand Down

0 comments on commit c994703

Please sign in to comment.