- fixed an if/else selection in the AppObject.on_object_created() that made the plotting of CNCJob objects to be done twice and second time will disregard the Plot Kind Preference value

This commit is contained in:
Marius Stanciu
2020-11-07 14:37:49 +02:00
committed by Marius
parent 93555a134e
commit cccc5634c9
5 changed files with 8 additions and 7 deletions

View File

@@ -6795,8 +6795,7 @@ class CNCjob(Geometry):
try:
# if the geos are travel lines
if geo['kind'][0] == 'T':
poly = geo['geom'].buffer(distance=(tooldia / 1.99999999),
resolution=self.steps_per_circle)
poly = geo['geom'].buffer((tooldia / 1.99999999), self.steps_per_circle)
else:
poly = Polygon(geo['geom'])
@@ -6806,9 +6805,10 @@ class CNCjob(Geometry):
continue
else:
# plot the geometry of any objects other than Excellon
poly = geo['geom'].buffer(distance=(tooldia / 1.99999999), resolution=self.steps_per_circle)
poly = geo['geom'].buffer((tooldia / 1.99999999), self.steps_per_circle)
poly = poly.simplify(tool_tolerance)
# Plotting the shapes
if kind == 'all':
obj.add_shape(shape=poly, color=color[geo['kind'][0]][1], face_color=color[geo['kind'][0]][0],
visible=visible, layer=1 if geo['kind'][0] == 'C' else 2)