A community-maintained fork of FlatCAM Evo 8.9.95 with bug fixes for tool database handling, drilling workflow, object lifecycle, and worker-thread safety.
Upstream: FlatCAM Beta by Marius Stanciu Original FlatCAM: FlatCAM by Juan Pablo Caram
FlatCAM Evo is a 2D Computer-Aided Manufacturing (CAM) application for preparing CNC jobs to make printed circuit boards (PCBs). It imports industry-standard PCB design files and generates G-Code for:
- Isolation routing — cutting around copper traces
- Drilling — through-hole component holes and vias
- Milling — board outline cutout and copper removal
- Solder paste dispensing — stencil generation
- Panelization — multi-board layouts
| Input | Output |
|---|---|
| Gerber (RS-274X) | G-Code |
| Excellon (drill files) | DXF |
| DXF | SVG |
| SVG, PDF, HPGL/2 |
Ships with ~20 post-processors including GRBL 1.1, Marlin, LinuxCNC, Roland, Paste (solder paste), and several GRBL variants.
This fork fixes a series of bugs in FlatCAM Evo 8.9.95 that cause crashes and incorrect behavior during normal use.
- Object deletion crash — deleting Gerber or Excellon objects caused an unhandled exception in the object collection cleanup and associated signal teardown
- Worker thread UI safety — worker threads accessing destroyed Qt widgets after the
user switches or closes objects now fail gracefully instead of raising
RuntimeError: wrapped C/C++ object has been deleted
- Tool database overwriting (
ToolDrilling) —build_tool_ui()was unconditionally overwriting the plugin's working tool copy from the source object on every call, discarding any per-tool database values already loaded. Fixed to preserve loaded values in the non-default sort path. - Tool data flow — several tool plugins (
ToolMilling,ToolIsolation,ToolNCC,ToolPaint,ToolCutOut) were reading parameters fromobj_options(application-level globals) instead oftools[uid]['data'](per-tool database values). Parameters now correctly come from the tool database entry. - Database template cleanup — removed redundant duplicate parameter definitions from
appDatabase.pyand unified the per-tool parameter defaults indefaults.py.
- Excellon drill duplication — drills from an Excellon object were being appended to the job list on each UI refresh, causing duplicated drill paths in generated G-Code.
- Drilling tool database not applied — the drilling plugin was not correctly applying tool database entries, causing all drills to use default parameters regardless of the database configuration.
- Dwell parameter not applied — the dwell parameter set per-tool in the database was
not being passed through to G-Code generation in
ToolMillingandToolCutOut. - Move object log error —
ToolMoveraised an unhandledAttributeErrorwhen logging certain object move operations.
| Requirement | Version |
|---|---|
| Python | 3.11 or later |
| PyQt6 | 6.x |
| numpy | ≥ 1.16, < 2.0 |
| scipy | latest |
| Shapely | latest |
| VisPy | latest |
| Pillow | latest |
| GDAL | system library |
| GEOS | system library |
Full Python dependency list is in requirements.txt.
Install via the Homebrew tap:
brew tap kpkrisnop/flatcam-evo
brew install flatcam-evoRun:
flatcamRequires Homebrew and Mamba/Conda.
1. Install system dependencies:
brew install python@3.11 pyqt gdal geos freetype spatialindex qpdf pkg-config2. Clone the repository:
git clone https://github.com/kpkrisnop/flatcam.git
cd flatcam3. Create and activate a conda environment:
mamba env create -f environment.yml
mamba activate flatcamOr with pip only:
python3.11 -m venv venv
source venv/bin/activate
pip install --no-binary pillow -r requirements.txt4. Run:
python flatcam.py1. Install system dependencies:
sudo apt-get update
sudo apt-get install python3.11 python3.11-pip python3.11-venv python3-tk \
libgdal-dev libgeos-dev libfreetype-dev libspatialindex-dev \
libqpdf-dev pkg-config2. Clone the repository:
git clone https://github.com/kpkrisnop/flatcam.git
cd flatcam3. Create a virtual environment and install dependencies:
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txt4. Run:
python flatcam.pyTip: On systems where
python3.11is not the default, use the full path, e.g./usr/bin/python3.11.
Conda/Mamba alternative (any Linux distro):
mamba env create -f environment.yml
mamba activate flatcam
python flatcam.py1. Install Python 3.11:
Download from python.org and check "Add Python to PATH" during installation.
2. Install system dependencies:
GDAL and GEOS are required. The easiest method is to use the OSGeo4W installer or install pre-built wheels:
pip install gdal geosIf GDAL installation fails, use the pre-built wheel from Christoph Gohlke's archive matching your Python version.
3. Clone the repository:
git clone https://github.com/kpkrisnop/flatcam.git
cd flatcam4. Create a virtual environment and install dependencies:
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt5. Run:
python flatcam.pyPortable mode:
To run FlatCAM from a USB drive without writing to %APPDATA%, edit
config\configuration.txt and set:
portable=True
User data will then be stored in the config\ folder next to the application.
If you have Mamba or Conda installed:
git clone https://github.com/kpkrisnop/flatcam.git
cd flatcam
mamba env create -f environment.yml
mamba activate flatcam
python flatcam.pyThis is the simplest method on all platforms as Conda handles the GDAL/GEOS system library dependencies automatically.
python flatcam.py # Normal GUI launch
python flatcam.py --headless=1 # Headless mode (no GUI)
python flatcam.py --shellfile=<script> # Execute a TCL script on startup
python flatcam.py --shellvar=<values> # Pass variables to TCL scriptUser data and preferences are stored in:
| Platform | Location |
|---|---|
| macOS / Linux | ~/.FlatCAM/ |
| Windows | %APPDATA%\FlatCAM\ |
| Windows (portable) | <app folder>\config\ |
Log file: ~/.FlatCAM/log.txt (or equivalent on Windows).
Tools database: ~/.FlatCAM/tools_db_<version>.FlatDB (JSON format, editable).
flatcam.py Entry point
appMain.py Central App class (~8k lines)
camlib.py Core geometry and G-code generation
defaults.py All preference keys and factory defaults
appDatabase.py Tool database management
appObjects/ Data model: Gerber, Excellon, Geometry, CNCJob objects
appPlugins/ ~39 manufacturing tool plugins
appGUI/ Main window, widgets, canvas, preferences panels
appParsers/ File format parsers (Gerber, Excellon, DXF, SVG, PDF)
appEditors/ Interactive geometry editors
preprocessors/ G-code post-processors (~20 machine profiles)
tclCommands/ TCL scripting interface (~79 commands)
locale/ Translations (10 languages)
- Tab detachment on Linux/macOS — Detaching tool panels into floating windows can cause a segmentation fault in some environments. The upstream workaround is in place but the underlying Qt issue is not fully resolved.
- File type association — Windows registers
.gbr,.exc,.dxffile associations automatically. macOS and Linux require manual file association setup through the OS. - OR-Tools optimization — The advanced drill path optimization (shortest path) requires a 64-bit Python environment. 32-bit installations fall back to a simpler algorithm automatically.
- numpy < 2.0 — numpy 2.x introduced breaking API changes. This fork pins numpy below 2.0 until upstream compatibility is addressed.
- Marius Stanciu — FlatCAM Evo / FlatCAM Beta author
- Juan Pablo Caram — original FlatCAM author
- tomoyanonymous — homebrew-flatcam tap that the macOS formula is based on
- Krisnop Saimuey — bug fixes in this fork
- Claude Code — execute the bug fixes
FlatCAM Evo is released under the MIT License. See LICENSE for details.