easyeda 0.0.324 → 0.0.326

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
@@ -8157,6 +8157,7 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
8157
8157
  const smtPads = su(circuitJson).pcb_smtpad.list();
8158
8158
  const vias = su(circuitJson).pcb_via.list();
8159
8159
  const silkscreenPaths = su(circuitJson).pcb_silkscreen_path.list();
8160
+ const silkscreenRects = su(circuitJson).pcb_silkscreen_rect.list();
8160
8161
  const silkscreenTexts = su(circuitJson).pcb_silkscreen_text.list();
8161
8162
  const fabricationNotePaths = su(circuitJson).pcb_fabrication_note_path.list();
8162
8163
  const courtyardOutlines = su(circuitJson).pcb_courtyard_outline.list();
@@ -8226,6 +8227,15 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
8226
8227
  `<silkscreenpath route={${JSON.stringify(silkscreenPath.route)}} />`
8227
8228
  );
8228
8229
  }
8230
+ for (const silkscreenRect of silkscreenRects) {
8231
+ const rotation2 = silkscreenRect.ccw_rotation || 0;
8232
+ const rotationAttr = rotation2 ? ` pcbRotation="${rotation2}deg"` : "";
8233
+ const filledAttr = silkscreenRect.is_filled ? " isFilled" : "";
8234
+ const strokeAttr = silkscreenRect.has_stroke === false ? " hasStroke={false}" : "";
8235
+ elementStrings.push(
8236
+ `<silkscreenrect pcbX="${mmStr(silkscreenRect.center.x)}" pcbY="${mmStr(silkscreenRect.center.y)}" width="${mmStr(silkscreenRect.width)}" height="${mmStr(silkscreenRect.height)}" strokeWidth="${mmStr(silkscreenRect.stroke_width)}"${filledAttr}${strokeAttr}${rotationAttr} />`
8237
+ );
8238
+ }
8229
8239
  for (const silkscreenText of silkscreenTexts) {
8230
8240
  const isRefDes = silkscreenText.text === "{NAME}";
8231
8241
  const textValue = isRefDes ? JSON.stringify("{NAME}") : JSON.stringify(silkscreenText.text);