|
@@ -1882,27 +1882,45 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
|
|
|
if not FlatCAMObj.plot(self):
|
|
if not FlatCAMObj.plot(self):
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
- try:
|
|
|
|
|
- _ = iter(self.solid_geometry)
|
|
|
|
|
- except TypeError:
|
|
|
|
|
- self.solid_geometry = [self.solid_geometry]
|
|
|
|
|
-
|
|
|
|
|
try:
|
|
try:
|
|
|
# Plot excellon (All polygons?)
|
|
# Plot excellon (All polygons?)
|
|
|
if self.options["solid"]:
|
|
if self.options["solid"]:
|
|
|
- for geo in self.solid_geometry:
|
|
|
|
|
- self.add_shape(shape=geo, color='#750000BF', face_color='#C40000BF', visible=self.options['plot'],
|
|
|
|
|
- layer=2)
|
|
|
|
|
|
|
+ for tool in self.tools:
|
|
|
|
|
+ for geo in self.tools[tool]['solid_geometry']:
|
|
|
|
|
+ self.add_shape(shape=geo, color='#750000BF', face_color='#C40000BF', visible=self.options['plot'],
|
|
|
|
|
+ layer=2)
|
|
|
else:
|
|
else:
|
|
|
- for geo in self.solid_geometry:
|
|
|
|
|
- self.add_shape(shape=geo.exterior, color='red', visible=self.options['plot'])
|
|
|
|
|
- for ints in geo.interiors:
|
|
|
|
|
- self.add_shape(shape=ints, color='green', visible=self.options['plot'])
|
|
|
|
|
|
|
+ for tool in self.tools:
|
|
|
|
|
+ for geo in self.tools[tool]['solid_geometry']:
|
|
|
|
|
+ self.add_shape(shape=geo.exterior, color='red', visible=self.options['plot'])
|
|
|
|
|
+ for ints in geo.interiors:
|
|
|
|
|
+ self.add_shape(shape=ints, color='green', visible=self.options['plot'])
|
|
|
|
|
|
|
|
self.shapes.redraw()
|
|
self.shapes.redraw()
|
|
|
except (ObjectDeleted, AttributeError):
|
|
except (ObjectDeleted, AttributeError):
|
|
|
self.shapes.clear(update=True)
|
|
self.shapes.clear(update=True)
|
|
|
|
|
|
|
|
|
|
+ # try:
|
|
|
|
|
+ # _ = iter(self.solid_geometry)
|
|
|
|
|
+ # except TypeError:
|
|
|
|
|
+ # self.solid_geometry = [self.solid_geometry]
|
|
|
|
|
+ #
|
|
|
|
|
+ # try:
|
|
|
|
|
+ # # Plot excellon (All polygons?)
|
|
|
|
|
+ # if self.options["solid"]:
|
|
|
|
|
+ # for geo in self.solid_geometry:
|
|
|
|
|
+ # self.add_shape(shape=geo, color='#750000BF', face_color='#C40000BF', visible=self.options['plot'],
|
|
|
|
|
+ # layer=2)
|
|
|
|
|
+ # else:
|
|
|
|
|
+ # for geo in self.solid_geometry:
|
|
|
|
|
+ # self.add_shape(shape=geo.exterior, color='red', visible=self.options['plot'])
|
|
|
|
|
+ # for ints in geo.interiors:
|
|
|
|
|
+ # self.add_shape(shape=ints, color='green', visible=self.options['plot'])
|
|
|
|
|
+ #
|
|
|
|
|
+ # self.shapes.redraw()
|
|
|
|
|
+ # except (ObjectDeleted, AttributeError):
|
|
|
|
|
+ # self.shapes.clear(update=True)
|
|
|
|
|
+
|
|
|
# try:
|
|
# try:
|
|
|
# # Plot excellon (All polygons?)
|
|
# # Plot excellon (All polygons?)
|
|
|
# if self.options["solid"]:
|
|
# if self.options["solid"]:
|
|
@@ -4118,6 +4136,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|
|
self.ui.plot_cb.setChecked(True)
|
|
self.ui.plot_cb.setChecked(True)
|
|
|
self.ui_connect()
|
|
self.ui_connect()
|
|
|
|
|
|
|
|
|
|
+
|
|
|
class FlatCAMCNCjob(FlatCAMObj, CNCjob):
|
|
class FlatCAMCNCjob(FlatCAMObj, CNCjob):
|
|
|
"""
|
|
"""
|
|
|
Represents G-Code.
|
|
Represents G-Code.
|