@tscircuit/core 0.0.167 → 0.0.169
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2905,7 +2905,6 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2905
2905
|
});
|
|
2906
2906
|
}
|
|
2907
2907
|
doInitialPartsEngineRender() {
|
|
2908
|
-
console.log("doInitialPartsEngineRender", this);
|
|
2909
2908
|
const { partsEngine } = this.getSubcircuit()._parsedProps;
|
|
2910
2909
|
if (!partsEngine) return;
|
|
2911
2910
|
const { db } = this.root;
|
|
@@ -2933,7 +2932,6 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2933
2932
|
}
|
|
2934
2933
|
updatePartsEngineRender() {
|
|
2935
2934
|
const { db } = this.root;
|
|
2936
|
-
console.log("updatePartsEngineRender", this);
|
|
2937
2935
|
const source_component = db.source_component.get(this.source_component_id);
|
|
2938
2936
|
if (!source_component) return;
|
|
2939
2937
|
if (source_component.supplier_part_numbers) return;
|
|
@@ -3561,7 +3559,7 @@ var pushEdgesOfSchematicTraceToPreventOverlap = ({
|
|
|
3561
3559
|
[mySegment.from, mySegment.to],
|
|
3562
3560
|
[otherEdge.from, otherEdge.to],
|
|
3563
3561
|
{
|
|
3564
|
-
lineThickness: 0.
|
|
3562
|
+
lineThickness: 0.05
|
|
3565
3563
|
}
|
|
3566
3564
|
)
|
|
3567
3565
|
);
|
|
@@ -3581,6 +3579,7 @@ var pushEdgesOfSchematicTraceToPreventOverlap = ({
|
|
|
3581
3579
|
|
|
3582
3580
|
// lib/components/primitive-components/Trace/create-schematic-trace-crossing-segments.ts
|
|
3583
3581
|
import { doesLineIntersectLine as doesLineIntersectLine2 } from "@tscircuit/math-utils";
|
|
3582
|
+
import { getUnitVectorFromPointAToB } from "@tscircuit/math-utils";
|
|
3584
3583
|
var createSchematicTraceCrossingSegments = ({
|
|
3585
3584
|
edges,
|
|
3586
3585
|
db,
|
|
@@ -3606,14 +3605,19 @@ var createSchematicTraceCrossingSegments = ({
|
|
|
3606
3605
|
const intersectX = edgeOrientation === "vertical" ? edge.from.x : otherEdge.from.x;
|
|
3607
3606
|
const intersectY = edgeOrientation === "vertical" ? otherEdge.from.y : edge.from.y;
|
|
3608
3607
|
const crossingSegmentLength = 0.1;
|
|
3608
|
+
const lastDrawnPoint = edge.from;
|
|
3609
3609
|
const crossingPoint = { x: intersectX, y: intersectY };
|
|
3610
|
+
const crossingUnitVec = getUnitVectorFromPointAToB(
|
|
3611
|
+
lastDrawnPoint,
|
|
3612
|
+
crossingPoint
|
|
3613
|
+
);
|
|
3610
3614
|
const beforeCrossing = {
|
|
3611
|
-
x:
|
|
3612
|
-
y:
|
|
3615
|
+
x: crossingPoint.x - crossingUnitVec.x * crossingSegmentLength / 2,
|
|
3616
|
+
y: crossingPoint.y - crossingUnitVec.y * crossingSegmentLength / 2
|
|
3613
3617
|
};
|
|
3614
3618
|
const afterCrossing = {
|
|
3615
|
-
x:
|
|
3616
|
-
y:
|
|
3619
|
+
x: crossingPoint.x + crossingUnitVec.x * crossingSegmentLength / 2,
|
|
3620
|
+
y: crossingPoint.y + crossingUnitVec.y * crossingSegmentLength / 2
|
|
3617
3621
|
};
|
|
3618
3622
|
const newEdges = [
|
|
3619
3623
|
{ from: edge.from, to: beforeCrossing },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.169",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@lume/kiwi": "^0.4.3",
|
|
40
40
|
"@tscircuit/footprinter": "^0.0.77",
|
|
41
41
|
"@tscircuit/infgrid-ijump-astar": "^0.0.24",
|
|
42
|
-
"@tscircuit/math-utils": "^0.0.
|
|
42
|
+
"@tscircuit/math-utils": "^0.0.5",
|
|
43
43
|
"@tscircuit/props": "^0.0.93",
|
|
44
|
-
"@tscircuit/soup-util": "^0.0.40",
|
|
45
44
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
45
|
+
"@tscircuit/soup-util": "^0.0.40",
|
|
46
46
|
"circuit-json": "^0.0.99",
|
|
47
47
|
"circuit-json-to-connectivity-map": "^0.0.17",
|
|
48
48
|
"circuit-to-svg": "^0.0.71",
|