@tscircuit/schematic-trace-solver 0.0.176 → 0.0.177

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
@@ -396,6 +396,12 @@ var getGroundConnectionPolicy = (inputProblem) => {
396
396
  );
397
397
  });
398
398
  const areSeparateExplicitGroundIslands = (firstPinId, secondPinId) => {
399
+ const firstChipId = pins.get(firstPinId)?.chip.chipId;
400
+ const secondChipId = pins.get(secondPinId)?.chip.chipId;
401
+ const pinsShareChip = firstChipId !== void 0 && firstChipId === secondChipId;
402
+ if (pinsShareChip && !physicalConnMap.getNetConnectedToId(firstPinId) && !physicalConnMap.getNetConnectedToId(secondPinId)) {
403
+ return false;
404
+ }
399
405
  const firstGlobalNetId = netConnMap.getNetConnectedToId(firstPinId);
400
406
  const secondGlobalNetId = netConnMap.getNetConnectedToId(secondPinId);
401
407
  if (!firstGlobalNetId || firstGlobalNetId !== secondGlobalNetId || !explicitlyWiredGroundNetIds.has(firstGlobalNetId)) {
@@ -59,6 +59,19 @@ export const getGroundConnectionPolicy = (inputProblem: InputProblem) => {
59
59
  firstPinId: PinId,
60
60
  secondPinId: PinId,
61
61
  ) => {
62
+ const firstChipId = pins.get(firstPinId)?.chip.chipId
63
+ const secondChipId = pins.get(secondPinId)?.chip.chipId
64
+ const pinsShareChip =
65
+ firstChipId !== undefined && firstChipId === secondChipId
66
+ // Unwired ground terminals on one component can share a local trace
67
+ // without joining separate physical ground islands.
68
+ if (
69
+ pinsShareChip &&
70
+ !physicalConnMap.getNetConnectedToId(firstPinId) &&
71
+ !physicalConnMap.getNetConnectedToId(secondPinId)
72
+ ) {
73
+ return false
74
+ }
62
75
  const firstGlobalNetId = netConnMap.getNetConnectedToId(firstPinId)
63
76
  const secondGlobalNetId = netConnMap.getNetConnectedToId(secondPinId)
64
77
  if (
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.176",
8
+ "version": "0.0.177",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "start": "cosmos",