Commit 62a21957 authored by sumpfralle's avatar sumpfralle

simplified the PolygonCutter code


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@167 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 90a0fe85
...@@ -26,20 +26,12 @@ class PolygonCutter: ...@@ -26,20 +26,12 @@ class PolygonCutter:
def finish(self): def finish(self):
self.pe.finish() self.pe.finish()
paths = [] paths = []
source_paths = []
if self.pe.hor_path_list: if self.pe.hor_path_list:
for path in self.pe.hor_path_list: source_paths.extend(self.pe.hor_path_list)
points = path.points
for i in range(0, (len(points)+1)/2):
p = Path()
if i % 2 == 0:
p.append(points[i])
p.append(points[-i-1])
else:
p.append(points[-i-1])
p.append(points[i])
paths.append(p)
if self.pe.ver_path_list: if self.pe.ver_path_list:
for path in self.pe.ver_path_list: source_paths.extend(self.pe.ver_path_list)
for path in source_paths:
points = path.points points = path.points
for i in range(0, (len(points)+1)/2): for i in range(0, (len(points)+1)/2):
p = Path() p = Path()
......
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