copperflow 0.0.0-stage → 0.3.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.
Files changed (767) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +5 -0
  3. package/README.md +265 -2
  4. package/dist/app/THIRD_PARTY_LICENSES.txt +118 -0
  5. package/dist/app/assets/NewPartDialog-Qb7NwhBb.js +160 -0
  6. package/dist/app/assets/index-CSWIIMFE.css +1 -0
  7. package/dist/app/assets/index-C_TXwo-N.js +19 -0
  8. package/dist/app/index.html +15 -0
  9. package/dist/app/theme-boot.js +3 -0
  10. package/dist/cli-commands.d.ts +14 -0
  11. package/dist/cli-commands.js +285 -0
  12. package/dist/cli-commands.js.map +1 -0
  13. package/dist/cli.d.ts +2 -0
  14. package/dist/cli.js +24 -0
  15. package/dist/cli.js.map +1 -0
  16. package/dist/core/analyze.d.ts +29 -0
  17. package/dist/core/analyze.js +284 -0
  18. package/dist/core/analyze.js.map +1 -0
  19. package/dist/core/annotations.d.ts +77 -0
  20. package/dist/core/annotations.js +138 -0
  21. package/dist/core/annotations.js.map +1 -0
  22. package/dist/core/board-edits.d.ts +8 -0
  23. package/dist/core/board-edits.js +56 -0
  24. package/dist/core/board-edits.js.map +1 -0
  25. package/dist/core/board-items.d.ts +40 -0
  26. package/dist/core/board-items.js +95 -0
  27. package/dist/core/board-items.js.map +1 -0
  28. package/dist/core/bom.d.ts +35 -0
  29. package/dist/core/bom.js +146 -0
  30. package/dist/core/bom.js.map +1 -0
  31. package/dist/core/check.d.ts +42 -0
  32. package/dist/core/check.js +91 -0
  33. package/dist/core/check.js.map +1 -0
  34. package/dist/core/checks-line.d.ts +7 -0
  35. package/dist/core/checks-line.js +8 -0
  36. package/dist/core/checks-line.js.map +1 -0
  37. package/dist/core/connection-names.d.ts +2 -0
  38. package/dist/core/connection-names.js +16 -0
  39. package/dist/core/connection-names.js.map +1 -0
  40. package/dist/core/design-source.d.ts +6 -0
  41. package/dist/core/design-source.js +14 -0
  42. package/dist/core/design-source.js.map +1 -0
  43. package/dist/core/drawing-edits.d.ts +19 -0
  44. package/dist/core/drawing-edits.js +158 -0
  45. package/dist/core/drawing-edits.js.map +1 -0
  46. package/dist/core/drawing-identity.d.ts +12 -0
  47. package/dist/core/drawing-identity.js +32 -0
  48. package/dist/core/drawing-identity.js.map +1 -0
  49. package/dist/core/drawing-names.d.ts +10 -0
  50. package/dist/core/drawing-names.js +30 -0
  51. package/dist/core/drawing-names.js.map +1 -0
  52. package/dist/core/drawing-scan.d.ts +41 -0
  53. package/dist/core/drawing-scan.js +82 -0
  54. package/dist/core/drawing-scan.js.map +1 -0
  55. package/dist/core/edit-error.d.ts +5 -0
  56. package/dist/core/edit-error.js +9 -0
  57. package/dist/core/edit-error.js.map +1 -0
  58. package/dist/core/edit-text.d.ts +28 -0
  59. package/dist/core/edit-text.js +89 -0
  60. package/dist/core/edit-text.js.map +1 -0
  61. package/dist/core/edit.d.ts +13 -0
  62. package/dist/core/edit.js +341 -0
  63. package/dist/core/edit.js.map +1 -0
  64. package/dist/core/fabrication.d.ts +39 -0
  65. package/dist/core/fabrication.js +94 -0
  66. package/dist/core/fabrication.js.map +1 -0
  67. package/dist/core/file-writes.d.ts +18 -0
  68. package/dist/core/file-writes.js +81 -0
  69. package/dist/core/file-writes.js.map +1 -0
  70. package/dist/core/fs-utils.d.ts +13 -0
  71. package/dist/core/fs-utils.js +51 -0
  72. package/dist/core/fs-utils.js.map +1 -0
  73. package/dist/core/history.d.ts +80 -0
  74. package/dist/core/history.js +161 -0
  75. package/dist/core/history.js.map +1 -0
  76. package/dist/core/index.d.ts +21 -0
  77. package/dist/core/index.js +22 -0
  78. package/dist/core/index.js.map +1 -0
  79. package/dist/core/instance-edits.d.ts +15 -0
  80. package/dist/core/instance-edits.js +69 -0
  81. package/dist/core/instance-edits.js.map +1 -0
  82. package/dist/core/instance-locks.d.ts +10 -0
  83. package/dist/core/instance-locks.js +16 -0
  84. package/dist/core/instance-locks.js.map +1 -0
  85. package/dist/core/instance-requests.d.ts +45 -0
  86. package/dist/core/instance-requests.js +93 -0
  87. package/dist/core/instance-requests.js.map +1 -0
  88. package/dist/core/layout-edits.d.ts +51 -0
  89. package/dist/core/layout-edits.js +82 -0
  90. package/dist/core/layout-edits.js.map +1 -0
  91. package/dist/core/layout-file.d.ts +80 -0
  92. package/dist/core/layout-file.js +209 -0
  93. package/dist/core/layout-file.js.map +1 -0
  94. package/dist/core/layout-locks.d.ts +38 -0
  95. package/dist/core/layout-locks.js +39 -0
  96. package/dist/core/layout-locks.js.map +1 -0
  97. package/dist/core/layout-records.d.ts +72 -0
  98. package/dist/core/layout-records.js +146 -0
  99. package/dist/core/layout-records.js.map +1 -0
  100. package/dist/core/library.d.ts +128 -0
  101. package/dist/core/library.js +378 -0
  102. package/dist/core/library.js.map +1 -0
  103. package/dist/core/literals.d.ts +19 -0
  104. package/dist/core/literals.js +106 -0
  105. package/dist/core/literals.js.map +1 -0
  106. package/dist/core/make-sheet.d.ts +44 -0
  107. package/dist/core/make-sheet.js +130 -0
  108. package/dist/core/make-sheet.js.map +1 -0
  109. package/dist/core/netlist.d.ts +41 -0
  110. package/dist/core/netlist.js +147 -0
  111. package/dist/core/netlist.js.map +1 -0
  112. package/dist/core/new-circuit-sheets.d.ts +35 -0
  113. package/dist/core/new-circuit-sheets.js +146 -0
  114. package/dist/core/new-circuit-sheets.js.map +1 -0
  115. package/dist/core/new-circuit.d.ts +65 -0
  116. package/dist/core/new-circuit.js +83 -0
  117. package/dist/core/new-circuit.js.map +1 -0
  118. package/dist/core/page-edits.d.ts +25 -0
  119. package/dist/core/page-edits.js +180 -0
  120. package/dist/core/page-edits.js.map +1 -0
  121. package/dist/core/pin-types.d.ts +8 -0
  122. package/dist/core/pin-types.js +10 -0
  123. package/dist/core/pin-types.js.map +1 -0
  124. package/dist/core/place.d.ts +30 -0
  125. package/dist/core/place.js +77 -0
  126. package/dist/core/place.js.map +1 -0
  127. package/dist/core/placement-write.d.ts +56 -0
  128. package/dist/core/placement-write.js +222 -0
  129. package/dist/core/placement-write.js.map +1 -0
  130. package/dist/core/pour-edits.d.ts +20 -0
  131. package/dist/core/pour-edits.js +241 -0
  132. package/dist/core/pour-edits.js.map +1 -0
  133. package/dist/core/project-text.d.ts +15 -0
  134. package/dist/core/project-text.js +58 -0
  135. package/dist/core/project-text.js.map +1 -0
  136. package/dist/core/project.d.ts +23 -0
  137. package/dist/core/project.js +63 -0
  138. package/dist/core/project.js.map +1 -0
  139. package/dist/core/rename-designators.d.ts +23 -0
  140. package/dist/core/rename-designators.js +83 -0
  141. package/dist/core/rename-designators.js.map +1 -0
  142. package/dist/core/rename-parts.d.ts +12 -0
  143. package/dist/core/rename-parts.js +129 -0
  144. package/dist/core/rename-parts.js.map +1 -0
  145. package/dist/core/rules-edit.d.ts +7 -0
  146. package/dist/core/rules-edit.js +56 -0
  147. package/dist/core/rules-edit.js.map +1 -0
  148. package/dist/core/selectors.d.ts +11 -0
  149. package/dist/core/selectors.js +33 -0
  150. package/dist/core/selectors.js.map +1 -0
  151. package/dist/core/sheet-cut-layout.d.ts +13 -0
  152. package/dist/core/sheet-cut-layout.js +62 -0
  153. package/dist/core/sheet-cut-layout.js.map +1 -0
  154. package/dist/core/sheet-cut-text.d.ts +23 -0
  155. package/dist/core/sheet-cut-text.js +129 -0
  156. package/dist/core/sheet-cut-text.js.map +1 -0
  157. package/dist/core/sheet-cut.d.ts +55 -0
  158. package/dist/core/sheet-cut.js +204 -0
  159. package/dist/core/sheet-cut.js.map +1 -0
  160. package/dist/core/sheet-edits.d.ts +12 -0
  161. package/dist/core/sheet-edits.js +107 -0
  162. package/dist/core/sheet-edits.js.map +1 -0
  163. package/dist/core/sheet-files.d.ts +31 -0
  164. package/dist/core/sheet-files.js +134 -0
  165. package/dist/core/sheet-files.js.map +1 -0
  166. package/dist/core/sheet-layout.d.ts +27 -0
  167. package/dist/core/sheet-layout.js +60 -0
  168. package/dist/core/sheet-layout.js.map +1 -0
  169. package/dist/core/summary.d.ts +10 -0
  170. package/dist/core/summary.js +79 -0
  171. package/dist/core/summary.js.map +1 -0
  172. package/dist/core/track-split.d.ts +22 -0
  173. package/dist/core/track-split.js +24 -0
  174. package/dist/core/track-split.js.map +1 -0
  175. package/dist/core/types.d.ts +309 -0
  176. package/dist/core/types.js +2 -0
  177. package/dist/core/types.js.map +1 -0
  178. package/dist/core/unroute.d.ts +56 -0
  179. package/dist/core/unroute.js +87 -0
  180. package/dist/core/unroute.js.map +1 -0
  181. package/dist/core/workspace.d.ts +94 -0
  182. package/dist/core/workspace.js +376 -0
  183. package/dist/core/workspace.js.map +1 -0
  184. package/dist/engine/autoplace.d.ts +18 -0
  185. package/dist/engine/autoplace.js +68 -0
  186. package/dist/engine/autoplace.js.map +1 -0
  187. package/dist/engine/board.d.ts +12 -0
  188. package/dist/engine/board.js +60 -0
  189. package/dist/engine/board.js.map +1 -0
  190. package/dist/engine/checks/copper-clearance.d.ts +7 -0
  191. package/dist/engine/checks/copper-clearance.js +116 -0
  192. package/dist/engine/checks/copper-clearance.js.map +1 -0
  193. package/dist/engine/checks/copper-notes.d.ts +11 -0
  194. package/dist/engine/checks/copper-notes.js +17 -0
  195. package/dist/engine/checks/copper-notes.js.map +1 -0
  196. package/dist/engine/checks/copper-pieces.d.ts +26 -0
  197. package/dist/engine/checks/copper-pieces.js +42 -0
  198. package/dist/engine/checks/copper-pieces.js.map +1 -0
  199. package/dist/engine/checks/copper-violation.d.ts +9 -0
  200. package/dist/engine/checks/copper-violation.js +11 -0
  201. package/dist/engine/checks/copper-violation.js.map +1 -0
  202. package/dist/engine/checks/drc-copper.d.ts +14 -0
  203. package/dist/engine/checks/drc-copper.js +139 -0
  204. package/dist/engine/checks/drc-copper.js.map +1 -0
  205. package/dist/engine/checks/drc-pads.d.ts +8 -0
  206. package/dist/engine/checks/drc-pads.js +172 -0
  207. package/dist/engine/checks/drc-pads.js.map +1 -0
  208. package/dist/engine/checks/drc-parts.d.ts +5 -0
  209. package/dist/engine/checks/drc-parts.js +208 -0
  210. package/dist/engine/checks/drc-parts.js.map +1 -0
  211. package/dist/engine/checks/drc-pours.d.ts +6 -0
  212. package/dist/engine/checks/drc-pours.js +240 -0
  213. package/dist/engine/checks/drc-pours.js.map +1 -0
  214. package/dist/engine/checks/erc.d.ts +6 -0
  215. package/dist/engine/checks/erc.js +94 -0
  216. package/dist/engine/checks/erc.js.map +1 -0
  217. package/dist/engine/checks/fillet-guard.d.ts +29 -0
  218. package/dist/engine/checks/fillet-guard.js +75 -0
  219. package/dist/engine/checks/fillet-guard.js.map +1 -0
  220. package/dist/engine/checks/geometry.d.ts +25 -0
  221. package/dist/engine/checks/geometry.js +182 -0
  222. package/dist/engine/checks/geometry.js.map +1 -0
  223. package/dist/engine/checks/grid-index.d.ts +24 -0
  224. package/dist/engine/checks/grid-index.js +57 -0
  225. package/dist/engine/checks/grid-index.js.map +1 -0
  226. package/dist/engine/checks/index.d.ts +16 -0
  227. package/dist/engine/checks/index.js +55 -0
  228. package/dist/engine/checks/index.js.map +1 -0
  229. package/dist/engine/checks/limits.d.ts +7 -0
  230. package/dist/engine/checks/limits.js +10 -0
  231. package/dist/engine/checks/limits.js.map +1 -0
  232. package/dist/engine/checks/unplaced-parts.d.ts +4 -0
  233. package/dist/engine/checks/unplaced-parts.js +29 -0
  234. package/dist/engine/checks/unplaced-parts.js.map +1 -0
  235. package/dist/engine/checks/violation.d.ts +14 -0
  236. package/dist/engine/checks/violation.js +7 -0
  237. package/dist/engine/checks/violation.js.map +1 -0
  238. package/dist/engine/component.d.ts +34 -0
  239. package/dist/engine/component.js +125 -0
  240. package/dist/engine/component.js.map +1 -0
  241. package/dist/engine/copper.d.ts +63 -0
  242. package/dist/engine/copper.js +276 -0
  243. package/dist/engine/copper.js.map +1 -0
  244. package/dist/engine/design.d.ts +21 -0
  245. package/dist/engine/design.js +63 -0
  246. package/dist/engine/design.js.map +1 -0
  247. package/dist/engine/diagnostics.d.ts +2 -0
  248. package/dist/engine/diagnostics.js +6 -0
  249. package/dist/engine/diagnostics.js.map +1 -0
  250. package/dist/engine/drawing-ids.d.ts +23 -0
  251. package/dist/engine/drawing-ids.js +45 -0
  252. package/dist/engine/drawing-ids.js.map +1 -0
  253. package/dist/engine/drawing-kinds.d.ts +18 -0
  254. package/dist/engine/drawing-kinds.js +102 -0
  255. package/dist/engine/drawing-kinds.js.map +1 -0
  256. package/dist/engine/drawing-reader.d.ts +42 -0
  257. package/dist/engine/drawing-reader.js +97 -0
  258. package/dist/engine/drawing-reader.js.map +1 -0
  259. package/dist/engine/drawings.d.ts +35 -0
  260. package/dist/engine/drawings.js +94 -0
  261. package/dist/engine/drawings.js.map +1 -0
  262. package/dist/engine/elaborate.d.ts +8 -0
  263. package/dist/engine/elaborate.js +490 -0
  264. package/dist/engine/elaborate.js.map +1 -0
  265. package/dist/engine/engine-worker.d.ts +1 -0
  266. package/dist/engine/engine-worker.js +17 -0
  267. package/dist/engine/engine-worker.js.map +1 -0
  268. package/dist/engine/engine.d.ts +41 -0
  269. package/dist/engine/engine.js +95 -0
  270. package/dist/engine/engine.js.map +1 -0
  271. package/dist/engine/evaluate.d.ts +10 -0
  272. package/dist/engine/evaluate.js +125 -0
  273. package/dist/engine/evaluate.js.map +1 -0
  274. package/dist/engine/fab/bom-csv.d.ts +5 -0
  275. package/dist/engine/fab/bom-csv.js +16 -0
  276. package/dist/engine/fab/bom-csv.js.map +1 -0
  277. package/dist/engine/fab/csv.d.ts +4 -0
  278. package/dist/engine/fab/csv.js +11 -0
  279. package/dist/engine/fab/csv.js.map +1 -0
  280. package/dist/engine/fab/designators.d.ts +42 -0
  281. package/dist/engine/fab/designators.js +109 -0
  282. package/dist/engine/fab/designators.js.map +1 -0
  283. package/dist/engine/fab/excellon.d.ts +23 -0
  284. package/dist/engine/fab/excellon.js +82 -0
  285. package/dist/engine/fab/excellon.js.map +1 -0
  286. package/dist/engine/fab/export.d.ts +33 -0
  287. package/dist/engine/fab/export.js +105 -0
  288. package/dist/engine/fab/export.js.map +1 -0
  289. package/dist/engine/fab/gerber.d.ts +53 -0
  290. package/dist/engine/fab/gerber.js +151 -0
  291. package/dist/engine/fab/gerber.js.map +1 -0
  292. package/dist/engine/fab/layers.d.ts +26 -0
  293. package/dist/engine/fab/layers.js +162 -0
  294. package/dist/engine/fab/layers.js.map +1 -0
  295. package/dist/engine/fab/names.d.ts +20 -0
  296. package/dist/engine/fab/names.js +58 -0
  297. package/dist/engine/fab/names.js.map +1 -0
  298. package/dist/engine/fab/pick-and-place.d.ts +5 -0
  299. package/dist/engine/fab/pick-and-place.js +36 -0
  300. package/dist/engine/fab/pick-and-place.js.map +1 -0
  301. package/dist/engine/fab/stroke-font.d.ts +8 -0
  302. package/dist/engine/fab/stroke-font.js +83 -0
  303. package/dist/engine/fab/stroke-font.js.map +1 -0
  304. package/dist/engine/fab/zip.d.ts +14 -0
  305. package/dist/engine/fab/zip.js +93 -0
  306. package/dist/engine/fab/zip.js.map +1 -0
  307. package/dist/engine/fillet-plan.d.ts +39 -0
  308. package/dist/engine/fillet-plan.js +87 -0
  309. package/dist/engine/fillet-plan.js.map +1 -0
  310. package/dist/engine/fillet.d.ts +54 -0
  311. package/dist/engine/fillet.js +175 -0
  312. package/dist/engine/fillet.js.map +1 -0
  313. package/dist/engine/footprints/bga.d.ts +14 -0
  314. package/dist/engine/footprints/bga.js +122 -0
  315. package/dist/engine/footprints/bga.js.map +1 -0
  316. package/dist/engine/footprints/chip.d.ts +3 -0
  317. package/dist/engine/footprints/chip.js +52 -0
  318. package/dist/engine/footprints/chip.js.map +1 -0
  319. package/dist/engine/footprints/crystal.d.ts +4 -0
  320. package/dist/engine/footprints/crystal.js +47 -0
  321. package/dist/engine/footprints/crystal.js.map +1 -0
  322. package/dist/engine/footprints/dfn.d.ts +13 -0
  323. package/dist/engine/footprints/dfn.js +52 -0
  324. package/dist/engine/footprints/dfn.js.map +1 -0
  325. package/dist/engine/footprints/dip.d.ts +8 -0
  326. package/dist/engine/footprints/dip.js +65 -0
  327. package/dist/engine/footprints/dip.js.map +1 -0
  328. package/dist/engine/footprints/dual.d.ts +14 -0
  329. package/dist/engine/footprints/dual.js +171 -0
  330. package/dist/engine/footprints/dual.js.map +1 -0
  331. package/dist/engine/footprints/exposed.d.ts +27 -0
  332. package/dist/engine/footprints/exposed.js +50 -0
  333. package/dist/engine/footprints/exposed.js.map +1 -0
  334. package/dist/engine/footprints/file.d.ts +65 -0
  335. package/dist/engine/footprints/file.js +141 -0
  336. package/dist/engine/footprints/file.js.map +1 -0
  337. package/dist/engine/footprints/ic.d.ts +34 -0
  338. package/dist/engine/footprints/ic.js +31 -0
  339. package/dist/engine/footprints/ic.js.map +1 -0
  340. package/dist/engine/footprints/index.d.ts +17 -0
  341. package/dist/engine/footprints/index.js +104 -0
  342. package/dist/engine/footprints/index.js.map +1 -0
  343. package/dist/engine/footprints/ipc7251.d.ts +30 -0
  344. package/dist/engine/footprints/ipc7251.js +44 -0
  345. package/dist/engine/footprints/ipc7251.js.map +1 -0
  346. package/dist/engine/footprints/ipc7351.d.ts +179 -0
  347. package/dist/engine/footprints/ipc7351.js +194 -0
  348. package/dist/engine/footprints/ipc7351.js.map +1 -0
  349. package/dist/engine/footprints/jedec.d.ts +24 -0
  350. package/dist/engine/footprints/jedec.js +148 -0
  351. package/dist/engine/footprints/jedec.js.map +1 -0
  352. package/dist/engine/footprints/known.d.ts +6 -0
  353. package/dist/engine/footprints/known.js +76 -0
  354. package/dist/engine/footprints/known.js.map +1 -0
  355. package/dist/engine/footprints/molded.d.ts +8 -0
  356. package/dist/engine/footprints/molded.js +76 -0
  357. package/dist/engine/footprints/molded.js.map +1 -0
  358. package/dist/engine/footprints/outline.d.ts +64 -0
  359. package/dist/engine/footprints/outline.js +187 -0
  360. package/dist/engine/footprints/outline.js.map +1 -0
  361. package/dist/engine/footprints/parse.d.ts +32 -0
  362. package/dist/engine/footprints/parse.js +68 -0
  363. package/dist/engine/footprints/parse.js.map +1 -0
  364. package/dist/engine/footprints/pinrow.d.ts +11 -0
  365. package/dist/engine/footprints/pinrow.js +102 -0
  366. package/dist/engine/footprints/pinrow.js.map +1 -0
  367. package/dist/engine/footprints/quad.d.ts +7 -0
  368. package/dist/engine/footprints/quad.js +135 -0
  369. package/dist/engine/footprints/quad.js.map +1 -0
  370. package/dist/engine/footprints/radial.d.ts +7 -0
  371. package/dist/engine/footprints/radial.js +62 -0
  372. package/dist/engine/footprints/radial.js.map +1 -0
  373. package/dist/engine/footprints/sod.d.ts +8 -0
  374. package/dist/engine/footprints/sod.js +60 -0
  375. package/dist/engine/footprints/sod.js.map +1 -0
  376. package/dist/engine/footprints/sot.d.ts +4 -0
  377. package/dist/engine/footprints/sot.js +72 -0
  378. package/dist/engine/footprints/sot.js.map +1 -0
  379. package/dist/engine/footprints/sotpower.d.ts +4 -0
  380. package/dist/engine/footprints/sotpower.js +98 -0
  381. package/dist/engine/footprints/sotpower.js.map +1 -0
  382. package/dist/engine/footprints/to220.d.ts +4 -0
  383. package/dist/engine/footprints/to220.js +49 -0
  384. package/dist/engine/footprints/to220.js.map +1 -0
  385. package/dist/engine/footprints/to92.d.ts +4 -0
  386. package/dist/engine/footprints/to92.js +43 -0
  387. package/dist/engine/footprints/to92.js.map +1 -0
  388. package/dist/engine/footprints/types.d.ts +50 -0
  389. package/dist/engine/footprints/types.js +3 -0
  390. package/dist/engine/footprints/types.js.map +1 -0
  391. package/dist/engine/hole.d.ts +15 -0
  392. package/dist/engine/hole.js +28 -0
  393. package/dist/engine/hole.js.map +1 -0
  394. package/dist/engine/index.d.ts +6 -0
  395. package/dist/engine/index.js +6 -0
  396. package/dist/engine/index.js.map +1 -0
  397. package/dist/engine/instance-anchor.d.ts +16 -0
  398. package/dist/engine/instance-anchor.js +45 -0
  399. package/dist/engine/instance-anchor.js.map +1 -0
  400. package/dist/engine/jsx-runtime.d.ts +26 -0
  401. package/dist/engine/jsx-runtime.js +49 -0
  402. package/dist/engine/jsx-runtime.js.map +1 -0
  403. package/dist/engine/keepout.d.ts +9 -0
  404. package/dist/engine/keepout.js +50 -0
  405. package/dist/engine/keepout.js.map +1 -0
  406. package/dist/engine/kinds.d.ts +34 -0
  407. package/dist/engine/kinds.js +134 -0
  408. package/dist/engine/kinds.js.map +1 -0
  409. package/dist/engine/model.d.ts +310 -0
  410. package/dist/engine/model.js +5 -0
  411. package/dist/engine/model.js.map +1 -0
  412. package/dist/engine/nets.d.ts +6 -0
  413. package/dist/engine/nets.js +49 -0
  414. package/dist/engine/nets.js.map +1 -0
  415. package/dist/engine/no-connect.d.ts +28 -0
  416. package/dist/engine/no-connect.js +36 -0
  417. package/dist/engine/no-connect.js.map +1 -0
  418. package/dist/engine/order.d.ts +7 -0
  419. package/dist/engine/order.js +25 -0
  420. package/dist/engine/order.js.map +1 -0
  421. package/dist/engine/pad-text.d.ts +20 -0
  422. package/dist/engine/pad-text.js +26 -0
  423. package/dist/engine/pad-text.js.map +1 -0
  424. package/dist/engine/part-labels.d.ts +29 -0
  425. package/dist/engine/part-labels.js +28 -0
  426. package/dist/engine/part-labels.js.map +1 -0
  427. package/dist/engine/pcb-place/blocks.d.ts +46 -0
  428. package/dist/engine/pcb-place/blocks.js +186 -0
  429. package/dist/engine/pcb-place/blocks.js.map +1 -0
  430. package/dist/engine/pcb-place/constructive.d.ts +73 -0
  431. package/dist/engine/pcb-place/constructive.js +515 -0
  432. package/dist/engine/pcb-place/constructive.js.map +1 -0
  433. package/dist/engine/pcb-place/edge.d.ts +7 -0
  434. package/dist/engine/pcb-place/edge.js +78 -0
  435. package/dist/engine/pcb-place/edge.js.map +1 -0
  436. package/dist/engine/pcb-place/fit-board.d.ts +22 -0
  437. package/dist/engine/pcb-place/fit-board.js +48 -0
  438. package/dist/engine/pcb-place/fit-board.js.map +1 -0
  439. package/dist/engine/pcb-place/geometry.d.ts +45 -0
  440. package/dist/engine/pcb-place/geometry.js +158 -0
  441. package/dist/engine/pcb-place/geometry.js.map +1 -0
  442. package/dist/engine/pcb-place/index.d.ts +81 -0
  443. package/dist/engine/pcb-place/index.js +98 -0
  444. package/dist/engine/pcb-place/index.js.map +1 -0
  445. package/dist/engine/pcb-place/refine.d.ts +32 -0
  446. package/dist/engine/pcb-place/refine.js +220 -0
  447. package/dist/engine/pcb-place/refine.js.map +1 -0
  448. package/dist/engine/pcb-place/roles.d.ts +37 -0
  449. package/dist/engine/pcb-place/roles.js +127 -0
  450. package/dist/engine/pcb-place/roles.js.map +1 -0
  451. package/dist/engine/pcb-place/scope.d.ts +80 -0
  452. package/dist/engine/pcb-place/scope.js +107 -0
  453. package/dist/engine/pcb-place/scope.js.map +1 -0
  454. package/dist/engine/pcb-place/score.d.ts +40 -0
  455. package/dist/engine/pcb-place/score.js +140 -0
  456. package/dist/engine/pcb-place/score.js.map +1 -0
  457. package/dist/engine/pcb.d.ts +72 -0
  458. package/dist/engine/pcb.js +153 -0
  459. package/dist/engine/pcb.js.map +1 -0
  460. package/dist/engine/pour/build.d.ts +32 -0
  461. package/dist/engine/pour/build.js +108 -0
  462. package/dist/engine/pour/build.js.map +1 -0
  463. package/dist/engine/pour/cache.d.ts +8 -0
  464. package/dist/engine/pour/cache.js +55 -0
  465. package/dist/engine/pour/cache.js.map +1 -0
  466. package/dist/engine/pour/clip.d.ts +50 -0
  467. package/dist/engine/pour/clip.js +72 -0
  468. package/dist/engine/pour/clip.js.map +1 -0
  469. package/dist/engine/pour/fill.d.ts +22 -0
  470. package/dist/engine/pour/fill.js +112 -0
  471. package/dist/engine/pour/fill.js.map +1 -0
  472. package/dist/engine/pour/islands.d.ts +8 -0
  473. package/dist/engine/pour/islands.js +19 -0
  474. package/dist/engine/pour/islands.js.map +1 -0
  475. package/dist/engine/pour/joins.d.ts +18 -0
  476. package/dist/engine/pour/joins.js +74 -0
  477. package/dist/engine/pour/joins.js.map +1 -0
  478. package/dist/engine/pour/obstacles.d.ts +45 -0
  479. package/dist/engine/pour/obstacles.js +85 -0
  480. package/dist/engine/pour/obstacles.js.map +1 -0
  481. package/dist/engine/pour/resolve.d.ts +21 -0
  482. package/dist/engine/pour/resolve.js +19 -0
  483. package/dist/engine/pour/resolve.js.map +1 -0
  484. package/dist/engine/pour/shapes.d.ts +9 -0
  485. package/dist/engine/pour/shapes.js +62 -0
  486. package/dist/engine/pour/shapes.js.map +1 -0
  487. package/dist/engine/pour/thermal.d.ts +16 -0
  488. package/dist/engine/pour/thermal.js +38 -0
  489. package/dist/engine/pour/thermal.js.map +1 -0
  490. package/dist/engine/project-files.d.ts +18 -0
  491. package/dist/engine/project-files.js +58 -0
  492. package/dist/engine/project-files.js.map +1 -0
  493. package/dist/engine/ratsnest.d.ts +16 -0
  494. package/dist/engine/ratsnest.js +69 -0
  495. package/dist/engine/ratsnest.js.map +1 -0
  496. package/dist/engine/read-props.d.ts +22 -0
  497. package/dist/engine/read-props.js +74 -0
  498. package/dist/engine/read-props.js.map +1 -0
  499. package/dist/engine/router/astar.d.ts +74 -0
  500. package/dist/engine/router/astar.js +231 -0
  501. package/dist/engine/router/astar.js.map +1 -0
  502. package/dist/engine/router/blockers.d.ts +4 -0
  503. package/dist/engine/router/blockers.js +69 -0
  504. package/dist/engine/router/blockers.js.map +1 -0
  505. package/dist/engine/router/cleanup.d.ts +21 -0
  506. package/dist/engine/router/cleanup.js +157 -0
  507. package/dist/engine/router/cleanup.js.map +1 -0
  508. package/dist/engine/router/clear.d.ts +18 -0
  509. package/dist/engine/router/clear.js +39 -0
  510. package/dist/engine/router/clear.js.map +1 -0
  511. package/dist/engine/router/congestion.d.ts +79 -0
  512. package/dist/engine/router/congestion.js +212 -0
  513. package/dist/engine/router/congestion.js.map +1 -0
  514. package/dist/engine/router/connect.d.ts +79 -0
  515. package/dist/engine/router/connect.js +174 -0
  516. package/dist/engine/router/connect.js.map +1 -0
  517. package/dist/engine/router/ends.d.ts +25 -0
  518. package/dist/engine/router/ends.js +135 -0
  519. package/dist/engine/router/ends.js.map +1 -0
  520. package/dist/engine/router/grid.d.ts +131 -0
  521. package/dist/engine/router/grid.js +297 -0
  522. package/dist/engine/router/grid.js.map +1 -0
  523. package/dist/engine/router/keep-clear.d.ts +10 -0
  524. package/dist/engine/router/keep-clear.js +60 -0
  525. package/dist/engine/router/keep-clear.js.map +1 -0
  526. package/dist/engine/router/obstacles.d.ts +18 -0
  527. package/dist/engine/router/obstacles.js +66 -0
  528. package/dist/engine/router/obstacles.js.map +1 -0
  529. package/dist/engine/router/path.d.ts +34 -0
  530. package/dist/engine/router/path.js +41 -0
  531. package/dist/engine/router/path.js.map +1 -0
  532. package/dist/engine/router/pour-rounds.d.ts +17 -0
  533. package/dist/engine/router/pour-rounds.js +124 -0
  534. package/dist/engine/router/pour-rounds.js.map +1 -0
  535. package/dist/engine/router/replicate.d.ts +32 -0
  536. package/dist/engine/router/replicate.js +143 -0
  537. package/dist/engine/router/replicate.js.map +1 -0
  538. package/dist/engine/router/rip-up.d.ts +5 -0
  539. package/dist/engine/router/rip-up.js +95 -0
  540. package/dist/engine/router/rip-up.js.map +1 -0
  541. package/dist/engine/router/route-board.d.ts +109 -0
  542. package/dist/engine/router/route-board.js +223 -0
  543. package/dist/engine/router/route-board.js.map +1 -0
  544. package/dist/engine/rules/classes.d.ts +14 -0
  545. package/dist/engine/rules/classes.js +50 -0
  546. package/dist/engine/rules/classes.js.map +1 -0
  547. package/dist/engine/rules/load.d.ts +14 -0
  548. package/dist/engine/rules/load.js +146 -0
  549. package/dist/engine/rules/load.js.map +1 -0
  550. package/dist/engine/rules/profiles.d.ts +5 -0
  551. package/dist/engine/rules/profiles.js +53 -0
  552. package/dist/engine/rules/profiles.js.map +1 -0
  553. package/dist/engine/rules/rotations.d.ts +31 -0
  554. package/dist/engine/rules/rotations.js +124 -0
  555. package/dist/engine/rules/rotations.js.map +1 -0
  556. package/dist/engine/rules/schema.d.ts +82 -0
  557. package/dist/engine/rules/schema.js +59 -0
  558. package/dist/engine/rules/schema.js.map +1 -0
  559. package/dist/engine/rules/track-defaults.d.ts +23 -0
  560. package/dist/engine/rules/track-defaults.js +26 -0
  561. package/dist/engine/rules/track-defaults.js.map +1 -0
  562. package/dist/engine/schematic-astar.d.ts +37 -0
  563. package/dist/engine/schematic-astar.js +202 -0
  564. package/dist/engine/schematic-astar.js.map +1 -0
  565. package/dist/engine/schematic-geometry.d.ts +23 -0
  566. package/dist/engine/schematic-geometry.js +49 -0
  567. package/dist/engine/schematic-geometry.js.map +1 -0
  568. package/dist/engine/schematic-grid.d.ts +60 -0
  569. package/dist/engine/schematic-grid.js +150 -0
  570. package/dist/engine/schematic-grid.js.map +1 -0
  571. package/dist/engine/schematic-nets.d.ts +38 -0
  572. package/dist/engine/schematic-nets.js +157 -0
  573. package/dist/engine/schematic-nets.js.map +1 -0
  574. package/dist/engine/schematic-pages.d.ts +9 -0
  575. package/dist/engine/schematic-pages.js +52 -0
  576. package/dist/engine/schematic-pages.js.map +1 -0
  577. package/dist/engine/schematic-place-chains.d.ts +22 -0
  578. package/dist/engine/schematic-place-chains.js +111 -0
  579. package/dist/engine/schematic-place-chains.js.map +1 -0
  580. package/dist/engine/schematic-place-plan.d.ts +43 -0
  581. package/dist/engine/schematic-place-plan.js +155 -0
  582. package/dist/engine/schematic-place-plan.js.map +1 -0
  583. package/dist/engine/schematic-place-units.d.ts +38 -0
  584. package/dist/engine/schematic-place-units.js +101 -0
  585. package/dist/engine/schematic-place-units.js.map +1 -0
  586. package/dist/engine/schematic-place.d.ts +5 -0
  587. package/dist/engine/schematic-place.js +268 -0
  588. package/dist/engine/schematic-place.js.map +1 -0
  589. package/dist/engine/schematic-route.d.ts +37 -0
  590. package/dist/engine/schematic-route.js +288 -0
  591. package/dist/engine/schematic-route.js.map +1 -0
  592. package/dist/engine/schematic-sheets.d.ts +22 -0
  593. package/dist/engine/schematic-sheets.js +104 -0
  594. package/dist/engine/schematic-sheets.js.map +1 -0
  595. package/dist/engine/schematic.d.ts +64 -0
  596. package/dist/engine/schematic.js +200 -0
  597. package/dist/engine/schematic.js.map +1 -0
  598. package/dist/engine/selectors.d.ts +25 -0
  599. package/dist/engine/selectors.js +28 -0
  600. package/dist/engine/selectors.js.map +1 -0
  601. package/dist/engine/sheet-ports.d.ts +44 -0
  602. package/dist/engine/sheet-ports.js +126 -0
  603. package/dist/engine/sheet-ports.js.map +1 -0
  604. package/dist/engine/sheet-symbol.d.ts +52 -0
  605. package/dist/engine/sheet-symbol.js +92 -0
  606. package/dist/engine/sheet-symbol.js.map +1 -0
  607. package/dist/engine/sheets.d.ts +79 -0
  608. package/dist/engine/sheets.js +159 -0
  609. package/dist/engine/sheets.js.map +1 -0
  610. package/dist/engine/symbols/box.d.ts +8 -0
  611. package/dist/engine/symbols/box.js +83 -0
  612. package/dist/engine/symbols/box.js.map +1 -0
  613. package/dist/engine/symbols/index.d.ts +8 -0
  614. package/dist/engine/symbols/index.js +58 -0
  615. package/dist/engine/symbols/index.js.map +1 -0
  616. package/dist/engine/symbols/passives.d.ts +16 -0
  617. package/dist/engine/symbols/passives.js +58 -0
  618. package/dist/engine/symbols/passives.js.map +1 -0
  619. package/dist/engine/symbols/power.d.ts +5 -0
  620. package/dist/engine/symbols/power.js +10 -0
  621. package/dist/engine/symbols/power.js.map +1 -0
  622. package/dist/engine/symbols/semis.d.ts +10 -0
  623. package/dist/engine/symbols/semis.js +62 -0
  624. package/dist/engine/symbols/semis.js.map +1 -0
  625. package/dist/engine/symbols/types.d.ts +83 -0
  626. package/dist/engine/symbols/types.js +61 -0
  627. package/dist/engine/symbols/types.js.map +1 -0
  628. package/dist/engine/traces.d.ts +29 -0
  629. package/dist/engine/traces.js +102 -0
  630. package/dist/engine/traces.js.map +1 -0
  631. package/dist/engine/units.d.ts +4 -0
  632. package/dist/engine/units.js +31 -0
  633. package/dist/engine/units.js.map +1 -0
  634. package/dist/engine/worker-env.d.ts +9 -0
  635. package/dist/engine/worker-env.js +12 -0
  636. package/dist/engine/worker-env.js.map +1 -0
  637. package/dist/library/attach-datasheet.d.ts +20 -0
  638. package/dist/library/attach-datasheet.js +61 -0
  639. package/dist/library/attach-datasheet.js.map +1 -0
  640. package/dist/library/easyeda-footprint.d.ts +41 -0
  641. package/dist/library/easyeda-footprint.js +255 -0
  642. package/dist/library/easyeda-footprint.js.map +1 -0
  643. package/dist/library/easyeda-path.d.ts +13 -0
  644. package/dist/library/easyeda-path.js +133 -0
  645. package/dist/library/easyeda-path.js.map +1 -0
  646. package/dist/library/easyeda-symbol.d.ts +20 -0
  647. package/dist/library/easyeda-symbol.js +53 -0
  648. package/dist/library/easyeda-symbol.js.map +1 -0
  649. package/dist/library/import-lcsc.d.ts +30 -0
  650. package/dist/library/import-lcsc.js +155 -0
  651. package/dist/library/import-lcsc.js.map +1 -0
  652. package/dist/library/lcsc-part.d.ts +40 -0
  653. package/dist/library/lcsc-part.js +153 -0
  654. package/dist/library/lcsc-part.js.map +1 -0
  655. package/dist/library/new-part.d.ts +50 -0
  656. package/dist/library/new-part.js +160 -0
  657. package/dist/library/new-part.js.map +1 -0
  658. package/dist/library/pin-table.d.ts +23 -0
  659. package/dist/library/pin-table.js +92 -0
  660. package/dist/library/pin-table.js.map +1 -0
  661. package/dist/mcp/batch.d.ts +111 -0
  662. package/dist/mcp/batch.js +241 -0
  663. package/dist/mcp/batch.js.map +1 -0
  664. package/dist/mcp/board-summary.d.ts +19 -0
  665. package/dist/mcp/board-summary.js +144 -0
  666. package/dist/mcp/board-summary.js.map +1 -0
  667. package/dist/mcp/compact-sheets.d.ts +31 -0
  668. package/dist/mcp/compact-sheets.js +63 -0
  669. package/dist/mcp/compact-sheets.js.map +1 -0
  670. package/dist/mcp/compact-tool-list.d.ts +8 -0
  671. package/dist/mcp/compact-tool-list.js +42 -0
  672. package/dist/mcp/compact-tool-list.js.map +1 -0
  673. package/dist/mcp/compact.d.ts +33 -0
  674. package/dist/mcp/compact.js +189 -0
  675. package/dist/mcp/compact.js.map +1 -0
  676. package/dist/mcp/copper-summary.d.ts +26 -0
  677. package/dist/mcp/copper-summary.js +122 -0
  678. package/dist/mcp/copper-summary.js.map +1 -0
  679. package/dist/mcp/copper-tools.d.ts +93 -0
  680. package/dist/mcp/copper-tools.js +228 -0
  681. package/dist/mcp/copper-tools.js.map +1 -0
  682. package/dist/mcp/copper-under.d.ts +16 -0
  683. package/dist/mcp/copper-under.js +46 -0
  684. package/dist/mcp/copper-under.js.map +1 -0
  685. package/dist/mcp/create-part.d.ts +71 -0
  686. package/dist/mcp/create-part.js +31 -0
  687. package/dist/mcp/create-part.js.map +1 -0
  688. package/dist/mcp/datasheet-tools.d.ts +14 -0
  689. package/dist/mcp/datasheet-tools.js +15 -0
  690. package/dist/mcp/datasheet-tools.js.map +1 -0
  691. package/dist/mcp/fillet-tools.d.ts +24 -0
  692. package/dist/mcp/fillet-tools.js +52 -0
  693. package/dist/mcp/fillet-tools.js.map +1 -0
  694. package/dist/mcp/guide.d.ts +37 -0
  695. package/dist/mcp/guide.js +78 -0
  696. package/dist/mcp/guide.js.map +1 -0
  697. package/dist/mcp/import-part.d.ts +13 -0
  698. package/dist/mcp/import-part.js +20 -0
  699. package/dist/mcp/import-part.js.map +1 -0
  700. package/dist/mcp/make-sheet.d.ts +18 -0
  701. package/dist/mcp/make-sheet.js +29 -0
  702. package/dist/mcp/make-sheet.js.map +1 -0
  703. package/dist/mcp/new-circuit.d.ts +77 -0
  704. package/dist/mcp/new-circuit.js +114 -0
  705. package/dist/mcp/new-circuit.js.map +1 -0
  706. package/dist/mcp/place-tools.d.ts +46 -0
  707. package/dist/mcp/place-tools.js +121 -0
  708. package/dist/mcp/place-tools.js.map +1 -0
  709. package/dist/mcp/pour-tools.d.ts +126 -0
  710. package/dist/mcp/pour-tools.js +105 -0
  711. package/dist/mcp/pour-tools.js.map +1 -0
  712. package/dist/mcp/project-tools.d.ts +36 -0
  713. package/dist/mcp/project-tools.js +115 -0
  714. package/dist/mcp/project-tools.js.map +1 -0
  715. package/dist/mcp/route-by-ref.d.ts +20 -0
  716. package/dist/mcp/route-by-ref.js +70 -0
  717. package/dist/mcp/route-by-ref.js.map +1 -0
  718. package/dist/mcp/route-tools.d.ts +54 -0
  719. package/dist/mcp/route-tools.js +173 -0
  720. package/dist/mcp/route-tools.js.map +1 -0
  721. package/dist/mcp/server.d.ts +9 -0
  722. package/dist/mcp/server.js +290 -0
  723. package/dist/mcp/server.js.map +1 -0
  724. package/dist/skill-install.d.ts +13 -0
  725. package/dist/skill-install.js +28 -0
  726. package/dist/skill-install.js.map +1 -0
  727. package/dist/studio/fit-board.d.ts +11 -0
  728. package/dist/studio/fit-board.js +15 -0
  729. package/dist/studio/fit-board.js.map +1 -0
  730. package/dist/studio/layout-schema.d.ts +157 -0
  731. package/dist/studio/layout-schema.js +32 -0
  732. package/dist/studio/layout-schema.js.map +1 -0
  733. package/dist/studio/live.d.ts +79 -0
  734. package/dist/studio/live.js +187 -0
  735. package/dist/studio/live.js.map +1 -0
  736. package/dist/studio/place-events.d.ts +60 -0
  737. package/dist/studio/place-events.js +42 -0
  738. package/dist/studio/place-events.js.map +1 -0
  739. package/dist/studio/place-runner.d.ts +62 -0
  740. package/dist/studio/place-runner.js +205 -0
  741. package/dist/studio/place-runner.js.map +1 -0
  742. package/dist/studio/place-worker.d.ts +1 -0
  743. package/dist/studio/place-worker.js +23 -0
  744. package/dist/studio/place-worker.js.map +1 -0
  745. package/dist/studio/route-events.d.ts +64 -0
  746. package/dist/studio/route-events.js +61 -0
  747. package/dist/studio/route-events.js.map +1 -0
  748. package/dist/studio/route-runner.d.ts +90 -0
  749. package/dist/studio/route-runner.js +272 -0
  750. package/dist/studio/route-runner.js.map +1 -0
  751. package/dist/studio/router-worker.d.ts +1 -0
  752. package/dist/studio/router-worker.js +17 -0
  753. package/dist/studio/router-worker.js.map +1 -0
  754. package/dist/studio/server.d.ts +32 -0
  755. package/dist/studio/server.js +610 -0
  756. package/dist/studio/server.js.map +1 -0
  757. package/dist/version.d.ts +1 -0
  758. package/dist/version.js +2 -0
  759. package/dist/version.js.map +1 -0
  760. package/package.json +64 -4
  761. package/skills/copperflow/SKILL.md +199 -0
  762. package/skills/copperflow/references/copper.md +82 -0
  763. package/skills/copperflow/references/design-rules.md +163 -0
  764. package/skills/copperflow/references/design-workflow.md +199 -0
  765. package/skills/copperflow/references/editable-subset.md +83 -0
  766. package/skills/copperflow/references/parts-library.md +83 -0
  767. package/skills/copperflow/references/writing-circuits.md +62 -0
