then your config file is not anymore ksu-config.cfg but it is ksu-config.ini that you can find in

NB the new config file is in home user dir
Linux and OSX:
~/ which is $HOME
Windows:
%HOMEPATH%
Click kicad-StepUp-tools.FCMacro Config Button to display the ksu-config.ini file
and Help button for a quick Help
In case of any problem, just delete ksu-config.ini file and restart the kicad StepUp
tools… a new ini file will be generated
edit your 3D prefix and re-run the tools

novaktamas:

I also tried to uninstall FreeCad 0.16 and re-install 0.15: no success.

kicad StepUp is working fine with FC 0.15, 016 and latest 0.17
Please consider to download latest release:
just recently updated for new features…Latest Enhancements:STEP multi-part allowed (creating compound)EdgeCuts allowed for footprint that will generate Cuts in BoardPcb Edge as footprint allowededge tolerance on vertex coincidence for easier designing

deleted ksu-config.ini, then edited .ini just recreated
Now FreeCAD+script runs, but my project is not perfect yet:

My workflow is for a custom connector:

download STP from manufacturer (e.g Molex)

I load STP into Creo 3. When loading I can choose loading as an assembly (more parts) or a single part. I must select single part (or resulting WRL won’t be accepted). Then I save single-component model again as STP.

I load the modified (single component) STP into FreeCAD then export from FreeCAD to WRL.

Copy both single-component STP and new WRL to my packages3D directory (both the same name, and rename STP->STEP)

set Footprint properties/3D settings to my WRL (not with full path, but like ${KISYS3DMOD}/Connect.3dshapes/…WRL)

set scale/rotation/offset experimentally to look good

save footprint

change footprint to the new one in pcbnew.

Now 3d viewer shows the board perfectly (well aligned).

Then I want to export board to STEP for MCAD.

I start script in FreeCAD

Load kicad Board *.kicad_pcb
Script slowly draws components one-by one (abt 20 minutes!! is it normal?), but new component is not well positioned. Finally I got lots of “…WRL error: reset values of scale to (xyz 1 1 1 )” errors, which is an explanation to bad positioning.
Do you know what is the problem with my WRL’s?

Thanks again…I mean to create a new, more detailed workflow of using StepUp for you. I see much better, what a rookie doesn’t know/where are the traps:)))

Hi
You should use stepup to align the model to the footprint before exporting it to vrml
The position in kicad should be all zeros and the scale should be 1 1 1
Edit: shown here https://youtu.be/O6vr8QFnYGw

it highly depends on your models… I can assembly a board with hundred parts in about 30s…
Do you have the exportFusing = fuseAll option in your ksu-config.ini file? This is a time consuming option…

novaktamas:

(both the same name, and rename STP->STEP)

you don’t need to rename STP to STEP… the StepUp tools will search for .step, .stp, .iges, .igs

I would suggest to start easily with i.e. a single square board with a single footprint

with the recent StepUp release (since v3116) it is possible to align models in kicad pcbnew and assembly them correctly, but I would suggest to use this alternative workflow:
a) download STP from manufacturer (e.g Molex)
b) load STP into FreeCAD
c) analyze your 3D model to see if it is a SOLID or a collection of SURFACES
c1) if it is a SOLID just use the solid model
c2) if it is a collection of SURFACES make a compound of surfaces (Part WorkBench, Make compound)
d) load footprint in FreeCAD as @Shack suggested (‘Load kicad Footprint module’ button)
d1) NB footprint must have(model path/yourModel.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) )
‘z’ rotation is allowed if neededThat is what is also recommended for kicad library
e) align your model (SOLID or COMPOUND) using i.e. the StepUp tools to the footprint in FreeCAD
(That will allow you to align the model to your footprint in a mechanical environment… For most SMD models typically is enough to click on Rotate X if needed, Center X, Center Y , Put on Z buttons)
f) when aligned, click on the button ‘Export to kicad: STEP & scaled VRML’

copy both STEP and WRL models to your 3D DIR PATH

check if your model is fine both in footprint editor and pcbnew in kicad

run the script/macro

load the board using the ‘Load kicad PCB board’ button

check if everything is fine

if everything went fine, iterate the process for all the new models you need to add

Hoping to giving you the right road to obtain your pcb 3D model result
Maurice

it highly depends on your models… I can assembly a board with hundred parts in about 30s

