- fixed Tcl Command AddPolygon, AddPolyline

This commit is contained in:
Marius Stanciu 2019-08-25 21:33:46 +03:00 committed by Marius
parent eedfb56bf5
commit 65ab17e308
3 changed files with 5 additions and 2 deletions

View File

@ -17,6 +17,7 @@ CAD program, and create G-Code for Isolation routing.
- added new capability in NCC Tool when the reference object is of Gerber type and fixed some newly introduced errors
- fixed issue #298. The changes in postprocessors done in Preferences dis not update the object UI layout as it was supposed to. The selection of Marlin postproc. did not unhidden the Feedrate Rapids entry.
- fixed minor issues
- fixed Tcl Command AddPolygon, AddPolyline
24.08.2019

View File

@ -55,7 +55,8 @@ class TclCommandAddPolygon(TclCommandSignaled):
if len(unnamed_args) % 2 != 0:
self.raise_tcl_error("Incomplete coordinates.")
points = [[float(unnamed_args[2*i]), float(unnamed_args[2*i+1])] for i in range(len(unnamed_args)/2)]
nr_points = int(len(unnamed_args) / 2)
points = [[float(unnamed_args[2*i]), float(unnamed_args[2*i+1])] for i in range(nr_points)]
obj.add_polygon(points)
obj.plot()

View File

@ -55,7 +55,8 @@ class TclCommandAddPolyline(TclCommandSignaled):
if len(unnamed_args) % 2 != 0:
self.raise_tcl_error("Incomplete coordinates.")
points = [[float(unnamed_args[2*i]), float(unnamed_args[2*i+1])] for i in range(len(unnamed_args)/2)]
nr_points = int(len(unnamed_args) / 2)
points = [[float(unnamed_args[2*i]), float(unnamed_args[2*i+1])] for i in range(nr_points)]
obj.add_polyline(points)
obj.plot()