fixed bug in solve_ada
This commit is contained in:
parent
08ba0f75a5
commit
60917c6c1d
|
@ -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])
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user