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,60 @@
|
|
|
1
|
+
import { padShape } from "../checks/geometry.js";
|
|
2
|
+
import { pourJoins } from "../pour/joins.js";
|
|
3
|
+
import { STEP } from "./astar.js";
|
|
4
|
+
import { cellsNear } from "./grid.js";
|
|
5
|
+
/**
|
|
6
|
+
* Keep-clear around pads a pour joins. Such a pad has no ratsnest line (its fill makes the connection), so nothing
|
|
7
|
+
* stops other nets' tracks from passing all round it; once the fill is computed again around them, the pad is cut off
|
|
8
|
+
* and walled in. So in the first run the cells around each such pad, on the fill's layer, cost other nets' tracks a
|
|
9
|
+
* little more: a price, not a wall, so a track still passes there when there is no other way. Only for a net poured on
|
|
10
|
+
* one layer: poured on two, a cut-off pad still reaches the other fill through a via.
|
|
11
|
+
*
|
|
12
|
+
* Why not on two layers as well (checked on the skill's sensor board, test/skill-example.test.ts): the GND line that
|
|
13
|
+
* board lost is U101.pin2, the middle pad of a SOT-23-5 LDO between pins 1 and 3, which are both V5 and joined to each
|
|
14
|
+
* other. Every top route between them passes round pin 2, inside its keep-clear, whatever it costs, and an S1 via
|
|
15
|
+
* above closes the ring: the main run walls pin 2 in with keep-clear on or off (the same line fails both ways). What
|
|
16
|
+
* recovers it is rip-up and retry, which takes the V5 and S1 routes up and routes the GND line first. With keep-clear
|
|
17
|
+
* on both layers the main run's other routes come out differently, and the retry's new GND route (a bottom track with
|
|
18
|
+
* two vias) walls in C301.pin2 instead, so the retry is not kept. Keep-clear did not fail there; it was not needed, and
|
|
19
|
+
* on two layers it only adds cost on both sides of every through pad, which crowds the routes the retry depends on.
|
|
20
|
+
* (That was the placement before small parts were kept beside their pins; the board now routes fully either way.)
|
|
21
|
+
*/
|
|
22
|
+
/** How far beyond the pad's copper the keep-clear reaches, in mm: about one track and its gap. */
|
|
23
|
+
const KEEP_REACH = 0.6;
|
|
24
|
+
/** What a kept-clear cell costs another net's track, on top of its other costs. */
|
|
25
|
+
export const KEEP_COST = 3 * STEP;
|
|
26
|
+
/** The keep-clear of the layout's pours, or undefined when no pour joins a pad. */
|
|
27
|
+
export function keepClearOf(world) {
|
|
28
|
+
const { layout, frame } = world;
|
|
29
|
+
if (layout.pours.length === 0)
|
|
30
|
+
return undefined;
|
|
31
|
+
const pads = layout.parts.flatMap((part) => part.pads);
|
|
32
|
+
const byId = new Map(pads.map((pad) => [pad.id, pad]));
|
|
33
|
+
const cells = frame.cols * frame.rows;
|
|
34
|
+
const track = frame.layers.map(() => new Int32Array(cells));
|
|
35
|
+
const nets = [];
|
|
36
|
+
let any = false;
|
|
37
|
+
const layersOf = (net) => new Set(layout.pours.filter((one) => one.net === net).map((one) => one.layer));
|
|
38
|
+
for (const fill of layout.pours) {
|
|
39
|
+
const l = frame.layers.indexOf(fill.layer);
|
|
40
|
+
// A net poured on two layers gives a cut-off pad a way out through a via: no keep-clear needed, and it would only crowd.
|
|
41
|
+
if (l < 0 || layersOf(fill.net).size > 1)
|
|
42
|
+
continue;
|
|
43
|
+
const joined = new Set(pourJoins([fill], pads, layout.tracks, layout.vias).flat());
|
|
44
|
+
for (const id of [...joined].sort()) {
|
|
45
|
+
const pad = byId.get(id);
|
|
46
|
+
const shape = pad === undefined ? undefined : padShape(pad);
|
|
47
|
+
if (pad?.net === undefined || shape === undefined)
|
|
48
|
+
continue;
|
|
49
|
+
const net = nets.indexOf(pad.net) >= 0 ? nets.indexOf(pad.net) : nets.push(pad.net) - 1;
|
|
50
|
+
const map = track[l];
|
|
51
|
+
cellsNear(frame, shape, KEEP_REACH, (cell) => {
|
|
52
|
+
if (map[cell] === 0)
|
|
53
|
+
map[cell] = net + 1;
|
|
54
|
+
});
|
|
55
|
+
any = true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return any ? { track, nets } : undefined;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=keep-clear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keep-clear.js","sourceRoot":"","sources":["../../../src/engine/router/keep-clear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD;;;;;;;;;;;;;;;;GAgBG;AAEH,kGAAkG;AAClG,MAAM,UAAU,GAAG,GAAG,CAAA;AACtB,mFAAmF;AACnF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,CAAA;AAQjC,mFAAmF;AACnF,MAAM,UAAU,WAAW,CAAC,KAAkB;IAC5C,MAAM,EAAE,MAAM,EAAE,KAAK,EA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"../checks/geometry.js";
|
|
3
|
+
import type { Box } from "../checks/grid-index.js";
|
|
4
|
+
import type { PcbLayout } from "../pcb.js";
|
|
5
|
+
/**
|
|
6
|
+
* What the router keeps clear of: the copper the copper checks measure (pads, tracks, vias), each with the box around
|
|
7
|
+
* its shapes and its hole. A pad of a shape the checks do not know is kept out over its whole box, so the router never
|
|
8
|
+
* runs through it.
|
|
9
|
+
*/
|
|
10
|
+
export interface Obstacle extends CopperPiece {
|
|
11
|
+
box: Box;
|
|
12
|
+
/** The drilled hole of a through pad or a via. */
|
|
13
|
+
hole?: Shape;
|
|
14
|
+
}
|
|
15
|
+
/** The box around the shapes. */
|
|
16
|
+
export declare function boxOf(shapes: readonly Shape[]): Box;
|
|
17
|
+
/** The pads (known shapes, then the others as boxes) and the layout's copper, with their boxes and holes, in natural id order. */
|
|
18
|
+
export declare function obstaclesOf(layout: PcbLayout, classOf: ClassOf): Obstacle[];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { COPPER_LAYERS } from "../../core/layout-file.js";
|
|
2
|
+
import { copperPieces, padPieces } from "../checks/copper-pieces.js";
|
|
3
|
+
import { bounds, drillShape, padShape } from "../checks/geometry.js";
|
|
4
|
+
import { naturalCompare } from "../order.js";
|
|
5
|
+
import { DEFAULT_CLASS } from "../rules/profiles.js";
|
|
6
|
+
const DEG = Math.PI / 180;
|
|
7
|
+
/** The box around the shapes. */
|
|
8
|
+
export function boxOf(shapes) {
|
|
9
|
+
const boxes = shapes.map(bounds);
|
|
10
|
+
return {
|
|
11
|
+
minX: Math.min(...boxes.map((box) => box.minX)),
|
|
12
|
+
minY: Math.min(...boxes.map((box) => box.minY)),
|
|
13
|
+
maxX: Math.max(...boxes.map((box) => box.maxX)),
|
|
14
|
+
maxY: Math.max(...boxes.map((box) => box.maxY)),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** A pad's width × height rectangle, turned with it: the most a pad of any shape covers. */
|
|
18
|
+
function padBox(pad) {
|
|
19
|
+
const size = (value) => (Number.isFinite(value) && value > 0 ? value / 2 : 0);
|
|
20
|
+
const [hw, hh] = [size(pad.width), size(pad.height)];
|
|
21
|
+
const [cos, sin] = [Math.cos(pad.rotation * DEG), Math.sin(pad.rotation * DEG)];
|
|
22
|
+
const corners = [
|
|
23
|
+
{ x: -hw, y: -hh },
|
|
24
|
+
{ x: hw, y: -hh },
|
|
25
|
+
{ x: hw, y: hh },
|
|
26
|
+
{ x: -hw, y: hh },
|
|
27
|
+
];
|
|
28
|
+
return { core: corners.map((c) => ({ x: pad.x + c.x * cos - c.y * sin, y: pad.y + c.x * sin + c.y * cos })), radius: 0 };
|
|
29
|
+
}
|
|
30
|
+
const padLayers = (pad) => (pad.layers === "through" ? COPPER_LAYERS : [pad.layers]);
|
|
31
|
+
/** Pads of a shape the checks skip, as their box. */
|
|
32
|
+
function unknownPads(layout, classOf) {
|
|
33
|
+
return layout.parts
|
|
34
|
+
.flatMap((part) => part.pads)
|
|
35
|
+
.filter((pad) => padShape(pad) === undefined)
|
|
36
|
+
.map((pad) => ({
|
|
37
|
+
id: pad.id,
|
|
38
|
+
kind: "pad",
|
|
39
|
+
...(pad.net === undefined ? {} : { net: pad.net }),
|
|
40
|
+
className: pad.net === undefined ? DEFAULT_CLASS.name : classOf(pad.net),
|
|
41
|
+
layers: padLayers(pad),
|
|
42
|
+
shapes: [padBox(pad)],
|
|
43
|
+
at: { x: pad.x, y: pad.y },
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
/** The pads (known shapes, then the others as boxes) and the layout's copper, with their boxes and holes, in natural id order. */
|
|
47
|
+
export function obstaclesOf(layout, classOf) {
|
|
48
|
+
const pads = new Map(layout.parts.flatMap((part) => part.pads).map((pad) => [pad.id, pad]));
|
|
49
|
+
const vias = new Map(layout.vias.map((via) => [via.id, via]));
|
|
50
|
+
const holeOf = (piece) => {
|
|
51
|
+
if (piece.kind === "via") {
|
|
52
|
+
const via = vias.get(piece.id);
|
|
53
|
+
return via === undefined ? undefined : { core: [via.at], radius: via.drill / 2 };
|
|
54
|
+
}
|
|
55
|
+
const pad = piece.kind === "pad" ? pads.get(piece.id) : undefined;
|
|
56
|
+
return pad === undefined || pad.layers !== "through" ? undefined : drillShape(pad);
|
|
57
|
+
};
|
|
58
|
+
const pieces = [...padPieces(layout, classOf), ...unknownPads(layout, classOf), ...copperPieces(layout, classOf)];
|
|
59
|
+
return pieces
|
|
60
|
+
.map((piece) => {
|
|
61
|
+
const hole = holeOf(piece);
|
|
62
|
+
return { ...piece, box: boxOf(piece.shapes), ...(hole === undefined ? {} : { hole }) };
|
|
63
|
+
})
|
|
64
|
+
.sort((a, b) => naturalCompare(a.id, b.id));
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=obstacles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"obstacles.js","sourceRoot":"","sources":["../../../src/engine/router/obstacles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,2BAA2B,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,SAAS,EAAkC,MAAM,4BAA4B,CAAA;AACpG,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAc,MAAM,uBAAuB,CAAA;AAGhF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAapD,MAAM,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAA;AAEzB,iCAAiC;AACjC,MAAM,UAAU,KAAK,CAAC,MAAwB;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAChC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,EAAE,IAAI,CAAC,G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ACjE,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACpF,CAAC,CAAA;IACD,MAAM,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IACjH,OAAO,MAAM;SACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;QAC1B,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAA;IACxF,CAAC,CAAC;SACD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC/C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CopperLayer } from "../../core/layout-file.js";
|
|
2
|
+
import type { Point } from "../model.js";
|
|
3
|
+
import type { CellRef } from "./astar.js";
|
|
4
|
+
import { type NetRule, type RouterGrid } from "./grid.js";
|
|
5
|
+
/** A routed track in mm: its points are cell centres, so they lie on the grid. */
|
|
6
|
+
export interface RoutedTrack {
|
|
7
|
+
layer: CopperLayer;
|
|
8
|
+
width: number;
|
|
9
|
+
points: Point[];
|
|
10
|
+
}
|
|
11
|
+
/** A routed via in mm, through every layer. */
|
|
12
|
+
export interface RoutedVia {
|
|
13
|
+
at: Point;
|
|
14
|
+
drill: number;
|
|
15
|
+
diameter: number;
|
|
16
|
+
layers: CopperLayer[];
|
|
17
|
+
}
|
|
18
|
+
/** The copper one routed connection lays: net id, tracks (one per run on a layer) and vias (one per layer change). */
|
|
19
|
+
export interface RoutedCopper {
|
|
20
|
+
net: string;
|
|
21
|
+
tracks: RoutedTrack[];
|
|
22
|
+
vias: RoutedVia[];
|
|
23
|
+
}
|
|
24
|
+
/** Where a path leaves a pad centre off the grid, or ends on one. */
|
|
25
|
+
export interface PathLegs {
|
|
26
|
+
start?: Point;
|
|
27
|
+
end?: Point;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The copper for a path of cells: a track for each run on one layer (a run of one cell, between two vias or at an
|
|
31
|
+
* end, lays none), with points only at the corners, and a via of the net's size wherever the layer changes. A leg
|
|
32
|
+
* adds the pad centre before the first point or after the last, and makes a track of a run of one cell.
|
|
33
|
+
*/
|
|
34
|
+
export declare function pathCopper(grid: RouterGrid, steps: readonly CellRef[], rule: NetRule, legs?: PathLegs): RoutedCopper;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { cellCentre } from "./grid.js";
|
|
2
|
+
/** A via joins top to bottom, and so every layer between. */
|
|
3
|
+
const THROUGH = ["top", "bottom"];
|
|
4
|
+
/** The run's corners: its first and last cell and every cell where the direction changes. */
|
|
5
|
+
function corners(grid, run) {
|
|
6
|
+
const kept = run.filter((step, i) => {
|
|
7
|
+
const [before, after] = [run[i - 1], run[i + 1]];
|
|
8
|
+
if (before === undefined || after === undefined)
|
|
9
|
+
return true;
|
|
10
|
+
return after.cell - step.cell !== step.cell - before.cell;
|
|
11
|
+
});
|
|
12
|
+
return kept.map((step) => cellCentre(grid, step.cell));
|
|
13
|
+
}
|
|
14
|
+
/** Splits the steps where the layer changes. */
|
|
15
|
+
function runs(steps) {
|
|
16
|
+
const found = [];
|
|
17
|
+
for (const step of steps) {
|
|
18
|
+
const run = found.at(-1);
|
|
19
|
+
if (run !== undefined && run[0]?.layer === step.layer)
|
|
20
|
+
run.push(step);
|
|
21
|
+
else
|
|
22
|
+
found.push([step]);
|
|
23
|
+
}
|
|
24
|
+
return found;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The copper for a path of cells: a track for each run on one layer (a run of one cell, between two vias or at an
|
|
28
|
+
* end, lays none), with points only at the corners, and a via of the net's size wherever the layer changes. A leg
|
|
29
|
+
* adds the pad centre before the first point or after the last, and makes a track of a run of one cell.
|
|
30
|
+
*/
|
|
31
|
+
export function pathCopper(grid, steps, rule, legs = {}) {
|
|
32
|
+
const pieces = runs(steps);
|
|
33
|
+
const last = pieces.length - 1;
|
|
34
|
+
const tracks = pieces.flatMap((run, i) => {
|
|
35
|
+
const points = [...(i === 0 && legs.start ? [legs.start] : []), ...corners(grid, run), ...(i === last && legs.end ? [legs.end] : [])];
|
|
36
|
+
return points.length > 1 ? [{ layer: grid.layers[run[0]?.layer ?? 0], width: rule.width, points }] : [];
|
|
37
|
+
});
|
|
38
|
+
const vias = pieces.slice(1).map((run) => ({ at: cellCentre(grid, run[0]?.cell ?? 0), drill: rule.via.drill, diameter: rule.via.diameter, layers: [...THROUGH] }));
|
|
39
|
+
return { net: rule.net, tracks, vias };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/engine/router/path.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAiC,MAAM,WAAW,CAAA;AAwBrE,6DAA6D;AAC7D,MAAM,OAAO,GAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAEhD,6FAA6F;AAC7F,SAAS,OAAO,CAAC,IAAgB,EAAE,GAAuB;IACxD,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QAClC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC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K,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACrI,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,CAAgB,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACxH,CAAC,CAAC,CAAA;IACF,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;IAClK,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AACxC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PcbLayout } from "../pcb.js";
|
|
2
|
+
import { type RouteInput } from "./connect.js";
|
|
3
|
+
import type { RouteBoardInput, RouteBoardOptions, RouteReport, RoutedConnection } from "./route-board.js";
|
|
4
|
+
/** The route a `<prefix>:N:…` copper id names (`routed:N:…` by default), as an index into the routes it was made from. */
|
|
5
|
+
export declare function routedIndex(id: string, prefix?: string): number | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* The layout with the routes added as copper, the pours filled again around it, and the ratsnest of what is left.
|
|
8
|
+
* The routes' copper ids start with `prefix` (`routed` by default), so a layout refilled twice keeps them apart.
|
|
9
|
+
*/
|
|
10
|
+
export declare function refilled(input: RouteInput, routed: readonly RoutedConnection[], prefix?: string): PcbLayout;
|
|
11
|
+
/**
|
|
12
|
+
* Routes the board with `routeOnce`, then routes again what the refilled pours no longer join; see the module comment.
|
|
13
|
+
* The extra rounds take exactly those lines, whatever the run's scope: the run's own copper broke them. A line in
|
|
14
|
+
* `alreadyMissing` was open before the run (a scoped run passes the board's open lines) and is left alone. Lines still
|
|
15
|
+
* missing when the rounds stop (a round routed nothing, the cap, the budget) are reported unrouted.
|
|
16
|
+
*/
|
|
17
|
+
export declare function routeWithPours(input: RouteBoardInput, options: RouteBoardOptions, routeOnce: (input: RouteBoardInput, options: RouteBoardOptions) => RouteReport): RouteReport;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { cachedPourFills } from "../pour/cache.js";
|
|
2
|
+
import { resolveWithPours } from "../pour/resolve.js";
|
|
3
|
+
import { ratsnest } from "../ratsnest.js";
|
|
4
|
+
import { layoutEdits } from "./cleanup.js";
|
|
5
|
+
import { classLookup, padName } from "./connect.js";
|
|
6
|
+
/**
|
|
7
|
+
* Routing a board with pours. The router treats a pour as free space: its fill is not an obstacle, and the connections
|
|
8
|
+
* the fill already makes are not in the ratsnest, so they are not routed. Once the routes are laid the fill is computed
|
|
9
|
+
* again around them (as the next build would), and it may now be cut apart by other nets' tracks: the connections of a
|
|
10
|
+
* pour's net that the new fill no longer makes are routed in another round, with the routes laid so far as fixed copper.
|
|
11
|
+
* Rounds repeat until the fill makes every connection of its net that is not routed, a round routes nothing, the cap
|
|
12
|
+
* or the budget; what is still missing then is reported unrouted, so a run never hides an airwire the next build shows.
|
|
13
|
+
*/
|
|
14
|
+
/** The most extra rounds after the first; one usually settles it, since a pour net's own tracks never cut its fill. */
|
|
15
|
+
const MAX_ROUNDS = 3;
|
|
16
|
+
const trackRecord = (track) => ({
|
|
17
|
+
t: "track",
|
|
18
|
+
id: track.id,
|
|
19
|
+
...(track.named === undefined ? {} : { net: track.named }),
|
|
20
|
+
layer: track.layer,
|
|
21
|
+
width: track.width,
|
|
22
|
+
points: track.points,
|
|
23
|
+
locked: track.locked,
|
|
24
|
+
by: track.by,
|
|
25
|
+
});
|
|
26
|
+
const viaRecord = (via) => ({
|
|
27
|
+
t: "via",
|
|
28
|
+
id: via.id,
|
|
29
|
+
...(via.named === undefined ? {} : { net: via.named }),
|
|
30
|
+
at: via.at,
|
|
31
|
+
drill: via.drill,
|
|
32
|
+
diameter: via.diameter,
|
|
33
|
+
layers: via.layers,
|
|
34
|
+
locked: via.locked,
|
|
35
|
+
by: via.by,
|
|
36
|
+
});
|
|
37
|
+
/** The routes as layout records of their nets, with ids no layout file uses: `routed:3:t1` is the first track of the third route. */
|
|
38
|
+
function routedRecords(routed, prefix) {
|
|
39
|
+
return routed.flatMap((route, i) => [
|
|
40
|
+
...route.copper.tracks.map((track, j) => ({ t: "track", id: `${prefix}:${i + 1}:t${j + 1}`, net: route.net, ...track, locked: false, by: "router" })),
|
|
41
|
+
...route.copper.vias.map((via, j) => ({ t: "via", id: `${prefix}:${i + 1}:v${j + 1}`, net: route.net, ...via, locked: false, by: "router" })),
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
/** The route a `<prefix>:N:…` copper id names (`routed:N:…` by default), as an index into the routes it was made from. */
|
|
45
|
+
export function routedIndex(id, prefix = "routed") {
|
|
46
|
+
if (!id.startsWith(`${prefix}:`))
|
|
47
|
+
return undefined;
|
|
48
|
+
const found = /^(\d+):[tv]\d+$/.exec(id.slice(prefix.length + 1));
|
|
49
|
+
return found ? Number(found[1]) - 1 : undefined;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The layout with the routes added as copper, the pours filled again around it, and the ratsnest of what is left.
|
|
53
|
+
* The routes' copper ids start with `prefix` (`routed` by default), so a layout refilled twice keeps them apart.
|
|
54
|
+
*/
|
|
55
|
+
export function refilled(input, routed, prefix = "routed") {
|
|
56
|
+
const { layout, rules, nets } = input;
|
|
57
|
+
const board = layout.board;
|
|
58
|
+
if (board === undefined)
|
|
59
|
+
return layout;
|
|
60
|
+
const records = [...layout.tracks.map(trackRecord), ...layout.vias.map(viaRecord), ...routedRecords(routed, prefix)];
|
|
61
|
+
const classOf = classLookup(rules, nets);
|
|
62
|
+
const fill = (pads, copper) => cachedPourFills({ board, pads, tracks: copper.tracks, vias: copper.vias, rules, classOf });
|
|
63
|
+
const { copper, pours } = resolveWithPours(layout.parts, records, nets, board.layers, fill);
|
|
64
|
+
return { ...layout, tracks: copper.tracks, vias: copper.vias, pours, ratsnest: ratsnest(layout.parts, copper.islands) };
|
|
65
|
+
}
|
|
66
|
+
const lineKey = (line) => `${line.net}|${line.from}|${line.to}`;
|
|
67
|
+
/** The two rounds as one report: the later round's results replace the earlier failures of the lines it took on again. */
|
|
68
|
+
function merged(before, after, retried) {
|
|
69
|
+
const routed = [...before.routed, ...after.routed];
|
|
70
|
+
const unrouted = [...before.unrouted.filter((one) => !retried.has(lineKey(one))), ...after.unrouted];
|
|
71
|
+
return {
|
|
72
|
+
...before,
|
|
73
|
+
routed,
|
|
74
|
+
unrouted,
|
|
75
|
+
passes: before.passes + after.passes,
|
|
76
|
+
edits: layoutEdits(routed),
|
|
77
|
+
ms: before.ms + after.ms,
|
|
78
|
+
cleanupCapped: before.cleanupCapped || after.cleanupCapped,
|
|
79
|
+
cleanupSkipped: before.cleanupSkipped || after.cleanupSkipped,
|
|
80
|
+
budgetSpent: before.budgetSpent || after.budgetSpent,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/** The report with the lines the refilled pours no longer join, and that no round reported, added as unrouted. */
|
|
84
|
+
function withLeftover(report, layout, missing) {
|
|
85
|
+
const pads = new Map(layout.parts.flatMap((part) => part.pads).map((pad) => [pad.id, pad]));
|
|
86
|
+
const name = (id) => {
|
|
87
|
+
const pad = pads.get(id);
|
|
88
|
+
return pad === undefined ? id : padName(pad);
|
|
89
|
+
};
|
|
90
|
+
const reported = new Set(report.unrouted.map(lineKey));
|
|
91
|
+
const left = missing
|
|
92
|
+
.filter((line) => !reported.has(lineKey(line)))
|
|
93
|
+
.map((line) => ({ net: line.net, from: line.from, to: line.to, reason: `the refilled pour no longer joins ${name(line.from)} to ${name(line.to)}`, blockers: [] }));
|
|
94
|
+
return left.length === 0 ? report : { ...report, unrouted: [...report.unrouted, ...left] };
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Routes the board with `routeOnce`, then routes again what the refilled pours no longer join; see the module comment.
|
|
98
|
+
* The extra rounds take exactly those lines, whatever the run's scope: the run's own copper broke them. A line in
|
|
99
|
+
* `alreadyMissing` was open before the run (a scoped run passes the board's open lines) and is left alone. Lines still
|
|
100
|
+
* missing when the rounds stop (a round routed nothing, the cap, the budget) are reported unrouted.
|
|
101
|
+
*/
|
|
102
|
+
export function routeWithPours(input, options, routeOnce) {
|
|
103
|
+
let report = routeOnce(input, options);
|
|
104
|
+
if ((input.layout.board?.pours ?? []).length === 0)
|
|
105
|
+
return report;
|
|
106
|
+
for (let round = 0;; round++) {
|
|
107
|
+
const layout = refilled(input, report.routed);
|
|
108
|
+
const pourNets = new Set(layout.pours.map((pour) => pour.net));
|
|
109
|
+
const reported = new Set([...report.unrouted.map(lineKey), ...(options.alreadyMissing ?? [])]);
|
|
110
|
+
const missing = layout.ratsnest.filter((line) => pourNets.has(line.net) && !reported.has(lineKey(line)));
|
|
111
|
+
if (missing.length === 0)
|
|
112
|
+
return report;
|
|
113
|
+
// The rounds' own time is what the budget counts: refilling between them is quick, and the clock is read only by the runs.
|
|
114
|
+
const spent = options.budgetMs !== undefined && report.ms >= options.budgetMs;
|
|
115
|
+
if (round >= MAX_ROUNDS || report.budgetSpent || spent)
|
|
116
|
+
return withLeftover(report, layout, missing);
|
|
117
|
+
const budget = options.budgetMs === undefined ? {} : { budgetMs: options.budgetMs - report.ms };
|
|
118
|
+
const next = routeOnce({ ...input, layout: { ...layout, ratsnest: missing } }, { ...options, ...budget, scope: { kind: "all" } });
|
|
119
|
+
report = merged(report, next, new Set(missing.map(lineKey)));
|
|
120
|
+
if (next.routed.length === 0)
|
|
121
|
+
return withLeftover(report, layout, missing);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=pour-rounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pour-rounds.js","sourceRoot":"","sources":["../../../src/engine/router/pour-rounds.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAmB,MAAM,cAAc,CAAA;AAGpE;;;;;;;GAOG;AAEH,uHAAuH;AACvH,MAAM,UAAU,GAAG,CAAC,CAAA;AAEpB,MAAM,WAAW,GAAG,CAAC,KAAe,EAAgB,EAAE,CAAC,CAAC;IACtD,CAAC,EAAE,OAAO;IACV,EAAE,EAAE,KAAK,CAAC,EAAE;IACZ,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IAC1D,KAAK,EAAE,KAAK,CAAC,KAAK;IAClB,KAAK,EAAE,KAAK,CAAC,KAAK;IAClB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,MAAM,E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AC,IAAI,CAAC,CAAC,CAAC,CAAA;QACxG,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,MAAM,CAAA;QACvC,2HAA2H;QAC3H,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,EAAE,IAAI,OAAO,CAAC,QAAQ,CAAA;QAC7E,IAAI,KAAK,IAAI,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,KAAK;YAAE,OAAO,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;QACpG,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,EAAE,EAAE,CAAA;QAC/F,MAAM,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;QACjI,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;QAC5D,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { WorldPad } from "../pcb.js";
|
|
2
|
+
import { type Congestion } from "./congestion.js";
|
|
3
|
+
import type { RouterWorld } from "./grid.js";
|
|
4
|
+
import type { RouteBoardInput, RoutedConnection, UnroutedConnection } from "./route-board.js";
|
|
5
|
+
/**
|
|
6
|
+
* Copying an instance's routes to the other instances of its sheet, as Replicate layout does: where a target's parts
|
|
7
|
+
* sit in its own frame exactly as the source's sit in theirs, each route of the source is turned into the target's
|
|
8
|
+
* frame, onto the same pads of the target's parts and the nets those pads are on. A copy is kept only when the exact
|
|
9
|
+
* clearance check passes against everything already on the board and laid in the run; otherwise it is reported. A copy
|
|
10
|
+
* whose ends would not touch the target's pads (a source route ending on hand copper the target lacks) is not made:
|
|
11
|
+
* that connection is routed for the target on its own.
|
|
12
|
+
*/
|
|
13
|
+
export interface Replica {
|
|
14
|
+
instance: string;
|
|
15
|
+
/** The routes copied. */
|
|
16
|
+
copied: number;
|
|
17
|
+
/** Why nothing was copied: the placement does not match the source's. */
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface Copies {
|
|
21
|
+
routed: RoutedConnection[];
|
|
22
|
+
unrouted: UnroutedConnection[];
|
|
23
|
+
replicas: Replica[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Copies the source instance's routes to the other instances of its sheet (see the module comment). Once `late` says
|
|
27
|
+
* the time budget is spent, no copy is made or routed any more: each connection left is reported with `outOfTime`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function replicate(world: RouterWorld, input: RouteBoardInput, name: string, routed: readonly RoutedConnection[], congestion: Congestion, budget: {
|
|
30
|
+
late: () => boolean;
|
|
31
|
+
outOfTime: (from: WorldPad, to: WorldPad) => string;
|
|
32
|
+
}): Copies;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { naturalCompare } from "../order.js";
|
|
2
|
+
import { offenders } from "./clear.js";
|
|
3
|
+
import { copperObstacles } from "./congestion.js";
|
|
4
|
+
import { copperTouches } from "../copper.js";
|
|
5
|
+
import { attempt, netRule, why } from "./connect.js";
|
|
6
|
+
import { islandsOf } from "./ends.js";
|
|
7
|
+
/** Positions closer than this, in mm, are the same. */
|
|
8
|
+
const SAME = 1e-6;
|
|
9
|
+
const DEG = Math.PI / 180;
|
|
10
|
+
const toNanometre = (mm) => Math.round(mm * 1e6) / 1e6 || 0;
|
|
11
|
+
const frameOf = (instance) => instance.pcb ?? { x: 0, y: 0, rotation: 0 };
|
|
12
|
+
function turned(p, degrees) {
|
|
13
|
+
const quarter = degrees / 90;
|
|
14
|
+
if (Number.isInteger(quarter)) {
|
|
15
|
+
const [cos, sin] = [[1, 0], [0, 1], [-1, 0], [0, -1]][((quarter % 4) + 4) % 4];
|
|
16
|
+
return { x: p.x * cos - p.y * sin, y: p.x * sin + p.y * cos };
|
|
17
|
+
}
|
|
18
|
+
const [cos, sin] = [Math.cos(degrees * DEG), Math.sin(degrees * DEG)];
|
|
19
|
+
return { x: p.x * cos - p.y * sin, y: p.x * sin + p.y * cos };
|
|
20
|
+
}
|
|
21
|
+
const toLocal = (p, frame) => turned({ x: p.x - frame.x, y: p.y - frame.y }, -frame.rotation);
|
|
22
|
+
const toBoard = (p, frame) => {
|
|
23
|
+
const q = turned(p, frame.rotation);
|
|
24
|
+
return { x: toNanometre(q.x + frame.x), y: toNanometre(q.y + frame.y) };
|
|
25
|
+
};
|
|
26
|
+
const angle = (degrees) => ((degrees % 360) + 360) % 360;
|
|
27
|
+
/** A part's key inside its instance: its nested instance path below the instance, and its name in the sheet. */
|
|
28
|
+
const keyIn = (component, instance) => `${(component.instance ?? "").slice(instance.path.length)}|${component.localId ?? component.id}`;
|
|
29
|
+
/** The target's part for each source part, when every part is there and sits the same in its instance's frame. */
|
|
30
|
+
function partMap(input, source, target) {
|
|
31
|
+
const components = input.components ?? [];
|
|
32
|
+
const placed = new Map(input.layout.parts.map((part) => [part.component, part]));
|
|
33
|
+
const inside = (instance) => new Map(components.filter((c) => instance.parts.includes(c.id)).map((c) => [keyIn(c, instance), c.id]));
|
|
34
|
+
const [mine, theirs] = [inside(source), inside(target)];
|
|
35
|
+
if (mine.size !== theirs.size)
|
|
36
|
+
return undefined;
|
|
37
|
+
const map = new Map();
|
|
38
|
+
const same = (a, b) => {
|
|
39
|
+
const [p, q] = [toLocal(a, frameOf(source)), toLocal(b, frameOf(target))];
|
|
40
|
+
const turn = angle(a.rotation - frameOf(source).rotation) - angle(b.rotation - frameOf(target).rotation);
|
|
41
|
+
return Math.abs(p.x - q.x) < SAME && Math.abs(p.y - q.y) < SAME && Math.abs(turn) < SAME && a.side === b.side;
|
|
42
|
+
};
|
|
43
|
+
for (const [key, id] of mine) {
|
|
44
|
+
const other = theirs.get(key);
|
|
45
|
+
const [a, b] = [placed.get(id), other === undefined ? undefined : placed.get(other)];
|
|
46
|
+
if (other === undefined || a === undefined || b === undefined || !same(a, b))
|
|
47
|
+
return undefined;
|
|
48
|
+
map.set(id, other);
|
|
49
|
+
}
|
|
50
|
+
return map;
|
|
51
|
+
}
|
|
52
|
+
/** The route turned into the target's frame, on the target's net. */
|
|
53
|
+
function moved(copper, net, from, to) {
|
|
54
|
+
const move = (p) => toBoard(toLocal(p, from), to);
|
|
55
|
+
return {
|
|
56
|
+
net,
|
|
57
|
+
tracks: copper.tracks.map((track) => ({ ...track, points: track.points.map(move) })),
|
|
58
|
+
vias: copper.vias.map((via) => ({ ...via, at: move(via.at), layers: [...via.layers] })),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** What the copy would come too near to, laid piece by piece. */
|
|
62
|
+
function copyOffenders(world, input, copper, walls) {
|
|
63
|
+
const rule = netRule(input.rules, input.nets, copper.net);
|
|
64
|
+
const pieces = copperObstacles(copper, rule.className);
|
|
65
|
+
const found = new Set();
|
|
66
|
+
for (const piece of pieces) {
|
|
67
|
+
const laid = { kind: piece.kind === "via" ? "via" : "track", layers: piece.kind === "via" ? world.frame.layers : piece.layers, shapes: piece.shapes, ...(piece.hole ? { hole: piece.hole } : {}) };
|
|
68
|
+
for (const name of offenders(world, rule, laid, walls))
|
|
69
|
+
found.add(name);
|
|
70
|
+
}
|
|
71
|
+
return [...found].sort(naturalCompare);
|
|
72
|
+
}
|
|
73
|
+
/** The pad and the copper of its net already joined to it, in the target. */
|
|
74
|
+
function islandIn(world, input, pad) {
|
|
75
|
+
const islands = islandsOf(input.layout, world.obstacles.filter((piece) => piece.net === pad.net));
|
|
76
|
+
return islands.find((island) => island.some((piece) => piece.id === pad.id)) ?? world.obstacles.filter((piece) => piece.id === pad.id);
|
|
77
|
+
}
|
|
78
|
+
/** Whether the copper touches the island's copper on a shared layer, so the copy really ends there. */
|
|
79
|
+
function touches(copper, className, island) {
|
|
80
|
+
return copperObstacles(copper, className).some((piece) => island.some((other) => piece.layers.some((layer) => other.layers.includes(layer)) && piece.shapes.some((a) => other.shapes.some((b) => copperTouches(a, b)))));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Copies the source instance's routes to the other instances of its sheet (see the module comment). Once `late` says
|
|
84
|
+
* the time budget is spent, no copy is made or routed any more: each connection left is reported with `outOfTime`.
|
|
85
|
+
*/
|
|
86
|
+
export function replicate(world, input, name, routed, congestion, budget) {
|
|
87
|
+
const source = input.instances?.find((instance) => instance.name === name || instance.path === name);
|
|
88
|
+
if (source === undefined)
|
|
89
|
+
return { routed: [], unrouted: [], replicas: [] };
|
|
90
|
+
const targets = (input.instances ?? []).filter((instance) => instance.file === source.file && instance.path !== source.path);
|
|
91
|
+
const pads = new Map(input.layout.parts.flatMap((part) => part.pads).map((pad) => [pad.id, pad]));
|
|
92
|
+
const missing = new Set(input.layout.ratsnest.map((line) => [line.from, line.to].sort(naturalCompare).join(" ")));
|
|
93
|
+
const walls = [...congestion.placed.values()].sort((a, b) => a.index - b.index).flatMap((placed) => placed.pieces);
|
|
94
|
+
const copies = { routed: [], unrouted: [], replicas: [] };
|
|
95
|
+
for (const target of targets) {
|
|
96
|
+
const parts = partMap(input, source, target);
|
|
97
|
+
if (parts === undefined) {
|
|
98
|
+
copies.replicas.push({ instance: target.name, copied: 0, reason: `its placement differs from ${source.name}` });
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const padIn = (id) => {
|
|
102
|
+
const [component, ...rest] = id.split("#");
|
|
103
|
+
const other = parts.get(component ?? "");
|
|
104
|
+
return other === undefined ? undefined : pads.get([other, ...rest].join("#"));
|
|
105
|
+
};
|
|
106
|
+
let copied = 0;
|
|
107
|
+
for (const route of routed) {
|
|
108
|
+
const [from, to] = [padIn(route.from), padIn(route.to)];
|
|
109
|
+
if (from === undefined || to === undefined || from.net === undefined || from.net !== to.net)
|
|
110
|
+
continue;
|
|
111
|
+
if (!missing.has([from.id, to.id].sort(naturalCompare).join(" ")))
|
|
112
|
+
continue;
|
|
113
|
+
if (budget.late()) {
|
|
114
|
+
copies.unrouted.push({ net: from.net, from: from.id, to: to.id, reason: budget.outOfTime(from, to), blockers: [] });
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
const rule = netRule(input.rules, input.nets, from.net);
|
|
118
|
+
const [start, end] = [islandIn(world, input, from), islandIn(world, input, to)];
|
|
119
|
+
const copper = moved(route.copper, from.net, frameOf(source), frameOf(target));
|
|
120
|
+
if (!touches(copper, rule.className, start) || !touches(copper, rule.className, end)) {
|
|
121
|
+
const result = attempt(world, { rule, from, to, start, end }, { extra: walls });
|
|
122
|
+
if (!result.routed) {
|
|
123
|
+
copies.unrouted.push({ net: from.net, from: from.id, to: to.id, reason: result.reason, blockers: result.blockers });
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
walls.push(...copperObstacles(result.copper, rule.className));
|
|
127
|
+
copies.routed.push({ net: from.net, from: from.id, to: to.id, copper: result.copper, cost: result.cost });
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const blockers = copyOffenders(world, input, copper, walls);
|
|
131
|
+
if (blockers.length > 0) {
|
|
132
|
+
copies.unrouted.push({ net: from.net, from: from.id, to: to.id, reason: why(from, to, blockers, "no-path", 0), blockers });
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
walls.push(...copperObstacles(copper, rule.className));
|
|
136
|
+
copies.routed.push({ net: from.net, from: from.id, to: to.id, copper, copiedFrom: source.name });
|
|
137
|
+
copied++;
|
|
138
|
+
}
|
|
139
|
+
copies.replicas.push({ instance: target.name, copied });
|
|
140
|
+
}
|
|
141
|
+
return copies;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=replicate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replicate.js","sourceRoot":"","sources":["../../../src/engine/router/replicate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,eAAe,EAAmB,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AA6BrC,uDAAuD;AACvD,MAAM,IAAI,GAAG,IAAI,CAAA;AACjB,MAAM,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAA;AACzB,MAAM,WAAW,GAAG,CAAC,EAAU,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAA;AAC3E,MAAM,OAAO,GAAG,CAAC,QAAuB,EAAS,EAAE,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAA;AAE/F,SAAS,MAAM,CAAC,CAAQ,EAAE,OAAe;IACvC,MAAM,OAAO,GAAG,OAAO,GAAG,EAAE,CAAA;IAC5B,IAAI,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,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C;QACD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RouteBoardInput, RouteBoardOptions, RouteReport } from "./route-board.js";
|
|
2
|
+
type Router = (input: RouteBoardInput, options: RouteBoardOptions) => RouteReport;
|
|
3
|
+
/** The report after rip-up and retry of its failed connections; see the module comment. */
|
|
4
|
+
export declare function ripUpAndRetry(input: RouteBoardInput, report: RouteReport, options: RouteBoardOptions, router: Router): RouteReport;
|
|
5
|
+
export {};
|