I’ve been trying to setup the StepUp modules to export step files from FreeCad. I have FreeCad 0.17 installed on a Windows10 machine, and installed StepUp workbench through the add-on manager. I have updated my config file to match the 2 folders I am using. I have been able to pull in my footprints, align component models and export the step/wrl files without issue. When I try to pull in a PCB file though, I’m getting this error:
Running the Python command ‘ksuToolsOpenBoard’ failed:
Traceback (most recent call last):
File “C:\Users\Caleb Hunt\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUpCMD.py”, line 103, in Activated
kicadStepUptools.onLoadBoard()
File “C:\Users\Caleb Hunt\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUptools.py”, line 6926, in onLoadBoard
mypcb = KicadPCB.load(name) #test parser
File “C:\Users\Caleb Hunt\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUptools.py”, line 1485, in load
return KicadPCB(parseSexp(f.read()))
File “C:\Users\Caleb Hunt\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUptools.py”, line 1365, in parseSexp
assert stack, “Trouble with nesting of brackets”
Does the board open in kicad without problems? (As the error is reported by the kicad file parser there might be a problem in the board file.)
I sometimes get a python exception with stepup. Until now simply importing it again fixed everything up. (So either there is some sort of raise condition or the order of some operations is not quite right.)
When importing a footprint make sure you have a project open.
Thank you for your reply, Rene_Poschl. The board seems to open without issue in KiCad, I should have included that in my original post.
Does the stepup created .step and .wrl filename have to match the KiCad footprint name exactly or anything critical that I might have missed in the setup guide? Or do I just need to make sure that I have attached the correct .wrl file to the footprintin KiCad?
Hi @drawing_lines
it seems the kicad_pcb parser is getting an issue…
Does your board use kicad official footprints or it is using different sources (i.e. SparkFun)?
Could you please send me the kicad_pcb file in PM to see what is the issue?
I remember I had a similar issue once… I need to see if I can recall it…
Maurice
Hi @drawing_lines
I made a small update that should improve compatibility with non official footprint sources…
please have a try updating the StepUp WB from FreeCAD
OK, so I’ve gotten it almost working, but I can’t seem to point the ksu-config.ini file to the correct folder for my step/wrl files. Here’s the error… Can you help me with this last issue?
So I copied my kicad_pcb file over to the same folder where I have my models, and it seems to have worked… Seems to be adding the board folder location as a prefix to the folder I had entered in the .ini file?
Configure StepUp tools
To use StepUp tools for converting a kicad_pcb Board to a mechanical STEP model you just need to edit ‘ksu-config.ini’ 3D prefix path assigning it to your KISYS3DMOD value,
‘ksu-config.ini’ file is in %Homepath% (Win) or $HOME (OSX & Linux) folder.
and from the ini file:
[prefix3D]
prefix3d_1 = c:\program files\kicad\share\kicad\modules\packages3d
prefix3d_2 = c:\extra_packages3d
;; put here your kisys3dmod path or 3d model prefix path or 3d alias
;; only two prefixs are allowed; must finish with slash or backslash
;prefix3d_1 = c:\program files\kicad\share\kicad\modules\packages3d
;prefix3d_1 = kicad/share/modules/packages3d/
;prefix3d_2 = c:\extra_packages3d\
Which is your ${KISYS3DMOD} prefix for Kicad?
Do you have a separate library for extra 3D models? Which is its prefix?
Configure your paths in the config file and you should be fine…
I verified that both are the correct folder locations. The error seems indicate that the root directory from where the kicad_pcb file is located is being included in the prefix (C:\Users\Caleb Hunt\Documents\Design Files\Cineo\Daughter Board\Cineo Daughter Board)?
When I copy the kicad_pcb file into my folder C:\Users\Caleb Hunt\Documents\Design Files\CAD Library\ and run stepup from that file, it seems to work without issue. But if I run it from the original folder location listed above, it is giving me the errors. At least I have a work-around.
but have you defined those path also on kicad?
from the file you sent me I can see:
(model ${KISYS3DMOD}/Connectors_Molex.3dshapes/Molex_PicoBlade_53261-1771_17x1.25mm_Angled.wrl
So I imagine you should have this folder setup: C:\Program Files\KiCad\share\kicad\modules\packages3d\Connectors_Molex.3dshapes\Molex_PicoBlade_53261-1771_17x1.25mm_Angled.wrl
(model "../../../../../../Users/Caleb Hunt/Documents/Design Files/CAD Library/TE #8-188275-6_FINAL.wrl"
then it seems you haven’t configured a secondary 3D folder (Alias) in KiCad ‘Paths’ like in your case something like:
CADLibrary C:\Users\Caleb Hunt\Documents\Design Files\CAD Library\