-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from tscircuit/samenet
Autorouter same-net detection improvements, example1 fully routing
- Loading branch information
Showing
7 changed files
with
102 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { PrimitiveComponent } from "lib/components/base-components/PrimitiveComponent" | ||
import { Net } from "lib/components/primitive-components/Net" | ||
|
||
export const createNetsFromProps = ( | ||
component: PrimitiveComponent, | ||
props: (string | undefined | null)[], | ||
) => { | ||
for (const prop of props) { | ||
if (typeof prop === "string" && prop.startsWith("net.")) { | ||
if (!component.getSubcircuit().selectOne(prop)) { | ||
component.getSubcircuit().add(new Net({ name: prop.split("net.")[1] })) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.