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.
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +265 -2
- package/dist/app/THIRD_PARTY_LICENSES.txt +118 -0
- package/dist/app/assets/NewPartDialog-Qb7NwhBb.js +160 -0
- package/dist/app/assets/index-CSWIIMFE.css +1 -0
- package/dist/app/assets/index-C_TXwo-N.js +19 -0
- package/dist/app/index.html +15 -0
- package/dist/app/theme-boot.js +3 -0
- package/dist/cli-commands.d.ts +14 -0
- package/dist/cli-commands.js +285 -0
- package/dist/cli-commands.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +24 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/analyze.d.ts +29 -0
- package/dist/core/analyze.js +284 -0
- package/dist/core/analyze.js.map +1 -0
- package/dist/core/annotations.d.ts +77 -0
- package/dist/core/annotations.js +138 -0
- package/dist/core/annotations.js.map +1 -0
- package/dist/core/board-edits.d.ts +8 -0
- package/dist/core/board-edits.js +56 -0
- package/dist/core/board-edits.js.map +1 -0
- package/dist/core/board-items.d.ts +40 -0
- package/dist/core/board-items.js +95 -0
- package/dist/core/board-items.js.map +1 -0
- package/dist/core/bom.d.ts +35 -0
- package/dist/core/bom.js +146 -0
- package/dist/core/bom.js.map +1 -0
- package/dist/core/check.d.ts +42 -0
- package/dist/core/check.js +91 -0
- package/dist/core/check.js.map +1 -0
- package/dist/core/checks-line.d.ts +7 -0
- package/dist/core/checks-line.js +8 -0
- package/dist/core/checks-line.js.map +1 -0
- package/dist/core/connection-names.d.ts +2 -0
- package/dist/core/connection-names.js +16 -0
- package/dist/core/connection-names.js.map +1 -0
- package/dist/core/design-source.d.ts +6 -0
- package/dist/core/design-source.js +14 -0
- package/dist/core/design-source.js.map +1 -0
- package/dist/core/drawing-edits.d.ts +19 -0
- package/dist/core/drawing-edits.js +158 -0
- package/dist/core/drawing-edits.js.map +1 -0
- package/dist/core/drawing-identity.d.ts +12 -0
- package/dist/core/drawing-identity.js +32 -0
- package/dist/core/drawing-identity.js.map +1 -0
- package/dist/core/drawing-names.d.ts +10 -0
- package/dist/core/drawing-names.js +30 -0
- package/dist/core/drawing-names.js.map +1 -0
- package/dist/core/drawing-scan.d.ts +41 -0
- package/dist/core/drawing-scan.js +82 -0
- package/dist/core/drawing-scan.js.map +1 -0
- package/dist/core/edit-error.d.ts +5 -0
- package/dist/core/edit-error.js +9 -0
- package/dist/core/edit-error.js.map +1 -0
- package/dist/core/edit-text.d.ts +28 -0
- package/dist/core/edit-text.js +89 -0
- package/dist/core/edit-text.js.map +1 -0
- package/dist/core/edit.d.ts +13 -0
- package/dist/core/edit.js +341 -0
- package/dist/core/edit.js.map +1 -0
- package/dist/core/fabrication.d.ts +39 -0
- package/dist/core/fabrication.js +94 -0
- package/dist/core/fabrication.js.map +1 -0
- package/dist/core/file-writes.d.ts +18 -0
- package/dist/core/file-writes.js +81 -0
- package/dist/core/file-writes.js.map +1 -0
- package/dist/core/fs-utils.d.ts +13 -0
- package/dist/core/fs-utils.js +51 -0
- package/dist/core/fs-utils.js.map +1 -0
- package/dist/core/history.d.ts +80 -0
- package/dist/core/history.js +161 -0
- package/dist/core/history.js.map +1 -0
- package/dist/core/index.d.ts +21 -0
- package/dist/core/index.js +22 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/instance-edits.d.ts +15 -0
- package/dist/core/instance-edits.js +69 -0
- package/dist/core/instance-edits.js.map +1 -0
- package/dist/core/instance-locks.d.ts +10 -0
- package/dist/core/instance-locks.js +16 -0
- package/dist/core/instance-locks.js.map +1 -0
- package/dist/core/instance-requests.d.ts +45 -0
- package/dist/core/instance-requests.js +93 -0
- package/dist/core/instance-requests.js.map +1 -0
- package/dist/core/layout-edits.d.ts +51 -0
- package/dist/core/layout-edits.js +82 -0
- package/dist/core/layout-edits.js.map +1 -0
- package/dist/core/layout-file.d.ts +80 -0
- package/dist/core/layout-file.js +209 -0
- package/dist/core/layout-file.js.map +1 -0
- package/dist/core/layout-locks.d.ts +38 -0
- package/dist/core/layout-locks.js +39 -0
- package/dist/core/layout-locks.js.map +1 -0
- package/dist/core/layout-records.d.ts +72 -0
- package/dist/core/layout-records.js +146 -0
- package/dist/core/layout-records.js.map +1 -0
- package/dist/core/library.d.ts +128 -0
- package/dist/core/library.js +378 -0
- package/dist/core/library.js.map +1 -0
- package/dist/core/literals.d.ts +19 -0
- package/dist/core/literals.js +106 -0
- package/dist/core/literals.js.map +1 -0
- package/dist/core/make-sheet.d.ts +44 -0
- package/dist/core/make-sheet.js +130 -0
- package/dist/core/make-sheet.js.map +1 -0
- package/dist/core/netlist.d.ts +41 -0
- package/dist/core/netlist.js +147 -0
- package/dist/core/netlist.js.map +1 -0
- package/dist/core/new-circuit-sheets.d.ts +35 -0
- package/dist/core/new-circuit-sheets.js +146 -0
- package/dist/core/new-circuit-sheets.js.map +1 -0
- package/dist/core/new-circuit.d.ts +65 -0
- package/dist/core/new-circuit.js +83 -0
- package/dist/core/new-circuit.js.map +1 -0
- package/dist/core/page-edits.d.ts +25 -0
- package/dist/core/page-edits.js +180 -0
- package/dist/core/page-edits.js.map +1 -0
- package/dist/core/pin-types.d.ts +8 -0
- package/dist/core/pin-types.js +10 -0
- package/dist/core/pin-types.js.map +1 -0
- package/dist/core/place.d.ts +30 -0
- package/dist/core/place.js +77 -0
- package/dist/core/place.js.map +1 -0
- package/dist/core/placement-write.d.ts +56 -0
- package/dist/core/placement-write.js +222 -0
- package/dist/core/placement-write.js.map +1 -0
- package/dist/core/pour-edits.d.ts +20 -0
- package/dist/core/pour-edits.js +241 -0
- package/dist/core/pour-edits.js.map +1 -0
- package/dist/core/project-text.d.ts +15 -0
- package/dist/core/project-text.js +58 -0
- package/dist/core/project-text.js.map +1 -0
- package/dist/core/project.d.ts +23 -0
- package/dist/core/project.js +63 -0
- package/dist/core/project.js.map +1 -0
- package/dist/core/rename-designators.d.ts +23 -0
- package/dist/core/rename-designators.js +83 -0
- package/dist/core/rename-designators.js.map +1 -0
- package/dist/core/rename-parts.d.ts +12 -0
- package/dist/core/rename-parts.js +129 -0
- package/dist/core/rename-parts.js.map +1 -0
- package/dist/core/rules-edit.d.ts +7 -0
- package/dist/core/rules-edit.js +56 -0
- package/dist/core/rules-edit.js.map +1 -0
- package/dist/core/selectors.d.ts +11 -0
- package/dist/core/selectors.js +33 -0
- package/dist/core/selectors.js.map +1 -0
- package/dist/core/sheet-cut-layout.d.ts +13 -0
- package/dist/core/sheet-cut-layout.js +62 -0
- package/dist/core/sheet-cut-layout.js.map +1 -0
- package/dist/core/sheet-cut-text.d.ts +23 -0
- package/dist/core/sheet-cut-text.js +129 -0
- package/dist/core/sheet-cut-text.js.map +1 -0
- package/dist/core/sheet-cut.d.ts +55 -0
- package/dist/core/sheet-cut.js +204 -0
- package/dist/core/sheet-cut.js.map +1 -0
- package/dist/core/sheet-edits.d.ts +12 -0
- package/dist/core/sheet-edits.js +107 -0
- package/dist/core/sheet-edits.js.map +1 -0
- package/dist/core/sheet-files.d.ts +31 -0
- package/dist/core/sheet-files.js +134 -0
- package/dist/core/sheet-files.js.map +1 -0
- package/dist/core/sheet-layout.d.ts +27 -0
- package/dist/core/sheet-layout.js +60 -0
- package/dist/core/sheet-layout.js.map +1 -0
- package/dist/core/summary.d.ts +10 -0
- package/dist/core/summary.js +79 -0
- package/dist/core/summary.js.map +1 -0
- package/dist/core/track-split.d.ts +22 -0
- package/dist/core/track-split.js +24 -0
- package/dist/core/track-split.js.map +1 -0
- package/dist/core/types.d.ts +309 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/unroute.d.ts +56 -0
- package/dist/core/unroute.js +87 -0
- package/dist/core/unroute.js.map +1 -0
- package/dist/core/workspace.d.ts +94 -0
- package/dist/core/workspace.js +376 -0
- package/dist/core/workspace.js.map +1 -0
- package/dist/engine/autoplace.d.ts +18 -0
- package/dist/engine/autoplace.js +68 -0
- package/dist/engine/autoplace.js.map +1 -0
- package/dist/engine/board.d.ts +12 -0
- package/dist/engine/board.js +60 -0
- package/dist/engine/board.js.map +1 -0
- package/dist/engine/checks/copper-clearance.d.ts +7 -0
- package/dist/engine/checks/copper-clearance.js +116 -0
- package/dist/engine/checks/copper-clearance.js.map +1 -0
- package/dist/engine/checks/copper-notes.d.ts +11 -0
- package/dist/engine/checks/copper-notes.js +17 -0
- package/dist/engine/checks/copper-notes.js.map +1 -0
- package/dist/engine/checks/copper-pieces.d.ts +26 -0
- package/dist/engine/checks/copper-pieces.js +42 -0
- package/dist/engine/checks/copper-pieces.js.map +1 -0
- package/dist/engine/checks/copper-violation.d.ts +9 -0
- package/dist/engine/checks/copper-violation.js +11 -0
- package/dist/engine/checks/copper-violation.js.map +1 -0
- package/dist/engine/checks/drc-copper.d.ts +14 -0
- package/dist/engine/checks/drc-copper.js +139 -0
- package/dist/engine/checks/drc-copper.js.map +1 -0
- package/dist/engine/checks/drc-pads.d.ts +8 -0
- package/dist/engine/checks/drc-pads.js +172 -0
- package/dist/engine/checks/drc-pads.js.map +1 -0
- package/dist/engine/checks/drc-parts.d.ts +5 -0
- package/dist/engine/checks/drc-parts.js +208 -0
- package/dist/engine/checks/drc-parts.js.map +1 -0
- package/dist/engine/checks/drc-pours.d.ts +6 -0
- package/dist/engine/checks/drc-pours.js +240 -0
- package/dist/engine/checks/drc-pours.js.map +1 -0
- package/dist/engine/checks/erc.d.ts +6 -0
- package/dist/engine/checks/erc.js +94 -0
- package/dist/engine/checks/erc.js.map +1 -0
- package/dist/engine/checks/fillet-guard.d.ts +29 -0
- package/dist/engine/checks/fillet-guard.js +75 -0
- package/dist/engine/checks/fillet-guard.js.map +1 -0
- package/dist/engine/checks/geometry.d.ts +25 -0
- package/dist/engine/checks/geometry.js +182 -0
- package/dist/engine/checks/geometry.js.map +1 -0
- package/dist/engine/checks/grid-index.d.ts +24 -0
- package/dist/engine/checks/grid-index.js +57 -0
- package/dist/engine/checks/grid-index.js.map +1 -0
- package/dist/engine/checks/index.d.ts +16 -0
- package/dist/engine/checks/index.js +55 -0
- package/dist/engine/checks/index.js.map +1 -0
- package/dist/engine/checks/limits.d.ts +7 -0
- package/dist/engine/checks/limits.js +10 -0
- package/dist/engine/checks/limits.js.map +1 -0
- package/dist/engine/checks/unplaced-parts.d.ts +4 -0
- package/dist/engine/checks/unplaced-parts.js +29 -0
- package/dist/engine/checks/unplaced-parts.js.map +1 -0
- package/dist/engine/checks/violation.d.ts +14 -0
- package/dist/engine/checks/violation.js +7 -0
- package/dist/engine/checks/violation.js.map +1 -0
- package/dist/engine/component.d.ts +34 -0
- package/dist/engine/component.js +125 -0
- package/dist/engine/component.js.map +1 -0
- package/dist/engine/copper.d.ts +63 -0
- package/dist/engine/copper.js +276 -0
- package/dist/engine/copper.js.map +1 -0
- package/dist/engine/design.d.ts +21 -0
- package/dist/engine/design.js +63 -0
- package/dist/engine/design.js.map +1 -0
- package/dist/engine/diagnostics.d.ts +2 -0
- package/dist/engine/diagnostics.js +6 -0
- package/dist/engine/diagnostics.js.map +1 -0
- package/dist/engine/drawing-ids.d.ts +23 -0
- package/dist/engine/drawing-ids.js +45 -0
- package/dist/engine/drawing-ids.js.map +1 -0
- package/dist/engine/drawing-kinds.d.ts +18 -0
- package/dist/engine/drawing-kinds.js +102 -0
- package/dist/engine/drawing-kinds.js.map +1 -0
- package/dist/engine/drawing-reader.d.ts +42 -0
- package/dist/engine/drawing-reader.js +97 -0
- package/dist/engine/drawing-reader.js.map +1 -0
- package/dist/engine/drawings.d.ts +35 -0
- package/dist/engine/drawings.js +94 -0
- package/dist/engine/drawings.js.map +1 -0
- package/dist/engine/elaborate.d.ts +8 -0
- package/dist/engine/elaborate.js +490 -0
- package/dist/engine/elaborate.js.map +1 -0
- package/dist/engine/engine-worker.d.ts +1 -0
- package/dist/engine/engine-worker.js +17 -0
- package/dist/engine/engine-worker.js.map +1 -0
- package/dist/engine/engine.d.ts +41 -0
- package/dist/engine/engine.js +95 -0
- package/dist/engine/engine.js.map +1 -0
- package/dist/engine/evaluate.d.ts +10 -0
- package/dist/engine/evaluate.js +125 -0
- package/dist/engine/evaluate.js.map +1 -0
- package/dist/engine/fab/bom-csv.d.ts +5 -0
- package/dist/engine/fab/bom-csv.js +16 -0
- package/dist/engine/fab/bom-csv.js.map +1 -0
- package/dist/engine/fab/csv.d.ts +4 -0
- package/dist/engine/fab/csv.js +11 -0
- package/dist/engine/fab/csv.js.map +1 -0
- package/dist/engine/fab/designators.d.ts +42 -0
- package/dist/engine/fab/designators.js +109 -0
- package/dist/engine/fab/designators.js.map +1 -0
- package/dist/engine/fab/excellon.d.ts +23 -0
- package/dist/engine/fab/excellon.js +82 -0
- package/dist/engine/fab/excellon.js.map +1 -0
- package/dist/engine/fab/export.d.ts +33 -0
- package/dist/engine/fab/export.js +105 -0
- package/dist/engine/fab/export.js.map +1 -0
- package/dist/engine/fab/gerber.d.ts +53 -0
- package/dist/engine/fab/gerber.js +151 -0
- package/dist/engine/fab/gerber.js.map +1 -0
- package/dist/engine/fab/layers.d.ts +26 -0
- package/dist/engine/fab/layers.js +162 -0
- package/dist/engine/fab/layers.js.map +1 -0
- package/dist/engine/fab/names.d.ts +20 -0
- package/dist/engine/fab/names.js +58 -0
- package/dist/engine/fab/names.js.map +1 -0
- package/dist/engine/fab/pick-and-place.d.ts +5 -0
- package/dist/engine/fab/pick-and-place.js +36 -0
- package/dist/engine/fab/pick-and-place.js.map +1 -0
- package/dist/engine/fab/stroke-font.d.ts +8 -0
- package/dist/engine/fab/stroke-font.js +83 -0
- package/dist/engine/fab/stroke-font.js.map +1 -0
- package/dist/engine/fab/zip.d.ts +14 -0
- package/dist/engine/fab/zip.js +93 -0
- package/dist/engine/fab/zip.js.map +1 -0
- package/dist/engine/fillet-plan.d.ts +39 -0
- package/dist/engine/fillet-plan.js +87 -0
- package/dist/engine/fillet-plan.js.map +1 -0
- package/dist/engine/fillet.d.ts +54 -0
- package/dist/engine/fillet.js +175 -0
- package/dist/engine/fillet.js.map +1 -0
- package/dist/engine/footprints/bga.d.ts +14 -0
- package/dist/engine/footprints/bga.js +122 -0
- package/dist/engine/footprints/bga.js.map +1 -0
- package/dist/engine/footprints/chip.d.ts +3 -0
- package/dist/engine/footprints/chip.js +52 -0
- package/dist/engine/footprints/chip.js.map +1 -0
- package/dist/engine/footprints/crystal.d.ts +4 -0
- package/dist/engine/footprints/crystal.js +47 -0
- package/dist/engine/footprints/crystal.js.map +1 -0
- package/dist/engine/footprints/dfn.d.ts +13 -0
- package/dist/engine/footprints/dfn.js +52 -0
- package/dist/engine/footprints/dfn.js.map +1 -0
- package/dist/engine/footprints/dip.d.ts +8 -0
- package/dist/engine/footprints/dip.js +65 -0
- package/dist/engine/footprints/dip.js.map +1 -0
- package/dist/engine/footprints/dual.d.ts +14 -0
- package/dist/engine/footprints/dual.js +171 -0
- package/dist/engine/footprints/dual.js.map +1 -0
- package/dist/engine/footprints/exposed.d.ts +27 -0
- package/dist/engine/footprints/exposed.js +50 -0
- package/dist/engine/footprints/exposed.js.map +1 -0
- package/dist/engine/footprints/file.d.ts +65 -0
- package/dist/engine/footprints/file.js +141 -0
- package/dist/engine/footprints/file.js.map +1 -0
- package/dist/engine/footprints/ic.d.ts +34 -0
- package/dist/engine/footprints/ic.js +31 -0
- package/dist/engine/footprints/ic.js.map +1 -0
- package/dist/engine/footprints/index.d.ts +17 -0
- package/dist/engine/footprints/index.js +104 -0
- package/dist/engine/footprints/index.js.map +1 -0
- package/dist/engine/footprints/ipc7251.d.ts +30 -0
- package/dist/engine/footprints/ipc7251.js +44 -0
- package/dist/engine/footprints/ipc7251.js.map +1 -0
- package/dist/engine/footprints/ipc7351.d.ts +179 -0
- package/dist/engine/footprints/ipc7351.js +194 -0
- package/dist/engine/footprints/ipc7351.js.map +1 -0
- package/dist/engine/footprints/jedec.d.ts +24 -0
- package/dist/engine/footprints/jedec.js +148 -0
- package/dist/engine/footprints/jedec.js.map +1 -0
- package/dist/engine/footprints/known.d.ts +6 -0
- package/dist/engine/footprints/known.js +76 -0
- package/dist/engine/footprints/known.js.map +1 -0
- package/dist/engine/footprints/molded.d.ts +8 -0
- package/dist/engine/footprints/molded.js +76 -0
- package/dist/engine/footprints/molded.js.map +1 -0
- package/dist/engine/footprints/outline.d.ts +64 -0
- package/dist/engine/footprints/outline.js +187 -0
- package/dist/engine/footprints/outline.js.map +1 -0
- package/dist/engine/footprints/parse.d.ts +32 -0
- package/dist/engine/footprints/parse.js +68 -0
- package/dist/engine/footprints/parse.js.map +1 -0
- package/dist/engine/footprints/pinrow.d.ts +11 -0
- package/dist/engine/footprints/pinrow.js +102 -0
- package/dist/engine/footprints/pinrow.js.map +1 -0
- package/dist/engine/footprints/quad.d.ts +7 -0
- package/dist/engine/footprints/quad.js +135 -0
- package/dist/engine/footprints/quad.js.map +1 -0
- package/dist/engine/footprints/radial.d.ts +7 -0
- package/dist/engine/footprints/radial.js +62 -0
- package/dist/engine/footprints/radial.js.map +1 -0
- package/dist/engine/footprints/sod.d.ts +8 -0
- package/dist/engine/footprints/sod.js +60 -0
- package/dist/engine/footprints/sod.js.map +1 -0
- package/dist/engine/footprints/sot.d.ts +4 -0
- package/dist/engine/footprints/sot.js +72 -0
- package/dist/engine/footprints/sot.js.map +1 -0
- package/dist/engine/footprints/sotpower.d.ts +4 -0
- package/dist/engine/footprints/sotpower.js +98 -0
- package/dist/engine/footprints/sotpower.js.map +1 -0
- package/dist/engine/footprints/to220.d.ts +4 -0
- package/dist/engine/footprints/to220.js +49 -0
- package/dist/engine/footprints/to220.js.map +1 -0
- package/dist/engine/footprints/to92.d.ts +4 -0
- package/dist/engine/footprints/to92.js +43 -0
- package/dist/engine/footprints/to92.js.map +1 -0
- package/dist/engine/footprints/types.d.ts +50 -0
- package/dist/engine/footprints/types.js +3 -0
- package/dist/engine/footprints/types.js.map +1 -0
- package/dist/engine/hole.d.ts +15 -0
- package/dist/engine/hole.js +28 -0
- package/dist/engine/hole.js.map +1 -0
- package/dist/engine/index.d.ts +6 -0
- package/dist/engine/index.js +6 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/instance-anchor.d.ts +16 -0
- package/dist/engine/instance-anchor.js +45 -0
- package/dist/engine/instance-anchor.js.map +1 -0
- package/dist/engine/jsx-runtime.d.ts +26 -0
- package/dist/engine/jsx-runtime.js +49 -0
- package/dist/engine/jsx-runtime.js.map +1 -0
- package/dist/engine/keepout.d.ts +9 -0
- package/dist/engine/keepout.js +50 -0
- package/dist/engine/keepout.js.map +1 -0
- package/dist/engine/kinds.d.ts +34 -0
- package/dist/engine/kinds.js +134 -0
- package/dist/engine/kinds.js.map +1 -0
- package/dist/engine/model.d.ts +310 -0
- package/dist/engine/model.js +5 -0
- package/dist/engine/model.js.map +1 -0
- package/dist/engine/nets.d.ts +6 -0
- package/dist/engine/nets.js +49 -0
- package/dist/engine/nets.js.map +1 -0
- package/dist/engine/no-connect.d.ts +28 -0
- package/dist/engine/no-connect.js +36 -0
- package/dist/engine/no-connect.js.map +1 -0
- package/dist/engine/order.d.ts +7 -0
- package/dist/engine/order.js +25 -0
- package/dist/engine/order.js.map +1 -0
- package/dist/engine/pad-text.d.ts +20 -0
- package/dist/engine/pad-text.js +26 -0
- package/dist/engine/pad-text.js.map +1 -0
- package/dist/engine/part-labels.d.ts +29 -0
- package/dist/engine/part-labels.js +28 -0
- package/dist/engine/part-labels.js.map +1 -0
- package/dist/engine/pcb-place/blocks.d.ts +46 -0
- package/dist/engine/pcb-place/blocks.js +186 -0
- package/dist/engine/pcb-place/blocks.js.map +1 -0
- package/dist/engine/pcb-place/constructive.d.ts +73 -0
- package/dist/engine/pcb-place/constructive.js +515 -0
- package/dist/engine/pcb-place/constructive.js.map +1 -0
- package/dist/engine/pcb-place/edge.d.ts +7 -0
- package/dist/engine/pcb-place/edge.js +78 -0
- package/dist/engine/pcb-place/edge.js.map +1 -0
- package/dist/engine/pcb-place/fit-board.d.ts +22 -0
- package/dist/engine/pcb-place/fit-board.js +48 -0
- package/dist/engine/pcb-place/fit-board.js.map +1 -0
- package/dist/engine/pcb-place/geometry.d.ts +45 -0
- package/dist/engine/pcb-place/geometry.js +158 -0
- package/dist/engine/pcb-place/geometry.js.map +1 -0
- package/dist/engine/pcb-place/index.d.ts +81 -0
- package/dist/engine/pcb-place/index.js +98 -0
- package/dist/engine/pcb-place/index.js.map +1 -0
- package/dist/engine/pcb-place/refine.d.ts +32 -0
- package/dist/engine/pcb-place/refine.js +220 -0
- package/dist/engine/pcb-place/refine.js.map +1 -0
- package/dist/engine/pcb-place/roles.d.ts +37 -0
- package/dist/engine/pcb-place/roles.js +127 -0
- package/dist/engine/pcb-place/roles.js.map +1 -0
- package/dist/engine/pcb-place/scope.d.ts +80 -0
- package/dist/engine/pcb-place/scope.js +107 -0
- package/dist/engine/pcb-place/scope.js.map +1 -0
- package/dist/engine/pcb-place/score.d.ts +40 -0
- package/dist/engine/pcb-place/score.js +140 -0
- package/dist/engine/pcb-place/score.js.map +1 -0
- package/dist/engine/pcb.d.ts +72 -0
- package/dist/engine/pcb.js +153 -0
- package/dist/engine/pcb.js.map +1 -0
- package/dist/engine/pour/build.d.ts +32 -0
- package/dist/engine/pour/build.js +108 -0
- package/dist/engine/pour/build.js.map +1 -0
- package/dist/engine/pour/cache.d.ts +8 -0
- package/dist/engine/pour/cache.js +55 -0
- package/dist/engine/pour/cache.js.map +1 -0
- package/dist/engine/pour/clip.d.ts +50 -0
- package/dist/engine/pour/clip.js +72 -0
- package/dist/engine/pour/clip.js.map +1 -0
- package/dist/engine/pour/fill.d.ts +22 -0
- package/dist/engine/pour/fill.js +112 -0
- package/dist/engine/pour/fill.js.map +1 -0
- package/dist/engine/pour/islands.d.ts +8 -0
- package/dist/engine/pour/islands.js +19 -0
- package/dist/engine/pour/islands.js.map +1 -0
- package/dist/engine/pour/joins.d.ts +18 -0
- package/dist/engine/pour/joins.js +74 -0
- package/dist/engine/pour/joins.js.map +1 -0
- package/dist/engine/pour/obstacles.d.ts +45 -0
- package/dist/engine/pour/obstacles.js +85 -0
- package/dist/engine/pour/obstacles.js.map +1 -0
- package/dist/engine/pour/resolve.d.ts +21 -0
- package/dist/engine/pour/resolve.js +19 -0
- package/dist/engine/pour/resolve.js.map +1 -0
- package/dist/engine/pour/shapes.d.ts +9 -0
- package/dist/engine/pour/shapes.js +62 -0
- package/dist/engine/pour/shapes.js.map +1 -0
- package/dist/engine/pour/thermal.d.ts +16 -0
- package/dist/engine/pour/thermal.js +38 -0
- package/dist/engine/pour/thermal.js.map +1 -0
- package/dist/engine/project-files.d.ts +18 -0
- package/dist/engine/project-files.js +58 -0
- package/dist/engine/project-files.js.map +1 -0
- package/dist/engine/ratsnest.d.ts +16 -0
- package/dist/engine/ratsnest.js +69 -0
- package/dist/engine/ratsnest.js.map +1 -0
- package/dist/engine/read-props.d.ts +22 -0
- package/dist/engine/read-props.js +74 -0
- package/dist/engine/read-props.js.map +1 -0
- package/dist/engine/router/astar.d.ts +74 -0
- package/dist/engine/router/astar.js +231 -0
- package/dist/engine/router/astar.js.map +1 -0
- package/dist/engine/router/blockers.d.ts +4 -0
- package/dist/engine/router/blockers.js +69 -0
- package/dist/engine/router/blockers.js.map +1 -0
- package/dist/engine/router/cleanup.d.ts +21 -0
- package/dist/engine/router/cleanup.js +157 -0
- package/dist/engine/router/cleanup.js.map +1 -0
- package/dist/engine/router/clear.d.ts +18 -0
- package/dist/engine/router/clear.js +39 -0
- package/dist/engine/router/clear.js.map +1 -0
- package/dist/engine/router/congestion.d.ts +79 -0
- package/dist/engine/router/congestion.js +212 -0
- package/dist/engine/router/congestion.js.map +1 -0
- package/dist/engine/router/connect.d.ts +79 -0
- package/dist/engine/router/connect.js +174 -0
- package/dist/engine/router/connect.js.map +1 -0
- package/dist/engine/router/ends.d.ts +25 -0
- package/dist/engine/router/ends.js +135 -0
- package/dist/engine/router/ends.js.map +1 -0
- package/dist/engine/router/grid.d.ts +131 -0
- package/dist/engine/router/grid.js +297 -0
- package/dist/engine/router/grid.js.map +1 -0
- package/dist/engine/router/keep-clear.d.ts +10 -0
- package/dist/engine/router/keep-clear.js +60 -0
- package/dist/engine/router/keep-clear.js.map +1 -0
- package/dist/engine/router/obstacles.d.ts +18 -0
- package/dist/engine/router/obstacles.js +66 -0
- package/dist/engine/router/obstacles.js.map +1 -0
- package/dist/engine/router/path.d.ts +34 -0
- package/dist/engine/router/path.js +41 -0
- package/dist/engine/router/path.js.map +1 -0
- package/dist/engine/router/pour-rounds.d.ts +17 -0
- package/dist/engine/router/pour-rounds.js +124 -0
- package/dist/engine/router/pour-rounds.js.map +1 -0
- package/dist/engine/router/replicate.d.ts +32 -0
- package/dist/engine/router/replicate.js +143 -0
- package/dist/engine/router/replicate.js.map +1 -0
- package/dist/engine/router/rip-up.d.ts +5 -0
- package/dist/engine/router/rip-up.js +95 -0
- package/dist/engine/router/rip-up.js.map +1 -0
- package/dist/engine/router/route-board.d.ts +109 -0
- package/dist/engine/router/route-board.js +223 -0
- package/dist/engine/router/route-board.js.map +1 -0
- package/dist/engine/rules/classes.d.ts +14 -0
- package/dist/engine/rules/classes.js +50 -0
- package/dist/engine/rules/classes.js.map +1 -0
- package/dist/engine/rules/load.d.ts +14 -0
- package/dist/engine/rules/load.js +146 -0
- package/dist/engine/rules/load.js.map +1 -0
- package/dist/engine/rules/profiles.d.ts +5 -0
- package/dist/engine/rules/profiles.js +53 -0
- package/dist/engine/rules/profiles.js.map +1 -0
- package/dist/engine/rules/rotations.d.ts +31 -0
- package/dist/engine/rules/rotations.js +124 -0
- package/dist/engine/rules/rotations.js.map +1 -0
- package/dist/engine/rules/schema.d.ts +82 -0
- package/dist/engine/rules/schema.js +59 -0
- package/dist/engine/rules/schema.js.map +1 -0
- package/dist/engine/rules/track-defaults.d.ts +23 -0
- package/dist/engine/rules/track-defaults.js +26 -0
- package/dist/engine/rules/track-defaults.js.map +1 -0
- package/dist/engine/schematic-astar.d.ts +37 -0
- package/dist/engine/schematic-astar.js +202 -0
- package/dist/engine/schematic-astar.js.map +1 -0
- package/dist/engine/schematic-geometry.d.ts +23 -0
- package/dist/engine/schematic-geometry.js +49 -0
- package/dist/engine/schematic-geometry.js.map +1 -0
- package/dist/engine/schematic-grid.d.ts +60 -0
- package/dist/engine/schematic-grid.js +150 -0
- package/dist/engine/schematic-grid.js.map +1 -0
- package/dist/engine/schematic-nets.d.ts +38 -0
- package/dist/engine/schematic-nets.js +157 -0
- package/dist/engine/schematic-nets.js.map +1 -0
- package/dist/engine/schematic-pages.d.ts +9 -0
- package/dist/engine/schematic-pages.js +52 -0
- package/dist/engine/schematic-pages.js.map +1 -0
- package/dist/engine/schematic-place-chains.d.ts +22 -0
- package/dist/engine/schematic-place-chains.js +111 -0
- package/dist/engine/schematic-place-chains.js.map +1 -0
- package/dist/engine/schematic-place-plan.d.ts +43 -0
- package/dist/engine/schematic-place-plan.js +155 -0
- package/dist/engine/schematic-place-plan.js.map +1 -0
- package/dist/engine/schematic-place-units.d.ts +38 -0
- package/dist/engine/schematic-place-units.js +101 -0
- package/dist/engine/schematic-place-units.js.map +1 -0
- package/dist/engine/schematic-place.d.ts +5 -0
- package/dist/engine/schematic-place.js +268 -0
- package/dist/engine/schematic-place.js.map +1 -0
- package/dist/engine/schematic-route.d.ts +37 -0
- package/dist/engine/schematic-route.js +288 -0
- package/dist/engine/schematic-route.js.map +1 -0
- package/dist/engine/schematic-sheets.d.ts +22 -0
- package/dist/engine/schematic-sheets.js +104 -0
- package/dist/engine/schematic-sheets.js.map +1 -0
- package/dist/engine/schematic.d.ts +64 -0
- package/dist/engine/schematic.js +200 -0
- package/dist/engine/schematic.js.map +1 -0
- package/dist/engine/selectors.d.ts +25 -0
- package/dist/engine/selectors.js +28 -0
- package/dist/engine/selectors.js.map +1 -0
- package/dist/engine/sheet-ports.d.ts +44 -0
- package/dist/engine/sheet-ports.js +126 -0
- package/dist/engine/sheet-ports.js.map +1 -0
- package/dist/engine/sheet-symbol.d.ts +52 -0
- package/dist/engine/sheet-symbol.js +92 -0
- package/dist/engine/sheet-symbol.js.map +1 -0
- package/dist/engine/sheets.d.ts +79 -0
- package/dist/engine/sheets.js +159 -0
- package/dist/engine/sheets.js.map +1 -0
- package/dist/engine/symbols/box.d.ts +8 -0
- package/dist/engine/symbols/box.js +83 -0
- package/dist/engine/symbols/box.js.map +1 -0
- package/dist/engine/symbols/index.d.ts +8 -0
- package/dist/engine/symbols/index.js +58 -0
- package/dist/engine/symbols/index.js.map +1 -0
- package/dist/engine/symbols/passives.d.ts +16 -0
- package/dist/engine/symbols/passives.js +58 -0
- package/dist/engine/symbols/passives.js.map +1 -0
- package/dist/engine/symbols/power.d.ts +5 -0
- package/dist/engine/symbols/power.js +10 -0
- package/dist/engine/symbols/power.js.map +1 -0
- package/dist/engine/symbols/semis.d.ts +10 -0
- package/dist/engine/symbols/semis.js +62 -0
- package/dist/engine/symbols/semis.js.map +1 -0
- package/dist/engine/symbols/types.d.ts +83 -0
- package/dist/engine/symbols/types.js +61 -0
- package/dist/engine/symbols/types.js.map +1 -0
- package/dist/engine/traces.d.ts +29 -0
- package/dist/engine/traces.js +102 -0
- package/dist/engine/traces.js.map +1 -0
- package/dist/engine/units.d.ts +4 -0
- package/dist/engine/units.js +31 -0
- package/dist/engine/units.js.map +1 -0
- package/dist/engine/worker-env.d.ts +9 -0
- package/dist/engine/worker-env.js +12 -0
- package/dist/engine/worker-env.js.map +1 -0
- package/dist/library/attach-datasheet.d.ts +20 -0
- package/dist/library/attach-datasheet.js +61 -0
- package/dist/library/attach-datasheet.js.map +1 -0
- package/dist/library/easyeda-footprint.d.ts +41 -0
- package/dist/library/easyeda-footprint.js +255 -0
- package/dist/library/easyeda-footprint.js.map +1 -0
- package/dist/library/easyeda-path.d.ts +13 -0
- package/dist/library/easyeda-path.js +133 -0
- package/dist/library/easyeda-path.js.map +1 -0
- package/dist/library/easyeda-symbol.d.ts +20 -0
- package/dist/library/easyeda-symbol.js +53 -0
- package/dist/library/easyeda-symbol.js.map +1 -0
- package/dist/library/import-lcsc.d.ts +30 -0
- package/dist/library/import-lcsc.js +155 -0
- package/dist/library/import-lcsc.js.map +1 -0
- package/dist/library/lcsc-part.d.ts +40 -0
- package/dist/library/lcsc-part.js +153 -0
- package/dist/library/lcsc-part.js.map +1 -0
- package/dist/library/new-part.d.ts +50 -0
- package/dist/library/new-part.js +160 -0
- package/dist/library/new-part.js.map +1 -0
- package/dist/library/pin-table.d.ts +23 -0
- package/dist/library/pin-table.js +92 -0
- package/dist/library/pin-table.js.map +1 -0
- package/dist/mcp/batch.d.ts +111 -0
- package/dist/mcp/batch.js +241 -0
- package/dist/mcp/batch.js.map +1 -0
- package/dist/mcp/board-summary.d.ts +19 -0
- package/dist/mcp/board-summary.js +144 -0
- package/dist/mcp/board-summary.js.map +1 -0
- package/dist/mcp/compact-sheets.d.ts +31 -0
- package/dist/mcp/compact-sheets.js +63 -0
- package/dist/mcp/compact-sheets.js.map +1 -0
- package/dist/mcp/compact-tool-list.d.ts +8 -0
- package/dist/mcp/compact-tool-list.js +42 -0
- package/dist/mcp/compact-tool-list.js.map +1 -0
- package/dist/mcp/compact.d.ts +33 -0
- package/dist/mcp/compact.js +189 -0
- package/dist/mcp/compact.js.map +1 -0
- package/dist/mcp/copper-summary.d.ts +26 -0
- package/dist/mcp/copper-summary.js +122 -0
- package/dist/mcp/copper-summary.js.map +1 -0
- package/dist/mcp/copper-tools.d.ts +93 -0
- package/dist/mcp/copper-tools.js +228 -0
- package/dist/mcp/copper-tools.js.map +1 -0
- package/dist/mcp/copper-under.d.ts +16 -0
- package/dist/mcp/copper-under.js +46 -0
- package/dist/mcp/copper-under.js.map +1 -0
- package/dist/mcp/create-part.d.ts +71 -0
- package/dist/mcp/create-part.js +31 -0
- package/dist/mcp/create-part.js.map +1 -0
- package/dist/mcp/datasheet-tools.d.ts +14 -0
- package/dist/mcp/datasheet-tools.js +15 -0
- package/dist/mcp/datasheet-tools.js.map +1 -0
- package/dist/mcp/fillet-tools.d.ts +24 -0
- package/dist/mcp/fillet-tools.js +52 -0
- package/dist/mcp/fillet-tools.js.map +1 -0
- package/dist/mcp/guide.d.ts +37 -0
- package/dist/mcp/guide.js +78 -0
- package/dist/mcp/guide.js.map +1 -0
- package/dist/mcp/import-part.d.ts +13 -0
- package/dist/mcp/import-part.js +20 -0
- package/dist/mcp/import-part.js.map +1 -0
- package/dist/mcp/make-sheet.d.ts +18 -0
- package/dist/mcp/make-sheet.js +29 -0
- package/dist/mcp/make-sheet.js.map +1 -0
- package/dist/mcp/new-circuit.d.ts +77 -0
- package/dist/mcp/new-circuit.js +114 -0
- package/dist/mcp/new-circuit.js.map +1 -0
- package/dist/mcp/place-tools.d.ts +46 -0
- package/dist/mcp/place-tools.js +121 -0
- package/dist/mcp/place-tools.js.map +1 -0
- package/dist/mcp/pour-tools.d.ts +126 -0
- package/dist/mcp/pour-tools.js +105 -0
- package/dist/mcp/pour-tools.js.map +1 -0
- package/dist/mcp/project-tools.d.ts +36 -0
- package/dist/mcp/project-tools.js +115 -0
- package/dist/mcp/project-tools.js.map +1 -0
- package/dist/mcp/route-by-ref.d.ts +20 -0
- package/dist/mcp/route-by-ref.js +70 -0
- package/dist/mcp/route-by-ref.js.map +1 -0
- package/dist/mcp/route-tools.d.ts +54 -0
- package/dist/mcp/route-tools.js +173 -0
- package/dist/mcp/route-tools.js.map +1 -0
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.js +290 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/skill-install.d.ts +13 -0
- package/dist/skill-install.js +28 -0
- package/dist/skill-install.js.map +1 -0
- package/dist/studio/fit-board.d.ts +11 -0
- package/dist/studio/fit-board.js +15 -0
- package/dist/studio/fit-board.js.map +1 -0
- package/dist/studio/layout-schema.d.ts +157 -0
- package/dist/studio/layout-schema.js +32 -0
- package/dist/studio/layout-schema.js.map +1 -0
- package/dist/studio/live.d.ts +79 -0
- package/dist/studio/live.js +187 -0
- package/dist/studio/live.js.map +1 -0
- package/dist/studio/place-events.d.ts +60 -0
- package/dist/studio/place-events.js +42 -0
- package/dist/studio/place-events.js.map +1 -0
- package/dist/studio/place-runner.d.ts +62 -0
- package/dist/studio/place-runner.js +205 -0
- package/dist/studio/place-runner.js.map +1 -0
- package/dist/studio/place-worker.d.ts +1 -0
- package/dist/studio/place-worker.js +23 -0
- package/dist/studio/place-worker.js.map +1 -0
- package/dist/studio/route-events.d.ts +64 -0
- package/dist/studio/route-events.js +61 -0
- package/dist/studio/route-events.js.map +1 -0
- package/dist/studio/route-runner.d.ts +90 -0
- package/dist/studio/route-runner.js +272 -0
- package/dist/studio/route-runner.js.map +1 -0
- package/dist/studio/router-worker.d.ts +1 -0
- package/dist/studio/router-worker.js +17 -0
- package/dist/studio/router-worker.js.map +1 -0
- package/dist/studio/server.d.ts +32 -0
- package/dist/studio/server.js +610 -0
- package/dist/studio/server.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +64 -4
- package/skills/copperflow/SKILL.md +199 -0
- package/skills/copperflow/references/copper.md +82 -0
- package/skills/copperflow/references/design-rules.md +163 -0
- package/skills/copperflow/references/design-workflow.md +199 -0
- package/skills/copperflow/references/editable-subset.md +83 -0
- package/skills/copperflow/references/parts-library.md +83 -0
- package/skills/copperflow/references/writing-circuits.md +62 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Box } from "../checks/grid-index.js";
|
|
2
|
+
import { type CellRef, type Penalties } from "./astar.js";
|
|
3
|
+
import { type CellWindow, type NetRule, type RouterGrid, type RouterWorld } from "./grid.js";
|
|
4
|
+
import { type KeepClear } from "./keep-clear.js";
|
|
5
|
+
import { type Obstacle } from "./obstacles.js";
|
|
6
|
+
import type { PathLegs, RoutedCopper } from "./path.js";
|
|
7
|
+
/**
|
|
8
|
+
* Negotiated congestion. A connection routed in a pass sees the copper other nets were given so far as a cost, not a
|
|
9
|
+
* wall: entering a cell another net's copper keeps a track out of costs the present price (which rises each pass),
|
|
10
|
+
* plus the cell's history (which rises each pass the cell is fought over). Where a route still takes such a cell it
|
|
11
|
+
* is in conflict, and it and the route it overlaps are routed again in the next pass. A pass without conflict leaves
|
|
12
|
+
* every route clear of every other net's: a route whose centre line keeps out of another's grown copper keeps the gap.
|
|
13
|
+
*/
|
|
14
|
+
/** What a cell another net holds costs in pass `pass`. */
|
|
15
|
+
export declare const presentPrice: (pass: number) => number;
|
|
16
|
+
/** The most a cell's price or its history may reach, and so the most a cell costs (see COST_CAP in the search). */
|
|
17
|
+
export declare const MAX_PRICE: number;
|
|
18
|
+
/** What a fought-over cell's history rises by each pass. */
|
|
19
|
+
export declare const HISTORY_STEP: number;
|
|
20
|
+
/** The board cells another net's copper keeps a net's tracks (per layer) and vias out of. */
|
|
21
|
+
interface Footprint {
|
|
22
|
+
track: Int32Array[];
|
|
23
|
+
via: Int32Array;
|
|
24
|
+
}
|
|
25
|
+
/** A route laid in the run: its copper as obstacles, the box around them, its path and its footprints by rule. */
|
|
26
|
+
export interface Placed {
|
|
27
|
+
index: number;
|
|
28
|
+
net: string;
|
|
29
|
+
copper: RoutedCopper;
|
|
30
|
+
pieces: Obstacle[];
|
|
31
|
+
box: Box;
|
|
32
|
+
/** The path's cells on the board (layer, board cell) and the board cells of its vias. */
|
|
33
|
+
nodes: CellRef[];
|
|
34
|
+
vias: number[];
|
|
35
|
+
legs: PathLegs;
|
|
36
|
+
/** What the search paid for the path. */
|
|
37
|
+
cost: number;
|
|
38
|
+
footprints: Map<string, Footprint>;
|
|
39
|
+
}
|
|
40
|
+
/** The copper as obstacles named by `id`: tracks segment by segment, vias over every layer with their holes. */
|
|
41
|
+
export declare function copperObstacles(copper: RoutedCopper, className: string, id?: string): Obstacle[];
|
|
42
|
+
/** Only the holes of the vias: what keeps vias apart whatever their nets, while their copper is negotiated. */
|
|
43
|
+
export declare const holesOnly: (pieces: readonly Obstacle[]) => Obstacle[];
|
|
44
|
+
/** The route as laid: its pieces, path cells on the board, and via cells. */
|
|
45
|
+
export declare function placeRoute(world: RouterWorld, index: number, copper: RoutedCopper, className: string, steps: readonly CellRef[], grid: RouterGrid, window: CellWindow, legs: PathLegs, cost?: number): Placed;
|
|
46
|
+
/** Whether copper in box `b` can come near enough to box `a` to keep the rule's tracks or vias out of it. */
|
|
47
|
+
export declare const near: (world: RouterWorld, rule: NetRule, a: Box, b: Box) => boolean;
|
|
48
|
+
/** The board's congestion: the history of each cell (per layer, and for vias) and the routes laid. */
|
|
49
|
+
export declare class Congestion {
|
|
50
|
+
private readonly world;
|
|
51
|
+
private readonly keep?;
|
|
52
|
+
readonly history: Int32Array[];
|
|
53
|
+
readonly viaHistory: Int32Array;
|
|
54
|
+
readonly placed: Map<number, Placed>;
|
|
55
|
+
constructor(world: RouterWorld, keep?: KeepClear | undefined);
|
|
56
|
+
/** The routes of other nets whose copper comes near the box, in index order. */
|
|
57
|
+
others(net: string, box: Box, rule: NetRule): Placed[];
|
|
58
|
+
/** Every via hole laid, as hole-only obstacles: a via keeps the hole spacing from them whatever the net. */
|
|
59
|
+
holes(): Obstacle[];
|
|
60
|
+
/**
|
|
61
|
+
* The costs of the window's cells for the rule's net in pass `pass`, and which other route holds each cell
|
|
62
|
+
* (every one of them), for telling afterwards where the route laid on that grid is in conflict.
|
|
63
|
+
*/
|
|
64
|
+
costs(rule: NetRule, grid: RouterGrid, window: CellWindow, pass: number): Occupancy;
|
|
65
|
+
/**
|
|
66
|
+
* Where the route laid on the grid is in conflict: the routes it overlaps (their indexes), after raising the
|
|
67
|
+
* history of the cells fought over. A leg off the grid is checked exactly against the other routes' copper.
|
|
68
|
+
*/
|
|
69
|
+
conflicts(world: RouterWorld, rule: NetRule, placed: Placed, occupancy: Occupancy, grid: RouterGrid, window: CellWindow): Set<number>;
|
|
70
|
+
}
|
|
71
|
+
/** The window's penalties, and which routes hold each cell: by layer · cells + cell for tracks, by cell for vias. */
|
|
72
|
+
export interface Occupancy {
|
|
73
|
+
penalties: Penalties;
|
|
74
|
+
owners: Map<number, number[]>;
|
|
75
|
+
viaOwners: Map<number, number[]>;
|
|
76
|
+
}
|
|
77
|
+
/** Whether the placed route keeps clear of the given routes of other nets: its path off their footprints, its legs exactly. */
|
|
78
|
+
export declare function clearOf(world: RouterWorld, rule: NetRule, placed: Placed, others: readonly Placed[]): boolean;
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { COPPER_LAYERS } from "../../core/layout-file.js";
|
|
2
|
+
import { STEP } from "./astar.js";
|
|
3
|
+
import { offenders } from "./clear.js";
|
|
4
|
+
import { cellsNear, foreignReach, grow, windowBox } from "./grid.js";
|
|
5
|
+
import { KEEP_COST } from "./keep-clear.js";
|
|
6
|
+
import { boxOf } from "./obstacles.js";
|
|
7
|
+
/**
|
|
8
|
+
* Negotiated congestion. A connection routed in a pass sees the copper other nets were given so far as a cost, not a
|
|
9
|
+
* wall: entering a cell another net's copper keeps a track out of costs the present price (which rises each pass),
|
|
10
|
+
* plus the cell's history (which rises each pass the cell is fought over). Where a route still takes such a cell it
|
|
11
|
+
* is in conflict, and it and the route it overlaps are routed again in the next pass. A pass without conflict leaves
|
|
12
|
+
* every route clear of every other net's: a route whose centre line keeps out of another's grown copper keeps the gap.
|
|
13
|
+
*/
|
|
14
|
+
/** What a cell another net holds costs in pass `pass`. */
|
|
15
|
+
export const presentPrice = (pass) => Math.min(Math.round(4 * STEP * 1.6 ** (pass - 1)), MAX_PRICE);
|
|
16
|
+
/** The most a cell's price or its history may reach, and so the most a cell costs (see COST_CAP in the search). */
|
|
17
|
+
export const MAX_PRICE = 2 ** 20;
|
|
18
|
+
const capped = (value) => Math.min(value, MAX_PRICE);
|
|
19
|
+
/** What a fought-over cell's history rises by each pass. */
|
|
20
|
+
export const HISTORY_STEP = 3 * STEP;
|
|
21
|
+
const ruleKey = (rule) => `${rule.className}|${rule.width}|${rule.via.diameter}`;
|
|
22
|
+
/** The copper as obstacles named by `id`: tracks segment by segment, vias over every layer with their holes. */
|
|
23
|
+
export function copperObstacles(copper, className, id = copper.net) {
|
|
24
|
+
const tracks = copper.tracks.map((track) => {
|
|
25
|
+
const shapes = track.points.length === 1 ? [{ core: [track.points[0]], radius: track.width / 2 }] : track.points.slice(1).map((p, i) => ({ core: [track.points[i], p], radius: track.width / 2 }));
|
|
26
|
+
return { id, kind: "track", net: copper.net, className, layers: [track.layer], shapes, at: track.points[0], box: boxOf(shapes) };
|
|
27
|
+
});
|
|
28
|
+
const vias = copper.vias.map((via) => {
|
|
29
|
+
const shapes = [{ core: [via.at], radius: via.diameter / 2 }];
|
|
30
|
+
return { id, kind: "via", net: copper.net, className, layers: COPPER_LAYERS, shapes, at: via.at, box: boxOf(shapes), hole: { core: [via.at], radius: via.drill / 2 } };
|
|
31
|
+
});
|
|
32
|
+
return [...tracks, ...vias];
|
|
33
|
+
}
|
|
34
|
+
/** Only the holes of the vias: what keeps vias apart whatever their nets, while their copper is negotiated. */
|
|
35
|
+
export const holesOnly = (pieces) => pieces.filter((piece) => piece.hole !== undefined).map((piece) => ({ ...piece, layers: [], shapes: [] }));
|
|
36
|
+
/** A window cell's board cell. */
|
|
37
|
+
const boardCell = (world, window, grid, cell) => (window.row0 + Math.floor(cell / grid.cols)) * world.frame.cols + window.col0 + (cell % grid.cols);
|
|
38
|
+
/** The route as laid: its pieces, path cells on the board, and via cells. */
|
|
39
|
+
export function placeRoute(world, index, copper, className, steps, grid, window, legs, cost = 0) {
|
|
40
|
+
const pieces = copperObstacles(copper, className);
|
|
41
|
+
const nodes = steps.map((step) => ({ layer: step.layer, cell: boardCell(world, window, grid, step.cell) }));
|
|
42
|
+
const vias = nodes.flatMap((node, i) => (i > 0 && nodes[i - 1]?.layer !== node.layer ? [node.cell] : []));
|
|
43
|
+
return { index, net: copper.net, copper, pieces, box: pieces.length > 0 ? boxOf(pieces.flatMap((piece) => piece.shapes)) : { minX: 0, minY: 0, maxX: 0, maxY: 0 }, nodes, vias, legs, cost, footprints: new Map() };
|
|
44
|
+
}
|
|
45
|
+
/** The board cells the route's copper keeps the rule's tracks and vias out of, each once. */
|
|
46
|
+
function footprintFor(world, placed, rule) {
|
|
47
|
+
const key = ruleKey(rule);
|
|
48
|
+
const known = placed.footprints.get(key);
|
|
49
|
+
if (known !== undefined)
|
|
50
|
+
return known;
|
|
51
|
+
const { frame } = world;
|
|
52
|
+
const track = frame.layers.map(() => new Set());
|
|
53
|
+
const via = new Set();
|
|
54
|
+
for (const piece of placed.pieces) {
|
|
55
|
+
const reach = foreignReach(world, rule, piece.className);
|
|
56
|
+
frame.layers.forEach((layer, l) => {
|
|
57
|
+
if (!piece.layers.includes(layer))
|
|
58
|
+
return;
|
|
59
|
+
for (const shape of piece.shapes)
|
|
60
|
+
cellsNear(frame, shape, reach.track, (cell) => track[l]?.add(cell));
|
|
61
|
+
});
|
|
62
|
+
for (const shape of piece.shapes)
|
|
63
|
+
cellsNear(frame, shape, reach.via, (cell) => via.add(cell));
|
|
64
|
+
}
|
|
65
|
+
const sorted = (cells) => Int32Array.from([...cells].sort((a, b) => a - b));
|
|
66
|
+
const footprint = { track: track.map(sorted), via: sorted(via) };
|
|
67
|
+
placed.footprints.set(key, footprint);
|
|
68
|
+
return footprint;
|
|
69
|
+
}
|
|
70
|
+
const overlaps = (a, b) => a.minX <= b.maxX && b.minX <= a.maxX && a.minY <= b.maxY && b.minY <= a.maxY;
|
|
71
|
+
/** Whether copper in box `b` can come near enough to box `a` to keep the rule's tracks or vias out of it. */
|
|
72
|
+
export const near = (world, rule, a, b) => overlaps(grow(a, world.widestGap + rule.width + rule.via.diameter + world.frame.pitch), b);
|
|
73
|
+
/** The board's congestion: the history of each cell (per layer, and for vias) and the routes laid. */
|
|
74
|
+
export class Congestion {
|
|
75
|
+
world;
|
|
76
|
+
keep;
|
|
77
|
+
history;
|
|
78
|
+
viaHistory;
|
|
79
|
+
placed = new Map();
|
|
80
|
+
constructor(world, keep) {
|
|
81
|
+
this.world = world;
|
|
82
|
+
this.keep = keep;
|
|
83
|
+
const cells = world.frame.cols * world.frame.rows;
|
|
84
|
+
this.history = world.frame.layers.map(() => new Int32Array(cells));
|
|
85
|
+
this.viaHistory = new Int32Array(cells);
|
|
86
|
+
}
|
|
87
|
+
/** The routes of other nets whose copper comes near the box, in index order. */
|
|
88
|
+
others(net, box, rule) {
|
|
89
|
+
return [...this.placed.values()].filter((p) => p.net !== net && near(this.world, rule, box, p.box)).sort((a, b) => a.index - b.index);
|
|
90
|
+
}
|
|
91
|
+
/** Every via hole laid, as hole-only obstacles: a via keeps the hole spacing from them whatever the net. */
|
|
92
|
+
holes() {
|
|
93
|
+
return [...this.placed.values()].sort((a, b) => a.index - b.index).flatMap((p) => holesOnly(p.pieces));
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The costs of the window's cells for the rule's net in pass `pass`, and which other route holds each cell
|
|
97
|
+
* (every one of them), for telling afterwards where the route laid on that grid is in conflict.
|
|
98
|
+
*/
|
|
99
|
+
costs(rule, grid, window, pass) {
|
|
100
|
+
const { frame } = this.world;
|
|
101
|
+
const cells = grid.cols * grid.rows;
|
|
102
|
+
const owners = new Map();
|
|
103
|
+
const viaOwners = new Map();
|
|
104
|
+
const hold = (map, key, index) => map.set(key, [...(map.get(key) ?? []), index]);
|
|
105
|
+
const inWindow = (board) => {
|
|
106
|
+
const [col, row] = [(board % frame.cols) - window.col0, Math.floor(board / frame.cols) - window.row0];
|
|
107
|
+
return col < 0 || row < 0 || col >= grid.cols || row >= grid.rows ? -1 : row * grid.cols + col;
|
|
108
|
+
};
|
|
109
|
+
const count = grid.layers.map(() => new Int32Array(cells));
|
|
110
|
+
const viaCount = new Int32Array(cells);
|
|
111
|
+
for (const other of this.others(rule.net, windowBox(this.world, window), rule)) {
|
|
112
|
+
const footprint = footprintFor(this.world, other, rule);
|
|
113
|
+
footprint.track.forEach((list, l) => {
|
|
114
|
+
for (const board of list) {
|
|
115
|
+
const cell = inWindow(board);
|
|
116
|
+
if (cell < 0)
|
|
117
|
+
continue;
|
|
118
|
+
count[l][cell] = count[l][cell] + 1;
|
|
119
|
+
hold(owners, l * cells + cell, other.index);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
for (const board of footprint.via) {
|
|
123
|
+
const cell = inWindow(board);
|
|
124
|
+
if (cell < 0)
|
|
125
|
+
continue;
|
|
126
|
+
viaCount[cell] = viaCount[cell] + 1;
|
|
127
|
+
hold(viaOwners, cell, other.index);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const price = presentPrice(pass);
|
|
131
|
+
const track = grid.layers.map(() => new Int32Array(cells));
|
|
132
|
+
const via = new Int32Array(cells);
|
|
133
|
+
const own = this.keep === undefined ? -1 : this.keep.nets.indexOf(rule.net) + 1;
|
|
134
|
+
const keepCost = (l, board) => {
|
|
135
|
+
const holder = this.keep?.track[l]?.[board] ?? 0;
|
|
136
|
+
return holder !== 0 && holder !== own ? KEEP_COST : 0;
|
|
137
|
+
};
|
|
138
|
+
for (let cell = 0; cell < cells; cell++) {
|
|
139
|
+
const board = (window.row0 + Math.floor(cell / grid.cols)) * frame.cols + window.col0 + (cell % grid.cols);
|
|
140
|
+
for (let l = 0; l < grid.layers.length; l++)
|
|
141
|
+
track[l][cell] = capped(this.history[l][board] + price * count[l][cell] + keepCost(l, board));
|
|
142
|
+
via[cell] = capped(this.viaHistory[board] + price * viaCount[cell]);
|
|
143
|
+
}
|
|
144
|
+
return { penalties: { track, via }, owners, viaOwners };
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Where the route laid on the grid is in conflict: the routes it overlaps (their indexes), after raising the
|
|
148
|
+
* history of the cells fought over. A leg off the grid is checked exactly against the other routes' copper.
|
|
149
|
+
*/
|
|
150
|
+
conflicts(world, rule, placed, occupancy, grid, window) {
|
|
151
|
+
const found = new Set();
|
|
152
|
+
const { frame } = world;
|
|
153
|
+
const local = (board) => (Math.floor(board / frame.cols) - window.row0) * grid.cols + (board % frame.cols) - window.col0;
|
|
154
|
+
const cells = grid.cols * grid.rows;
|
|
155
|
+
for (const node of placed.nodes) {
|
|
156
|
+
const who = occupancy.owners.get(node.layer * cells + local(node.cell));
|
|
157
|
+
if (who === undefined)
|
|
158
|
+
continue;
|
|
159
|
+
for (const index of who)
|
|
160
|
+
found.add(index);
|
|
161
|
+
this.history[node.layer][node.cell] = capped(this.history[node.layer][node.cell] + HISTORY_STEP);
|
|
162
|
+
}
|
|
163
|
+
for (const cell of placed.vias) {
|
|
164
|
+
const who = occupancy.viaOwners.get(local(cell));
|
|
165
|
+
if (who === undefined)
|
|
166
|
+
continue;
|
|
167
|
+
for (const index of who)
|
|
168
|
+
found.add(index);
|
|
169
|
+
this.viaHistory[cell] = capped(this.viaHistory[cell] + HISTORY_STEP);
|
|
170
|
+
}
|
|
171
|
+
for (const who of legConflicts(world, rule, placed, this.others(rule.net, placed.box, rule)))
|
|
172
|
+
found.add(who);
|
|
173
|
+
return found;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/** The routes a leg of the placed route comes too near to, checked exactly. */
|
|
177
|
+
function legConflicts(world, rule, placed, others) {
|
|
178
|
+
const legs = [placed.legs.start, placed.legs.end].filter((p) => p !== undefined);
|
|
179
|
+
if (legs.length === 0 || others.length === 0)
|
|
180
|
+
return [];
|
|
181
|
+
const pieces = others.flatMap((other) => other.pieces.map((piece) => ({ ...piece, id: String(other.index) })));
|
|
182
|
+
const legShapes = placed.pieces.filter((piece) => piece.kind === "track" && piece.shapes.some((shape) => shape.core.some((p) => legs.some((leg) => leg.x === p.x && leg.y === p.y))));
|
|
183
|
+
const hit = new Set();
|
|
184
|
+
for (const piece of legShapes) {
|
|
185
|
+
for (const name of offenders(world, rule, { kind: "track", layers: piece.layers, shapes: piece.shapes }, pieces)) {
|
|
186
|
+
const index = Number(name);
|
|
187
|
+
if (Number.isInteger(index) && name === String(index))
|
|
188
|
+
hit.add(index);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return [...hit];
|
|
192
|
+
}
|
|
193
|
+
/** Whether the placed route keeps clear of the given routes of other nets: its path off their footprints, its legs exactly. */
|
|
194
|
+
export function clearOf(world, rule, placed, others) {
|
|
195
|
+
if (others.length === 0)
|
|
196
|
+
return true;
|
|
197
|
+
const mine = new Set(placed.nodes.map((node) => node.layer * world.frame.cols * world.frame.rows + node.cell));
|
|
198
|
+
const myVias = new Set(placed.vias);
|
|
199
|
+
const cells = world.frame.cols * world.frame.rows;
|
|
200
|
+
for (const other of others) {
|
|
201
|
+
const footprint = footprintFor(world, other, rule);
|
|
202
|
+
for (let l = 0; l < footprint.track.length; l++)
|
|
203
|
+
for (const cell of footprint.track[l])
|
|
204
|
+
if (mine.has(l * cells + cell))
|
|
205
|
+
return false;
|
|
206
|
+
for (const cell of footprint.via)
|
|
207
|
+
if (myVias.has(cell))
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
return legConflicts(world, rule, placed, others).length === 0;
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=congestion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"congestion.js","sourceRoot":"","sources":["../../../src/engine/router/congestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAIzD,OAAO,EAAE,IAAI,EAAgC,MAAM,YAAY,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAoE,MAAM,WAAW,CAAA;AACtI,OAAO,EAAE,SAAS,EAAkB,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAiB,MAAM,gBAAgB,CAAA;AAGrD;;;;;;GAMG;AAEH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CA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.js";
|
|
3
|
+
import type { Rules } from "../rules/schema.js";
|
|
4
|
+
import { type CellRef, type Penalties, type SearchBuffers } from "./astar.js";
|
|
5
|
+
import { type CellWindow, type NetRule, type RouterGrid, type RouterWorld } from "./grid.js";
|
|
6
|
+
import { type Obstacle } from "./obstacles.js";
|
|
7
|
+
import { type RoutedCopper } from "./path.js";
|
|
8
|
+
/** What the router reads: the built layout, the rules and the circuit's nets. */
|
|
9
|
+
export interface RouteInput {
|
|
10
|
+
layout: PcbLayout;
|
|
11
|
+
rules: Rules;
|
|
12
|
+
nets: readonly Net[];
|
|
13
|
+
}
|
|
14
|
+
export type ConnectionResult = {
|
|
15
|
+
routed: true;
|
|
16
|
+
copper: RoutedCopper;
|
|
17
|
+
cost: number;
|
|
18
|
+
} | {
|
|
19
|
+
routed: false;
|
|
20
|
+
reason: string;
|
|
21
|
+
blockers: string[];
|
|
22
|
+
};
|
|
23
|
+
export declare const listed: (words: readonly string[]) => string;
|
|
24
|
+
/** A net's class by net id, as the copper checks see it: no net or an unclaimed one is the default class. */
|
|
25
|
+
export declare function classLookup(rules: Rules, nets: readonly Net[]): (net: string | undefined) => string;
|
|
26
|
+
/** The track width and via a net is routed with: its class's, raised to the fabrication minimums, as for hand-drawn copper. */
|
|
27
|
+
export declare function netRule(rules: Rules, nets: readonly Net[], netId: string): NetRule;
|
|
28
|
+
export declare const padName: (pad: WorldPad) => string;
|
|
29
|
+
/** "could not route R1.pin2 to R2.pin1" */
|
|
30
|
+
export declare const cannot: (from: WorldPad, to: WorldPad) => string;
|
|
31
|
+
/** Why there is no path: the objects named, or the search's bound. */
|
|
32
|
+
export declare function why(from: WorldPad, to: WorldPad, blockers: readonly string[], reason: "no-path" | "limit", expanded: number): string;
|
|
33
|
+
/** One connection to route: the net's rule, its two pads, and the copper already joined to each (the pad among it). */
|
|
34
|
+
export interface Job {
|
|
35
|
+
rule: NetRule;
|
|
36
|
+
from: WorldPad;
|
|
37
|
+
to: WorldPad;
|
|
38
|
+
start: readonly Obstacle[];
|
|
39
|
+
end: readonly Obstacle[];
|
|
40
|
+
}
|
|
41
|
+
export interface AttemptOptions {
|
|
42
|
+
/** More copper to keep out, laid earlier in the run. */
|
|
43
|
+
extra?: readonly Obstacle[];
|
|
44
|
+
/** The extra cost of cells on the grid made for the attempt. */
|
|
45
|
+
penalties?: (grid: RouterGrid, window: CellWindow) => Penalties | undefined;
|
|
46
|
+
buffers?: SearchBuffers;
|
|
47
|
+
maxExpansions?: number;
|
|
48
|
+
}
|
|
49
|
+
export type Attempt = {
|
|
50
|
+
routed: true;
|
|
51
|
+
copper: RoutedCopper;
|
|
52
|
+
cost: number;
|
|
53
|
+
steps: CellRef[];
|
|
54
|
+
grid: RouterGrid;
|
|
55
|
+
window: CellWindow;
|
|
56
|
+
penalties?: Penalties;
|
|
57
|
+
} | {
|
|
58
|
+
routed: false;
|
|
59
|
+
reason: string;
|
|
60
|
+
blockers: string[];
|
|
61
|
+
noPath?: boolean;
|
|
62
|
+
limit?: boolean;
|
|
63
|
+
};
|
|
64
|
+
/** The cells around the connection's two ends, grown by the margin (or half the ends' span, if larger). */
|
|
65
|
+
export declare function jobWindow(world: RouterWorld, job: Job, scale?: number): CellWindow;
|
|
66
|
+
/**
|
|
67
|
+
* Routes the job in its window, and over the whole board when the window has no way through. Under penalties a
|
|
68
|
+
* window always has a way, perhaps a dear one: a path over DETOUR_FACTOR times the plain cost is tried once more in a
|
|
69
|
+
* window WIDER times as wide, and the cheaper of the two is kept.
|
|
70
|
+
*/
|
|
71
|
+
export declare function attempt(world: RouterWorld, job: Job, options?: AttemptOptions): Attempt;
|
|
72
|
+
/**
|
|
73
|
+
* Routes one connection of a net: from the pad `fromId` (and the copper already joined to it) to the pad `toId` (and
|
|
74
|
+
* its copper), on the board's layers, around everything of other nets. The result is the copper to lay, or why
|
|
75
|
+
* there is none, naming the objects that closed the way.
|
|
76
|
+
*/
|
|
77
|
+
export declare function routeConnection(input: RouteInput, fromId: string, toId: string, options?: {
|
|
78
|
+
maxExpansions?: number;
|
|
79
|
+
}): ConnectionResult;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { netClasses } from "../rules/classes.js";
|
|
2
|
+
import { DEFAULT_CLASS } from "../rules/profiles.js";
|
|
3
|
+
import { trackWidth, viaSize } from "../rules/track-defaults.js";
|
|
4
|
+
import { DIAGONAL, searchPath, STEP, VIA } from "./astar.js";
|
|
5
|
+
import { blockingNames, endCells, joinedTo, padLegs } from "./ends.js";
|
|
6
|
+
import { cellCentre, cellsNear, isWholeBoard, rasteriseIn, routerWorld, wholeBoard, windowAround } from "./grid.js";
|
|
7
|
+
import { boxOf } from "./obstacles.js";
|
|
8
|
+
import { pathCopper } from "./path.js";
|
|
9
|
+
/** Around a connection's ends, the window first searched spans at least this much more on each side, in mm. */
|
|
10
|
+
const WINDOW_MARGIN = 4;
|
|
11
|
+
export const listed = (words) => (words.length < 2 ? words.join("") : `${words.slice(0, -1).join(", ")} and ${words.at(-1)}`);
|
|
12
|
+
const failed = (reason, blockers = []) => ({ routed: false, reason, blockers });
|
|
13
|
+
/** A net's class by net id, as the copper checks see it: no net or an unclaimed one is the default class. */
|
|
14
|
+
export function classLookup(rules, nets) {
|
|
15
|
+
const byNet = netClasses(rules, nets).byNet;
|
|
16
|
+
return (net) => (net === undefined ? DEFAULT_CLASS.name : (byNet.get(net) ?? DEFAULT_CLASS.name));
|
|
17
|
+
}
|
|
18
|
+
/** The track width and via a net is routed with: its class's, raised to the fabrication minimums, as for hand-drawn copper. */
|
|
19
|
+
export function netRule(rules, nets, netId) {
|
|
20
|
+
const net = nets.find((one) => one.id === netId) ?? { id: netId, names: [], pins: [] };
|
|
21
|
+
return { net: netId, className: classLookup(rules, nets)(netId), width: trackWidth(rules, net), via: viaSize(rules, net) };
|
|
22
|
+
}
|
|
23
|
+
export const padName = (pad) => pad.pin ?? pad.id;
|
|
24
|
+
/** "could not route R1.pin2 to R2.pin1" */
|
|
25
|
+
export const cannot = (from, to) => `could not route ${padName(from)} to ${padName(to)}`;
|
|
26
|
+
/** Why there is no path: the objects named, or the search's bound. */
|
|
27
|
+
export function why(from, to, blockers, reason, expanded) {
|
|
28
|
+
const ends = cannot(from, to);
|
|
29
|
+
if (reason === "limit")
|
|
30
|
+
return `${ends}: the search gave up after ${expanded} steps`;
|
|
31
|
+
if (blockers.length === 0)
|
|
32
|
+
return `${ends}: no room`;
|
|
33
|
+
return blockers.length === 1 ? `${ends}: no way past ${blockers[0]}` : `${ends}: no room between ${listed(blockers)}`;
|
|
34
|
+
}
|
|
35
|
+
/** The ends on the grid: the free cells on the island's copper, or else legs from the pad centre. */
|
|
36
|
+
function endsOf(world, grid, job, which, extra) {
|
|
37
|
+
const [pad, island] = which === "start" ? [job.from, job.start] : [job.to, job.end];
|
|
38
|
+
const cells = endCells(grid, island);
|
|
39
|
+
if (cells.length > 0)
|
|
40
|
+
return { refs: cells, blocked: [] };
|
|
41
|
+
const legs = padLegs(world, grid, job.rule, pad, extra);
|
|
42
|
+
if (legs.ends.length > 0)
|
|
43
|
+
return { refs: legs.ends, at: legs.at, blocked: [] };
|
|
44
|
+
return { refs: [], blocked: blockingNames(grid, island.filter((piece) => piece.id === pad.id)) };
|
|
45
|
+
}
|
|
46
|
+
function attemptIn(world, job, window, options) {
|
|
47
|
+
const extra = options.extra ?? [];
|
|
48
|
+
const grid = rasteriseIn(world, job.rule, window, extra);
|
|
49
|
+
const start = endsOf(world, grid, job, "start", extra);
|
|
50
|
+
const end = endsOf(world, grid, job, "end", extra);
|
|
51
|
+
for (const [pad, side] of [[job.from, start], [job.to, end]]) {
|
|
52
|
+
if (side.refs.length > 0)
|
|
53
|
+
continue;
|
|
54
|
+
const by = side.blocked.length === 0 ? "" : `, blocked by ${listed(side.blocked)}`;
|
|
55
|
+
return { routed: false, reason: `${cannot(job.from, job.to)}: ${padName(pad)} has no free grid cell${by}`, blockers: side.blocked };
|
|
56
|
+
}
|
|
57
|
+
const penalties = options.penalties?.(grid, window);
|
|
58
|
+
const search = { ...(penalties ? { penalties } : {}), ...(options.buffers ? { buffers: options.buffers } : {}), ...(options.maxExpansions === undefined ? {} : { maxExpansions: options.maxExpansions }) };
|
|
59
|
+
const spaced = spacedSearch(world, grid, job, start.refs, end.refs, search);
|
|
60
|
+
if (spaced.failure !== undefined)
|
|
61
|
+
return spaced.failure;
|
|
62
|
+
const legs = { ...(start.at ? { start: start.at } : {}), ...(end.at ? { end: end.at } : {}) };
|
|
63
|
+
const { steps, cost } = spaced;
|
|
64
|
+
return { routed: true, copper: pathCopper(spaced.grid, steps, job.rule, legs), cost, steps, grid: spaced.grid, window, ...(penalties ? { penalties } : {}) };
|
|
65
|
+
}
|
|
66
|
+
/** How many times a search is run again with via cells closed, when its own vias come too near each other. */
|
|
67
|
+
const SPACING_RETRIES = 6;
|
|
68
|
+
const OWN_VIA = "the route's own via";
|
|
69
|
+
/** The first via of the path too near a later one, as a cell, or undefined when all keep the hole spacing. */
|
|
70
|
+
function crowdedVia(grid, steps, rule, spacing) {
|
|
71
|
+
const vias = steps.flatMap((step, i) => (i > 0 && steps[i - 1]?.layer !== step.layer ? [step.cell] : []));
|
|
72
|
+
const need = rule.via.drill + spacing;
|
|
73
|
+
for (const [i, a] of vias.entries()) {
|
|
74
|
+
const p = cellCentre(grid, a);
|
|
75
|
+
for (const b of vias.slice(i + 1)) {
|
|
76
|
+
const q = cellCentre(grid, b);
|
|
77
|
+
if (Math.hypot(p.x - q.x, p.y - q.y) < need - 1e-9)
|
|
78
|
+
return a;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The search, kept to paths whose own vias keep the fabrication hole spacing from each other: when two come too near,
|
|
85
|
+
* the via cells around the first (but its own) are closed and the search is run again, a bounded number of times.
|
|
86
|
+
*/
|
|
87
|
+
function spacedSearch(world, first, job, sources, targets, search) {
|
|
88
|
+
const spacing = world.rules.fabrication.minHoleToHole;
|
|
89
|
+
let grid = first;
|
|
90
|
+
for (let tries = 0;; tries++) {
|
|
91
|
+
const result = searchPath(grid, sources, targets, search);
|
|
92
|
+
if (!result.found) {
|
|
93
|
+
const failure = { routed: false, reason: why(job.from, job.to, result.blockers, result.reason, result.expanded), blockers: result.blockers, noPath: result.reason === "no-path", ...(result.reason === "limit" ? { limit: true } : {}) };
|
|
94
|
+
return { failure };
|
|
95
|
+
}
|
|
96
|
+
const crowded = crowdedVia(grid, result.steps, job.rule, spacing);
|
|
97
|
+
if (crowded === undefined)
|
|
98
|
+
return { grid, steps: result.steps, cost: result.cost };
|
|
99
|
+
if (tries >= SPACING_RETRIES)
|
|
100
|
+
return { failure: { routed: false, reason: `${cannot(job.from, job.to)}: its vias cannot keep the ${spacing} mm hole spacing`, blockers: [] } };
|
|
101
|
+
if (grid === first)
|
|
102
|
+
grid = { ...first, via: Int32Array.from(first.via), blockers: [...first.blockers, OWN_VIA] };
|
|
103
|
+
const index = grid.blockers.length - 1;
|
|
104
|
+
const via = grid.via;
|
|
105
|
+
cellsNear(grid, { core: [cellCentre(grid, crowded)], radius: 0 }, job.rule.via.drill + spacing, (cell) => {
|
|
106
|
+
if (cell !== crowded)
|
|
107
|
+
via[cell] = index;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/** The cells around the connection's two ends, grown by the margin (or half the ends' span, if larger). */
|
|
112
|
+
export function jobWindow(world, job, scale = 1) {
|
|
113
|
+
const shapes = [...job.start, ...job.end].flatMap((piece) => piece.shapes);
|
|
114
|
+
const box = shapes.length > 0 ? boxOf(shapes) : { minX: Math.min(job.from.x, job.to.x), minY: Math.min(job.from.y, job.to.y), maxX: Math.max(job.from.x, job.to.x), maxY: Math.max(job.from.y, job.to.y) };
|
|
115
|
+
const margin = scale * Math.max(WINDOW_MARGIN, (box.maxX - box.minX) / 2, (box.maxY - box.minY) / 2);
|
|
116
|
+
return windowAround(world, { minX: box.minX - margin, minY: box.minY - margin, maxX: box.maxX + margin, maxY: box.maxY + margin });
|
|
117
|
+
}
|
|
118
|
+
/** A path dearer than this many times the plain distance between the pads is tried once more in a wider window. */
|
|
119
|
+
const DETOUR_FACTOR = 3;
|
|
120
|
+
/** How much wider that window's margin is. */
|
|
121
|
+
const WIDER = 3;
|
|
122
|
+
/**
|
|
123
|
+
* What a route between the two pad centres costs without congestion, at a guess: the straight 45° run on the grid and
|
|
124
|
+
* room for two vias (a pass under something), so a route is not widened only for changing layer.
|
|
125
|
+
*/
|
|
126
|
+
function plainCost(world, job) {
|
|
127
|
+
const [dx, dy] = [Math.abs(job.from.x - job.to.x) / world.frame.pitch, Math.abs(job.from.y - job.to.y) / world.frame.pitch];
|
|
128
|
+
return STEP * Math.max(dx, dy) + (DIAGONAL - STEP) * Math.min(dx, dy) + 2 * VIA;
|
|
129
|
+
}
|
|
130
|
+
const sameWindow = (a, b) => a.col0 === b.col0 && a.row0 === b.row0 && a.col1 === b.col1 && a.row1 === b.row1;
|
|
131
|
+
/**
|
|
132
|
+
* Routes the job in its window, and over the whole board when the window has no way through. Under penalties a
|
|
133
|
+
* window always has a way, perhaps a dear one: a path over DETOUR_FACTOR times the plain cost is tried once more in a
|
|
134
|
+
* window WIDER times as wide, and the cheaper of the two is kept.
|
|
135
|
+
*/
|
|
136
|
+
export function attempt(world, job, options = {}) {
|
|
137
|
+
const window = jobWindow(world, job);
|
|
138
|
+
const first = attemptIn(world, job, window, options);
|
|
139
|
+
if (first.routed) {
|
|
140
|
+
if (options.penalties === undefined || first.cost <= DETOUR_FACTOR * plainCost(world, job))
|
|
141
|
+
return first;
|
|
142
|
+
const wide = jobWindow(world, job, WIDER);
|
|
143
|
+
if (sameWindow(wide, window))
|
|
144
|
+
return first;
|
|
145
|
+
const second = attemptIn(world, job, wide, options);
|
|
146
|
+
return second.routed && second.cost < first.cost ? second : first;
|
|
147
|
+
}
|
|
148
|
+
if (first.noPath !== true || isWholeBoard(world, window))
|
|
149
|
+
return first;
|
|
150
|
+
return attemptIn(world, job, wholeBoard(world), options);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Routes one connection of a net: from the pad `fromId` (and the copper already joined to it) to the pad `toId` (and
|
|
154
|
+
* its copper), on the board's layers, around everything of other nets. The result is the copper to lay, or why
|
|
155
|
+
* there is none, naming the objects that closed the way.
|
|
156
|
+
*/
|
|
157
|
+
export function routeConnection(input, fromId, toId, options = {}) {
|
|
158
|
+
const pads = input.layout.parts.flatMap((part) => part.pads);
|
|
159
|
+
const [from, to] = [pads.find((pad) => pad.id === fromId), pads.find((pad) => pad.id === toId)];
|
|
160
|
+
if (from === undefined || to === undefined)
|
|
161
|
+
return failed(`no pad ${from === undefined ? fromId : toId}`);
|
|
162
|
+
if (from.net === undefined || from.net !== to.net)
|
|
163
|
+
return failed(`${padName(from)} and ${padName(to)} are not on one net`);
|
|
164
|
+
const world = routerWorld(input.layout, input.rules, classLookup(input.rules, input.nets));
|
|
165
|
+
const byId = new Map(world.obstacles.map((piece) => [piece.id, piece]));
|
|
166
|
+
const island = (padId) => joinedTo(input.layout, padId).flatMap((piece) => byId.get(piece.id) ?? []);
|
|
167
|
+
const [start, end] = [island(fromId), island(toId)];
|
|
168
|
+
if (start.some((piece) => piece.id === toId))
|
|
169
|
+
return failed(`${padName(from)} and ${padName(to)} are already connected`);
|
|
170
|
+
const job = { rule: netRule(input.rules, input.nets, from.net), from, to, start, end };
|
|
171
|
+
const result = attempt(world, job, options);
|
|
172
|
+
return result.routed ? { routed: true, copper: result.copper, cost: result.cost } : failed(result.reason, result.blockers);
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../src/engine/router/connect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,M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AM,CAAC,QAAQ,CAAC,CAAA;AAC5H,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type CopperPiece } from "../checks/copper-pieces.js";
|
|
2
|
+
import type { Point } from "../model.js";
|
|
3
|
+
import type { PcbLayout, WorldPad } from "../pcb.js";
|
|
4
|
+
import { type CellRef, type EndRef } from "./astar.js";
|
|
5
|
+
import { type NetRule, type RouterGrid, type RouterWorld } from "./grid.js";
|
|
6
|
+
import type { Obstacle } from "./obstacles.js";
|
|
7
|
+
/** The net's pads and copper already joined to the pad, the pad first, then in natural id order. */
|
|
8
|
+
export declare function joinedTo(layout: PcbLayout, padId: string): CopperPiece[];
|
|
9
|
+
/** The free cells on the pieces' copper, on each of their layers the grid has, each once, in layer then cell order. */
|
|
10
|
+
export declare function endCells(grid: RouterGrid, pieces: readonly CopperPiece[]): CellRef[];
|
|
11
|
+
/** The net's pads and copper in the groups its copper joins, each group in natural id order, groups by their first. */
|
|
12
|
+
export declare function islandsOf(layout: PcbLayout, pieces: readonly Obstacle[]): Obstacle[][];
|
|
13
|
+
/** An end off the grid: the pad centre, and the cells its legs reach, each with the leg's cost. */
|
|
14
|
+
export interface Legs {
|
|
15
|
+
at: Point;
|
|
16
|
+
ends: EndRef[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Legs from the pad's centre to the free cells around it, for a pad no grid cell lies on: straight tracks of the
|
|
20
|
+
* net's width that keep every gap exactly (checked as laid copper, not on the grid), to at most LEG_LIMIT cells,
|
|
21
|
+
* nearest first. Each costs its length in grid steps.
|
|
22
|
+
*/
|
|
23
|
+
export declare function padLegs(world: RouterWorld, grid: RouterGrid, rule: NetRule, pad: WorldPad, extra?: readonly Obstacle[]): Legs;
|
|
24
|
+
/** What blocks the cells on the pieces' copper, by name, in natural order, the board edge only when nothing else does. */
|
|
25
|
+
export declare function blockingNames(grid: RouterGrid, pieces: readonly CopperPiece[]): string[];
|