@tscircuit/schematic-trace-solver 0.0.100 → 0.0.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/index.d.ts +13 -6
  2. package/dist/index.js +219 -67
  3. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +26 -7
  4. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/generateEndpointCollisionDetours.ts +5 -2
  5. package/lib/solvers/TraceOverlapShiftSolver/TraceOverlapIssueSolver/TraceOverlapIssueSolver.ts +168 -24
  6. package/lib/solvers/TraceOverlapShiftSolver/TraceOverlapShiftSolver.ts +128 -48
  7. package/package.json +1 -1
  8. package/site/bug-reports/bug-report-20260716T144856Z.page.tsx +4 -0
  9. package/site/bug-reports/bug-report-20260717T022934Z.page.tsx +4 -0
  10. package/site/bug-reports/bug-report-20260717T031704Z.page.tsx +4 -0
  11. package/tests/bug-reports/bug-report-20260706T213649Z/__snapshots__/bug-report-20260706T213649Z.snap.svg +3 -3
  12. package/tests/bug-reports/bug-report-20260706T220324Z/__snapshots__/bug-report-20260706T220324Z.snap.svg +3 -3
  13. package/tests/bug-reports/bug-report-20260707T092615Z/__snapshots__/bug-report-20260707T092615Z.snap.svg +5 -5
  14. package/tests/bug-reports/bug-report-20260707T140410Z/__snapshots__/bug-report-20260707T140410Z.snap.svg +3 -3
  15. package/tests/bug-reports/bug-report-20260716T144856Z/__snapshots__/bug-report-20260716T144856Z.snap.svg +149 -0
  16. package/tests/bug-reports/bug-report-20260716T144856Z/bug-report-20260716T144856Z.json +693 -0
  17. package/tests/bug-reports/bug-report-20260716T144856Z/bug-report-20260716T144856Z.test.ts +12 -0
  18. package/tests/bug-reports/bug-report-20260717T022934Z/__snapshots__/bug-report-20260717T022934Z.snap.svg +130 -0
  19. package/tests/bug-reports/bug-report-20260717T022934Z/bug-report-20260717T022934Z.json +543 -0
  20. package/tests/bug-reports/bug-report-20260717T022934Z/bug-report-20260717T022934Z.test.ts +12 -0
  21. package/tests/bug-reports/bug-report-20260717T031704Z/__snapshots__/bug-report-20260717T031704Z.snap.svg +48 -0
  22. package/tests/bug-reports/bug-report-20260717T031704Z/bug-report-20260717T031704Z.json +77 -0
  23. package/tests/bug-reports/bug-report-20260717T031704Z/bug-report-20260717T031704Z.test.ts +12 -0
  24. package/tests/examples/__snapshots__/example11.snap.svg +19 -23
  25. package/tests/examples/__snapshots__/example19.snap.svg +3 -5
  26. package/tests/examples/__snapshots__/example29.snap.svg +13 -13
  27. package/tests/examples/__snapshots__/example37.snap.svg +4 -2
  28. package/tests/examples/example16.test.ts +22 -0
  29. package/tests/repros/__snapshots__/repro-rp2040-gamepad-trace-alignment.snap.svg +2 -8
  30. package/tests/repros/__snapshots__/repro47-endpoint-obstacle-detour.snap.svg +19 -23
  31. package/tests/repros/__snapshots__/trace-overlap-box-resistor.snap.svg +10 -10
  32. package/tests/repros/repro47-endpoint-obstacle-detour.test.ts +32 -2
  33. package/tests/solvers/SchematicTraceSingleLineSolver2/generate-endpoint-collision-detours.test.ts +37 -0
  34. package/tests/solvers/TraceOverlapShiftSolver/TraceOverlapShiftSolver.test.ts +174 -0
@@ -1,4 +1,5 @@
1
1
  import { test, expect } from "bun:test"
2
+ import { countPathIntersections } from "lib/solvers/Example28Solver/geometry"
2
3
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
4
  import inputProblem from "../assets/example16.json"
4
5
  import "tests/fixtures/matcher"
@@ -8,5 +9,26 @@ test("example16", () => {
8
9
 
9
10
  solver.solve()
10
11
 
12
+ const traces = solver.netLabelTraceCollisionSolver!.getOutput().traces
13
+ const gndLabelAtJ1Pin3 = solver
14
+ .netLabelNetLabelCollisionSolver!.getOutput()
15
+ .netLabelPlacements.find((label) => label.pinIds.includes("J1.3"))
16
+ expect(gndLabelAtJ1Pin3?.orientation).toBe("y-")
17
+
18
+ const differentNetIntersections: string[] = []
19
+ for (let i = 0; i < traces.length; i++) {
20
+ for (let j = i + 1; j < traces.length; j++) {
21
+ const trace = traces[i]!
22
+ const otherTrace = traces[j]!
23
+ if (trace.globalConnNetId === otherTrace.globalConnNetId) continue
24
+ if (countPathIntersections(trace.tracePath, otherTrace.tracePath) > 0) {
25
+ differentNetIntersections.push(
26
+ `${trace.mspPairId}::${otherTrace.mspPairId}`,
27
+ )
28
+ }
29
+ }
30
+ }
31
+ expect(differentNetIntersections).toEqual([])
32
+
11
33
  expect(solver).toMatchSolverSnapshot(import.meta.path)
12
34
  })
