@tscircuit/core 0.0.1117 → 0.0.1118

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 +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11316,9 +11316,11 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
11316
11316
  cadModel.zOffsetFromSurface
11317
11317
  ) : 0 : 0;
11318
11318
  const computedLayer = this.props.layer === "bottom" ? "bottom" : "top";
11319
+ const pcbComponent = db.pcb_component.get(this.pcb_component_id);
11319
11320
  const globalTransform = this._computePcbGlobalTransformBeforeLayout();
11320
11321
  const decomposedTransform = decomposeTSR8(globalTransform);
11321
- const totalRotation = decomposedTransform.rotation.angle * 180 / Math.PI;
11322
+ const preLayoutRotation = decomposedTransform.rotation.angle * 180 / Math.PI;
11323
+ const totalRotation = pcbComponent?.position_mode === "packed" ? pcbComponent.rotation ?? preLayoutRotation : preLayoutRotation;
11322
11324
  const isBottomLayer = computedLayer === "bottom";
11323
11325
  const rotationWithOffset = totalRotation + (rotationOffset.z ?? 0);
11324
11326
  const cadRotationZ = normalizeDegrees(rotationWithOffset);
@@ -18674,7 +18676,7 @@ import { identity as identity5 } from "transformation-matrix";
18674
18676
  var package_default = {
18675
18677
  name: "@tscircuit/core",
18676
18678
  type: "module",
18677
- version: "0.0.1116",
18679
+ version: "0.0.1117",
18678
18680
  types: "dist/index.d.ts",
18679
18681
  main: "dist/index.js",
18680
18682
  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.1117",
4
+ "version": "0.0.1118",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",