kicadts 0.0.20 → 0.0.22
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.d.ts +8 -0
- package/dist/index.js +36 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5116,6 +5116,8 @@ interface KicadPcbConstructorParams {
|
|
|
5116
5116
|
segments?: Segment[];
|
|
5117
5117
|
graphicLines?: GrLine[];
|
|
5118
5118
|
graphicTexts?: GrText[];
|
|
5119
|
+
graphicPolys?: GrPoly[];
|
|
5120
|
+
graphicRects?: GrRect[];
|
|
5119
5121
|
vias?: Via[];
|
|
5120
5122
|
zones?: Zone[];
|
|
5121
5123
|
otherChildren?: SxClass[];
|
|
@@ -5138,6 +5140,8 @@ declare class KicadPcb extends SxClass {
|
|
|
5138
5140
|
private _segments;
|
|
5139
5141
|
private _grLines;
|
|
5140
5142
|
private _grTexts;
|
|
5143
|
+
private _grPolys;
|
|
5144
|
+
private _grRects;
|
|
5141
5145
|
private _vias;
|
|
5142
5146
|
private _zones;
|
|
5143
5147
|
private _otherChildren;
|
|
@@ -5174,6 +5178,10 @@ declare class KicadPcb extends SxClass {
|
|
|
5174
5178
|
set graphicLines(value: GrLine[]);
|
|
5175
5179
|
get graphicTexts(): GrText[];
|
|
5176
5180
|
set graphicTexts(value: GrText[]);
|
|
5181
|
+
get graphicPolys(): GrPoly[];
|
|
5182
|
+
set graphicPolys(value: GrPoly[]);
|
|
5183
|
+
get graphicRects(): GrRect[];
|
|
5184
|
+
set graphicRects(value: GrRect[]);
|
|
5177
5185
|
get vias(): Via[];
|
|
5178
5186
|
set vias(value: Via[]);
|
|
5179
5187
|
get zones(): Zone[];
|
package/dist/index.js
CHANGED
|
@@ -7234,6 +7234,14 @@ var PadPrimitiveGrPoly = class _PadPrimitiveGrPoly extends SxClass {
|
|
|
7234
7234
|
polygon._sxFill = parsed;
|
|
7235
7235
|
continue;
|
|
7236
7236
|
}
|
|
7237
|
+
if (parsed.token === "fill") {
|
|
7238
|
+
if (polygon._sxFill) {
|
|
7239
|
+
throw new Error("gr_poly encountered duplicate fill tokens");
|
|
7240
|
+
}
|
|
7241
|
+
const fillValue = "value" in parsed ? parsed.value : "filled" in parsed ? parsed.filled : false;
|
|
7242
|
+
polygon._sxFill = new PadPrimitiveFill({ value: fillValue });
|
|
7243
|
+
continue;
|
|
7244
|
+
}
|
|
7237
7245
|
throw new Error(`gr_poly encountered unsupported token "${parsed.token}"`);
|
|
7238
7246
|
}
|
|
7239
7247
|
if (polygon._contours.length === 0) {
|
|
@@ -16084,6 +16092,8 @@ var KicadPcb = class _KicadPcb extends SxClass {
|
|
|
16084
16092
|
_segments = [];
|
|
16085
16093
|
_grLines = [];
|
|
16086
16094
|
_grTexts = [];
|
|
16095
|
+
_grPolys = [];
|
|
16096
|
+
_grRects = [];
|
|
16087
16097
|
_vias = [];
|
|
16088
16098
|
_zones = [];
|
|
16089
16099
|
_otherChildren = [];
|
|
@@ -16107,6 +16117,10 @@ var KicadPcb = class _KicadPcb extends SxClass {
|
|
|
16107
16117
|
this.graphicLines = params.graphicLines;
|
|
16108
16118
|
if (params.graphicTexts !== void 0)
|
|
16109
16119
|
this.graphicTexts = params.graphicTexts;
|
|
16120
|
+
if (params.graphicPolys !== void 0)
|
|
16121
|
+
this.graphicPolys = params.graphicPolys;
|
|
16122
|
+
if (params.graphicRects !== void 0)
|
|
16123
|
+
this.graphicRects = params.graphicRects;
|
|
16110
16124
|
if (params.vias !== void 0) this.vias = params.vias;
|
|
16111
16125
|
if (params.zones !== void 0) this.zones = params.zones;
|
|
16112
16126
|
if (params.otherChildren !== void 0)
|
|
@@ -16193,6 +16207,14 @@ var KicadPcb = class _KicadPcb extends SxClass {
|
|
|
16193
16207
|
this._grTexts.push(child);
|
|
16194
16208
|
return;
|
|
16195
16209
|
}
|
|
16210
|
+
if (child instanceof GrPoly) {
|
|
16211
|
+
this._grPolys.push(child);
|
|
16212
|
+
return;
|
|
16213
|
+
}
|
|
16214
|
+
if (child instanceof GrRect) {
|
|
16215
|
+
this._grRects.push(child);
|
|
16216
|
+
return;
|
|
16217
|
+
}
|
|
16196
16218
|
if (child instanceof Via) {
|
|
16197
16219
|
this._vias.push(child);
|
|
16198
16220
|
return;
|
|
@@ -16293,6 +16315,18 @@ var KicadPcb = class _KicadPcb extends SxClass {
|
|
|
16293
16315
|
set graphicTexts(value) {
|
|
16294
16316
|
this._grTexts = [...value];
|
|
16295
16317
|
}
|
|
16318
|
+
get graphicPolys() {
|
|
16319
|
+
return [...this._grPolys];
|
|
16320
|
+
}
|
|
16321
|
+
set graphicPolys(value) {
|
|
16322
|
+
this._grPolys = [...value];
|
|
16323
|
+
}
|
|
16324
|
+
get graphicRects() {
|
|
16325
|
+
return [...this._grRects];
|
|
16326
|
+
}
|
|
16327
|
+
set graphicRects(value) {
|
|
16328
|
+
this._grRects = [...value];
|
|
16329
|
+
}
|
|
16296
16330
|
get vias() {
|
|
16297
16331
|
return [...this._vias];
|
|
16298
16332
|
}
|
|
@@ -16328,6 +16362,8 @@ var KicadPcb = class _KicadPcb extends SxClass {
|
|
|
16328
16362
|
children.push(...this._segments);
|
|
16329
16363
|
children.push(...this._grLines);
|
|
16330
16364
|
children.push(...this._grTexts);
|
|
16365
|
+
children.push(...this._grPolys);
|
|
16366
|
+
children.push(...this._grRects);
|
|
16331
16367
|
children.push(...this._vias);
|
|
16332
16368
|
children.push(...this._zones);
|
|
16333
16369
|
children.push(...this._otherChildren);
|