@tscircuit/core 0.0.1112 → 0.0.1114
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 +9827 -929
- package/dist/index.js +20 -10
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -9403,11 +9403,12 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
9403
9403
|
const parentTransform = parent._computePcbGlobalTransformBeforeLayout();
|
|
9404
9404
|
const decomposedTransform = decomposeTSR7(parentTransform);
|
|
9405
9405
|
const accumulatedRotation = decomposedTransform.rotation.angle * 180 / Math.PI;
|
|
9406
|
+
const sourceRotationOffset = props.pcbRotationOffset ?? props.rotationOffset;
|
|
9406
9407
|
const rotationOffset = rotation3.parse({ x: 0, y: 0, z: 0 });
|
|
9407
|
-
if (typeof
|
|
9408
|
-
rotationOffset.z = Number(
|
|
9409
|
-
} else if (typeof
|
|
9410
|
-
const parsed = rotation3.parse(
|
|
9408
|
+
if (typeof sourceRotationOffset === "number") {
|
|
9409
|
+
rotationOffset.z = Number(sourceRotationOffset);
|
|
9410
|
+
} else if (typeof sourceRotationOffset === "object") {
|
|
9411
|
+
const parsed = rotation3.parse(sourceRotationOffset);
|
|
9411
9412
|
rotationOffset.x = Number(parsed.x);
|
|
9412
9413
|
rotationOffset.y = Number(parsed.y);
|
|
9413
9414
|
rotationOffset.z = Number(parsed.z);
|
|
@@ -9468,6 +9469,10 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
9468
9469
|
z: layer === "bottom" ? -(accumulatedRotation + Number(rotationOffset.z)) + 180 : accumulatedRotation + Number(rotationOffset.z)
|
|
9469
9470
|
},
|
|
9470
9471
|
pcb_component_id: parent.pcb_component_id,
|
|
9472
|
+
model_board_normal_direction: props.modelBoardNormalDirection,
|
|
9473
|
+
model_origin_alignment: "center_of_component_on_board_surface",
|
|
9474
|
+
anchor_alignment: "center_of_component_on_board_surface",
|
|
9475
|
+
model_origin_position: props.modelOriginPosition,
|
|
9471
9476
|
source_component_id: parent.source_component_id,
|
|
9472
9477
|
model_unit_to_mm_scale_factor: typeof props.modelUnitToMmScale === "number" ? props.modelUnitToMmScale : void 0,
|
|
9473
9478
|
show_as_translucent_model: props.showAsTranslucentModel ?? parent._parsedProps.showAsTranslucentModel,
|
|
@@ -11278,11 +11283,12 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
11278
11283
|
if (typeof cadModel === "string") {
|
|
11279
11284
|
throw new Error("String cadModel not yet implemented");
|
|
11280
11285
|
}
|
|
11286
|
+
const sourceRotationOffset = cadModel?.pcbRotationOffset ?? cadModel?.rotationOffset;
|
|
11281
11287
|
const rotationOffset = rotation32.parse({
|
|
11282
11288
|
x: 0,
|
|
11283
11289
|
y: 0,
|
|
11284
|
-
z: typeof
|
|
11285
|
-
...typeof
|
|
11290
|
+
z: typeof sourceRotationOffset === "number" ? sourceRotationOffset : 0,
|
|
11291
|
+
...typeof sourceRotationOffset === "object" ? sourceRotationOffset : {}
|
|
11286
11292
|
});
|
|
11287
11293
|
const positionOffset = point32.parse({
|
|
11288
11294
|
x: 0,
|
|
@@ -11323,6 +11329,10 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
11323
11329
|
model_wrl_url: "wrlUrl" in (cadModel ?? {}) ? this._addCachebustToModelUrl(cadModel.wrlUrl) : void 0,
|
|
11324
11330
|
model_jscad: "jscad" in (cadModel ?? {}) ? cadModel.jscad : void 0,
|
|
11325
11331
|
model_unit_to_mm_scale_factor: typeof cadModel?.modelUnitToMmScale === "number" ? cadModel.modelUnitToMmScale : void 0,
|
|
11332
|
+
model_board_normal_direction: cadModel?.modelBoardNormalDirection,
|
|
11333
|
+
model_origin_alignment: "center_of_component_on_board_surface",
|
|
11334
|
+
anchor_alignment: "center_of_component_on_board_surface",
|
|
11335
|
+
model_origin_position: cadModel?.modelOriginPosition,
|
|
11326
11336
|
footprinter_string: typeof footprint === "string" && !cadModel ? footprint : void 0,
|
|
11327
11337
|
show_as_translucent_model: this._parsedProps.showAsTranslucentModel
|
|
11328
11338
|
});
|
|
@@ -18648,7 +18658,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
18648
18658
|
var package_default = {
|
|
18649
18659
|
name: "@tscircuit/core",
|
|
18650
18660
|
type: "module",
|
|
18651
|
-
version: "0.0.
|
|
18661
|
+
version: "0.0.1113",
|
|
18652
18662
|
types: "dist/index.d.ts",
|
|
18653
18663
|
main: "dist/index.js",
|
|
18654
18664
|
module: "dist/index.js",
|
|
@@ -18681,7 +18691,7 @@ var package_default = {
|
|
|
18681
18691
|
"@resvg/resvg-js": "^2.6.2",
|
|
18682
18692
|
"@tscircuit/alphabet": "0.0.18",
|
|
18683
18693
|
"@tscircuit/checks": "0.0.110",
|
|
18684
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
18694
|
+
"@tscircuit/capacity-autorouter": "^0.0.334",
|
|
18685
18695
|
"@tscircuit/circuit-json-util": "^0.0.90",
|
|
18686
18696
|
"@tscircuit/common": "^0.0.20",
|
|
18687
18697
|
"@tscircuit/copper-pour-solver": "^0.0.20",
|
|
@@ -18693,7 +18703,7 @@ var package_default = {
|
|
|
18693
18703
|
"@tscircuit/math-utils": "^0.0.36",
|
|
18694
18704
|
"@tscircuit/miniflex": "^0.0.4",
|
|
18695
18705
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
18696
|
-
"@tscircuit/props": "^0.0.
|
|
18706
|
+
"@tscircuit/props": "^0.0.497",
|
|
18697
18707
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
18698
18708
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
18699
18709
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
@@ -18710,7 +18720,7 @@ var package_default = {
|
|
|
18710
18720
|
"circuit-json": "^0.0.403",
|
|
18711
18721
|
"circuit-json-to-bpc": "^0.0.13",
|
|
18712
18722
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
18713
|
-
"circuit-json-to-gltf": "^0.0.
|
|
18723
|
+
"circuit-json-to-gltf": "^0.0.84",
|
|
18714
18724
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
18715
18725
|
"circuit-json-to-spice": "^0.0.34",
|
|
18716
18726
|
"circuit-to-svg": "^0.0.337",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1114",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@resvg/resvg-js": "^2.6.2",
|
|
35
35
|
"@tscircuit/alphabet": "0.0.18",
|
|
36
36
|
"@tscircuit/checks": "0.0.110",
|
|
37
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
37
|
+
"@tscircuit/capacity-autorouter": "^0.0.334",
|
|
38
38
|
"@tscircuit/circuit-json-util": "^0.0.90",
|
|
39
39
|
"@tscircuit/common": "^0.0.20",
|
|
40
40
|
"@tscircuit/copper-pour-solver": "^0.0.20",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@tscircuit/math-utils": "^0.0.36",
|
|
47
47
|
"@tscircuit/miniflex": "^0.0.4",
|
|
48
48
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
49
|
-
"@tscircuit/props": "^0.0.
|
|
49
|
+
"@tscircuit/props": "^0.0.497",
|
|
50
50
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
51
51
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
52
52
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"circuit-json": "^0.0.403",
|
|
64
64
|
"circuit-json-to-bpc": "^0.0.13",
|
|
65
65
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
66
|
-
"circuit-json-to-gltf": "^0.0.
|
|
66
|
+
"circuit-json-to-gltf": "^0.0.84",
|
|
67
67
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
68
68
|
"circuit-json-to-spice": "^0.0.34",
|
|
69
69
|
"circuit-to-svg": "^0.0.337",
|