KiCad StepUp New exporter for 3D MCAD (feedbacks are welcome)

Probably in Sw there are options to choose in which way you want to add/merge a STEP file (assembly) into a document… May be this can be solved just tweaking those options…

In FC if you just open a KiCAD board with kSU, and then you will open a new one, two different docs will be created… copying the second board into the first doc FC will automatically adapt the Names avoiding identical Name for the doc objects…
Then if you will export Board_1 and Board_2 from the same doc, you shouldn’t have any interference with the two Pcbs in Sw, also within your actual import setting.

Thanks, when I’ll have more data, I will be able to see how I could avoid your issue…

When i use my KiCAD-PCB Models in SW i first open the exported Step as a Multi-body part, then combining it to one solid chunk. If i remember correctly, this can be a pain because all parts are floating above the PCB. I think a layer is not imported correctly. On easy shapes it’s a quick fix, create a sketch on the pcb surface and extrude it like .2mm into the direction of the parts. After that you can combine everything. That said i haven’t used a multi pcb setup in SW so far.

I have a valid license for SW19, let me know if i can help somehow.

@gsocker
I’ve updated StepUp WB adding the following features:

  • allowing Opening or Importing a kicad_pcb file inside a FreeCAD file
  • generating uid for pcb & containers-
  • full support fo App::Part Links
  • full Hierarchy allowed for importing & assembling a pcb
  • pcb as solid instead of compsolid
  • multiple pcb allowed
  • apply Transparency option (from .wrl model materials)
  • added a warning message for GridOrigin missing on pcbnew file

Please update the WB and test if your issue is solved.

.

@Detzi I haven’t received any similar issues on SW…
Anyway, would you please update the WB and test if your issue is solved?

2 Likes

Sorry @maui i’d totally forgotten you :sweat:
I do not use the workbench or am not aware of that. What i do is i click on File->Export->Step in PCBnew (Kicad Version: (5.1.4)-1, release build ) the output is this file:
sample.7z (448.1 KB) i had to compress it, it’s bigger than the filesize limit.

If you look closely you can see that there is a gap between components and PCB presumably its the copper layer thats missing. I don’t think its tied to solidworks either since Freecad does display the same thing:

Then this might be the wrong thread to post to. After all this is a thread for announcing improvements made with the freecad extension “kicad-stepup”. That extension can directly import a kicad pcbnew file. (You do not go through the export stp step within kicad when using stepup)

I posted here in the first place to describe a general workflow to @gsocker as an answer to his question.
The other post i made today has the only purpose to give feedback to @maui since he asked for it. So i actually think its the right place, isn’t it?

I’ve updated StepUp WB adding the following features:

  • allowing Opening or Importing a kicad_pcb file inside a FreeCAD file
  • generating uid for pcb & containers-
  • full support fo App::Part Links
  • full Hierarchy allowed for importing & assembling a pcb
  • pcb as solid instead of compsolid
  • multiple pcb allowed
  • apply Transparency option (from .wrl model materials)
  • added a warning message for GridOrigin missing on pcbnew file

Please update the WB and test if your issue is solved.

@maui
Yes, it does fix the issue. I was doing the equivalent of the UID additions using the part number. Multiple boards now import correctly with no additional steps.
Thanks

1 Like

Hi @maui
Not sure if I’m doing something wrong. Let me explain

In FC (0.19 appimage on Ubuntu), I imported the ver 5.1.6 .kicad_pcb file to work on making the enclosure.
Then, I decided that the push button switch needs to be 13mm tall instead of 5mm.
Went back to KiCad, in push button properties, 3D settings, I replaced the 5mm tall 3d model with the 13mm tall one.
But now I can’t figure out how to update this change in FC.
I tried various ways but nothing worked.
If I delete the .kicad_pcb file in FC project, and try importing it again, it opens up in a new FC project, instead of being added to the current one I’m working on.
So I end up with one FC project file containing the unfinished enclosure but without the .kicad_pcb and a second FC project file containing the updated .kicad_pcb file, but not the FC enclosure part.