Yes, the problem is surely with model complexity. I exported STEP from KiCAD, and it resulted a 700MB stp file…hard to swallow for my poor box:-). Stp downloaded from part manufacturer can be highly detailed. E.g. I have a stp for a switch where even internal metal and plastic structures are 100% detailed!! Is there a way to simplify those over-complicated models?

yes in fact… the best option would be to make a union of parts to obtain a single object fused … FC has some issues in fusing objects when they are coplanar and don’t have any common parts… sometimes is sufficient to move a part i.e. 10um (0.01mm) to be able to make a usable union of parts… or just try with PTCreo and check the result in FC
Anyway the latest release is supporting multi-part STEP models … to align those just use Part Make compound and align the compound… this it will be a bit time consuming when assembling the board, because the multipart, reloaded in FC will have to be re-elaborated as compound… so the fused object is the best option

novaktamas:

Is there a way to simplify those over-complicated models?

as @Joan_Sparky pointed out the simplest is to delete the sub-parts you don’t want in your MCAD sw
An other option is to use bounding boxes and i.e. height or volume constraint for parts you don’t consider useful for your mechanical design… then kicad StepUp will assembly only relevant parts and will substitute a part with its bounding box

Here an example of a board with small volume parts discarded, bounding boxes on internal parts, and connector as real STEP models

Hello all,
For those who are or will make new 3D models for Kicad:
In order to raise awareness, I created two tutorials that works as a reference and guide to understand and how to set proper materials to 3D models to be used in KiCad 3D-Viewer (or any other render)
The main scope are electronic components, VRML files, KiCad 3D-Viewer (current or any future version)
I've placed the documents in my cloud:
Let me know if I can assist you or help with any clarification!
Mario Lu…

Hi Mario @kammutierspule
would you mind to post the two Materials documents in LibreOffice format? ATM we linked the pdf, but then tey are not modifiable to add new materials
Then we could include them at the packages3D GH repo

Hi @Tech_JA
StepUp has started as a single macro file, so it is still a single file embedded in a FreeCAD workbench…
The idea to include a material list is a nice feature, but it will require to be compatible with both WB and Macro approach…

At the same time, if you have defined some nice materials, please post them here or at GH repo…
I could just add those to StepUp and update the suite for all users…

Well i separated the material definitions for the vrml export used in our cadquery scripts. (Not sure if my implementation is still used.)
It might be possible to use that part for stepup. But it will definitely require some work. I will not be able to look into this until after the v5 release. (And the list of things to do after the v5 release is already quite long.)

Hi @Jose_Eduardo_S_C_Xav if you are using the exported STEP and VRML models, probably you have a wrong z angle value on your pcb file... sometimes the model used in the pcb file (.kicad_pcb) has different x,y,z orientation values compared to the module used for orienting the model file (.kicad_mod) you can check it just opening your .kicad_pcb and .kicad_mod files in a text editor and search for the .wrl file name Kicad pcbnew doesn't have an automatic sync between module and board file 3d para…

Hoping this may help
You should check your footprint offset values in the pcbnew file compared to the one of the footprint used to align the STEP model. Moreover be sure to use the newly exported STEP file to be loaded in KiCad and not the original one.

Actually, I was using the Ubuntu repo version of Kicad (4.0.7) which I think still used .WRL file rather than STEP. However, I am reasonably sure that I am using either the .WRL or the new STEP file because a) they are in a different folder and b) the Y and Z values are spot on, which they certainly aren’t in the original model.

sometimes the model used in the pcb file (.kicad_pcb) has different x,y,z orientation values compared to the module used for orienting the model file (.kicad_mod)

But if I look in ${KISYS3DMOD} there is no /Connectors_DSub.3dshapes folder, so I assume that the .kicad_pcb overrides it?

Anyway, I think they are the same orientation.

Reading those two posts, I wondered if it is a mismatch between the current StepUp and the old version of Kicad, so I installed the nightly build but the problem remains.

However,

You should check your footprint offset values in the pcbnew file …

The new (nightly build) version of Kicad is really nice here. The 3D dialog includes a preview and I can force the connector to the correct position by setting the X offset to -1.3000 inches. After that Kicad 3D and StepUp import .kicad_pcb into FreeCAD are perfect!

After the upgrade and adjustment in the Kicad 3D dialog, the .kicad_pcb file looks like this: