@tscircuit/core 0.0.64 → 0.0.65

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 CHANGED
@@ -2532,14 +2532,15 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
2532
2532
  const bLayer = "layers" in b && b.layers.length === 1 ? b.layers[0] : dominantLayer ?? "top";
2533
2533
  const pcbPortA = "pcb_port_id" in a ? a.pcb_port_id : null;
2534
2534
  const pcbPortB = "pcb_port_id" in b ? b.pcb_port_id : null;
2535
+ const minTraceWidth = this.getSubcircuit()._parsedProps.minTraceWidth ?? 0.16;
2535
2536
  const ijump = new MultilayerIjump({
2536
- OBSTACLE_MARGIN: 0.3,
2537
+ OBSTACLE_MARGIN: minTraceWidth * 2,
2537
2538
  // isRemovePathLoopsEnabled: true,
2538
- optimizeWithGoalBoxes: false,
2539
- // Boolean(pcbPortA && pcbPortB),
2539
+ optimizeWithGoalBoxes: Boolean(pcbPortA && pcbPortB),
2540
2540
  connMap,
2541
2541
  input: {
2542
2542
  obstacles,
2543
+ minTraceWidth,
2543
2544
  connections: [
2544
2545
  {
2545
2546
  name: this.source_trace_id,
@@ -2654,6 +2655,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
2654
2655
  }
2655
2656
  const bounds = computeObstacleBounds(obstacles);
2656
2657
  const simpleRouteJsonInput = {
2658
+ minTraceWidth: 0.1,
2657
2659
  obstacles,
2658
2660
  connections: [connection],
2659
2661
  bounds,
@@ -450,13 +450,17 @@ export class Trace extends PrimitiveComponent<typeof traceProps> {
450
450
  const pcbPortA = "pcb_port_id" in a ? a.pcb_port_id : null
451
451
  const pcbPortB = "pcb_port_id" in b ? b.pcb_port_id : null
452
452
 
453
+ const minTraceWidth =
454
+ this.getSubcircuit()._parsedProps.minTraceWidth ?? 0.16
455
+
453
456
  const ijump = new MultilayerIjump({
454
- OBSTACLE_MARGIN: 0.3,
457
+ OBSTACLE_MARGIN: minTraceWidth * 2,
455
458
  // isRemovePathLoopsEnabled: true,
456
- optimizeWithGoalBoxes: false, // Boolean(pcbPortA && pcbPortB),
459
+ optimizeWithGoalBoxes: Boolean(pcbPortA && pcbPortB),
457
460
  connMap,
458
461
  input: {
459
462
  obstacles,
463
+ minTraceWidth,
460
464
  connections: [
461
465
  {
462
466
  name: this.source_trace_id!,
@@ -587,6 +591,7 @@ export class Trace extends PrimitiveComponent<typeof traceProps> {
587
591
  const bounds = computeObstacleBounds(obstacles)
588
592
 
589
593
  const simpleRouteJsonInput: SimpleRouteJson = {
594
+ minTraceWidth: 0.1,
590
595
  obstacles,
591
596
  connections: [connection],
592
597
  bounds,
@@ -35,6 +35,7 @@ export interface SimpleRouteConnection {
35
35
 
36
36
  export interface SimpleRouteJson {
37
37
  layerCount: number
38
+ minTraceWidth: number
38
39
  obstacles: Obstacle[]
39
40
  connections: Array<SimpleRouteConnection>
40
41
  bounds: { minX: number; maxX: number; minY: number; maxY: number }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tscircuit/core",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "0.0.64",
5
+ "version": "0.0.65",
6
6
  "types": "dist/index.d.ts",
7
7
  "main": "dist/index.js",
8
8
  "files": [
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@lume/kiwi": "^0.4.3",
38
- "@tscircuit/infgrid-ijump-astar": "^0.0.18",
38
+ "@tscircuit/infgrid-ijump-astar": "^0.0.20",
39
39
  "@tscircuit/math-utils": "^0.0.4",
40
40
  "@tscircuit/props": "^0.0.63",
41
41
  "@tscircuit/soup": "^0.0.71",