@tscircuit/schematic-trace-solver 0.0.53 → 0.0.55
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.d.ts +3 -1
- package/dist/index.js +50 -4
- package/lib/solvers/LongDistancePairSolver/LongDistancePairSolver.ts +10 -1
- package/lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver.ts +14 -0
- package/lib/solvers/SchematicTracePipelineSolver/colorAvailableNetOrientationLabels.ts +2 -2
- package/lib/solvers/SchematicTracePipelineSolver/visualizeInputProblem.ts +7 -0
- package/lib/types/InputProblem.ts +2 -0
- package/lib/utils/arePinsInDifferentSchematicSections.ts +39 -0
- package/package.json +1 -1
- package/site/examples/example32.page.tsx +4 -0
- package/tests/assets/example32.json +148 -0
- package/tests/examples/__snapshots__/example01.snap.svg +2 -2
- package/tests/examples/__snapshots__/example02.snap.svg +4 -4
- package/tests/examples/__snapshots__/example04.snap.svg +2 -2
- package/tests/examples/__snapshots__/example07.snap.svg +4 -4
- package/tests/examples/__snapshots__/example12.snap.svg +3 -3
- package/tests/examples/__snapshots__/example13.snap.svg +6 -6
- package/tests/examples/__snapshots__/example14.snap.svg +4 -4
- package/tests/examples/__snapshots__/example15.snap.svg +7 -7
- package/tests/examples/__snapshots__/example16.snap.svg +3 -3
- package/tests/examples/__snapshots__/example18.snap.svg +3 -3
- package/tests/examples/__snapshots__/example20.snap.svg +3 -3
- package/tests/examples/__snapshots__/example21.snap.svg +7 -7
- package/tests/examples/__snapshots__/example22.snap.svg +3 -3
- package/tests/examples/__snapshots__/example25.snap.svg +3 -3
- package/tests/examples/__snapshots__/example30.snap.svg +2 -2
- package/tests/examples/__snapshots__/example31.snap.svg +1 -1
- package/tests/examples/__snapshots__/example32.snap.svg +391 -0
- package/tests/examples/example32.test.ts +12 -0
- package/tests/solvers/MspConnectionPairSolver/MspConnectionPairSolver_schematicSections.test.ts +70 -0
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ type FacingDirection = "x+" | "x-" | "y+" | "y-";
|
|
|
56
56
|
type ChipId = string;
|
|
57
57
|
type PinId = string;
|
|
58
58
|
type NetId = string;
|
|
59
|
+
type SectionId = string;
|
|
59
60
|
interface InputPin {
|
|
60
61
|
pinId: PinId;
|
|
61
62
|
x: number;
|
|
@@ -71,6 +72,7 @@ interface InputChip {
|
|
|
71
72
|
width: number;
|
|
72
73
|
height: number;
|
|
73
74
|
pins: Array<InputPin>;
|
|
75
|
+
sectionId?: SectionId;
|
|
74
76
|
}
|
|
75
77
|
interface InputDirectConnection {
|
|
76
78
|
pinIds: [PinId, PinId];
|
|
@@ -868,4 +870,4 @@ declare class SchematicTracePipelineSolver extends BaseSolver {
|
|
|
868
870
|
preview(): GraphicsObject;
|
|
869
871
|
}
|
|
870
872
|
|
|
871
|
-
export { type ChipId, type InputChip, type InputDirectConnection, type InputNetConnection, type InputPin, type InputProblem, type NetId, type PinId, SchematicTracePipelineSolver, type SchematicTracePipelineSolverParams, SchematicTraceSingleLineSolver2 };
|
|
873
|
+
export { type ChipId, type InputChip, type InputDirectConnection, type InputNetConnection, type InputPin, type InputProblem, type NetId, type PinId, SchematicTracePipelineSolver, type SchematicTracePipelineSolverParams, SchematicTraceSingleLineSolver2, type SectionId };
|
package/dist/index.js
CHANGED
|
@@ -301,6 +301,30 @@ var getColorFromString = (string, alpha = 1) => {
|
|
|
301
301
|
return `hsl(${hash % 360}, 100%, 50%, ${alpha})`;
|
|
302
302
|
};
|
|
303
303
|
|
|
304
|
+
// lib/utils/arePinsInDifferentSchematicSections.ts
|
|
305
|
+
var getSectionNameForPin = (sectionByChipId, sectionByPinId, pin) => {
|
|
306
|
+
if (pin.chipId) {
|
|
307
|
+
const chipSection = sectionByChipId.get(pin.chipId);
|
|
308
|
+
if (chipSection) return chipSection;
|
|
309
|
+
}
|
|
310
|
+
return sectionByPinId.get(pin.pinId);
|
|
311
|
+
};
|
|
312
|
+
var arePinsInDifferentSchematicSections = (inputProblem, p1, p2) => {
|
|
313
|
+
const sectionByChipId = /* @__PURE__ */ new Map();
|
|
314
|
+
const sectionByPinId = /* @__PURE__ */ new Map();
|
|
315
|
+
for (const chip of inputProblem.chips) {
|
|
316
|
+
if (!chip.sectionId) continue;
|
|
317
|
+
sectionByChipId.set(chip.chipId, chip.sectionId);
|
|
318
|
+
for (const pin of chip.pins) {
|
|
319
|
+
sectionByPinId.set(pin.pinId, chip.sectionId);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
if (sectionByChipId.size === 0) return false;
|
|
323
|
+
const s1 = getSectionNameForPin(sectionByChipId, sectionByPinId, p1);
|
|
324
|
+
const s2 = getSectionNameForPin(sectionByChipId, sectionByPinId, p2);
|
|
325
|
+
return !!s1 && !!s2 && s1 !== s2;
|
|
326
|
+
};
|
|
327
|
+
|
|
304
328
|
// lib/solvers/SchematicTracePipelineSolver/visualizeInputProblem.ts
|
|
305
329
|
var visualizeInputProblem = (inputProblem, opts = {}) => {
|
|
306
330
|
const { connectionAlpha = 0.8, chipAlpha = 0.8 } = opts;
|
|
@@ -337,6 +361,9 @@ ${pin._facingDirection ?? getPinDirection(pin, chip)}`,
|
|
|
337
361
|
const [pinId1, pinId2] = directConn.pinIds;
|
|
338
362
|
const pin1 = pinIdMap.get(pinId1);
|
|
339
363
|
const pin2 = pinIdMap.get(pinId2);
|
|
364
|
+
if (arePinsInDifferentSchematicSections(inputProblem, pin1, pin2)) {
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
340
367
|
graphics.lines.push({
|
|
341
368
|
points: [
|
|
342
369
|
{
|
|
@@ -360,6 +387,9 @@ ${pin._facingDirection ?? getPinDirection(pin, chip)}`,
|
|
|
360
387
|
for (let j = i + 1; j < pins.length; j++) {
|
|
361
388
|
const pin1 = pins[i];
|
|
362
389
|
const pin2 = pins[j];
|
|
390
|
+
if (arePinsInDifferentSchematicSections(inputProblem, pin1, pin2)) {
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
363
393
|
graphics.lines.push({
|
|
364
394
|
points: [
|
|
365
395
|
{ x: pin1.x, y: pin1.y },
|
|
@@ -441,6 +471,9 @@ var MspConnectionPairSolver = class extends BaseSolver {
|
|
|
441
471
|
if (manhattanDist > this.maxMspPairDistance) {
|
|
442
472
|
return;
|
|
443
473
|
}
|
|
474
|
+
if (arePinsInDifferentSchematicSections(this.inputProblem, p1, p2)) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
444
477
|
const pinIdMap2 = new Map(Object.entries(this.pinMap));
|
|
445
478
|
if (doesPairCrossRestrictedCenterLines({
|
|
446
479
|
inputProblem: this.inputProblem,
|
|
@@ -467,7 +500,11 @@ var MspConnectionPairSolver = class extends BaseSolver {
|
|
|
467
500
|
directlyConnectedPins.map((p) => this.pinMap[p]).filter(Boolean),
|
|
468
501
|
{
|
|
469
502
|
maxDistance: this.maxMspPairDistance,
|
|
470
|
-
forbidEdge: (a, b) =>
|
|
503
|
+
forbidEdge: (a, b) => arePinsInDifferentSchematicSections(
|
|
504
|
+
this.inputProblem,
|
|
505
|
+
a,
|
|
506
|
+
b
|
|
507
|
+
) || doesPairCrossRestrictedCenterLines({
|
|
471
508
|
inputProblem: this.inputProblem,
|
|
472
509
|
chipMap: this.chipMap,
|
|
473
510
|
pinIdMap,
|
|
@@ -479,6 +516,9 @@ var MspConnectionPairSolver = class extends BaseSolver {
|
|
|
479
516
|
for (const [pin1, pin2] of msp) {
|
|
480
517
|
const p1Obj = this.pinMap[pin1];
|
|
481
518
|
const p2Obj = this.pinMap[pin2];
|
|
519
|
+
if (arePinsInDifferentSchematicSections(this.inputProblem, p1Obj, p2Obj)) {
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
482
522
|
if (doesPairCrossRestrictedCenterLines({
|
|
483
523
|
inputProblem: this.inputProblem,
|
|
484
524
|
chipMap: this.chipMap,
|
|
@@ -2274,8 +2314,8 @@ orientation: ${p.orientation}`
|
|
|
2274
2314
|
};
|
|
2275
2315
|
|
|
2276
2316
|
// lib/solvers/SchematicTracePipelineSolver/colorAvailableNetOrientationLabels.ts
|
|
2277
|
-
var AVAILABLE_Y_PLUS_COLOR = "#
|
|
2278
|
-
var AVAILABLE_Y_MINUS_COLOR = "#
|
|
2317
|
+
var AVAILABLE_Y_PLUS_COLOR = "#ef4444";
|
|
2318
|
+
var AVAILABLE_Y_MINUS_COLOR = "#000000";
|
|
2279
2319
|
var AVAILABLE_ORIENTATION_FILL_ALPHA = "66";
|
|
2280
2320
|
var colorAvailableNetOrientationLabels = (graphicsObject, inputProblem) => {
|
|
2281
2321
|
const availableOrientations = inputProblem.availableNetLabelOrientations;
|
|
@@ -3461,6 +3501,9 @@ var LongDistancePairSolver = class extends BaseSolver {
|
|
|
3461
3501
|
}).sort((a, b) => a.distance - b.distance).slice(0, NEAREST_NEIGHBOR_COUNT);
|
|
3462
3502
|
for (const neighbor of neighbors) {
|
|
3463
3503
|
const pair = [sourcePin, neighbor.pin];
|
|
3504
|
+
if (arePinsInDifferentSchematicSections(inputProblem, pair[0], pair[1])) {
|
|
3505
|
+
continue;
|
|
3506
|
+
}
|
|
3464
3507
|
const pairKey = pair.map((p) => p.pinId).sort().join("--");
|
|
3465
3508
|
if (!addedPairKeys.has(pairKey)) {
|
|
3466
3509
|
candidatePairs.push(pair);
|
|
@@ -3559,7 +3602,10 @@ var LongDistancePairSolver = class extends BaseSolver {
|
|
|
3559
3602
|
}
|
|
3560
3603
|
getOutput() {
|
|
3561
3604
|
if (!this.solved) {
|
|
3562
|
-
return {
|
|
3605
|
+
return {
|
|
3606
|
+
newTraces: [],
|
|
3607
|
+
allTracesMerged: this.params.alreadySolvedTraces
|
|
3608
|
+
};
|
|
3563
3609
|
}
|
|
3564
3610
|
return {
|
|
3565
3611
|
newTraces: this.solvedLongDistanceTraces,
|
|
@@ -12,6 +12,7 @@ import { doesTraceOverlapWithExistingTraces } from "lib/utils/does-trace-overlap
|
|
|
12
12
|
import { visualizeInputProblem } from "../SchematicTracePipelineSolver/visualizeInputProblem"
|
|
13
13
|
import type { SolvedTracePath } from "../SchematicTraceLinesSolver/SchematicTraceLinesSolver"
|
|
14
14
|
import type { ConnectivityMap } from "connectivity-map"
|
|
15
|
+
import { arePinsInDifferentSchematicSections } from "../../utils/arePinsInDifferentSchematicSections"
|
|
15
16
|
|
|
16
17
|
const NEAREST_NEIGHBOR_COUNT = 3
|
|
17
18
|
|
|
@@ -104,6 +105,11 @@ export class LongDistancePairSolver extends BaseSolver {
|
|
|
104
105
|
InputPin & { chipId: string },
|
|
105
106
|
InputPin & { chipId: string },
|
|
106
107
|
] = [sourcePin, neighbor.pin]
|
|
108
|
+
if (
|
|
109
|
+
arePinsInDifferentSchematicSections(inputProblem, pair[0], pair[1])
|
|
110
|
+
) {
|
|
111
|
+
continue
|
|
112
|
+
}
|
|
107
113
|
const pairKey = pair
|
|
108
114
|
.map((p) => p.pinId)
|
|
109
115
|
.sort()
|
|
@@ -225,7 +231,10 @@ export class LongDistancePairSolver extends BaseSolver {
|
|
|
225
231
|
allTracesMerged: SolvedTracePath[]
|
|
226
232
|
} {
|
|
227
233
|
if (!this.solved) {
|
|
228
|
-
return {
|
|
234
|
+
return {
|
|
235
|
+
newTraces: [],
|
|
236
|
+
allTracesMerged: this.params.alreadySolvedTraces,
|
|
237
|
+
}
|
|
229
238
|
}
|
|
230
239
|
return {
|
|
231
240
|
newTraces: this.solvedLongDistanceTraces,
|
|
@@ -12,6 +12,7 @@ import { doesPairCrossRestrictedCenterLines } from "./doesPairCrossRestrictedCen
|
|
|
12
12
|
import type { GraphicsObject } from "graphics-debug"
|
|
13
13
|
import { getColorFromString } from "lib/utils/getColorFromString"
|
|
14
14
|
import { visualizeInputProblem } from "../SchematicTracePipelineSolver/visualizeInputProblem"
|
|
15
|
+
import { arePinsInDifferentSchematicSections } from "../../utils/arePinsInDifferentSchematicSections"
|
|
15
16
|
|
|
16
17
|
export type MspConnectionPairId = string
|
|
17
18
|
|
|
@@ -110,6 +111,9 @@ export class MspConnectionPairSolver extends BaseSolver {
|
|
|
110
111
|
// Too far apart; skip creating an MSP pair for this net
|
|
111
112
|
return
|
|
112
113
|
}
|
|
114
|
+
if (arePinsInDifferentSchematicSections(this.inputProblem, p1, p2)) {
|
|
115
|
+
return
|
|
116
|
+
}
|
|
113
117
|
// Avoid pairs that would cross restricted center lines
|
|
114
118
|
const pinIdMap = new Map(Object.entries(this.pinMap)) as Map<
|
|
115
119
|
PinId,
|
|
@@ -153,6 +157,11 @@ export class MspConnectionPairSolver extends BaseSolver {
|
|
|
153
157
|
{
|
|
154
158
|
maxDistance: this.maxMspPairDistance,
|
|
155
159
|
forbidEdge: (a, b) =>
|
|
160
|
+
arePinsInDifferentSchematicSections(
|
|
161
|
+
this.inputProblem,
|
|
162
|
+
a as InputPin & { chipId: string },
|
|
163
|
+
b as InputPin & { chipId: string },
|
|
164
|
+
) ||
|
|
156
165
|
doesPairCrossRestrictedCenterLines({
|
|
157
166
|
inputProblem: this.inputProblem,
|
|
158
167
|
chipMap: this.chipMap,
|
|
@@ -166,6 +175,11 @@ export class MspConnectionPairSolver extends BaseSolver {
|
|
|
166
175
|
for (const [pin1, pin2] of msp) {
|
|
167
176
|
const p1Obj = this.pinMap[pin1!]!
|
|
168
177
|
const p2Obj = this.pinMap[pin2!]!
|
|
178
|
+
if (
|
|
179
|
+
arePinsInDifferentSchematicSections(this.inputProblem, p1Obj, p2Obj)
|
|
180
|
+
) {
|
|
181
|
+
continue
|
|
182
|
+
}
|
|
169
183
|
// Skip any edge that would cross a restricted center line (safety filter)
|
|
170
184
|
if (
|
|
171
185
|
doesPairCrossRestrictedCenterLines({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { GraphicsObject } from "graphics-debug"
|
|
2
2
|
import type { InputProblem } from "lib/types/InputProblem"
|
|
3
3
|
|
|
4
|
-
const AVAILABLE_Y_PLUS_COLOR = "#
|
|
5
|
-
const AVAILABLE_Y_MINUS_COLOR = "#
|
|
4
|
+
const AVAILABLE_Y_PLUS_COLOR = "#ef4444"
|
|
5
|
+
const AVAILABLE_Y_MINUS_COLOR = "#000000"
|
|
6
6
|
const AVAILABLE_ORIENTATION_FILL_ALPHA = "66"
|
|
7
7
|
|
|
8
8
|
export const colorAvailableNetOrientationLabels = (
|
|
@@ -2,6 +2,7 @@ import type { GraphicsObject } from "graphics-debug"
|
|
|
2
2
|
import type { PinId, InputPin, InputProblem } from "lib/types/InputProblem"
|
|
3
3
|
import { getColorFromString } from "lib/utils/getColorFromString"
|
|
4
4
|
import { getPinDirection } from "../SchematicTraceLinesSolver/SchematicTraceSingleLineSolver/getPinDirection"
|
|
5
|
+
import { arePinsInDifferentSchematicSections } from "../../utils/arePinsInDifferentSchematicSections"
|
|
5
6
|
|
|
6
7
|
export const visualizeInputProblem = (
|
|
7
8
|
inputProblem: InputProblem,
|
|
@@ -50,6 +51,9 @@ export const visualizeInputProblem = (
|
|
|
50
51
|
const [pinId1, pinId2] = directConn.pinIds
|
|
51
52
|
const pin1 = pinIdMap.get(pinId1)!
|
|
52
53
|
const pin2 = pinIdMap.get(pinId2)!
|
|
54
|
+
if (arePinsInDifferentSchematicSections(inputProblem, pin1, pin2)) {
|
|
55
|
+
continue
|
|
56
|
+
}
|
|
53
57
|
graphics.lines.push({
|
|
54
58
|
points: [
|
|
55
59
|
{
|
|
@@ -74,6 +78,9 @@ export const visualizeInputProblem = (
|
|
|
74
78
|
for (let j = i + 1; j < pins.length; j++) {
|
|
75
79
|
const pin1 = pins[i]!
|
|
76
80
|
const pin2 = pins[j]!
|
|
81
|
+
if (arePinsInDifferentSchematicSections(inputProblem, pin1, pin2)) {
|
|
82
|
+
continue
|
|
83
|
+
}
|
|
77
84
|
graphics.lines.push({
|
|
78
85
|
points: [
|
|
79
86
|
{ x: pin1.x, y: pin1.y },
|
|
@@ -4,6 +4,7 @@ import type { FacingDirection } from "lib/utils/dir"
|
|
|
4
4
|
export type ChipId = string
|
|
5
5
|
export type PinId = string
|
|
6
6
|
export type NetId = string
|
|
7
|
+
export type SectionId = string
|
|
7
8
|
|
|
8
9
|
export interface InputPin {
|
|
9
10
|
pinId: PinId
|
|
@@ -18,6 +19,7 @@ export interface InputChip {
|
|
|
18
19
|
width: number
|
|
19
20
|
height: number
|
|
20
21
|
pins: Array<InputPin>
|
|
22
|
+
sectionId?: SectionId
|
|
21
23
|
}
|
|
22
24
|
export interface InputDirectConnection {
|
|
23
25
|
pinIds: [PinId, PinId]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { InputProblem, InputPin } from "lib/types/InputProblem"
|
|
2
|
+
|
|
3
|
+
const getSectionNameForPin = (
|
|
4
|
+
sectionByChipId: Map<string, string>,
|
|
5
|
+
sectionByPinId: Map<string, string>,
|
|
6
|
+
pin: InputPin & { chipId?: string },
|
|
7
|
+
) => {
|
|
8
|
+
if (pin.chipId) {
|
|
9
|
+
const chipSection = sectionByChipId.get(pin.chipId)
|
|
10
|
+
if (chipSection) return chipSection
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return sectionByPinId.get(pin.pinId)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const arePinsInDifferentSchematicSections = (
|
|
17
|
+
inputProblem: InputProblem,
|
|
18
|
+
p1: InputPin & { chipId?: string },
|
|
19
|
+
p2: InputPin & { chipId?: string },
|
|
20
|
+
) => {
|
|
21
|
+
const sectionByChipId = new Map<string, string>()
|
|
22
|
+
const sectionByPinId = new Map<string, string>()
|
|
23
|
+
|
|
24
|
+
for (const chip of inputProblem.chips) {
|
|
25
|
+
if (!chip.sectionId) continue
|
|
26
|
+
|
|
27
|
+
sectionByChipId.set(chip.chipId, chip.sectionId)
|
|
28
|
+
for (const pin of chip.pins) {
|
|
29
|
+
sectionByPinId.set(pin.pinId, chip.sectionId)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (sectionByChipId.size === 0) return false
|
|
34
|
+
|
|
35
|
+
const s1 = getSectionNameForPin(sectionByChipId, sectionByPinId, p1)
|
|
36
|
+
const s2 = getSectionNameForPin(sectionByChipId, sectionByPinId, p2)
|
|
37
|
+
|
|
38
|
+
return !!s1 && !!s2 && s1 !== s2
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chips": [
|
|
3
|
+
{
|
|
4
|
+
"chipId": "schematic_component_0",
|
|
5
|
+
"center": { "x": -4, "y": 3 },
|
|
6
|
+
"width": 0.95,
|
|
7
|
+
"height": 0.29,
|
|
8
|
+
"sectionId": "power",
|
|
9
|
+
"pins": [
|
|
10
|
+
{ "pinId": "B1.1", "x": -4.45, "y": 2.9699999999999998 },
|
|
11
|
+
{ "pinId": "B1.2", "x": -3.55, "y": 2.9699999999999998 }
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"chipId": "schematic_component_1",
|
|
16
|
+
"center": { "x": -2, "y": 3 },
|
|
17
|
+
"width": 0.76,
|
|
18
|
+
"height": 0.5,
|
|
19
|
+
"sectionId": "power",
|
|
20
|
+
"pins": [
|
|
21
|
+
{ "pinId": "SW1.1", "x": -2.38, "y": 3 },
|
|
22
|
+
{ "pinId": "SW1.2", "x": -1.62, "y": 3 }
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"chipId": "schematic_component_2",
|
|
27
|
+
"center": { "x": -3, "y": 1.5 },
|
|
28
|
+
"width": 1.1,
|
|
29
|
+
"height": 0.84,
|
|
30
|
+
"sectionId": "power",
|
|
31
|
+
"pins": [
|
|
32
|
+
{ "pinId": "C3.1", "x": -3.55, "y": 1.5 },
|
|
33
|
+
{ "pinId": "C3.2", "x": -2.45, "y": 1.5 }
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"chipId": "schematic_component_3",
|
|
38
|
+
"center": { "x": 1.5, "y": 2.5 },
|
|
39
|
+
"width": 1.6,
|
|
40
|
+
"height": 1,
|
|
41
|
+
"sectionId": "timer",
|
|
42
|
+
"pins": [
|
|
43
|
+
{ "pinId": "U1.1", "x": 2.7, "y": 2.2 },
|
|
44
|
+
{ "pinId": "U1.2", "x": 0.2999999999999998, "y": 2.2 },
|
|
45
|
+
{ "pinId": "U1.3", "x": 2.7, "y": 2.6 },
|
|
46
|
+
{ "pinId": "U1.4", "x": 0.2999999999999998, "y": 2.8 },
|
|
47
|
+
{ "pinId": "U1.5", "x": 0.2999999999999998, "y": 2.6 },
|
|
48
|
+
{ "pinId": "U1.6", "x": 0.2999999999999998, "y": 2.4 },
|
|
49
|
+
{ "pinId": "U1.7", "x": 2.7, "y": 2.4 },
|
|
50
|
+
{ "pinId": "U1.8", "x": 2.7, "y": 2.8 }
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"chipId": "schematic_component_4",
|
|
55
|
+
"center": { "x": 4, "y": 1.5 },
|
|
56
|
+
"width": 1.1,
|
|
57
|
+
"height": 0.84,
|
|
58
|
+
"sectionId": "timer",
|
|
59
|
+
"pins": [
|
|
60
|
+
{ "pinId": "C2.1", "x": 3.45, "y": 1.5 },
|
|
61
|
+
{ "pinId": "C2.2", "x": 4.55, "y": 1.5 }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"chipId": "schematic_component_5",
|
|
66
|
+
"center": { "x": -4, "y": -1.5 },
|
|
67
|
+
"width": 1.1,
|
|
68
|
+
"height": 0.388910699999999,
|
|
69
|
+
"sectionId": "timing-network",
|
|
70
|
+
"pins": [
|
|
71
|
+
{ "pinId": "R1.1", "x": -4.55, "y": -1.5 },
|
|
72
|
+
{ "pinId": "R1.2", "x": -3.4499999999999997, "y": -1.5 }
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"chipId": "schematic_component_6",
|
|
77
|
+
"center": { "x": -2, "y": -1.5 },
|
|
78
|
+
"width": 1.1,
|
|
79
|
+
"height": 0.388910699999999,
|
|
80
|
+
"sectionId": "timing-network",
|
|
81
|
+
"pins": [
|
|
82
|
+
{ "pinId": "R2.1", "x": -2.55, "y": -1.5 },
|
|
83
|
+
{ "pinId": "R2.2", "x": -1.4500000000000002, "y": -1.5 }
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"chipId": "schematic_component_7",
|
|
88
|
+
"center": { "x": -3, "y": -3 },
|
|
89
|
+
"width": 1.1,
|
|
90
|
+
"height": 0.84,
|
|
91
|
+
"sectionId": "timing-network",
|
|
92
|
+
"pins": [
|
|
93
|
+
{ "pinId": "C1.1", "x": -3.55, "y": -3 },
|
|
94
|
+
{ "pinId": "C1.2", "x": -2.45, "y": -3 }
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"chipId": "schematic_component_8",
|
|
99
|
+
"center": { "x": 2.5, "y": -1.5 },
|
|
100
|
+
"width": 1.1,
|
|
101
|
+
"height": 0.388910699999999,
|
|
102
|
+
"sectionId": "output",
|
|
103
|
+
"pins": [
|
|
104
|
+
{ "pinId": "R3.1", "x": 1.95, "y": -1.5 },
|
|
105
|
+
{ "pinId": "R3.2", "x": 3.05, "y": -1.5 }
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"chipId": "schematic_component_9",
|
|
110
|
+
"center": { "x": 4.5, "y": -1.5 },
|
|
111
|
+
"width": 1.13,
|
|
112
|
+
"height": 0.65,
|
|
113
|
+
"sectionId": "output",
|
|
114
|
+
"pins": [
|
|
115
|
+
{ "pinId": "D1.1", "x": 3.96, "y": -1.5 },
|
|
116
|
+
{ "pinId": "D1.2", "x": 5.04, "y": -1.5 }
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"directConnections": [
|
|
121
|
+
{ "pinIds": ["B1.1", "SW1.1"], "netId": ".B1 > .pin1 to .SW1 > .pin1" },
|
|
122
|
+
{ "pinIds": ["U1.5", "C2.1"], "netId": ".U1 > .CTRL to .C2 > .pin1" },
|
|
123
|
+
{ "pinIds": ["U1.6", "U1.2"], "netId": ".U1 > .THRES to .U1 > .TRIG" },
|
|
124
|
+
{ "pinIds": ["R1.2", "U1.7"], "netId": ".R1 > .pin2 to .U1 > .DISCH" },
|
|
125
|
+
{ "pinIds": ["U1.7", "R2.1"], "netId": ".U1 > .DISCH to .R2 > .pin1" },
|
|
126
|
+
{ "pinIds": ["R2.2", "U1.6"], "netId": ".R2 > .pin2 to .U1 > .THRES" },
|
|
127
|
+
{ "pinIds": ["U1.6", "C1.1"], "netId": ".U1 > .THRES to .C1 > .pin1" },
|
|
128
|
+
{ "pinIds": ["U1.3", "R3.1"], "netId": ".U1 > .OUT to .R3 > .pin1" },
|
|
129
|
+
{ "pinIds": ["R3.2", "D1.1"], "netId": ".R3 > .pin2 to .D1 > .pin1" }
|
|
130
|
+
],
|
|
131
|
+
"netConnections": [
|
|
132
|
+
{
|
|
133
|
+
"netId": "GND",
|
|
134
|
+
"pinIds": ["B1.2", "C3.2", "U1.1", "C2.2", "C1.2", "D1.2"],
|
|
135
|
+
"netLabelWidth": 0.3
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"netId": "VCC",
|
|
139
|
+
"pinIds": ["SW1.2", "C3.1", "U1.4", "U1.8", "R1.1"],
|
|
140
|
+
"netLabelWidth": 0.3
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"availableNetLabelOrientations": {
|
|
144
|
+
"VCC": ["y+"],
|
|
145
|
+
"GND": ["y-"]
|
|
146
|
+
},
|
|
147
|
+
"maxMspPairDistance": 2.4
|
|
148
|
+
}
|
|
@@ -91,7 +91,7 @@ orientation: y-" data-x="-1.4" data-y="-0.7" cx="356.0396039603961" cy="378.2178
|
|
|
91
91
|
<g>
|
|
92
92
|
<rect data-type="rect" data-label="netId: VCC
|
|
93
93
|
globalConnNetId: connectivity_net0
|
|
94
|
-
available orientations: y+" data-x="-1.1" data-y="0.42500000000000016" x="378.21782178217825" y="228.51485148514848" width="22.178217821782198" height="49.9009900990099" fill="#
|
|
94
|
+
available orientations: y+" data-x="-1.1" data-y="0.42500000000000016" x="378.21782178217825" y="228.51485148514848" width="22.178217821782198" height="49.9009900990099" fill="#ef444466" stroke="#ef4444" stroke-width="0.009017857142857143" />
|
|
95
95
|
</g>
|
|
96
96
|
<g>
|
|
97
97
|
<rect data-type="rect" data-label="netId: EN
|
|
@@ -101,7 +101,7 @@ available orientations: x+, x-" data-x="-1.5" data-y="0" x="320" y="289.50495049
|
|
|
101
101
|
<g>
|
|
102
102
|
<rect data-type="rect" data-label="netId: GND
|
|
103
103
|
globalConnNetId: connectivity_net2
|
|
104
|
-
available orientations: y-" data-x="-1.4" data-y="-0.9249999999999999" x="344.950495049505" y="378.2178217821782" width="22.178217821782198" height="49.9009900990099" fill="#
|
|
104
|
+
available orientations: y-" data-x="-1.4" data-y="-0.9249999999999999" x="344.950495049505" y="378.2178217821782" width="22.178217821782198" height="49.9009900990099" fill="#00000066" stroke="#000000" stroke-width="0.009017857142857143" />
|
|
105
105
|
</g>
|
|
106
106
|
<g id="crosshair" style="display: none">
|
|
107
107
|
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
@@ -197,22 +197,22 @@ orientation: y+" data-x="1.4571549750000001" data-y="0.29999999999999966" cx="53
|
|
|
197
197
|
<g>
|
|
198
198
|
<rect data-type="rect" data-label="netId: VSYS
|
|
199
199
|
globalConnNetId: connectivity_net0
|
|
200
|
-
available orientations: y+" data-x="-1.4574283249999997" data-y="1.5274186000000005" x="283.75416992460123" y="184.33736239143013" width="16.926952823252577" height="38.08564385231816" fill="#
|
|
200
|
+
available orientations: y+" data-x="-1.4574283249999997" data-y="1.5274186000000005" x="283.75416992460123" y="184.33736239143013" width="16.926952823252577" height="38.08564385231816" fill="#ef444466" stroke="#ef4444" stroke-width="0.011815475714285715" />
|
|
201
201
|
</g>
|
|
202
202
|
<g>
|
|
203
203
|
<rect data-type="rect" data-label="netId: GND
|
|
204
204
|
globalConnNetId: connectivity_net1
|
|
205
|
-
available orientations: y-" data-x="-3.0434765500000003" data-y="-0.4250000000000004" x="149.51935252470935" y="349.5798500586337" width="16.926952823252492" height="38.085643852318185" fill="#
|
|
205
|
+
available orientations: y-" data-x="-3.0434765500000003" data-y="-0.4250000000000004" x="149.51935252470935" y="349.5798500586337" width="16.926952823252492" height="38.085643852318185" fill="#00000066" stroke="#000000" stroke-width="0.011815475714285715" />
|
|
206
206
|
</g>
|
|
207
207
|
<g>
|
|
208
208
|
<rect data-type="rect" data-label="netId: GND
|
|
209
209
|
globalConnNetId: connectivity_net1
|
|
210
|
-
available orientations: y-" data-x="1.9148566499999995" data-y="-1.2284186000000008" x="569.1667133165424" y="417.5769937562517" width="16.926952823252577" height="38.08564385231813" fill="#
|
|
210
|
+
available orientations: y-" data-x="1.9148566499999995" data-y="-1.2284186000000008" x="569.1667133165424" y="417.5769937562517" width="16.926952823252577" height="38.08564385231813" fill="#00000066" stroke="#000000" stroke-width="0.011815475714285715" />
|
|
211
211
|
</g>
|
|
212
212
|
<g>
|
|
213
213
|
<rect data-type="rect" data-label="netId: V3_3
|
|
214
214
|
globalConnNetId: connectivity_net2
|
|
215
|
-
available orientations: y+" data-x="1.4571549750000001" data-y="0.5249999999999997" x="530.4292400172993" y="269.1768241481843" width="16.926952823252464" height="38.08564385231813" fill="#
|
|
215
|
+
available orientations: y+" data-x="1.4571549750000001" data-y="0.5249999999999997" x="530.4292400172993" y="269.1768241481843" width="16.926952823252464" height="38.08564385231813" fill="#ef444466" stroke="#ef4444" stroke-width="0.011815475714285715" />
|
|
216
216
|
</g>
|
|
217
217
|
<g id="crosshair" style="display: none">
|
|
218
218
|
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
@@ -29,12 +29,12 @@ orientation: y-" data-x="0.31067575550000137" data-y="-0.5800832909999993" cx="4
|
|
|
29
29
|
<g>
|
|
30
30
|
<rect data-type="rect" data-label="netId: V3_3
|
|
31
31
|
globalConnNetId: connectivity_net0
|
|
32
|
-
available orientations: y+" data-x="0.30397715550000004" data-y="0.8060832909999993" x="375.3918427720889" y="40" width="54.311810198852356" height="122.20157294741779" fill="#
|
|
32
|
+
available orientations: y+" data-x="0.30397715550000004" data-y="0.8060832909999993" x="375.3918427720889" y="40" width="54.311810198852356" height="122.20157294741779" fill="#ef444466" stroke="#ef4444" stroke-width="0.003682440324999998" />
|
|
33
33
|
</g>
|
|
34
34
|
<g>
|
|
35
35
|
<rect data-type="rect" data-label="netId: V3_3
|
|
36
36
|
globalConnNetId: connectivity_net0
|
|
37
|
-
available orientations: y+" data-x="0.31067575550000137" data-y="-0.8060832909999993" x="377.2109082310795" y="477.7984270525822" width="54.3118101988523" height="122.20157294741779" fill="#
|
|
37
|
+
available orientations: y+" data-x="0.31067575550000137" data-y="-0.8060832909999993" x="377.2109082310795" y="477.7984270525822" width="54.3118101988523" height="122.20157294741779" fill="#ef444466" stroke="#ef4444" stroke-width="0.003682440324999998" />
|
|
38
38
|
</g>
|
|
39
39
|
<g id="crosshair" style="display: none">
|
|
40
40
|
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
@@ -137,22 +137,22 @@ orientation: x+" data-x="1.757519574999999" data-y="0.85" cx="547.3539750075635"
|
|
|
137
137
|
<g>
|
|
138
138
|
<rect data-type="rect" data-label="netId: V3_3
|
|
139
139
|
globalConnNetId: connectivity_net0
|
|
140
|
-
available orientations: y+" data-x="-1.8574283249999997" data-y="0.9762093000000004" x="112.7378861431207" y="270.2760341291854" width="23.398233329971788" height="52.64602499243642" fill="#
|
|
140
|
+
available orientations: y+" data-x="-1.8574283249999997" data-y="0.9762093000000004" x="112.7378861431207" y="270.2760341291854" width="23.398233329971788" height="52.64602499243642" fill="#ef444466" stroke="#ef4444" stroke-width="0.00854765388392857" />
|
|
141
141
|
</g>
|
|
142
142
|
<g>
|
|
143
143
|
<rect data-type="rect" data-label="netId: V3_3
|
|
144
144
|
globalConnNetId: connectivity_net0
|
|
145
|
-
available orientations: y+" data-x="1.5999999999999999" data-y="-0.07499999999999998" x="517.2264594931378" y="393.2582365293668" width="23.39823332997173" height="52.64602499243648" fill="#
|
|
145
|
+
available orientations: y+" data-x="1.5999999999999999" data-y="-0.07499999999999998" x="517.2264594931378" y="393.2582365293668" width="23.39823332997173" height="52.64602499243648" fill="#ef444466" stroke="#ef4444" stroke-width="0.00854765388392857" />
|
|
146
146
|
</g>
|
|
147
147
|
<g>
|
|
148
148
|
<rect data-type="rect" data-label="netId: V3_3
|
|
149
149
|
globalConnNetId: connectivity_net0
|
|
150
|
-
available orientations: y+" data-x="1.7580660749999977" data-y="2.5285814" x="535.7187940151516" y="88.66221107549416" width="23.39823332997173" height="52.64602499243642" fill="#
|
|
150
|
+
available orientations: y+" data-x="1.7580660749999977" data-y="2.5285814" x="535.7187940151516" y="88.66221107549416" width="23.39823332997173" height="52.64602499243642" fill="#ef444466" stroke="#ef4444" stroke-width="0.00854765388392857" />
|
|
151
151
|
</g>
|
|
152
152
|
<g>
|
|
153
153
|
<rect data-type="rect" data-label="netId: GND
|
|
154
154
|
globalConnNetId: connectivity_net1
|
|
155
|
-
available orientations: y-" data-x="-2.31430995" data-y="-0.9762093000000004" x="59.28677181348735" y="498.6917639320694" width="23.398233329971788" height="52.64602499243642" fill="#
|
|
155
|
+
available orientations: y-" data-x="-2.31430995" data-y="-0.9762093000000004" x="59.28677181348735" y="498.6917639320694" width="23.398233329971788" height="52.64602499243642" fill="#00000066" stroke="#000000" stroke-width="0.00854765388392857" />
|
|
156
156
|
</g>
|
|
157
157
|
<g>
|
|
158
158
|
<rect data-type="rect" data-label="netId: FLASH_N_CS
|
|
@@ -83,7 +83,7 @@ orientation: y-" data-x="3.511" data-y="-0.4310000000000001" cx="588.11292719167
|
|
|
83
83
|
<g>
|
|
84
84
|
<rect data-type="rect" data-label="netId: VCC
|
|
85
85
|
globalConnNetId: connectivity_net0
|
|
86
|
-
available orientations: y+" data-x="1.7049999999999998" data-y="0.42500000000000004" x="361.54531946508166" y="147.96699257057952" width="23.77414561664193" height="53.49182763744429" fill="#
|
|
86
|
+
available orientations: y+" data-x="1.7049999999999998" data-y="0.42500000000000004" x="361.54531946508166" y="147.96699257057952" width="23.77414561664193" height="53.49182763744429" fill="#ef444466" stroke="#ef4444" stroke-width="0.008412500000000002" />
|
|
87
87
|
</g>
|
|
88
88
|
<g>
|
|
89
89
|
<rect data-type="rect" data-label="netId: OUT
|
|
@@ -93,12 +93,12 @@ available orientations: any" data-x="1.5250000000000001" data-y="-0.448613837499
|
|
|
93
93
|
<g>
|
|
94
94
|
<rect data-type="rect" data-label="netId: GND
|
|
95
95
|
globalConnNetId: connectivity_net2
|
|
96
|
-
available orientations: y-" data-x="1.8499999999999996" data-y="-2.0194553499999994" x="378.78157503714704" y="438.54117979197616" width="23.77414561664193" height="53.49182763744432" fill="#
|
|
96
|
+
available orientations: y-" data-x="1.8499999999999996" data-y="-2.0194553499999994" x="378.78157503714704" y="438.54117979197616" width="23.77414561664193" height="53.49182763744432" fill="#00000066" stroke="#000000" stroke-width="0.008412500000000002" />
|
|
97
97
|
</g>
|
|
98
98
|
<g>
|
|
99
99
|
<rect data-type="rect" data-label="netId: GND
|
|
100
100
|
globalConnNetId: connectivity_net2
|
|
101
|
-
available orientations: y-" data-x="3.511" data-y="-0.6560000000000001" x="576.2258543833581" y="276.466249628529" width="23.77414561664193" height="53.49182763744432" fill="#
|
|
101
|
+
available orientations: y-" data-x="3.511" data-y="-0.6560000000000001" x="576.2258543833581" y="276.466249628529" width="23.77414561664193" height="53.49182763744432" fill="#00000066" stroke="#000000" stroke-width="0.008412500000000002" />
|
|
102
102
|
</g>
|
|
103
103
|
<g id="crosshair" style="display: none">
|
|
104
104
|
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
@@ -252,22 +252,22 @@ orientation: y+" data-x="1.96375" data-y="3" cx="417.91062100986653" cy="157.492
|
|
|
252
252
|
<g>
|
|
253
253
|
<rect data-type="rect" data-label="netId: gnd
|
|
254
254
|
globalConnNetId: connectivity_net3
|
|
255
|
-
available orientations: y-" data-x="3.75" data-y="-1.725" x="527.5217643644805" y="450.0058038305282" width="13.000580383052807" height="29.251305861868843" fill="#
|
|
255
|
+
available orientations: y-" data-x="3.75" data-y="-1.725" x="527.5217643644805" y="450.0058038305282" width="13.000580383052807" height="29.251305861868843" fill="#00000066" stroke="#000000" stroke-width="0.015383928571428571" />
|
|
256
256
|
</g>
|
|
257
257
|
<g>
|
|
258
258
|
<rect data-type="rect" data-label="netId: gnd
|
|
259
259
|
globalConnNetId: connectivity_net3
|
|
260
|
-
available orientations: y-" data-x="-2.125" data-y="-2.2249999999999996" x="145.6297156123041" y="482.5072547881602" width="13.000580383052835" height="29.251305861868843" fill="#
|
|
260
|
+
available orientations: y-" data-x="-2.125" data-y="-2.2249999999999996" x="145.6297156123041" y="482.5072547881602" width="13.000580383052835" height="29.251305861868843" fill="#00000066" stroke="#000000" stroke-width="0.015383928571428571" />
|
|
261
261
|
</g>
|
|
262
262
|
<g>
|
|
263
263
|
<rect data-type="rect" data-label="netId: v5
|
|
264
264
|
globalConnNetId: connectivity_net4
|
|
265
|
-
available orientations: y+" data-x="1.475" data-y="0.225" x="379.6401625072548" y="323.25014509576323" width="13.000580383052807" height="29.251305861868843" fill="#
|
|
265
|
+
available orientations: y+" data-x="1.475" data-y="0.225" x="379.6401625072548" y="323.25014509576323" width="13.000580383052807" height="29.251305861868843" fill="#ef444466" stroke="#ef4444" stroke-width="0.015383928571428571" />
|
|
266
266
|
</g>
|
|
267
267
|
<g>
|
|
268
268
|
<rect data-type="rect" data-label="netId: v5
|
|
269
269
|
globalConnNetId: connectivity_net4
|
|
270
|
-
available orientations: y+" data-x="-1.301" data-y="-0.8490000000000001" x="199.19210679048172" y="393.0632617527569" width="13.000580383052807" height="29.251305861868843" fill="#
|
|
270
|
+
available orientations: y+" data-x="-1.301" data-y="-0.8490000000000001" x="199.19210679048172" y="393.0632617527569" width="13.000580383052807" height="29.251305861868843" fill="#ef444466" stroke="#ef4444" stroke-width="0.015383928571428571" />
|
|
271
271
|
</g>
|
|
272
272
|
<g>
|
|
273
273
|
<rect data-type="rect" data-label="netId: .PWR1 > .FB to .R6 > .pin2
|
|
@@ -277,12 +277,12 @@ available orientations: any" data-x="-2.125" data-y="0.225" x="145.6297156123041
|
|
|
277
277
|
<g>
|
|
278
278
|
<rect data-type="rect" data-label="netId: v3_3
|
|
279
279
|
globalConnNetId: connectivity_net0
|
|
280
|
-
available orientations: y+" data-x="-3.75" data-y="2.225" x="39.99999999999997" y="193.24434126523508" width="13.000580383052835" height="29.251305861868843" fill="#
|
|
280
|
+
available orientations: y+" data-x="-3.75" data-y="2.225" x="39.99999999999997" y="193.24434126523508" width="13.000580383052835" height="29.251305861868843" fill="#ef444466" stroke="#ef4444" stroke-width="0.015383928571428571" />
|
|
281
281
|
</g>
|
|
282
282
|
<g>
|
|
283
283
|
<rect data-type="rect" data-label="netId: v3_3
|
|
284
284
|
globalConnNetId: connectivity_net0
|
|
285
|
-
available orientations: y+" data-x="2.2990000000000004" data-y="0.276" x="433.20255368543235" y="319.93499709808475" width="13.000580383052863" height="29.251305861868843" fill="#
|
|
285
|
+
available orientations: y+" data-x="2.2990000000000004" data-y="0.276" x="433.20255368543235" y="319.93499709808475" width="13.000580383052863" height="29.251305861868843" fill="#ef444466" stroke="#ef4444" stroke-width="0.015383928571428571" />
|
|
286
286
|
</g>
|
|
287
287
|
<g>
|
|
288
288
|
<rect data-type="rect" data-label="netId: .LED1 > .pos to .R8 > .pin2
|