easyeda 0.0.327 → 0.0.328

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.
@@ -234,9 +234,9 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
234
234
  y: number;
235
235
  };
236
236
  radius: number;
237
+ pathData: string;
237
238
  lineWidth: number;
238
239
  sweepFlag: boolean;
239
- pathData: string;
240
240
  color: string;
241
241
  } | {
242
242
  path: string;
@@ -606,9 +606,9 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
606
606
  y: number;
607
607
  };
608
608
  radius: number;
609
+ pathData: string;
609
610
  lineWidth: number;
610
611
  sweepFlag: boolean;
611
- pathData: string;
612
612
  color: string;
613
613
  }, {
614
614
  type: "ARC";
@@ -622,9 +622,9 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
622
622
  y: number;
623
623
  };
624
624
  radius: number;
625
+ pathData: string;
625
626
  lineWidth: number;
626
627
  sweepFlag: boolean;
627
- pathData: string;
628
628
  color: string;
629
629
  }>]>>, "many">;
630
630
  BBox: z.ZodOptional<z.ZodObject<{
@@ -681,9 +681,9 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
681
681
  y: number;
682
682
  };
683
683
  radius: number;
684
+ pathData: string;
684
685
  lineWidth: number;
685
686
  sweepFlag: boolean;
686
- pathData: string;
687
687
  color: string;
688
688
  } | {
689
689
  path: string;
@@ -831,9 +831,9 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
831
831
  y: number;
832
832
  };
833
833
  radius: number;
834
+ pathData: string;
834
835
  lineWidth: number;
835
836
  sweepFlag: boolean;
836
- pathData: string;
837
837
  color: string;
838
838
  } | {
839
839
  path: string;
@@ -1036,6 +1036,7 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1036
1036
  y: number;
1037
1037
  }[];
1038
1038
  layermask: number;
1039
+ pathData: string;
1039
1040
  fillStyle: string;
1040
1041
  id?: string | undefined;
1041
1042
  layer?: number | undefined;
@@ -1294,6 +1295,7 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1294
1295
  } & {
1295
1296
  type: z.ZodLiteral<"SOLIDREGION">;
1296
1297
  layermask: z.ZodNumber;
1298
+ pathData: z.ZodString;
1297
1299
  points: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodAny, any, any>, z.ZodObject<{
1298
1300
  x: z.ZodNumber;
1299
1301
  y: z.ZodNumber;
@@ -1312,6 +1314,7 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1312
1314
  y: number;
1313
1315
  }[];
1314
1316
  layermask: number;
1317
+ pathData: string;
1315
1318
  fillStyle: string;
1316
1319
  id?: string | undefined;
1317
1320
  layer?: number | undefined;
@@ -1319,6 +1322,7 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1319
1322
  type: "SOLIDREGION";
1320
1323
  points: any[];
1321
1324
  layermask: number;
1325
+ pathData: string;
1322
1326
  id?: string | undefined;
1323
1327
  layer?: number | undefined;
1324
1328
  fillStyle?: string | undefined;
@@ -1602,6 +1606,7 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1602
1606
  y: number;
1603
1607
  }[];
1604
1608
  layermask: number;
1609
+ pathData: string;
1605
1610
  fillStyle: string;
1606
1611
  id?: string | undefined;
1607
1612
  layer?: number | undefined;
@@ -1845,6 +1850,7 @@ declare const PackageDetailSchema: z.ZodObject<{
1845
1850
  y: number;
1846
1851
  }[];
1847
1852
  layermask: number;
1853
+ pathData: string;
1848
1854
  fillStyle: string;
1849
1855
  id?: string | undefined;
1850
1856
  layer?: number | undefined;
