Monthly Archives: November 2023

Cheatsheet: convert WRL to STEP with open-source tools

I had some electronic component models (obtained via easyeda2kicad) that I needed to convert to STEP so they’d show up when I brought a board using these models into FreeCAD with KicadStepUp. I tried doing the job in FreeCAD alone, but while WRL files are basically meshes (not too different in theory from STL files), FreeCAD’s mesh-to-shape conversion wanted nothing to do with them. I searched for

I ended up using Wings3D to convert from WRL to STL, and then used FreeCAD to convert from STL to STEP:

  1. Import the WRL file into Wings3D. Check the “swap X & Y axes” box and set the import scale to 2.54. Export to STL.
  2. Import the STL file you just created into FreeCAD.
  3. (optional) Switch to the mesh workbench and decimate the mesh (Meshes -> Decimation…).
  4. Switch to the part workbench, create a shape from the mesh (Part -> Create shape from mesh…, then make sure “sew shape” is checked), and convert the shape to a solid (Part -> Convert to solid).
  5. Export the solid to STEP.

These models definitely won’t look as nice as models created from a proper CAD workflow (you can even import from OpenSCAD, export that to STEP, and get something pretty decent), but if you just need a model of your PCB for mechanical integration, it’ll get the job done.