|
|
||
|---|---|---|
| docs | ||
| lzxstackup | ||
| schema | ||
| scripts | ||
| tests | ||
| vendor | ||
| .gitattributes | ||
| .gitignore | ||
| CHANGELOG.md | ||
| lzx-stackup.spec | ||
| pyproject.toml | ||
| README.md | ||
| run.py | ||
LZX Stackup
A Eurorack module's front panel and the circuit boards behind it, designed together (the app was called LZX Panel;
files it saved open as they were). Built on the same infrastructure as lzx-housing: a PySide6 app in
the LZX brand, a project saved as a .lzx_stackup file (JSON; its drawing as SVG), and Generate writing the panel's STEP and DXF files, its
drawings, its print separations and its artwork. It follows the brand's panel rules (the brand guide's Product
chapter), read from the brand's own tokens rather than typed in.
Using it
On the left, two tabs:
- PANEL: the panel itself.
- Width: Eurorack HP (then HP, 1 to 104: 5.08 mm each less 0.1 mm so neighbouring panels don't bind, as lzx-housing's front panels), or Custom (then Custom Width, any width from 5 mm to 1 m, typed in the display units).
- Height: 1U (Intellijel, 39.65 mm), 2U, 3U (Eurorack, 128.5 mm), 4U, 5U, 6U (n rack units less 4.85 mm, as 3U) or Custom (then Custom Height, any height from 5 mm to 1 m): lzx-housing's row formats.
- Rails (a U height): Full height, or Cropped: less the rails' height, 0.291 in top and bottom (14.78 mm in all; a 3U panel cropped is 113.72 mm), as lzx-housing crops a row. What's drawn stays where it is about the centre; with no rails to screw to, a cropped panel takes no board mounting holes and no rail zones.
- Material: the sheet stock, as SendCutSend stocks it, under its material: 5052 aluminium (1.02 mm to 12.70 mm), 6061 plate, 1008 steel, 304 stainless, G90 galvanised, C260 brass, cast acrylic and Baltic birch ply, 42 stocks: the same stocks lzx-housing offers. The default is 1.60 mm 5052, as lzx-housing's front panels. A bare sheet shows in its material's colour (brass, steel, birch...), and its legends take the ink that suits it.
- Finish: Natural, or any anodize or powder coat SendCutSend offers on that stock at that gauge, and all 144 LZX brand swatches (the 128-step series and the 16 neutrals) as custom powder coats, each with its swatch, and in its tooltip its palette step and nearest Pantone: lzx-housing's finishes.
- Mounting (a custom width's as for the most whole HP it holds): the mounting holes where the LZX board
geometry puts them (lib-kicad's
board_geometry.py: Ø3.2 mm, 3 mm in from the top and bottom, three rail units in from each side, an inner pair from 28 HP), or none.
- DRAW: what's drawn on the panel.
-
Tools: select (click, Shift-click, drag a box; drag to move, drag a handle to size), circle, rectangle, rounded rectangle, ellipse, line (Shift: 45° steps), polyline (click each point; double-click or Enter ends it; its first point closes it), curve (a pen: click for a corner, drag for a smooth node), text, frame, scale and arrow (see Panel drawing tools); and delete, duplicate, bring forward, send back (Shift: all the way), centre across or up the panel, put on the grid, turn a quarter, undo and redo. Keys: V C R U E L P B T F S A pick the tools, arrows nudge a tick (Shift: 2.54 mm), Delete deletes, Escape cancels, Ctrl+0 fits the view, + and − zoom; the wheel zooms, the middle button (or Alt-drag) pans.
-
Components: the component library (see Components below), by category, with a search box: double-click a part (or pick it and press Place) and click on the panel where it goes, as many as you like; Escape stops. Import adds a component package file (
.lzxpart) to your library. -
Layers, in drawing order, each with its shapes (click one to select it), its eye and its lock; add one of any kind, remove one, move one earlier or later, double-click to rename. Under the list, the active layer's settings. A layer is one of:
- Cutouts: openings cut through the panel (every closed shape).
- Front clearance / Back clearance: the bodies of the components in front of the panel (knob skirts, nuts, switch caps) and behind it (pots, jacks, the board): each closed shape a footprint reaching out by the layer's Reach (or its own).
- Print: ink on the face, in the layer's Ink: White or Black for legends (a light finish takes black, a dark one white) or one of the four LZX accents (Red, Yellow, Blue, Green, with their Pantones). Print layers print in their order; add as many as the panel has inks.
- Illustration: line art for the drawings, not printed or cut: the placed components' illustrations show on the first one, under anything you draw on it.
The placed components are listed under the layers by reference.
-
Inspector: the selection's settings: position (on the grid), size (a print shape's is its outer ink edge), turn, fill, stroke and ink weight (the brand's four only: ½, ⅔, 1 and 2 tk), knockout (the panel shows through: an inverted legend plate's letters), a clearance body's own reach, the layer it's on; and a text's words, size tier (small, medium, large, or a cap height and weight of your own), alignment (left, centre, right; baseline, middle or top of the caps), fit (optical, tight, or the font's metrics), tracking, pair kerning (
AV -0.05), line pitch, capitals and face, how it's drawn (the outline font, or Panel Stroke's single-line source by the pen), its box (none, an outline plate, an inverted plate) and plate width, and the component it's the legend of (it then goes where that goes); and Insert a mark. Double-click a text on the canvas to edit its words. A frame's, a scale's, an arrow's and the LZX mark's own settings (see Panel drawing tools). For a placed component: its part, reference, position, turn and lock, and a list per slot of the fittings that fit it.
-
On the right:
- Canvas: the panel's face to scale, in its finish: the grid from the panel's centre (HP lines, the 2.54 mm rail grid, and the tick close up), the print layers in their inks, the cutouts and mounting holes as holes, the front bodies tinted and the back ones dashed. Every position lands on the brand's 1 tk grid (0.3175 mm, 1/80 in); a shape with an issue is outlined in its colour.
- Preview: the panel in 3D, its openings cut, in its finish, with the ink and (from Show) the clearance bodies; pick a view: perspective, isometric or square-on (lzx-housing's software renderer: numpy only, no GPU).
- Data: every derived dimension (Constants), the Cutouts (the schedule the drawing has) and the Layers (their inks, reaches, shapes and ink coverage).
An issue shows under the tabs: click it to go to its shape (selected on the canvas) or its setting. An error blocks
Generate. Edit has undo and redo (of every drawing edit and setting), cut, copy and paste (as SVG), duplicate and
select all. File ▸ Import SVG into Layer brings in shapes from any SVG (groups flattened, each put on the grid;
what it can't draw is left out and counted). File ▸ New from Preset starts from an example
(lzxstackup/data/presets: blank panels and an example VCA).
Components
A component is a part from the library placed on the panel: a jack, a pot, an encoder, a switch, a slider, an LED, a
connector, a display window. Each brings its own opening (cut with the cutouts), its bodies in front of the
panel and behind it (with the clearances, and in the 3D view), its line art (on the illustration layer) and its
model (the vendor's STEP where there is one: in the 3D view and Assembly.step).
Some parts only ever go on another: nuts, washers, knobs, knob caps, key tops, slider and lever caps. These are fittings, chosen in the inspector, one list per slot of the part: a pot with a threaded bushing and a D shaft has a Washer, a Nut and a Knob slot, each listing None and whatever fits. What fits is said by the parts' mechanical interfaces, not by lists of names: the pot provides an M7×0.75 bushing 5 mm long and a 6 mm D shaft; a nut requires an M7×0.75 thread, a knob a 6 mm D shaft, a nut-cover knob both the shaft and a bushing no longer than 5.5 mm (so it's offered for the pot but not the encoder, whose bushing is 7 mm). A fitting may bring slots of its own: choose a Selco knob body and a Cap slot appears under it.
What stands on a part's axis is its stack, and each piece goes where it physically ends up, measured from the parts' own drawings: washers and nuts on the panel's face; a knob as far down its shaft as its bore lets it (a D bore stops where the shaft's flat ends, so an LZX knob on an Alpha 15F pot stands 1.4 mm off a 1.6 mm panel, its nut in the knob's cavity); a key top on its switch's plunger; a slider cap on its stem's shoulder; a lever cap on the lever as it's thrown; a knob on a dual concentric pot's inner shaft down in the recess of the knob on its outer shaft; a cap on its knob. Anything under a fitting that its cavity can't take (a nut, a bushing, the knob below) holds it up, and says so. The inspector draws the stack from the side, to scale, and lists its slots: each with a picker of what fits (a family of colours, such as Selco's C112 caps, as one line with a swatch per colour) and a turn. A knob's turn is its shaft's position (within a pot's 300 degrees) and turns its cap with it; a cap turns on its own. Each piece covers the line art under it.
Plates, zones and mounting. A project is plates: panels and circuit boards, any number of each (a project of boards alone needs no panel). The STACK tab lists them. Add takes a panel or a board preset: Eurorack's parallel board (5.08 × HP − 0.2 mm wide, 110 mm tall at 3U and a rack unit more or less per U) or a right-angle board 30 to 60 mm deep; a board is FR-4 of any size and thickness in a JLCPCB soldermask and silkscreen (green, purple, red, yellow, blue, white or black; the silkscreen each comes with). Every plate lies in one of the three planes and turns only in quarter turns. The first is placed by its plane (its front towards ±X, ±Y or ±Z) and turn; every other by the zone it's mated through: one of its faces against another plate's face, parallel at a gap (a board behind a panel), offset and turned a quarter at a time, or at a right angle (a right-angle board, its edge towards the face it's mated to). A plate is mated as it's added, so with two plates or more every plate is mated; the tab edits each mate (its faces, kind, gap, offset, turn and edge). Every face with nothing facing it has an open zone; zones keep their IDs (Z1, Z2...), and an open zone a mate takes over keeps its ID and what's in it.
Components go in zones, seated on one of the zone's faces (the inspector's Seated): a pot on the board, in the
zone between the board's front and the panel's back, its nut and knob on the panel's front. Or a part goes on a face
itself, mated with nothing: panel-mounted on a panel's back (its seat against it, through it, its washer and nut on
the front: a jack wired to its board), or standing on a board's face with nothing across (through no plate, so no
washer or nut: nothing to clamp; a knob or a cap is fine). Pressed-in hardware and windows are always on the face
they go in from. Point at a spot on a panel and a board part goes into the zone behind it, seated on the board there
(a right-angle part slid along its board until its seat meets the panel); with no board behind, it's panel-mounted. X, Y and Turn (any angle) are on the face it's seated on. Each package says how it mounts (its mount,
format 2): whether it spans a zone (seated on a board, stopping at a panel and through it), sits in a plate (PEM
hardware, a window) or stands on a face; its axis (a right-angle part goes only in a right-angle zone); the kinds of
plate either side and the thicknesses they may be, as ranges (a jack's pins through 0.8 to 2.4 mm of board, its
bushing through up to 4 mm of panel); and the zone's gap it takes (a Thonkiconn's 9.8 to 10.3 mm, an Alpha 9 mm
pot's 7 to 7.5, both measured from their models). The checks hold every part to its package's: its zone's kind, both
plates' kinds and thicknesses, the gap (a pot and a jack on one flat board: one of them won't fit). They add plates
running into each other, and parts running into a plate they're not seated on or through, or into each other.
Wiring. A part's pins carry nets (the inspector's Nets: GND, +12V, IN). A pin header and its socket seated
facing each other across a zone (stacked boards) mate when they're of one series and size, pin 1 over pin 1 (the
socket turned as its footprint is): their pins are one net each, named on either, and their stacked height is held
to the zone's gap. The WIRING tab holds the project's harnesses (W1, W2...): each has ends (a housing and
its crimp contacts plugged onto a board's header, or a part's own terminals, soldered: a panel-mounted jack's lugs),
conductors (from an end's pin to another's, each with its net, gauge and colour; Pin for pin wires two ends
straight), a route through the case (its conductors' length the route's and a tenth's slack), and is either made
or bought whole (its vendor's part number instead of its parts). The checks hold a housing to the header it
plugs onto, a conductor's net to its pins', one conductor to a contact. The 3D view draws each harness along its
route. Generate adds Assembly-Guide.pdf (each harness drawn, its conductors, the steps to make and fit it,
its parts; and the project's whole bill of materials) and a <board>-Netlist.csv per board for KiCad.
The library's connectors are the ones LZX uses, from their makers' datasheets (each package cites its page): Würth WR-BHD box headers (Eurorack power 2 x 5 and 2 x 8, the LZX sync bus 2 x 7) with 3M 891 IDC sockets and CNC Tech 1.27 mm ribbon; Molex Mini-Fit Jr (headers, 5557 housings, 5556 terminals); JST XH, PH and SH (headers, housings, crimp contacts with their wire range, strip length and tools); Amphenol BergStak Lite 0.8 mm (a 3.7 mm receptacle with a 7.7 mm plug stacks 8.0 mm, with a 4.7 mm plug 5.0 mm, as Amphenol's table says); and Samtec TSW pin headers with SSW socket strips (11.05 mm board to board). What a datasheet doesn't give is said so in the package's notes (BergStak's pin numbering; two JST contacts' strip lengths).
KiCad. Each board on the STACK tab has a KiCad row. Create KiCad project… asks its name and makes it in a
folder of that name beside the project file (the project saved first, if it never was), its files named the same,
links the board to it and opens it in KiCad:
the project, the app's own libraries copied into its lib folder (LZX_Stackup: a footprint, symbol and 3D model
for every part, found by ${KIPRJMOD}), the board as Stackup has it (its outline and holes on Edge.Cuts, its
cutouts, its silkscreen ink as filled polygons, every part's footprint where it is, turned and on its side, each pad
on its net) and the schematic (a symbol per part, each net by a global label, each footprint linked to its symbol:
KiCad's DRC finds them in parity). Link… ties the board to a KiCad board of your own instead (its parts'
footprints found by their reference). Once linked, the row says where the two stand, and the files are watched:
Sync… lists what's changed since the last sync on each side, item by item (the board's size and outline, its
thickness, each part's place, turn and side, its nets, Stackup's silkscreen and cutouts), and pulls KiCad's into
Stackup, pushes Stackup's into KiCad's files, merges the two where they don't meet, or, where both changed
the same thing, resets Stackup's side to the last sync so the pull is clean (undone as any edit). A board moved
whole in KiCad isn't a change; an outline grown on one side re-centres the board without moving it or its parts in
the case. A footprint from LZX_Stackup placed in KiCad comes in as a part; KiCad's other footprints are its own.
Stackup's silkscreen and cutouts are pushed, never pulled (KiCad's edits to the silkscreen can be taken on purpose: Take KiCad's silkscreen, the board's print becoming its polygons). A push waits for KiCad to close the board (its lock file)
and keeps the file it replaces (.stackup-bak). A board with its own outline (from KiCad) has its size from it:
Make rectangular drops it. The same from the command line: lzx-stackup kicad status|create|link|pull|push| merge|reset|unlink project.lzx_stackup (create --name N [--open]: a folder N beside the project, or --folder). KiCad 10's formats; KiCad needn't be installed to create, link or sync (only to
open the project, Open in KiCad).
A board drawn for its shape alone (a die-cut foam gasket, a frame routed from sheet: an outline and its cutouts,
no copper) goes to its maker as a solid: lzx-stackup outline-step BOARD.lzx_pcb -o OUT.step [--thickness T] writes
its Edge.Cuts outline less the loops inside it and its mounting drills, extruded to the material's thickness (the
board file's by default), centred on the origin as KiCad's export is (--page-origin keeps the board file's).
Fabricated parts and FreeCAD. Add ▸ Fabricated part on the STACK tab adds a plate made by a process: sheet
metal (SendCutSend's stocks and finishes, as a panel's), 3D printed (Prusament PLA, PETG, ASA; ABS; HP PA 12;
Formlabs resin), urethane cast (ABS-like urethanes: Smooth-Cast 325 and 300, IE-3075, PX 223 HT) or injection
moulded (ABS general purpose and high impact, flame-retardant V-0 ABS, PC/ABS): every material's density from its
maker's datasheet (data/fabrication.json cites each), and cast, moulded and printed parts in any of the 144 LZX
colours (its nearest Pantone the moulder's match). It mates as any plate, has its own outline and holes, and parts
come through it as through a panel. A panel or a fabricated part links to a FreeCAD document as a board links
to KiCad: Create FreeCAD document… makes one, named as asked, in a folder of that name beside the project file,
links it and opens it in FreeCAD (a spreadsheet, Stackup, of its parameters, aliased so a sketch
uses Stackup.thickness; and Stackup_Interface, its outline, thickness and every opening its parts come through,
to build the part on), Link… takes one of yours (Stackup's spreadsheet and interface added at the first push),
and Sync… pulls what changed there (a parameter edited, the part's body: the case shows it, weighs it and checks
against it) or pushes Stackup's (FreeCAD recomputes the document where it's installed, so the body follows, and
Stackup takes it). No FreeCAD add-on is needed: the documents are read and written by the app. Generate writes
each part's STEP, a sheet metal part's flat cut (DXF), a printed part's STL and Fabricated-Parts.csv (process,
material, maker and grade, colour, hex and Pantone, weight). The ANALYSIS tab weighs each part (its FreeCAD body's volume where one's pulled) and prices a sheet metal part as a panel (SendCutSend's model, its finish); a printed, cast or moulded part is left for its maker to quote. From the command line: lzx-stackup freecad status| create|link|pull|push|merge|reset|unlink project.lzx_stackup --plate F1.
Rear cans. A sheet metal part may be made to a form instead of an outline: a rear can (model/can.py), a
five-sided shell folded from one blank that closes a module in behind its panel, inside the space EIS gives a module
(its board's width, N × 5.08 − 0.6 mm; the band between the rails, 110 mm at 3U and 21.10 mm at 1U; about 50 mm
deep). Its top and bottom walls end in inward flanges that lie on the panel's back, inside the band, and take PEM
FH studs pressed into the panel (flush on the face; a nut on each). The top and bottom walls carry a return along each long edge,
folded down against the side wall's inner face, so the seams where the walls meet are closed (only the corners keep
the vendor's relief); a return is a flange, at least the vendor's least formed flange long, so the board inside has
its corners notched for it. Its lengths are outer ones; its bend is the
vendor's for the stock (inner radius, K-factor, least flange, corner relief, from data/vendors/sendcutsend.json).
Generate writes the folded can's STEP and its blank as seen from inside (-Part-Cut.dxf: CUT the outline and holes,
BEND the ten bend lines, each 90° towards the face drawn); the price is the blank's and its bends'. The checks say
when a flange is under the vendor's least, a stud's nut reaches a bend, a hole is within 3 mm of one, a stud is
missing from the panel or too short for the flange and its nut, and when a board behind the panel doesn't fit inside
(0.3 mm off its walls: a 6 HP 3U can of 1.02 mm 5052 takes 27.25 × 107.37 mm, its corners notched 1.22 × 6.48 mm
for the returns; --fit-boards gives the boards that outline). From the command line:
lzx-stackup can add project.lzx_stackup [--depth 45] [--stock al5052_1_0] [--fit-boards] and can info.
Drawing on any face. The Draw tab's Face picks the face the canvas shows: any plate's front or back (a back seen from behind). Its layers are listed and edited there; a panel's back takes print (checked by the panel rules), a board's faces their silkscreen (checked by JLCPCB's least line, 0.153 mm, and character height, 1.0 mm), and a cutout drawn on a back is mirrored into the plate's cut. A board's face shows the parts seated on it, where they are on it. The Panel tab edits the panel shown.
Analysis and issues. The ANALYSIS tab rates the project as lzx-housing rates a case, a card each (its value, its verdict, and "up from" or "down from" the project before, or the one Pinned), with the details of the card picked:
- Depth, the score: the deepest thing behind the panel (a board's far corner, a part's pins through its board) against lzx-housing's survey of 331 Eurorack modules: the share at least as deep (good from half, fair from a quarter).
- Mounting: the seats off the panel and what runs into what.
- Solidity, the coherency test: what holds each board to the panel (a part on it nutted through the panel, a pressed-in standoff landing on its face, directly or over a few 0.5 mm washers), how far any of it is from a tie, and whether its pressed or plugged parts without nuts of their own are backed. A board floats (no tie), pivots (one), rocks (ties in a line, or a point past 60 mm from one), flexes, or is solid (three ties or more, spread, none of it past 30 mm from one, its pushed parts within 25 mm: assumed figures). For a board parallel to the panel it suggests standoffs one at a time where each does most, clear of the ink, the openings and the hardware by the vendor's distances, each the PEM standoff that fits the board's depth (or the next shorter over washers); Add places one, Add them all every one. A right-angle board is told to spread its nutted parts or take a bracket.
- Strength: the panel as a beam between its mounting rows under a 20 N push at its middle (assumed: a patch cable pushed home), its section the narrowest its openings leave; stiff within its span over 360, soft past its span over 120 or near its yield (Roark). The board parts' nuts make it stiffer in a rack: a floor.
- Weight: the panel, the boards (FR-4), the pressed-in hardware and the fittings (their models' volume at lzx-housing's densities); the parts on the boards are the boards' weight, left out.
- Cost, at the quantity chosen: the panel from lzx-housing's SendCutSend price model (its cut, finish and inserted hardware; ±18 %), a board within 102 × 102 mm at JLCPCB's advertised prototype price, larger ones left to its quote; and the quantity breaks.
The ISSUES tab lists every issue, errors first, and takes you to what each is about (the shape or component on the canvas, the plate or zone on the STACK tab, the setting); its title counts them.
Documentation. Each placed component has a title and a description (inspector ▸ DOCUMENTATION): what the legend illustration calls it and says of it. A blank title is its legend's words (the text that follows it), else its reference; parts given the same title are called out together ("Outputs"). Untick Called out to leave one off (pressed-in hardware never is).
The checks add: a part or fitting the library hasn't got (an error), a fitting that doesn't fit its slot (and why), a bushing too short for the panel and the washers and nuts on it, two components' bodies meeting (in front, only where they stand at the same heights), a component off the grid; and the rules above apply to the components' openings and bodies as to drawn ones (webs, edges, the hardware margin around a knob).
Pressed-in hardware. The library's Self-clinching hardware (PEM) group is every part SendCutSend presses into
a panel (its hardware insertion): nuts (S, SS, SP), flush nuts (F), standoffs (SO, SO4, BSO, BSO4) and flush-head
studs (FH, FH4), 154 in all, placed like any component (reference H1...). Each is modelled to PEM's bulletins as it
goes in: a standoff or stud pressed in from the front, its head flush with the face and its barrel or thread behind
(its length less the panel's thickness); a nut from the back, its head behind and its shank flush. Its flush head
counts as hardware for the ink (the hardware margin around it). The checks hold each to what the vendor needs: the
stock takes hardware at its gauge; the sheet is softer than the part (any into aluminium and steel, only 400-series
and hardened stainless parts, SP, SO4 and FH4, into stainless, none into brass, acrylic or plywood); the sheet's
thickness is in the part's range; its centre is far enough from the panel's edge, from every other opening and from
the other parts. They go into BOM.csv, the drawings (their holes tagged H, a note to press them in after finishing)
and Assembly.step.
The library is the app's own packages (lzxstackup/data/components: LZX's panel parts, built by
scripts/build_components.py from the LZX KiCad library as vendored in vendor/: the LZX_Cutout footprints, the
line-art library's hardware glyphs and the vendors' STEP models, with each package's notes saying where every piece
came from and what's assumed;
and the PEM parts, built by scripts/build_pem.py from the vendor's hardware catalog and PEM's bulletins,
data/vendors/pem.json) and yours (Import, kept in the app's data folder; one with a built-in's id takes its place).
Type
Text is set in LZX Panel Stroke Regular, the only face on product, to the brand's rules:
- Tiers: small, medium and large (1.667 / 2.5 / 5 mm caps at ⅔ / 1 / 2 tk): each tier is the same drawing
magnified. A cap height and ink weight solve together to a font size and a text stroke in the ink colour, so a
capital lands on exactly the cap height and a stem on exactly the weight (
rules.solve_type, the one place it's done; the face's own cap and stem are read off its outlines). - Fit: letters are placed optically, by the true distance between their inks: 1.25 × the stroke between letters (1 × in the tight/logo mode) and 5 × between words (3 × tight), with small kerns by how the edges present (straight, round, diagonal, overhang) and an even-colour pass that opens parallel stems; never closer than the gap floor (1 × the stroke, a manufacturing limit). Tracking and pair kerns move the letter gap, never past the floor. The font's own metrics and kerning are there too.
- Alignment is on the ink (the ink's left edge, centre or right edge at the anchor) and on the cap band (the middle of the caps is the legend plate's optical centre).
- Marks: the brand's illustration library set as type, from its Icons face (2476 cap-band marks: arrows, jacks, waveforms...) and its Chips face (426 box-plate marks: IEC blocks, wipes, video frames), same pen and metrics as the text. Edit ▸ Insert a Mark (Ctrl+M) or the inspector's button opens a picker (by family, by name). A Panel Stroke text takes the icons' marks inline with its words; a chip sets its text in the Chips face, which stays at 13.5 pt or more (a 3.81 mm cap).
Panel drawing tools
What LZX's earlier panel designers had (panel_gen and its editor, LZX Designer), made here from the same rules; the survey of them is docs/reference/panel-designer-survey.md. Each is one element in the file and ordinary ink everywhere else: the canvas, the outputs and the checks treat what it draws as they treat anything drawn by hand.
- Frames (F, on a print layer): a rule round a group of controls, dragged corner to corner (its outer ink edge where you drag, its corners the plate's 2 tk). Each corner its own radius, round or a 45° chamfer; the rule solid, dashed, dotted or fine dashed (whole ticks, a 4 tk gap that stays open under the round cap); a legend set into its top edge and one into its bottom, breaking the rule 3 tk clear of the words (or at a boxed legend's plate, the rule running into it); filled (grown by half the rule's weight so it covers what the rule would), with a round hole through it about its centre (a jack's ring) and its legends knocked out. A legend too long for its edge is flagged.
- Scales (S): click a pot and it gets its scale, from the part (its shaft's turn, 300° for the Alpha pots), its tick roots clear of the knob by the hardware margin, and linked, so it follows the pot wherever it goes and however it's turned; click an encoder for a dot a detent all round (it has no ends); click a slider for its fader scale along its travel; click anywhere else for a pot scale, or drag for a fader scale from one end of its travel to the other. Every parameter panel_gen had: rotary, rotary switch, linear (fader) and linear switch; divisions, sweep and offset (angles clockwise from twelve o'clock), or travel and direction; ticks outside, inside or either side, majors, or dots; the arc or line they stand on; the control's response (linear, log, exp, gamma, a CSS cubic-bezier) and null gaps (the approach, an attenuverter's centre, the run-out); legends at the ends, the centre or every tick, your words or numbers, each role (ends, centre, the rest) its own tier, boxed on plates for the ticks you name, each clear of the ticks by the legend gap. Drag its handle to size it.
- Switch legends (S on a switch): a toggle's positions named round its bushing, the first up and the last down, a centre-off to the side, clear of its nut and lever cap; a slide switch's along its travel, beside its slot; a rotary switch's a detent each. From the part: the Dailywell toggle is ON-ON, the slide switch two positions over 4 mm. Linked like a scale.
- Arrows (A): a signal's way across the panel (R-21), clicked point by point, each run across, up and down or a true diagonal; the brand's stroked chevron (legs 3 tk back and 1.5 tk out, 53°; a small head half that) at the end, the start, both or neither, its ink tip exactly on the point. An arrow may end under the jack it runs to.
- The LZX mark (Edit ▸ Place the LZX Mark): the brand's immutable outline on the bottom mounting row between the screws, 4.45 mm tall (the front panel's size, as LZX's silkscreen has it); 12, 14 or 18 mm wide where there's room, 4.45 mm wide on a panel too narrow. Never turned or stretched.
- Box text: any text on the legend plate (2.032 × 1.524 caps, 0.254 cap corners, the baseline at its centre and half a cap): an outline plate, or an inverted one with the words knocked out so the panel shows through.
- Panel Stroke from its single-line source: any text can be drawn from the face's skeleton by a pen of its
weight (the brand's own construction: every weight on one baseline and cap line), for plotting and engraving as
lines (
Engrave.svg). - Guides (View ▸ Guides): the panel's centre lines, the strips over its rails, and dashed round everything the hardware covers the 0.5 mm hardware margin a legend's ink stays outside. View ▸ Grid: the tick's dots where they're 4 px apart or more, the 2.54 mm unit's over them, the HP lines.
- Stamps (Edit ▸ Save Selection as a Stamp, Place a Stamp): a selection kept to use again in any project (a pot with its scale and legend, a jack column, a title block), its components given references of their own and what's drawn for them linked to the new ones.
- Align and distribute (Arrange): left, centre, right, top, middle, bottom, and evenly across or up and down, each moved a whole number of ticks.
The checks
The brand's enforced panel rules and the manufacturing limits, checked on every change:
- R-24: no ink weight under ½ tk, no cap under 1.5 mm (errors); weights off the ½ / ⅔ / 1 / 2 tk ladder warn.
- R-14: three type sizes a panel at most. R-18: capitals past three words. Lower-case legends.
- R-25: ink within 0.2 mm of a cutout or the panel's edge (registration). The hardware margin: ink within 0.5 mm of what the hardware covers: a component's bodies in front of the panel, else its opening's shadow (a slot's own shape, anything rounder a disc of half its longer side), a mounting screw's 7 mm washer; the warning names it. The ink floor: two marks on a layer closer than 1 tk without touching.
- R-26: ink over 18 % of the face. R-6: a field (a frame) inside another. R-7: framed groups (the components each frame goes round) closer than 2.5 or further than 3 times their members' spacing.
- The rails: anything behind the panel reaching into its top or bottom 9.25 mm.
- House conventions (advisories): the jack legend that doesn't sit where the panel's other jack legends sit from theirs; the jack pitch that isn't the panel's usual.
- Frames' and scales' legends as text; a frame legend too long for its edge; an arrow bending more than 90°; a scale whose component is gone; the mark turned or scaled; a single-line pen too heavy for the letters' counters; words too wide for a set plate.
- Components: see above.
- The grid: every mark's and cutout's position on the tick. Legend ink that doesn't suit the finish.
- Cutouts past the panel's edge or into a mounting hole (errors), open shapes as cutouts or bodies (errors), webs thinner than the sheet between openings or to the edge.
Outputs
Generate writes, to a folder you choose, each panel's set (in a folder of its own, by its name, where the project has several), each board's files for KiCad, and the assembly:
Panel.step: the panel solid with every opening cut (exact circles, ellipses and rectangles), millimetres, the back face on Z = 0 and the lower left corner (seen from the front) at the origin.Panel.dxf: the face's outline and openings for a laser or a router (layerCUT, millimetres).Clearances.step: the clearance bodies either side of the panel (where it has any), the components' among them.Assembly.step: every panel, board and component where the stack puts them (where there's anything to place), each named (a part by its reference) and in its colour, a panel in its finish's, a board in its soldermask's. A linked board's own parts are in it too, as LZX Designer exports its footprints' models (pcb export step, kept in the system's temporary folder by the board, its models and where the link centres it; without Designer the board goes in alone), and so are the flex tails, each piece a solid.- For each board:
<board>-Outline.dxf(its edge onEdge.Cutsand its cutouts),<board>-F_Silkscreen.svgand.dxf,<board>-B_Silkscreen.svgand.dxf(each face's print, filled; the back mirrored into KiCad's top view, as B.Silkscreen is kept) for KiCad's Import Graphics, and<board>-Placements.csv(each part seated on it: its reference, part, KiCad footprint, side, and where that footprint's origin goes, from the board's upper left corner, and its rotation as KiCad turns footprints: a footprint drawn turned from the part's model, as LZX's jack and pot are, is turned back). All in the board's top view, the origin at a corner, so an import lines up with an outline drawn from it. Drawings.pdf: ANSI B, third-angle: the front and right side views at a standard scale, dimensioned, an isometric, every opening tagged (M: mounting holes, C: cutouts, a component's with its reference, H: pressed-in hardware) and listed in a cutout schedule from the datum (the lower left corner), notes, and lzx-housing's framed sheet and title block. Views are exact hidden-line projections of the STEP solid. A long schedule gets sheets of its own. Where the panel has components, an assembly sheet: the front as line art from the parts' illustrations, each part ballooned by its reference, the right side and an isometric projected from the assembly's solids, and a parts list saying how each is installed (on the board, fitted, or pressed in by the vendor).Print-Proof.pdf: the print for review at 1:1: a composite (the finish, every ink, the openings knocked out), then a separation per print layer in print order.Print-1-<ink>.pdf,Print-2-<ink>.pdf...: the printer's art files, one per print layer in print order, to the brand's handoff standard (brand guide, Print §6): PDF/X-4 (output intent U.S. Web Coated (SWOP) v2), at 1:1, the trim the panel's edge with 0.125 in (3.175 mm) of bleed, crop marks, registration targets, a slug naming the file, separation, ink and trim. The ink is a named spot colour ("PANTONE 185 C"; the legend inks "LZX White" and "LZX Black"), solid, its CMYK alternate the brand swatch's (provisional until a signed press proof: the slug says so). The dieline (the panel's edge and every opening, a 0.25 mm hairline in the spot "Dieline", shown in LZX Red, overprinting) is a layer of its own; the marks and slug are in Registration. No fonts: the words are outlines.Print-Cut.pdf: the dieline alone, to the same standard.Illustration.pdf: the panel as line art at 1:1 from the parts' own illustrations (each package'sillustration.svg) and the illustration layers, each part covering what it hides; page 1 in one colour, page 2 in the panel's colours. Just the panel and a 2 mm margin, to place into a manual.Legend.svg,Legend.png(where anything's placed): the legend illustration, the brand's "Controls and connectors" manual figure at 16:9 (1920 × 1080; the PNG 3840 × 2160): the panel as monochrome line art in the middle on LZX Paper, each control and connector called out beside it with its title (Panel Stroke Medium) and description (Regular, in Rule). Parts sharing a title are one callout, bracketed over their run where they stand together; callouts go on their parts' side, level with them as far as the others allow; where they don't fit, the parts are numbered on the panel and keyed beside it. Type is outlines (each glyph drawn once), the words kept asaria-labels and<title>s. The LEGEND tab shows it as you edit (Copy puts it on the clipboard, Save… writes SVG or PNG).Artwork.svg: the panel face as SVG, a layer each (Inkscape layers), text as its outlines (or, drawn from the single-line source, as its centrelines stroked by the pen), knockouts as masks, frames and scales as their parts; the components' openings and line art in a group each.BOM.csv(where the assembly has pressed-in hardware, or machine screws and standoffs): the bill of materials for what's installed beyond the board's own parts. The self-clinching (PEM) parts the vendor presses in, and the screws and standoffs fitted in assembly, a line per part number with its quantity, thread, length, material, finish, hole, sheet range, references and installer. The board's parts aren't in it (the summary lists every part).Engrave.svg(where a text is drawn from the single-line source): the print layers as a pen draws them, for a pen plotter or an engraver: every such text as its centrelines and every stroked shape as its path, each at its pen; anything filled as its outline.Summary.pdf: the settings, the dimensions, the layers, the components, every part, the pressed-in hardware's bill of materials, the screws and standoffs, the checks and the files.
The output profile. PDF/X-4 embeds its output intent's ICC profile. U.S. Web Coated (SWOP) v2 is Adobe's and isn't
shipped with the app: it's read from LZX_STACKUP_ICC (formerly LZX_PANEL_ICC) if that's set, else from where
Adobe's installers and the OS keep it (USWebCoatedSWOP.icc in Windows' colour folder, Adobe's Recommended profiles,
ColorSync, /usr/share/color/icc). Without it the art files are still written, their output intent named but no
profile in them, and they don't claim PDF/X-4 (the slug says so, and so does Generate).
The PDFs quote lengths in the display units (View ▸ Units: millimetres or inches); the STEP, DXF, SVG and art files are always millimetres.
Project files
A project is a .lzx_stackup file. Projects saved before as .json still open (and the command line takes them); Save writes one as a .lzx_stackup beside it, asking first.
JSON, every length in millimetres whatever the UI displays: the root's orientation, the plates (a panel's settings;
a board's size and colours), the zones (each mate: its faces, kind, gap, offset, turn and edge), the layers (each on a
plate's face, its drawing an SVG document: mm from the plate's centre, x right and y down as the face is seen; shapes
paint in currentColor, the layer's color is its ink) and the components (each in a zone, seated on one of its
faces, x and y on that face):
{
"format": "lzx-stackup-project",
"version": 4,
"units": "mm",
"name": "Example VCA 8HP",
"root": {"normal": "+z", "turn": 0},
"plates": [
{"id": "P1", "kind": "panel", "name": "Panel",
"parameters": {"width_hp": 8, "format": "3u", "stock": "al5052_1_6", "finish": "anod_black", "mounting": "board"}},
{"id": "B1", "kind": "board", "name": "Main board", "width": 40.44, "height": 110, "thickness": 1.6,
"soldermask": "green", "silkscreen": "white"}
],
"zones": [
{"id": "Z1", "kind": "open", "a": "P1.front"},
{"id": "Z2", "kind": "parallel", "a": "P1.back", "b": "B1.front", "gap": 7.25},
{"id": "Z3", "kind": "open", "a": "B1.back"}
],
"layers": [
{"id": "L1", "kind": "cutout", "name": "Cutouts", "plate": "P1", "face": "front",
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-20.27 -64.25 40.54 128.5\" ...><circle .../></svg>"},
{"id": "L4", "kind": "print", "name": "Legends", "plate": "P1", "face": "front", "ink": "ink_white",
"svg": "<svg ...><text ...>GAIN</text></svg>"}
],
"components": [
{"id": "P1", "ref": "RV1", "part": "alpha-rd901f-40", "x": 0.0, "y": -30.48, "zone": "Z2", "on": "B1.front",
"fittings": {"washer": null, "nut": "nut-m7-hex", "knob": "selco-dr110-006", "knob.cap": "selco-c112-black"}}
]
}
Text is kept as <text> with its intent in data-* attributes (data-cap, data-weight, data-fit, data-kern,
data-line-pitch, data-render, data-box, data-follows) beside what a plain SVG viewer needs (the face, the solved
size and text stroke). A frame, a scale, an arrow and the mark are each a <path> whose d draws them for any viewer
and whose data-frame-*, data-scale (JSON: what differs from its kind's preset), data-arrow and data-logo
attributes are what the app reads.
schema/project.schema.json (generated) is the file's schema. A file loads only if it fits the project exactly as
saved (an unknown setting, a finish the vendor doesn't offer on the stock, an SVG element the engine can't read: each
rejected, with where it is); older files (version 1: no layers; 2: no components; 3: one panel and boards placed
anywhere) are migrated as they're read: a version 3 board mated to the panel face it was behind (snapped to quarter
turns, and said so), each part into the zone it sits in, and a board made for board parts that had none.
A component package (.lzxpart) is a zip of component.json (what the part is, how it mounts (mount: its span,
axis, base and stop plates with their thickness ranges, and the gap it takes), what it provides and requires, its
slots; schema/component.schema.json), cutout.svg, front.svg and back.svg (its bodies, each
shape's reach in data-depth), illustration.svg and, optionally, model.step with the transform that seats it
(the part's axis on the origin, its seat on the back face for a board part).
Run (development)
pip install -e .[dev] # or just: build123d PySide6 matplotlib numpy reportlab jsonschema shapely fonttools pyclipper pikepdf
python run.py # GUI
python run.py gui lzxstackup/data/presets/example-vca-8hp.lzx_stackup # opening a project
python run.py generate lzxstackup/data/presets/example-vca-8hp.lzx_stackup -o out/ # headless: every output
python run.py generate lzxstackup/data/presets/example-vca-8hp.lzx_stackup -o out/ --units in # the PDFs in inches
python run.py regen # rewrite every file written from the code (--check: name the stale ones)
python run.py component list # the component library
python run.py component info my-part.lzxpart # a package: what it provides, its slots and what fits them
python run.py kicad status my.lzx_stackup # a board's KiCad project: where it stands (create, link, pull,
# push, merge, reset, unlink: see --help)
python scripts/build_components.py # rebuild the app's own packages (from vendor/: nothing outside the repo)
python scripts/build_kicad_lib.py # rebuild the app's own KiCad libraries (LZX_Stackup: footprints,
# symbols, 3D models) from the packages
python scripts/vendor_kicad.py --check # the vendored library sources as their manifest says (a new source:
# vendor_kicad.py <source> <root> <files...>)
python scripts/build_pem.py # rebuild the PEM hardware's packages (the vendor's catalog, PEM's bulletins)
python scripts/build_connectors.py # rebuild the connectors, housings, contacts and wire (makers' datasheets)
python scripts/sync_housing.py # re-copy lzx-housing's sheet data, price model and module survey (committed:
# only when lzx-housing's change)
python scripts/sync_brand.py # re-vendor the brand's tokens, fonts and swatches (likewise)
python -m pytest # everything (about a minute); -m "not slow" skips the CAD, PDF and GUI files
Build a single executable
scripts\build-exe.ps1 # -> dist\lzx-stackup.exe
Units and preferences
View ▸ Units switches every displayed length between millimetres and inches. The model, the derived constants,
the STEP, DXF and SVG files and saved project files are always millimetres. View ▸ Grid and View ▸ Guides show
or hide the grid and the guides. Preferences (units, grid, guides, what the 3D view shows) and the window's layout are
per-user (QSettings) and never stored in project files; stamps are files of their own (*.lzxstamp) in the app's data
folder.
More: docs/CONTRIBUTING.md (how the code is laid out, the brand's rules and where they come from, adding things, the tests).