Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kicadStepUpCMD.py
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,8 @@ def Activated(self):
## sk = Draft.make_sketch(s.Edges, autoconstraints=True)
kicadStepUptools.sanitizeSketch(sketch.Name)
FreeCAD.ActiveDocument.recompute()
sk = Draft.make_sketch(sketch, autoconstraints=True)
# match the labels, append a suffix to avoid duplicates in the tree and remove later
sk = Draft.make_sketch(sketch, autoconstraints=True, name=f'{sketch.Label}_{kicadStepUptools.__name__}')
sk_obj = FreeCAD.ActiveDocument.ActiveObject
FreeCAD.ActiveDocument.recompute()
FreeCADGui.Selection.clearSelection()
Expand Down
6 changes: 4 additions & 2 deletions kicadStepUptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -21185,16 +21185,18 @@ def pushFillZone(skn, ofs, keepout=None):
segments_nbr=len(edges)
if segments_nbr<3:
stop
skn = skn or ""
if skn.endswith(f'_{__name__}'): skn = skn[:-len(f'_{__name__}')]
if 'Fill' in keepout:
fillzone = """ (zone (net 0) (net_name "") (layer """+keepout[:1]+""".Cu) (tstamp 0) (hatch edge 0.508)"""+os.linesep
fillzone = """ (zone (net 0) (net_name "") (layer """+keepout[:1]+""".Cu) (tstamp 0) (name \""""+skn+"""\") (hatch edge 0.508)"""+os.linesep
fillzone+=""" (connect_pads (clearance 0.508))"""+os.linesep
fillzone+=""" (min_thickness 0.254)"""+os.linesep
fillzone+=""" (fill yes (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508))"""+os.linesep
fillzone+=""" (polygon"""+os.linesep
elif 'Mask' in keepout:
fillzone = """ (gr_poly"""+os.linesep
elif 'KeepOut' in keepout: #keepout zone
fillzone = """ (zone (net 0) (net_name "") (layers """+keepout[:1]+""".Cu) (tstamp 0) (hatch edge 0.508)"""+os.linesep
fillzone = """ (zone (net 0) (net_name "") (layers """+keepout[:1]+""".Cu) (tstamp 0) (name \""""+skn+"""\") (hatch edge 0.508)"""+os.linesep
fillzone+=""" (connect_pads (clearance 0.508))"""+os.linesep
fillzone+=""" (min_thickness 0.254)"""+os.linesep
fillzone+=""" (keepout (tracks not_allowed) (vias not_allowed) (copperpour not_allowed))"""+os.linesep
Expand Down