@tscircuit/circuit-json-util 0.0.122 → 0.0.123

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 CHANGED
@@ -1042,6 +1042,19 @@ var transformPcbSoldermaskOpening = (opening, matrix) => {
1042
1042
  return opening;
1043
1043
  };
1044
1044
  var transformPCBElement = (elm, matrix) => {
1045
+ if (elm.type === "pcb_cutout") {
1046
+ if (elm.shape === "polygon") {
1047
+ elm.points = elm.points.map((point) => applyToPoint(matrix, point));
1048
+ } else if (elm.shape === "path") {
1049
+ elm.route = elm.route.map((point) => applyToPoint(matrix, point));
1050
+ } else {
1051
+ elm.center = applyToPoint(matrix, elm.center);
1052
+ if (elm.shape === "rect") {
1053
+ elm.rotation = getTransformedRectRotation(elm.rotation ?? 0, matrix);
1054
+ }
1055
+ }
1056
+ return elm;
1057
+ }
1045
1058
  if (elm.type === "pcb_soldermask_opening") {
1046
1059
  return transformPcbSoldermaskOpening(elm, matrix);
1047
1060
  }