- done regression to solve the bug with multiple passes cutting from the copper features (I should remember not to make mods here)
- if 'combine' is checked in Gerber isolation but there is only one pass, the resulting geometry will still be single geo - the 'passes' entry was changed to a IntSpinner so it will allow passes to be entered only in range (1, 999) - it will not allow entry of 0 which may create some issues
This commit is contained in:
@@ -983,7 +983,12 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
|
||||
|
||||
if empty_cnt == len(geo_obj.solid_geometry):
|
||||
raise ValidationError("Empty Geometry", None)
|
||||
geo_obj.multigeo = True
|
||||
|
||||
# even if combine is checked, one pass is still singlegeo
|
||||
if passes > 1:
|
||||
geo_obj.multigeo = True
|
||||
else:
|
||||
geo_obj.multigeo = False
|
||||
|
||||
# TODO: Do something if this is None. Offer changing name?
|
||||
self.app.new_object("geometry", iso_name, iso_init)
|
||||
|
||||
@@ -9,6 +9,12 @@ CAD program, and create G-Code for Isolation routing.
|
||||
|
||||
=================================================
|
||||
|
||||
12.08.2019
|
||||
|
||||
- done regression to solve the bug with multiple passes cutting from the copper features (I should remember not to make mods here)
|
||||
- if 'combine' is checked in Gerber isolation but there is only one pass, the resulting geometry will still be single geo
|
||||
- the 'passes' entry was changed to a IntSpinner so it will allow passes to be entered only in range (1, 999) - it will not allow entry of 0 which may create some issues
|
||||
|
||||
11.08.2019
|
||||
|
||||
- small changes regarding the Project Title
|
||||
|
||||
26
camlib.py
26
camlib.py
@@ -554,22 +554,18 @@ class Geometry(object):
|
||||
if follow:
|
||||
geo_iso = self.follow_geometry
|
||||
else:
|
||||
if corner is None:
|
||||
try:
|
||||
__ = iter(self.solid_geometry)
|
||||
for el in self.solid_geometry:
|
||||
geo_iso.append(el.buffer(offset, int(int(self.geo_steps_per_circle) / 4)))
|
||||
except TypeError:
|
||||
geo_iso = [self.solid_geometry.buffer(offset, int(int(self.geo_steps_per_circle) / 4))]
|
||||
if isinstance(self.solid_geometry, list):
|
||||
temp_geo = cascaded_union(self.solid_geometry)
|
||||
else:
|
||||
try:
|
||||
__ = iter(self.solid_geometry)
|
||||
for el in self.solid_geometry:
|
||||
geo_iso.append(el.buffer(offset, int(int(self.geo_steps_per_circle) / 4),
|
||||
join_style=corner))
|
||||
except TypeError:
|
||||
geo_iso = [self.solid_geometry.buffer(offset, int(int(self.geo_steps_per_circle) / 4),
|
||||
join_style=corner)]
|
||||
temp_geo = self.solid_geometry
|
||||
|
||||
# Remember: do not make a buffer for each element in the solid_geometry because it will cut into
|
||||
# other copper features
|
||||
if corner is None:
|
||||
geo_iso = temp_geo.buffer(offset, int(int(self.geo_steps_per_circle) / 4))
|
||||
else:
|
||||
geo_iso = temp_geo.buffer(offset, int(int(self.geo_steps_per_circle) / 4),
|
||||
join_style=corner)
|
||||
|
||||
# end of replaced block
|
||||
if follow:
|
||||
|
||||
@@ -4092,7 +4092,8 @@ class GerberOptPrefGroupUI(OptionsGroupUI):
|
||||
"number (integer) of tool widths.")
|
||||
)
|
||||
grid0.addWidget(passlabel, 1, 0)
|
||||
self.iso_width_entry = IntEntry()
|
||||
self.iso_width_entry = FCSpinner()
|
||||
self.iso_width_entry.setRange(1, 999)
|
||||
grid0.addWidget(self.iso_width_entry, 1, 1)
|
||||
|
||||
# Pass overlap
|
||||
|
||||
@@ -276,7 +276,8 @@ class GerberObjectUI(ObjectUI):
|
||||
)
|
||||
passlabel.setMinimumWidth(90)
|
||||
grid1.addWidget(passlabel, 1, 0)
|
||||
self.iso_width_entry = IntEntry()
|
||||
self.iso_width_entry = FCSpinner()
|
||||
self.iso_width_entry.setRange(1, 999)
|
||||
grid1.addWidget(self.iso_width_entry, 1, 1)
|
||||
|
||||
overlabel = QtWidgets.QLabel(_('Pass overlap:'))
|
||||
|
||||
Reference in New Issue
Block a user