Got any tips ?

Hi @Anool

In FC, instead of using ‘File Open’ menu, use ‘File Import’ menu… this will load the kicad_pcb inside the same active document you are working on.
Moreover, if you have changed only some model, you can just pull only those inside your FC document updating the design (but this requires a bit more work).

1 Like

use ‘File Import’ menu…

duh, facepalm !!!

pull only those inside your FC document updating the design (but this requires a bit more work).

I’d like to know how this works.

‘File Import’ feature for ksu has been added not so long time ago, before it was simply working as ‘File Open’; before the only way was to copy and paste the loaded pcb.

this is available through push-pull FC-KC collaboration.
If a fp has been changed in KC, you need to sync the 3D model with the Ref & TimeStamp in KC
some tips here:


Hi Maui
since you introduced me to this workbench, I’m using it. although I noticed that it doesn’t import the footprints from the kicad PCB file nor any 3D models of the used components.

So:
I click on “Load Board” and I import the KiCAD PCB and it returns hese errors.
I think it’ because it goes to check on C:\program files\kicad while everything is on K:\Kicad
How can I change it?

Moreover: each time it pops up the window that tells the suggested Import/Export STEP FreeCAD Preferences that I already set up as suggested.

here below the error message and the final result.

Version 10.20.3
FreeCAD 0.21.1
image

EDIT ok found. I added the new path on Preferences. it worked partially out. It’s not necessary to remove the default one. Just by adding as alternate, solved the adding of components. Still all the footprints are missing (except for one and I have not clue why)

image

here the one not found but there is:
image

Hi @tormyvancool

  1. it is strange you don’t get the pads… Could you please share the kicad_pcb file (even in PM if required)?
  2. in your error log it seems you have a defined variable that is used in wrong mode
    ${KICAD_USER_LIBRARIES_DIR}=“K:/KiCad/user_libraries/Tormy.Components/3D SHAPES”
    but then your model has:
    ${KICAD_USER_LIBRARIES_DIR}/Tormy.Components/3D SHAPES/Inductor Chocke TDK-Part.step
    which would result in a wrong path:
    “K:/KiCad/user_libraries/Tormy.Components/3D SHAPES/Tormy.Components/3D SHAPES/Inductor Chocke TDK-Part.step”

hello Maui

I’m thinking how to send you the PCB file since it contains a project that shouldn’t be given in any way … I will find a way just please geve me time to think about.

About the variable. Here how I set it up in FreeCAD (the alternative paths were components can be found)
image

here how the variable is setup in KiCAD
image

This path is the correct path
“K:/KiCad/user_libraries/Tormy.Components/3D SHAPES/Tormy.Components/3D SHAPES/Inductor Chocke TDK-Part.step” the .STEP is correctly in it … but it seems it doesn’t find it

is the double inside path correct?

Tormy.Components/3D SHAPES/Tormy.Components/3D SHAPES/

Correct observation.

you’re right. the double is not correct. What’s causing this? I posted the screenshots out the settings on FreeCAD and the ones on KiCAD

You need to check the path inside kicad_pcb file editing the footprint which has the 3d model:
Inductor Chocke TDK-Part.step

Ok here it is. The path is correct and the shape there is.

with the var you defined in FC kSU (third 3D folder)
${KICAD_USER_LIBRARIES_DIR}=“K:/KiCad/user_libraries/Tormy.Components/3D SHAPES”
this path is resulting in the double path;

You should have defined the path in kSU, as in kicad:
${KICAD_USER_LIBRARIES_DIR}=“K:/KiCad/user_libraries"

ok indeed it worked now. I was fooled by the default setting. I thought I had to make it identical.

now: all the shapes are in (thanks to your help) … but the footprints are still missing.

EDIT: I see that by clicking the button Load Footprint, it asks for a .kicad_mod file … that I haven’t clue where to find it and/or if I have to load N .kicad_mod.If I have to go to load each footprint each time is absurd. But it’s just my assumption here.