@@ -0,0 +1,199 @@
1
+ # Worked example: a two-channel sensor board
2
+
3
+ The brief: "A small board that reads two analog sensors with an ATtiny814, powered from 5 V
4
+ through a 3.3 V regulator, with a 4-pin sensor connector and a UPDI header." The calls below are
5
+ in order; each shows its arguments and the first lines of its answer. Change ids, counts and
6
+ lengths are illustrative: read your own answers.
7
+
8
+ ## 1. Where the project stands
9
+
10
+ ```
11
+ project_status {}
12
+ → No PROJECT.md yet: write the Intent and Blocks with set_project.
13
+ Circuits: none yet (new_circuit starts one)
14
+ ```
15
+
16
+ ## 2. Intent and blocks
17
+
18
+ ```
19
+ set_project {
20
+ intent: "Reads two 0-3.3 V analog sensors with an ATtiny814 and reports over UPDI/serial; 5 V in, 3.3 V LDO.",
21
+ blocks: [
22
+ { name: "Power", does: "AP2112K-3.3 LDO, 5 V to 3.3 V", status: "planned" },
23
+ { name: "MCU", does: "ATtiny814 with decoupling", status: "planned" },
24
+ { name: "Channel", does: "1k + 100nF RC filter per sensor input; used twice (CH1, CH2)", status: "planned" },
25
+ { name: "Connectors", does: "J1 sensor header (5V, GND, S1, S2), J2 UPDI header", status: "planned" }
26
+ ],
27
+ open: ["choose parts", "approval before the board", "place, route, export"]
28
+ }
29
+ → Change c0001: Intent, Blocks, Open written to PROJECT.md
30
+ ```
31
+
32
+ ## 3. Parts that are not passives
33
+
34
+ `list_parts` first; when the regulator and the MCU are not there, write them from their
35
+ datasheets with generated footprint strings:
36
+
37
+ ```
38
+ list_parts {}
39
+ → The parts library is empty. Create parts with create_part.
40
+
41
+ create_part { id: "AP2112K-3.3", title: "AP2112K 3.3 V 600 mA LDO", manufacturer: "Diodes Inc.",
42
+ mpn: "AP2112K-3.3TRG1", package: "sot23_5",
43
+ pins: "1 VIN power_in\n2 GND ground\n3 EN input\n4 NC no_connect\n5 VOUT power_out",
44
+ suppliers: { lcsc: "C51118" } }
45
+ → Created AP2112K-3.3: AP2112K 3.3 V 600 mA LDO, 5 pins, footprint sot23_5.
46
+ Wrote parts/AP2112K-3.3/part.yaml, ….
47
+ It is NOT verified: check every pin and the footprint in parts/AP2112K-3.3/verification.md against the datasheet.
48
+ Use it with place_part (part "AP2112K-3.3"). Tell the human it is Unverified until they check verification.md.
49
+
50
+ create_part { id: "ATTINY814", title: "ATtiny814 8-bit MCU", manufacturer: "Microchip",
51
+ mpn: "ATTINY814-SSN", package: "soic14",
52
+ pins: "1 VCC power_in\n2 PA4 bidirectional\n3 PA5 bidirectional\n4 PA6 bidirectional\n5 PA7 bidirectional\n6 PB3 bidirectional\n7 PB2 bidirectional\n8 PB1 bidirectional\n9 PB0 bidirectional\n10 UPDI bidirectional\n11 PA1 bidirectional\n12 PA2 bidirectional\n13 PA3 bidirectional\n14 GND ground" }
53
+ → Created ATTINY814: ATtiny814 8-bit MCU, 14 pins, footprint soic14. …
54
+ ```
55
+
56
+ Only when the human names an LCSC number: `import_part { lcsc: "C51118" }` → `Imported C51118 as
57
+ …`; the import is for personal, non-commercial use and is never verified.
58
+
59
+ ## 4. Blocks as sheets, the channel used twice
60
+
61
+ One call writes the circuit and both sheet files. `place: false`: the board waits for approval.
62
+
63
+ ```
64
+ new_circuit {
65
+ file: "sensor.circuit.tsx", place: false,
66
+ sheets: {
67
+ Power: {
68
+ parts: [ { name: "U1", part: "AP2112K-3.3" },
69
+ { name: "C1", kind: "capacitor", value: "1uF", footprint: "0603" },
70
+ { name: "C2", kind: "capacitor", value: "1uF", footprint: "0603" } ],
71
+ nets: { VIN: ["U1.VIN", "U1.EN", "C1.pin1"], VOUT: ["U1.VOUT", "C2.pin1"],
72
+ GND: ["U1.GND", "C1.pin2", "C2.pin2"] },
73
+ ports: ["VIN", "VOUT", "GND"] },
74
+ Channel: {
75
+ parts: [ { name: "R1", kind: "resistor", value: "1k", footprint: "0402" },
76
+ { name: "C1", kind: "capacitor", value: "100nF", footprint: "0402" } ],
77
+ nets: { IN: ["R1.pin1"], OUT: ["R1.pin2", "C1.pin1"], GND: ["C1.pin2"] },
78
+ ports: ["IN", "OUT", "GND"] } },
79
+ instances: [
80
+ { sheet: "Power", name: "PS1", connections: { VIN: "V5", VOUT: "V3_3", GND: "GND" } },
81
+ { sheet: "Channel", name: "CH1", connections: { IN: "S1", OUT: "ADC1", GND: "GND" } },
82
+ { sheet: "Channel", name: "CH2", connections: { IN: "S2", OUT: "ADC2", GND: "GND" } } ],
83
+ parts: [ { name: "U1", part: "ATTINY814" },
84
+ { name: "C1", kind: "capacitor", value: "100nF", footprint: "0402" },
85
+ { name: "J1", kind: "pinheader", props: { pinCount: 4 } },
86
+ { name: "J2", kind: "pinheader", props: { pinCount: 3 } } ],
87
+ nets: { V5: ["J1.pin1"], GND: ["J1.pin2", "J2.pin3", "U1.GND", "C1.pin2"], S1: ["J1.pin3"],
88
+ S2: ["J1.pin4"], V3_3: ["U1.VCC", "C1.pin1", "J2.pin1"], UPDI: ["U1.UPDI", "J2.pin2"],
89
+ ADC1: ["U1.PA4"], ADC2: ["U1.PA5"] } }
90
+ → Change c0004: wrote sensor.circuit.tsx, Power.sheet.tsx, Channel.sheet.tsx
91
+ 4 parts, 3 instances
92
+ PS1 Power base 100: VIN=V5 VOUT=V3_3 GND=GND
93
+ CH1 Channel base 200: IN=S1 OUT=ADC1 GND=GND
94
+ CH2 Channel base 300: IN=S2 OUT=ADC2 GND=GND
95
+ 8 nets, 14 traces
96
+ Now call check_circuit once.
97
+ ```
98
+
99
+ Inside the sheets the designators are local; on the board they are U101, C101, C102 (PS1),
100
+ R201, C201 (CH1), R301, C301 (CH2). A third channel later is one edit:
101
+ `edit_circuit { file, edits: [{ add_instance: { sheet: "Channel", name: "CH3", connections: { IN: "S3", OUT: "ADC3", GND: "GND" } } }] }`.
102
+
103
+ ```
104
+ check_circuit { file: "sensor.circuit.tsx" }
105
+ → sensor.circuit.tsx: 0 errors, 9 warnings
106
+ warning pin-unconnected [U1.PA6]: …
107
+ ```
108
+
109
+ Fix every error; unused MCU pins and `unrouted` are warnings to mention.
110
+
111
+ ## 5. Ask the person before the PCB
112
+
113
+ Stop and ask, in one message, then wait:
114
+
115
+ > The schematic is done: Power (AP2112K-3.3, 2 × 1 µF), MCU (ATtiny814, 100 nF), two sensor
116
+ > channels (1 kΩ + 100 nF each, one sheet used twice), J1 4-pin sensor header and J2 UPDI header.
117
+ > AP2112K-3.3 and ATTINY814 are new library parts and NOT verified. 0 errors, 9 warnings
118
+ > (unused MCU pins). Shall I go on to the board?
119
+
120
+ On a yes:
121
+
122
+ ```
123
+ note_decision { file: "sensor.circuit.tsx", text: "Schematic approved; AP2112K-3.3 and ATtiny814 unverified" }
124
+ → Change c0005: noted under Decisions in PROJECT.md
125
+ ```
126
+
127
+ ## 6. Place block by block
128
+
129
+ The MCU first (most connections), then the blocks round it, then the connectors.
130
+
131
+ ```
132
+ autoplace { file: "sensor.circuit.tsx", parts: ["U1", "C1"] }
133
+ → Placed 2 parts; wire length 96 mm (was 140); board 30 × 20 mm; 0 overlaps
134
+ Change c0006; undo_change takes it back.
135
+ autoplace { file: "sensor.circuit.tsx", instance: "PS1" }
136
+ → Placed 3 parts; …
137
+ autoplace { file: "sensor.circuit.tsx", instance: "CH1" }
138
+ → Placed 2 parts; …
139
+ autoplace { file: "sensor.circuit.tsx", instance: "CH2" }
140
+ → Placed 2 parts; wire length 78 mm (was 85); board 30 × 20 mm; 0 overlaps
141
+ Change c0009; undo_change takes it back.
142
+ Notes: CH2 was moved as a block, keeping the arrangement of CH1
143
+ autoplace { file: "sensor.circuit.tsx", parts: ["J1", "J2"] }
144
+ → Placed 2 parts; wire length 61 mm (was 88); board 30 × 20 mm; 0 overlaps
145
+ fit_board { file: "sensor.circuit.tsx" }
146
+ → Change c0011: board 24 × 17 mm (margin 2 mm)
147
+ ```
148
+
149
+ A sheet holds one layout for all its instances: placing CH1 wrote the positions into
150
+ `Channel.sheet.tsx`, so CH2 took the same layout on top of CH1. `autoplace` on
151
+ CH2 (or on the whole board) moves the other instance as a whole: it sets the instance's `pcbX`,
152
+ `pcbY` so its copy overlaps nothing, near what it connects to. A locked instance stays. Then look
153
+ with `board_summary`.
154
+
155
+ ## 7. Look, tune, pour, route
156
+
157
+ ```
158
+ board_summary { file: "sensor.circuit.tsx" }
159
+ → sensor.circuit.tsx: Board 24 × 17 mm, 2 layers, courtyards use 31%; 11 parts, 8 nets
160
+ C1 100nF 0402 @(4.1, 2.0) r0 top
161
+ …
162
+ Longest connections, pad to pad (10 of 17):
163
+ ADC1: R201.pin2 (6.10, 3.00 top) to U1.pin2 (9.20, 4.10 top) 3.3 mm unrouted
164
+ …
165
+ Pours: none
166
+ Unrouted: 17 connections
167
+ add_pour { file: "sensor.circuit.tsx", net: "GND", layer: "top" }
168
+ → Change c0012: added copperpour:1 (GND, top)
169
+ copperpour:1 GND top: 301.20 mm², joins 9 pads
170
+ add_pour { file: "sensor.circuit.tsx", net: "GND", layer: "bottom" }
171
+ → Change c0013: added copperpour:2 (GND, bottom)
172
+ route_track { file: "sensor.circuit.tsx", from: "R201.pin2", to: "U1.PA4" }
173
+ → Change c0014: routed ADC1 R201.pin2 (6.10, 3.00 top) to U1.pin2 (9.20, 4.10 top): 1 track, 0 vias
174
+ autoroute { file: "sensor.circuit.tsx" }
175
+ → Change c0015: Routed 7 of 7 connections in 1 pass
176
+ check_circuit { file: "sensor.circuit.tsx" }
177
+ → sensor.circuit.tsx: 0 errors, 6 warnings
178
+ ```
179
+
180
+ Clean means 0 errors and no `unrouted` warning. Had `autoroute` left one (`unrouted: C3.pin2
181
+ (12.30, 4.50 top) to U2.pin2 (…)`), route it with `route_track` by reference or move a part and
182
+ run `autoroute` again before the export.
183
+
184
+ A part that sits badly in `board_summary` (overlapping, off the board, a long line) is moved
185
+ with `set_props { pcbX, pcbY, pcbRotation }` or placed again with `autoplace` before routing.
186
+
187
+ ## 8. Export and remember
188
+
189
+ ```
190
+ export_fabrication { file: "sensor.circuit.tsx" }
191
+ → Wrote 11 files to sensor-fab/ and sensor-fab.zip:
192
+ …
193
+ Warning: …
194
+ Next, a person should …
195
+ note_decision { file: "sensor.circuit.tsx", text: "Board 24 x 17 mm, GND pour top, routed on two layers" }
196
+ set_project { blocks: [ …each block with status "routed"… ], open: ["human: verify AP2112K-3.3 and ATTINY814", "order"] }
197
+ ```
198
+
199
+ Then tell the human the change ids and what you did not verify.
@@ -0,0 +1,83 @@
1
+ # Writing code the human can edit
2
+
3
+ copperflow writes visual edits back into the source only where it can read the code
4
+ without running it. Code outside this subset still works, but it is read-only in the
5
+ editor and in the tools.
6
+
7
+ ## Parts
8
+
9
+ - One JSX element per part, with a string-literal name: `<resistor name="R4" ... />`.
10
+ - Names are unique within a file.
11
+ - Position, rotation and values are literals: `pcbX={4.5}`, `pcbRotation={-90}`,
12
+ `resistance="10k"`. Avoid `pcbX={x + 2}` or `pcbX={offset}` for anything the human may move.
13
+ - No spread props (`{...props}`) on parts the human should edit.
14
+ - Avoid `.map()` for parts the human will place one by one. A loop is fine for a row of
15
+ identical parts that move together; they are shown as read-only.
16
+ - Objects such as `pinLabels={{ pin1: "VIN" }}` are fine; they are shown read-only, and the
17
+ part's other props stay editable.
18
+
19
+ ## Traces
20
+
21
+ - Literal selectors: `<trace from=".R1 > .pin1" to="net.GND" />` or `from="R1.pin1"`.
22
+ - Put traces as direct children of `<board>`, after the parts, one per line.
23
+ - Keep `</board>` on its own line so new traces can be added before it.
24
+ - Write `schematicRouteHints` as a literal list of `{ x, y }` points; the editor moves net labels and ground or power symbols by rewriting it.
25
+
26
+ ## Sub-components
27
+
28
+ A part inside a component defined outside the board, such as
29
+ `const Power = () => <group name="power">...</group>`, is editable. Editing it changes every
30
+ place the component is used.
31
+
32
+ ## Pin names of the built-in kinds
33
+
34
+ Every pin answers to `pin<n>` and to the aliases below, so `R1.pin1`, `LED1.anode` and
35
+ `.LED1 > .pin1` all work. A `pinLabels` entry for a pin replaces the aliases of that pin; its names
36
+ come after `pin<n>`. A label may be one name or a list of names.
37
+
38
+ | Kind | Pins (number: names) |
39
+ |---|---|
40
+ | resistor, capacitor, inductor, fuse, crystal, switch | 1: pin1, left; 2: pin2, right |
41
+ | capacitor with `polarized` | 1: pin1, pos, anode; 2: pin2, neg, cathode |
42
+ | diode, led | 1: pin1, anode, pos; 2: pin2, cathode, neg |
43
+ | battery | 1: pin1, pos; 2: pin2, neg |
44
+ | potentiometer | 1: pin1; 2: pin2, wiper; 3: pin3 |
45
+ | resonator | 1: pin1; 2: pin2, gnd; 3: pin3 |
46
+ | pushbutton | 1 to 4: pin1 to pin4 |
47
+ | testpoint | 1: pin1 |
48
+ | transistor (`type` npn or pnp) | 1: pin1, B, base; 2: pin2, E, emitter; 3: pin3, C, collector |
49
+ | mosfet | 1: pin1, G, gate; 2: pin2, S, source; 3: pin3, D, drain |
50
+ | pinheader | 1 to `pinCount`: pin\<n\> |
51
+ | chip, connector | the numbers in `pinLabels` plus 1 to `pinCount`; with neither, one pin per pad of `footprint` |
52
+
53
+ A chip, connector or pinheader whose pins cannot be found this way (for example a connector with
54
+ only `standard="usb_c"`) has no pins and is reported as an `unsupported-element` error.
55
+
56
+ ## Footprint strings
57
+
58
+ copperflow makes the pads itself from these `footprint` strings (case does not matter):
59
+
60
+ | Family | Strings |
61
+ |---|---|
62
+ | Chip resistors, capacitors, LEDs | `0201`, `0402`, `0603`, `0805`, `1206`, `1210`, `1812`, `2010`, `2512` |
63
+ | Diodes | `sod123`, `sod323`, `sma`, `smb`, `smc` (also `do214ac`, `do214aa`, `do214ab`) |
64
+ | SOT-23 | `sot23`, `sot23_5`, `sot23_6` |
65
+ | Power SOT | `sot223`, `sot89` |
66
+ | SOIC, SOP, SSOP, TSSOP | `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) |
67
+ | 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
+ | 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
+ | DFN | `dfn<N>_<across>x<along>_p<pitch>`, `_ep` as for QFN, such as `dfn8_3x3_p0.65_ep1.6x2.4` |
70
+ | BGA | `bga<N>_<x>x<y>_p<pitch>`, a full grid, optional `_rows<R>x<C>`, such as `bga256_17x17_p1` |
71
+ | 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
+ | Crystals (through-hole) | `hc49`, `hc49s` |
74
+ | Radial electrolytics | `radial<can>x<lead spacing>`, such as `radial6.3x2.5` |
75
+ | 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) |
76
+
77
+ `docs/footprints.md` in the copperflow repository draws each family and says how sure its numbers
78
+ 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 `sod523` or `to247`, gives the error
80
+ `copperflow cannot make footprint "<string>": known families are …`, naming the nearest valid
81
+ strings first when it looks like a known family (`soic18`: `soic14, soic16, soic18w`).
82
+ For a package no family fits, a library part carries its own `footprint.yaml` (see
83
+ [parts-library.md](parts-library.md)).
@@ -0,0 +1,83 @@
1
+ # Creating library parts
2
+
3
+ Chips and connectors go into the project's parts library before they go into a circuit.
4
+ Passive parts (resistors, capacitors, LEDs, headers) are built in and need no entry.
5
+ (Without this skill installed, `guide { "topic": "parts-library" }` returns this page.)
6
+
7
+ ## From a datasheet
8
+
9
+ 1. Read the datasheet yourself. Find the package, the pin table and the ordering information.
10
+ When no datasheet can be read (no link, offline, a scan you cannot read), say so to the
11
+ person and ask for the datasheet; prefer that to writing pins from memory, which is often
12
+ wrong (pins shifted by one). If they ask you to go on anyway, put `Pins NOT from a datasheet`
13
+ in `description` and in PROJECT.md's Open.
14
+ 2. Call `create_part` with:
15
+ - `id`: the folder name, usually the part number, such as `AP2112K-3.3`.
16
+ - `title`, `manufacturer`, `mpn` (the full orderable number, such as `AP2112K-3.3TRG1`).
17
+ - `package`: a footprint string for the package, such as `sot23_5`, `soic8`,
18
+ `qfn32_p0.5mm` or `tssop20`; copperflow makes the pads from it. The strings it knows are
19
+ listed in [editable-subset.md](editable-subset.md). Use a footprint string whenever a family
20
+ fits the package.
21
+ When none fits, set `package` to `{ "file": "footprint.yaml" }` and pass `footprint_file`: transcribe
22
+ every pad (number, shape, x, y, width, height, and a drill for through-hole pads) from the
23
+ datasheet's recommended land pattern, name the page you took it from, and never estimate a
24
+ coordinate. Each pad number must be a pin number; several pads may share one (a shell
25
+ with two legs). Every pin except `no_connect` needs a pad. The part stays unverified
26
+ until a human checks every pad against the datasheet. Without `footprint_file` a
27
+ placeholder `footprint.yaml` (`placeholder: true`) is written: the schematic works, but each
28
+ use on the board is a check error until the human draws the pads and deletes that line.
29
+ Footprint files go into the pick-and-place file at their own orientation (the `file`
30
+ family's correction is 0). Imported ones are already in JLCPCB's orientation. One drawn in
31
+ copperflow's orientation (pin 1 top left, rows vertical) for a SOIC- or SOP-like package needs
32
+ `fabrication.placementRotations.parts.<id>: 270` in `rules.yaml` (see
33
+ [design-rules.md](design-rules.md)); tell the human to check it in JLCPCB's assembly preview.
34
+ - `pins`: every pin by number, with the datasheet's name and an electrical type:
35
+ `power_in`, `power_out`, `ground`, `input`, `output`, `bidirectional`, `passive` or
36
+ `no_connect`. Pin names become selectors, so use letters, digits and `_` only
37
+ (write `VCC_3V3`, not `+3.3V`).
38
+ A pin may also name the schematic `side` it is drawn on (`left`, `right`, `top` or `bottom`);
39
+ without it the electrical type decides.
40
+ `pins` may also be the datasheet's pin table as text, one pin per line (`1 VIN power_in`,
41
+ tab or comma separated too; a pin without a type is `passive`); a line with an unknown type
42
+ is refused with its line number, so write the types out.
43
+ - `suppliers` (for example `jlcpcb: C51118`) and `datasheet` when you know them: an object
44
+ with only the keys `url` (an http or https link), `file` (a PDF file name in the part folder)
45
+ and `title` (at most 200 characters), e.g. `{ "url": "https://example.com/ds.pdf", "title": "TJA1051 datasheet" }`.
46
+ Any other key (`pages`, `page`) is refused; the pages go to `attach_datasheet` below.
47
+ An existing id is refused unless you pass `replace: true` (never for a verified part). The
48
+ human can do the same in the Studio with Library → New part….
49
+ 3. Call `attach_datasheet` with `part`, the datasheet's `url`, its `title` and the `pages` of the
50
+ pin table: `verification.md` then asks the human to compare each pin with that page.
51
+ Tell the human the part is not verified and that `parts/<id>/verification.md` lists what to
52
+ check.
53
+ 4. Place it with `place_part`, connect it with `add_trace`, then run `check_circuit`.
54
+
55
+ ## By LCSC number
56
+
57
+ When the human asks for a part by its LCSC number (for example `C7950`), call `import_part`
58
+ with `lcsc` (and `id` if they name one). It fetches the part's symbol, footprint and attributes
59
+ from EasyEDA and writes `parts/<id>/` with `part.yaml`, `footprint.yaml`, `verification.md` and
60
+ `source.md`. Pin types are `passive` except supply and ground pins, so set the real types with
61
+ `create_part` (`replace: true`, `package: { "file": "footprint.yaml" }`, no `footprint_file`) from
62
+ the datasheet when the checks need them: the imported pads, origin and `source.md` are kept. A
63
+ replace that changes the footprint (a footprint string or new pads) makes the part `written` and
64
+ removes `source.md` and the imported `footprint.yaml`. The footprint keeps EasyEDA's orientation
65
+ (dual packages with their rows horizontal and pin 1 at the bottom left; quad packages as the source draws them), which is JLCPCB's, so pick-and-place needs no
66
+ correction; place it at `pcbRotation -90` to match a generated footprint of the same package. Tell the human the
67
+ part is not verified, what the answer's notes say was approximated, and that the import is for
68
+ personal, non-commercial use only, as EasyEDA's terms allow (see `source.md`). Import one part per
69
+ request; never import in bulk. Offline it writes nothing: then create the part from the datasheet
70
+ instead. Parts whose pins are numbered with letters (BGA, many USB-C connectors) and footprints with
71
+ pads on the bottom side are refused; create those from the datasheet with `create_part`.
72
+
73
+ ## From a photo
74
+
75
+ A photo shows the package and the marking, not the pinout. Identify the part from the marking,
76
+ then find its datasheet and follow the steps above. Say which identification you are unsure of.
77
+
78
+ ## Rules
79
+
80
+ - You cannot mark a part verified, and you cannot replace a verified part. Ask the human.
81
+ - If the package has variants (for example SOT-23-5 pinouts differ between manufacturers),
82
+ check the pin numbering against the exact orderable part number.
83
+ - When `check_circuit` warns that a pin needs power or ground, check the pin types first.
@@ -0,0 +1,62 @@
1
+ # Writing and reading circuits
2
+
3
+ Read before your first `new_circuit` or `edit_circuit` in a project.
4
+
5
+ ## A part in new_circuit, place_part and add_part
6
+
7
+ - `part`: a library part id from `list_parts` (a chip made with `create_part` or `import_part`).
8
+ Create the library part first; `new_circuit` refuses an id the library does not have.
9
+ - `kind`: a built-in part (`resistor`, `capacitor`, `inductor`, `led`, `diode`, `pinheader`,
10
+ …). Never `kind: "chip"` with hand-written pins: chips come from the library.
11
+ - `value`: the main value of a built-in part (`"10k"`, `"100nF"`).
12
+ - `footprint`: a generated footprint string for a built-in part (`"0402"`, `"0603"`); a
13
+ library part brings its own.
14
+ - `props`: anything else, e.g. `{ pinCount: 4 }` for a pin header. A header's `pinLabels` is an
15
+ object keyed `pin1`, `pin2`, … (`{ pin1: "V5", pin2: "GND" }`); an array is refused. Each name
16
+ is letters, digits and `_` and does not start with a digit: `"5V"` is refused and the answer
17
+ suggests `"V5"`. The same shape goes to `set_props`. `noConnect` (`"pin4,pin5"`) may be given here too.
18
+ - `name`: the designator, a letter then letters, digits or `_` (at most 32: `R1`, `U_MCU`). A
19
+ library part id (`create_part`'s `id`) starts with a letter, ends with a letter or digit, and
20
+ between has letters, digits, `.`, `_` or `-` (at most 64: `AP2112K-3.3`).
21
+
22
+ The built-in `led` and `diode` have `pin1` = `anode` and `pin2` = `cathode` (`D1.anode`,
23
+ `D1.cathode`); a resistor's or capacitor's pins are `pin1` and `pin2`.
24
+
25
+ A net names pins as `R1.pin1` or by a library pin name (`U1.VOUT`). A pin the part does not
26
+ have is refused before anything is written, and the answer lists the part's real pins: use one
27
+ of those. `new_circuit` refuses a file that exists; pass `replace: true` to overwrite it and its
28
+ sheet files (one history entry, so `undo_change` brings the old text back).
29
+
30
+ ## Reading what is there
31
+
32
+ `circuit_summary` shows parts the tools cannot edit as `[read-only: …]` with the reason (an
33
+ expression, a generated element); change those only by asking the human. Read the summary in
34
+ full before you edit a file. When the human says they changed something, call
35
+ `circuit_summary` again before you edit: your earlier reading is out of date.
36
+
37
+ ## Positions the human set
38
+
39
+ Leave `schX`, `schY`, `pcbX`, `pcbY`, `pcbRotation` and `schematicRouteHints` of parts the
40
+ human placed as they are, unless the human asks for a new position. `autoplace` already leaves
41
+ them alone; do not undo that with `set_props`.
42
+
43
+ ## Parts the human makes
44
+
45
+ The person can do what `create_part` does in the Studio: Library → New part… opens a form for
46
+ the part's pins and package and writes the same part.yaml. When a part needs a photo of the
47
+ datasheet or a choice only they can make, suggest that instead.
48
+
49
+ ## Export
50
+
51
+ `export_fabrication` `{ file, out? }` writes into the circuit's folder, or into the project
52
+ folder `out` (e.g. `"fab"`). Pass on every `Warning:` line: connections not routed, parts
53
+ without a footprint, silkscreen over pads, parts without an LCSC number (JLCPCB assembly will
54
+ not match them). A design with errors is refused and nothing is written.
55
+
56
+ Export only a clean board: `check_circuit` with 0 errors and no `unrouted` warning. With
57
+ connections still unrouted the files are written with a warning, but the board is not finished
58
+ and must not be ordered: say so, then route them with `route_track` by reference
59
+ (`{ from: "C3.pin2", to: "U2.pin2" }`), or move the part in the way and run `autoroute` again.
60
+
61
+ A part not placed yet (no `pcbX`/`pcbY`) gets only the `unplaced` warning; its board-edge,
62
+ courtyard and clearance findings wait until it has a position.