I am new to KiCad and so I am still on the learning curve with it. Recently I tried importing a kicad_pcb file in to FreeCAD using fcad_pcb. I got this to work as expected once. Then I modified my pcb and tried to import the new one into FreeCAD the same way. It seemed to import okay. I then export from FreeCAD in an igs file format to import into my EM simulation app.
With the first board, the igs file imported as expected and I was able to run simulations of the board. With the modified board, when I imported the FreeCAD igs file, my EM simulation app saw multiple copies, like 3 or 4 of every object in the board: 3 - 4 copies of each trace, via, polygon region etc. By deleting all the redundant copies of each object, I was able to get the second board to work in the simulator as well.
After, this I went back to KiCad and tried to find a way to view each object in the KiCad project for the board. I had trouble finding any. I did find some clean up tools and use them to remove overlapping traces and polygon areas. I also ran the repair function, which reported zero problems with the board. I then tried again the importing process, and all the copies of the deleted objects were still there.
I am trying to figure out where the extraneous copies of objects are coming from. I believe it must be KiCad because there were copyies of polygon areas that I had deleted from the board present in the imported model in the EM app. So this kind of rules out FreeCAD and fcad_pcb from just making multilple copies of still existing objects in the pcb.
It would seem as though KiCad is keeping copies of all objects even deleted one in the project file. So, my question is, is there a way to permanently delete objects from a KiCad project file? Or, perhaps something else entirely is going on. Any thought would be helpful.
I’ve done several PCB FEM analysis in FreeCAD’s FEM Workbench.
A few things to consider:
IGS isn’t the best format to use. Prefer to use STEP
fcad_pcb isn’t the best Workbench to use for PCB’s. Prefer to use KiCadStepUp to export the PCB as STEP (if you made the PCB in Kicad). Can also import Pad/Traces…etc
Some Pref’s setting may help to ease the pain but I can’t comment re fcad_pcb (I hated it and I use KiCadStepUp - works perfect for FEM in FreeCAD)
IGS is the only format that FreeCAD exports that I’ve gotten to work import wise with my EM software. The step and stl file just come out as one sold block lacking any other features like traces and drill holes. I lack a clue where that’s going wrong.
Video below shows loading a PCB into KiCadStepUp followed up with an FEM from an older PCB FEM(done in FreeCAD). It was a small file that I used for testing and I left the graphics as they were last time I fooled with this file (so, forgive their uglyness).
Also, Note that I use Materials for PCB-Board and Copper (materials that I created)
FreeCAD has settings for STEP import that may be useful for you…
So, I used KicadStepUp to import my board. The resulting import failed to fill all the polygon regions on the board. When I used fcad_pcb to import, the polygon regions were filled as expected. Here are two small screen shots to show the difference.
With KicadStepUp the imported board also seems to lack drill holes in the dialectric and presumably the plating on the vias as well. Is there any was to get than into the import in FreeCAD?
Did you make the PCB in Kicad?
If not, do you have Gerber files?
StepUp has it’s own Pref’s settings (available when StepUp workbench is loaded). It also has Help tips Tab in it’s pref’s panel - please Read It as it has useful settings and tip’s.
Please post the Kicad File and the file you want to load into FreeCAD if it’s not a Kicad file. Gerber files, too…
I suspected not a Kicad file but, given OP seems to have been able to use KicadStepUp, it’s possible it is a Kicad file. If OP has Gerber’s and Not a Kicad file then, Kicad’s Gerbviewer can be used to push the Gerb’s to a new Kicad PCB…
The board was originally made in KiCad. The issue is rather importing into FreeCAD is why there seem to be multiple copies of all the objects in the board in the resulting import into my EM simulator. This seems to me that it could only originate from KiCad. I’ll see if I can reproduce the issue on a demo board for upload.
Update:
After delving into this a little more after making a new board and running it through the FreeCAD import and export process, I’ve come to the conclusion this is a non-issue. The fact is there is just a lot more objects in the export file to my EM simulator than what I need. There ends up being like 250 different objects for a tiny board with four traces two sets of pads for coaxial connectors, 8 double 0805 pads, and 8 vias.
With the coppers fusing process of fcad_pcb there ends up being four electrically separate sections of copper, with some top traces tied to the ground plane with vias. After deleting all the extraneous stuff, I end up with 5 objects in my simulation model. The fused coppers, which included the ground plane, three traces and the dielectric. That means I delete like 240 some extraneous objects from the EM simulator import.
At least knowing what to look for now, I can quickly find the objects I want to keep, rename them, and batch delete the rest. This last time I use fcad_pcb to import the KiCad file then exported in a step file. Which seemed to work somewhat more cleanly than with an iges file.
This sounds like a bug, could you provide your KiCad version (Help->About->Copy version), your FreeCAD version and StepUp version (it is printed in the dialog box when first opened) and maybe @maui could take a look at it. A small demo board demostrating the issuer wouldn´t hurt.
However, without this information there is not much it can be done.