Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Nov 8, 2024
1 parent b5c803a commit 0a8d5c1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/components/primitive-components/Trace/Trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import type { Point } from "@tscircuit/math-utils"
import { getStubEdges } from "lib/utils/schematic/getStubEdges"
import { doesLineIntersectLine } from "@tscircuit/math-utils"
import { pushEdgesOfSchematicTraceToPreventOverlap } from "./push-edges-of-schematic-trace-to-prevent-overlap"
import { createSchematicTraceCrossingSegments } from "./create-schematic-trace-crossing-segments"

type PcbRouteObjective =
| RouteHintPoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import type { SoupUtilObjects } from "@tscircuit/soup-util"
import type { SchematicTrace } from "circuit-json"

/**
* Find all intersections between myEdges and all otherEdges and create a
* segment representing the crossing. Wherever there's a crossing, we create
* 3 new edges. The middle edge has `is_crossing: true` and is 0.01mm wide
*/
export const createSchematicTraceCrossingSegments = ({
edges,
db,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import type { SchematicTrace } from "circuit-json"
import type { SoupUtilObjects } from "@tscircuit/soup-util"
import { doesLineIntersectLine } from "@tscircuit/math-utils"

/**
* Check if these edges run along any other schematic traces, if they do
* push them out of the way
*/
export const pushEdgesOfSchematicTraceToPreventOverlap = ({
edges,
db,
Expand Down

0 comments on commit 0a8d5c1

Please sign in to comment.