easyeda 0.0.310 → 0.0.311

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.
@@ -9936,6 +9936,18 @@ var handleSilkscreenPath = (track, index) => {
9936
9936
  };
9937
9937
  var isCourtyardLayer = (layer) => layer === 13 || layer === 14 || layer === 15;
9938
9938
  var isSilkscreenLayer = (layer) => layer === 3 || layer === 4;
9939
+ var isDocumentLayer = (layer) => layer === 12;
9940
+ var handleFabricationNotePath = (track, index) => pcb_fabrication_note_path.parse({
9941
+ type: "pcb_fabrication_note_path",
9942
+ pcb_fabrication_note_path_id: `pcb_fabrication_note_path_${index + 1}`,
9943
+ pcb_component_id: "pcb_component_1",
9944
+ layer: "top",
9945
+ route: track.points.map((point2) => ({
9946
+ x: mil10ToMm(point2.x),
9947
+ y: mil10ToMm(point2.y)
9948
+ })),
9949
+ stroke_width: mil10ToMm(track.width)
9950
+ });
9939
9951
  var getSideFromLayer = (layer) => {
9940
9952
  if (layer === 4 || layer === 14) return "bottom";
9941
9953
  return "top";
@@ -10286,8 +10298,10 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
10286
10298
  let hasFoundDesignator = false;
10287
10299
  easyEdaJson.packageDetail.dataStr.shape.forEach((shape, index) => {
10288
10300
  if (shape.type === "TRACK") {
10289
- if (!isCourtyardLayer(shape.layer)) {
10301
+ if (isSilkscreenLayer(shape.layer)) {
10290
10302
  circuitElements.push(handleSilkscreenPath(shape, index));
10303
+ } else if (isDocumentLayer(shape.layer)) {
10304
+ circuitElements.push(handleFabricationNotePath(shape, index));
10291
10305
  }
10292
10306
  } else if (shape.type === "CIRCLE") {
10293
10307
  if (isSilkscreenLayer(shape.layer)) {
@@ -11464,6 +11478,7 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
11464
11478
  const vias = su(circuitJson).pcb_via.list();
11465
11479
  const silkscreenPaths = su(circuitJson).pcb_silkscreen_path.list();
11466
11480
  const silkscreenTexts = su(circuitJson).pcb_silkscreen_text.list();
11481
+ const fabricationNotePaths = su(circuitJson).pcb_fabrication_note_path.list();
11467
11482
  const courtyardOutlines = su(circuitJson).pcb_courtyard_outline.list();
11468
11483
  const elementStrings = [];
11469
11484
  for (const hole of holes) {
@@ -11540,6 +11555,11 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
11540
11555
  `<silkscreentext text=${textValue} pcbX="${mmStr(silkscreenText.anchor_position.x)}" pcbY="${mmStr(silkscreenText.anchor_position.y)}" anchorAlignment="${silkscreenText.anchor_alignment}"${rotationAttr}${silkscreenText.font_size ? ` fontSize="${mmStr(silkscreenText.font_size)}"` : ""} />`
11541
11556
  );
11542
11557
  }
11558
+ for (const fabricationNotePath of fabricationNotePaths) {
11559
+ elementStrings.push(
11560
+ `<fabricationnotepath route={${JSON.stringify(fabricationNotePath.route)}} strokeWidth="${mmStr(fabricationNotePath.stroke_width)}" />`
11561
+ );
11562
+ }
11543
11563
  for (const courtyardOutline of courtyardOutlines) {
11544
11564
  elementStrings.push(
11545
11565
  `<courtyardoutline outline={${JSON.stringify(courtyardOutline.outline)}} />`