@@ -2103,6 +2109,7 @@ declare const PackageDetailSchema: z.ZodObject<{
2103
2109
  } & {
2104
2110
  type: z.ZodLiteral<"SOLIDREGION">;
2105
2111
  layermask: z.ZodNumber;
2112
+ pathData: z.ZodString;
2106
2113
  points: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodAny, any, any>, z.ZodObject<{
2107
2114
  x: z.ZodNumber;
2108
2115
  y: z.ZodNumber;
@@ -2121,6 +2128,7 @@ declare const PackageDetailSchema: z.ZodObject<{
2121
2128
  y: number;
2122
2129
  }[];
2123
2130
  layermask: number;
2131
+ pathData: string;
2124
2132
  fillStyle: string;
2125
2133
  id?: string | undefined;
2126
2134
  layer?: number | undefined;
@@ -2128,6 +2136,7 @@ declare const PackageDetailSchema: z.ZodObject<{
2128
2136
  type: "SOLIDREGION";
2129
2137
  points: any[];
2130
2138
  layermask: number;
2139
+ pathData: string;
2131
2140
  id?: string | undefined;
2132
2141
  layer?: number | undefined;
2133
2142
  fillStyle?: string | undefined;
@@ -2411,6 +2420,7 @@ declare const PackageDetailSchema: z.ZodObject<{
2411
2420
  y: number;
2412
2421
  }[];
2413
2422
  layermask: number;
2423
+ pathData: string;
2414
2424
  fillStyle: string;
2415
2425
  id?: string | undefined;
2416
2426
  layer?: number | undefined;
@@ -2606,6 +2616,7 @@ declare const PackageDetailSchema: z.ZodObject<{
2606
2616
  y: number;
2607
2617
  }[];
2608
2618
  layermask: number;
2619
+ pathData: string;
2609
2620
  fillStyle: string;
2610
2621
  id?: string | undefined;
2611
2622
  layer?: number | undefined;
@@ -2942,9 +2953,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
2942
2953
  y: number;
2943
2954
  };
2944
2955
  radius: number;
2956
+ pathData: string;
2945
2957
  lineWidth: number;
2946
2958
  sweepFlag: boolean;
2947
- pathData: string;
2948
2959
  color: string;
2949
2960
  } | {
2950
2961
  path: string;
@@ -3314,9 +3325,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3314
3325
  y: number;
3315
3326
  };
3316
3327
  radius: number;
3328
+ pathData: string;
3317
3329
  lineWidth: number;
3318
3330
  sweepFlag: boolean;
3319
- pathData: string;
3320
3331
  color: string;
3321
3332
  }, {
3322
3333
  type: "ARC";
@@ -3330,9 +3341,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3330
3341
  y: number;
3331
3342
  };
3332
3343
  radius: number;
3344
+ pathData: string;
3333
3345
  lineWidth: number;
3334
3346
  sweepFlag: boolean;
3335
- pathData: string;
3336
3347
  color: string;
3337
3348
  }>]>>, "many">;
3338
3349
  BBox: z.ZodOptional<z.ZodObject<{
@@ -3389,9 +3400,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3389
3400
  y: number;
3390
3401
  };
3391
3402
  radius: number;
3403
+ pathData: string;
3392
3404
  lineWidth: number;
3393
3405
  sweepFlag: boolean;
3394
- pathData: string;
3395
3406
  color: string;
3396
3407
  } | {
3397
3408
  path: string;
@@ -3539,9 +3550,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3539
3550
  y: number;
3540
3551
  };
3541
3552
  radius: number;
3553
+ pathData: string;
3542
3554
  lineWidth: number;
3543
3555
  sweepFlag: boolean;
3544
- pathData: string;
3545
3556
  color: string;
3546
3557
  } | {
3547
3558
  path: string;
@@ -3773,6 +3784,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3773
3784
  y: number;
3774
3785
  }[];
3775
3786
  layermask: number;
3787
+ pathData: string;
3776
3788
  fillStyle: string;
3777
3789
  id?: string | undefined;
3778
3790
  layer?: number | undefined;
@@ -4031,6 +4043,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4031
4043
  } & {
4032
4044
  type: z.ZodLiteral<"SOLIDREGION">;
4033
4045
  layermask: z.ZodNumber;
4046
+ pathData: z.ZodString;
4034
4047
  points: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodAny, any, any>, z.ZodObject<{
4035
4048
  x: z.ZodNumber;
4036
4049
  y: z.ZodNumber;
@@ -4049,6 +4062,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4049
4062
  y: number;
4050
4063
  }[];
4051
4064
  layermask: number;
4065
+ pathData: string;
4052
4066
  fillStyle: string;
4053
4067
  id?: string | undefined;
4054
4068
  layer?: number | undefined;
@@ -4056,6 +4070,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4056
4070
  type: "SOLIDREGION";
4057
4071
  points: any[];
4058
4072
  layermask: number;
4073
+ pathData: string;
4059
4074
  id?: string | undefined;
4060
4075
  layer?: number | undefined;
4061
4076
  fillStyle?: string | undefined;
@@ -4339,6 +4354,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4339
4354
  y: number;
4340
4355
  }[];
