copperflow 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -4
- package/dist/app/assets/NewPartDialog-ZQ4Y3m45.js +1 -0
- package/dist/app/assets/PackagesDialog-C8ZyWl-g.css +1 -0
- package/dist/app/assets/PackagesDialog-vEzilmpR.js +2 -0
- package/dist/app/assets/{VerifyPartDialog-Ey6xpQ_U.js → VerifyPartDialog-DYr1UIds.js} +2 -2
- package/dist/app/assets/footprint-preview-Nyk2poiN.js +160 -0
- package/dist/app/assets/index-BUjGdMvr.js +20 -0
- package/dist/app/assets/index-CF7-tL4t.css +1 -0
- package/dist/app/index.html +2 -2
- package/dist/cli-commands.js +21 -0
- package/dist/cli-commands.js.map +1 -1
- package/dist/core/model-export.d.ts +33 -0
- package/dist/core/model-export.js +33 -0
- package/dist/core/model-export.js.map +1 -0
- package/dist/core/packages.d.ts +18 -0
- package/dist/core/packages.js +49 -0
- package/dist/core/packages.js.map +1 -0
- package/dist/core/render.d.ts +2 -1
- package/dist/core/render.js.map +1 -1
- package/dist/engine/footprints/array.d.ts +4 -0
- package/dist/engine/footprints/array.js +51 -0
- package/dist/engine/footprints/array.js.map +1 -0
- package/dist/engine/footprints/axial.d.ts +6 -0
- package/dist/engine/footprints/axial.js +115 -0
- package/dist/engine/footprints/axial.js.map +1 -0
- package/dist/engine/footprints/catalogue.d.ts +39 -0
- package/dist/engine/footprints/catalogue.js +284 -0
- package/dist/engine/footprints/catalogue.js.map +1 -0
- package/dist/engine/footprints/chip.js +10 -1
- package/dist/engine/footprints/chip.js.map +1 -1
- package/dist/engine/footprints/connector.d.ts +16 -0
- package/dist/engine/footprints/connector.js +31 -0
- package/dist/engine/footprints/connector.js.map +1 -0
- package/dist/engine/footprints/dcjack.d.ts +3 -0
- package/dist/engine/footprints/dcjack.js +46 -0
- package/dist/engine/footprints/dcjack.js.map +1 -0
- package/dist/engine/footprints/dpak.d.ts +7 -0
- package/dist/engine/footprints/dpak.js +172 -0
- package/dist/engine/footprints/dpak.js.map +1 -0
- package/dist/engine/footprints/dual.d.ts +11 -2
- package/dist/engine/footprints/dual.js +113 -12
- package/dist/engine/footprints/dual.js.map +1 -1
- package/dist/engine/footprints/index.js +46 -3
- package/dist/engine/footprints/index.js.map +1 -1
- package/dist/engine/footprints/inductor.d.ts +3 -0
- package/dist/engine/footprints/inductor.js +32 -0
- package/dist/engine/footprints/inductor.js.map +1 -0
- package/dist/engine/footprints/known.js +114 -14
- package/dist/engine/footprints/known.js.map +1 -1
- package/dist/engine/footprints/ledsmd.d.ts +3 -0
- package/dist/engine/footprints/ledsmd.js +52 -0
- package/dist/engine/footprints/ledsmd.js.map +1 -0
- package/dist/engine/footprints/ledth.d.ts +4 -0
- package/dist/engine/footprints/ledth.js +45 -0
- package/dist/engine/footprints/ledth.js.map +1 -0
- package/dist/engine/footprints/melf.d.ts +8 -0
- package/dist/engine/footprints/melf.js +56 -0
- package/dist/engine/footprints/melf.js.map +1 -0
- package/dist/engine/footprints/plcc.d.ts +4 -0
- package/dist/engine/footprints/plcc.js +117 -0
- package/dist/engine/footprints/plcc.js.map +1 -0
- package/dist/engine/footprints/resonator.d.ts +3 -0
- package/dist/engine/footprints/resonator.js +33 -0
- package/dist/engine/footprints/resonator.js.map +1 -0
- package/dist/engine/footprints/screw.d.ts +3 -0
- package/dist/engine/footprints/screw.js +51 -0
- package/dist/engine/footprints/screw.js.map +1 -0
- package/dist/engine/footprints/smallsot.d.ts +8 -0
- package/dist/engine/footprints/smallsot.js +143 -0
- package/dist/engine/footprints/smallsot.js.map +1 -0
- package/dist/engine/footprints/smdbox.d.ts +33 -0
- package/dist/engine/footprints/smdbox.js +76 -0
- package/dist/engine/footprints/smdbox.js.map +1 -0
- package/dist/engine/footprints/smdcan.d.ts +3 -0
- package/dist/engine/footprints/smdcan.js +61 -0
- package/dist/engine/footprints/smdcan.js.map +1 -0
- package/dist/engine/footprints/smdip.d.ts +4 -0
- package/dist/engine/footprints/smdip.js +58 -0
- package/dist/engine/footprints/smdip.js.map +1 -0
- package/dist/engine/footprints/socket.d.ts +8 -0
- package/dist/engine/footprints/socket.js +21 -0
- package/dist/engine/footprints/socket.js.map +1 -0
- package/dist/engine/footprints/sod.d.ts +6 -0
- package/dist/engine/footprints/sod.js +63 -6
- package/dist/engine/footprints/sod.js.map +1 -1
- package/dist/engine/footprints/sot.d.ts +1 -1
- package/dist/engine/footprints/sot.js +17 -2
- package/dist/engine/footprints/sot.js.map +1 -1
- package/dist/engine/footprints/tact.d.ts +3 -0
- package/dist/engine/footprints/tact.js +65 -0
- package/dist/engine/footprints/tact.js.map +1 -0
- package/dist/engine/footprints/tantalum.d.ts +7 -0
- package/dist/engine/footprints/tantalum.js +91 -0
- package/dist/engine/footprints/tantalum.js.map +1 -0
- package/dist/engine/footprints/to92inline.d.ts +14 -0
- package/dist/engine/footprints/to92inline.js +21 -0
- package/dist/engine/footprints/to92inline.js.map +1 -0
- package/dist/engine/footprints/topower.d.ts +7 -0
- package/dist/engine/footprints/topower.js +119 -0
- package/dist/engine/footprints/topower.js.map +1 -0
- package/dist/engine/footprints/usb.d.ts +32 -0
- package/dist/engine/footprints/usb.js +109 -0
- package/dist/engine/footprints/usb.js.map +1 -0
- package/dist/engine/footprints/xtal.d.ts +4 -0
- package/dist/engine/footprints/xtal.js +61 -0
- package/dist/engine/footprints/xtal.js.map +1 -0
- package/dist/engine/rules/rotations.d.ts +12 -3
- package/dist/engine/rules/rotations.js +77 -2
- package/dist/engine/rules/rotations.js.map +1 -1
- package/dist/engine/solid/heights-smd.d.ts +3 -0
- package/dist/engine/solid/heights-smd.js +81 -0
- package/dist/engine/solid/heights-smd.js.map +1 -0
- package/dist/engine/solid/heights-through.d.ts +7 -0
- package/dist/engine/solid/heights-through.js +93 -0
- package/dist/engine/solid/heights-through.js.map +1 -0
- package/dist/engine/solid/heights-uno.d.ts +2 -0
- package/dist/engine/solid/heights-uno.js +15 -0
- package/dist/engine/solid/heights-uno.js.map +1 -0
- package/dist/engine/solid/heights.d.ts +2 -0
- package/dist/engine/solid/heights.js +43 -18
- package/dist/engine/solid/heights.js.map +1 -1
- package/dist/mcp/guide.d.ts +3 -1
- package/dist/mcp/guide.js +15 -4
- package/dist/mcp/guide.js.map +1 -1
- package/dist/mcp/model-tool.d.ts +31 -0
- package/dist/mcp/model-tool.js +27 -0
- package/dist/mcp/model-tool.js.map +1 -0
- package/dist/mcp/server.js +2 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/render/render.js +1937 -260
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
- package/skills/copperflow/references/design-rules.md +9 -6
- package/skills/copperflow/references/editable-subset.md +18 -8
- package/skills/copperflow/references/parts-library.md +2 -1
- package/skills/copperflow/references/writing-circuits.md +6 -0
- package/dist/app/assets/NewPartDialog-BBJaZFCo.js +0 -160
- package/dist/app/assets/index-BKoIKo22.css +0 -1
- package/dist/app/assets/index-DPmr2dR1.js +0 -20
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.4.
|
|
1
|
+
export declare const VERSION = "0.4.1";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.4.
|
|
1
|
+
export const VERSION = "0.4.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copperflow",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Design circuits in code with a human and an AI agent editing the same files.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Eren Kürpe",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@babel/parser": "8.1.0",
|
|
46
46
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
47
47
|
"clipper-lib": "6.4.2",
|
|
48
|
+
"earcut": "3.2.4",
|
|
48
49
|
"esbuild": "0.28.2",
|
|
49
50
|
"magic-string": "1.4.5",
|
|
50
51
|
"yaml": "2.9.1",
|
|
@@ -87,12 +87,15 @@ globalNets: [GND, V24, V3_3]
|
|
|
87
87
|
left out), and `fabrication.pasteReduction` how far the solder paste shrinks inside each SMD pad
|
|
88
88
|
(0 when left out); both may be 0. The fabrication (Gerber) files use them.
|
|
89
89
|
- `fabrication.placementRotations` adds degrees (counter-clockwise) to the parts' rotation in the
|
|
90
|
-
pick-and-place file, per footprint family: `chip` (0603, 0805 ...), `sod
|
|
91
|
-
`sot223`, `sot89`, `soic`, `sop`, `
|
|
92
|
-
`
|
|
93
|
-
`
|
|
94
|
-
`
|
|
95
|
-
|
|
90
|
+
pick-and-place file, per footprint family: `chip` (0603, 0805 ...), `sod` (also MELF), `sot` (SOT-23
|
|
91
|
+
and the small SOTs), `sot223`, `sot89`, `soic`, `sop`, `ssop`, `tssop`, `msop`, `qsop`, `qfn`, `dfn`,
|
|
92
|
+
`qfp`, `lqfp`, `tqfp`, `bga`, `sma`, `smb`, `smc`, `do214ac`, `do214aa`, `do214ab`, `tant`, `array`,
|
|
93
|
+
`dpak` (also `to252`), `d2pak` (also `to263`), `plcc`, `smdip`, `dip`, `axial` (also `do35` ...),
|
|
94
|
+
`to220`, `to247`, `to126`, `to92`, `hc49`, `hc49s`, `hc49smd`, `xtal`, `radial`, `smdcan`, `ledth`
|
|
95
|
+
(`led3mm`, `led5mm`), `ledsmd` (`led3528`, `led5050`), `pinrow`, `pinrow2x` (two-row headers),
|
|
96
|
+
`socket`, `socket2x`, `screw`, `resonator`, `usb`, `dcjack`, `tact`, `ind` and `file` (footprint files). Left out, `soic`, `sop`, `ssop`, `tssop`,
|
|
97
|
+
`msop` and `qsop` are 270 and `sot` and `sot223` 180, the corrections commonly used for JLCPCB's
|
|
98
|
+
part models; the small SOTs (`sot323`, `sc70`, `sot143` ...) take `sot`'s 180 because they are drawn as SOT-23 is, which has not been checked in the assembly preview for each, so set `sot` to override; every other family is 0. JLCPCB's assembly preview is the final check: set a family only after the
|
|
96
99
|
preview shows its parts turned, for example `placementRotations: { qfn: 270 }`, and `0` takes a
|
|
97
100
|
default back out. A library part drawn with its own footprint file can have
|
|
98
101
|
its own correction by its id under `parts`, which takes the place of the `file` family's for that
|
|
@@ -59,24 +59,34 @@ copperflow makes the pads itself from these `footprint` strings (case does not m
|
|
|
59
59
|
|
|
60
60
|
| Family | Strings |
|
|
61
61
|
|---|---|
|
|
62
|
-
| Chip resistors, capacitors, LEDs | `0201`, `0402`, `0603`, `0805`, `1206`, `1210`, `1812`, `2010`, `2512` |
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
62
|
+
| Chip resistors, capacitors, LEDs | `01005`, `0201`, `0402`, `0603`, `0805`, `1206`, `1210`, `1812`, `2010`, `2220`, `2512` |
|
|
63
|
+
| Resistor arrays | `array4x0603`, `array4x0402`, `array2x0402` |
|
|
64
|
+
| Diodes | `sod123`, `sod123f`, `sod323`, `sod523`, `sod923`, `sod128`, `sma`, `smb`, `smc` (also `do214ac`, `do214aa`, `do214ab`); MELF `minimelf` (`sod80`, `do213aa`), `melf` (`do213ab`) |
|
|
65
|
+
| SOT-23 | `sot23`, `sot23_5`, `sot23_6`, `sot23_8`, `sot143` |
|
|
66
|
+
| Small SOT | `sot323` (`sc70`), `sot353` (`sc70_5`), `sot363` (`sc70_6`), `sot523`, `sot563`, `sot723` |
|
|
67
|
+
| Power SOT, DPAK | `sot223`, `sot89`, `dpak` (`to252`), `d2pak` (`to263`), `d2pak_5`, `d2pak_7` (tab is pad 2) |
|
|
68
|
+
| Tantalum (moulded) | `tant_a` … `tant_e`, or `tant3216`, `tant3528`, `tant6032`, `tant7343` (pad 1 is +) |
|
|
69
|
+
| SOIC, SOP, SSOP, TSSOP, MSOP, QSOP | `soic<N>` (3.9 mm body, N even 8–16), `soic<N>w` (7.5 mm body: 16, 18, 20, 24, 28), `sop<N>` (5.3 mm, 1.27 mm pitch, N even 8–16), `ssop<N>` (5.3 mm, 0.65 mm pitch: 14, 16, 20, 24, 28), `tssop<N>` (4.4 mm, 0.65 mm pitch, N even 8–28), `msop8`, `msop10`, `qsop<N>` (N 16, 20, 24, 28) |
|
|
70
|
+
| Exposed pad on those | `soic8_ep<w>x<h>`, `msop8_ep…`, `msop10_ep…`, `tssop<N>_ep…`: the size is required (bare `_ep` is refused); the pad is number N+1 |
|
|
67
71
|
| QFP | `qfp32`, `qfp48`, `qfp64`, `qfp100`; by body and pitch `qfp<N>_<b>x<b>_p<pitch>` such as `lqfp64_10x10_p0.5` (`lqfp`, `tqfp` are the same) |
|
|
68
72
|
| QFN | `qfn16`, `qfn32`, `qfn48`, and with the exposed pad `qfn16_ep`, `qfn32_ep`, `qfn48_ep`; by body and pitch `qfn<N>_<b>x<b>_p<pitch>` with an optional `_ep<size>` or `_ep<w>x<h>`, such as `qfn32_5x5_p0.5_ep3.1` |
|
|
69
73
|
| DFN | `dfn<N>_<across>x<along>_p<pitch>`, `_ep` as for QFN, such as `dfn8_3x3_p0.65_ep1.6x2.4` |
|
|
70
74
|
| BGA | `bga<N>_<x>x<y>_p<pitch>`, a full grid, optional `_rows<R>x<C>`, such as `bga256_17x17_p1` |
|
|
75
|
+
| PLCC, SMD DIP | `plcc<N>` (N 20, 28, 32, 44, 52, 68, 84), `smdip<N>` (N 4, 6, 8, 16) |
|
|
71
76
|
| DIP (through-hole) | `dip<N>`, rows 7.62 mm apart unless `_w<mm>`, such as `dip28_w15.24` |
|
|
72
|
-
| TO packages (through-hole) | `to220`, `to92` |
|
|
73
|
-
|
|
|
77
|
+
| TO packages (through-hole) | `to220`, `to220_2`, `to220_5`, `to247`, `to126`, `to92` (`to92_inline`, straight 1.27 mm leads, is refused: no lands meet the rules; use `to92`) |
|
|
78
|
+
| Axial (through-hole) | `axial<body length>x<lead spacing>` with optional `_d<body diameter>`, such as `axial6.3x10.16_d2.5`; diodes `do35`, `do41`, `do15`, `do201ad` (pad 2 cathode) |
|
|
79
|
+
| LEDs | `led3mm`, `led5mm` (through-hole); `led3528`, `led5050`, `led5050_6` (surface mount) |
|
|
80
|
+
| Crystals | `hc49`, `hc49s` (through-hole); `hc49smd`, `xtal2016`, `xtal2520`, `xtal3225`, `xtal5032`, `xtal5032_2`, `xtal3215`, `xtal7050` (surface mount) |
|
|
74
81
|
| Radial electrolytics | `radial<can>x<lead spacing>`, such as `radial6.3x2.5` |
|
|
82
|
+
| SMD electrolytic cans | `smdcan4x5.4`, `smdcan5x5.4`, `smdcan6.3x5.4`, `smdcan6.3x7.7`, `smdcan8x6.5`, `smdcan8x10.2`, `smdcan10x10.2` |
|
|
75
83
|
| Pin rows (through-hole) | `pinrow<N>`: N pins at 2.54 mm, or at a pitch `_p<pitch>` larger than the 1.7 mm pad, such as `pinrow4_p2mm`; two rows `pinrow2x<N>` (odd pins on top) |
|
|
84
|
+
| Uno parts | `resonator3213`; `usb_b`, `usb_c16` (shell legs share the last pad number); `dcjack` (also `dcjack2.1`, `dcjack2.5`); `tact6x6`, `tact6x6_smd` (1–2 and 3–4 joined); `ind4x4`, `ind5x5`, `ind6x6`, `ind8x8`, `ind10x10`, `ind12x12` |
|
|
85
|
+
| Sockets, screw terminals | `socket<N>`, `socket2x<N>` (as the pin rows); `screw<N>` (N 2–24), optional `_p3.5`, `_p3.81`, `_p5`, `_p5.08` |
|
|
76
86
|
|
|
77
87
|
`docs/footprints.md` in the copperflow repository draws each family and says how sure its numbers
|
|
78
88
|
are. A parameter such as `_p1.27mm` on a cited package (`soic8_p1.27mm`) is accepted only when it
|
|
79
|
-
matches the package. Any other string, such as `
|
|
89
|
+
matches the package. Any other string, such as `sot666` or `to3`, gives the error
|
|
80
90
|
`copperflow cannot make footprint "<string>": known families are …`, naming the nearest valid
|
|
81
91
|
strings first when it looks like a known family (`soic18`: `soic14, soic16, soic18w`).
|
|
82
92
|
For a package no family fits, a library part carries its own `footprint.yaml` (see
|
|
@@ -17,7 +17,8 @@ Passive parts (resistors, capacitors, LEDs, headers) are built in and need no en
|
|
|
17
17
|
- `package`: a footprint string for the package, such as `sot23_5`, `soic8`,
|
|
18
18
|
`qfn32_p0.5mm` or `tssop20`; copperflow makes the pads from it. The strings it knows are
|
|
19
19
|
listed in [editable-subset.md](editable-subset.md). Use a footprint string whenever a family
|
|
20
|
-
fits the package.
|
|
20
|
+
fits the package. To find the string for a package by its name, call `guide` with the topic
|
|
21
|
+
`packages` (add search words: `packages sot 5`).
|
|
21
22
|
When none fits, set `package` to `{ "file": "footprint.yaml" }` and pass `footprint_file`: transcribe
|
|
22
23
|
every pad (number, shape, x, y, width, height, and a drill for through-hole pads) from the
|
|
23
24
|
datasheet's recommended land pattern, name the page you took it from, and never estimate a
|
|
@@ -82,6 +82,12 @@ plated and non-plated drills, pick-and-place and the BOM into `<name>-fab/` and
|
|
|
82
82
|
supplier part number and how to add one) and `export_fabrication` with its two verdicts;
|
|
83
83
|
`export_package` also writes `pins.md` and a `<part>_pins.h` per library chip, the pin map for the firmware.
|
|
84
84
|
|
|
85
|
+
`export_model` `{ file, format, out?, look? }` writes one 3D model file beside the circuit, for a
|
|
86
|
+
design that still has errors too: `format: "step"` is the STEP file for mechanical CAD (the board
|
|
87
|
+
and each part as a box), `format: "glb"` a GLB file a 3D viewer turns (the board as made, in the
|
|
88
|
+
`look` asked for, and the parts as simple shapes, not their real models). Its answer names the parts
|
|
89
|
+
whose height is typical or assumed; pass that on when the person will fit an enclosure around it.
|
|
90
|
+
|
|
85
91
|
Export only a clean board: `check_circuit` with 0 errors and no `unrouted` warning. With
|
|
86
92
|
connections still unrouted the files are written with a warning, but the board is not finished
|
|
87
93
|
and must not be ordered: say so, then route them with `route_track` by reference
|