@tscircuit/schematic-trace-solver 0.0.77 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/json-bug-report.yml +24 -0
- package/.github/scripts/import-json-bug-report.ts +483 -0
- package/.github/workflows/json-bug-report.yml +154 -0
- package/dist/index.d.ts +32 -10
- package/dist/index.js +216 -74
- package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +4 -0
- package/lib/solvers/AvailableNetOrientationSolver/types.ts +1 -0
- package/lib/solvers/NetLabelNetLabelCollisionSolver/NetLabelNetLabelCollisionSolver.ts +6 -0
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver.ts +21 -1
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver_visualize.ts +9 -3
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/solvePortOnlyPin.ts +27 -2
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts +1 -0
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +121 -30
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/collisions.ts +10 -10
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/mid.ts +5 -8
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/rect.ts +31 -6
- package/lib/solvers/TraceAnchoredNetLabelOverlapSolver/TraceAnchoredNetLabelOverlapSolver.ts +3 -0
- package/lib/solvers/TraceAnchoredNetLabelOverlapSolver/types.ts +1 -0
- package/lib/solvers/VccNetLabelCornerPlacementSolver/VccNetLabelCornerPlacementSolver.ts +3 -0
- package/lib/solvers/VccNetLabelCornerPlacementSolver/types.ts +1 -0
- package/lib/utils/textBoxBounds.ts +40 -0
- package/package.json +1 -1
- package/tests/repros/__snapshots__/manufacturePartNumber-text-box.snap.svg +12 -12
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
<rect width="100%" height="100%" fill="white" />
|
|
3
3
|
<g>
|
|
4
4
|
<circle data-type="point" data-label="U1.3
|
|
5
|
-
x+" data-x="1.05" data-y="-0.1" cx="
|
|
5
|
+
x+" data-x="1.05" data-y="-0.1" cx="359.5652173913043" cy="313.9130434782609" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
|
|
6
6
|
</g>
|
|
7
7
|
<g>
|
|
8
8
|
<circle data-type="point" data-label="U1.4
|
|
9
|
-
x+" data-x="1.05" data-y="0.1" cx="
|
|
9
|
+
x+" data-x="1.05" data-y="0.1" cx="359.5652173913043" cy="283.47826086956525" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
|
|
10
10
|
</g>
|
|
11
11
|
<g>
|
|
12
12
|
<circle data-type="point" data-label="anchorPoint
|
|
13
|
-
orientation: y-" data-x="
|
|
13
|
+
orientation: y-" data-x="2.5300000000000002" data-y="-0.1" cx="584.7826086956521" cy="313.9130434782609" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
14
14
|
</g>
|
|
15
15
|
<g>
|
|
16
|
-
<polyline data-points="1.05,-0.1 1.05,0.1" data-type="line" data-label="" points="
|
|
16
|
+
<polyline data-points="1.05,-0.1 1.05,0.1" data-type="line" data-label="" points="359.5652173913043,313.9130434782609 359.5652173913043,283.47826086956525" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
17
17
|
</g>
|
|
18
18
|
<g>
|
|
19
|
-
<polyline data-points="1.05,-0.1
|
|
19
|
+
<polyline data-points="1.05,-0.1 2.5300000000000002,-0.1 2.5300000000000002,0.1 1.05,0.1" data-type="line" data-label="" points="359.5652173913043,313.9130434782609 584.7826086956521,313.9130434782609 584.7826086956521,283.47826086956525 359.5652173913043,283.47826086956525" fill="none" stroke="purple" stroke-width="1" />
|
|
20
20
|
</g>
|
|
21
21
|
<g>
|
|
22
|
-
<rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="40" y="
|
|
22
|
+
<rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="40.00000000000006" y="253.0434782608696" width="319.56521739130426" height="91.30434782608691" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.006571428571428573" />
|
|
23
23
|
</g>
|
|
24
24
|
<g>
|
|
25
|
-
<rect data-type="rect" data-label="SOMETHING_THAT_IS_LONG" data-x="0.79" data-y="-0.43" x="
|
|
25
|
+
<rect data-type="rect" data-label="SOMETHING_THAT_IS_LONG" data-x="0.79" data-y="-0.43" x="100.86956521739135" y="350.4347826086956" width="438.26086956521726" height="27.39130434782612" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.006571428571428573" />
|
|
26
26
|
</g>
|
|
27
27
|
<g>
|
|
28
28
|
<rect data-type="rect" data-label="netId: GND
|
|
29
|
-
globalConnNetId: connectivity_net0" data-x="
|
|
29
|
+
globalConnNetId: connectivity_net0" data-x="2.5300000000000002" data-y="-0.33999999999999997" x="569.5652173913043" y="313.9130434782609" width="30.43478260869574" height="73.04347826086956" fill="#00000066" stroke="#000000" stroke-width="0.006571428571428573" />
|
|
30
30
|
</g>
|
|
31
31
|
<g id="crosshair" style="display: none">
|
|
32
32
|
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
@@ -56,12 +56,12 @@ globalConnNetId: connectivity_net0" data-x="1.25" data-y="-0.33999999999999997"
|
|
|
56
56
|
|
|
57
57
|
// Calculate real coordinates using inverse transformation
|
|
58
58
|
const matrix = {
|
|
59
|
-
"a":
|
|
59
|
+
"a": 152.17391304347822,
|
|
60
60
|
"c": 0,
|
|
61
|
-
"e":
|
|
61
|
+
"e": 199.7826086956522,
|
|
62
62
|
"b": 0,
|
|
63
|
-
"d": -
|
|
64
|
-
"f":
|
|
63
|
+
"d": -152.17391304347822,
|
|
64
|
+
"f": 298.69565217391306
|
|
65
65
|
};
|
|
66
66
|
// Manually invert and apply the affine transform
|
|
67
67
|
// Since we only use translate and scale, we can directly compute:
|