@tscircuit/core 0.0.80 → 0.0.82
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 +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2028,6 +2028,7 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2028
2028
|
const { _parsedProps: props } = this;
|
|
2029
2029
|
if (props.cadModel) {
|
|
2030
2030
|
const bounds = this._getPcbCircuitJsonBounds();
|
|
2031
|
+
const pcb_component = db.pcb_component.get(this.pcb_component_id);
|
|
2031
2032
|
const cadModel = props.cadModel;
|
|
2032
2033
|
if (typeof cadModel === "string") {
|
|
2033
2034
|
throw new Error("String cadModel not yet implemented");
|
|
@@ -2039,6 +2040,11 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2039
2040
|
y: bounds.center.y,
|
|
2040
2041
|
z: this.props.layer === "bottom" ? -boardThickness / 2 : boardThickness / 2
|
|
2041
2042
|
},
|
|
2043
|
+
rotation: {
|
|
2044
|
+
x: 0,
|
|
2045
|
+
y: this.props.layer === "top" ? 0 : 180,
|
|
2046
|
+
z: (pcb_component?.rotation ?? 0) + (this.props.layer === "bottom" ? 180 : 0)
|
|
2047
|
+
},
|
|
2042
2048
|
pcb_component_id: this.pcb_component_id,
|
|
2043
2049
|
source_component_id: this.source_component_id,
|
|
2044
2050
|
model_stl_url: "stlUrl" in cadModel ? cadModel.stlUrl : void 0,
|