3D Models - conversion to WRL

Hi,

I have imported a number of 3D models into my KiCad board designs by downloading the component from 3D Content Central in .STEP format, and using freeCAD to convert to WRL.

However, this does not always appear to work.

In particular, I have been trying to import some Arduino Nano V3 models into KiCad. 3D ContentCentral generates the .STEP file, and freeCAD will import this and render it correctly.

However, when I export from freeCAD as a VRML 2.0 file (.wrl), when I associate it with the footprint in PCBNew and render using the 3D Viewer, nothing displays.

I can get them to render by downloading from 3D Content Central in the .STL format, and using Wings3D to convert to .WRL, but this loses the texture / colour information.

Does anybody have any suggestions as to what might be going wrong?

Well there is not a lot of detail to go on here. Maybe add a screenshot from within freecad that shows the model as you try to export it as wrl.

I have investigated further, and It looks like this may be a freeCAD export issue, rather than anything to do with KiCad.

This is the model after it has been downloaded from 3DContentCentral and imported into freeCAD. It renders correctly, including colours etc.

When exporting from freeCAD, you can select which elements to include in the export. As it is quite a complex model, there are well over 100 elements - here I have selected just the first 10 elements to include in the VRML 2.0 export:

If I export just a few elements, the resulting .WRL file will render those elements correctly in KiCad’s 3D Viewer:

Looking at the size of the .WRL file, as I include more elementrs in the export, the file size continues to grow until it reaches about 4.2Mb and then, as I select another element to include in the export, the resulting .WRL file size drops to around 400k, and fails to render in KiCad’s 3D Viewer.

So, it looks like there is some sort of complexity limit after which freeCAD fails to export correctly.

By choosing just certain elements to export, I can get a model that looks good enough for my purposes, but it would be interesting to know if there is another, more reliable way of converting a whole model from STEP to WRL?

you may consider to have a try with kicad StepUp

You might also want to check the model geometry. The model checker can be found as part of the part workbench.

@maui, I downloaded StepUp, but it wasn’t obvious how to do a STEP to WRL conversion - it seemed more aimed at the other way round - exporting boards in .STEP format? I will give it another try.

By Selecting just the visible elements from the top surface, I can get something that is good enough for my current purposes and @Rene_Poschl I will run it through the Model Checker too.

please have a look at the cheat sheet pgg. 1-3 … it should point out quite straight to the 3d model to step & wrl exporting

It still looks as though you are expecting freeCAD to export as .WRL and it is this that doesn’t work as soon as the complexity of the model increases? It is the step highlighted in Yellow which is not working unless I select just a few elements

Aligning with the footprint is not the issue.

you need to select what you want to export and then click on the export icon…


you may also make a compound of the model using the appropriate button:

1 Like

@maui many thanks for your help. This now works!

For the benefit of others, I did the following:

  1. Macro directory below the default freeCAd install, here: C:/Program Files/FreeCAD 0.16/Macro
  2. Browsed to it from the Macro->Macros menu in freeCAD
  3. copied kicad-StepUp-tools.FCMacro to that location
  4. Imported the STEP file I downloaded from 3D Content Central
  5. Selected all Elements
  6. Executed the Macro
  7. Clicked on the Export to Kicad macro you described above
  8. Accepted all defaults

The resulting .WRL file imports and renders correctly in KiCad’s 3d Viewer.

Thanks again!

1 Like

Did you download the old version of stepup?
The new version is a workbench. It can be directly installed via the freecad addon manager (freecad 0.17)

Or you need to copy the workbench directory (kicadStepUpMod) into the freecad system directory (C:/Program Files/FreeCAD 0.16/Mod)

1 Like

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