@tscircuit/core 0.0.591 → 0.0.593
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 +29 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8092,7 +8092,7 @@ function getPresetAutoroutingConfig(autorouterConfig) {
|
|
|
8092
8092
|
}
|
|
8093
8093
|
|
|
8094
8094
|
// lib/components/primitive-components/Group/Group_doInitialPcbLayoutPack.ts
|
|
8095
|
-
import "@tscircuit/circuit-json-util";
|
|
8095
|
+
import { buildSubtree as buildSubtree2 } from "@tscircuit/circuit-json-util";
|
|
8096
8096
|
import {
|
|
8097
8097
|
pack,
|
|
8098
8098
|
convertCircuitJsonToPackOutput,
|
|
@@ -8130,20 +8130,31 @@ var Group_doInitialPcbLayoutPack = (group) => {
|
|
|
8130
8130
|
for (const packedComponent of packOutput.components) {
|
|
8131
8131
|
const { center, componentId, ccwRotationOffset } = packedComponent;
|
|
8132
8132
|
const pcbComponent = db.pcb_component.get(componentId);
|
|
8133
|
-
if (
|
|
8134
|
-
|
|
8133
|
+
if (pcbComponent) {
|
|
8134
|
+
const originalCenter2 = pcbComponent.center;
|
|
8135
|
+
const transformMatrix2 = compose4(
|
|
8136
|
+
group._computePcbGlobalTransformBeforeLayout(),
|
|
8137
|
+
translate6(center.x, center.y),
|
|
8138
|
+
rotate2(ccwRotationOffset || 0),
|
|
8139
|
+
translate6(-originalCenter2.x, -originalCenter2.y)
|
|
8140
|
+
);
|
|
8141
|
+
const related = db.toArray().filter(
|
|
8142
|
+
(elm) => "pcb_component_id" in elm && elm.pcb_component_id === componentId
|
|
8143
|
+
);
|
|
8144
|
+
transformPCBElements2(related, transformMatrix2);
|
|
8145
|
+
continue;
|
|
8146
|
+
}
|
|
8147
|
+
const pcbGroup = db.pcb_group.list().find((g) => g.source_group_id === componentId);
|
|
8148
|
+
if (!pcbGroup) continue;
|
|
8149
|
+
const originalCenter = pcbGroup.center;
|
|
8135
8150
|
const transformMatrix = compose4(
|
|
8136
8151
|
group._computePcbGlobalTransformBeforeLayout(),
|
|
8137
8152
|
translate6(center.x, center.y),
|
|
8138
8153
|
rotate2(ccwRotationOffset || 0),
|
|
8139
8154
|
translate6(-originalCenter.x, -originalCenter.y)
|
|
8140
8155
|
);
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
(elm) => "pcb_component_id" in elm && elm.pcb_component_id === componentId
|
|
8144
|
-
),
|
|
8145
|
-
transformMatrix
|
|
8146
|
-
);
|
|
8156
|
+
const subtree = buildSubtree2(db.toArray(), { source_group_id: componentId });
|
|
8157
|
+
transformPCBElements2(subtree, transformMatrix);
|
|
8147
8158
|
}
|
|
8148
8159
|
};
|
|
8149
8160
|
|
|
@@ -10337,11 +10348,16 @@ var PinHeader = class extends NormalComponent {
|
|
|
10337
10348
|
const holeDiameter = this._parsedProps.holeDiameter;
|
|
10338
10349
|
const platedDiameter = this._parsedProps.platedDiameter;
|
|
10339
10350
|
const pitch = this._parsedProps.pitch;
|
|
10340
|
-
if (pinCount > 0
|
|
10351
|
+
if (pinCount > 0) {
|
|
10352
|
+
if (pitch) {
|
|
10353
|
+
if (!holeDiameter && !platedDiameter) {
|
|
10354
|
+
return `pinrow${pinCount}_p${pitch}`;
|
|
10355
|
+
}
|
|
10356
|
+
return `pinrow${pinCount}_p${pitch}_id${holeDiameter}_od${platedDiameter}`;
|
|
10357
|
+
}
|
|
10341
10358
|
if (!holeDiameter && !platedDiameter) {
|
|
10342
|
-
return `pinrow${pinCount}
|
|
10359
|
+
return `pinrow${pinCount}`;
|
|
10343
10360
|
}
|
|
10344
|
-
return `pinrow${pinCount}_p${pitch}_id${holeDiameter}_od${platedDiameter}`;
|
|
10345
10361
|
}
|
|
10346
10362
|
return null;
|
|
10347
10363
|
}
|
|
@@ -11207,7 +11223,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
11207
11223
|
var package_default = {
|
|
11208
11224
|
name: "@tscircuit/core",
|
|
11209
11225
|
type: "module",
|
|
11210
|
-
version: "0.0.
|
|
11226
|
+
version: "0.0.592",
|
|
11211
11227
|
types: "dist/index.d.ts",
|
|
11212
11228
|
main: "dist/index.js",
|
|
11213
11229
|
module: "dist/index.js",
|