Skip to content

Commit

Permalink
adding fp_rect to footprint loader
Browse files Browse the repository at this point in the history
  • Loading branch information
easyw committed May 20, 2023
1 parent a36f602 commit 0534245
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#* Kicad STEPUP (TM) is a TradeMark and cannot be freely usable *
#* *

ksu_wb_version='v 10.19.2'
ksu_wb_version='v 10.19.3'
global myurlKWB, ksuWBpath
myurlKWB='https://github.com/easyw/kicadStepUpMod'
global mycommitsKWB
mycommitsKWB=601 # v10.19.2
mycommitsKWB=602 # v10.19.3
global verKSU
verKSU="10.8.7"

Expand Down
17 changes: 16 additions & 1 deletion kicad_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


# from kicadStepUptools import KicadPCB,SexpList
__kicad_parser_version__ = '2.2.8'
__kicad_parser_version__ = '2.2.9'
# https://github.com/realthunder/fcad_pcb/issues/20#issuecomment-586042341
# FreeCAD.Console.PrintLog('kicad_parser_version '+__kicad_parser_version__+'\n') # maui
# print('kicad_parser_version '+__kicad_parser_version__)
Expand Down Expand Up @@ -2146,6 +2146,21 @@ def _face(edges,label):
#self._makeShape(m, 'fp', ws)
except:
pass
for j,l in enumerate(m.fp_rect):
if unquote(l.layer) == self.layer:
#print(j,l)
try: #avoiding null lenght lines
rc=Part.Wire(make_gr_rect(l))
ws.append(rc)
if hasattr(l,'stroke'):
#print(l.stroke.width)
width = l.stroke.width
else:
width = l.width
for e in rc.Edges:
wst.append(makeThickLine(makeVect([e.Vertexes[0].X,-e.Vertexes[0].Y]),makeVect([e.Vertexes[1].X,-e.Vertexes[1].Y]),width/2.0))
except:
pass
for j,a in enumerate(m.fp_arc):
if unquote(a.layer) == self.layer:
#print(j,l.start)
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package format="1" xmlns="https://wiki.freecad.org/Package_Metadata">
<name>KicadStepUp Workbench</name>
<description>A bidirectional ECAD/MCAD collaboration between KiCAD and FreeCAD.</description>
<version>10.19.2</version>
<version>10.19.3</version>
<maintainer email="[email protected]">Maui</maintainer>
<license file="LICENSE">AGPLv3.0</license>
<url type="repository" branch="master">https://github.com/easyw/kicadStepUpMod</url>
Expand Down

0 comments on commit 0534245

Please sign in to comment.