realthunder wrote: ↑Mon Mar 20, 2017 1:08 pm
easyw-fc wrote:Is there a repo to test i.e. converting a kicad board with tracks like in your attached image pcb_combo?
I'll add the document soon. I'm currently doing some optimization on path sorting for PCB milling. You can try my repo with any kicad_pcb file. Some pad shapes are not implemented yet, e.g. trapezoid pad. If you encounter any error, please send me your kicad_pcb file. I can try to fix it. No technical layers support yet (silkscreen and stuff), but it should be trivial to add. Here is a brief instruction.
First, you will need the latest 0.17 snapshot of FreeCAD.
Clone my
repo into your freecad macro directory. After clone, cd to fcad_pcb, and checkout the submodules
Code: Select all
git submodule update --init --recursive
Start FreeCAD, in the console, the simplest usage,
Code: Select all
form fcad_pcb import kicad
pcb = kicad.KicadFcad(<full_path_to_your_kicad_pcb_file>)
pcb.makeCoppers()
You will get all copper layers as faces. The copper merges together all the pads, tracks, and zones. You can extrude those faces to solid using Part Extrude feature. Or, select the copper item in treeview, and click 'make path from shape' button in Path workbench to convert to gcode. The copper item is a Path.FeatureArea, so you can mess around with offset and stuff to get PCB milling.
You can make single copper layer by
Code: Select all
pcb.setLayer('F.Cu')
pcb.makeCopper()
You can also makePads, makeZones, makeTracks, separately.
If you want holes, add holes=True into any of the above method calls, e.g.
And if you want the whole PCB board in 3D,
make() internally calls makePads, makeZones and makeTracks to get separate faces, and extrude them into separator solids. If you have matching step files at the same location as your vml model files, the make command will load those models as well. You can checkout my various 3dshapes repository containing the step files in github (which I used your StepUp script to generate, and also the cadquery repo, BTW
). If you don't have those model files, then you'll get a bare board with all the tracks, pads, and zones, with holes. Maybe that's what you want.