@tscircuit/schematic-trace-solver 0.0.120 → 0.0.122

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 (40) hide show
  1. package/dist/index.d.ts +10 -3
  2. package/dist/index.js +350 -78
  3. package/lib/solvers/RailNetLabelCornerPlacementSolver/RailNetLabelCornerPlacementSolver.ts +223 -21
  4. package/lib/solvers/RailNetLabelCornerPlacementSolver/types.ts +3 -3
  5. package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +34 -9
  6. package/lib/solvers/TraceCleanupSolver/sameNetRailAlignment/evaluateRailGroup.ts +79 -59
  7. package/lib/solvers/TraceCleanupSolver/sameNetRailAlignment/getRailAlignmentFallbackCoordinates.ts +96 -0
  8. package/lib/utils/doesPathCoincideWithTraces.ts +71 -1
  9. package/package.json +1 -1
  10. package/site/bug-reports/bug-report-20260804T095800Z.page.tsx +4 -0
  11. package/tests/bug-reports/bug-report-20260706T213649Z/__snapshots__/bug-report-20260706T213649Z.snap.svg +4 -4
  12. package/tests/bug-reports/bug-report-20260706T220324Z/__snapshots__/bug-report-20260706T220324Z.snap.svg +5 -5
  13. package/tests/bug-reports/bug-report-20260717T042845Z/__snapshots__/bug-report-20260717T042845Z.snap.svg +12 -12
  14. package/tests/bug-reports/bug-report-20260721T221026Z/__snapshots__/bug-report-20260721T221026Z.snap.svg +2 -2
  15. package/tests/bug-reports/bug-report-20260728T144234Z/__snapshots__/bug-report-20260728T144234Z.snap.svg +2 -2
  16. package/tests/bug-reports/bug-report-20260804T095800Z/__snapshots__/bug-report-20260804T095800Z.snap.svg +135 -0
  17. package/tests/bug-reports/bug-report-20260804T095800Z/bug-report-20260804T095800Z.json +634 -0
  18. package/tests/bug-reports/bug-report-20260804T095800Z/bug-report-20260804T095800Z.test.ts +12 -0
  19. package/tests/examples/__snapshots__/example12.snap.svg +2 -2
  20. package/tests/examples/__snapshots__/example13.snap.svg +4 -4
  21. package/tests/examples/__snapshots__/example14.snap.svg +36 -36
  22. package/tests/examples/__snapshots__/example31.snap.svg +6 -6
  23. package/tests/examples/__snapshots__/example43.snap.svg +2 -2
  24. package/tests/examples/__snapshots__/example44.snap.svg +2 -2
  25. package/tests/repros/__snapshots__/board-15984-same-net-junction.snap.svg +2 -2
  26. package/tests/repros/__snapshots__/bugreport-001-gnd-overlap.snap.svg +26 -26
  27. package/tests/repros/__snapshots__/netlabel-connector-through-rail-label.snap.svg +2 -2
  28. package/tests/repros/__snapshots__/repro-atmega328p-fault-pullup.snap.svg +2 -2
  29. package/tests/repros/__snapshots__/repro-atmega328p-missing-gnd-netlabel.snap.svg +2 -2
  30. package/tests/repros/__snapshots__/repro-bq25895-cross-net-trace-overlap.snap.svg +101 -0
  31. package/tests/repros/__snapshots__/repro-missing-trace-netlabel.snap.svg +18 -18
  32. package/tests/repros/__snapshots__/repro-netlabel-overlap-trace.snap.svg +3 -3
  33. package/tests/repros/__snapshots__/repro-nrf52810-clock-routing.snap.svg +82 -0
  34. package/tests/repros/assets/repro-bq25895-cross-net-trace-overlap.input.json +498 -0
  35. package/tests/repros/assets/repro-nrf52810-clock-routing.input.json +234 -0
  36. package/tests/repros/repro-bq25895-cross-net-trace-overlap.test.ts +88 -0
  37. package/tests/repros/repro-missing-trace-netlabel.test.ts +12 -0
  38. package/tests/repros/repro-netlabel-overlap-trace.test.ts +38 -0
  39. package/tests/repros/repro-nrf52810-clock-routing.test.ts +28 -0
  40. package/tests/solvers/TraceCleanupSolver/alignSameNetRails-trace-clearance.test.ts +68 -0
