easyeda 0.0.258 → 0.0.259

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/main.cjs CHANGED
@@ -997,7 +997,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
997
997
  var package_default = {
998
998
  name: "easyeda",
999
999
  type: "module",
1000
- version: "0.0.257",
1000
+ version: "0.0.258",
1001
1001
  files: [
1002
1002
  "dist"
1003
1003
  ],
@@ -6416,15 +6416,12 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
6416
6416
  const innerWidth = largestOuterDimensionName === "width" ? largestInnerDimension : smallestInnerDimension;
6417
6417
  const innerHeight = largestOuterDimensionName === "height" ? largestInnerDimension : smallestInnerDimension;
6418
6418
  additionalPlatedHoleProps = {
6419
- shape: "pill_hole_with_rect_pad",
6420
- hole_shape: "pill",
6421
- pad_shape: "rect",
6419
+ shape: "pill",
6422
6420
  hole_width: innerWidth,
6423
6421
  hole_height: innerHeight,
6424
- rect_pad_width: mil2mm(pad.width),
6425
- rect_pad_height: mil2mm(pad.height),
6426
- hole_offset_x: 0,
6427
- hole_offset_y: 0
6422
+ outer_width: mil2mm(pad.width),
6423
+ outer_height: mil2mm(pad.height),
6424
+ ccw_rotation: pad.rotation || 0
6428
6425
  };
6429
6426
  } else if (pad.shape === "RECT") {
6430
6427
  const padWidth = mil2mm(pad.width);
@@ -7718,7 +7715,13 @@ var generateFootprintTsx = (circuitJson) => {
7718
7715
  }
7719
7716
  }
7720
7717
  for (const platedHole of platedHoles) {
7721
- if (platedHole.shape === "pill_hole_with_rect_pad") {
7718
+ if (platedHole.shape === "pill" || platedHole.shape === "oval") {
7719
+ const cccwRotationDegree = platedHole.ccw_rotation || 0;
7720
+ const rotation2 = cccwRotationDegree ? ` pcbRotation="${cccwRotationDegree}deg"` : "";
7721
+ elementStrings.push(
7722
+ `<platedhole portHints={${JSON.stringify(platedHole.port_hints)}} pcbX="${mmStr(platedHole.x)}" pcbY="${mmStr(platedHole.y)}" holeWidth="${mmStr(platedHole.hole_width)}" holeHeight="${mmStr(platedHole.hole_height)}" outerWidth="${mmStr(platedHole.outer_width)}" outerHeight="${mmStr(platedHole.outer_height)}"${rotation2} shape="${platedHole.shape}" />`
7723
+ );
7724
+ } else if (platedHole.shape === "pill_hole_with_rect_pad") {
7722
7725
  elementStrings.push(
7723
7726
  `<platedhole portHints={${JSON.stringify(platedHole.port_hints)}} pcbX="${mmStr(platedHole.x)}" pcbY="${mmStr(platedHole.y)}" holeWidth="${mmStr(platedHole.hole_width)}" holeHeight="${mmStr(platedHole.hole_height)}" outerWidth="${mmStr(platedHole.rect_pad_width)}" outerHeight="${mmStr(platedHole.rect_pad_height)}" shape="pill" />`
7724
7727
  );