via and double-sided pad

This commit is contained in:
Bane Stojkovic
2026-11-12 10:48:19 +01:00
parent d166c58161
commit 3049d4910c
11 changed files with 465 additions and 16 deletions
@@ -57,6 +57,8 @@ projects; the open questions below remain.
| Bottom-side text is mirrored centrally in the Gerber output | Parts draw their labels readable from the top, which is backwards on the bottom silkscreen once the board is turned over. While `GerberExporter.drawComponent` draws a bottom-side part, `GerberG2DWrapper.setMirrorText` mirrors each string about the centre of its layout box, so no component changes and the canvas keeps readable labels. |
| A part without a side placed in the mirror is placed unchanged | A jumper, eyelet or wire has no side to set, so it is placed at the reflected point like any other part rather than refused. |
| A `SolderPad` opens the solder mask on its own side | It used to write `SolderMaskBot` whatever its layer, which was wrong for top-layer pads. It now writes `SolderMaskTop` for a pad on `_2`. |
| A `SolderPad` with a plated through hole is on both layers, and its Layer is ignored | A plated hole has a copper ring on each side joined by the barrel. The pad reports layer id `0`, which connects to copper on every layer, draws as both sides, and writes both copper and both mask layers. Projects where such a pad overlaps a trace on its other side now net differently; PTH is not the default and arrived with Gerber export, so few projects are affected. |
| `Via` is its own component, not a `SolderPad` option | It takes no lead and no node name, is tented (no mask opening), and has its own Gerber functions, `ViaPad` and `ViaDrill`. Like the PTH pad it reports layer id `0`. It has no Board Side, like `DrillHole`. |
## 3. Design
+2 -1
View File
@@ -67,7 +67,8 @@ were regenerated for the faded copper. The open questions below remain.
- `ProtoBoard` declares its underside traces and underside mini pads `_1`.
- `CopperTrace` and `PCBText` declare their whole canvas `draw` on `getLayer()`. `CurvedTrace` and
`GroundFill` declare their copper fill. `SolderPad` declares the pad on its layer and its
drilled hole as both sides.
drilled hole as both sides; a pad with a plated through hole declares its pad as both sides
too, because it has copper on both. `Via` declares its copper and hole as both sides.
- `TraceCut` draws its cut and hole as both sides.
### diylc-swing
+2 -1
View File
@@ -116,7 +116,8 @@ the gap always matches the drawn copper.
| --- | --- |
| `CopperTrace` | Stroked line, current thickness and `LineEndingStyle` cap |
| `CurvedTrace` | Stroked curve, same stroke as `draw()` |
| `SolderPad` | Pad outline per `Type` (round, oval H/V, square); the drill hole is ignored |
| `SolderPad` | Pad outline per `Type` (round, oval H/V, square); the drill hole is ignored. A pad with a plated through hole is on both layers, so it clears fills on both |
| `Via` | Round copper outline, on both layers like a plated pad |
| `PCBText` | Glyph outlines (confirm it is copper and not silkscreen before including) |
`PCBTerminalBlock` tracks no continuity and is not layered today, so it waits for phase 2.