Commit b2e237cd authored by lode_leroy's avatar lode_leroy

fix verticals

git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@18 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 8e361d19
...@@ -44,9 +44,9 @@ class DropCutter: ...@@ -44,9 +44,9 @@ class DropCutter:
else: else:
pa.append(Point(cl_max.x,cl_max.y,cl_last.z)) pa.append(Point(cl_max.x,cl_max.y,cl_last.z))
elif (t_max and t_last and cl_last and cl_max ) and (t_max != t_last): elif (t_max and t_last and cl_last and cl_max ) and (t_max != t_last):
nxl = t_last.normal().x nxl = -t_last.normal().x
nzl = t_last.normal().z nzl = t_last.normal().z
nxm = t_max.normal().x nxm = -t_max.normal().x
nzm = t_max.normal().z nzm = t_max.normal().z
xl = cl_last.x xl = cl_last.x
zl = cl_last.z zl = cl_last.z
...@@ -56,7 +56,7 @@ class DropCutter: ...@@ -56,7 +56,7 @@ class DropCutter:
X = (zl-zm+(xm*nxm/nzm+xl*nxl/nzl))/(nxm/nzm+nxl/nzl) X = (zl-zm+(xm*nxm/nzm+xl*nxl/nzl))/(nxm/nzm+nxl/nzl)
Y = cl_last.y Y = cl_last.y
Z = zl + (X-xl)*nxl/nzm Z = zl + (X-xl)*nxl/nzm
if xl > X and X < xm: if xl < X and X < xm:
pa.append(Point(X,Y,Z)) pa.append(Point(X,Y,Z))
except: except:
pass pass
......
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