@tscircuit/core 0.0.1941 → 0.0.1942

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2544,6 +2544,7 @@ var Net = class extends PrimitiveComponent2 {
2544
2544
  member_source_group_ids: [],
2545
2545
  is_ground: isGround,
2546
2546
  is_power: isPositiveVoltageSource,
2547
+ trace_width: props.nominalTraceWidth,
2547
2548
  // @ts-ignore
2548
2549
  is_positive_voltage_source: isPositiveVoltageSource
2549
2550
  });
@@ -54622,19 +54623,29 @@ var getSimpleRouteJsonFromCircuitJson = ({
54622
54623
  continue;
54623
54624
  }
54624
54625
  handledNetConnectivityKeys.add(netConnectivityKey);
54625
- const connectedSourceNetIds = source_nets.filter(
54626
+ const connectedSourceNets = source_nets.filter(
54626
54627
  (sourceNet) => getSourceConnectivityKey(sourceNet.source_net_id) === netConnectivityKey
54627
- ).map((sourceNet) => sourceNet.source_net_id);
54628
+ );
54629
+ const connectedSourceNetIds = connectedSourceNets.map(
54630
+ (sourceNet) => sourceNet.source_net_id
54631
+ );
54628
54632
  const connectedSourceTraces = sourceTracesEligibleForNetConnections.filter(
54629
54633
  (st) => [st.source_trace_id, ...st.connected_source_net_ids ?? []].some(
54630
54634
  (id) => getSourceConnectivityKey(id) === netConnectivityKey
54631
54635
  )
54632
54636
  );
54633
- let nominalTraceWidthFromConnectedTraces;
54637
+ let nominalTraceWidthForConnection;
54638
+ for (const sourceNet of connectedSourceNets) {
54639
+ if (sourceNet.trace_width === void 0) continue;
54640
+ nominalTraceWidthForConnection = Math.max(
54641
+ nominalTraceWidthForConnection ?? 0,
54642
+ sourceNet.trace_width
54643
+ );
54644
+ }
54634
54645
  for (const sourceTrace of connectedSourceTraces) {
54635
54646
  if (sourceTrace.min_trace_thickness === void 0) continue;
54636
- nominalTraceWidthFromConnectedTraces = Math.max(
54637
- nominalTraceWidthFromConnectedTraces ?? 0,
54647
+ nominalTraceWidthForConnection = Math.max(
54648
+ nominalTraceWidthForConnection ?? 0,
54638
54649
  sourceTrace.min_trace_thickness
54639
54650
  );
54640
54651
  }
@@ -54651,8 +54662,8 @@ var getSimpleRouteJsonFromCircuitJson = ({
54651
54662
  }
54652
54663
  const connection = {
54653
54664
  name: net.source_net_id ?? sharedConnMap.getNetConnectedToId(net.source_net_id),
54654
- nominalTraceWidth: nominalTraceWidthFromConnectedTraces,
54655
- width: nominalTraceWidthFromConnectedTraces,
54665
+ nominalTraceWidth: nominalTraceWidthForConnection,
54666
+ width: nominalTraceWidthForConnection,
54656
54667
  pointsToConnect
54657
54668
  };
54658
54669
  if (pointsToConnect.length === 0) continue;
@@ -63408,7 +63419,7 @@ function Group_getRoutingPhasePlans(group) {
63408
63419
  var package_default = {
63409
63420
  name: "@tscircuit/core",
63410
63421
  type: "module",
63411
- version: "0.0.1940",
63422
+ version: "0.0.1941",
63412
63423
  types: "dist/index.d.ts",
63413
63424
  main: "dist/index.js",
63414
63425
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1941",
4
+ "version": "0.0.1942",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",