Go to file
pszsh 79c32fd583 There's been a lot of changes, still in heavy early development so forgive me for not being great with the commit messages yet. I'm more apologizing in advance than for the present meaningless commit message - they'll get worse for a while. 2026-03-02 19:52:07 -08:00
cmd/genicon Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
frontend There's been a lot of changes, still in heavy early development so forgive me for not being great with the commit messages yet. I'm more apologizing in advance than for the present meaningless commit message - they'll get worse for a while. 2026-03-02 19:52:07 -08:00
static Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
.gitignore Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
.gitmodules Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
Dockerfile.linux let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
LICENSE Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
README.md Critical bug fixes for the conditions of initial workspace setup and additions to the build scripts which now should fetch all the build dependencies automatically on all platforms. 2026-02-26 16:27:59 -08:00
app.go There's been a lot of changes, still in heavy early development so forgive me for not being great with the commit messages yet. I'm more apologizing in advance than for the present meaningless commit message - they'll get worse for a while. 2026-03-02 19:52:07 -08:00
build-linux64.sh let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
build-windows.bat Critical bug fixes for the conditions of initial workspace setup and additions to the build scripts which now should fetch all the build dependencies automatically on all platforms. 2026-02-26 16:27:59 -08:00
build-windows.sh Critical bug fixes for the conditions of initial workspace setup and additions to the build scripts which now should fetch all the build dependencies automatically on all platforms. 2026-02-26 16:27:59 -08:00
build.sh Critical bug fixes for the conditions of initial workspace setup and additions to the build scripts which now should fetch all the build dependencies automatically on all platforms. 2026-02-26 16:27:59 -08:00
debug.sh Critical bug fixes for the conditions of initial workspace setup and additions to the build scripts which now should fetch all the build dependencies automatically on all platforms. 2026-02-26 16:27:59 -08:00
debug_off.go Lots of bug fixed before moving to the next major feature: custom/non-pcb vector forming (stencils for other kinds of objects, think spray painting a motorcycle type of things) if only one could make a stencil the exact curvature of the gas tank... ;D 2026-02-27 01:52:16 -08:00
debug_on.go Lots of bug fixed before moving to the next major feature: custom/non-pcb vector forming (stencils for other kinds of objects, think spray painting a motorcycle type of things) if only one could make a stencil the exact curvature of the gas tank... ;D 2026-02-27 01:52:16 -08:00
drill.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
enclosure.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
former.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
gbrjob.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
gerber.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
go.mod Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
go.sum Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
instance.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
main.go Critical bug fixes for the conditions of initial workspace setup and additions to the build scripts which now should fetch all the build dependencies automatically on all platforms. 2026-02-26 16:27:59 -08:00
pattern.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
project.go There's been a lot of changes, still in heavy early development so forgive me for not being great with the commit messages yet. I'm more apologizing in advance than for the present meaningless commit message - they'll get worse for a while. 2026-03-02 19:52:07 -08:00
scad.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
scangrid.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
session.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
stencil_process.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
stl.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
storage.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
svg.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
svg_parse.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
svg_render_darwin.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
svg_render_other.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
test_shapes_test.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
unwrap.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
util.go Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00
vectorwrap.go let's call this the half-way point for the implementation of lots of the new features. framework is in place, bugs are like oxygen and we are at normal atmospheric pressure: there's lots 2026-03-01 15:59:16 -08:00
wails.json Initial commit: Former — PCB Stencil & Enclosure Generator 2026-02-26 15:27:05 -08:00

README.md

Former

A desktop application for generating 3D-printable solder paste stencils and snap-fit enclosures from KiCad/Gerber files.

Former

Features

Stencil Generation

  • Parses RS-274X Gerber solder paste layers
  • Supports standard apertures (Circle, Rectangle, Obround) and Aperture Macros with rotation
  • Generates optimized STL meshes for 3D printing
  • Automatic cropping to PCB bounds

Enclosure Generation

  • Generates snap-fit enclosures with lids and trays from KiCad .gbrjob projects
  • Native OpenSCAD .scad export for parametric editing
  • Interactive 3D layer viewer with per-layer colorization (KiCad color scheme)
  • Visual cutout placement on any surface (top, bottom, sides) with live 3D preview
  • Automatic USB port detection and cutout alignment from F.Fab/B.Fab layers
  • Tray clip system with vertical relief slots
  • Dado/engrave mode for surface text and logos

Desktop App

  • Native macOS and Windows application (Wails v2)
  • Project saving and loading with persistent cutout state
  • CLI mode for scripted/batch workflows

Install

Requirements

macOS

  1. Install Homebrew (if not already installed)
  2. Install dependencies:
    brew install go node
    xcode-select --install          # Xcode Command Line Tools
    go install github.com/wailsapp/wails/v2/cmd/wails@latest
    

Windows

  1. Install dependencies (using winget, built into Windows 10/11):
    winget install GoLang.Go
    winget install OpenJS.NodeJS.LTS
    go install github.com/wailsapp/wails/v2/cmd/wails@latest
    
    Or download manually: Go 1.21+, Node.js 18+
  2. WebView2 Runtime — required by Wails. Pre-installed on most Windows 10/11 machines with Edge. If missing, download from Microsoft.

Version Summary

Tool Minimum Install docs
Go 1.21+ https://go.dev/dl/
Node.js 18+ https://nodejs.org/
Wails CLI v2 https://wails.io/docs/gettingstarted/installation

Build

The build scripts check for missing dependencies and print install instructions if anything is missing.

macOS:

./build.sh

Windows (native):

build-windows.bat

Cross-compile for Windows (from macOS/Linux):

./build-windows.sh

The built application will be at build/bin/Former.app (macOS) or build/bin/Former.exe (Windows).

CLI Usage

Former can also run headless from the command line:

./Former [options] <paste_layer.gbr> [outline.gbr]

Options

Flag Default Description
--height 0.16 Stencil height in mm
--wall-height 2.0 Wall height in mm
--wall-thickness 1.0 Wall thickness in mm
--dpi 1016 Rendering DPI
--keep-png false Save intermediate PNG

Example

./Former --height=0.16 --keep-png my_board-F_Paste.gbr my_board-Edge_Cuts.gbr

3D Printing Tips

For fine-pitch SMD stencils (TSSOP, 0402, etc.):

  • Nozzle: 0.2mm recommended
  • Layer height: 0.16mm total (0.10mm first layer + 0.06mm second)
  • Build surface: Smooth PEI sheet for flat stencil bottom

Acknowledgments

Former began as a fork of pcb-to-stencil by Nikolai Danylchyk, a Go tool for converting Gerber paste layers to STL stencils. The original Gerber parser and STL mesh generation formed the foundation that Former builds upon.

License

MIT License — see LICENSE for details.