realthunder / fcad_pcb

FreeCAD scripts for PCB CAD/CAM
MIT License
126 stars 25 forks source link

loading tracks error on LinkBranch and TNP V1 #61

Closed easyw closed 1 year ago

easyw commented 1 year ago

Hi, I'm having an issue in loading tracks with FC TN v1 and Link Branch here the error I get:

19:02:40  making tracks...
19:02:40    making 351 tracks  of width 0.60, (0/2880)
19:02:40  Traceback (most recent call last):
  File "C:/Cad/Progetti_K/3D-FreeCad-tools/fcad_pcb_minimal.py", line 21, in <module>
    pcb.makeTracks(shape_type='face',fit_arcs=True,thickness=0.05,holes=False)
  File "d:fcad_pcb\kicad.py", line 1840, in makeTracks
    objs.append(func(edges,label=label))
  File "d:fcad_pcb\kicad.py", line 1785, in _face
    return _wire(edges,label,True)
  File "d:fcad_pcb\kicad.py", line 1782, in _wire
    return _line(edges,label,width*0.5,fill)
  File "d:fcad_pcb\kicad.py", line 1777, in _line
    wires = findWires(edges)
  File "d:fcad_pcb\kicad.py", line 341, in findWires
    return [Part.Wire(e) for e in Part.sortEdges(edges)]
  File "d:fcad_pcb\kicad.py", line 341, in <listcomp>
    return [Part.Wire(e) for e in Part.sortEdges(edges)]
<class 'Part.OCCError'>: class StdFail_NotDone BRep_API: command not done

and the code I use:

import PySide
from PySide import QtGui, QtCore
import sys,os
sys.path.append(r"d:")
import fcad_pcb
from fcad_pcb import kicad
import importlib
importlib.reload(kicad)
from kicad_parser import KicadPCB
filename= r"D:\Temp\infinitas.kicad_pcb" #"Your-full-path-to-kicad-pcbnew-file"
pcb = kicad.KicadFcad(filename,via_skip_hole=False,via_bound=1)
pcb.setLayer(0) #'F.Cu')
# pcb.makeZones(shape_type='face',thickness=0.05, fit_arcs=True,holes=True)
#coppers = pcb.makeCoppers(shape_type='solid', holes=True, fuse=True)
pcb.makeTracks(shape_type='face',fit_arcs=True,thickness=0.05,holes=False)
# pcb.makeBoard()

and the test file: infinitas-pcb.zip

Please note this issue is not present on FC main branch (0.20.1 or 0.21)

easyw commented 1 year ago

@realthunder it seems the issue is still present here some detail https://forum.freecadweb.org/viewtopic.php?f=44&t=73254&p=640814#p640814

easyw commented 1 year ago

I can confirm it is solved w/ FC LinkBranch 2022.11.28

Thanks as always :)