Voltecx is in beta. The macOS build comes first; Windows and Linux packages are still being tested.Beta. macOS comes first; Windows and Linux are still in testing. What's new
Documentation

22. The board: stack-up, placement, routing and fabrication files

Voltecx keeps the printed circuit board next to the circuit. The board is one text file, .vxpcb, inside a project, and every board step is a command: you run it from the command line, from Python, from the chat or from a script, and each one that changes the board writes the file at once. The circuit is never changed by a board command, and a board nobody has drawn or routed has no loop inductance yet: the numbers come from the circuit and the simulation, never from a guess.

This chapter takes a simulated converter to a board and a set of fabrication files. Lengths are in metres and copper weight in ounces, like everywhere else in Voltecx. Commands that need a board take path (a .vxpcb file); without it they use the open project's board.

1. Keep the design as a project

A project is one .vxproj file that lists the .vxsch sheets, the .vxsim setups and the .vxpcb board. All are diff-friendly text, and parts keep their ids in every file.

  1. project.saveAs {"path":"w/buck.vxproj"} splits the open circuit into its files with nothing lost.
  2. project.addBoard {} adds the board. (project.new {path} starts an empty project, project.open {path} opens one and names a missing file, project.save {} writes it; file.save does the same.)
  3. project.show {} lists the documents.

Assembly variants

One project can keep several ways to build the same circuit, for example a Debug build with test links and snubber footprints, and a Production build without them. A variant is a name and the list of parts it leaves unfitted (DNP). Variants live in the .vxproj, so they need a project (project.saveAs first; on a plain file the commands say so).

  1. project.setVariant {"name":"Production","dnp":["Rsnub","TP1"],"description":"no bring-up parts"} creates or replaces a variant and writes the project file at once. Every part named must exist in the circuit. It does not change the circuit yet.
  2. project.activateVariant {"name":"Production"} marks exactly those parts DNP and every other part fitted, as one history step, so Edit > Undo brings back the marks. The simulation, the bill of materials (bom.list, bom.export) and the board follow the marks: a DNP part stays out of the simulation but stays on the board and in the BOM's DNP list. The reply lists dnp, fitted and any unknown part the variant names that is no longer in the circuit.
  3. project.variants {} shows every variant with the active one. A part named by a variant but missing from the circuit is listed under unknown; fix it with project.setVariant.
  4. project.removeVariant {"name":"Debug"} deletes a variant. The parts keep their DNP marks.
  5. board.exportFab {"variant":"Production","folder":"fab-production"} writes the fabrication set as that variant builds the board, without activating it: its DNP parts get no paste and no line in the position files or the assembly BOM, and every other part is fitted. The copper is the same for every variant. The reply's assembly lists the parts notFitted, the parts kept out of the BOM (notBought: on the board but neither bought nor placed, such as a test point on a bare pad, whose KiCad footprint says exclude_from_bom and exclude_from_pos_files), the board-only parts the BOM buys but the machine does not place (notPlaced, such as standoffs) and the placed parts whose footprint says exclude_from_bom alone (notListed). Without variant, the parts marked DNP now are left out, even when the board was not synced since.

Say which variant is active before you quote a bill of materials or a simulation result, because they differ between variants. A variant is not a saved version of the circuit: for an A and a B design of the whole circuit use the variants of the history (chapter 14).

2. The stack-up

board.stackup {} lists the layers from top to bottom (copper layers are signal, plane or mixed; the rest are core or prepreg), the copper count and the total thickness. Pass the board's nominal thickness (and a tolerance fraction) and it warns when the layers do not add up to it. A layer with no thickness leaves the total empty: Voltecx does not fill one in from memory, so take the value from your fabricator's stack-up.

Command What it does
board.setStackup {"copper":4} A standard stack of 1 to 32 copper layers; or pass layers with name, kind, thickness, copperOz, dk, lossTangent and material for each
board.setLayer {layer, ...} Change one layer's values; null clears a value
board.addLayer {above} Insert a layer
board.removeLayer {layer} Remove a layer; refused while an item is on it

Layers keep their ids, so the items on them stay put. An odd copper count is allowed: the reply warns once, and its offer is the board.addLayer call that makes the count even. Vias may be through, blind or buried over any two copper layers.

Trace impedance

board.impedance {layer, width} gives a trace's z0 and, with spacing (edge to edge), the pair's zdiff. Going the other way, {layer, targetZ0} or {layer, targetZdiff, spacing} gives the width. An outer layer is a microstrip, an inner layer a stripline between its neighbours. With no board, pass structure (microstrip or stripline), height, thickness and dk. A value the stack-up lacks comes back as an error that names it: Voltecx does not guess a dielectric constant. The formulas are empirical (about ±10 %), so the reply carries warnings; for a controlled-impedance order, quote the fabricator's field-solver figure.

3. Placement

Run simulation.run {} first, at full load and the highest input, so the hot loops are the simulated ones. Then board.autoPlace {} places the footprints already on the board: the hot-loop parts side by side in loop order, the power path below them, each gate net's parts next to their switch, every other part away from the switching node. It is a starting point. A locked footprint is never moved (locked lists them), and unplaced lists the parts that have no footprint yet. The circuit is unchanged.

Put a footprint on the board, or swap one

board.placePart {part, footprint, at} gives a circuit part that has no footprint one: footprint is a KiCad .kicad_mod file (or like names a copy already on the board), at is the position in metres, with rotation (degrees, counter-clockwise), side (top or bottom) and locked. The pads join the part's ports by the data-sheet pinout of the library footprint (library, or the file's Lib.pretty folder), otherwise pad n to the part's n-th port; pins {pad: port} overrides any pad (null leaves it unconnected). Each pad takes its port's net. Read unassigned (ports no pad joins), pins (what was joined) and drc (the rule check on the new footprint). board.swapFootprint {ref, footprint} gives a placed part another footprint and keeps its position, rotation, side and part; tracks to the old pads stay, and a locked footprint is refused. Both are one undo step. board.get {}, board.nets {} and board.part {ref} read the board (unplaced lists the parts with no footprint) without changing it.

Outline, cut-outs and milled slots

board.setOutline {rect: {x, y, w, h, cornerRadius?}} or {polygon: [[x,y], {"arc":[x,y]}, ...]} sets the board's edge (metres; arcs are drawn as in a zone's outline, within maxError). It replaces the outline and keeps the cut-outs. board.addCutout {slot: {from, to, width}} mills a slot (the stadium a router bit of width cuts between the two centres; from equal to to is a round hole), for example across an isolation barrier to gain creepage; {polygon: [...]} cuts any other shape inside the edge. board.removeCutout {index} removes one (index from board.get's outline.cutouts). The reply's notes compare a slot's width with the cited slot-width rules; the pollution degree is the engineer's call. A ring that crosses itself, a cut-out not wholly inside the outline, and copper, holes or footprints that would fall outside the new outline or inside a cut-out are refused by name: move them first. The shape is yours to give; Voltecx has no default. Each edit is one board.undo step; run board.drcRun afterwards.

Reference designators and silk

board.placeReferences {} moves each part's reference designator (its footprint's ${REFERENCE} text from board.addReferenceTexts, added when missing, so it still moves with the part) beside its courtyard on the silk of its face, at 0° or 90° (reading from the bottom or the right), clear of every courtyard, pad, mask opening, via, other silk (a part's shown fields, such as a KiCad Value, included) and the board edge: closest to the part first, then lined up with its neighbours. Bottom parts get mirrored references on the bottom silk. refs or side limits it. A part with no free spot is listed in unplaced and its reference stays where it was; references are never stacked. board.clipSilk {} cuts the silk, the board's and the footprints' on the board (the library is not changed), so its ink stays clear of every solder mask opening by the silk-to-mask gap. Voltecx assumes no text height, stroke width or gap: pass height, strokeWidth and clearance, or set them once from the fab's rules with board.setSilkRules {silkToMask, textHeight, textWidth}; a missing one is reported. Neither command changes copper or nets, and each is one undo step.

Fiducials and mounting holes

board.addFiducials {global: {count, inset}, local: {parts, pitchBelow}, pad, maskOpening, keepout} puts fiducials on the board: global at count corners of the outline's box, inset in from both edges (three are never on one line), on side; local at two opposite corners of each listed part and of each part whose closest pads are nearer than pitchBelow, just outside its courtyard. board.addMountingHoles {positions | corners: {inset}, drill, plated, pad, net, headKeepout, layers} puts mounting holes at the given points or the four corners: unplated holes go in the NPTH drill file, plated ones need their pad, and a hole on a net (a chassis net, say) is checked by the DRC like any pad on that net. The screw head's headKeepout is a courtyard on both faces and a copper keep-out the router walks round. Both are footprints with no circuit part (FID1, MH1 …), locked and not fitted, so they have no BOM line. A fiducial remembers whether it is global or local, and board.exportFab writes its pad on the copper Gerber as FiducialPad,Global or FiducialPad,Local (Gerber 2024.05 §5.6.10), so the fab and the assembler see it as a fiducial, not a pad to solder. A local fiducial also remembers the part it locates, and the Gerber X3 component layer lists it with that part as a zero-size FiducialPad,Local flash (Gerber 2024.05 §6.9.2); fiducials placed before this have no part and are left off. Every size is yours: Voltecx has none built in and refuses a call that leaves one out. A spot that would reach the board edge, a part or copper is listed in skipped and left empty. Each call is one undo step.

4. Routing

board.autoRoute {"via":{"diameter":...,"drill":...,"plating":...}} routes the board: each switch's gate drive first, so it takes the short way beside its switch, then the hot-loop nets (order shows each net's role) and the rest by RMS current.

  • Width comes from each net's simulated RMS current (IPC-2221 section 6.2 on the layer's copper thickness), so set the thicknesses with board.setLayer first.

  • Clearance comes from each net's peak voltage (IPC-2221B table 6-1, column B2), written as IPC-2221 B2 <n> V net classes unless you pass "classes":false.

  • Vias are an array sized for the current through the barrel plating. Pass currents and voltages for nets the simulation does not give. Never guess a via size or a plating thickness: use the fabricator's numbers.

  • Layers follow the ground plan of board.groundPlan unless you pass "ground":false: each net goes on its assigned layers, the ground nets reach their plane through via arrays (toPlane), gate and sense nets run only over an unbroken plane on the next layer (referenced), and the other nets keep off an inner plane. A board with no zones gets the plan's ground planes first (the power pours stay board.groundPlan's to add).

  • Thermal vias go under the largest pads of the hot loops' switches and diodes before routing (thermal lists each pad's vias). Drill, pitch and the fewest vias per pad come from the design rule set; thermalVias overrides them or turns them off with false.

