This is a fork of FreeCAD that adds a unified workbench combining Sketch, Part Modeling (Features), and Assembly tools in one place — eliminating the need to switch between Sketcher, PartDesign, and Assembly workbenches during normal modeling workflows.
Goal: One workbench for the full modeling workflow (sketch → extrude → sketch on face → cut → assemble), plus quality-of-life enhancements.
Not a goal: Pixel-perfect SolidWorks UI replication. We borrow good ideas (unified toolbar, click-to-sketch-on-plane) but don't chase cosmetic similarity.
Mod/SolidWorksUI/— Unified workbench + sketch enhancementsInitGui.py— Workbench registration, global feature install, Auto Constrain commandsw_constraint_observer.py— Document observer for redundant constraint handling + auto-external triggersw_auto_external.py— Auto-project face edges as external geometrysw_sketch_commands.py— Sketch command wrappers (currently unused, kept for reference)sw_feature_commands.py— Feature command wrappers (currently unused, kept for reference)sw_utils.py— Shared helperstests/— Unit tests (27 tests, run viapixi run freecadcmd tests/run_tests.py)
.devcontainer/— Development container configuration.claude-workspace/— Persistent local workspace (gitignored, survives rebuilds)
The workbench is currently a minimal stub. Three features install globally at FreeCAD startup:
- Constraint redundancy observer — detects partially redundant constraints, shows popup dialog (or auto-removes based on preference)
- Auto-external geometry — projects solid face edges when sketching on a face
- Auto Constrain command (
sketcher_auto_constrain) — re-applies missing constraints after trimming
Known issue: When a sketch enters edit mode, FreeCAD forces a switch to the Sketcher workbench (via ViewProviderSketch.EditingWorkbench property). This needs to be solved for the unified workbench to work.
- VNC Desktop: Access at port 6080 (password:
freecad) - Run FreeCAD:
cd .freecad-env && pixi run freecad - Run headless:
cd .freecad-env && pixi run freecadcmd -c "import FreeCAD; ..." - Run tests:
pixi run freecadcmd Mod/SolidWorksUI/tests/run_tests.py - Workbench source: Edit files in
Mod/SolidWorksUI/, restart FreeCAD to reload
- App/Gui separation — App layer is GUI-independent. We only modify the Gui layer.
- Workbench system — Each workbench registers commands, toolbars, menus. Only one is active at a time. Switching workbenches replaces all toolbars/menus.
- Edit mode switching —
ViewProviderSketch::setEdit()reads theEditingWorkbenchproperty and activates that workbench. Default is"SketcherWorkbench". Setting to""prevents the switch, butProp_ReadOnlymay block Python writes. - Qt/PySide6 — GUI framework. Custom widgets use PySide6.
- Command system — Commands registered globally via
FreeCADGui.addCommand(). Available across workbenches if registered at import time. - Document observers —
FreeCAD.addDocumentObserver()registers callbacks for object creation/change/deletion. App-level, survives workbench switches.
- Remote:
github.com:abwagner/FreeCAD - Push:
GIT_SSH_COMMAND="ssh -i /workspaces/FreeCAD/.claude-workspace/github_ed25519 -o StrictHostKeyChecking=no" git push git@github.com:abwagner/FreeCAD.git main - Identity:
git config user.name "claude" && git config user.email "abaranwagner+claude@gmail.com"
# Run all 27 unit tests
pixi run freecadcmd Mod/SolidWorksUI/tests/run_tests.py
# Verify imports
pixi run freecadcmd -c "import sys; sys.path.insert(0, 'Mod/SolidWorksUI'); import sw_constraint_observer; import sw_auto_external; print('OK')"