@tscircuit/schematic-trace-solver 0.0.135 → 0.0.137
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/dist/index.d.ts +2 -0
- package/dist/index.js +75 -13
- package/lib/solvers/SameNetJunctionAlignmentSolver/SameNetJunctionAlignmentSolver.ts +5 -2
- package/lib/solvers/SameNetJunctionAlignmentSolver/alignSameNetJunctions.ts +93 -14
- package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +4 -0
- package/package.json +1 -1
- package/tests/bug-reports/bug-report-20260721T221026Z/__snapshots__/bug-report-20260721T221026Z.snap.svg +4 -4
- package/tests/bug-reports/bug-report-20260721T221026Z/bug-report-20260721T221026Z.test.ts +11 -0
- package/tests/bug-reports/bug-report-20260815T073240Z/__snapshots__/bug-report-20260815T073240Z.snap.svg +3 -3
- package/tests/bug-reports/bug-report-20260815T073240Z/bug-report-20260815T073240Z.test.ts +39 -0
- package/tests/repros/__snapshots__/repro-board-589-regulator-section.snap.svg +4 -4
- package/tests/repros/repro-board-589-regulator-section.test.ts +23 -1
- package/tests/solver-name.test.ts +10 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { expect, test } from "bun:test"
|
|
2
|
+
import { tracePathContainsPoint } from "lib/solvers/RailNetLabelCornerPlacementSolver/geometry"
|
|
2
3
|
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
4
|
import inputProblem from "./bug-report-20260721T221026Z.json"
|
|
4
5
|
import "tests/fixtures/matcher"
|
|
@@ -8,5 +9,15 @@ test("bug-report-20260721T221026Z", () => {
|
|
|
8
9
|
|
|
9
10
|
solver.solve()
|
|
10
11
|
|
|
12
|
+
const junctionOutput = solver.sameNetJunctionAlignmentSolver!.getOutput()
|
|
13
|
+
const alignedTrace = junctionOutput.traces.find(
|
|
14
|
+
(trace) => trace.mspPairId === "R_RUN.1-C_MCU1.1",
|
|
15
|
+
)!
|
|
16
|
+
const attachedLabel = junctionOutput.netLabelPlacements.find((label) =>
|
|
17
|
+
label.mspConnectionPairIds.includes(alignedTrace.mspPairId),
|
|
18
|
+
)!
|
|
19
|
+
expect(
|
|
20
|
+
tracePathContainsPoint(alignedTrace.tracePath, attachedLabel.anchorPoint),
|
|
21
|
+
).toBe(true)
|
|
11
22
|
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
12
23
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-2.6508333333333325,2.473333333333333 -4.532499999999999,1.8875000000000002" data-type="line" data-label="" points="151.35991186393994,208.0385595262687 64.29250154926669,235.1459064931488" fill="none" stroke="hsl(32, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-4.532499999999999,1.8875000000000002 -1.5208333333333326,2.473333333333333" data-type="line" data-label="" points="64.29250154926669,235.1459064931488 203.64662948426633,208.0385595262687" fill="none" stroke="hsl(170, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.532499999999999,1.8875000000000002 -2.6508333333333325,2.473333333333333" data-type="line" data-label="" points="64.29250154926669,235.1459064931488 151.35991186393994,208.0385595262687" fill="none" stroke="hsl(170, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.5208333333333326,2.473333333333333 -2.6508333333333325,2.473333333333333" data-type="line" data-label="" points="203.64662948426633,208.0385595262687 151.35991186393994,208.0385595262687" fill="none" stroke="hsl(170, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.532499999999999,0.8475000000000001 -1.2850000000000001,0.2" data-type="line" data-label="" points="64.29250154926669,283.2681952764581 214.55897541830194,313.2289471872203" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.532499999999999,0.8475000000000001 -1.2850000000000001,-0.2" data-type="line" data-label="" points="64.29250154926669,283.2681952764581 214.55897541830194,331.7375197961854" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.532499999999999,0.8475000000000001 -2.469999999999999,1.7475" data-type="line" data-label="" points="64.29250154926669,283.2681952764581 159.72732906424295,241.6239069062866" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0.2 -1.2850000000000001,-0.2" data-type="line" data-label="" points="214.55897541830194,313.2289471872203 214.55897541830194,331.7375197961854" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0.2 -2.469999999999999,1.7475" data-type="line" data-label="" points="214.55897541830194,313.2289471872203 159.72732906424295,241.6239069062866" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,-0.2 -2.469999999999999,1.7475" data-type="line" data-label="" points="214.55897541830194,331.7375197961854 159.72732906424295,241.6239069062866" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0 -2.469999999999999,0.9875000000000003" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 159.72732906424295,276.79019486332027" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0 2.6075,-0.78" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 394.6705226192935,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0 6.245,-2.4050000000000002" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 562.9828547820698,433.76602630310543" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0 3.9924999999999997,-0.78" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 458.75645527783513,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.469999999999999,0.9875000000000003 2.6075,-0.78" data-type="line" data-label="" points="159.72732906424295,276.79019486332027 394.6705226192935,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.469999999999999,0.9875000000000003 6.245,-2.4050000000000002" data-type="line" data-label="" points="159.72732906424295,276.79019486332027 562.9828547820698,433.76602630310543" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.469999999999999,0.9875000000000003 3.9924999999999997,-0.78" data-type="line" data-label="" points="159.72732906424295,276.79019486332027 458.75645527783513,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6075,-0.78 6.245,-2.4050000000000002" data-type="line" data-label="" points="394.6705226192935,358.57495007918476 562.9828547820698,433.76602630310543" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6075,-0.78 3.9924999999999997,-0.78" data-type="line" data-label="" points="394.6705226192935,358.57495007918476 458.75645527783513,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="6.245,-2.4050000000000002 3.9924999999999997,-0.78" data-type="line" data-label="" points="562.9828547820698,433.76602630310543 458.75645527783513,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2850000000000001,0.1 2.6075,-0.019999999999999907" data-type="line" data-label="" points="333.4765544309027,317.85609033946156 394.6705226192935,323.4086621221511" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2850000000000001,0.1 6.245,-0.07500000000000018" data-type="line" data-label="" points="333.4765544309027,317.85609033946156 562.9828547820698,325.9535908558838" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2850000000000001,0.1 3.9924999999999997,-0.019999999999999907" data-type="line" data-label="" points="333.4765544309027,317.85609033946156 458.75645527783513,323.4086621221511" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6075,-0.019999999999999907 6.245,-0.07500000000000018" data-type="line" data-label="" points="394.6705226192935,323.4086621221511 562.9828547820698,325.9535908558838" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6075,-0.019999999999999907 3.9924999999999997,-0.019999999999999907" data-type="line" data-label="" points="394.6705226192935,323.4086621221511 458.75645527783513,323.4086621221511" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="6.245,-0.07500000000000018 3.9924999999999997,-0.019999999999999907" data-type="line" data-label="" points="562.9828547820698,325.9535908558838 458.75645527783513,323.4086621221511" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="6.245,-1.205 6.245,-1.8050000000000006" data-type="line" data-label="" points="562.9828547820698,378.2403084762102 562.9828547820698,406.00316738965785" fill="none" stroke="hsl(187, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,-0.2 -1.485,-0.2 -1.485,0.2 -1.2850000000000001,0.2" data-type="line" data-label="" points="214.55897541830194,331.7375197961854 205.30468911381942,331.7375197961854 205.30468911381942,313.2289471872203 214.55897541830194,313.2289471872203" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.2850000000000001,0 -2.469999999999999,0 -2.469999999999999,0.9875000000000003" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 159.72732906424295,322.48323349170283 159.72732906424295,276.79019486332027" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.9924999999999997,-0.78 3.9924999999999997,-0.9800000000000002 2.6075,-0.9800000000000002 2.6075,-0.78" data-type="line" data-label="" points="458.75645527783513,358.57495007918476 458.75645527783513,367.8292363836673 394.6705226192935,367.8292363836673 394.6705226192935,358.57495007918476" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.9924999999999997,-0.019999999999999907 3.9924999999999997,0.18000000000000027 2.6075,0.18000000000000027 2.6075,-0.019999999999999907" data-type="line" data-label="" points="458.75645527783513,323.4086621221511 458.75645527783513,314.15437581766855 394.6705226192935,314.15437581766855 394.6705226192935,323.4086621221511" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.2850000000000001,0.1 2.6075,0.1 2.6075,-0.019999999999999907" data-type="line" data-label="" points="333.4765544309027,317.85609033946156 394.6705226192935,317.85609033946156 394.6705226192935,323.4086621221511" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="6.245,-0.07500000000000007 6.245,0.18000000000000027 3.9924999999999997,0.18000000000000027 3.9924999999999997,-0.019999999999999907" data-type="line" data-label="" points="562.9828547820698,325.9535908558838 562.9828547820698,314.15437581766855 458.75645527783513,314.15437581766855 458.75645527783513,323.4086621221511" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="6.245,-1.205 6.245,-1.8050000000000006" data-type="line" data-label="" points="562.9828547820698,378.2403084762102 562.9828547820698,406.00316738965785" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4.532499999999999,1.8875000000000002 -4.532499999999999,2.473333333333333 -2.8508333333333327,2.473333333333333" data-type="line" data-label="" points="64.29250154926669,235.1459064931488 64.29250154926669,208.0385595262687 142.1056255594574,208.0385595262687" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4.532499999999999,0.8475000000000001 -4.532499999999999,-0.20000000000000018 -1.2850000000000001,-0.20000000000000018" data-type="line" data-label="" points="64.29250154926669,283.2681952764581 64.29250154926669,331.7375197961854 214.55897541830194,331.7375197961854" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.6508333333333325,2.473333333333333 -2.8508333333333327,2.473333333333333 -2.8508333333333327,1.8933333333333333 -1.3208333333333324,1.8933333333333333 -1.3208333333333324,2.473333333333333 -1.5208333333333326,2.473333333333333" data-type="line" data-label="" points="151.35991186393994,208.0385595262687 142.1056255594574,208.0385595262687 142.1056255594574,234.87598980926808 212.90091578874888,234.87598980926808 212.90091578874888,208.0385595262687 203.64662948426633,208.0385595262687" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.469999999999999,1.7475 -2.469999999999999,1.8485 -2.9209999999999985,1.8485" data-type="line" data-label="" points="159.72732906424295,241.6239069062866 159.72732906424295,236.9504923225229 138.85891344763482,236.9504923225229" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.8774999999999995,0 -4.817499999999998,0 -4.817499999999998,-0.051000000000000004" data-type="line" data-label="" points="187.14315224127245,322.48323349170283 51.10514356537911,322.48323349170283 51.10514356537911,324.8430764993459" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-4.432499999999998" data-y="1.3675000000000002" x="51.79921503821528" y="235.1459064931488" width="34.24085932658542" height="48.12228878330927" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="-2.0858333333333325" data-y="2.513333333333333" x="151.35991186393994" y="186.75370102595883" width="52.286717620326385" height="38.868002478826696" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="0" data-y="0" x="214.55897541830194" y="308.601804034979" width="118.91757901260075" height="27.762858913447644" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="-2.397499999999999" data-y="1.3675000000000002" x="138.90518487915722" y="241.6239069062866" width="48.353645940921325" height="35.16628795703366" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="2.6799999999999997" data-y="-0.39999999999999997" x="373.8483784342077" y="323.4086621221511" width="48.35364594092135" height="35.16628795703366" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="6.4825" data-y="-0.6400000000000001" x="547.9446395372856" y="325.9535908558838" width="52.05536046271436" height="52.286717620326385" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_6" data-x="6.4025" data-y="-2.1050000000000004" x="547.9446395372856" y="406.00316738965785" width="44.65193141912823" height="27.762858913447587" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_7" data-x="4.005" data-y="-0.39999999999999997" x="437.93431109274934" y="323.4086621221511" width="42.80107415823181" height="35.16628795703366" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="AP2112K-3.3" data-x="-0.2250000000000001" data-y="-0.43" x="233.06754802726704" y="338.21552020932313" width="61.0782896095848" height="8.328857674034339" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="U2" data-x="-0.765" data-y="0.41500000000000004" x="230.2912621359223" y="297.4966604696" width="16.657715348068564" height="11.567857880603128" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: VBUS
|
|
1
|
+
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-2.6508333333333325,2.473333333333333 -4.532499999999999,1.8875000000000002" data-type="line" data-label="" points="151.35991186393994,208.0385595262687 64.29250154926669,235.1459064931488" fill="none" stroke="hsl(32, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-4.532499999999999,1.8875000000000002 -1.5208333333333326,2.473333333333333" data-type="line" data-label="" points="64.29250154926669,235.1459064931488 203.64662948426633,208.0385595262687" fill="none" stroke="hsl(170, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.532499999999999,1.8875000000000002 -2.6508333333333325,2.473333333333333" data-type="line" data-label="" points="64.29250154926669,235.1459064931488 151.35991186393994,208.0385595262687" fill="none" stroke="hsl(170, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.5208333333333326,2.473333333333333 -2.6508333333333325,2.473333333333333" data-type="line" data-label="" points="203.64662948426633,208.0385595262687 151.35991186393994,208.0385595262687" fill="none" stroke="hsl(170, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.532499999999999,0.8475000000000001 -1.2850000000000001,0.2" data-type="line" data-label="" points="64.29250154926669,283.2681952764581 214.55897541830194,313.2289471872203" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.532499999999999,0.8475000000000001 -1.2850000000000001,-0.2" data-type="line" data-label="" points="64.29250154926669,283.2681952764581 214.55897541830194,331.7375197961854" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.532499999999999,0.8475000000000001 -2.469999999999999,1.7475" data-type="line" data-label="" points="64.29250154926669,283.2681952764581 159.72732906424295,241.6239069062866" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0.2 -1.2850000000000001,-0.2" data-type="line" data-label="" points="214.55897541830194,313.2289471872203 214.55897541830194,331.7375197961854" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0.2 -2.469999999999999,1.7475" data-type="line" data-label="" points="214.55897541830194,313.2289471872203 159.72732906424295,241.6239069062866" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,-0.2 -2.469999999999999,1.7475" data-type="line" data-label="" points="214.55897541830194,331.7375197961854 159.72732906424295,241.6239069062866" fill="none" stroke="hsl(264, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0 -2.469999999999999,0.9875000000000003" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 159.72732906424295,276.79019486332027" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0 2.6075,-0.78" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 394.6705226192935,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0 6.245,-2.4050000000000002" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 562.9828547820698,433.76602630310543" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,0 3.9924999999999997,-0.78" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 458.75645527783513,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.469999999999999,0.9875000000000003 2.6075,-0.78" data-type="line" data-label="" points="159.72732906424295,276.79019486332027 394.6705226192935,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.469999999999999,0.9875000000000003 6.245,-2.4050000000000002" data-type="line" data-label="" points="159.72732906424295,276.79019486332027 562.9828547820698,433.76602630310543" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.469999999999999,0.9875000000000003 3.9924999999999997,-0.78" data-type="line" data-label="" points="159.72732906424295,276.79019486332027 458.75645527783513,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6075,-0.78 6.245,-2.4050000000000002" data-type="line" data-label="" points="394.6705226192935,358.57495007918476 562.9828547820698,433.76602630310543" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6075,-0.78 3.9924999999999997,-0.78" data-type="line" data-label="" points="394.6705226192935,358.57495007918476 458.75645527783513,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="6.245,-2.4050000000000002 3.9924999999999997,-0.78" data-type="line" data-label="" points="562.9828547820698,433.76602630310543 458.75645527783513,358.57495007918476" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2850000000000001,0.1 2.6075,-0.019999999999999907" data-type="line" data-label="" points="333.4765544309027,317.85609033946156 394.6705226192935,323.4086621221511" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2850000000000001,0.1 6.245,-0.07500000000000018" data-type="line" data-label="" points="333.4765544309027,317.85609033946156 562.9828547820698,325.9535908558838" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2850000000000001,0.1 3.9924999999999997,-0.019999999999999907" data-type="line" data-label="" points="333.4765544309027,317.85609033946156 458.75645527783513,323.4086621221511" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6075,-0.019999999999999907 6.245,-0.07500000000000018" data-type="line" data-label="" points="394.6705226192935,323.4086621221511 562.9828547820698,325.9535908558838" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6075,-0.019999999999999907 3.9924999999999997,-0.019999999999999907" data-type="line" data-label="" points="394.6705226192935,323.4086621221511 458.75645527783513,323.4086621221511" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="6.245,-0.07500000000000018 3.9924999999999997,-0.019999999999999907" data-type="line" data-label="" points="562.9828547820698,325.9535908558838 458.75645527783513,323.4086621221511" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="6.245,-1.205 6.245,-1.8050000000000006" data-type="line" data-label="" points="562.9828547820698,378.2403084762102 562.9828547820698,406.00316738965785" fill="none" stroke="hsl(187, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.2850000000000001,-0.2 -1.485,-0.2 -1.485,0.2 -1.2850000000000001,0.2" data-type="line" data-label="" points="214.55897541830194,331.7375197961854 205.30468911381942,331.7375197961854 205.30468911381942,313.2289471872203 214.55897541830194,313.2289471872203" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.2850000000000001,0 -2.469999999999999,0 -2.469999999999999,0.9875000000000003" data-type="line" data-label="" points="214.55897541830194,322.48323349170283 159.72732906424295,322.48323349170283 159.72732906424295,276.79019486332027" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.9924999999999997,-0.78 3.9924999999999997,-0.9800000000000002 2.6075,-0.9800000000000002 2.6075,-0.78" data-type="line" data-label="" points="458.75645527783513,358.57495007918476 458.75645527783513,367.8292363836673 394.6705226192935,367.8292363836673 394.6705226192935,358.57495007918476" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.9924999999999997,-0.019999999999999907 3.9924999999999997,0.1 2.6075,0.1 2.6075,-0.019999999999999907" data-type="line" data-label="" points="458.75645527783513,323.4086621221511 458.75645527783513,317.85609033946156 394.6705226192935,317.85609033946156 394.6705226192935,323.4086621221511" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.2850000000000001,0.1 2.6075,0.1 2.6075,-0.019999999999999907" data-type="line" data-label="" points="333.4765544309027,317.85609033946156 394.6705226192935,317.85609033946156 394.6705226192935,323.4086621221511" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="6.245,-0.07500000000000018 6.245,0.1 3.9924999999999997,0.1 3.9924999999999997,-0.019999999999999907" data-type="line" data-label="" points="562.9828547820698,325.9535908558838 562.9828547820698,317.85609033946156 458.75645527783513,317.85609033946156 458.75645527783513,323.4086621221511" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="6.245,-1.205 6.245,-1.8050000000000006" data-type="line" data-label="" points="562.9828547820698,378.2403084762102 562.9828547820698,406.00316738965785" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4.532499999999999,1.8875000000000002 -4.532499999999999,2.473333333333333 -2.8508333333333327,2.473333333333333" data-type="line" data-label="" points="64.29250154926669,235.1459064931488 64.29250154926669,208.0385595262687 142.1056255594574,208.0385595262687" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4.532499999999999,0.8475000000000001 -4.532499999999999,-0.20000000000000018 -1.2850000000000001,-0.20000000000000018" data-type="line" data-label="" points="64.29250154926669,283.2681952764581 64.29250154926669,331.7375197961854 214.55897541830194,331.7375197961854" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.6508333333333325,2.473333333333333 -2.8508333333333327,2.473333333333333 -2.8508333333333327,1.8933333333333333 -1.3208333333333324,1.8933333333333333 -1.3208333333333324,2.473333333333333 -1.5208333333333326,2.473333333333333" data-type="line" data-label="" points="151.35991186393994,208.0385595262687 142.1056255594574,208.0385595262687 142.1056255594574,234.87598980926808 212.90091578874888,234.87598980926808 212.90091578874888,208.0385595262687 203.64662948426633,208.0385595262687" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.469999999999999,1.7475 -2.469999999999999,1.8485 -2.9209999999999985,1.8485" data-type="line" data-label="" points="159.72732906424295,241.6239069062866 159.72732906424295,236.9504923225229 138.85891344763482,236.9504923225229" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.8774999999999995,0 -4.817499999999998,0 -4.817499999999998,-0.051000000000000004" data-type="line" data-label="" points="187.14315224127245,322.48323349170283 51.10514356537911,322.48323349170283 51.10514356537911,324.8430764993459" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-4.432499999999998" data-y="1.3675000000000002" x="51.79921503821528" y="235.1459064931488" width="34.24085932658542" height="48.12228878330927" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="-2.0858333333333325" data-y="2.513333333333333" x="151.35991186393994" y="186.75370102595883" width="52.286717620326385" height="38.868002478826696" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="0" data-y="0" x="214.55897541830194" y="308.601804034979" width="118.91757901260075" height="27.762858913447644" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="-2.397499999999999" data-y="1.3675000000000002" x="138.90518487915722" y="241.6239069062866" width="48.353645940921325" height="35.16628795703366" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="2.6799999999999997" data-y="-0.39999999999999997" x="373.8483784342077" y="323.4086621221511" width="48.35364594092135" height="35.16628795703366" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="6.4825" data-y="-0.6400000000000001" x="547.9446395372856" y="325.9535908558838" width="52.05536046271436" height="52.286717620326385" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_6" data-x="6.4025" data-y="-2.1050000000000004" x="547.9446395372856" y="406.00316738965785" width="44.65193141912823" height="27.762858913447587" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="schematic_component_7" data-x="4.005" data-y="-0.39999999999999997" x="437.93431109274934" y="323.4086621221511" width="42.80107415823181" height="35.16628795703366" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="AP2112K-3.3" data-x="-0.2250000000000001" data-y="-0.43" x="233.06754802726704" y="338.21552020932313" width="61.0782896095848" height="8.328857674034339" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="U2" data-x="-0.765" data-y="0.41500000000000004" x="230.2912621359223" y="297.4966604696" width="16.657715348068564" height="11.567857880603128" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: VBUS
|
|
2
2
|
globalConnNetId: connectivity_net0" data-x="-4.532499999999999" data-y="2.683333333333333" x="50.41107209254287" y="188.60455828685537" width="27.762858913447644" height="19.434001239413334" fill="#ef444466" stroke="#ef4444" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: RAW
|
|
3
3
|
globalConnNetId: connectivity_net1" data-x="-4.772499999999999" data-y="0.32375" x="42.08221441850857" y="302.8757143840804" width="22.210287130758132" height="9.254286304482548" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: RAW
|
|
4
4
|
globalConnNetId: connectivity_net1" data-x="-3.1609999999999987" data-y="1.8485" x="116.64862631687667" y="232.32334917028163" width="22.210287130758132" height="9.254286304482548" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
5
5
|
globalConnNetId: connectivity_net2" data-x="-4.817499999999998" data-y="-0.261" x="40.00000000000004" y="324.8430764993459" width="22.210287130758132" height="19.434001239413305" fill="#00000066" stroke="#000000" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
6
6
|
globalConnNetId: connectivity_net2" data-x="3.9924999999999997" data-y="-1.1900000000000002" x="447.65131171245605" y="367.8292363836673" width="22.21028713075816" height="19.434001239413362" fill="#00000066" stroke="#000000" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
7
7
|
globalConnNetId: connectivity_net2" data-x="6.245" data-y="-2.616" x="551.8777112166907" y="433.8122977346278" width="22.21028713075816" height="19.434001239413362" fill="#00000066" stroke="#000000" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: V3V3
|
|
8
|
-
globalConnNetId: connectivity_net3" data-x="3.9924999999999997" data-y="0.
|
|
8
|
+
globalConnNetId: connectivity_net3" data-x="3.9924999999999997" data-y="0.30999999999999994" x="444.8750258211113" y="298.4220891000482" width="27.762858913447644" height="19.434001239413362" fill="#ef444466" stroke="#ef4444" stroke-width="0.02161160714285714"/></g><g><rect data-type="rect" data-label="netId: PWR_LED_K
|
|
9
9
|
globalConnNetId: connectivity_net4" data-x="5.6450000000000005" data-y="-1.5050000000000003" x="507.4571369551745" y="387.49459478069275" width="55.52571782689529" height="9.254286304482548" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.02161160714285714"/></g><g><circle data-type="point" data-label="schematic_port_0
|
|
10
10
|
y+" data-x="-4.532499999999999" data-y="1.8875000000000002" cx="64.29250154926669" cy="235.1459064931488" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_1
|
|
11
11
|
y-" data-x="-4.532499999999999" data-y="0.8475000000000001" cx="64.29250154926669" cy="283.2681952764581" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_2
|
|
@@ -32,7 +32,7 @@ orientation: x-" data-x="-2.9209999999999985" data-y="1.8485" cx="138.8589134476
|
|
|
32
32
|
orientation: y-" data-x="-4.817499999999998" data-y="-0.051000000000000004" cx="51.10514356537911" cy="324.8430764993459" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
33
33
|
orientation: y-" data-x="3.9924999999999997" data-y="-0.9800000000000002" cx="458.75645527783513" cy="367.8292363836673" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
34
34
|
orientation: y-" data-x="6.245" data-y="-2.4050000000000002" cx="562.9828547820698" cy="433.76602630310543" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
35
|
-
orientation: y+" data-x="3.9924999999999997" data-y="0.
|
|
35
|
+
orientation: y+" data-x="3.9924999999999997" data-y="0.1" cx="458.75645527783513" cy="317.85609033946156" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
36
36
|
orientation: x-" data-x="6.245" data-y="-1.5050000000000003" cx="562.9828547820698" cy="392.121737932934" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
|
|
37
37
|
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
38
38
|
const svg = e.currentTarget;
|
|
@@ -1,12 +1,51 @@
|
|
|
1
1
|
import { expect, test } from "bun:test"
|
|
2
|
+
import { tracePathContainsPoint } from "lib/solvers/RailNetLabelCornerPlacementSolver/geometry"
|
|
2
3
|
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
4
|
import inputProblem from "./bug-report-20260815T073240Z.json"
|
|
4
5
|
import "tests/fixtures/matcher"
|
|
5
6
|
|
|
7
|
+
const V3V3_TRACE_IDS = [
|
|
8
|
+
"schematic_port_8-schematic_port_11",
|
|
9
|
+
"schematic_port_17-schematic_port_11",
|
|
10
|
+
"schematic_port_13-schematic_port_17",
|
|
11
|
+
]
|
|
12
|
+
|
|
6
13
|
test("bug-report-20260815T073240Z", () => {
|
|
7
14
|
const solver = new SchematicTracePipelineSolver(inputProblem as any)
|
|
8
15
|
|
|
9
16
|
solver.solve()
|
|
10
17
|
|
|
18
|
+
const junctionOutput = solver.sameNetJunctionAlignmentSolver!.getOutput()
|
|
19
|
+
const v3V3Label = junctionOutput.netLabelPlacements.find(
|
|
20
|
+
(label) => label.netId === "V3V3",
|
|
21
|
+
)!
|
|
22
|
+
const v3V3Traces = V3V3_TRACE_IDS.map(
|
|
23
|
+
(traceId) =>
|
|
24
|
+
junctionOutput.traces.find((trace) => trace.mspPairId === traceId)!,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
expect(
|
|
28
|
+
solver.sameNetJunctionAlignmentSolver!.stats.alignedJunctionCount,
|
|
29
|
+
).toBe(2)
|
|
30
|
+
expect(
|
|
31
|
+
tracePathContainsPoint(v3V3Traces[1]!.tracePath, v3V3Label.anchorPoint),
|
|
32
|
+
).toBe(true)
|
|
33
|
+
for (const trace of v3V3Traces) {
|
|
34
|
+
expect(
|
|
35
|
+
trace.tracePath.some(
|
|
36
|
+
(point, index) =>
|
|
37
|
+
point.y === v3V3Label.anchorPoint.y &&
|
|
38
|
+
trace.tracePath[index + 1]?.y === v3V3Label.anchorPoint.y,
|
|
39
|
+
),
|
|
40
|
+
).toBe(true)
|
|
41
|
+
expect(
|
|
42
|
+
trace.tracePath.every(
|
|
43
|
+
(point, index, path) =>
|
|
44
|
+
index === 0 ||
|
|
45
|
+
point.x === path[index - 1]!.x ||
|
|
46
|
+
point.y === path[index - 1]!.y,
|
|
47
|
+
),
|
|
48
|
+
).toBe(true)
|
|
49
|
+
}
|
|
11
50
|
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
12
51
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-1.6750000000000007,-5.593455349999998 -1.6750000000000007,-5.193455349999998" data-type="line" data-label="" points="339.2947103274559,344.78589420654913 339.2947103274559,324.63476070528964" fill="none" stroke="hsl(344, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-1.6750000000000007,-5.393455349999998 -4.135000000000001,-6.073455349999998" data-type="line" data-label="" points="339.2947103274559,334.71032745591936 215.36523929471034,368.9672544080604" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.393455349999998 -2.8950000000000005,-6.073455349999998" data-type="line" data-label="" points="339.2947103274559,334.71032745591936 277.8337531486146,368.9672544080604" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.393455349999998 1.544999999999999,-6.1734553499999985" data-type="line" data-label="" points="339.2947103274559,334.71032745591936 501.51133501259443,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.393455349999998 2.7849999999999993,-6.1734553499999985" data-type="line" data-label="" points="339.2947103274559,334.71032745591936 563.9798488664987,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-6.073455349999998 -2.8950000000000005,-6.073455349999998" data-type="line" data-label="" points="215.36523929471034,368.9672544080604 277.8337531486146,368.9672544080604" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-6.073455349999998 1.544999999999999,-6.1734553499999985" data-type="line" data-label="" points="215.36523929471034,368.9672544080604 501.51133501259443,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-6.073455349999998 2.7849999999999993,-6.1734553499999985" data-type="line" data-label="" points="215.36523929471034,368.9672544080604 563.9798488664987,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.8950000000000005,-6.073455349999998 1.544999999999999,-6.1734553499999985" data-type="line" data-label="" points="277.8337531486146,368.9672544080604 501.51133501259443,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.8950000000000005,-6.073455349999998 2.7849999999999993,-6.1734553499999985" data-type="line" data-label="" points="277.8337531486146,368.9672544080604 563.9798488664987,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.544999999999999,-6.1734553499999985 2.7849999999999993,-6.1734553499999985" data-type="line" data-label="" points="501.51133501259443,374.0050377833753 563.9798488664987,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.655000000000001,-4.030455349999999 -1.6750000000000007,-5.193455349999998" data-type="line" data-label="" points="189.16876574307304,266.04534005037783 339.2947103274559,324.63476070528964" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.655000000000001,-4.030455349999999 -1.6750000000000007,-5.593455349999998" data-type="line" data-label="" points="189.16876574307304,266.04534005037783 339.2947103274559,344.78589420654913" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.655000000000001,-4.030455349999999 -4.135000000000001,-5.313455349999998" data-type="line" data-label="" points="189.16876574307304,266.04534005037783 215.36523929471034,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.655000000000001,-4.030455349999999 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="189.16876574307304,266.04534005037783 277.8337531486146,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.193455349999998 -1.6750000000000007,-5.593455349999998" data-type="line" data-label="" points="339.2947103274559,324.63476070528964 339.2947103274559,344.78589420654913" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.193455349999998 -4.135000000000001,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,324.63476070528964 215.36523929471034,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.193455349999998 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,324.63476070528964 277.8337531486146,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.593455349999998 -4.135000000000001,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,344.78589420654913 215.36523929471034,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.593455349999998 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,344.78589420654913 277.8337531486146,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-5.313455349999998 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="215.36523929471034,330.68010075566747 277.8337531486146,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.3249999999999993,-5.293455349999999 1.544999999999999,-5.413455349999999" data-type="line" data-label="" points="440.05037783375315,329.67254408060455 501.51133501259443,335.7178841309824" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.3249999999999993,-5.293455349999999 2.7849999999999993,-5.413455349999999" data-type="line" data-label="" points="440.05037783375315,329.67254408060455 563.9798488664987,335.7178841309824" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.544999999999999,-5.413455349999999 2.7849999999999993,-5.413455349999999" data-type="line" data-label="" points="501.51133501259443,335.7178841309824 563.9798488664987,335.7178841309824" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-5.313455349999998 -4.135000000000001,-4.030455349999999 -4.655000000000001,-4.030455349999999" data-type="line" data-label="" points="215.36523929471034,330.68010075566747 215.36523929471034,266.04534005037783 189.16876574307304,266.04534005037783" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.8950000000000005,-5.313455349999998 -2.8950000000000005,-5.193455349999998 -4.135000000000001,-5.193455349999998 -4.135000000000001,-5.313455349999998" data-type="line" data-label="" points="277.8337531486146,330.68010075566747 277.8337531486146,324.63476070528964 215.36523929471034,324.63476070528964 215.36523929471034,330.68010075566747" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.6750000000000007,-5.193455349999998 -2.8950000000000005,-5.193455349999998 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,324.63476070528964 277.8337531486146,324.63476070528964 277.8337531486146,330.68010075566747" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.6750000000000007,-5.593455349999998 -1.8750000000000007,-5.593455349999998 -1.8750000000000007,-5.193455349999998 -1.6750000000000007,-5.193455349999998" data-type="line" data-label="" points="339.2947103274559,344.78589420654913 329.2191435768262,344.78589420654913 329.2191435768262,324.63476070528964 339.2947103274559,324.63476070528964" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.8950000000000005,-6.073455349999998 -2.8950000000000005,-6.273455349999998 -1.9799999999999998,-6.273455349999998 -1.9799999999999998,-5.393455349999998 -1.6750000000000007,-5.393455349999998" data-type="line" data-label="" points="277.8337531486146,368.9672544080604 277.8337531486146,379.0428211586901 323.92947103274565,379.0428211586901 323.92947103274565,334.71032745591936 339.2947103274559,334.71032745591936" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4.135000000000001,-6.073455349999998 -4.135000000000001,-6.273455349999998 -2.8950000000000005,-6.273455349999998 -2.8950000000000005,-6.073455349999998" data-type="line" data-label="" points="215.36523929471034,368.9672544080604 215.36523929471034,379.0428211586901 277.8337531486146,379.0428211586901 277.8337531486146,368.9672544080604" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.7849999999999993,-6.1734553499999985 2.7849999999999993,-6.373455349999999 1.544999999999999,-6.373455349999999 1.544999999999999,-6.1734553499999985" data-type="line" data-label="" points="563.9798488664987,374.0050377833753 563.9798488664987,384.08060453400503 501.51133501259443,384.08060453400503 501.51133501259443,374.0050377833753" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.544999999999999,-5.413455349999999 1.544999999999999,-5.293455349999999 0.3249999999999993,-5.293455349999999" data-type="line" data-label="" points="501.51133501259443,335.7178841309824 501.51133501259443,329.67254408060455 440.05037783375315,329.67254408060455" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.7849999999999993,-5.413455349999999 2.7849999999999993,-5.2134553499999985 1.544999999999999,-5.2134553499999985 1.544999999999999,-5.413455349999999" data-type="line" data-label="" points="563.9798488664987,335.7178841309824 563.9798488664987,325.64231738035267 501.51133501259443,325.64231738035267 501.51133501259443,335.7178841309824" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-6.655000000000001,-4.030455349999999 -7.136000000000002,-4.030455349999999 -7.136000000000002,-3.829455349999998" data-type="line" data-label="" points="88.41309823677585,266.04534005037783 64.18136020151132,266.04534005037783 64.18136020151132,255.91939546599494" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="-5.655000000000001" data-y="-4.030455349999999" x="88.41309823677585" y="255.9697732997481" width="100.75566750629719" height="20.151133501259437" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="-0.6750000000000007" data-y="-5.393455349999998" x="339.29471032745596" y="319.5969773299748" width="100.75566750629724" height="30.226700251889156" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="-4.000000000000001" data-y="-5.693455349999998" x="198.99244332493703" y="330.68010075566747" width="46.347607052896734" height="38.28715365239293" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_6" data-x="-2.7" data-y="-5.693455349999998" x="261.46095717884134" y="330.68010075566747" width="52.392947103274594" height="38.28715365239293" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_7" data-x="1.6799999999999988" data-y="-5.793455349999999" x="485.13853904282115" y="335.7178841309824" width="46.347607052896706" height="38.28715365239293" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_8" data-x="2.9799999999999995" data-y="-5.793455349999999" x="547.6070528967255" y="335.7178841309824" width="52.39294710327465" height="38.28715365239293" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="BSMD1206_200_12V" data-x="-5.295000000000001" data-y="-4.360455349999999" x="108.56423173803528" y="278.1360201511335" width="96.72544080604533" height="9.068010075566747" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="2A PTC" data-x="-5.895000000000001" data-y="-3.7154553499999983" x="105.54156171284637" y="243.87909319899245" width="42.31738035264482" height="12.59445843828712" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="AP2112K_3_3TRG1" data-x="-0.3750000000000009" data-y="-5.823455349999998" x="359.4458438287153" y="351.83879093198993" width="90.68010075566752" height="9.068010075566747" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="AP2112K-3.3" data-x="-0.6150000000000009" data-y="-4.978455349999999" x="356.4231738035264" y="307.5062972292192" width="72.54408060453397" height="12.59445843828712" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="netId: VBUS_5V
|
|
1
|
+
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-1.6750000000000007,-5.593455349999998 -1.6750000000000007,-5.193455349999998" data-type="line" data-label="" points="339.2947103274559,344.78589420654913 339.2947103274559,324.63476070528964" fill="none" stroke="hsl(344, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-1.6750000000000007,-5.393455349999998 -4.135000000000001,-6.073455349999998" data-type="line" data-label="" points="339.2947103274559,334.71032745591936 215.36523929471034,368.9672544080604" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.393455349999998 -2.8950000000000005,-6.073455349999998" data-type="line" data-label="" points="339.2947103274559,334.71032745591936 277.8337531486146,368.9672544080604" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.393455349999998 1.544999999999999,-6.1734553499999985" data-type="line" data-label="" points="339.2947103274559,334.71032745591936 501.51133501259443,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.393455349999998 2.7849999999999993,-6.1734553499999985" data-type="line" data-label="" points="339.2947103274559,334.71032745591936 563.9798488664987,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-6.073455349999998 -2.8950000000000005,-6.073455349999998" data-type="line" data-label="" points="215.36523929471034,368.9672544080604 277.8337531486146,368.9672544080604" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-6.073455349999998 1.544999999999999,-6.1734553499999985" data-type="line" data-label="" points="215.36523929471034,368.9672544080604 501.51133501259443,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-6.073455349999998 2.7849999999999993,-6.1734553499999985" data-type="line" data-label="" points="215.36523929471034,368.9672544080604 563.9798488664987,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.8950000000000005,-6.073455349999998 1.544999999999999,-6.1734553499999985" data-type="line" data-label="" points="277.8337531486146,368.9672544080604 501.51133501259443,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.8950000000000005,-6.073455349999998 2.7849999999999993,-6.1734553499999985" data-type="line" data-label="" points="277.8337531486146,368.9672544080604 563.9798488664987,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.544999999999999,-6.1734553499999985 2.7849999999999993,-6.1734553499999985" data-type="line" data-label="" points="501.51133501259443,374.0050377833753 563.9798488664987,374.0050377833753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.655000000000001,-4.030455349999999 -1.6750000000000007,-5.193455349999998" data-type="line" data-label="" points="189.16876574307304,266.04534005037783 339.2947103274559,324.63476070528964" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.655000000000001,-4.030455349999999 -1.6750000000000007,-5.593455349999998" data-type="line" data-label="" points="189.16876574307304,266.04534005037783 339.2947103274559,344.78589420654913" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.655000000000001,-4.030455349999999 -4.135000000000001,-5.313455349999998" data-type="line" data-label="" points="189.16876574307304,266.04534005037783 215.36523929471034,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.655000000000001,-4.030455349999999 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="189.16876574307304,266.04534005037783 277.8337531486146,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.193455349999998 -1.6750000000000007,-5.593455349999998" data-type="line" data-label="" points="339.2947103274559,324.63476070528964 339.2947103274559,344.78589420654913" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.193455349999998 -4.135000000000001,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,324.63476070528964 215.36523929471034,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.193455349999998 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,324.63476070528964 277.8337531486146,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.593455349999998 -4.135000000000001,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,344.78589420654913 215.36523929471034,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.6750000000000007,-5.593455349999998 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,344.78589420654913 277.8337531486146,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-5.313455349999998 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="215.36523929471034,330.68010075566747 277.8337531486146,330.68010075566747" fill="none" stroke="hsl(309, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.3249999999999993,-5.293455349999999 1.544999999999999,-5.413455349999999" data-type="line" data-label="" points="440.05037783375315,329.67254408060455 501.51133501259443,335.7178841309824" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.3249999999999993,-5.293455349999999 2.7849999999999993,-5.413455349999999" data-type="line" data-label="" points="440.05037783375315,329.67254408060455 563.9798488664987,335.7178841309824" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.544999999999999,-5.413455349999999 2.7849999999999993,-5.413455349999999" data-type="line" data-label="" points="501.51133501259443,335.7178841309824 563.9798488664987,335.7178841309824" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.135000000000001,-5.313455349999998 -4.135000000000001,-4.030455349999999 -4.655000000000001,-4.030455349999999" data-type="line" data-label="" points="215.36523929471034,330.68010075566747 215.36523929471034,266.04534005037783 189.16876574307304,266.04534005037783" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.8950000000000005,-5.313455349999998 -2.8950000000000005,-5.193455349999998 -4.135000000000001,-5.193455349999998 -4.135000000000001,-5.313455349999998" data-type="line" data-label="" points="277.8337531486146,330.68010075566747 277.8337531486146,324.63476070528964 215.36523929471034,324.63476070528964 215.36523929471034,330.68010075566747" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.6750000000000007,-5.193455349999998 -2.8950000000000005,-5.193455349999998 -2.8950000000000005,-5.313455349999998" data-type="line" data-label="" points="339.2947103274559,324.63476070528964 277.8337531486146,324.63476070528964 277.8337531486146,330.68010075566747" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.6750000000000007,-5.593455349999998 -1.8750000000000007,-5.593455349999998 -1.8750000000000007,-5.193455349999998 -1.6750000000000007,-5.193455349999998" data-type="line" data-label="" points="339.2947103274559,344.78589420654913 329.2191435768262,344.78589420654913 329.2191435768262,324.63476070528964 339.2947103274559,324.63476070528964" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.8950000000000005,-6.073455349999998 -2.8950000000000005,-6.273455349999998 -1.9799999999999998,-6.273455349999998 -1.9799999999999998,-5.393455349999998 -1.6750000000000007,-5.393455349999998" data-type="line" data-label="" points="277.8337531486146,368.9672544080604 277.8337531486146,379.0428211586901 323.92947103274565,379.0428211586901 323.92947103274565,334.71032745591936 339.2947103274559,334.71032745591936" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4.135000000000001,-6.073455349999998 -4.135000000000001,-6.273455349999998 -2.8950000000000005,-6.273455349999998 -2.8950000000000005,-6.073455349999998" data-type="line" data-label="" points="215.36523929471034,368.9672544080604 215.36523929471034,379.0428211586901 277.8337531486146,379.0428211586901 277.8337531486146,368.9672544080604" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.7849999999999993,-6.1734553499999985 2.7849999999999993,-6.373455349999999 1.544999999999999,-6.373455349999999 1.544999999999999,-6.1734553499999985" data-type="line" data-label="" points="563.9798488664987,374.0050377833753 563.9798488664987,384.08060453400503 501.51133501259443,384.08060453400503 501.51133501259443,374.0050377833753" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.544999999999999,-5.413455349999999 1.544999999999999,-5.293455349999999 0.3249999999999993,-5.293455349999999" data-type="line" data-label="" points="501.51133501259443,335.7178841309824 501.51133501259443,329.67254408060455 440.05037783375315,329.67254408060455" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.7849999999999993,-5.413455349999999 2.7849999999999993,-5.293455349999999 1.544999999999999,-5.293455349999999 1.544999999999999,-5.413455349999999" data-type="line" data-label="" points="563.9798488664987,335.7178841309824 563.9798488664987,329.67254408060455 501.51133501259443,329.67254408060455 501.51133501259443,335.7178841309824" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-6.655000000000001,-4.030455349999999 -7.136000000000002,-4.030455349999999 -7.136000000000002,-3.829455349999998" data-type="line" data-label="" points="88.41309823677585,266.04534005037783 64.18136020151132,266.04534005037783 64.18136020151132,255.91939546599494" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="-5.655000000000001" data-y="-4.030455349999999" x="88.41309823677585" y="255.9697732997481" width="100.75566750629719" height="20.151133501259437" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="-0.6750000000000007" data-y="-5.393455349999998" x="339.29471032745596" y="319.5969773299748" width="100.75566750629724" height="30.226700251889156" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="-4.000000000000001" data-y="-5.693455349999998" x="198.99244332493703" y="330.68010075566747" width="46.347607052896734" height="38.28715365239293" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_6" data-x="-2.7" data-y="-5.693455349999998" x="261.46095717884134" y="330.68010075566747" width="52.392947103274594" height="38.28715365239293" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_7" data-x="1.6799999999999988" data-y="-5.793455349999999" x="485.13853904282115" y="335.7178841309824" width="46.347607052896706" height="38.28715365239293" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="schematic_component_8" data-x="2.9799999999999995" data-y="-5.793455349999999" x="547.6070528967255" y="335.7178841309824" width="52.39294710327465" height="38.28715365239293" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="BSMD1206_200_12V" data-x="-5.295000000000001" data-y="-4.360455349999999" x="108.56423173803528" y="278.1360201511335" width="96.72544080604533" height="9.068010075566747" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="2A PTC" data-x="-5.895000000000001" data-y="-3.7154553499999983" x="105.54156171284637" y="243.87909319899245" width="42.31738035264482" height="12.59445843828712" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="AP2112K_3_3TRG1" data-x="-0.3750000000000009" data-y="-5.823455349999998" x="359.4458438287153" y="351.83879093198993" width="90.68010075566752" height="9.068010075566747" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="AP2112K-3.3" data-x="-0.6150000000000009" data-y="-4.978455349999999" x="356.4231738035264" y="307.5062972292192" width="72.54408060453397" height="12.59445843828712" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="netId: VBUS_5V
|
|
2
2
|
globalConnNetId: connectivity_net2" data-x="-7.136000000000002" data-y="-3.619455349999998" x="40.00000000000003" y="234.76070528967253" width="48.36272040302259" height="21.15869017632241" fill="#ef444466" stroke="#ef4444" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="netId: V5_SYS
|
|
3
3
|
globalConnNetId: connectivity_net0" data-x="-4.135000000000001" data-y="-3.8204553499999987" x="194.20654911838793" y="244.88664987405542" width="42.31738035264482" height="21.15869017632241" fill="#ef444466" stroke="#ef4444" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
4
4
|
globalConnNetId: connectivity_net1" data-x="-2.8950000000000005" data-y="-6.483455349999998" x="265.74307304785896" y="379.0428211586901" width="24.181360201511325" height="21.15869017632241" fill="#00000066" stroke="#000000" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
5
5
|
globalConnNetId: connectivity_net1" data-x="2.7849999999999993" data-y="-6.583455349999999" x="551.8891687657431" y="384.08060453400503" width="24.181360201511325" height="21.15869017632241" fill="#00000066" stroke="#000000" stroke-width="0.019850000000000003"/></g><g><rect data-type="rect" data-label="netId: V3_3
|
|
6
|
-
globalConnNetId: connectivity_net3" data-x="2.7849999999999993" data-y="-5.
|
|
6
|
+
globalConnNetId: connectivity_net3" data-x="2.7849999999999993" data-y="-5.083455349999999" x="548.8664987405541" y="308.5138539042821" width="30.226700251889156" height="21.158690176322466" fill="#ef444466" stroke="#ef4444" stroke-width="0.019850000000000003"/></g><g><circle data-type="point" data-label="schematic_port_20
|
|
7
7
|
x-" data-x="-6.655000000000001" data-y="-4.030455349999999" cx="88.41309823677585" cy="266.04534005037783" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_21
|
|
8
8
|
x+" data-x="-4.655000000000001" data-y="-4.030455349999999" cx="189.16876574307304" cy="266.04534005037783" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_22
|
|
9
9
|
x-" data-x="-1.6750000000000007" data-y="-5.193455349999998" cx="339.2947103274559" cy="324.63476070528964" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_23
|
|
@@ -23,7 +23,7 @@ orientation: y+" data-x="-7.136000000000002" data-y="-3.829455349999998" cx="64.
|
|
|
23
23
|
orientation: y+" data-x="-4.135000000000001" data-y="-4.030455349999999" cx="215.36523929471034" cy="266.04534005037783" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
24
24
|
orientation: y-" data-x="-2.8950000000000005" data-y="-6.273455349999998" cx="277.8337531486146" cy="379.0428211586901" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
25
25
|
orientation: y-" data-x="2.7849999999999993" data-y="-6.373455349999999" cx="563.9798488664987" cy="384.08060453400503" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
26
|
-
orientation: y+" data-x="2.7849999999999993" data-y="-5.
|
|
26
|
+
orientation: y+" data-x="2.7849999999999993" data-y="-5.293455349999999" cx="563.9798488664987" cy="329.67254408060455" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
|
|
27
27
|
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
28
28
|
const svg = e.currentTarget;
|
|
29
29
|
const rect = svg.getBoundingClientRect();
|
|
@@ -66,4 +66,4 @@ orientation: y+" data-x="2.7849999999999993" data-y="-5.2134553499999985" cx="56
|
|
|
66
66
|
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
67
67
|
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
68
68
|
});
|
|
69
|
-
]]></script></svg>
|
|
69
|
+
]]></script></svg>
|
|
@@ -5,7 +5,8 @@ import type { InputProblem } from "lib/types/InputProblem"
|
|
|
5
5
|
import "tests/fixtures/matcher"
|
|
6
6
|
import inputProblemJson from "./assets/repro-board-589-regulator-section.input.json"
|
|
7
7
|
|
|
8
|
-
const EXPECTED_ALIGNED_JUNCTION_COUNT =
|
|
8
|
+
const EXPECTED_ALIGNED_JUNCTION_COUNT = 2
|
|
9
|
+
const REGULATOR_OUTPUT_TRACE_ID = "schematic_port_31-schematic_port_26"
|
|
9
10
|
|
|
10
11
|
test("board 589 regulator section trace routing", () => {
|
|
11
12
|
const inputProblem: InputProblem = JSON.parse(
|
|
@@ -22,6 +23,9 @@ test("board 589 regulator section trace routing", () => {
|
|
|
22
23
|
const labeledTrace = junctionOutput.traces.find((trace) =>
|
|
23
24
|
v3V3Label.mspConnectionPairIds.includes(trace.mspPairId),
|
|
24
25
|
)!
|
|
26
|
+
const regulatorOutputTrace = junctionOutput.traces.find(
|
|
27
|
+
(trace) => trace.mspPairId === REGULATOR_OUTPUT_TRACE_ID,
|
|
28
|
+
)!
|
|
25
29
|
|
|
26
30
|
expect(
|
|
27
31
|
solver.sameNetJunctionAlignmentSolver!.stats.alignedJunctionCount,
|
|
@@ -29,5 +33,23 @@ test("board 589 regulator section trace routing", () => {
|
|
|
29
33
|
expect(
|
|
30
34
|
tracePathContainsPoint(labeledTrace.tracePath, v3V3Label.anchorPoint),
|
|
31
35
|
).toBe(true)
|
|
36
|
+
expect(
|
|
37
|
+
regulatorOutputTrace.tracePath.some(
|
|
38
|
+
(point, index) =>
|
|
39
|
+
point.y === v3V3Label.anchorPoint.y &&
|
|
40
|
+
regulatorOutputTrace.tracePath[index + 1]?.y ===
|
|
41
|
+
v3V3Label.anchorPoint.y,
|
|
42
|
+
),
|
|
43
|
+
).toBe(true)
|
|
44
|
+
for (const trace of [labeledTrace, regulatorOutputTrace]) {
|
|
45
|
+
expect(
|
|
46
|
+
trace.tracePath.every(
|
|
47
|
+
(point, index, path) =>
|
|
48
|
+
index === 0 ||
|
|
49
|
+
point.x === path[index - 1]!.x ||
|
|
50
|
+
point.y === path[index - 1]!.y,
|
|
51
|
+
),
|
|
52
|
+
).toBe(true)
|
|
53
|
+
}
|
|
32
54
|
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
33
55
|
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "../lib"
|
|
3
|
+
|
|
4
|
+
test("SchematicTracePipelineSolver has a stable solver name", () => {
|
|
5
|
+
const solver = Object.create(
|
|
6
|
+
SchematicTracePipelineSolver.prototype,
|
|
7
|
+
) as SchematicTracePipelineSolver
|
|
8
|
+
|
|
9
|
+
expect(solver.getSolverName()).toBe("SchematicTracePipelineSolver")
|
|
10
|
+
})
|