Commit 8107e687 authored by sumpfralle's avatar sumpfralle

fixed the direction of the waterline


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@642 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 5c349899
......@@ -215,9 +215,9 @@ class Model(BaseModel):
for t in self._triangles:
collision_line = plane.intersect_triangle(t)
if not collision_line is None:
# check direction of line - the lines should run clockwise
# check direction of line - the lines should run anti-clockwise
cross = plane.n.cross(collision_line.dir)
if cross.dot(t.normal) < 0:
if cross.dot(t.normal) > 0:
# revert the direction of the line
collision_line = Line(collision_line.p2, collision_line.p1)
collision_lines.append(collision_line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment