Skip to content

dielectric-coder/FlatCAM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

662 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlatCAM: 2D Computer-Aided PCB Manufacturing

(c) 2014-2015 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.

============================================

Python 3 / PyQt5 Port

This fork has been ported from Python 2.7 / PyQt4 to Python 3 / PyQt5 with the following updates:

  • Python 3 syntax and standard library (print functions, except as, io.StringIO, tkinter, urllib.request/parse, html.escape, integer division, etc.)
  • PyQt5 with QtWidgets / QtGui / QtCore split, new-style signals/slots, updated QFileDialog API
  • Shapely 2.0+ compatibility (.geoms for multi-geometry iteration, unary_union, immutable coordinates)
  • VisPy 0.9+ with conditional monkey-patches for modern API
  • NumPy 2.0+ compatibility (numpy.inf)
  • Light Fusion Qt style override for consistent icon visibility across desktop themes
  • Smart file-type auto-detection on the toolbar Open button

Installation

Pre-built releases

Download standalone executables from the Releases page:

  • Linux - FlatCAM-vX.Y-linux-x86_64.tar.gz (extract and run ./FlatCAM)
  • Windows - FlatCAM-vX.Y-windows-x86_64.zip (extract and run FlatCAM.exe)
  • Arch/Manjaro - flatcam-X.Y-1-x86_64.pkg.tar.zst (install with sudo pacman -U flatcam-*.pkg.tar.zst, then run flatcam)

From source

Requirements

  • Python 3.8+
  • PyQt5 >= 5.15
  • VisPy >= 0.9
  • Shapely >= 1.7.1
  • NumPy, SciPy, Matplotlib, Rtree, svg.path, simplejson

Install dependencies

pip3 install -r requirements.txt

Run

python3 FlatCAM.py

Tested on Manjaro 26.2.

Running Tests

# All tests
python3 -m unittest discover tests

# Single test file
python3 -m unittest tests.test_excellon
python3 -m unittest tests.test_gerber_flow

# Tcl command tests
python3 -m unittest discover tests/test_tclCommands

Building

PyInstaller (Linux/Windows)

pip install pyinstaller PyOpenGL PyOpenGL-accelerate
pyinstaller flatcam.spec --noconfirm

The standalone executable is created in dist/FlatCAM/.

Arch/Manjaro package

makepkg -s
sudo pacman -U flatcam-*.pkg.tar.zst

Windows (cx_Freeze, legacy)

python make_win32.py build

============================================

Features

  • "Clear non-copper" feature, supporting multi-tool work.
  • Groups in Project view.
  • Pan view by dragging in visualizer window with pressed MMB.
  • OpenGL-based visualizer.

Screenshots

copper_clear_1.png copper_clear_cnc_job_1.png copper_clear_cnc_job_2.png

Packages

 
 
 

Contributors

Languages

  • Python 89.7%
  • JavaScript 5.3%
  • HTML 1.8%
  • CSS 1.6%
  • Makefile 0.7%
  • Batchfile 0.6%
  • Shell 0.3%