- fixed Extract Plugin not extracting soldermask for aperture macros
This commit is contained in:
@@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta
|
|||||||
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
19.09.2021
|
||||||
|
|
||||||
|
- fixed Extract Plugin not extracting soldermask for aperture macros
|
||||||
|
|
||||||
18.09.2021
|
18.09.2021
|
||||||
|
|
||||||
- some code reformatting in Extract Plugin
|
- some code reformatting in Extract Plugin
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ class ToolExtract(AppTool):
|
|||||||
|
|
||||||
with self.app.proc_container.new('%s...' % _("Working")):
|
with self.app.proc_container.new('%s...' % _("Working")):
|
||||||
try:
|
try:
|
||||||
self.app.app_obj.new_object("excellon", outname, obj_init)
|
self.app.app_obj.new_object("excellon", outname, obj_init, autoselected=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.log.error("Error on Extracted Excellon object creation: %s" % str(e))
|
self.app.log.error("Error on Extracted Excellon object creation: %s" % str(e))
|
||||||
return
|
return
|
||||||
@@ -686,7 +686,7 @@ class ToolExtract(AppTool):
|
|||||||
if square or rect:
|
if square or rect:
|
||||||
allowed_apertures.append('R')
|
allowed_apertures.append('R')
|
||||||
if other:
|
if other:
|
||||||
allowed_apertures.append('ELSE')
|
allowed_apertures.append('AM')
|
||||||
|
|
||||||
selection_index = self.ui.gerber_object_combo.currentIndex()
|
selection_index = self.ui.gerber_object_combo.currentIndex()
|
||||||
model_index = self.app.collection.index(selection_index, 0, self.ui.gerber_object_combo.rootModelIndex())
|
model_index = self.app.collection.index(selection_index, 0, self.ui.gerber_object_combo.rootModelIndex())
|
||||||
@@ -715,6 +715,8 @@ class ToolExtract(AppTool):
|
|||||||
new_apertures.pop(apid, None)
|
new_apertures.pop(apid, None)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# both the square and rectangular apertures share the same type: "R"
|
||||||
|
# through the below we distinguish between them
|
||||||
if ap_type == 'R':
|
if ap_type == 'R':
|
||||||
width = float(apid_value['width'])
|
width = float(apid_value['width'])
|
||||||
height = float(apid_value['height'])
|
height = float(apid_value['height'])
|
||||||
@@ -736,13 +738,14 @@ class ToolExtract(AppTool):
|
|||||||
new_follow_geometry.append(geo_el['follow'])
|
new_follow_geometry.append(geo_el['follow'])
|
||||||
if 'solid' in geo_el:
|
if 'solid' in geo_el:
|
||||||
buffered_solid = geo_el['solid'].buffer(clearance)
|
buffered_solid = geo_el['solid'].buffer(clearance)
|
||||||
new_solid_geometry.append(buffered_solid)
|
|
||||||
|
|
||||||
new_geo_el = {
|
new_geo_el = {
|
||||||
'solid': buffered_solid,
|
'solid': buffered_solid,
|
||||||
'follow': geo_el['follow']
|
'follow': geo_el['follow']
|
||||||
}
|
}
|
||||||
new_aper_geo.append(deepcopy(new_geo_el))
|
new_aper_geo.append(deepcopy(new_geo_el))
|
||||||
|
|
||||||
|
new_solid_geometry.append(buffered_solid)
|
||||||
|
|
||||||
new_apertures[apid]['geometry'] = deepcopy(new_aper_geo)
|
new_apertures[apid]['geometry'] = deepcopy(new_aper_geo)
|
||||||
|
|
||||||
has_geometry = False
|
has_geometry = False
|
||||||
@@ -773,7 +776,7 @@ class ToolExtract(AppTool):
|
|||||||
|
|
||||||
with self.app.proc_container.new('%s...' % _("Working")):
|
with self.app.proc_container.new('%s...' % _("Working")):
|
||||||
try:
|
try:
|
||||||
self.app.app_obj.new_object("gerber", outname, obj_init)
|
self.app.app_obj.new_object("gerber", outname, obj_init, autoselected=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error("Error on Extracted Soldermask Gerber object creation: %s" % str(e))
|
log.error("Error on Extracted Soldermask Gerber object creation: %s" % str(e))
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user