OCP FreeCAD CAM
Project description
Overview
oc-freecad-cam exposes FreeCAD's Path workbench in a fluent python API that takes OCP TopoDS_Shape objects and their wrappers from CadQuery and Build123d to enable generating parametric tool paths from the comfort of your keyboard.
Usage
See documentation at https://ocp-freecad-cam.readthedocs.io/en/latest/
Installation
ocp-freecad-cam does not attempt to install runtime dependencies. Your environment must have available CadQuery and/or Build123d, or just OCP if you're feeling raw.
ocp-freecad-cam requires currently a relatively fresh build of FreeCAD, ie. weekly build from https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds
The Path module of FreeCAD has seen major refactorings in 2023 so older versions are not compatible.
Runtime dependencies summary
Dev dependecies
Dev dependencies are listed in requirements-dev.txt, generated from requirements-dev.in with pip-compile
Using FreeCAD AppImage
Weekly AppImage is an easy way to get started. Download the AppImage, place it in a suitable empty folder and extract it.
mkdir ~/freecad
cp ~/Downloads/FreeCAD_weekly-builds-33345-2023-06-04-conda-Linux-x86_64-py310.AppImage ~/freecad
cd ~/freecad
chmod +x ./FreeCAD_weekly-builds-33345-2023-06-04-conda-Linux-x86_64-py310.AppImage
./FreeCAD_weekly-builds-33345-2023-06-04-conda-Linux-x86_64-py310.AppImage --appimage-extract
Configuring FreeCAD paths
For this module to work, it needs to be able to find
- FreeCAD C libraries
- FreeCAD Path python libraries
- (AppImage only?) Some other Python modules located in FreeCAD's site-packages
This can be done by updating your virtual environment PYTHONPATH or by creating a pth file in site-packages.
The three paths (also contents of the .pth file) for the above AppImage example are
/home/user/freecad/squashfs-root/usr/lib
/home/user/freecad/squashfs-root/usr/Mod/Path
/home/user/freecad/squashfs-root/usr/lib/python3.10/site-packages/
in a file like
/home/user/miniconda3/envs/cq/lib/python3.10/site-packages/freecad.pth
Limitations
Pocket3D does not work, possibly related to https://github.com/FreeCAD/FreeCAD/issues/6815 - shouldn't be a big loss though, Surface3D can get the same things done IMO.
VCarve can produce unstable toolpaths, but that is probably a bug in the underlying openvoronoi library. Tweaking the job params may help.
Contributing
Contributions are welcome.
- Missing params, fixes
- Tests
- Documentation
PR's
Apply black and isort and ensure that tests pass. Preferably also include test coverage for new code.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ocp_freecad_cam-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5378ed4c8b993b73a0f3937115bf25b24ffd28b5d600f9de09fee4d5e1b4a9fd |
|
MD5 | 3fe87287a8bf55d56c136733342597f7 |
|
BLAKE2b-256 | 6c602309e02a11da7f9e357e97469ba89d8c44039212955a20f366a8f9899bc5 |