How to properly convert a manufacturers *.igs model into a KiCad 3d model?

Hi there,
I’m using the FreeCAD + KiCadStepUp combination not very often and I am an absolute beginner to it,
but I am at least able to create simple forms of SMD & THT components and export them to KiCad to use as components 3D-models there.

Now I ran into a problem with a 3D-Model in igs format applied by the manufacturer → https://www.knitter-switch.com/var/pms/group-7/DRS%203x16.zip
(it’s a rotary hex-coded switch THT from “Knitter”)
where I always end up having a “partially transparent” model within KiCad …

so what you get when opening this *.igs file from Knitter (https://24max.de/temp/DRS%203x16.igs) is basically a list of (5) compounds, right ?

So I did the following workflow (not knowing better):

  • give material-properties and colour to each of the compounds → save as FreeCAD project (https://24max.de/temp/DRS3016_coloured.FCStd)
  • load a footprint via KiCadStepUp into Freecad
  • combine the 5 compounds to a single compound so that I can move and place the 3D-Part properly on the footprint (result: https://24max.de/temp/DRS3016_coloured_kicad.FCStd)
  • export this single compound via the KiCadStepUp “export to kicad” button (result: https://24max.de/temp/DRS3016.wrl)
  • open this *.wrl within Windows10 3D-Viewer, just to check → everything looks right (nothing is transparent or missing)
  • assign this *.wrl to the footprint in KiCad → what I get there is a “partially transparent” model or to be more precise: a model with missing surfaces / shapes

result: https://24max.de/temp/result.jpg

How can I avoid that ?
what would be the correct workflow instead ?


KiCad 6.04
FreeCAD 0.19
Windows 10 pro 64

To make it easier for others, Here is your result.jpg:

What I did:

  1. Dowload & extract your igs.
  2. Open it in FreeCAD.
  3. Create a Part in FreeCAD.
  4. Put the 5 parts in that new part.
    image
  5. Select the “Knitter” part and FreeCAD / File / Export / Step with Colors
  6. Attach it to some (unrelated) Footprint in KiCad and put it on a PCB.

Result:

I did not change any color or material properties in FreeCAD, nor did I use StepUp.

The bright green color is a bit weird in the export I did but the part is not transparent and looks normal.
So I assume it is something you did with changing the material properties and colors.

so finally I found out now (how to get a proper *.wrl with the chosen material-properties and colours)

right at the beginning you have to convert this 5 compounds into “solids” (with the command “parts” → “convert to solid”),
then delete the original compounds out of the part,
the rest of my workflow above works just fine then …
(don’t use “union” or “boolean” or “join” for the 5 single “solids” in this case)

1 Like

the intended workflow in KiCad is IMHO to have always both WRL and STEP,
(WRL is for shiny raytracing and STEP for the proper mechanical postprocessing e.g. fitting the pcb into an enclosure)
therefore you find each and every model within the stock KiCad libraries twice: as WRL and STEP with the same filename.
and for the same reason KiCadStepUp always creates 2 models WRL and STEP with the same filename, when re-exporting the parts model to KiCad …

In the KiCad PCB you now assign a WRL-model to each part,
(in the KiCad stock parts libraries this is normally done aready)
shiny 3D-view and raytracing guaranteed (with reflective material properties and all that…)

now if you want to export the whole PCB as STEP (for other CAD tasks - e.g. fitting the pcb into an enclosure), you can do this by using the STEP-Models for each part,
you just have to check the checkbox “substitute similar named models” in the STEP-export dialog in KiCad (-> see attachment).
KiCad then replaces (ony for the export) every WRL model with its STEP model of the same name (if present),
I think this is what you want …

I think you don’t have to do it …
just take care that every WRL-model has a STEP equivalent with the very same filename,
then you have all possibilities…

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.