- fixed error when creating CNCJob due of having the annotations disabled from preferences but the plot2() function from camlib.CNCJob class still performed operations who yielded TypeError exceptions

This commit is contained in:
Marius Stanciu 2019-08-17 06:12:27 +03:00
parent bc6b2666cd
commit 0131fb7700
2 changed files with 7 additions and 4 deletions

View File

@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
17.08.2019
- added estimated time of routing for the CNCJob and added travelled distance parameter for geometry, too
- fixed error when creating CNCJob due of having the annotations disabled from preferences but the plot2() function from camlib.CNCJob class still performed operations who yielded TypeError exceptions
17.08.2019

View File

@ -6596,10 +6596,12 @@ class CNCjob(Geometry):
if geo['kind'][0] == 'C':
obj.add_shape(shape=poly, color=color['C'][1], face_color=color['C'][0],
visible=visible, layer=1)
obj.annotation.set(text=text, pos=pos, visible=obj.options['plot'],
font_size=self.app.defaults["cncjob_annotation_fontsize"],
color=self.app.defaults["cncjob_annotation_fontcolor"])
try:
obj.annotation.set(text=text, pos=pos, visible=obj.options['plot'],
font_size=self.app.defaults["cncjob_annotation_fontsize"],
color=self.app.defaults["cncjob_annotation_fontcolor"])
except Exception as e:
pass
def create_geometry(self):
# TODO: This takes forever. Too much data?