- FlatCAM BETA (c) 2019 by Marius Stanciu
- 2D Computer-Aided PCB Manufacturing by (c) 2014-2016 Juan Pablo Caram
FlatCAM is a program for preparing CNC jobs for making PCBs on a CNC router. Among other things, it can take a Gerber file generated by your favorite PCB CAD program, and create G-Code for Isolation routing.
1-2 Open Gerber (.gbr) file.
3 Double click .gbr file in Project tab panel.
4 Click "Isolation Routing" button.
5 Click "Generate geometry" button.
6 Click "Generate CNCJob object" button.
7-8 Save CNC G-code (.nc) file.
This installation contains Python with installed packages and Qt binaries.
Note: Python 3.10 supports Windows 8.1 and newer.
- Download and install Microsoft Visual C++ Redistributable for Visual Studio 2019 x64
- Download and install 7z archiver
- Download .7z archive file from releases page, for example:
FlatCAM_2024_4_windows_portable.7z
- Extract .7z archive and run FlatCAM in extracted folder:
FlatCAM.bat
Python 3.10
PyQt5
- See
pyproject.toml
file for version dependency (orrequirements.txt
file) - Use a strictly versions of Python and packages
See more on GitHub:
See Python downloads.
See Pip documentation to get pip
.
Install Python packages:
python -m pip install --disable-pip-version-check --no-deps --ignore-installed -r requirements.txt
Download and install:
- Qt 5.15.2
- .Net 4.8 online installer (ndp48-web.exe) or offline installer (ndp48-x86-x64-allos-enu.exe)
- VS C++ Build tools (vs_BuildTools.exe)
Set environment variables:
- Add python to Path variable; example:
Path=C:\Users\IEUser\AppData\Local\Programs\Python\Python310;%Path%
- Add Qt to Path variable; example:
Path=C:\Users\IEUser\Downloads\msvc2019_64\bin;%Path%
- Add variable QT_QPA_PLATFORM_PLUGIN_PATH for Qt plugins path; example:
QT_QPA_PLATFORM_PLUGIN_PATH=C:\Users\IEUser\Downloads\msvc2019_64\plugins\platforms
Install Python packages with PyQt5
windows version and pywin32
package.
python -m pip install --disable-pip-version-check --no-deps --ignore-installed -r requirements_windows.txt
So, according to strictly dependency graph and new version of Debian pip
(disallow to install packages to system Python environment, for example Kubuntu 23.04), project moved to automated version control:
- pyenv - for install to Python version environment
- poetry - for packages install to Python virtual environment. See
pyproject.toml
file
Install pyenv
:
curl https://pyenv.run | bash
Add pyenv
to interactive console. Add lines to .bashrc
:
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
Show available python versions to download and install:
pyenv install --list
Install python (for example, 3.10.11, see pyproject.toml
file for python version requirements):
pyenv install 3.10.11
# show installed python versions:
pyenv versions
Switch to Python version:
pyenv local 3.10.11
# or set global version (this not affect the system Python):
pyenv global 3.10.11
Install poetry
:
curl -sSL https://install.python-poetry.org | python3 -
Install python environment (packages) according to pyproject.toml
file:
poetry install
# list all python environments:
poetry env list
For spetial cases it possible export poetry lock file to requirements.txt
file for pip
usage:
cd FlatCAM
poetry update
poetry export -f requirements.txt --output requirements.txt
python -m pip install --disable-pip-version-check --no-deps --ignore-installed -r requirements.txt
Kubuntu 24.04:
sudo apt install pyqt5-dev-tools
python FlatCAM.zip
Get command-line help:
python FlatCAM.zip -h
usage: FlatCAM.zip [-h] [--shellfile SHELLFILE] [--shellvar SHELLVAR] [--headless] [-V] [misc ...]
2D Computer-Aided PCB Manufacturing for CNC
positional arguments:
misc commands: quit, exit, save; file path: .FlatPrj, .FlatConfig, .FlatScript, .TCL
options:
-h, --help show this help message and exit
--shellfile SHELLFILE
--shellvar SHELLVAR
--headless
-V, --version show version
Usage examples:
FlatCAM.zip --shellfile=<cmd_line_shellfile>
FlatCAM.zip --shellvar=<1,'C:\path',23>
FlatCAM.zip --headless