From c99470376270db4ec4c925b952fa722e011377d6 Mon Sep 17 00:00:00 2001 From: Marcus Johansson Date: Wed, 15 Jun 2016 21:43:21 +0200 Subject: [PATCH] fix inconsistency in threshold calc parallel and angle calculations are only comparable at small angles, ignore possible symmetric polyhedron issues, these will be caught later --- src/symmetry.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/symmetry.c b/src/symmetry.c index d5c29e8..fb0455e 100644 --- a/src/symmetry.c +++ b/src/symmetry.c @@ -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){