@@ -1,4 +1,4 @@
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="-7.75,3.08 -5.4,3.08 -5.4,1.75" data-type="line" data-label="" points="135.9371727748691,179.05759162303664 234.36649214659684,179.05759162303664 234.36649214659684,234.76439790575915" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,1.52 -5.875,1.52 -5.875,1.95 -4,1.95 -4,1.75" data-type="line" data-label="" points="135.9371727748691,244.39790575916228 214.47120418848166,244.39790575916228 214.47120418848166,226.38743455497382 293.0052356020942,226.38743455497382 293.0052356020942,234.76439790575915" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4,0.6499999999999999 -4,0.44999999999999973 -5.4,0.44999999999999973 -5.4,0.6499999999999999" data-type="line" data-label="" points="293.0052356020942,280.83769633507853 293.0052356020942,289.21465968586386 234.36649214659684,289.21465968586386 234.36649214659684,280.83769633507853" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,0.74 -7.65,0.74 -7.65,0.4499999999999999 -5.4,0.4499999999999999 -5.4,0.6499999999999999" data-type="line" data-label="" points="135.9371727748691,277.0680628272251 140.12565445026178,277.0680628272251 140.12565445026178,289.21465968586386 234.36649214659684,289.21465968586386 234.36649214659684,280.83769633507853" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,1 -7.65,1 -7.65,0.74 -7.75,0.74" data-type="line" data-label="" points="135.9371727748691,266.1780104712042 140.12565445026178,266.1780104712042 140.12565445026178,277.0680628272251 135.9371727748691,277.0680628272251" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,3.86 -7.65,3.86 -7.65,1 -7.75,1" data-type="line" data-label="" points="135.9371727748691,146.3874345549738 140.12565445026178,146.3874345549738 140.12565445026178,266.1780104712042 135.9371727748691,266.1780104712042" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,3.6 -7.55,3.6 -7.55,1.26 -7.75,1.26" data-type="line" data-label="" points="135.9371727748691,157.27748691099475 144.31413612565444,157.27748691099475 144.31413612565444,255.28795811518324 135.9371727748691,255.28795811518324" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,2.82 -7.45,2.82 -7.45,2.3 -7.75,2.3" data-type="line" data-label="" points="135.9371727748691,189.9476439790576 148.5026178010471,189.9476439790576 148.5026178010471,211.72774869109946 135.9371727748691,211.72774869109946" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,2.56 -7.3500000000000005,2.56 -7.3500000000000005,2.04 -7.75,2.04" data-type="line" data-label="" points="135.9371727748691,200.83769633507853 152.69109947643977,200.83769633507853 152.69109947643977,222.6178010471204 135.9371727748691,222.6178010471204" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.778,-1.905 -2.7790000000000004,-1.905 -2.7790000000000004,-0.635 -1.778,-0.635" data-type="line" data-label="" points="386.0732984293194,387.85340314136124 344.14659685863876,387.85340314136124 344.14659685863876,334.65968586387436 386.0732984293194,334.65968586387436" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.778,0.635 -2.7790000000000004,0.635 -2.7790000000000004,-0.635 -1.778,-0.635" data-type="line" data-label="" points="386.0732984293194,281.4659685863874 344.14659685863876,281.4659685863874 344.14659685863876,334.65968586387436 386.0732984293194,334.65968586387436" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.778,1.905 -2.7790000000000004,1.905 -2.7790000000000004,0.635 -1.778,0.635" data-type="line" data-label="" points="386.0732984293194,228.2722513089005 344.14659685863876,228.2722513089005 344.14659685863876,281.4659685863874 386.0732984293194,281.4659685863874" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0,-6.35 0,-6.55 -2.7790000000000004,-6.55 -2.7790000000000004,-1.905 -1.778,-1.905" data-type="line" data-label="" points="460.5445026178011,574.0314136125655 460.5445026178011,582.4083769633507 344.14659685863876,582.4083769633507 344.14659685863876,387.85340314136124 386.0732984293194,387.85340314136124" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.7780000000000005,-1.9050000000000011 2.539,-1.9050000000000011 2.539,-6.55 0,-6.55 0,-6.35" data-type="line" data-label="" points="535.0157068062828,387.8534031413613 566.890052356021,387.8534031413613 566.890052356021,582.4083769633507 460.5445026178011,582.4083769633507 460.5445026178011,574.0314136125655" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.778,-0.635 2.539,-0.635 2.539,-1.905 1.778,-1.905" data-type="line" data-label="" points="535.0157068062828,334.65968586387436 566.890052356021,334.65968586387436 566.890052356021,387.85340314136124 535.0157068062828,387.85340314136124" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.778,0.635 2.539,0.635 2.539,-0.635 1.778,-0.635" data-type="line" data-label="" points="535.0157068062828,281.4659685863874 566.890052356021,281.4659685863874 566.890052356021,334.65968586387436 535.0157068062828,334.65968586387436" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.778,1.905 2.539,1.905 2.539,0.635 1.778,0.635" data-type="line" data-label="" points="535.0157068062828,228.2722513089005 566.890052356021,228.2722513089005 566.890052356021,281.4659685863874 535.0157068062828,281.4659685863874" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.55,3.6 -7.35,3.6 -7.35,3.601" data-type="line" data-label="" points="144.31413612565444,157.27748691099475 152.69109947643977,157.27748691099475 152.69109947643977,157.23560209424082" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.778,2.413 1.9789999999999999,2.413 1.9789999999999999,2.4639999999999995" data-type="line" data-label="" points="535.0157068062828,206.99476439790575 543.4345549738221,206.99476439790575 543.4345549738221,204.85863874345551" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.762,6.35 -0.762,6.3999999999999995 -2.112,6.3999999999999995 -2.112,6.2989999999999995" data-type="line" data-label="" points="428.62827225130894,42.094240837696304 428.62827225130894,40 372.08376963350787,40 372.08376963350787,44.23036649214657" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="J2" data-x="0" data-y="0" x="386.0732984293194" y="42.094240837696304" width="148.94240837696339" height="531.9371727748692" fill="hsl(184, 100%, 50%, 0.8)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="USB1" data-x="-8.5" data-y="2.3" x="73.10994764397904" y="136.33507853403137" width="62.8272251308901" height="150.78534031413616" fill="hsl(133, 100%, 50%, 0.8)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="R1" data-x="-5.4" data-y="1.2" x="223.89528795811518" y="234.76439790575915" width="20.94240837696333" height="46.07329842931938" fill="hsl(71, 100%, 50%, 0.8)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="R2" data-x="-4" data-y="1.2" x="282.5340314136125" y="234.76439790575915" width="20.94240837696333" height="46.07329842931938" fill="hsl(72, 100%, 50%, 0.8)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: SDA
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="-7.75,3.08 -5.4,3.08 -5.4,1.75" data-type="line" data-label="" points="135.9371727748691,179.05759162303664 234.36649214659684,179.05759162303664 234.36649214659684,234.76439790575915" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,1.52 -5.875,1.52 -5.875,1.95 -4,1.95 -4,1.75" data-type="line" data-label="" points="135.9371727748691,244.39790575916228 214.47120418848166,244.39790575916228 214.47120418848166,226.38743455497382 293.0052356020942,226.38743455497382 293.0052356020942,234.76439790575915" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4,0.6499999999999999 -4,0.44999999999999973 -5.4,0.44999999999999973 -5.4,0.6499999999999999" data-type="line" data-label="" points="293.0052356020942,280.83769633507853 293.0052356020942,289.21465968586386 234.36649214659684,289.21465968586386 234.36649214659684,280.83769633507853" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,0.74 -7.3500000000000005,0.74 -7.3500000000000005,0.4499999999999999 -5.4,0.4499999999999999 -5.4,0.6499999999999999" data-type="line" data-label="" points="135.9371727748691,277.0680628272251 152.69109947643977,277.0680628272251 152.69109947643977,289.21465968586386 234.36649214659684,289.21465968586386 234.36649214659684,280.83769633507853" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,1 -7.3500000000000005,1 -7.3500000000000005,0.74 -7.75,0.74" data-type="line" data-label="" points="135.9371727748691,266.1780104712042 152.69109947643977,266.1780104712042 152.69109947643977,277.0680628272251 135.9371727748691,277.0680628272251" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,3.86 -7.3500000000000005,3.86 -7.3500000000000005,1 -7.75,1" data-type="line" data-label="" points="135.9371727748691,146.3874345549738 152.69109947643977,146.3874345549738 152.69109947643977,266.1780104712042 135.9371727748691,266.1780104712042" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,3.6 -7.45,3.6 -7.45,1.26 -7.75,1.26" data-type="line" data-label="" points="135.9371727748691,157.27748691099475 148.5026178010471,157.27748691099475 148.5026178010471,255.28795811518324 135.9371727748691,255.28795811518324" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,2.82 -7.65,2.82 -7.65,2.3 -7.75,2.3" data-type="line" data-label="" points="135.9371727748691,189.9476439790576 140.12565445026178,189.9476439790576 140.12565445026178,211.72774869109946 135.9371727748691,211.72774869109946" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-7.75,2.56 -7.55,2.56 -7.55,2.04 -7.75,2.04" data-type="line" data-label="" points="135.9371727748691,200.83769633507853 144.31413612565444,200.83769633507853 144.31413612565444,222.6178010471204 135.9371727748691,222.6178010471204" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.778,-1.905 -2.7790000000000004,-1.905 -2.7790000000000004,-0.635 -1.778,-0.635" data-type="line" data-label="" points="386.0732984293194,387.85340314136124 344.14659685863876,387.85340314136124 344.14659685863876,334.65968586387436 386.0732984293194,334.65968586387436" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.778,0.635 -2.7790000000000004,0.635 -2.7790000000000004,-0.635 -1.778,-0.635" data-type="line" data-label="" points="386.0732984293194,281.4659685863874 344.14659685863876,281.4659685863874 344.14659685863876,334.65968586387436 386.0732984293194,334.65968586387436" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.778,1.905 -2.7790000000000004,1.905 -2.7790000000000004,0.635 -1.778,0.635" data-type="line" data-label="" points="386.0732984293194,228.2722513089005 344.14659685863876,228.2722513089005 344.14659685863876,281.4659685863874 386.0732984293194,281.4659685863874" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0,-6.35 0,-6.55 -2.7790000000000004,-6.55 -2.7790000000000004,-1.905 -1.778,-1.905" data-type="line" data-label="" points="460.5445026178011,574.0314136125655 460.5445026178011,582.4083769633507 344.14659685863876,582.4083769633507 344.14659685863876,387.85340314136124 386.0732984293194,387.85340314136124" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.7780000000000005,-1.9050000000000011 2.539,-1.9050000000000011 2.539,-6.55 0,-6.55 0,-6.35" data-type="line" data-label="" points="535.0157068062828,387.8534031413613 566.890052356021,387.8534031413613 566.890052356021,582.4083769633507 460.5445026178011,582.4083769633507 460.5445026178011,574.0314136125655" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.778,-0.635 2.539,-0.635 2.539,-1.905 1.778,-1.905" data-type="line" data-label="" points="535.0157068062828,334.65968586387436 566.890052356021,334.65968586387436 566.890052356021,387.85340314136124 535.0157068062828,387.85340314136124" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.778,0.635 2.539,0.635 2.539,-0.635 1.778,-0.635" data-type="line" data-label="" points="535.0157068062828,281.4659685863874 566.890052356021,281.4659685863874 566.890052356021,334.65968586387436 535.0157068062828,334.65968586387436" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.778,1.905 2.539,1.905 2.539,0.635 1.778,0.635" data-type="line" data-label="" points="535.0157068062828,228.2722513089005 566.890052356021,228.2722513089005 566.890052356021,281.4659685863874 535.0157068062828,281.4659685863874" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.778,2.413 1.9789999999999999,2.413 1.9789999999999999,2.4639999999999995" data-type="line" data-label="" points="535.0157068062828,206.99476439790575 543.4345549738221,206.99476439790575 543.4345549738221,204.85863874345551" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.762,6.35 -0.762,6.3999999999999995 -2.112,6.3999999999999995 -2.112,6.2989999999999995" data-type="line" data-label="" points="428.62827225130894,42.094240837696304 428.62827225130894,40 372.08376963350787,40 372.08376963350787,44.23036649214657" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="J2" data-x="0" data-y="0" x="386.0732984293194" y="42.094240837696304" width="148.94240837696339" height="531.9371727748692" fill="hsl(184, 100%, 50%, 0.8)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="USB1" data-x="-8.5" data-y="2.3" x="73.10994764397904" y="136.33507853403137" width="62.8272251308901" height="150.78534031413616" fill="hsl(133, 100%, 50%, 0.8)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="R1" data-x="-5.4" data-y="1.2" x="223.89528795811518" y="234.76439790575915" width="20.94240837696333" height="46.07329842931938" fill="hsl(71, 100%, 50%, 0.8)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="R2" data-x="-4" data-y="1.2" x="282.5340314136125" y="234.76439790575915" width="20.94240837696333" height="46.07329842931938" fill="hsl(72, 100%, 50%, 0.8)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: SDA
2
2
  globalConnNetId: connectivity_net6" data-x="-1.9589999999999999" data-y="2.413" x="370.9528795811519" y="202.80628272251306" width="15.078534031413596" height="8.376963350785388" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: SCL