@@ -0,0 +1,82 @@
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="-5.4,5.1 -4.54,4.99" data-type="line" data-label="" points="150.6514356282803,277.8141401667182 180.38900895338065,281.61778326644026" fill="none" stroke="hsl(160, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-5.4,4.9 -3.46,4.99" data-type="line" data-label="" points="150.6514356282803,284.7298548934856 217.73386847792528,281.61778326644026" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-4.54,4.99 -5,3.3800000000000003" data-type="line" data-label="" points="180.38900895338065,281.61778326644026 164.48286508181536,337.2892868169188" fill="none" stroke="hsl(192, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-3.46,4.99 -3,3.3800000000000003" data-type="line" data-label="" points="217.73386847792528,281.61778326644026 233.64001234949058,337.2892868169188" fill="none" stroke="hsl(192, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="4.6,5.1 5.45,5" data-type="line" data-label="" points="496.43717196665636,277.8141401667182 525.8289595554184,281.2719975301019" fill="none" stroke="hsl(288, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="4.6,4.9 6.55,5" data-type="line" data-label="" points="496.43717196665636,284.7298548934856 563.8653905526397,281.2719975301019" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="5.45,5 5,3.3800000000000003" data-type="line" data-label="" points="525.8289595554184,281.2719975301019 510.26860142019143,337.2892868169188" fill="none" stroke="hsl(192, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="6.55,5 7,3.3800000000000003" data-type="line" data-label="" points="563.8653905526397,281.2719975301019 579.4257486878666,337.2892868169188" fill="none" stroke="hsl(192, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-4,5.71 -4.02,4.29" data-type="line" data-label="" points="199.06143871565297,256.7212102500772 198.36986724297623,305.82278481012656" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4,5.71 -5,2.6199999999999997" data-type="line" data-label="" points="199.06143871565297,256.7212102500772 164.48286508181536,363.5690027786354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4,5.71 -3,2.6199999999999997" data-type="line" data-label="" points="199.06143871565297,256.7212102500772 233.64001234949058,363.5690027786354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.02,4.29 -5,2.6199999999999997" data-type="line" data-label="" points="198.36986724297623,305.82278481012656 164.48286508181536,363.5690027786354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-4.02,4.29 -3,2.6199999999999997" data-type="line" data-label="" points="198.36986724297623,305.82278481012656 233.64001234949058,363.5690027786354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-5,2.6199999999999997 -3,2.6199999999999997" data-type="line" data-label="" points="164.48286508181536,363.5690027786354 233.64001234949058,363.5690027786354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="5,2.6199999999999997 7,2.6199999999999997" data-type="line" data-label="" points="510.26860142019143,363.5690027786354 579.4257486878666,363.5690027786354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-3.46,4.99 -3,4.99 -3,3.3800000000000003" data-type="line" data-label="" points="217.73386847792528,281.61778326644026 233.64001234949058,281.61778326644026 233.64001234949058,337.2892868169188" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="6.55,5 7,5 7,3.3800000000000003" data-type="line" data-label="" points="563.8653905526397,281.2719975301019 579.4257486878666,281.2719975301019 579.4257486878666,337.2892868169188" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-3,2.6199999999999997 -3,2.4199999999999995 -5,2.4199999999999995 -5,2.6199999999999997" data-type="line" data-label="" points="233.64001234949058,363.5690027786354 233.64001234949058,370.48471750540295 164.48286508181536,370.48471750540295 164.48286508181536,363.5690027786354" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="7,2.6199999999999997 7,2.4199999999999995 5,2.4199999999999995 5,2.6199999999999997" data-type="line" data-label="" points="579.4257486878666,363.5690027786354 579.4257486878666,370.48471750540295 510.26860142019143,370.48471750540295 510.26860142019143,363.5690027786354" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4.54,4.99 -4.54,5.1 -4.849000000000001,5.1 -4.849000000000001,4.700000000000001 -5,4.700000000000001 -5,3.3800000000000003" data-type="line" data-label="" points="180.38900895338065,281.61778326644026 180.38900895338065,277.8141401667182 169.7042297005248,277.8141401667182 169.7042297005248,291.6455696202531 164.48286508181536,291.6455696202531 164.48286508181536,337.2892868169188" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-5.4,5.1 -4.849000000000001,5.1 -4.849000000000001,4.99 -4.54,4.99" data-type="line" data-label="" points="150.6514356282803,277.8141401667182 169.7042297005248,277.8141401667182 169.7042297005248,281.61778326644026 180.38900895338065,281.61778326644026" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="5.45,5 5.45,5.1 5.150999999999999,5.1 5.150999999999999,4.700000000000001 5,4.700000000000001 5,3.3800000000000003" data-type="line" data-label="" points="525.8289595554184,281.2719975301019 525.8289595554184,277.8141401667182 515.4899660389009,277.8141401667182 515.4899660389009,291.6455696202531 510.26860142019143,291.6455696202531 510.26860142019143,337.2892868169188" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="4.6,5.1 5.150999999999999,5.1 5.150999999999999,5 5.45,5" data-type="line" data-label="" points="496.43717196665636,277.8141401667182 515.4899660389009,277.8141401667182 515.4899660389009,281.2719975301019 525.8289595554184,281.2719975301019" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-4,5.71 -4,5.76 -5.15,5.76 -5.15,5.659" data-type="line" data-label="" points="199.06143871565297,256.7212102500772 199.06143871565297,254.99228156838532 159.2960790367397,254.99228156838532 159.2960790367397,258.4847175054029" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_30" data-x="-7" data-y="5" x="40" y="270.89842543995064" width="110.6514356282803" height="20.747144180302485" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="schematic_component_31" data-x="-4" data-y="5" x="180.38900895338065" y="256.7212102500772" width="37.34485952454463" height="49.10157456004936" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="schematic_component_32" data-x="-4.9275" data-y="3" x="148.9225069465884" y="337.2892868169188" width="36.13460944736033" height="26.279715961716647" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="schematic_component_33" data-x="-2.9275" data-y="3" x="218.07965421426366" y="337.2892868169188" width="36.134609447360276" height="26.279715961716647" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="schematic_component_34" data-x="3" data-y="5" x="385.78573633837607" y="270.89842543995064" width="110.6514356282803" height="20.747144180302485" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="schematic_component_35" data-x="6" data-y="5" x="525.8289595554184" y="266.57610373572095" width="38.03643099722137" height="29.391787588761872" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="schematic_component_36" data-x="5.0725" data-y="3" x="494.70824328496445" y="337.2892868169188" width="36.134609447360276" height="26.279715961716647" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="schematic_component_37" data-x="7.0725" data-y="3" x="563.8653905526398" y="337.2892868169188" width="36.134609447360276" height="26.279715961716647" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="U1 HF Clock" data-x="-7.539999999999999" data-y="5.43" x="53.83142945353508" y="263.29113924050637" width="45.64371719666562" height="6.224143254090734" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="U1 LF Clock" data-x="2.46" data-y="5.43" x="399.6171657919111" y="263.29113924050637" width="45.64371719666565" height="6.224143254090734" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: .X1 &gt; .XTAL1 to .C1 &gt; .pin1
2
+ globalConnNetId: connectivity_net0" data-x="-4.77" data-y="5.324999999999999" x="168.9780796542143" y="262.2537820314912" width="6.915714726767504" height="15.56035813522692" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: .U1 &gt; .XC2 to .X1 &gt; .XTAL2
3
+ globalConnNetId: connectivity_net1" data-x="-5.174" data-y="4.9" x="150.68601420191413" y="281.2719975301018" width="15.560358135226892" height="6.915714726767533" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: .X1 &gt; .XTAL2 to .C2 &gt; .pin1
4
+ globalConnNetId: connectivity_net1" data-x="-3" data-y="5.215" x="230.1821549861068" y="266.05742513121334" width="6.915714726767533" height="15.56035813522692" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: GND
5
+ globalConnNetId: connectivity_net4" data-x="-5.15" data-y="5.449" x="150.99722136461867" y="258.4847175054029" width="16.59771534424206" height="14.523000926211807" fill="#00000066" stroke="#000000" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: GND
6
+ globalConnNetId: connectivity_net4" data-x="-4.02" data-y="4.079" x="190.0710095708552" y="305.85736338376046" width="16.59771534424206" height="14.523000926211807" fill="#00000066" stroke="#000000" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: GND
7
+ globalConnNetId: connectivity_net4" data-x="-3" data-y="2.2099999999999995" x="225.34115467736956" y="370.48471750540295" width="16.597715344242033" height="14.52300092621175" fill="#00000066" stroke="#000000" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: GND
8
+ globalConnNetId: connectivity_net4" data-x="7" data-y="2.2099999999999995" x="571.1268910157456" y="370.48471750540295" width="16.597715344242033" height="14.52300092621175" fill="#00000066" stroke="#000000" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: .X2 &gt; .OSC1 to .C11 &gt; .pin1
9
+ globalConnNetId: connectivity_net2" data-x="5.225" data-y="5.324999999999999" x="514.5909231244211" y="262.2537820314912" width="6.915714726767533" height="15.56035813522692" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: .U1 &gt; .XL2 to .X2 &gt; .OSC2
10
+ globalConnNetId: connectivity_net3" data-x="4.826" data-y="4.9" x="496.47175054029026" y="281.2719975301018" width="15.560358135226807" height="6.915714726767533" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.028919642857142856"/></g><g><rect data-type="rect" data-label="netId: .X2 &gt; .OSC2 to .C12 &gt; .pin1
11
+ globalConnNetId: connectivity_net3" data-x="7" data-y="5.225" x="575.9678913244829" y="265.71163939487496" width="6.915714726767419" height="15.56035813522692" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.028919642857142856"/></g><g><circle data-type="point" data-label="schematic_port_38
12
+ x+" data-x="-5.4" data-y="5.1" cx="150.6514356282803" cy="277.8141401667182" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_39
13
+ x+" data-x="-5.4" data-y="4.9" cx="150.6514356282803" cy="284.7298548934856" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_40
14
+ y+" data-x="-4" data-y="5.71" cx="199.06143871565297" cy="256.7212102500772" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_41
15
+ y-" data-x="-4.02" data-y="4.29" cx="198.36986724297623" cy="305.82278481012656" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_42
16
+ x-" data-x="-4.54" data-y="4.99" cx="180.38900895338065" cy="281.61778326644026" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_43
17
+ x+" data-x="-3.46" data-y="4.99" cx="217.73386847792528" cy="281.61778326644026" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_175
18
+ y+" data-x="-5" data-y="3.3800000000000003" cx="164.48286508181536" cy="337.2892868169188" r="3" fill="hsl(136, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_176
19
+ y-" data-x="-5" data-y="2.6199999999999997" cx="164.48286508181536" cy="363.5690027786354" r="3" fill="hsl(136, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_177
20
+ y+" data-x="-3" data-y="3.3800000000000003" cx="233.64001234949058" cy="337.2892868169188" r="3" fill="hsl(136, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_178
21
+ y-" data-x="-3" data-y="2.6199999999999997" cx="233.64001234949058" cy="363.5690027786354" r="3" fill="hsl(136, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_44
22
+ x+" data-x="4.6" data-y="5.1" cx="496.43717196665636" cy="277.8141401667182" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_45
23
+ x+" data-x="4.6" data-y="4.9" cx="496.43717196665636" cy="284.7298548934856" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_46
24
+ x-" data-x="5.45" data-y="5" cx="525.8289595554184" cy="281.2719975301019" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_47
25
+ x+" data-x="6.55" data-y="5" cx="563.8653905526397" cy="281.2719975301019" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_181
26
+ y+" data-x="5" data-y="3.3800000000000003" cx="510.26860142019143" cy="337.2892868169188" r="3" fill="hsl(136, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_182
27
+ y-" data-x="5" data-y="2.6199999999999997" cx="510.26860142019143" cy="363.5690027786354" r="3" fill="hsl(136, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_183
28
+ y+" data-x="7" data-y="3.3800000000000003" cx="579.4257486878666" cy="337.2892868169188" r="3" fill="hsl(136, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_184
29
+ y-" data-x="7" data-y="2.6199999999999997" cx="579.4257486878666" cy="363.5690027786354" r="3" fill="hsl(136, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
30
+ orientation: y+" data-x="-4.77" data-y="5.1" cx="172.43593701759804" cy="277.8141401667182" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
31
+ orientation: x+" data-x="-5.4" data-y="4.9" cx="150.6514356282803" cy="284.7298548934856" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
32
+ orientation: y+" data-x="-3" data-y="4.99" cx="233.64001234949058" cy="281.61778326644026" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
33
+ orientation: y-" data-x="-5.15" data-y="5.659" cx="159.2960790367397" cy="258.4847175054029" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
34
+ orientation: y-" data-x="-4.02" data-y="4.29" cx="198.36986724297623" cy="305.82278481012656" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
35
+ orientation: y-" data-x="-3" data-y="2.4199999999999995" cx="233.64001234949058" cy="370.48471750540295" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
36
+ orientation: y-" data-x="7" data-y="2.4199999999999995" cx="579.4257486878666" cy="370.48471750540295" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
37
+ orientation: y+" data-x="5.225" data-y="5.1" cx="518.0487804878048" cy="277.8141401667182" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
38
+ orientation: x+" data-x="4.6" data-y="4.9" cx="496.43717196665636" cy="284.7298548934856" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
39
+ orientation: y+" data-x="7" data-y="5" cx="579.4257486878666" cy="281.2719975301019" 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[
40
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
41
+ const svg = e.currentTarget;
42
+ const rect = svg.getBoundingClientRect();
43
+ const x = e.clientX - rect.left;
44
+ const y = e.clientY - rect.top;
45
+ const crosshair = svg.getElementById('crosshair');
46
+ const h = svg.getElementById('crosshair-h');
47
+ const v = svg.getElementById('crosshair-v');
48
+ const coords = svg.getElementById('coordinates');
49
+
50
+ crosshair.style.display = 'block';
51
+ h.setAttribute('x1', '0');
52
+ h.setAttribute('x2', '640');
53
+ h.setAttribute('y1', y);
54
+ h.setAttribute('y2', y);
55
+ v.setAttribute('x1', x);
56
+ v.setAttribute('x2', x);
57
+ v.setAttribute('y1', '0');
58
+ v.setAttribute('y2', '640');
59
+
60
+ // Calculate real coordinates using inverse transformation
61
+ const matrix = {"a":34.57857363383761,"c":0,"e":337.3757332510034,"b":0,"d":-34.57857363383761,"f":454.1648656992899};
62
+ // Manually invert and apply the affine transform
63
+ // Since we only use translate and scale, we can directly compute:
64
+ // x' = (x - tx) / sx
65
+ // y' = (y - ty) / sy
66
+ const sx = matrix.a;
67
+ const sy = matrix.d;
68
+ const tx = matrix.e;
69
+ const ty = matrix.f;
70
+ const realPoint = {
71
+ x: (x - tx) / sx,
72
+ y: (y - ty) / sy // Flip y back since we used negative scale
73
+ }
74
+
75
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
76
+ coords.setAttribute('x', (x + 5).toString());
77
+ coords.setAttribute('y', (y - 5).toString());
78
+ });
79
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
80
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
81
+ });
82
+ ]]></script></svg>
@@ -0,0 +1,498 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 0,
7
+ "y": 0
8
+ },
9
+ "width": 3.4000000000000004,
10
+ "height": 7.5,
11
+ "pins": [
12
+ {
13
+ "pinId": "schematic_port_0",
14
+ "x": -1.7000000000000002,
15
+ "y": 1.5000000000000004
16
+ },
17
+ {
18
+ "pinId": "schematic_port_1",
19
+ "x": -1.7000000000000002,
20
+ "y": 0.7500000000000004
21
+ },
22
+ {
23
+ "pinId": "schematic_port_2",
24
+ "x": -1.7000000000000002,
25
+ "y": 0.5000000000000004
26
+ },
27
+ {
28
+ "pinId": "schematic_port_3",
29
+ "x": -1.7000000000000002,
30
+ "y": -0.9500000000000002
31
+ },
32
+ {
33
+ "pinId": "schematic_port_4",
34
+ "x": -1.7000000000000002,
35
+ "y": -1.8500000000000005
36
+ },
37
+ {
38
+ "pinId": "schematic_port_5",
39
+ "x": -1.7000000000000002,
40
+ "y": -1.6000000000000005
41
+ },
42
+ {
43
+ "pinId": "schematic_port_6",
44
+ "x": -1.7000000000000002,
45
+ "y": -2.1000000000000005
46
+ },
47
+ {
48
+ "pinId": "schematic_port_7",
49
+ "x": -1.7000000000000002,
50
+ "y": -2.3500000000000005
51
+ },
52
+ {
53
+ "pinId": "schematic_port_8",
54
+ "x": -1.7000000000000002,
55
+ "y": -2.6000000000000005
56
+ },
57
+ {
58
+ "pinId": "schematic_port_9",
59
+ "x": -1.7000000000000002,
60
+ "y": -0.04999999999999982
61
+ },
62
+ {
63
+ "pinId": "schematic_port_10",
64
+ "x": 1.7000000000000002,
65
+ "y": -2.6950000000000003
66
+ },
67
+ {
68
+ "pinId": "schematic_port_11",
69
+ "x": 1.7000000000000002,
70
+ "y": -1.5450000000000004
71
+ },
72
+ {
73
+ "pinId": "schematic_port_12",
74
+ "x": 1.7000000000000002,
75
+ "y": -0.8950000000000005
76
+ },
77
+ {
78
+ "pinId": "schematic_port_13",
79
+ "x": 1.7000000000000002,
80
+ "y": -0.24500000000000055
81
+ },
82
+ {
83
+ "pinId": "schematic_port_14",
84
+ "x": 1.7000000000000002,
85
+ "y": 0.5549999999999997
86
+ },
87
+ {
88
+ "pinId": "schematic_port_15",
89
+ "x": 1.7000000000000002,
90
+ "y": 2.6950000000000003
91
+ },
92
+ {
93
+ "pinId": "schematic_port_16",
94
+ "x": 1.7000000000000002,
95
+ "y": 1.505
96
+ },
97
+ {
98
+ "pinId": "schematic_port_17",
99
+ "x": 1.7000000000000002,
100
+ "y": 1.255
101
+ },
102
+ {
103
+ "pinId": "schematic_port_18",
104
+ "x": -1.7000000000000002,
105
+ "y": 2.6000000000000005
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "chipId": "schematic_component_1",
111
+ "center": {
112
+ "x": -10.8,
113
+ "y": 1.4
114
+ },
115
+ "width": 2.3999999999999986,
116
+ "height": 1,
117
+ "pins": [
118
+ {
119
+ "pinId": "schematic_port_19",
120
+ "x": -9.600000000000001,
121
+ "y": 1.7
122
+ },
123
+ {
124
+ "pinId": "schematic_port_20",
125
+ "x": -9.600000000000001,
126
+ "y": 1.5
127
+ },
128
+ {
129
+ "pinId": "schematic_port_21",
130
+ "x": -9.600000000000001,
131
+ "y": 1.2999999999999998
132
+ },
133
+ {
134
+ "pinId": "schematic_port_22",
135
+ "x": -9.600000000000001,
136
+ "y": 1.0999999999999999
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ "chipId": "schematic_component_2",
142
+ "center": {
143
+ "x": -4.5,
144
+ "y": 4.05
145
+ },
146
+ "width": 2.2,
147
+ "height": 0.5999999999999996,
148
+ "pins": [
149
+ {
150
+ "pinId": "schematic_port_23",
151
+ "x": -3.4,
152
+ "y": 4.1499999999999995
153
+ },
154
+ {
155
+ "pinId": "schematic_port_24",
156
+ "x": -3.4,
157
+ "y": 3.9499999999999997
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "chipId": "schematic_component_3",
163
+ "center": {
164
+ "x": -5.9875,
165
+ "y": 1.45
166
+ },
167
+ "width": 0.9250000000000007,
168
+ "height": 0.7599999999999998,
169
+ "pins": [
170
+ {
171
+ "pinId": "schematic_port_25",
172
+ "x": -6,
173
+ "y": 1.8299999999999998,
174
+ "_facingDirection": "y+"
175
+ },
176
+ {
177
+ "pinId": "schematic_port_26",
178
+ "x": -6,
179
+ "y": 1.07,
180
+ "_facingDirection": "y-"
181
+ }
182
+ ]
183
+ },
184
+ {
185
+ "chipId": "schematic_component_4",
186
+ "center": {
187
+ "x": -2.6375,
188
+ "y": 3.3
189
+ },
190
+ "width": 1.0250000000000004,
191
+ "height": 0.7600000000000007,
192
+ "pins": [
193
+ {
194
+ "pinId": "schematic_port_27",
195
+ "x": -2.7,
196
+ "y": 2.9199999999999995,
197
+ "_facingDirection": "y-"
198
+ },
199
+ {
200
+ "pinId": "schematic_port_28",
201
+ "x": -2.7,
202
+ "y": 3.68,
203
+ "_facingDirection": "y+"
204
+ }
205
+ ]
206
+ },
207
+ {
208
+ "chipId": "schematic_component_5",
209
+ "center": {
210
+ "x": -10.8,
211
+ "y": -3.25
212
+ },
213
+ "width": 2.3000000000000007,
214
+ "height": 1.4000000000000004,
215
+ "pins": [
216
+ {
217
+ "pinId": "schematic_port_29",
218
+ "x": -9.65,
219
+ "y": -2.75
220
+ },
221
+ {
222
+ "pinId": "schematic_port_30",
223
+ "x": -9.65,
224
+ "y": -2.95
225
+ },
226
+ {
227
+ "pinId": "schematic_port_31",
228
+ "x": -9.65,
229
+ "y": -3.15
230
+ },
231
+ {
232
+ "pinId": "schematic_port_32",
233
+ "x": -9.65,
234
+ "y": -3.35
235
+ },
236
+ {
237
+ "pinId": "schematic_port_33",
238
+ "x": -9.65,
239
+ "y": -3.55
240
+ },
241
+ {
242
+ "pinId": "schematic_port_34",
243
+ "x": -9.65,
244
+ "y": -3.75
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "chipId": "schematic_component_6",
250
+ "center": {
251
+ "x": -2.5,
252
+ "y": -0.05000000000000002
253
+ },
254
+ "width": 0.5999999999999996,
255
+ "height": 0.6799999999999999,
256
+ "pins": [
257
+ {
258
+ "pinId": "schematic_port_35",
259
+ "x": -2.2,
260
+ "y": -0.04999999999999997,
261
+ "_facingDirection": "x+"
262
+ },
263
+ {
264
+ "pinId": "schematic_port_36",
265
+ "x": -2.8,
266
+ "y": -0.05000000000000004,
267
+ "_facingDirection": "x-"
268
+ }
269
+ ]
270
+ },
271
+ {
272
+ "chipId": "schematic_component_7",
273
+ "center": {
274
+ "x": -5.705,
275
+ "y": -2.35
276
+ },
277
+ "width": 1.0899999999999999,
278
+ "height": 0.5999999999999996,
279
+ "pins": [
280
+ {
281
+ "pinId": "schematic_port_37",
282
+ "x": -5.8,
283
+ "y": -2.0500000000000003,
284
+ "_facingDirection": "y+"
285
+ },
286
+ {
287
+ "pinId": "schematic_port_38",
288
+ "x": -5.8,
289
+ "y": -2.65,
290
+ "_facingDirection": "y-"
291
+ }
292
+ ]
293
+ },
294
+ {
295
+ "chipId": "schematic_component_8",
296
+ "center": {
297
+ "x": -4.495,
298
+ "y": -0.75
299
+ },
300
+ "width": 1.2100000000000004,
301
+ "height": 0.6000000000000001,
302
+ "pins": [
303
+ {
304
+ "pinId": "schematic_port_39",
305
+ "x": -4.65,
306
+ "y": -0.44999999999999996,
307
+ "_facingDirection": "y+"
308
+ },
309
+ {
310
+ "pinId": "schematic_port_40",
311
+ "x": -4.65,
312
+ "y": -1.05,
313
+ "_facingDirection": "y-"
314
+ }
315
+ ]
316
+ },
317
+ {
318
+ "chipId": "schematic_component_9",
319
+ "center": {
320
+ "x": 4.35,
321
+ "y": 3.25
322
+ },
323
+ "width": 1.0558250000000005,
324
+ "height": 0.8677407000000006,
325
+ "pins": [
326
+ {
327
+ "pinId": "schematic_port_41",
328
+ "x": 3.8220874999999994,
329
+ "y": 3.2526245499999993
330
+ },
331
+ {
332
+ "pinId": "schematic_port_42",
333
+ "x": 4.8779125,
334
+ "y": 3.24737545
335
+ }
336
+ ]
337
+ }
338
+ ],
339
+ "directConnections": [
340
+ {
341
+ "netId": "R1.pin1 to U1.ILIM",
342
+ "pinIds": [
343
+ "schematic_port_35",
344
+ "schematic_port_9"
345
+ ]
346
+ },
347
+ {
348
+ "netId": "J3.pin4 to R4.pin2",
349
+ "pinIds": [
350
+ "schematic_port_32",
351
+ "schematic_port_38"
352
+ ]
353
+ },
354
+ {
355
+ "netId": "R4.pin2 to U1.INT",
356
+ "pinIds": [
357
+ "schematic_port_38",
358
+ "schematic_port_6"
359
+ ]
360
+ },
361
+ {
362
+ "netId": "J3.pin5 to U1.OTG",
363
+ "pinIds": [
364
+ "schematic_port_33",
365
+ "schematic_port_7"
366
+ ]
367
+ },
368
+ {
369
+ "netId": "J3.pin6 to U1.CE",
370
+ "pinIds": [
371
+ "schematic_port_34",
372
+ "schematic_port_8"
373
+ ]
374
+ },
375
+ {
376
+ "netId": "R5.pin1 to L1.pin2",
377
+ "pinIds": [
378
+ "schematic_port_39",
379
+ "schematic_port_42"
380
+ ]
381
+ }
382
+ ],
383
+ "netConnections": [
384
+ {
385
+ "netId": "GND",
386
+ "netLabelWidth": 0.42,
387
+ "netLabelHeight": 0.48,
388
+ "pinIds": [
389
+ "schematic_port_14",
390
+ "schematic_port_22",
391
+ "schematic_port_24",
392
+ "schematic_port_26",
393
+ "schematic_port_28",
394
+ "schematic_port_36"
395
+ ]
396
+ },
397
+ {
398
+ "netId": "VREF",
399
+ "netLabelWidth": 0.42,
400
+ "netLabelHeight": 0.6,
401
+ "pinIds": [
402
+ "schematic_port_29",
403
+ "schematic_port_37"
404
+ ]
405
+ }
406
+ ],
407
+ "textBoxes": [
408
+ {
409
+ "chipId": "schematic_component_0",
410
+ "center": {
411
+ "x": -0.6400000000000001,
412
+ "y": -3.88
413
+ },
414
+ "width": 1.3199999999999998,
415
+ "height": 0.17999999999999972,
416
+ "text": "BQ25895RTWR"
417
+ },
418
+ {
419
+ "chipId": "schematic_component_0",
420
+ "center": {
421
+ "x": -1.1800000000000002,
422
+ "y": 3.865
423
+ },
424
+ "width": 0.3600000000000001,
425
+ "height": 0.24999999999999956,
426
+ "text": "U1"
427
+ },
428
+ {
429
+ "chipId": "schematic_component_1",
430
+ "center": {
431
+ "x": -11.060000000000002,
432
+ "y": 0.7699999999999999
433
+ },
434
+ "width": 1.08,
435
+ "height": 0.17999999999999994,
436
+ "text": "USB Input"
437
+ },
438
+ {
439
+ "chipId": "schematic_component_1",
440
+ "center": {
441
+ "x": -11.48,
442
+ "y": 2.015
443
+ },
444
+ "width": 0.3600000000000012,
445
+ "height": 0.2500000000000002,
446
+ "text": "J1"
447
+ },
448
+ {
449
+ "chipId": "schematic_component_2",
450
+ "center": {
451
+ "x": -4.66,
452
+ "y": 3.62
453
+ },
454
+ "width": 1.08,
455
+ "height": 0.17999999999999972,
456
+ "text": "Phone OTG"
457
+ },
458
+ {
459
+ "chipId": "schematic_component_2",
460
+ "center": {
461
+ "x": -5.08,
462
+ "y": 4.465
463
+ },
464
+ "width": 0.35999999999999943,
465
+ "height": 0.2499999999999991,
466
+ "text": "J2"
467
+ },
468
+ {
469
+ "chipId": "schematic_component_5",
470
+ "center": {
471
+ "x": -11.31,
472
+ "y": -4.08
473
+ },
474
+ "width": 0.4800000000000004,
475
+ "height": 0.17999999999999972,
476
+ "text": "Host"
477
+ },
478
+ {
479
+ "chipId": "schematic_component_5",
480
+ "center": {
481
+ "x": -11.43,
482
+ "y": -2.4349999999999996
483
+ },
484
+ "width": 0.3600000000000012,
485
+ "height": 0.24999999999999956,
486
+ "text": "J3"
487
+ }
488
+ ],
489
+ "availableNetLabelOrientations": {
490
+ "GND": [
491
+ "y-"
492
+ ],
493
+ "VREF": [
494
+ "y+"
495
+ ]
496
+ },
497
+ "maxMspPairDistance": 20
498
+ }