diff --git a/geosolver/clsolver2D.py b/geosolver/clsolver2D.py index 4aaf58f..a3e5dab 100644 --- a/geosolver/clsolver2D.py +++ b/geosolver/clsolver2D.py @@ -622,9 +622,10 @@ def solve_ada(a, b, c, a_cab, d_ab, a_abc): p_a = vector.vector([0.0,0.0]) p_b = vector.vector([d_ab, 0.0]) dir_ac = vector.vector([math.cos(-a_cab),math.sin(-a_cab)]) - dir_bc = vector.vector([math.cos(math.pi-a_abc),math.sin(math.pi-a_abc)]) - dir_ac[1] = math.fabs(dir_ac[1]) - dir_bc[1] = math.fabs(dir_bc[1]) + dir_bc = vector.vector([math.cos(math.pi+a_abc),math.sin(math.pi+a_abc)]) + #used for 3D? + #dir_ac[1] = math.fabs(dir_ac[1]) + #dir_bc[1] = math.fabs(dir_bc[1]) if tol_eq(math.sin(a_cab), 0.0) and tol_eq(math.sin(a_abc),0.0): m = d_ab/2 + math.cos(-a_cab)*d_ab - math.cos(-a_abc)*d_ab p_c = vector.vector([m,0.0]) diff --git a/test/test.py b/test/test.py index f2d341a..7cf859b 100644 --- a/test/test.py +++ b/test/test.py @@ -967,8 +967,8 @@ def test2d(): #test(triple_double_triangle()) #test(dad_problem()) #test(add_problem()) - #test(ada_problem()) - test(aad_problem()) + test(ada_problem()) + #test(aad_problem()) if __name__ == "__main__": test2d()