Read the reply before you call the board routed. unrouted names each net left, with a reason (noWidth, widthAboveMax, noClearance, noReference or noPath) and the pads still open; drc is the design rule check of the result; skipped nets had one pad or copper already (nothing is ripped up). Then fill the zones (board.fillZones), run board.drcRun and board.layoutReview, and export with board.exportFab. Gate-loop pairing and ground stitching are not routed specially yet.

Stitching vias in a zone

board.stitchZone {zone, pitch} drops a grid of vias of the zone's net into its filled copper, tying the zone to the layers under it. The grid has pitch (and pitchY; stagger shifts every other row by half a pitch) and starts at the outline's lowest corner or at origin. A via is kept only where its whole pad fits edgeMargin inside the fill and the design rule check names no fault on it, so vias near other nets' copper on any layer they cross are dropped (dropped). The via size comes from the net class (or diameter and drill); from and to default to the outer layers. There is no default pitch: it is the engineer's choice. Without commit the board is unchanged and the reply lists the vias; commit: true adds them as one undo step. Refill the zones afterwards.

board.addViaFence {zone, edge: "board", pitch} runs a fence of the zone's net round the board outline (cut-outs included), or with edge: "zone" round the zone's own outline, offset inside it (by default the board's edge clearance plus the via radius). The vias are spread evenly round the edge itself, so the pitch holds round corners as on the straight. A fence along tracks takes tracks instead.

Each grid or fence committed for a zone is recorded on the zone with its settings and the vias it placed. board.restitch takes those vias away and places them again on the board as it now is, so after moving parts, rerouting or reshaping a zone the stitching follows; one undo step. board.editZone does this for the zone it edits, and board.removeZone removes the zone's recorded vias with it. A group that can no longer be placed (its tracks were deleted) keeps its old vias, and the reply says why.

Copper thieving and copper balance

board.copperBalance lists each copper layer's copper share (its copper area, zone fills, pads, tracks and vias with overlaps counted once, over the board outline's area) and the difference from the layer it mirrors in the stack-up (top against bottom, and so inwards). A layer with much less copper than its mirror plates and etches unevenly and can bow the board.

board.addThieving {layer, size} adds copper of no net to a sparse layer: a zone over the board outline (or outline) whose fill is cut into square dots of side size (pattern: "dots", the default) or a hatch of lines size wide around square openings (pattern: "hatch"). The zone fills after every other zone and keeps keepout (default the board's minimum clearance) from all copper, so it never touches a net; only whole dots and whole openings are made. Without pitch, the pitch is sized so the layer's share comes to target, by default the share of the mirrored layer, and never closer than gap (default the board's minimum clearance) between dots or across an opening. limited says the target is out of the pattern's reach: a hatch keeps a solid border at least its line width wide, so it cannot go as low as dots. A layer already at the target gets nothing. The dot size or line width has no default (ask the fab), nor has the target of a layer that mirrors no other. Without commit the board is unchanged and the reply shows the share before and after, the pitch and the number of dots or openings; commit: true adds the zone as one undo step. The pattern is not stored: every refill (board.fillZones, the fabrication outputs) makes it again around the copper as it then is. Remove it with board.removeZone.

From the menu: Board › Stitching and Thieving

The Board menu's Stitching and Thieving submenu holds the same five commands. Stitching Vias in Zone, Add Via Fence and Add Copper Thieving open their form already filled from the board window: the one zone selected, the tracks selected (a fence along them; with no track selected, a fence round the board edge carrying the zone's net), the active copper layer, and commit: true. The pitch, the via size where the net class has none and the thieving size are left for you to type. Restitch Zones and Copper Balance run at once. The status bar says what each did (vias added and dropped, the copper share before and after, each layer's share and its difference from the layer it mirrors, such as Top 50 % (+37.5 % against Bottom)), and the board is drawn again.

Route one track by hand

board.routeStep {layer, from, to, width} is one step of interactive routing. It returns the centre line (points, metres) of a track on the copper layer layer from from (a pad or a track end) towards the cursor to. The line walks round every other net's copper with the clearance (the board minimum, the fab minSpace, both nets' classes, clearance, barriers), stays inside the outline and keeps out of track keep-outs, so board.drcRun finds no short or clearance fault once it is drawn. net defaults to the net of the copper at from; width defaults to the track width of that net's class, and with no class it must be given. corners is "45" (default: horizontal, vertical and 45° segments), "any", or "arc": the 45° route with each corner rounded by a tangent arc, the largest that fits (half of a leg between two corners, all of an end leg) or at most radius, halved until the arc keeps the clearance as the DRC measures an arc track; a corner no arc clears stays sharp. In arc mode radii gives each inner corner's radius (0 sharp), path the centre line with each arc as its chords, and addTrack carries the radii: board.addTrack {..., radius} (one length for every corner, or one per inner corner) draws the corners as arc tracks in the same undo step.

board.routeShove takes the same params and is the push-and-shove step: the track goes straight through other nets' tracks and vias, which are pushed aside by the clearance. A pushed track bends round the new one with horizontal, vertical and 45° sides; a pushed via moves away and the ends of its tracks follow; pushed copper pushes its own neighbours in turn. Pads, arcs, zones and footprints, locked or not, never move. The step never leaves a fault board.drcRun did not find before: when no push comes clean it falls back to the walk-around track and walkedAround is true. Each step starts from the board as it is, so items pushed for an earlier cursor position spring back. Without commit nothing changes and the reply lists the moved, added and removed items; with commit: true the track and every push are written as one board.undo step.

board.routeHighlight takes the same params (without radius and commit) and is the highlight-collisions step: the track goes straight from from to to through whatever is in the way (a 45° leg then a horizontal or vertical one, or one segment with corners: "any"), and the reply lists in collisions the items it would short or come too close to (other nets' copper, barrier copper, holes, the board edge) and in rules the rules broken, as board.drcRun finds them with the same fab and barriers. Faults the board had before are not listed. It changes nothing; its addTrack params draw the track anyway.

To change layer, board.routeVia {at, from, to} gives the via at the end of the track so far: the net's class via (or diameter and drill) from the copper layer from to to, at at when the design rule check names no fault on it there, else at the nearest such spot within reach (three diameters by default). When it moved, routeTo holds the board.routeStep params that bring the track to it. A fault the via has wherever it goes (a drill or annular ring below the rules) stops the search, and placed is false with the faults. The command only reads the board; addVia holds the board.addVia params.

Check reached. When the cursor cannot be reached the track ends at the clean point nearest it, reached is false and blockedBy lists the items in the way. The command only reads the board: addTrack holds the exact parameters of board.addTrack that draw the track, so run that to keep it.

In the app, the Board tab's Track tool does these steps for you. Click where the track starts; as the pointer moves, the route to it is drawn at its width with the clearance around it (a faint band), round every other net's copper, and the line under the toolbar gives the clearance kept and the length. Where the pointer cannot be reached, the route stops at the nearest clean point, turns amber, and the copper in the way is outlined in red. A click, or letting go after a drag, keeps the route up to there; ending on a pad or track of the same net draws the track (board.addTrack), and Enter or a double click draws it where it is. V keeps the route, drops the via board.routeVia finds at its end (board.addTrack, then board.addVia, the Via tool's sizes or the class's) and goes on from the via on the next copper layer. The Corners switch picks 45°, any angle or arc corners; with arc corners each corner of the route is rounded by the largest arc that keeps the clearance (Arc radius caps it; 0 takes the largest that fits), the preview draws the arcs, and the track is drawn with them. Shove mode routes arc corners as 45° ones. The Mode switch picks Walk around or Shove: in Shove mode the route goes straight through other nets' tracks and vias, which are drawn (amber) where board.routeShove pushes them, and a click writes the track so far, then the step and its pushes as one undo step, and goes on from its end. A push that would break a rule is not made: the route walks round instead and the line under the toolbar says so. In Highlight mode (board.routeHighlight) the route goes straight to the pointer through whatever is in the way, turns amber where it collides, the copper it collides with is outlined in red and the line under the toolbar names it; a click places the track anyway, and Run DRC lists the faults to clear. Highlight mode also routes arc corners as 45° ones. Esc cancels.

Differential pairs, length and skew tuning, teardrops

Name a pair with board.setDiffPair {positive, negative} and give the positive net's class a trackWidth, a pairGap (edge to edge, no less than the clearance between the two nets) and, if the interface limits it, a maxSkew (board.setNetClass). board.routeDiffPair {net, layer, from, to} then routes both tracks side by side at the gap, from the pair's centre between its pads at one end to the centre at the other, round every other net's copper; the pair leaves its pads square and fanout joins each track to its pad. preview: true shows the tracks without writing them. In the app, the Board tab's Diff Pair tool (key 6, as in KiCad; Route › Route Differential Pairs in the studio) does it with two clicks: click between a pad of each net where the pair starts, then between the pads where it ends. A click near the pads lands midway between them and takes the nearer pad's net (or the Net field's), and the pair goes on the active layer as one undo step. Esc drops the start.

board.lengths {} lists each routed net's length against its class's minLength..maxLength window, and each pair's skew and how far it runs coupled at the gap; the DRC flags a net outside the window, a pair over its maxSkew and pair tracks closer than the gap. board.tuneLength {net, target} puts rectangular meanders into the net's longest straight track until it reaches the target (default: the middle of the window); amplitude caps the bump height and spacing sets the gap between bump legs (default: the net's clearance). board.tuneSkew {net} lengthens the shorter net of a pair into its maxSkew. Meanders only add length: a net that is already too long has to be rerouted.

board.addTeardrops {lengthRatio, widthRatio} flares the copper where each track ends on a pad or via of its net, in proportion to the pad's smaller side or the via's diameter; the ratios are saved in the board's rules, a second call redraws, and board.removeTeardrops {} takes them off. A joint where the teardrop would come too close to another net is skipped and listed. Voltecx fills in none of these values: take them from the data sheets, the impedance calculation and your fab.

5. Copper zones

board.fillZones {path, layer, polygons} fills every zone (no layer: every copper layer that has one) and reports each zone's copper area in m², its pieces, the removedIslands and the starvedPads. A starved pad is a thermal pad no spoke reached, so it is not joined to the zone; the notes say so in English and Traditional Chinese. A zone that came out in more pieces than you expected deserves a look too. The command changes nothing in the board.

Draw, edit and remove a zone

board.addZone {net, layers, outline} draws a copper zone on the copper layers layers (by name), inside outline: corners [x,y] in metres, or {"arc":[x,y]}, a point the arc passes through between the corner before and the corner after it. holes are cut-outs drawn the same way. net is the circuit net it fills for (none: unconnected copper). clearance and minWidth override the net class's, a higher priority fills first where zones overlap, padConnection is solid, none or {"kind":"thermal","gap":...,"spokeWidth":...}, and removeIslands drops pieces joined to nothing. The reply gives the new zone id and the refill of its layers. board.editZone {id, ...} replaces only the keys you give (outline without holes keeps the cut-outs, holes: [] removes them, null clears net, clearance or minWidth), and board.removeZone {id} deletes the zone. Each one writes the board file.

Pad connections to a zone: solid, relief or none

How a pad meets a zone of its own net is set at four levels, and the first that sets one wins: pad, then footprint, then net class, then zone. board.setPadConnection {part, pad?, connection} sets it on a pad (without pad, on every pad of the footprint; connection: null clears it). A connection is "solid", "none", or {"kind":"thermal","gap":...,"spokeWidth":...,"spokes":4,"angle":0,"minSpokes":...}. board.padConnections {part?} lists every override and, with part, what each pad gets and from where (source). minSpokes is the fewest spokes that must reach the zone: board.drcRun reports a pad with fewer as starvedThermal, and board.fillZones lists each relief pad's spokes and landed. The gap, spoke width and minimum come from you or the fabricator; Voltecx fills in none. Each change is one board.undo step.

Keep-outs and isolation-barrier keep-outs

board.addKeepout {polygon, layers} draws a keep-out inside polygon (drawn like a zone's outline) on the copper layers (by name, or "all"): no tracks, vias or zone fill by default (noTracks, noVias, noZones), and no part pads with noParts: true. The router and the zone fill keep out of it. board.editKeepout {id, ...} replaces only the keys you give and board.removeKeepout {id} deletes it. board.barrierKeepout {barrier, part} draws the keep-out an isolator needs: the gap between its primary and secondary pad rows on every copper layer, at least the barrier's clearance and creepage wide (from design.safety or the engineer; without either it refuses). board.drcRun with the same barrier reports barrierOverlap for copper of the two sides overlapping on different layers and for tracks, vias or pads inside the barrier keep-out. Each one writes the board file and is one board.undo step.

Net classes and board rules

board.setNetClass {class, values, nets} writes a net class into the board's rules: values holds clearance, trackWidth, viaDiameter, viaDrill, minTrackWidth, maxTrackWidth, maxLength (metres) and current (RMS amperes for the width-for-current check). A key you give sets the value, null clears it, a key you leave out stays. nets puts those nets in the class (in Default, they leave their own class), and remove: true deletes the class and sends its nets back to Default. board.setRule {...} sets the board-wide limits: minClearance, minTrackWidth, minDrill, minAnnularRing, edgeClearance, maxDrill, holeToHole (metres), maxAspectRatio and temperatureRise (K). Voltecx fills in no value: take them from your fab's capability sheet or a cited standard. Each reply carries the DRC findings on the copper the change reaches, and each call is one undo step.

board.rules {} shows every rule at once: the board-wide limits, each class with its values and the nets it reaches, the patterns and the rule areas. board.setClassPattern {pattern, class, at} puts the nets whose names match a glob (GATE_*, V??) in a class; patterns are tried in order and the first match wins, and a net named with board.setNetClass keeps its class. remove: true deletes a pattern. board.setRuleArea {name, polygon, layers, priority, class, overrides} draws a rule area: inside the polygon, on those copper layers and for that class's nets, the overrides (clearance, trackWidth, viaDiameter, viaDrill) replace the class values, and where areas overlap the higher priority wins. Call it again with the same name to change part of it (rename, null clears an override) or with remove: true to delete it. In the board window, Board › Rules… (or the Rules… button beside Stack-up…) opens the rule editor beside the board, in five tabs: the board limits (with the minimum mask web and the silk-to-mask gap), the net classes with their values and how many nets each reaches (Add Class, Remove), the class patterns in the order they are tried (▲ and ▼ move one, Add Pattern), and the rule areas highest priority first (▲ and ▼ raise or lower the priority by one, the overrides typed in place), and the board-wide solder mask and paste rules (mask expansion and paste expansion in mm, which may be negative, and the paste ratio from 0 to 1, all board.setRule; a footprint's or pad's own rule still wins). Add Layer Rule draws an area over the board outline on one copper layer, or all of them: a rule by layer. Lengths are typed in mm; Enter applies a field and an empty field clears it. A value the editor refuses keeps its reason under the page until a value is accepted there. Each edit is one undo step, and the DRC overlay reads the rules again. board.citedRules {kind} lists the cited rule set of the PCB design guide with each rule's bound, condition and source page, and board.applyCitedRule {id, field, class} writes one of its lengths into a class value or a board-wide limit; check the rule's condition against your board first.

6. Check the board

board.drcRun {} runs the design rule check. Each net's RMS current from the last simulation sets the width it needs (IPC-2221 section 6.2, 10 K rise unless the rules' temperatureRise says otherwise); "stale": true in the reply means the board changed since that run, so simulate again. Useful parameters:

  • currents {net: amps} adds nets the simulation does not cover.
  • barriers [{name, sideA, sideB, clearance, creepage, source}] checks the copper across an isolation barrier, with the distances design.safety gives, in metres.
  • fab {minTrace, minSpace, minDrill, ...} takes numbers from your fabricator's capability page. A rule with no value is not checked, and the reply says so; do not call a board clean on a rule it did not check.
  • fab also takes a built-in profile by id (jlcpcb-2layer, jlcpcb-multilayer, pcbway-standard, oshpark-2layer, oshpark-4layer); board.fabProfiles {} lists them with each limit and the capability page it is cited from. In the Board window, pick one under Fab on the step bar: Run DRC (and the check after each edit), Check Board, and Board › Design Rule Check and Auto Route then use it, and hovering the picker shows its source. Board rules only checks the board's own rules.

Rule areas count in the check: inside an area on its layers its clearance replaces the net class's, even when lower, and its trackWidth is the minimum for a track lying wholly inside it; the board's and the fab's minimums still hold. Off the copper the check finds silk closer to a solder mask opening than the silkToMask gap (silkToPad; the openings as the fabrication files draw them, pads grown by their mask expansion), two mask openings closer than minMaskWeb, which the fabrication files would merge (maskSliver), and the courtyards of two fitted parts on one face overlapping (courtyardOverlap, IPC-7351B; touching is allowed, DNP parts are skipped and a part with no courtyard is named in notes). Drill to drill is the holeToHole rule. Silk and sliver checks run only when their rule is set.

violations lists each rule, the items and at position, and measured against required in metres, with message and messageZh. widths lists the width needed beside the width drawn, per net and layer, and notes says what was not checked and why (a layer with no copper thickness, for one). The IPC-2221B clearances are a board rule, not a safety creepage: an isolation barrier needs the distances design.safety gives.

In the studio the list under Run DRC has three tabs, each with its count: Violations (every copper, hole, mask and current rule), Unconnected (nets whose pads the copper does not join yet, rule unconnected) and Schematic parity (circuit parts that belong on the board and have no footprint on it, rule missingFootprint). A click on a row selects the items it names and zooms onto it, in any tab. Outside the studio the list is one list.

Board-only parts on the schematic

Mounting holes, fiducials, standoffs and logos can sit on the schematic as board-only parts (in the library panel's Sources group: Mounting Hole, Fiducial, Standoff, Logo; kind boardPart). They are never simulated and never written to the netlist, whatever their simulate switch says, and the circuit checks skip them. They start out of the BOM and on the board, and the schematic tags them board only; turn the BOM switch on for a standoff you buy with the board, and its BOM line buys the part number in its part parameter (a line that says so when it names none; nothing is picked for it). The KiCad schematic export leaves board-only parts out, as they have no symbol, and its warnings name them. A mounting hole has one pin, mh: leave it open for a bare hole, or put it on a chassis or PGND net for a plated hole that grounds through its screw. The hole, pad and keep-out sizes are yours: give them to board.addMountingHoles and board.addFiducials.

Test points

board.testPoints {} places and reviews the circuit's test points on the board. Each test point is moved beside the nearest pad of another part on its key net (rails, switch nodes, gates, PWM, feedback, sense), with its ground point right beside it, clear of every other footprint and inside the outline; locked points stay. Without "apply": true the moves are a proposal and nothing is written; with it the board file is written in place. "place": false only checks.

findings is the layout review, each with English and Traditional Chinese text: noTestPoint (a key net has none: add one on the schematic with design.debugAids {"include":["testPoints"]} and sync the board, because the schematic comes first), noGroundPoint, groundTooFar, padTooSmall, probeBlocked (another part on the test point's side sits where the probe's barrel goes: within half the probe kind's bodyMm of the pad), bothSides, and unknownProbe, unknownGroundDistance or unknownProbeAccess when no probe kind with a cited source gives that size, so it is not checked. The switch node and the gates are measured through the Tektronix 3.5 mm probe's circuit-board adapter (131-5031-00): their ground point must be within its 0.205 in (5.207 mm) hole spacing and the 3.429 mm barrel needs room round the pad. Placing keeps that room clear. Pass your own roles and probe kinds in rules (each probe kind with its source); never invent a probe's pad size or ground distance. In board.layoutReview with an enclosure whose areas come off the mechanical drawing, a test point or its ground point whose pad lies under a height-limited area of its face is probeCovered: the probe cannot reach it with the board in its case, so it fails serviceReady.

Service access and silkscreen

board.serviceCheck {"labelHeight": 1e-3} puts every reference designator, and every test point's net name, beside its part on the silkscreen: above, below, right or left of it, clear of every part, a word space (the stroke font's own space) clear of every other silk text, designators included, and inside the outline. When a label has no other room, its part's designator moves to another free spot beside its part. Without "apply": true the labels are a proposal; with it the board file is written in place. Without a labelHeight (or a cited rules.minTextHeight) no label is placed, because no text height is built in.

findings, in English and Traditional Chinese: noLabel, labelHidden (the text lies over a part), labelAstray (nearer another part), labelCrowded (closer than a word space to another silk text, so the two read as one word), textTooSmall, noPolarityMark (a diode, electrolytic or battery whose silkscreen does not tell its ends apart), noVoltageWarning (a high-voltage net from highVoltageNets, or a DC source at or above highVoltage {"volts", "source"}, with no warning beside it), noBoardName, noRevision, headerNotKeyed and headerFarFromEdge for the debug and programming headers (found by their SWD, JTAG, UART, enable and reset nets, or named in debugHeaders), and wearNoAccess for a fan, electrolytic, fuse or battery that cannot come out without removing another part. Keying and tool clearance come from the part's data sheet in fit; a finding named unknown... means that number was not given and is not checked.

Review the power layout

board.layoutReview {} reads the board only; it changes nothing. Name each hot (commutation) or gate loop by its pads in order, loops [{name, kind:"hot"|"gate", pads:["Q1.D",...], maxArea, maxLength, kelvin, source}], and it measures the loop's area (m²) and length (m) along the routed copper against your limits. A limit with no source is not invented: the loop is reported by its measured area instead. A gate loop must pass the switch's kelvin source pad. The same call checks the distance of sense nets from switch-node aggressors, the Kelvin routing of shunts, clearance by working voltage (voltages, IPC-2221B table 6-1 column B2), isolation barriers, track width for current and zone necks, thermal vias in each power pad against the data sheet's minVias, each ties ground pair joined at exactly one part, and return-path breaks over a gap in a returnNets plane.

passed is true only when there are no findings. Each finding has its rule, at, layer, value against limit and unit, the limit's source, and message with messageZh. Fix the findings on the schematic or board, run it again, and read notes for what was not checked.

Compare the circuit before and after layout

Board › Compare Before and After Layout (layout.compare {}) runs the circuit twice: first without the routed board's stray inductances and capacitances, then with them put in (one undo step). The result window shows one table: each measure (efficiency at full and at half load, the loss in each part, each power loop's switch peak, overshoot and ring frequency, conducted and radiated EMI margin, the hottest case and junction, each board net's DC drop and the copper loss, each switch's gate overshoot, the spec) before and after layout, the difference, the limit it is held to and its verdict after layout. Above the table are the pass, fail and not-checked counts of each side and the measures that passed before and fail after. The efficiency limits (the half-load row only from a spec efficiency point at half the full-load current; every other spec efficiency point, at another load or input voltage, gets a row of its own, measured at that load and line on each side), the junction limit and the spec check come from the design spec stored with the circuit (spec.set, or the one Auto Design stored); with no stored spec those rows are not checked. Each part with a junction temperature on the board also gets its own row, held to its own rated junction limit (the part's tjMax, else its library device's data-sheet value), with or without a spec. The board's temperatures are solved at the spec's hottest ambient (its ambient, or the top of its range), where the spec check reads its junction row; with no ambient in the spec, at board.thermal's default 40 °C. A measure with no limit is not checked, never a pass; Details says why. Copy gives the whole reply.

The DC drop rows (a .vxpcb board only) are each current-carrying net's largest drop at a load after layout, held to its net class's maxDrop, and copperLoss, the board's I²R, which the simulated efficiency leaves out; before reads 0 (ideal wires). The gate rows are for a MOSFET at level dynamic: the peak gate-source voltage less von, held to the part's vgsMax less von: its own vgsMax param, else its library device's data-sheet vgsMax (without either the row is notChecked and says so). A second row per switch, gateUndershoot.<switch>, is the lowest gate-source voltage (the ring below the off level voff), held to the part's vgsMin, its own param, else its library device's data-sheet value. After is run on a scratch copy that adds the board's common-source inductance to the switch's lcs and the rest of its gate loop's inductance to its lg (the gate loop inductance, in series with the driver), so a fast gate drive that rings over von on the board shows here; the open circuit keeps its own lcs and lg.

The radiated rows split the estimate. Before layout it assumes a 1 cm² hot loop and 10 pF from the switch node to the chassis; after layout it reads the board: each complete power loop at its own current, and each switch node's copper over a chassis or heat-sink fill. The differential-mode (loops) and common-mode (cable) margins are held to the limit line like the total. After layout, each loop's own field and each switch node's common-mode share get a row of their own, with no limit: they add up to the total, so the largest one is the place to shrink the loop or move the fill.

The EMI rows follow the spec's emi block (spec.set or the spec you pass; emissions are not part of spec.verify itself): its limit, or class A or B as CISPR 32, is the conducted line, and a CISPR 32 class is also the radiated line (the radiated estimate has CISPR 32's lines only, so a CISPR 11 or CISPR 25 spec keeps it on class B and its Details say so). With targetMarginDb (or marginDb) the conducted row must reach that margin, shown as its limit; without one it passes at the line.

To keep or send the comparison, pass its reply to layout.compareReport {compare, path?, format?, lang?}: it writes the same table, with the pass, fail and not-checked counts, the regressions, each row's reason, the warnings and notes and the schematic after layout, as one HTML page, Markdown or a PDF, in English or Traditional Chinese (lang: "zh-Hant"). It runs nothing again and adds no undo step, so the same reply gives the same report. In the app, Export report… above the result table does this: pick a file name, and its extension (.html, .md or .pdf) sets the format; the report is in the app's language.

Plan the grounds and copper pours

board.groundPlan {} proposes the ground strategy, the copper pours and the layer of each net from the circuit, and checks the plan with numbers. Run board.autoPlace first and, when the circuit has control parts, schematic.splitGrounds, so PGND and AGND exist. With one ground it plans a solid plane; with PGND and AGND it plans a PGND plane with an AGND island over the control parts, joined at one net tie (strategy.kind is singlePlane or star). The plane goes on the first inner layer, else the bottom. Power nets and the switching node pour on top, sized for each net's RMS current from the last simulation (IPC-2221 section 6.2, 10 K rise unless the rules say otherwise; currents {net: amps} adds or overrides nets), and sensed nets go on the far side of the plane.

Without "apply": true nothing is written: the checks run on a copy with the plan added, so the numbers are there before you accept it. They report planeSplit, returnPath, noTie and extraTie (PGND and AGND must meet at exactly one footprint) and pourCapacity (the narrowest width of each pour's fill and the current it carries). With "apply": true the zones and the PWR_<n>A net classes are added and the board file is written; applying twice adds nothing. Through-hole pads on a pour are listed in reliefPads for a thermal relief you set; no gap or spoke value is invented. IPC-2152 charts are not shipped, and widthSource says so.

Board temperatures

board.thermal {} turns the board's copper, vias, stack-up and outline into a grid of square cells (cellSize, default 10 mm) and solves the steady temperatures. Run simulation.run {} first: each part's loss of that run (t0, t1 pick the window, default its second half) enters at the cell of the part's largest pad, or pass losses [{part, lossW, rjc?, toAmbient?}] to try a number without a run. Copper on each layer joins neighbouring cells (400 W/mK, the layer's thickness, else 35 µm per oz), the dielectric (lambdaD) and the vias (viaPlatingOz, filledVias) join the layers, and each cooled face (cooled: both, top or bottom) reaches ambient through h. A part's junction-to-case resistance is its library device's, and a heatsink on its thermal net is in parallel with the board.

Read parts (caseC and junctionC for each part, onBoard false for one with no footprint, which keeps the circuit's own thermal path), hottest, maxC and rises (the temperature rise of every cell, per layer). The command changes nothing: edit copper, vias or a pour, then call it again to see the change. A layer with neither a thickness nor an oz weight, a dielectric with no thickness, or more than 250000 cells per layer is refused by name; Voltecx fills in no value. These are steady temperatures; for a startup or a pulse add transient (below).

Add transient: {tEnd, steps?, profile?, dielectricCv?} to step the same grid in time from the ambient: the copper stores its heat (the planes and traces, and each via's barrel, half to each layer it joins), each loss is scaled by profile ([[s, factor]], default 1), and transient.parts gives each part's caseC and junctionC at every time in transient.times, with transient.peak saying how hot and when. No laminate heat capacity is built in: pass dielectricCv from the laminate's data sheet, or the board warms faster than it would. To heat the board as the run itself did, set transient.followRun: true instead of a profile: each part's loss then follows its own loss waveform over the run's window (t0, t1; pass t0: 0 for the startup), the mean over each step, the window repeating past its end, and tEnd defaults to one window. transient.followRun.held names any part whose loss has no waveform in the run; it is held at its mean. A part whose library device carries a junction-to-case Foster chain (its data sheet's transient thermal impedance Zth,jc), or a losses entry with zthJc: [{r, tau}] (then rjc defaults to the sum of r), has its junction follow that chain above its case, so a pulse shorter than the package's time constants no longer lifts the junction by the whole loss × Rjc at once; transient.parts[].zthStages says how many stages it followed. A part without a chain, or whose chain the CSV import made up from Rth,jc alone with an assumed 1 ms time constant (named in transient.notes), sits loss × Rjc above its case. The chain sits on top of the case node, which takes the whole loss at once.

A track or plane neck that carries a large current heats the board by itself. Add copperHeat: {nets: [...]}, naming the nets as board.irDrop takes them (below), and each net's DC current is solved over its copper and every small cell's I²R loss goes in as heat on its own layer beside the parts' losses. Read copperHeat.heatW, the heat that goes in (the total, and per net in copperHeat.nets): it is the heatW board.irDrop gives for the same nets. A {net} whose loads come from the last run heats with their RMS current over the run's window, so an inductor's ripple counts; its loss at the mean current stays in lossW. A net whose loads you give heats at that DC loss. The copper's resistance is taken at copperHeat.temperatureC, the ambient unless you give a hotter one; it is not recomputed from the temperature found unless you add copperHeat.coupled: true. Then each cell's heat follows its own temperature, 1 + 0.393 % per kelvin at 20 °C (IEC 60028): the steady map is solved with the heat at the temperatures it finds, copperHeat.coupledHeatW gives that heat, and in a transient each step's heat is taken at the temperature the step starts from. The currents stay where the IR solve put them, so a hot cell sheds no current to cooler parallel copper (board.irDrop's thermal re-solves the currents). If the copper makes heat faster with temperature than the board sheds it, the call is refused as thermal runaway: there is no steady temperature, and the transient stops when the copper passes 1000 °C, naming the time. With transient.followRun, each net named by net (its loads from the run) also follows the run: its copper heat in each step is its DC loss times the step's mean of the square of its loads' total current over the DC current squared, so a startup or an overload pulse heats the copper as it heats the parts, and the ripple counts by its RMS. transient.followRun.copper gives each net's meanFactor; a net whose loads you gave is held at its DC loss and says why.

The same call then reports how hot each conductor of those nets runs, in copperHeat.traces and copperHeat.vias. Each track, arc and via shows its DC current (currentA) and two rises side by side. ipc2221RiseK is the IPC-2221 §6.2 conductor formula solved for that current, using the outer or inner constant for a track and treating a via as its plated barrel. It is flagged as IPC-2221 because IPC-2152's charts are not shipped. offChart marks a rise outside the formula's 10–100 K range. boardRiseK is the hottest board cell along the conductor on its own layer, so the parts' heat and the board's cooling are in it. worstConductor names the highest IPC-2221 rise. With transient in the same call, each conductor also gets transientPeakRiseK (and transientPeakC), the hottest its board cells get at any time of the transient, and transientPeakAtS, when that is first reached, so an overload pulse shows how hot a track ran even after it cooled. Add transient.conductorRises: true to get each conductor's whole curve too: transientRiseK holds its board rise at every time of transient.times, ready to plot a track's warm-up during a startup. A track shorter than one IR cell has no current; a smaller copperHeat.cellSize reads it.

Leave nets out after a run, copperHeat: {}, and every board net the run puts current through heats the copper, chosen as board.irDrop {} chooses them; copperHeat.skipped lists the nets left out and why. In the Board window, Board temperature draws this map for the active layer with the copper's own heat in it: the nets the Current density overlay last solved (its board.irDrop request, grid and window), else every net the run puts current through. Under the scale it says how many watts of copper I²R heat went in and from how many nets, and the conductor with the worst IPC-2221 rise is outlined in red on the map. When no copper carries the run's current (nothing routed yet), the map shows the parts' heat alone and the line under the toolbar says why the copper's heat was left out.

DC IR drop and current density

board.irDrop {nets: [...]} solves the DC current of each power net you name over the board's copper and gives the voltage drop at every load pin, the current of every via and the current density of every cell. Name each net by its pins: sources (the pins that feed it, such as a regulator's output pad) and loads, each with the currentA it draws (from the design's operating point or the average current of a run). A net's tracks, arcs, pads, pours and vias become a grid of square cells (cellSize, default 0.5 mm); copper of other nets never joins it. Copper thickness comes from the stack-up (its finished thickness, else 35 µm per oz) and resistivity from IEC 60028 annealed copper at temperatureC (default 20 °C, rising 0.393 % per kelvin). Each pin is an equipotential terminal over its pad, and a through-hole pin joins all its layers. A via's barrel meets each layer's copper all round its hole, so the cells inside the hole are one node: with cells finer than the drill, a plane fed by a via spreads from the hole wall, as ρ/(2π t)·ln(r/r_hole) says. A pad on a thermal relief meets its pour only through the spokes that land, each a strip of the spoke's width across the gap, so a relief's drop reads true even with cells wider than its gap; keep cellSize at or under the spoke width for a drop within a cell over the length.

After a simulation run, name a net by net instead: board.irDrop {nets: [{net: "VOUT"}]} takes its loads from the run. Every pad of a circuit part on the net draws that pin's mean current over the run's second half (t0/t1 choose another window, given back as window), and a pin's current is split evenly over its pads on the net. The source is the pad that puts the most current in. When the current enters from a part with no footprint (a bench supply, a connector the circuit does not have), name that pad in sources. Each net says where its loads came from in loadsFrom.

A load sees its supply's drop and the rise of its own ground. Add returnNet to a net ({net: "VOUT", returnNet: "GND"}, or with sources and loads) and the return is solved too, as one more entry of nets that names its supply in returnOf. Its reference is returnSources, else every pad on the return of the supply's source parts (a regulator's or connector's ground pad); a source with no pad there, an inductor say, needs returnSources. A net from the run takes the return's currents from the run as well, every part's return current included; with given loads, each load's current comes back through its part's pads on the return. Each load then gives returnRiseV, how far its ground pad sits above the reference, and loopDropV, the supply drop plus that rise: the load gets the source's voltage less loopDropV. loopWorst names the worst load, and maxLoopDropV sets loopPass. In the return's entry, dropV is that rise, positive where the current comes back.

To check the whole board at once, leave nets out: board.irDrop {} solves every board net the last run puts current through, each the way {net} does, in name order (at most 64). A net with no pad that feeds it, nothing that draws from it, a pin the run did not record, or a load no copper reaches is left out and listed in skipped with why (noFeeder, noLoad, noCurrent, solve) in English and Traditional Chinese, instead of failing the call. Name such a net in nets with its sources to solve it.

Copper that runs hot drops more. Add thermal: {...} (board.thermal's settings: losses, ambient, h, cooled, cellSize, lambdaD; leave losses out after a run to take the run's) and board.irDrop first solves the board's steady temperature with the parts' losses and these nets' own I²R heat, then solves the drop again with each cell's copper at the temperature found: a link takes the resistivity at the mean of its two cells' temperatures, a via at the mean of its two layers'. temperatureC then defaults to the ambient, and temperatureFrom says thermal. The reply's thermal lists in nets each net's worst drop and loss at the board's temperature beside the uniform temperatureC ones (uniformDropV, uniformLossW), and in maxC the hottest point. By default it is one pass: the heat is found with the copper at temperatureC, so a net whose copper runs much hotter than the ambient reads a little low. Set thermal.passes (1 to 20) to iterate: each further pass heats the copper at the temperature the pass before found, and the passes stop once the copper moves less than thermal.tolK (default 0.01 K). thermal then gives passes, each pass's largest temperature change in changesK, and converged. Each change is about the first pass's drop rise x₁ (drop over the ambient's, minus 1) times the one before, so the drop settles at the ambient's drop divided by 1 − x₁. When the change stops shrinking, the copper heats itself faster than the board sheds the heat: the passes stop, runaway is true and a note says so. Widen the copper or cool the board.

To keep a limit with the board, set maxDrop (V) on the net class (board.setNetClass {class: "Power", values: {maxDrop: 0.05}, nets: ["VOUT"]}). board.irDrop uses it for a net that gives no maxDropV and says so in maxDropFrom. The design rule check then solves every net of such a class with the last run's currents, the same way, and reports a load pin past the limit as irDrop at its pad, with the drop and the limit in volts; drops lists each net it checked. Without a run, or for a net it cannot solve (nothing on the board feeds it), a note says IR drop was not checked.

To hold the loop to a limit too, name the class's return and set maxLoopDrop (V): board.setNetClass {class: "Power", values: {returnNet: "GND", maxLoopDrop: 0.08}}. The design rule check then solves each net of the class with that return, as returnNet does above, and reports a load whose loop drop (its supply drop plus its ground pad's rise) is past the limit as irLoopDrop at its pad, in volts; loops lists each net it checked with its worst load and the return's reference. The reference is the supply's source parts' pads on the return, and when the source has none (an inductor feeding the output), the return pad that takes the most current out of it in the run, where its current goes home (returnFrom: "run"). maxLoopDrop needs a returnNet, and the return cannot be a net of the class. A class with no return, a load with no pad on the return, or a return that cannot be solved gets a note, not a pass. In the Board window, Rules… › Net classes shows both on each class's row: type the net in Return net and the limit in Max loop drop (V), then press Enter. The limit needs the return net first, and the return net cannot be cleared while a limit is set.

Read each net's loads (dropV, dropMv), worst, pass against the net's maxDropV, vias (busiest first; rmsCurrentA beside the mean currentA) and maxDensityAPerMm2. A net whose loads come from the last run also gives its RMS density over the run's window, ripple included: maxRmsDensityAPerMm2 and map[].rmsAPerMm2. With limitAPerMm2, hotSpots lists the cells whose RMS density is over it, densest first, since a current-density limit is a heating limit; for loads you give, the RMS density is the mean one. No limit is built in, so take one from your design rule. The Board window's Current density button draws the last call's map on the active layer as RMS density in A/mm² (rmsAPerMm2, so a rippled net shows the density hotSpots judge), the cells over the limit outlined, and runs the same request again after each board edit. Over the copper it labels the vias that carry the most with their RMS current (up to 24, each carrying at least a tenth of the busiest one), and the scale names the busiest via's current, so a via array that shares its current unevenly shows at once. Beside it, Voltage drop draws the same map's dropV instead: how far each cell's copper is below its net's source, in mV, so the copper where the drop builds up shows at a glance. A copper layer with no thickness, a via through a dielectric with no thickness, or a load no copper reaches is refused by name. The per-cell losses (map[].lossW) are the copper's I²R heat. DC only.

Near field

The Board window's Near field button draws the magnetic near field of the board's hot loops under the copper: emi.nearField (chapter 6, Near-field map of the board) on the open project's board, at the first switching harmonic at or above 30 MHz (or the strongest of its lobe when that one is in a null of the spectrum) and 10 mm above the top copper unless the last request you ran says otherwise. The hot spots are ringed and numbered over the copper, strongest first, and the scale beside the board gives the frequency, the height, the strongest cell in dB(µA/m) and the loop that makes hot spot 1. Each cable connector of the board (the cables[] rows of emi.nearField, read from connector and terminal-block footprints) gets a square on its position and a label with its reference and the field over it in dB(µA/m), placed off the board where there is room; the scale names the connector with the strongest field and how far that is under the strongest cell, since a cable plugged in where the field is strong carries it off the board. Cells more than 40 dB under the strongest are left out, so the board stays readable where the field is low; that is a display choice, not a limit. The map is read again after each board edit, so moving a part or a track shows at once. Only one map of cells shows at a time: turning on Near field turns off the temperature and current-density maps, and the other way round. When the command cannot map the board (no routed board, or no complete hot loop with a known current), the window shows its reason instead of a map. It is an estimate to find which loop to fix, not a scan.

Power devices on a shared heatsink

board.alignToHeatsink {heatsink, parts, pitch?, edge?, order?, holes?} lines up TO-220 and TO-247 parts that share one heatsink: their tab holes go on the heatsink footprint's hole line at its hole pitch, in power-path order, with the leads pointing away from it. Place the heatsink's footprint first. The pitch is read off the footprint when it has evenly spaced holes; otherwise pass pitch from its data sheet, or the command refuses and says what is missing. placed gives each hole and rotation, and misfits lists the parts left where they were (locked, no tab hole, off the outline) with the reason. One undo step. Check the result with board.layoutReview {heatsinks: [...]}, which needs the heatsink's potential and the clearance under its body from the data sheet.

Review comments

board.addComment {item, text} (or at: [x, y]) pins a design-review comment to a board item (its id from board.items); board.comments {open?, item?} lists them and marks orphaned the ones whose item was deleted; board.editComment {id, text?, resolved?} and board.removeComment {id} change them. They are kept in a .vxreview file beside the board, so the board itself does not change.

In the board window, the Review comments switch at the end of the side panel shows a numbered pin for each comment and their list. Write a comment, then press Add Comment to pin it to the one selected item, or Pin to a Point and click the board where it goes.

Lock footprints

board.setLocked {refs, locked} (or ids) locks or unlocks footprints. A locked footprint is not moved, turned, flipped or deleted, by the board commands or by board.autoPlace, so lock the connector or the part a mechanical drawing fixed before you place the rest. It is one undo step.

7. Compare two versions

board.diff {a, b} compares two boards (each a path, {path} or {text}; with only a, it compares that file with the open project's board). Footprints are matched by their circuit part and everything else by its stable id, so a part placed again is one change, not a removal and an addition. Each row of items is added, removed, moved (with delta in metres, or a turn or flip) or changed (with the .vxpcb fields that differ), and names its nets. board lists stack-up, outline, rule and name changes. nets.touched are the nets whose copper changed: the ones to check again after a review. The lines are ready-made sentences in English and Traditional Chinese. The command changes nothing.

highlight.removedBoxes gives where each removed item was on the old board (bbox in metres), so a view of the new board can mark the spot.

In the board window, Compare with a saved board near the end of the side panel takes the path of another version of the board (a copy kept in git or a fab release). Compare boxes every change on the open board: green added, amber changed, blue moved, and a dashed red box where each removed item was. The changes are listed below it; click one to select its item and zoom onto it. Hide clears the boxes.

8. Fabrication files

board.exportFab {path, folder, maxError} fills the zones and writes the fabrication set into folder (by default fab next to the board):

  • one Gerber X2 file per copper layer, and for both faces the solder mask, the paste and the legend. Every Gerber says it describes a single board (.Part,Single), that it shares the board's origin with the others (.SameCoordinates,board), and ends with its .MD5 signature (Ucamco Gerber 2024.05, §5.6.2, §5.6.5, §5.6.9), so a file damaged on its way to the fab is found; the panel's files say .Part,Array and .SameCoordinates,panel, because their origin is the panel's. The pads of the circuit's test points (testPoint parts, open the circuit first) are marked TestPad on the outer copper (§5.6.10), so the fab's bare-board tester knows where to probe; inside the board a drilled test point's ring stays a component pad. An exposed (thermal) pad is marked HeatsinkPad instead of SMDPad (§5.6.10: thermal pads have their own function), while its thermal vias stay component pads: the exposed pads of ic.place packages and of footprint.ipc7351 (a quad's exposed pad, the TI RGT0016C's pad 17) are marked for you, and in the footprint editor any surface pad takes "heatsink": true. A KiCad footprint or board whose pad carries KiCad's own mark, (property pad_prop_heatsink), is read the same way, and the KiCad export writes the mark back. Nothing is guessed from a pad's size, so an older placed footprint stays SMDPad until it is placed again;
  • for each face whose fab layer has anything on it, the assembly drawing -fab-top.gbr or -fab-bottom.gbr (Gerber X2 file function AssemblyDrawing): the part outlines, texts and shown footprint fields on the fab layer, such as a KiCad part's Value. It is for the assembler and reviewer; nothing on it is printed on the board;
  • for each face with drawings on its adhesive layer (F.Adhes, B.Adhes, the glue dots of a KiCad board), the glue file -glue-top.gbr or -glue-bottom.gbr (Gerber X2 file function Glue, Gerber Layer Format Specification 2024.05 §5.6.3), for dispensing glue before soldering;
  • the board profile;
  • one Excellon drill file for each span and plating. The plated holes of a part whose fitting data says press-fit (footprint.setInfo fit with mount: pressFit, from its data sheet) are marked ComponentDrill,PressFit, and its Gerber X3 component entry has the mount type Pressfit (Gerber 2024.05 §5.6.10, §5.6.16), so the fab sizes those holes for pressed leads; without that data a part is never marked press-fit. A plated hole (a via or a pad's hole) that the board edge or a cut-out cuts through is a castellated hole, for soldering the board onto another: its drill tool is CastellatedDrill and its pads CastellatedPad on every copper layer (Gerber 2024.05 §5.6.10: "Plated holes cut- through by the board edge; used to join PCBs"). A hole the edge only touches is not one. The job file then says "Castellated": true (and "Press-fit": true for press-fit holes; Gerber Job Format 2020.08 §2.4);
  • the pick-and-place files for assembly: -pos.csv and JLCPCB's -cpl.csv, without parts not fitted, with each part's value from the open circuit.
  • the Gerber X3 component layers -component-top.gbr and -component-bottom.gbr for an assembler that reads them: for the same parts, each part's reference point, rotation, value, footprint, mount type (TH or SMD), maker and part number, the footprint's library, the LCSC number as the supplier part when the footprint's LCSC field gives one (a KiCad part's), its body height in mm when its library footprint gives a cited height (Footprint editor, or footprint.setInfo) or the parts catalogue knows its package body (left out otherwise, never guessed), its courtyard outline and a mark at each pin with its net and the port it joins (the pin function, which the Gerber specification asks for beside the pin number), pin 1 (or A1) marked with a diamond. The pads of the outer copper layers carry the same pin number and port. A bottom part's rotation is counted from the top zero flipped about x, as the Gerber specification asks, so it is the position file's rotation plus 180°.
  • the bill of materials: -bom.csv and JLCPCB's -bom-jlcpcb.csv, one line per value, package and part number, for the same parts. The part number comes from the part's catalogue part, its device or the IC part it was placed as; the notes name the lines that have none.
  • the stack-up drawing -stackup.svg for the fabricator: each layer from top to bottom with its copper number, kind, thickness, copper weight, Dk and material (not to scale), and the finished thickness. A value the stack-up does not hold is written as "not given" and the total as unknown, and the notes say so: set the values from your fabricator's stack-up (board.setStackup) or agree them in the order.
  • the Gerber job file .gbrjob (Ucamco Gerber Job Format), which a fabricator's software reads for the quote and the set-up: the board size, the copper layer count, the board thickness, the material stack-up from top to bottom with each dielectric's thickness, Dk, loss tangent and material, the outer and inner design rules (minimum clearance, track width, annular ring and edge clearance), and the layer of every Gerber and drill file. Only what the board holds is written: a thickness or rule you have not set is left out, never filled with a default. Copper is given its finished thickness as a note, because the job file's copper thickness is the foil before plating. layout.extract reads the whole set back through this file (path to the .gbrjob) once the stack-up gives every dielectric thickness.
  • the project and revision in every file: once the board has a project GUID (board.setTitle {"projectGuid": "new"} makes a random RFC 4122 version 4 one; give the project its GUID once and keep it for every revision), each Gerber and drill file carries .ProjectId,<name>,<GUID>,<revision> in its header and the job file GeneralSpecs.ProjectId (Ucamco Gerber 2024.05 §5.6.8, XNC 2021.11 §4.1, Gerber Job Format 2020.08 §2.4), so the fab can check that every file it was sent belongs to the same revision. Raise the revision with board.setTitle for each build. Without a GUID nothing is written: only the project's owner can name it. The job file leaves it out when the name or revision holds a comma, which its strings may not.
  • the finished-hole tolerance: board.setDrillTolerance {"plated": {"plus": 7.5e-5, "minus": 7.5e-5}, "nonPlated": {...}} records how far a finished hole may come out larger and smaller than drawn, for the plated and the unplated holes, as your fab gives it (nothing is built in). Each drill file then carries it on every tool as .DrillTolerance,<plus>,<minus> in mm (Ucamco Gerber 2024.05 §5.6.11, XNC 2021.11 §4.1), and board.fabNotes lists it. A mixed panel's drill file carries it only when every board gives the same one.
  • <board>-fab.zip, the one file to upload to the fabricator: every Gerber and drill file the job file names, the job file and the stack-up drawing, byte for byte the files beside it (ZIP, deflated, no folders). The position files and BOMs are left out; they go to the assembler.

A board with no outline is refused, because the profile is required; draw one rather than expecting a default. The reply's notes list text items that are not drawn yet, and its upload line says which files go to the fabricator and which to the assembler. The board is not changed.

board.fabNotes {path} reads the drill table and fabrication notes off the board; board.writeFabNotes {path, folder} writes them into the same folder as -drill-table.csv (each hole size, slot, plating, span and use with its count and symbol, and the total) and -fab-notes.txt (the notes numbered, then what the board does not hold under "To give in the order": a layer thickness or rule it lacks, and always the surface finish, solder mask colour and acceptance class). Nothing is filled in for you. When the board has holes it also writes the drill map -drill-map.gbr (Gerber X2 file function Drillmap): the outline, every hole at its finished size and place with its drill-table symbol beside it, and the drill table as a legend right of the board. Its letters are textHeight and textWidth tall and thick when you give them, else the board's silk reference designator size, else its tallest silk text; when the board has none, no map is written and the reply's drillMap.why says so. With an outline and the same text size it also writes the fabrication drawing -fab-drawing.gbr (Gerber X2 file function FabricationDrawing): the outline with its overall width and height as dimension lines, and right of it the stack-up from top to bottom (thickness, copper weight, Dk and material, "not given" where the board has none), the finished thickness, the numbered notes and the values to give in the order; without a text size the reply's fabDrawing.why says so. The map and the drawing are for people: the drill files stay the holes the fabricator drills, and board.checkFab lists both without checking them.

board.picture {side, assembly: true, image, svg} draws the assembly drawing for the pick-and-place and rework stations: the pads of one face with the silkscreen (reference designators and polarity marks), the fab and courtyard outlines, the holes and the board edge, and no tracks, pours, vias or far-face copper. Run it once for top and once for bottom; the bottom is mirrored, as the turned-over board reads. image writes a PNG, svg an SVG in millimetres. Under the board a parts table lists each part on that face (reference, value, footprint, position and rotation in board coordinates, DNP marked), sorted by reference. The value is the open circuit's, as in the position file; a part that is on no circuit part reads -, and with no circuit open the table has no value column.

Panels

board.panelise {columns, rows, gap, rails, breakaway, fiducials?, tooling?} steps the board into a fabrication panel and returns each copy's offset, the milled outline, vScores, tabs, mouseBites, fiducials and toolingHoles in metres. breakaway is "vScore" (with gap 0) or {kind: "tabs", width, perEdge, bites?: {diameter, pitch}}. Every size comes from the fabricator's panel rules or from you. V-score needs a rectangular outline. Tabs take any outline, round corners included: the copies are stepped by the outline's bounding box and the milling follows the real edge. A tab that would land on a round corner or a notch is refused, naming its side and number; use fewer or narrower tabs. Any other refusal names the size at fault. The command changes nothing.

To put several different boards in one panel, pass designs: [{path, count}] (up to 32 .vxpcb files) instead of path. The boards fill the grid row by row from the bottom left in the order given, the cells left over stay solid, and every cell is as large as the largest design; each copy in boards names its design. V-score needs every design to be a rectangle of the same size. With tabs, each board sits in its own milled ring gap wide, with tabs on every edge that is not the panel edge and mouse bites on the board end of each tab, and neighbouring rings are kept a solid web apart (by default as wide as the gap). board.exportPanelFab takes the same designs and web; with several designs boardLayers writes one file per layer holding every design's copies, and every design needs the same number of copper layers.

board.exportPanelFab {folder, boardLayers, maxError, textHeight, textWidth, ...the panel of board.panelise} writes the files the panel adds: <board>-panel-profile.gbr (the material left after milling, the board cut-outs as holes), the rails' fiducials as copper and solder-mask openings on both faces, <board>-panel-vcut.gbr with every V-score line drawn right across the panel (Gerber file function Vcut; only for a V-scored panel), and <board>-panel-NPTH.drl with the tooling holes and mouse bites. Their tools say which is which: MechanicalDrill,Tooling for the tooling holes that hold the panel while it is made and MechanicalDrill,Breakout for the mouse bites (Gerber 2024.05 §5.6.10), so the fab's CAM does not take a mouse bite for a mounting hole. It also writes <board>-panel-drawing.gbr, the array drawing (Gerber file function ArrayDrawing, Gerber 2024.05 §5.6.3) for the people who make and assemble the panel: the panel profile, every copy's outline labelled with its row and column (and its design in a mixed panel), the V-score lines, fiducials, tooling holes and mouse bites at their place and size, and a legend with the panel size, the grid, the designs and the hole counts and sizes. Its letters and lines take textHeight and textWidth, else the first board's silk reference size, else its tallest silk text; with none of them it is not written and arrayDrawing.why says what to give. The drawing adds nothing to the data files: the profile, V-cut and drill files stay the panel. Tabs are material, so the panel profile holds them. With boardLayers: true it also writes every copper, mask, paste, legend and coat Gerber and the drills of the board, with all copies at their panel offsets, the circuit's test points are TestPad on the outer copper of every copy, and the plated holes of a part whose fitting data says press-fit (footprint.setInfo fit, or its catalogue row) are ComponentDrill,PressFit in the drills of every copy (Gerber 2024.05 §5.6.10), as in board.exportFab (in a mixed panel only on the open project's board, since another design's parts are not this circuit's); the board's own profile is left out because the panel profile replaces it. The rails' fiducials then go on the board's own outer copper and solder-mask files, and the tooling holes and mouse bites into its unplated through drill file, so the set has one file per layer and reads back as one board (no separate -panel-fid-* or -panel-NPTH.drl). Without it, send the set of board.exportFab beside these files and give the fabricator the step and repeat from board.panelise. No Gerber job file is written for the panel: the Gerber Job Format describes one board and leaves panels out (Ucamco, Gerber Job Format 2020.08, §2.1), so send the board's own <board>.gbrjob from board.exportFab, which gives the board size, layer count and stack-up; the notes say so. The board file is unchanged.

3D view and STEP

board.view3d {} builds the board in 3D from its own data: every stack-up layer as thick as the stack-up says (a copper layer with no finished thickness takes its copper weight at 35 µm per ounce, TI AN-2020; a layer with neither stops the command and is named), the outer copper, the plated holes, the silk, and the solder mask as the mask rules draw it (board.setRule maskExpansion, minMaskWeb, viaMask, or a class's or a pad's own): copper inside an opening is bare and the rest lies under the mask. With no mask rule a pad's opening is at copper size and a via is tented, and mask in the reply counts both. Each part gets its KiCad 3D model from modelDir (or the KICAD8_3DMODEL_DIR KiCad sets), else the box or can of its package's data-sheet outline when the catalogue has one (an outline read for one part number, such as the half-bridge's 22 x 30 mm snap-in can, is drawn only for a part with that part number, since the same footprint carries taller cans); any other part has no body and parts says why. Voltecx never guesses a body. image draws a PNG; in the app, Board > 3D View shows it live (chapter 13).

board.exportStep {out} writes the assembled board as a STEP file (AP214, closed faceted solids in metres, z up from the board's bottom face) for an enclosure or a mechanical CAD tool: the laminate with its holes, each face's copper as thick as its layer, and each fitted part's KiCad STEP model (the .step KiCad ships beside the .wrl) or its cited package body. The mask and the silk have no thickness, so they have no solid. maxError (default 10 µm) sets how closely the round edges are followed. The reply gives solids, bounds and each part's status.

9. Review comments, cut-outs, alignment and KiCad round trips

Design-review comments

board.addComment {item | at, text, author} pins a comment to a board item (its stable id, from board.items) or to a point at in metres; one of the two is required. Comments are written to a review file beside the board (<board>.vxreview), and the board itself is not changed. board.comments {open, item} lists them in the order they were added (open: true only the unresolved, false only the resolved); target names the item each is pinned to, and orphaned marks a comment whose item has since been deleted. board.editComment {id, text, resolved} changes the text or marks a comment resolved or open again, and board.removeComment {id} deletes it.

Cut-outs and slots

board.addCutout {polygon | slot} cuts a hole through the board. polygon takes vertices as board.setOutline does; slot {from, to, width} is a milled slot, the stadium that a bit of width cuts from centre from to centre to (from equal to to drills a round hole of that diameter). The cut-out must lie wholly inside the outline and meet no other cut-out; copper or holes inside it are refused, and each is named. It goes on the profile Gerber, and the edge clearance check and the zone fill keep away from it. notes compare a slot's width with the slot-width rules, with their source. board.removeCutout {index} removes one (the indices are in board.get's outline.cutouts). Each is one board.undo step; board.redo does a taken-back edit again.

Text, alignment and heatsinks

board.addText {layer, at, text, height, strokeWidth} puts a line of text on a silk, fabrication, mask or copper layer, drawn in the stroke font; text on a bottom layer is mirrored so it reads from below. missing lists characters the font has no glyph for (for example CJK): they are left out of every output, never replaced. board.align {ids | refs, edge} lines up two or more items by their boxes (left, right, top, bottom, centreX, centreY, or distributeX and distributeY for equal gaps); items only move, and a locked footprint is refused. board.alignToHeatsink {heatsink, parts} turns and moves through-hole switches so each tab hole sits on the heatsink footprint's device-hole line. The pitch comes from the footprint's holes, else from pitch, else the command says what is missing; nothing is assumed. Parts that cannot be placed stay where they are and are listed in misfits.

Check a fabrication set

board.checkFab {folder, fab} compares the files board.exportFab wrote with the board before you order: one copper file per layer, the profile, masks, paste, drill files whose hole count and sizes match, and, when present, the position file and BOM. A Gerber whose contents no longer match its .MD5 signature was changed or damaged after it was written: that is the error md5-mismatch, and the fix is to export again. The upload archive <board>-fab.zip must match the files beside it: an entry that differs from its file (archive-stale), a layer, drill or job file it lacks (archive-missing) or an archive that does not read (archive-unreadable) is an error, fixed by exporting again; an entry with no file beside it is the warning archive-extra. The board's own rule check must pass as well. With fab (jlcpcb-2layer, pcbway-standard, ...) its published limits are measured too, including its legend: silk text lower than the smallest character height the fab prints legibly, or drawn with a thinner stroke, is a warning (legend-height, legend-width). pass is true when there is no error, and the summary says "ready to order" only then; each finding is an error, warning or note with a code and, where it has one, a position in millimetres. When the board has a project GUID (board.setTitle), each file's .ProjectId must name the board's project and revision: files of another project (project-other) or of an older revision (project-revision) are errors, so after raising the revision export the set again; files under another name (project-name) or with no .ProjectId (project-unnamed) warn. board.reviewFab {folder, atMm, radiusMm} instead loads any fabrication set, including one someone else designed, and lists each file's extent, apertures, nets and drill tools, and the project, GUID and revision its .ProjectId names; when the files name different projects or revisions, or some carry none beside others that do, its warnings name them, since such a set may mix two builds; with atMm it lists what lies under that point. In the board window, the side panel's Fab set to review draws such a set over the board: type its folder (relative to the project) and press Load fab set; each Gerber file is a see-through colour and the drill files are drawn on top, each switched on or off by its name, and the Measure tool reads distances on it. With Probe the set on, a click on the board lists what of the set lies there instead of selecting: each file's flashes, draws, regions and holes, with their nets, functions and sizes. Both commands only read.

KiCad boards

board.openKicad {kicad, path, replace} reads a .kicad_pcb (KiCad 6 to 10) as a Voltecx board with layers, nets, footprints, tracks, vias, zones, keep-outs and the outline; each item keeps the id of its KiCad uuid. Cut-outs of zones, keep-outs, drawn polygons and custom pads come across both ways. An outline edge drawn as a Bézier curve (gr_curve) reads as short straight segments within 1 µm of the curve and is written back as part of the outline polygon; a curve on a silk, fab, copper or other board layer, or in a footprint (fp_curve), reads as short straight lines of its width within 1 µm of the curve, and is written back as those lines. A text box (gr_text_box, or fp_text_box in a footprint, where the texts and border belong to the footprint) reads as one text per line, each where KiCad draws it in the box, plus its border as an outlined polygon of the border's width, and is written back as those texts and that polygon; KiCad also breaks a line too long for its box at a space by its own letter widths, so such a line reads unbroken and warnings names it. A dimension (dimension) that is aligned, orthogonal or a centre mark reads as the lines KiCad draws for it (extension lines, crossbar and arrows, or the cross), each of the dimension's line width, plus its text where KiCad draws it, and is written back as those lines and that text, no longer tied to what it measures. A dimension in a footprint reads the same way, its lines and text belonging to the footprint. A dimension's text that KiCad places itself (outside the crossbar and turned with it) reads where KiCad puts it on open, even when the file holds an older place, as it does for a footprint flipped in KiCad. A leader or radial dimension is left out, and an aligned or orthogonal one with its text on its crossbar reads with the crossbar whole where KiCad breaks it round the text; both end at a box KiCad takes from its own font, and warnings names them. A layer alignment target (target, a plus or an x) reads as the circle and the two lines KiCad draws for it, each of the target's line width, and is written back as that circle and those lines. A zone or keep-out inside a footprint reads as a zone or keep-out of the board, where KiCad has it, and is written back as a board zone; the board model has no zone of a footprint, so it no longer moves with the footprint, and warnings names each one. A reference image (image, a PNG on a layer at a scale) is kept with the board and written back as KiCad saves one; like KiCad, Voltecx draws no image into the Gerbers or other outputs. An image inside a footprint reads as an image of the board, where KiCad has it (KiCad does not turn an image with its footprint), and is written back as a board image; it no longer moves with the footprint, and warnings names each one. An image on the outline layer is left out and warnings names it. A group (group) reads into the board's groups with its name, its lock, its items and the groups inside it, and is written back the same way. A dimension in a group puts all its lines and its text in it; a member the board does not hold as an item (a line of the outline) leaves the group and is named in warnings; and an item two groups list goes to the later one, as KiCad loads it. A custom pad reads as its anchor joined with the copper of all its primitives, as KiCad merges them: a filled polygon, rectangle or circle grown by half its line width, and a line, arc, Bézier curve or outline (a rectangle, circle or polygon that is not filled; a circle's is a ring) as its stroke of that width with round ends, curves as short straight segments within 1 µm. It is written back as one filled polygon. A primitive that draws no copper (a line of no width) or cannot be read, or copper in separate pieces (only the largest is kept), is listed in warnings. A chamfered pad and a trapezoid pad read as a polygon pad of the outline KiCad draws (round corners as short straight segments within 1 µm of the arc), and are written back as KiCad custom pads of that outline. So do footprint texts: the reference designator is KiCad's Reference field, at the place, size and angle of the part's silk reference text, and a footprint's own texts are KiCad user texts. A text KiCad keeps upright reads at the angle KiCad draws it. Drawings and texts on the user layers (Dwgs.User, Cmts.User, Eco1.User, Eco2.User, User.1 to User.9), on the board or in a footprint, are kept on their layer and written back on it; no Voltecx output draws them. The same holds for the Margin layer. Drawings and texts on the adhesive layers (F.Adhes, B.Adhes: the glue dots that hold a part for wave soldering) are kept on their face, go to the other face with a part flipped to the bottom, and are written back on their layer; board.exportFab writes them as the glue file of their face (-glue-top.gbr, -glue-bottom.gbr). A filled circle on any layer (a glue dot, a silk dot) reads as the disc KiCad fills and is written back as a circle line that covers the same disc. A knocked-out text ((layer .. knockout), letters cleared from a filled box), on the board or in a footprint, keeps its knock-out and is written back knocked out; Voltecx draws it and makes its outputs as plain letters for now, and warnings says so for each one. A footprint's own text that KiCad hides (hide, or (hide yes)) is kept with the footprint where it was, drawn and checked by nothing in Voltecx, and written back hidden. The coating keep-outs are written on Eco1.User (top) and Eco2.User (bottom), which the layer table then names F.Coating and B.Coating, so they open again as keep-outs, also after KiCad has saved the board. What the board model cannot carry (a footprint's value text) is listed in warnings. board.saveKicad {kicad, path, replace} writes a KiCad 8 board the same way. KiCad keeps a board's design rules in the project file, so board.saveKicad also writes them into the .kicad_pro of the same name beside the board, and board.openKicad reads them back from there (rules says what it read): the board minimums (clearance, track width, through-hole drill, via annular ring, hole-to-hole, copper-to-edge) and each net class's clearance, track width and via size, with the nets assigned to it. A project already there keeps its other settings; a file there that is not a KiCad project is left alone and warnings says so. A class value left unset takes the Default class's value when it comes back, as KiCad reads it. Rules the project file has no key for (via plating, temperature rise, mask and paste rules, a class's other values) are named in warnings. The gallery buck and half bridge, laid out by the board bar, come back from KiCad with every item and the same DRC result. To refresh a board KiCad has already edited, use pcb.syncBoard with toKicad, which keeps KiCad's own fields. Neither command changes the circuit.

KiCad libraries

footprint.importKicad {from, licence, folder, names, overwrite} brings a KiCad footprint library (a Lib.pretty folder) or one .kicad_mod file into the project's footprints/ library. Each footprint keeps the library's licence text unchanged (licence is the text or {path} of the file that holds it) and names the file it came from. With no licence the reply warns, so find and record it before you ship a board made with those footprints. A file that fails to read is listed and the others still come in; items the reader leaves out are listed per footprint in skipped, and a trapezoid pad fails that footprint naming the pad. Pads at any angle come in turned, and a chamfered pad (KiCad's chamfered rectangle, with square or rounded other corners) comes in as a polygon pad of the same outline, its rounded corners drawn as short straight segments within 1 µm of the arc. A custom pad comes in as one polygon pad: its anchor (rectangle or disc) joined with its filled polygon primitives, a primitive with a width grown by half that width. A custom pad whose pieces don't touch, or with hollow polygons, lines, arcs, circles or rectangles among its primitives, fails, naming the pad. Run footprint.check on them before placing. Existing footprints are kept unless overwrite is true.

symbol.importKicad {path|text, names, prefix, licence} adds the part symbols of a .kicad_sym library to the project as user symbols: a box with the visible pins, named like the KiCad pins and numbered like the footprint's pads, placed by electrical type. Hidden pins and power flag symbols are left out, a symbol whose name already exists is kept (kept), and the whole import is one undo step. An imported symbol binds to no model until symbol.bind. A symbol with several units (a dual op-amp, or a relay's coil and contacts) comes in as one box holding every unit's pins, each pad number once (units in the reply). A De Morgan alternate body style is not drawn, and its pins add nothing to the box. A derived symbol (KiCad's extends) comes in with its parent's pins and its own properties, falling back to the parent's Reference, Value, Footprint and Datasheet where it leaves them empty. Alternate pin functions (a microcontroller pin's other roles) are counted in the reply (alternates) but not drawn. A library KiCad itself would refuse to open is refused with the reason: a unit symbol not named after its symbol, an unknown pin type or style, or a parent that is missing or comes later in the file. Each imported symbol keeps the library and symbol it came from (source) and the library's licence text unchanged (licence, the text or {path} of the file that holds it; symbol.get shows both). With no licence the reply warns, so find and record it before you ship a design drawn with those symbols. library.importKicadTable passes its licence and licences to symbol rows as it does to footprint rows.

Limits

  • The stack-up values, the via plating and the fabricator's capabilities are yours to supply. Voltecx ships none it has not read from a cited page.
  • Auto-routing is a first pass for review, not a finished layout, and it leaves out the special nets listed in section 4.
  • If you keep working in KiCad, file.exportKicad writes a schematic, a project file and a rules file from the circuit, and places the footprints in a saved .kicad_pcb given as board; pcb.sync keeps that project in step. See chapter 9.