realthunder / fcad_pcb

FreeCAD scripts for PCB CAD/CAM
MIT License
129 stars 24 forks source link

makePads, makeTracks, makeZones fail if no holes in pcb #46

Closed easyw closed 3 years ago

easyw commented 3 years ago

this is a marginal user case, but using the following commands to create the objects, fcad_pcb is failing: pcb.makePads(shape_type='face',thickness=0.05,holes=True,fit_arcs=True) pcb.makeTracks(shape_type='face',fit_arcs=True,thickness=0.05,holes=True pcb.makeZones(shape_type='face',thickness=0.05, fit_arcs=True,holes=True)

Traceback (most recent call last):
  File "d:fcad_pcb-test-3.py", line 76, in <module>
    pcb.makePads(shape_type='face',thickness=0.05,holes=True,fit_arcs=True)
  File "d:fcad_pcb\kicad.py", line 1662, in makePads
    objs = self._cutHoles(objs,holes,'pads',fit_arcs=fit_arcs)
  File "d:fcad_pcb\kicad.py", line 1503, in _cutHoles
    return self._makeArea(objs,name,op=1,label=label,fit_arcs=fit_arcs)
  File "d:fcad_pcb\kicad.py", line 939, in _makeArea
    ret.Sources = obj
<class 'TypeError'>: type must be 'DocumentObject', list of 'DocumentObject', or NoneType, not list

Antenna-test-design.zip