@tscircuit/schematic-trace-solver 0.0.181 → 0.0.182

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
@@ -15048,7 +15048,13 @@ var pushAnchoredNetLabelsAwayFromInlineLabels = ({
15048
15048
  label.anchorPoint,
15049
15049
  movedLabel.anchorPoint
15050
15050
  );
15051
- const connectorObstructed = inlineBounds.some(
15051
+ const connectorObstructed = outputTraces.some(
15052
+ (trace) => trace.globalConnNetId !== connector.globalConnNetId && findPerpendicularPathCrossings(
15053
+ connector.tracePath,
15054
+ trace.tracePath,
15055
+ { includeTerminalSegments: true }
15056
+ ).length > 0
15057
+ ) || inlineBounds.some(
15052
15058
  (bounds) => pathIntersectsBounds(connector.tracePath, bounds)
15053
15059
  ) || inputProblem.chips.some(
15054
15060
  (chip) => !ownerChipIds.has(chip.chipId) && pathIntersectsBounds(connector.tracePath, {
@@ -5,6 +5,7 @@ import {
5
5
  } from "lib/solvers/AvailableNetOrientationSolver/traces"
6
6
  import type { NetLabelPlacement } from "lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver"
7
7
  import type { SolvedTracePath } from "lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver"
8
+ import { findPerpendicularPathCrossings } from "lib/solvers/TraceCleanupSolver/sub-solver/findIntersectionsWithObstacles"
8
9
  import type { InputProblem } from "lib/types/InputProblem"
9
10
  import { dir, type FacingDirection } from "lib/utils/dir"
10
11
  import { boundsOverlap, getTextBoxBounds } from "lib/utils/textBoxBounds"
@@ -481,6 +482,15 @@ export const pushAnchoredNetLabelsAwayFromInlineLabels = ({
481
482
  movedLabel.anchorPoint,
482
483
  )
483
484
  const connectorObstructed =
485
+ outputTraces.some(
486
+ (trace) =>
487
+ trace.globalConnNetId !== connector.globalConnNetId &&
488
+ findPerpendicularPathCrossings(
489
+ connector.tracePath,
490
+ trace.tracePath,
491
+ { includeTerminalSegments: true },
492
+ ).length > 0,
493
+ ) ||
484
494
  inlineBounds.some((bounds) =>
485
495
  pathIntersectsBounds(connector.tracePath, bounds),
486
496
  ) ||
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/tscircuit/schematic-trace-solver.git"
6
6
  },
7
7
  "main": "dist/index.js",
8
- "version": "0.0.181",
8
+ "version": "0.0.182",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "start": "cosmos",