4341
4356
  layermask: number;
4357
+ pathData: string;
4342
4358
  fillStyle: string;
4343
4359
  id?: string | undefined;
4344
4360
  layer?: number | undefined;
@@ -4534,6 +4550,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4534
4550
  y: number;
4535
4551
  }[];
4536
4552
  layermask: number;
4553
+ pathData: string;
4537
4554
  fillStyle: string;
4538
4555
  id?: string | undefined;
4539
4556
  layer?: number | undefined;
@@ -4801,9 +4818,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4801
4818
  y: number;
4802
4819
  };
4803
4820
  radius: number;
4821
+ pathData: string;
4804
4822
  lineWidth: number;
4805
4823
  sweepFlag: boolean;
4806
- pathData: string;
4807
4824
  color: string;
4808
4825
  } | {
4809
4826
  path: string;
@@ -4982,6 +4999,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4982
4999
  y: number;
4983
5000
  }[];
4984
5001
  layermask: number;
5002
+ pathData: string;
4985
5003
  fillStyle: string;
4986
5004
  id?: string | undefined;
4987
5005
  layer?: number | undefined;
@@ -10323,6 +10323,62 @@ var handleFabricationNotePath = (track, index) => pcb_fabrication_note_path.pars
10323
10323
  })),
10324
10324
  stroke_width: mil10ToMm(track.width)
10325
10325
  });