3
3
  globalConnNetId: connectivity_net7" data-x="-1.9589999999999999" data-y="2.159" x="370.9528795811519" y="213.44502617801044" width="15.078534031413596" height="8.37696335078536" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: GND
4
4
  globalConnNetId: connectivity_net31" data-x="0" data-y="-6.76" x="450.4921465968587" y="582.4083769633507" width="20.104712041884795" height="17.591623036649253" fill="#00000066" stroke="#000000" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: UP
@@ -25,13 +25,10 @@ globalConnNetId: connectivity_net27" data-x="1.9289999999999998" data-y="-0.889"
25
25
  globalConnNetId: connectivity_net28" data-x="1.9289999999999998" data-y="0.127" x="535.0575916230367" y="298.5549738219895" width="12.56544502617794" height="8.376963350785388" fill="hsl(80, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: L5
26
26
  globalConnNetId: connectivity_net29" data-x="1.9289999999999998" data-y="0.381" x="535.0575916230367" y="287.91623036649213" width="12.56544502617794" height="8.376963350785331" fill="hsl(80, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: LED-RGB
27
27
  globalConnNetId: connectivity_net30" data-x="2.109" data-y="0.889" x="535.0575916230368" y="266.6387434554974" width="27.643979057591537" height="8.376963350785331" fill="hsl(80, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: V5
28
- globalConnNetId: connectivity_net3" data-x="-7.35" data-y="3.811" x="146.40837696335075" y="139.6439790575916" width="12.565445026178054" height="17.591623036649224" fill="#ef444466" stroke="#ef4444" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: V5
29
28
  globalConnNetId: connectivity_net3" data-x="1.9789999999999999" data-y="2.6739999999999995" x="537.151832460733" y="187.26701570680626" width="12.565445026178054" height="17.591623036649224" fill="#ef444466" stroke="#ef4444" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: GNDPWR
30
29
  globalConnNetId: connectivity_net2" data-x="-4" data-y="0.23999999999999974" x="279.1832460732984" y="289.21465968586386" width="27.64397905759165" height="17.591623036649253" fill="#00000066" stroke="#000000" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: GNDPWR
31
30
  globalConnNetId: connectivity_net2" data-x="-2.112" data-y="6.0889999999999995" x="358.26178010471205" y="44.23036649214659" width="27.64397905759165" height="17.591623036649224" fill="#00000066" stroke="#000000" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: USB1.CC1 to R1.1
32
- globalConnNetId: connectivity_net0" data-x="-5.4" data-y="3.305" x="230.17801047120417" y="160.2094240837696" width="8.376963350785331" height="18.848167539267052" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: D-
33
- globalConnNetId: connectivity_net4" data-x="-7.3" data-y="2.82" x="148.5026178010471" y="185.75916230366494" width="12.565445026178054" height="8.37696335078536" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: D+
34
- globalConnNetId: connectivity_net5" data-x="-7.2" data-y="2.56" x="152.6910994764398" y="196.64921465968587" width="12.565445026177997" height="8.37696335078536" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: USB1.CC2 to R2.1
31
+ globalConnNetId: connectivity_net0" data-x="-5.4" data-y="3.305" x="230.17801047120417" y="160.2094240837696" width="8.376963350785331" height="18.848167539267052" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><rect data-type="rect" data-label="netId: USB1.CC2 to R2.1
35
32
  globalConnNetId: connectivity_net1" data-x="-4" data-y="2.175" x="288.81675392670155" y="207.5392670157068" width="8.376963350785331" height="18.848167539267024" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.023874999999999997"/></g><g><circle data-type="point" data-label="J2.1
36
33
  x-" data-x="-1.778" data-y="2.413" cx="386.0732984293194" cy="206.99476439790575" r="3" fill="hsl(99, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J2.2
37
34
  x-" data-x="-1.778" data-y="2.159" cx="386.0732984293194" cy="217.63350785340313" r="3" fill="hsl(100, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J2.3
@@ -125,13 +122,10 @@ orientation: x+" data-x="1.778" data-y="-0.889" cx="535.0157068062828" cy="345.2
125
122
  orientation: x+" data-x="1.778" data-y="0.127" cx="535.0157068062828" cy="302.7434554973822" r="3" fill="hsl(80, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
126
123
  orientation: x+" data-x="1.778" data-y="0.381" cx="535.0157068062828" cy="292.1047120418848" r="3" fill="hsl(80, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
127
124
  orientation: x+" data-x="1.778" data-y="0.889" cx="535.0157068062828" cy="270.82722513089004" r="3" fill="hsl(80, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
128
- orientation: y+" data-x="-7.35" data-y="3.601" cx="152.69109947643977" cy="157.23560209424082" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
129
125
  orientation: y+" data-x="1.9789999999999999" data-y="2.4639999999999995" cx="543.4345549738221" cy="204.85863874345551" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
130
126
  orientation: y-" data-x="-4" data-y="0.44999999999999973" cx="293.0052356020942" cy="289.21465968586386" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
131
127
  orientation: y-" data-x="-2.112" data-y="6.2989999999999995" cx="372.08376963350787" cy="44.23036649214657" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
132
128
  orientation: y+" data-x="-5.4" data-y="3.08" cx="234.36649214659684" cy="179.05759162303664" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
133
- orientation: x+" data-x="-7.45" data-y="2.82" cx="148.5026178010471" cy="189.9476439790576" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
134
- orientation: x+" data-x="-7.3500000000000005" data-y="2.56" cx="152.69109947643977" cy="200.83769633507853" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
135
129
  orientation: y+" data-x="-4" data-y="1.95" cx="293.0052356020942" cy="226.38743455497382" 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[
136
130
  document.currentScript.parentElement.addEventListener('mousemove', (e) => {
137
131
  const svg = e.currentTarget;
@@ -1,25 +1,21 @@
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="0.6499999999999999,0.825 -0.6499999999999999,-0.825" data-type="line" data-label="" points="410.65315315315314,198.6036036036036 205.6981981981982,458.7387387387388" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.25,0.825 -1.25,-0.825" data-type="line" data-label="" points="505.2477477477478,198.6036036036036 111.1036036036036,458.7387387387388" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.49999999999999994,-0.725 -1.25,0.825" data-type="line" data-label="" points="387.0045045045045,442.97297297297297 111.1036036036036,198.6036036036036" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.4,-0.725 -0.6499999999999999,0.825" data-type="line" data-label="" points="528.8963963963964,442.97297297297297 205.6981981981982,198.6036036036036" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.6499999999999999,0.825 0,0.825 0,-0.825 -0.6499999999999999,-0.825" data-type="line" data-label="" points="410.65315315315314,198.6036036036036 308.1756756756757,198.6036036036036 308.1756756756757,458.7387387387388 205.6981981981982,458.7387387387388" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.25,0.825 1.4500000000000002,0.825 1.4500000000000002,0 -1.45,0 -1.45,-0.825 -1.25,-0.825" data-type="line" data-label="" points="505.2477477477478,198.6036036036036 536.7792792792793,198.6036036036036 536.7792792792793,328.6711711711712 79.57207207207207,328.6711711711712 79.57207207207207,458.7387387387388 111.1036036036036,458.7387387387388" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-0.95" data-y="0.825" x="111.10360360360359" y="145" width="94.59459459459461" height="107.20720720720723" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="0.95" data-y="0.825" x="410.6531531531532" y="145" width="94.59459459459464" height="107.20720720720723" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-0.95" data-y="-0.825" x="111.10360360360359" y="405.13513513513516" width="94.59459459459461" height="107.20720720720726" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="0.95" data-y="-0.825" x="387.00450450450455" y="414.9290282263514" width="141.89189189189193" height="87.61942102477474" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin1 to .R1 &gt; .pin1
2
- globalConnNetId: connectivity_net2" data-x="0.2739999999999999" data-y="-0.725" x="315.9009009009009" y="427.20720720720715" width="70.94594594594594" height="31.531531531531584" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin1 to .R1 &gt; .pin1
3
- globalConnNetId: connectivity_net2" data-x="-1.476" data-y="0.825" x="39.999999999999986" y="182.8378378378378" width="70.94594594594597" height="31.531531531531556" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin3 to .R1 &gt; .pin2
4
- globalConnNetId: connectivity_net3" data-x="1.626" data-y="-0.725" x="529.0540540540542" y="427.20720720720715" width="70.94594594594594" height="31.531531531531584" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin3 to .R1 &gt; .pin2
5
- globalConnNetId: connectivity_net3" data-x="-0.42399999999999993" data-y="0.825" x="205.85585585585585" y="182.8378378378378" width="70.94594594594594" height="31.531531531531556" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="netId: .R2 &gt; .pin1 to .R3 &gt; .pin2
6
- globalConnNetId: connectivity_net0" data-x="0.32499999999999996" data-y="1.05" x="343.64864864864865" y="127.65765765765765" width="31.531531531531527" height="70.94594594594597" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.006342857142857142"/></g><g><rect data-type="rect" data-label="netId: .R2 &gt; .pin2 to .R3 &gt; .pin1
7
- globalConnNetId: connectivity_net1" data-x="1.4500000000000002" data-y="1.05" x="521.0135135135135" y="127.65765765765765" width="31.531531531531527" height="70.94594594594597" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.006342857142857142"/></g><g><circle data-type="point" data-label="R1.1
8
- x-" data-x="-1.25" data-y="0.825" cx="111.1036036036036" cy="198.6036036036036" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R1.2
9
- x+" data-x="-0.6499999999999999" data-y="0.825" cx="205.6981981981982" cy="198.6036036036036" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.1
10
- x-" data-x="0.6499999999999999" data-y="0.825" cx="410.65315315315314" cy="198.6036036036036" r="3" fill="hsl(107, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.2
11
- x+" data-x="1.25" data-y="0.825" cx="505.2477477477478" cy="198.6036036036036" r="3" fill="hsl(108, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R3.1
12
- x-" data-x="-1.25" data-y="-0.825" cx="111.1036036036036" cy="458.7387387387388" r="3" fill="hsl(348, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R3.2
13
- x+" data-x="-0.6499999999999999" data-y="-0.825" cx="205.6981981981982" cy="458.7387387387388" r="3" fill="hsl(349, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.1
14
- x-" data-x="0.49999999999999994" data-y="-0.725" cx="387.0045045045045" cy="442.97297297297297" r="3" fill="hsl(218, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.2
15
- y-" data-x="0.95" data-y="-1.1028787352499998" cx="457.9504504504505" cy="502.5484492511261" r="3" fill="hsl(219, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.3
16
- x+" data-x="1.4" data-y="-0.725" cx="528.8963963963964" cy="442.97297297297297" r="3" fill="hsl(220, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
17
- orientation: x-" data-x="0.49999999999999994" data-y="-0.725" cx="387.0045045045045" cy="442.97297297297297" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
18
- orientation: x-" data-x="-1.25" data-y="0.825" cx="111.1036036036036" cy="198.6036036036036" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
19
- orientation: x+" data-x="1.4" data-y="-0.725" cx="528.8963963963964" cy="442.97297297297297" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
20
- orientation: x+" data-x="-0.6499999999999999" data-y="0.825" cx="205.6981981981982" cy="198.6036036036036" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
21
- orientation: y+" data-x="0.32499999999999996" data-y="0.825" cx="359.4144144144144" cy="198.6036036036036" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
22
- orientation: y+" data-x="1.4500000000000002" data-y="0.825" cx="536.7792792792793" cy="198.6036036036036" 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[
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="0.6499999999999999,0.825 -0.6499999999999999,-0.825" data-type="line" data-label="" points="419.0769230769231,177.84615384615384 195.0769230769231,462.1538461538462" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.25,0.825 -1.25,-0.825" data-type="line" data-label="" points="522.4615384615386,177.84615384615384 91.69230769230768,462.1538461538462" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.49999999999999994,-0.725 -1.25,0.825" data-type="line" data-label="" points="393.2307692307692,444.9230769230769 91.69230769230768,177.84615384615384" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.4,-0.725 -0.6499999999999999,0.825" data-type="line" data-label="" points="548.3076923076924,444.9230769230769 195.0769230769231,177.84615384615384" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.6499999999999999,0.825 0,0.825 0,-0.825 -0.6499999999999999,-0.825" data-type="line" data-label="" points="419.0769230769231,177.84615384615384 307.0769230769231,177.84615384615384 307.0769230769231,462.1538461538462 195.0769230769231,462.1538461538462" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.25,0.825 1.4500000000000002,0.825 1.4500000000000002,0 -1.3499999999999999,0 -1.3499999999999999,-0.825 -1.25,-0.825" data-type="line" data-label="" points="522.4615384615386,177.84615384615384 556.923076923077,177.84615384615384 556.923076923077,320 74.46153846153848,320 74.46153846153848,462.1538461538462 91.69230769230768,462.1538461538462" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,-0.725 0.2,-0.725 0.2,-1.365 -1.55,-1.365 -1.55,0.825 -1.25,0.825" data-type="line" data-label="" points="393.2307692307693,444.9230769230769 341.53846153846155,444.9230769230769 341.53846153846155,555.2 40,555.2 40,177.84615384615384 91.69230769230768,177.84615384615384" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.4,-0.725 1.5999999999999999,-0.725 1.5999999999999999,1.365 -0.1,1.365 -0.1,0.825 -0.6499999999999999,0.825" data-type="line" data-label="" points="548.3076923076924,444.9230769230769 582.7692307692307,444.9230769230769 582.7692307692307,84.79999999999998 289.84615384615387,84.79999999999998 289.84615384615387,177.84615384615384 195.0769230769231,177.84615384615384" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-0.95" data-y="0.825" x="91.69230769230768" y="119.26153846153844" width="103.38461538461542" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="0.95" data-y="0.825" x="419.0769230769231" y="119.26153846153844" width="103.38461538461547" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-0.95" data-y="-0.825" x="91.69230769230768" y="403.5692307692308" width="103.38461538461542" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="0.95" data-y="-0.825" x="393.2307692307693" y="414.2732025415385" width="155.07692307692315" height="95.76128722461533" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin1 to .R1 &gt; .pin1
2
+ globalConnNetId: connectivity_net2" data-x="0.35" data-y="-0.5" x="350.1538461538462" y="367.3846153846155" width="34.46153846153845" height="77.53846153846149" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin3 to .R1 &gt; .pin2
3
+ globalConnNetId: connectivity_net3" data-x="1.5999999999999999" data-y="-0.95" x="565.5384615384614" y="444.92307692307696" width="34.46153846153845" height="77.53846153846155" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .R2 &gt; .pin1 to .R3 &gt; .pin2
4
+ globalConnNetId: connectivity_net0" data-x="0.32499999999999996" data-y="1.05" x="345.84615384615387" y="100.30769230769229" width="34.46153846153845" height="77.53846153846155" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .R2 &gt; .pin2 to .R3 &gt; .pin1
5
+ globalConnNetId: connectivity_net1" data-x="1.4500000000000002" data-y="1.05" x="539.6923076923078" y="100.30769230769229" width="34.46153846153845" height="77.53846153846155" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005803571428571428"/></g><g><circle data-type="point" data-label="R1.1
6
+ x-" data-x="-1.25" data-y="0.825" cx="91.69230769230768" cy="177.84615384615384" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R1.2
7
+ x+" data-x="-0.6499999999999999" data-y="0.825" cx="195.0769230769231" cy="177.84615384615384" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.1
8
+ x-" data-x="0.6499999999999999" data-y="0.825" cx="419.0769230769231" cy="177.84615384615384" r="3" fill="hsl(107, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.2
9
+ x+" data-x="1.25" data-y="0.825" cx="522.4615384615386" cy="177.84615384615384" r="3" fill="hsl(108, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R3.1
10
+ x-" data-x="-1.25" data-y="-0.825" cx="91.69230769230768" cy="462.1538461538462" r="3" fill="hsl(348, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R3.2
11
+ x+" data-x="-0.6499999999999999" data-y="-0.825" cx="195.0769230769231" cy="462.1538461538462" r="3" fill="hsl(349, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.1
12
+ x-" data-x="0.49999999999999994" data-y="-0.725" cx="393.2307692307692" cy="444.9230769230769" r="3" fill="hsl(218, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.2
13
+ y-" data-x="0.95" data-y="-1.1028787352499998" cx="470.76923076923083" cy="510.0344897661538" r="3" fill="hsl(219, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.3
14
+ x+" data-x="1.4" data-y="-0.725" cx="548.3076923076924" cy="444.9230769230769" r="3" fill="hsl(220, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
15
+ orientation: y+" data-x="0.35" data-y="-0.725" cx="367.3846153846154" cy="444.9230769230769" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
16
+ orientation: y-" data-x="1.5999999999999999" data-y="-0.725" cx="582.7692307692307" cy="444.9230769230769" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
17
+ orientation: y+" data-x="0.32499999999999996" data-y="0.825" cx="363.0769230769231" cy="177.84615384615384" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
18
+ orientation: y+" data-x="1.4500000000000002" data-y="0.825" cx="556.923076923077" cy="177.84615384615384" 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[
23
19
  document.currentScript.parentElement.addEventListener('mousemove', (e) => {
24
20
  const svg = e.currentTarget;
25
21
  const rect = svg.getBoundingClientRect();
@@ -41,7 +37,7 @@ orientation: y+" data-x="1.4500000000000002" data-y="0.825" cx="536.779279279279
41
37
  v.setAttribute('y2', '640');
42
38
 
43
39
  // Calculate real coordinates using inverse transformation
44
- const matrix = {"a":157.65765765765767,"c":0,"e":308.1756756756757,"b":0,"d":-157.65765765765767,"f":328.6711711711712};
40
+ const matrix = {"a":172.30769230769232,"c":0,"e":307.0769230769231,"b":0,"d":-172.30769230769232,"f":320};
45
41
  // Manually invert and apply the affine transform
46
42
  // Since we only use translate and scale, we can directly compute:
47
43
  // x' = (x - tx) / sx
@@ -1,12 +1,12 @@
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.7999999999999998,-0.32499999999999996 2.25,-0.9" data-type="line" data-label="" points="458.8517829187396,320.9286898839137 500.642827694859,374.3283582089552" fill="none" stroke="hsl(112, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.7999999999999998,-0.975 2.25,-2.6500000000000004" data-type="line" data-label="" points="458.8517829187396,381.2935323383084 500.642827694859,536.849087893864" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.7999999999999998,-0.32499999999999996 1.9249999999999998,-0.32499999999999996 1.9249999999999998,-1.1 2.25,-1.1 2.25,-0.9" data-type="line" data-label="" points="458.8517829187396,320.9286898839137 470.46040646766164,320.9286898839137 470.46040646766164,392.9021558872305 500.642827694859,392.9021558872305 500.642827694859,374.3283582089552" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.7999999999999998,-0.975 1.9902723250000003,-0.975 1.9902723250000003,-2.8500000000000005 2.25,-2.8500000000000005 2.25,-2.6500000000000004" data-type="line" data-label="" points="458.8517829187396,381.2935323383084 476.52218126036485,381.2935323383084 476.52218126036485,555.4228855721392 500.642827694859,555.4228855721392 500.642827694859,536.849087893864" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="124.52342470978448" y="40" width="334.32835820895514" height="501.49253731343276" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="2.25" data-y="-0.35" x="485.80908009950247" y="272.1724709784411" width="29.667495190713055" height="102.15588723051411" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="2.25" data-y="-2.1" x="485.80908009950247" y="434.6932006633499" width="29.667495190713055" height="102.15588723051405" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145"/></g><g><rect data-type="rect" data-label="netId: GND
2
- globalConnNetId: connectivity_net1" data-x="2.25" data-y="-3.0900000000000007" x="491.35592885572134" y="555.4228855721393" width="18.573797678275355" height="44.577114427860806" fill="#00000066" stroke="#000000" stroke-width="0.010767857142857145"/></g><g><rect data-type="rect" data-label="netId: U1.FB to R1.pin2
3
- globalConnNetId: connectivity_net0" data-x="1.9249999999999998" data-y="-0.09999999999999995" x="461.173507628524" y="279.1376451077943" width="18.573797678275298" height="41.791044776119406" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.010767857142857145"/></g><g><circle data-type="point" data-label="U1.3
4
- x+" data-x="1.7999999999999998" data-y="-0.975" cx="458.8517829187396" cy="381.2935323383084" r="3" fill="hsl(321, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.4
5
- x+" data-x="1.7999999999999998" data-y="-0.32499999999999996" cx="458.8517829187396" cy="320.9286898839137" r="3" fill="hsl(322, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R1.2
6
- y-" data-x="2.25" data-y="-0.9" cx="500.642827694859" cy="374.3283582089552" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.2
7
- y-" data-x="2.25" data-y="-2.6500000000000004" cx="500.642827694859" cy="536.849087893864" r="3" fill="hsl(108, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
8
- orientation: y-" data-x="2.25" data-y="-2.8500000000000005" cx="500.642827694859" cy="555.4228855721392" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
9
- orientation: y+" data-x="1.9249999999999998" data-y="-0.32499999999999996" cx="470.46040646766164" cy="320.9286898839137" 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[
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.7999999999999998,-0.32499999999999996 2.25,-0.9" data-type="line" data-label="" points="445.37313432835816,320.9286898839137 487.16417910447757,374.3283582089552" fill="none" stroke="hsl(112, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.7999999999999998,-0.975 2.25,-2.6500000000000004" data-type="line" data-label="" points="445.37313432835816,381.2935323383084 487.16417910447757,536.849087893864" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.7999999999999998,-0.32499999999999996 1.9902723250000003,-0.32499999999999996 1.9902723250000003,-1.1 2.25,-1.1 2.25,-0.9" data-type="line" data-label="" points="445.37313432835816,320.9286898839137 463.0435326699834,320.9286898839137 463.0435326699834,392.9021558872305 487.16417910447757,392.9021558872305 487.16417910447757,374.3283582089552" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.7999999999999998,-0.975 1.9249999999999998,-0.975 1.9249999999999998,-2.8500000000000005 2.25,-2.8500000000000005 2.25,-2.6500000000000004" data-type="line" data-label="" points="445.37313432835816,381.2935323383084 456.9817578772802,381.2935323383084 456.9817578772802,555.4228855721392 487.16417910447757,555.4228855721392 487.16417910447757,536.849087893864" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="111.04477611940302" y="40" width="334.32835820895514" height="501.49253731343276" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="2.25" data-y="-0.35" x="472.33043150912107" y="272.1724709784411" width="29.667495190712998" height="102.15588723051411" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="2.25" data-y="-2.1" x="472.33043150912107" y="434.6932006633499" width="29.667495190712998" height="102.15588723051405" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145"/></g><g><rect data-type="rect" data-label="netId: GND
2
+ globalConnNetId: connectivity_net1" data-x="2.25" data-y="-3.0900000000000007" x="477.8772802653399" y="555.4228855721393" width="18.573797678275355" height="44.577114427860806" fill="#00000066" stroke="#000000" stroke-width="0.010767857142857145"/></g><g><rect data-type="rect" data-label="netId: U1.FB to R1.pin2
3
+ globalConnNetId: connectivity_net0" data-x="2.475" data-y="-1.1" x="487.1641791044775" y="383.6152570480929" width="41.79104477611946" height="18.573797678275298" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.010767857142857145"/></g><g><circle data-type="point" data-label="U1.3
4
+ x+" data-x="1.7999999999999998" data-y="-0.975" cx="445.37313432835816" cy="381.2935323383084" r="3" fill="hsl(321, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.4
5
+ x+" data-x="1.7999999999999998" data-y="-0.32499999999999996" cx="445.37313432835816" cy="320.9286898839137" r="3" fill="hsl(322, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R1.2
6
+ y-" data-x="2.25" data-y="-0.9" cx="487.16417910447757" cy="374.3283582089552" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.2
7
+ y-" data-x="2.25" data-y="-2.6500000000000004" cx="487.16417910447757" cy="536.849087893864" r="3" fill="hsl(108, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
8
+ orientation: y-" data-x="2.25" data-y="-2.8500000000000005" cx="487.16417910447757" cy="555.4228855721392" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
9
+ orientation: x+" data-x="2.25" data-y="-1.1" cx="487.16417910447757" cy="392.9021558872305" 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[
10
10
  document.currentScript.parentElement.addEventListener('mousemove', (e) => {
11
11
  const svg = e.currentTarget;
12
12
  const rect = svg.getBoundingClientRect();
@@ -28,7 +28,7 @@ orientation: y+" data-x="1.9249999999999998" data-y="-0.32499999999999996" cx="4
28
28
  v.setAttribute('y2', '640');
29
29
 
30
30
  // Calculate real coordinates using inverse transformation
31
- const matrix = {"a":92.86898839137643,"c":0,"e":291.68760381426205,"b":0,"d":-92.86898839137643,"f":290.7462686567164};
31
+ const matrix = {"a":92.86898839137643,"c":0,"e":278.2089552238806,"b":0,"d":-92.86898839137643,"f":290.7462686567164};
32
32
  // Manually invert and apply the affine transform
33
33
  // Since we only use translate and scale, we can directly compute:
34
34
  // x' = (x - tx) / sx
@@ -1,9 +1,10 @@
1
1
  import { expect, test } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import { countPathIntersections } from "lib/solvers/Example28Solver/geometry"
3
4
  import "tests/fixtures/matcher"
4
5
  import inputProblem from "./assets/repro47-endpoint-obstacle-detour.input.json"
5
6
 
6
- test("repro47: endpoint obstacle detours fall back to net labels", () => {
7
+ test("repro47: endpoint obstacle detours route around nearby components", () => {
7
8
  const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
9
 
9
10
  solver.solve()
@@ -14,6 +15,35 @@ test("repro47: endpoint obstacle detours fall back to net labels", () => {
14
15
  (pair) => pair.mspPairId,
15
16
  )
16
17
  .sort(),
17
- ).toEqual(["J1.1-R1.1", "J1.3-R1.2"])
18
+ ).toEqual([])
19
+
20
+ const j1Pin1Trace = solver.schematicTraceLinesSolver!.solvedTracePaths.find(
21
+ (trace) => trace.mspPairId === "J1.1-R1.1",
22
+ )
23
+ const bottomChipEdge = Math.min(
24
+ ...inputProblem.chips.map((chip) => chip.center.y - chip.height / 2),
25
+ )
26
+ expect(j1Pin1Trace).toBeDefined()
27
+ expect(
28
+ Math.min(...j1Pin1Trace!.tracePath.map((point) => point.y)),
29
+ ).toBeLessThan(bottomChipEdge)
30
+
31
+ const finalTraces = solver.netLabelTraceCollisionSolver!.getOutput().traces
32
+ const traceById = new Map(
33
+ finalTraces.map((trace) => [trace.mspPairId, trace]),
34
+ )
35
+ expect(
36
+ countPathIntersections(
37
+ traceById.get("J1.1-R1.1")!.tracePath,
38
+ traceById.get("R2.2-R3.1")!.tracePath,
39
+ ),
40
+ ).toBe(0)
41
+ expect(
42
+ countPathIntersections(
43
+ traceById.get("J1.3-R1.2")!.tracePath,
44
+ traceById.get("R2.1-R3.2")!.tracePath,
45
+ ),
46
+ ).toBe(0)
47
+
18
48
  expect(solver).toMatchSolverSnapshot(import.meta.path)
19
49
  })
@@ -36,3 +36,40 @@ test("endpoint collision detours preserve both endpoint anchors", () => {
36
36
  ),
37
37
  ).toBe(true)
38
38
  })
39
+
40
+ test("endpoint collision detours preserve the remainder of a U-shaped path", () => {
41
+ const path = [
42
+ { x: 0, y: 1 },
43
+ { x: 2, y: 1 },
44
+ { x: 2, y: -1 },
45
+ { x: 4, y: -1 },
46
+ ]
47
+
48
+ const obstacle = {
49
+ minX: 1,
50
+ maxX: 3,
51
+ minY: 0,
52
+ maxY: 2,
53
+ kind: "chip" as const,
54
+ chipId: "U1",
55
+ }
56
+
57
+ for (const collidingSegmentIndex of [0, 2]) {
58
+ const detours = generateEndpointCollisionDetours({
59
+ path,
60
+ collidingSegmentIndex,
61
+ obstacle,
62
+ })
63
+
64
+ expect(detours.length).toBeGreaterThan(0)
65
+ const preservedSegment =
66
+ collidingSegmentIndex === 0 ? path.slice(-2) : path.slice(0, 2)
67
+ for (const detour of detours) {
68
+ expect(detour[0]).toEqual(path[0])
69
+ expect(detour.at(-1)).toEqual(path.at(-1))
70
+ expect(
71
+ collidingSegmentIndex === 0 ? detour.slice(-2) : detour.slice(0, 2),
72
+ ).toEqual(preservedSegment)
73
+ }
74
+ }
75
+ })
@@ -0,0 +1,174 @@
1
+ import type { Point } from "@tscircuit/math-utils"
2
+ import { expect, test } from "bun:test"
3
+ import { countPathIntersections } from "lib/solvers/Example28Solver/geometry"
4
+ import type { SolvedTracePath } from "lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver"
5
+ import { TraceOverlapShiftSolver } from "lib/solvers/TraceOverlapShiftSolver/TraceOverlapShiftSolver"
6
+ import type { InputProblem } from "lib/types/InputProblem"
7
+
8
+ const inputProblem: InputProblem = {
9
+ chips: [],
10
+ directConnections: [],
11
+ netConnections: [],
12
+ availableNetLabelOrientations: {},
13
+ }
14
+
15
+ const makeTrace = (
16
+ mspPairId: string,
17
+ globalConnNetId: string,
18
+ tracePath: Point[],
19
+ ) =>
20
+ ({
21
+ mspPairId,
22
+ globalConnNetId,
23
+ tracePath,
24
+ }) as SolvedTracePath
25
+
26
+ const createSolver = (inputTracePaths: SolvedTracePath[]) =>
27
+ new TraceOverlapShiftSolver({
28
+ inputProblem,
29
+ inputTracePaths,
30
+ globalConnMap: {} as any,
31
+ })
32
+
33
+ test("separates a collinear point contact using internal rails", () => {
34
+ const traceA = makeTrace("trace-a", "net-a", [
35
+ { x: 0.65, y: 0.825 },
36
+ { x: 0.45, y: 0.825 },
37
+ { x: 0, y: 0.825 },
38
+ { x: 0, y: -0.825 },
39
+ { x: -0.45, y: -0.825 },
40
+ { x: -0.65, y: -0.825 },
41
+ ])
42
+ const traceB = makeTrace("trace-b", "net-b", [
43
+ { x: 1.4, y: -0.725 },
44
+ { x: 1.6, y: -0.725 },
45
+ { x: 1.6, y: 1.365 },
46
+ { x: 0, y: 1.365 },
47
+ { x: 0, y: 0.825 },
48
+ { x: -0.65, y: 0.825 },
49
+ ])
50
+ const solver = createSolver([traceA, traceB])
51
+
52
+ expect(
53
+ solver
54
+ .findNextOverlapIssue()!
55
+ .overlappingTraceSegments.map(
56
+ (group) => group.pathsWithOverlap[0]!.traceSegmentIndex,
57
+ ),
58
+ ).toEqual([2, 3])
59
+
60
+ solver.solve()
61
+
62
+ const correctedA = solver.correctedTraceMap[traceA.mspPairId]!
63
+ const correctedB = solver.correctedTraceMap[traceB.mspPairId]!
64
+ expect(
65
+ countPathIntersections(correctedA.tracePath, correctedB.tracePath),
66
+ ).toBe(0)
67
+ expect(correctedA.tracePath[2]!.x).toBeCloseTo(0)
68
+ expect(correctedB.tracePath[3]!.x).toBeCloseTo(-0.1)
69
+ })
70
+
71
+ test("preserves deterministic separation for a compound overlap", () => {
72
+ const lowerTrace = makeTrace("lower", "lower-net", [
73
+ { x: 0, y: 0 },
74
+ { x: 1, y: 0 },
75
+ { x: 1, y: 1 },
76
+ { x: 1, y: 2 },
77
+ { x: 2, y: 2 },
78
+ ])
79
+ const upperTrace = makeTrace("upper", "upper-net", [
80
+ { x: 0, y: 0.2 },
81
+ { x: 1, y: 0.2 },
82
+ { x: 1, y: 1.2 },
83
+ { x: 1, y: 2.2 },
84
+ { x: 2, y: 2.2 },
85
+ ])
86
+ const solver = createSolver([lowerTrace, upperTrace])
87
+
88
+ const issue = solver.findNextOverlapIssue()
89
+ expect(issue?.interactionKind).toBe("overlap")
90
+ expect(
91
+ issue?.overlappingTraceSegments.map(
92
+ (group) => group.pathsWithOverlap.length,
93
+ ),
94
+ ).toEqual([2, 2])
95
+
96
+ solver.solve()
97
+
98
+ const correctedLower = solver.correctedTraceMap[lowerTrace.mspPairId]!
99
+ const correctedUpper = solver.correctedTraceMap[upperTrace.mspPairId]!
100
+ expect(correctedLower.tracePath.slice(1, 4).map((point) => point.x)).toEqual([
101
+ 0.9, 0.9, 0.9,
102
+ ])
103
+ expect(correctedUpper.tracePath.slice(1, 4).map((point) => point.x)).toEqual([
104
+ 1.1, 1.1, 1.1,
105
+ ])
106
+ })
107
+
108
+ test("chooses the simple-overlap separation with fewer intersections", () => {
109
+ const outerTrace = makeTrace("outer", "outer-net", [
110
+ { x: -1, y: -1 },
111
+ { x: 0, y: -1 },
112
+ { x: 0, y: 1 },
113
+ { x: 1, y: 1 },
114
+ ])
115
+ const innerTrace = makeTrace("inner", "inner-net", [
116
+ { x: -1, y: -0.5 },
117
+ { x: 0, y: -0.5 },
118
+ { x: 0, y: 0.5 },
119
+ { x: -1, y: 0.5 },
120
+ ])
121
+ const solver = createSolver([outerTrace, innerTrace])
122
+
123
+ const issue = solver.findNextOverlapIssue()
124
+ expect(issue?.interactionKind).toBe("overlap")
125
+ expect(
126
+ issue?.overlappingTraceSegments.map(
127
+ (group) => group.pathsWithOverlap.length,
128
+ ),
129
+ ).toEqual([1, 1])
130
+
131
+ solver.solve()
132
+
133
+ const correctedOuter = solver.correctedTraceMap[outerTrace.mspPairId]!
134
+ const correctedInner = solver.correctedTraceMap[innerTrace.mspPairId]!
135
+ expect(
136
+ countPathIntersections(correctedOuter.tracePath, correctedInner.tracePath),
137
+ ).toBe(0)
138
+ expect(correctedOuter.tracePath[1]!.x).toBeCloseTo(0.1)
139
+ expect(correctedInner.tracePath[1]!.x).toBeCloseTo(-0.1)
140
+ })
141
+
142
+ test("chooses the point-contact separation direction with fewer intersections", () => {
143
+ const innerTrace = makeTrace("inner", "inner-net", [
144
+ { x: 1.25, y: 0.825 },
145
+ { x: 1.45, y: 0.825 },
146
+ { x: 1.45, y: 0 },
147
+ { x: -1.45, y: 0 },
148
+ { x: -1.45, y: -0.825 },
149
+ { x: -1.25, y: -0.825 },
150
+ ])
151
+ const exteriorTrace = makeTrace("exterior", "exterior-net", [
152
+ { x: 0.5, y: -0.725 },
153
+ { x: -0.075, y: -0.725 },
154
+ { x: -0.075, y: -1.365 },
155
+ { x: -1.45, y: -1.365 },
156
+ { x: -1.45, y: -0.825 },
157
+ { x: -1.65, y: -0.825 },
158
+ ])
159
+ const solver = createSolver([innerTrace, exteriorTrace])
160
+
161
+ solver.solve()
162
+
163
+ const correctedInner = solver.correctedTraceMap[innerTrace.mspPairId]!
164
+ const correctedExterior = solver.correctedTraceMap[exteriorTrace.mspPairId]!
165
+ expect(
166
+ countPathIntersections(
167
+ correctedInner.tracePath,
168
+ correctedExterior.tracePath,
169
+ ),
170
+ ).toBe(0)
171
+ expect(correctedExterior.tracePath[3]!.x).toBeLessThan(
172
+ correctedInner.tracePath[3]!.x,
173
+ )
174
+ })