- added an ugly form of extra pad passes functionality in Isolation Plugin - does not take into consideration the milling direction
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
latCAM BETA (c) 2019 - by Marius Stanciu
|
FlatCAM BETA (c) 2019 - by Marius Stanciu
|
||||||
Based on FlatCAM:
|
Based on FlatCAM:
|
||||||
2D Computer-Aided PCB Manufacturing by (c) 2014-2016 Juan Pablo Caram
|
2D Computer-Aided PCB Manufacturing by (c) 2014-2016 Juan Pablo Caram
|
||||||
=================================================
|
=================================================
|
||||||
@@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta
|
|||||||
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
15.10.2021
|
||||||
|
|
||||||
|
- added an ugly form of extra pad passes functionality in Isolation Plugin - does not take into consideration the milling direction
|
||||||
|
|
||||||
14.10.2021
|
14.10.2021
|
||||||
|
|
||||||
- updated the translation strings
|
- updated the translation strings
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class Gerber(Geometry):
|
|||||||
# ## Gerber elements # ##
|
# ## Gerber elements # ##
|
||||||
'''
|
'''
|
||||||
tools = {
|
tools = {
|
||||||
'id':{
|
aperture_id:{
|
||||||
'type':string,
|
'type':string,
|
||||||
'size':float,
|
'size':float,
|
||||||
'width':float,
|
'width':float,
|
||||||
@@ -111,7 +111,7 @@ class Gerber(Geometry):
|
|||||||
'geometry': [],
|
'geometry': [],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tools['geometry'] list elements are dicts
|
tools[aperture_id]['geometry'] list elements are dicts
|
||||||
dict = {
|
dict = {
|
||||||
'solid': [],
|
'solid': [],
|
||||||
'follow': [],
|
'follow': [],
|
||||||
|
|||||||
@@ -1732,6 +1732,39 @@ class ToolIsolation(AppTool, Gerber):
|
|||||||
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Isolation geometry could not be generated."))
|
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Isolation geometry could not be generated."))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Extra Pads isolations
|
||||||
|
pad_geo = []
|
||||||
|
extra_passes = self.ui.pad_passes_entry.get_value()
|
||||||
|
if extra_passes > 0:
|
||||||
|
solid_geo_union = unary_union(iso_geo)
|
||||||
|
extra_geo = []
|
||||||
|
for apid in self.grb_obj.tools:
|
||||||
|
for t_geo_dict in self.grb_obj.tools[apid]['geometry']:
|
||||||
|
if isinstance(t_geo_dict['follow'], Point):
|
||||||
|
extra_geo.append(t_geo_dict['solid'])
|
||||||
|
|
||||||
|
for nr_pass in range(i, extra_passes + i):
|
||||||
|
pad_pass_geo = []
|
||||||
|
for geo in extra_geo:
|
||||||
|
iso_offset = tool_dia * ((2 * nr_pass + 1) / 2.0000001) - (
|
||||||
|
nr_pass * overlap * tool_dia)
|
||||||
|
if negative_dia:
|
||||||
|
iso_offset = -iso_offset
|
||||||
|
pad_pass_geo.append(
|
||||||
|
geo.buffer(iso_offset, int(self.app.defaults["gerber_circle_steps"])))
|
||||||
|
pad_geo.append(unary_union(pad_pass_geo).difference(solid_geo_union))
|
||||||
|
|
||||||
|
total_geo = []
|
||||||
|
try:
|
||||||
|
for p in iso_geo.geoms:
|
||||||
|
total_geo.append(p)
|
||||||
|
except (AttributeError, TypeError):
|
||||||
|
total_geo.append(iso_geo)
|
||||||
|
|
||||||
|
for p in pad_geo:
|
||||||
|
total_geo.append(p)
|
||||||
|
iso_geo = total_geo
|
||||||
|
|
||||||
# ############################################################
|
# ############################################################
|
||||||
# ########## AREA SUBTRACTION ################################
|
# ########## AREA SUBTRACTION ################################
|
||||||
# ############################################################
|
# ############################################################
|
||||||
@@ -2096,6 +2129,28 @@ class ToolIsolation(AppTool, Gerber):
|
|||||||
else:
|
else:
|
||||||
solid_geo.append(iso_geo)
|
solid_geo.append(iso_geo)
|
||||||
|
|
||||||
|
# Extra Pads isolations
|
||||||
|
pad_geo = []
|
||||||
|
extra_passes = self.ui.pad_passes_entry.get_value()
|
||||||
|
if extra_passes > 0:
|
||||||
|
solid_geo_union = unary_union(solid_geo)
|
||||||
|
extra_geo = []
|
||||||
|
for apid in self.grb_obj.tools:
|
||||||
|
for t_geo_dict in self.grb_obj.tools[apid]['geometry']:
|
||||||
|
if isinstance(t_geo_dict['follow'], Point):
|
||||||
|
extra_geo.append(t_geo_dict['solid'])
|
||||||
|
|
||||||
|
for nr_pass in range(passes, extra_passes + passes):
|
||||||
|
pad_pass_geo = []
|
||||||
|
for geo in extra_geo:
|
||||||
|
iso_offset = tool_dia * ((2 * nr_pass + 1) / 2.0000001) - (nr_pass * overlap * tool_dia)
|
||||||
|
if negative_dia:
|
||||||
|
iso_offset = -iso_offset
|
||||||
|
pad_pass_geo.append(geo.buffer(iso_offset, int(self.app.defaults["gerber_circle_steps"])))
|
||||||
|
pad_geo.append(unary_union(pad_pass_geo).difference(solid_geo_union))
|
||||||
|
|
||||||
|
solid_geo += pad_geo
|
||||||
|
|
||||||
# ############################################################
|
# ############################################################
|
||||||
# ########## AREA SUBTRACTION ################################
|
# ########## AREA SUBTRACTION ################################
|
||||||
# ############################################################
|
# ############################################################
|
||||||
@@ -2884,7 +2939,7 @@ class ToolIsolation(AppTool, Gerber):
|
|||||||
:type offset: float
|
:type offset: float
|
||||||
:param invert: If to invert the direction of geometry (CW to CCW or reverse)
|
:param invert: If to invert the direction of geometry (CW to CCW or reverse)
|
||||||
:type invert: int
|
:type invert: int
|
||||||
:param geometry: Shapely Geometry for which t ogenerate envelope
|
:param geometry: Shapely Geometry for which to generate envelope
|
||||||
:type geometry:
|
:type geometry:
|
||||||
:param env_iso_type: type of isolation, can be 0 = exteriors or 1 = interiors or 2 = both (complete)
|
:param env_iso_type: type of isolation, can be 0 = exteriors or 1 = interiors or 2 = both (complete)
|
||||||
:type env_iso_type: int
|
:type env_iso_type: int
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Usage: pip3 install -r requirements.txt
|
# Usage: pip3 install -r requirements.txt
|
||||||
|
|
||||||
numpy>=1.16
|
numpy>=1.16
|
||||||
matplotlib>=3.1
|
matplotlib>=3.4.5
|
||||||
cycler>=0.10
|
cycler>=0.10
|
||||||
python-dateutil>=2.1
|
python-dateutil>=2.1
|
||||||
kiwisolver>=1.1
|
kiwisolver>=1.1
|
||||||
@@ -16,7 +16,7 @@ pyopengl
|
|||||||
ortools>=7.0
|
ortools>=7.0
|
||||||
svg.path>=4.0
|
svg.path>=4.0
|
||||||
simplejson
|
simplejson
|
||||||
shapely>=1.7.0
|
shapely>=1.7.1
|
||||||
freetype-py
|
freetype-py
|
||||||
fontTools
|
fontTools
|
||||||
lxml
|
lxml
|
||||||
|
|||||||
Reference in New Issue
Block a user