10326
+ var handleFabricationNoteSolidRegion = (solidRegion, index) => {
10327
+ const rawRoute = [];
10328
+ let currentPoint;
10329
+ for (const commandMatch of solidRegion.pathData.matchAll(
10330
+ /([MLAZ])([^MLAZ]*)/gi
10331
+ )) {
10332
+ const command = commandMatch[1]?.toUpperCase();
10333
+ const values = commandMatch[2]?.match(/[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g)?.map(Number) ?? [];
10334
+ if ((command === "M" || command === "L") && values.length >= 2) {
10335
+ currentPoint = { x: values[0], y: values[1] };
10336
+ rawRoute.push(currentPoint);
10337
+ } else if (command === "A" && currentPoint && values.length >= 7) {
10338
+ const [radiusX, , , largeArcFlag, sweepFlag, endX, endY] = values;
10339
+ const generatedArcRoute = generateArcFromSweep(
10340
+ currentPoint.x,
10341
+ currentPoint.y,
10342
+ endX,
10343
+ endY,
10344
+ radiusX,
10345
+ largeArcFlag === 1,
10346
+ sweepFlag === 1
10347
+ );
10348
+ const maxArcSegments = 16;
10349
+ const arcRoute = generatedArcRoute.length <= maxArcSegments + 1 ? generatedArcRoute : Array.from(
10350
+ { length: maxArcSegments + 1 },
10351
+ (_, pointIndex) => generatedArcRoute.at(
10352
+ Math.round(
10353
+ pointIndex * (generatedArcRoute.length - 1) / maxArcSegments
10354
+ )
10355
+ )
10356
+ ).filter((point2) => !!point2);
10357
+ rawRoute.push(...arcRoute.slice(1));
10358
+ currentPoint = { x: endX, y: endY };
10359
+ }
10360
+ }
10361
+ const route = rawRoute.map((point2) => ({
10362
+ x: mil10ToMm(point2.x),
10363
+ y: mil10ToMm(point2.y)
10364
+ }));
10365
+ const firstPoint = route[0];
10366
+ const lastPoint = route.at(-1);
10367
+ if (firstPoint && lastPoint && (firstPoint.x !== lastPoint.x || firstPoint.y !== lastPoint.y)) {
10368
+ route.push({ ...firstPoint });
10369
+ }
10370
+ if (route.length < 2) return null;
10371
+ return pcb_fabrication_note_path.parse({
10372
+ type: "pcb_fabrication_note_path",
10373
+ pcb_fabrication_note_path_id: `pcb_fabrication_note_solid_region_${index + 1}`,
10374
+ pcb_component_id: "pcb_component_1",
10375
+ layer: "top",
10376
+ route,
10377
+ // EasyEDA solid regions have no stroke width. Use its standard 1-unit
10378
+ // document stroke so the closed region remains visible as a note path.
10379
+ stroke_width: mil10ToMm(1)
10380
+ });
10381
+ };
10326
10382
  var getSideFromLayer = (layer) => {
10327
10383
  if (layer === 4 || layer === 14) return "bottom";
10328
10384
  return "top";
@@ -10693,6 +10749,9 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
10693
10749
  } else if (isDocumentLayer(shape.layer)) {
10694
10750
  circuitElements.push(handleFabricationNotePath(shape, index));
10695
10751
  }
10752
+ } else if (shape.type === "SOLIDREGION" && isDocumentLayer(shape.layermask)) {
10753
+ const fabricationNote = handleFabricationNoteSolidRegion(shape, index);
10754
+ if (fabricationNote) circuitElements.push(fabricationNote);
10696
10755
  } else if (shape.type === "CIRCLE") {
10697
10756
  if (isSilkscreenLayer(shape.layer)) {
10698
10757
  circuitElements.push(handleSilkscreenCircle(shape, index));
@@ -11002,6 +11061,7 @@ var CircleSchema = BaseShapeSchema.extend({
11002
11061
  var SolidRegionSchema = BaseShapeSchema.extend({
11003
11062
  type: external_exports.literal("SOLIDREGION"),
11004
11063
  layermask: external_exports.number(),
11064
+ pathData: external_exports.string(),
11005
11065
  points: external_exports.array(PointSchema),
11006
11066
  fillStyle: external_exports.string().default("none")
11007
11067
  });
@@ -11196,6 +11256,7 @@ var ShapeItemSchema = external_exports.object({
11196
11256
  return SolidRegionSchema.parse({
11197
11257
  type: "SOLIDREGION",
11198
11258
  layermask: Number(layermask),
11259
+ pathData,
11199
11260
  points,
11200
11261
  fillStyle: fillStyle || void 0,
11201
11262
  id
@@ -11863,6 +11924,9 @@ var mapPortHints = (portHints, portHintsMap) => {
11863
11924
  if (!portHintsMap || !portHints) return portHints;
11864
11925
  return [...new Set(portHints.flatMap((hint) => portHintsMap[hint] ?? [hint]))];
11865
11926
  };
11927
+ var getLayerAttr = (layer) => layer && layer !== "top" ? ` layer="${layer}"` : "";
11928
+ var getRotationAttr = (rotation2) => rotation2 ? ` pcbRotation="${rotation2}deg"` : "";
11929
+ var getStringAttr = (name, value) => value === void 0 ? "" : ` ${name}=${JSON.stringify(value)}`;
11866
11930
  var generateFootprintTsx = (circuitJson, options = {}) => {
11867
11931
  const holes = su(circuitJson).pcb_hole.list();
11868
11932
  const platedHoles = su(circuitJson).pcb_plated_hole.list();
@@ -11873,6 +11937,14 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
11873
11937
  const silkscreenRects = su(circuitJson).pcb_silkscreen_rect.list();
11874
11938
  const silkscreenTexts = su(circuitJson).pcb_silkscreen_text.list();
11875
11939
  const fabricationNotePaths = su(circuitJson).pcb_fabrication_note_path.list();
11940
+ const fabricationNoteTexts = su(circuitJson).pcb_fabrication_note_text.list();
11941
+ const fabricationNoteRects = su(circuitJson).pcb_fabrication_note_rect.list();
11942
+ const fabricationNoteDimensions = su(circuitJson).pcb_fabrication_note_dimension.list();
11943
+ const pcbNoteTexts = su(circuitJson).pcb_note_text.list();
11944
+ const pcbNoteRects = su(circuitJson).pcb_note_rect.list();
11945
+ const pcbNotePaths = su(circuitJson).pcb_note_path.list();
11946
+ const pcbNoteLines = su(circuitJson).pcb_note_line.list();
11947
+ const pcbNoteDimensions = su(circuitJson).pcb_note_dimension.list();
11876
11948
  const courtyardOutlines = su(circuitJson).pcb_courtyard_outline.list();
11877
11949
  const elementStrings = [];
11878
11950
  for (const hole of holes) {
@@ -11965,7 +12037,49 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
11965
12037
  }
11966
12038
  for (const fabricationNotePath of fabricationNotePaths) {
11967
12039
  elementStrings.push(
11968
- `<fabricationnotepath route={${JSON.stringify(fabricationNotePath.route)}} strokeWidth="${mmStr(fabricationNotePath.stroke_width)}" />`
12040
+ `<fabricationnotepath route={${JSON.stringify(fabricationNotePath.route)}} strokeWidth="${mmStr(fabricationNotePath.stroke_width)}"${getStringAttr("color", fabricationNotePath.color)}${getLayerAttr(fabricationNotePath.layer)} />`
12041
+ );
12042
+ }
12043
+ for (const fabricationNoteText of fabricationNoteTexts) {
12044
+ elementStrings.push(
12045
+ `<fabricationnotetext text=${JSON.stringify(fabricationNoteText.text)} pcbX="${mmStr(fabricationNoteText.anchor_position.x)}" pcbY="${mmStr(fabricationNoteText.anchor_position.y)}" anchorAlignment="${fabricationNoteText.anchor_alignment}"${getStringAttr("font", fabricationNoteText.font)}${fabricationNoteText.font_size === void 0 ? "" : ` fontSize="${mmStr(fabricationNoteText.font_size)}"`}${getStringAttr("color", fabricationNoteText.color)}${getRotationAttr(fabricationNoteText.ccw_rotation)}${getLayerAttr(fabricationNoteText.layer)} />`
12046
+ );
12047
+ }
12048
+ for (const fabricationNoteRect of fabricationNoteRects) {
12049
+ elementStrings.push(
12050
+ `<fabricationnoterect pcbX="${mmStr(fabricationNoteRect.center.x)}" pcbY="${mmStr(fabricationNoteRect.center.y)}" width="${mmStr(fabricationNoteRect.width)}" height="${mmStr(fabricationNoteRect.height)}" strokeWidth="${mmStr(fabricationNoteRect.stroke_width)}"${fabricationNoteRect.corner_radius === void 0 ? "" : ` cornerRadius="${mmStr(fabricationNoteRect.corner_radius)}"`}${fabricationNoteRect.is_filled === void 0 ? "" : ` isFilled={${fabricationNoteRect.is_filled}}`}${fabricationNoteRect.has_stroke === void 0 ? "" : ` hasStroke={${fabricationNoteRect.has_stroke}}`}${fabricationNoteRect.is_stroke_dashed === void 0 ? "" : ` isStrokeDashed={${fabricationNoteRect.is_stroke_dashed}}`}${getStringAttr("color", fabricationNoteRect.color)}${getLayerAttr(fabricationNoteRect.layer)} />`
12051
+ );
12052
+ }
12053
+ for (const fabricationNoteDimension of fabricationNoteDimensions) {
12054
+ const offset = "offset" in fabricationNoteDimension ? fabricationNoteDimension.offset : fabricationNoteDimension.offset_distance;
12055
+ elementStrings.push(
12056
+ `<fabricationnotedimension from={${JSON.stringify(fabricationNoteDimension.from)}} to={${JSON.stringify(fabricationNoteDimension.to)}}${getStringAttr("text", fabricationNoteDimension.text)}${getStringAttr("font", fabricationNoteDimension.font)}${fabricationNoteDimension.font_size === void 0 ? "" : ` fontSize="${mmStr(fabricationNoteDimension.font_size)}"`}${fabricationNoteDimension.arrow_size === void 0 ? "" : ` arrowSize="${mmStr(fabricationNoteDimension.arrow_size)}"`}${offset === void 0 ? "" : ` offset="${mmStr(offset)}"`}${getStringAttr("color", fabricationNoteDimension.color)}${getLayerAttr(fabricationNoteDimension.layer)} />`
12057
+ );
12058
+ }
12059
+ for (const pcbNoteText of pcbNoteTexts) {
12060
+ elementStrings.push(
12061
+ `<pcbnotetext text=${JSON.stringify(pcbNoteText.text ?? "")} pcbX="${mmStr(pcbNoteText.anchor_position.x)}" pcbY="${mmStr(pcbNoteText.anchor_position.y)}" anchorAlignment="${pcbNoteText.anchor_alignment}"${getStringAttr("font", pcbNoteText.font)}${pcbNoteText.font_size === void 0 ? "" : ` fontSize="${mmStr(pcbNoteText.font_size)}"`}${getStringAttr("color", pcbNoteText.color)}${getLayerAttr(pcbNoteText.layer)} />`
12062
+ );
12063
+ }
12064
+ for (const pcbNoteRect of pcbNoteRects) {
12065
+ elementStrings.push(
12066
+ `<pcbnoterect pcbX="${mmStr(pcbNoteRect.center.x)}" pcbY="${mmStr(pcbNoteRect.center.y)}" width="${mmStr(pcbNoteRect.width)}" height="${mmStr(pcbNoteRect.height)}" strokeWidth="${mmStr(pcbNoteRect.stroke_width)}"${pcbNoteRect.corner_radius === void 0 ? "" : ` cornerRadius="${mmStr(pcbNoteRect.corner_radius)}"`}${pcbNoteRect.is_filled === void 0 ? "" : ` isFilled={${pcbNoteRect.is_filled}}`}${pcbNoteRect.has_stroke === void 0 ? "" : ` hasStroke={${pcbNoteRect.has_stroke}}`}${pcbNoteRect.is_stroke_dashed === void 0 ? "" : ` isStrokeDashed={${pcbNoteRect.is_stroke_dashed}}`}${getStringAttr("color", pcbNoteRect.color)}${getLayerAttr(pcbNoteRect.layer)} />`
12067
+ );
12068
+ }
12069
+ for (const pcbNotePath of pcbNotePaths) {
12070
+ elementStrings.push(
12071
+ `<pcbnotepath route={${JSON.stringify(pcbNotePath.route)}} strokeWidth="${mmStr(pcbNotePath.stroke_width)}"${getStringAttr("color", pcbNotePath.color)}${getLayerAttr(pcbNotePath.layer)} />`
12072
+ );
12073
+ }
12074
+ for (const pcbNoteLine of pcbNoteLines) {
12075
+ elementStrings.push(
12076
+ `<pcbnoteline x1="${mmStr(pcbNoteLine.x1)}" y1="${mmStr(pcbNoteLine.y1)}" x2="${mmStr(pcbNoteLine.x2)}" y2="${mmStr(pcbNoteLine.y2)}" strokeWidth="${mmStr(pcbNoteLine.stroke_width)}"${pcbNoteLine.is_dashed === void 0 ? "" : ` isDashed={${pcbNoteLine.is_dashed}}`}${getStringAttr("color", pcbNoteLine.color)}${getLayerAttr(pcbNoteLine.layer)} />`
12077
+ );
12078
+ }
12079
+ for (const pcbNoteDimension of pcbNoteDimensions) {
12080
+ const offset = pcbNoteDimension.offset_distance;
12081
+ elementStrings.push(
12082
+ `<pcbnotedimension from={${JSON.stringify(pcbNoteDimension.from)}} to={${JSON.stringify(pcbNoteDimension.to)}}${getStringAttr("text", pcbNoteDimension.text)}${getStringAttr("font", pcbNoteDimension.font)}${pcbNoteDimension.font_size === void 0 ? "" : ` fontSize="${mmStr(pcbNoteDimension.font_size)}"`}${pcbNoteDimension.arrow_size === void 0 ? "" : ` arrowSize="${mmStr(pcbNoteDimension.arrow_size)}"`}${offset === void 0 ? "" : ` offset="${mmStr(offset)}"`}${getStringAttr("color", pcbNoteDimension.color)}${getLayerAttr(pcbNoteDimension.layer)} />`
11969
12083
  );
11970
12084
  }
11971
12085
  for (const courtyardOutline of courtyardOutlines) {