@typecad/mast
v0.1.3
Published
MAST - An autorouter plugin for typeCAD
Downloads
406
Readme
@typecad/mast
🚩this is a preview release🚩
A powerful autorouter for typeCAD. An autorouter for typeCAD. It uses Minimum Spanning Tree, A* route finding, with STeiner net routing.
Programatic Control
typeCAD MAST routing is a semi-automated routing method that combines manual component placement with automated trace routing algorithms. It allows designers to specify constraints and preferences, while the router handles the actual path generation.
Introducing an API to routing allows for significant flexibility in routing.
- by calling
::routein a defined order, it ensures priority traces (power, signal, RF, etc.) are routed first, through the most open space. - waypoints can be used to force traces to pass through specific points on the PCB
- vias can be used similarly to waypoints to force a via/layer change
Installation
npm install @typecad/mastQuick start
import { PCB } from '@typecad/typecad'
import { MASTRouter } from '@typecad/mast';
let typecad = new PCB('mast_router');
typecad.registerRouter(MASTRouter);
let net_to_route = typecad.net(...); // route entire nets
typecad.route(net_to_route); // route the net using default optionsCommon options
The router accepts an options object (high level):
traceWidth: number— default 0.2, mm.clearance: number— default 0.2, mm.allowedLayers: string[]— default ['F.Cu', 'B.Cu'].allowVias: boolean— default true.
Recent changes ✅
- Serializing routing steps: MST segment routing (when using worker pools) now runs sequentially so that completed segments become obstacles for later segments. This prevents subsequent segments from routing over already-routed traces. Additionally, top-level autoroute calls are queued so routing events run one at a time and can see obstacles created by earlier operations.
License
This project is part of the TypeCAD suite. Refer to the repository license file for terms.
