r/FreeCAD • u/tik-etak • 19h ago
SolidWorks files in FreeCAD with sketches: OpenSW addon (.SLDPRT, .SLDASM, .SLDDRW)
I know there is already a good plugin that opens SolidWorks parts and assemblies in FreeCAD (djbarrow's freecad_solidworks_plugin). It brings the solids, but I was working on my own code at the same time and I wanted the sketches too, so I vibecoded this with Claude:
https://github.com/cehaho/OpenSW-FreeCAD
The sketches come with the part
- Every planar sketch arrives as a real Sketcher sketch placed on its own plane in the model: lines, arcs, circles, ellipses and splines, with construction geometry marked as such.
- Each one is named after the feature that uses it, e.g. `Sketch1 (Boss-Extrude1)`, so you can tell which profile made which shape.
- 3D sketches arrive as edges (FreeCAD has no 3D sketch).
- They all sit in one `Sketches` folder next to the bodies, so you can pad, pocket or revolve them again in FreeCAD, or just measure the original profile.
What they don't have is constraints or dimensions: the file is read for where the points are, not for what holds them there. You get the geometry of the sketch, ready to be constrained again.
The rest
- Parts: the exact B-rep solids from the Parasolid data in the file, one object per body, colours kept.
- Assemblies each instance placed; exact when the part files sit next to the .SLDASM, the stored display mesh otherwise. The parts' sketches come along, placed per instance.
- Drawings (.SLDDRW each sheet as flat geometry you can measure, with its texts.
No feature history is rebuilt: solids arrive like a STEP import.
Install
Not in the official addon index yet. Preferences > Addon Manager > Custom repositories, add the URL above with branch `main`, install "OpenSW", restart.
Caveats
Tested on FreeCAD 1.1.3 on Windows only. Pure Python, one dependency (olefile, which FreeCAD ships), so Linux and macOS should work but are untried. If a file fails, loses a body or misplaces a sketch, please tell me.
AGPL-3.0. Not affiliated with Dassault Systèmes, no SolidWorks code inside.
Built on https://github.com/cehaho/OpenSW, which also has a viewer that runs entirely in the browser.
