kicadts 0.0.2 → 0.0.4

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.
Files changed (195) hide show
  1. package/dist/index.d.ts +4466 -0
  2. package/dist/index.js +14253 -0
  3. package/package.json +5 -2
  4. package/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc +0 -111
  5. package/.github/workflows/bun-formatcheck.yml +0 -26
  6. package/.github/workflows/bun-pver-release.yml +0 -70
  7. package/.github/workflows/bun-test.yml +0 -32
  8. package/.github/workflows/bun-typecheck.yml +0 -26
  9. package/.vscode/settings.json +0 -16
  10. package/AGENTS.md +0 -31
  11. package/TODO.md +0 -46
  12. package/biome.json +0 -93
  13. package/bunfig.toml +0 -5
  14. package/lib/index.ts +0 -1
  15. package/lib/sexpr/base-classes/SxClass.ts +0 -164
  16. package/lib/sexpr/base-classes/SxPrimitiveBoolean.ts +0 -35
  17. package/lib/sexpr/base-classes/SxPrimitiveNumber.ts +0 -26
  18. package/lib/sexpr/base-classes/SxPrimitiveString.ts +0 -26
  19. package/lib/sexpr/classes/At.ts +0 -53
  20. package/lib/sexpr/classes/Bus.ts +0 -103
  21. package/lib/sexpr/classes/BusEntry.ts +0 -169
  22. package/lib/sexpr/classes/Color.ts +0 -29
  23. package/lib/sexpr/classes/Dnp.ts +0 -8
  24. package/lib/sexpr/classes/EmbeddedFonts.ts +0 -68
  25. package/lib/sexpr/classes/ExcludeFromSim.ts +0 -8
  26. package/lib/sexpr/classes/FieldsAutoplaced.ts +0 -8
  27. package/lib/sexpr/classes/Footprint.ts +0 -849
  28. package/lib/sexpr/classes/FootprintAttr.ts +0 -104
  29. package/lib/sexpr/classes/FootprintAutoplaceCost180.ts +0 -9
  30. package/lib/sexpr/classes/FootprintAutoplaceCost90.ts +0 -9
  31. package/lib/sexpr/classes/FootprintClearance.ts +0 -9
  32. package/lib/sexpr/classes/FootprintDescr.ts +0 -44
  33. package/lib/sexpr/classes/FootprintLocked.ts +0 -32
  34. package/lib/sexpr/classes/FootprintModel.ts +0 -142
  35. package/lib/sexpr/classes/FootprintNetTiePadGroups.ts +0 -52
  36. package/lib/sexpr/classes/FootprintPad.ts +0 -857
  37. package/lib/sexpr/classes/FootprintPath.ts +0 -44
  38. package/lib/sexpr/classes/FootprintPlaced.ts +0 -32
  39. package/lib/sexpr/classes/FootprintPrivateLayers.ts +0 -56
  40. package/lib/sexpr/classes/FootprintSheetfile.ts +0 -44
  41. package/lib/sexpr/classes/FootprintSheetname.ts +0 -44
  42. package/lib/sexpr/classes/FootprintSolderMaskMargin.ts +0 -9
  43. package/lib/sexpr/classes/FootprintSolderPasteMargin.ts +0 -9
  44. package/lib/sexpr/classes/FootprintSolderPasteRatio.ts +0 -9
  45. package/lib/sexpr/classes/FootprintTags.ts +0 -44
  46. package/lib/sexpr/classes/FootprintTedit.ts +0 -21
  47. package/lib/sexpr/classes/FootprintThermalGap.ts +0 -9
  48. package/lib/sexpr/classes/FootprintThermalWidth.ts +0 -9
  49. package/lib/sexpr/classes/FootprintZoneConnect.ts +0 -9
  50. package/lib/sexpr/classes/FpArc.ts +0 -312
  51. package/lib/sexpr/classes/FpCircle.ts +0 -314
  52. package/lib/sexpr/classes/FpLine.ts +0 -316
  53. package/lib/sexpr/classes/FpPoly.ts +0 -286
  54. package/lib/sexpr/classes/FpPolyFill.ts +0 -48
  55. package/lib/sexpr/classes/FpPolyLocked.ts +0 -40
  56. package/lib/sexpr/classes/FpRect.ts +0 -314
  57. package/lib/sexpr/classes/FpText.ts +0 -375
  58. package/lib/sexpr/classes/FpTextBox.ts +0 -450
  59. package/lib/sexpr/classes/GrLine.ts +0 -264
  60. package/lib/sexpr/classes/GrLineAngle.ts +0 -32
  61. package/lib/sexpr/classes/GrLineEnd.ts +0 -61
  62. package/lib/sexpr/classes/GrLineLocked.ts +0 -40
  63. package/lib/sexpr/classes/GrLineStart.ts +0 -61
  64. package/lib/sexpr/classes/GrText.ts +0 -228
  65. package/lib/sexpr/classes/Image.ts +0 -283
  66. package/lib/sexpr/classes/InBom.ts +0 -8
  67. package/lib/sexpr/classes/Junction.ts +0 -166
  68. package/lib/sexpr/classes/KicadPcb.ts +0 -361
  69. package/lib/sexpr/classes/KicadSch.ts +0 -397
  70. package/lib/sexpr/classes/KicadSchGenerator.ts +0 -32
  71. package/lib/sexpr/classes/KicadSchGeneratorVersion.ts +0 -30
  72. package/lib/sexpr/classes/KicadSchVersion.ts +0 -22
  73. package/lib/sexpr/classes/Label.ts +0 -176
  74. package/lib/sexpr/classes/Layer.ts +0 -51
  75. package/lib/sexpr/classes/Layers.ts +0 -47
  76. package/lib/sexpr/classes/LibSymbols.ts +0 -61
  77. package/lib/sexpr/classes/NoConnect.ts +0 -90
  78. package/lib/sexpr/classes/OnBoard.ts +0 -8
  79. package/lib/sexpr/classes/PadChamfer.ts +0 -50
  80. package/lib/sexpr/classes/PadChamferRatio.ts +0 -9
  81. package/lib/sexpr/classes/PadClearance.ts +0 -9
  82. package/lib/sexpr/classes/PadDieLength.ts +0 -9
  83. package/lib/sexpr/classes/PadDrill.ts +0 -145
  84. package/lib/sexpr/classes/PadDrillOffset.ts +0 -54
  85. package/lib/sexpr/classes/PadLayers.ts +0 -71
  86. package/lib/sexpr/classes/PadNet.ts +0 -56
  87. package/lib/sexpr/classes/PadOptions.ts +0 -181
  88. package/lib/sexpr/classes/PadPinFunction.ts +0 -9
  89. package/lib/sexpr/classes/PadPinType.ts +0 -9
  90. package/lib/sexpr/classes/PadPrimitiveGrArc.ts +0 -272
  91. package/lib/sexpr/classes/PadPrimitiveGrCircle.ts +0 -298
  92. package/lib/sexpr/classes/PadPrimitiveGrLine.ts +0 -126
  93. package/lib/sexpr/classes/PadPrimitives.ts +0 -291
  94. package/lib/sexpr/classes/PadRectDelta.ts +0 -57
  95. package/lib/sexpr/classes/PadRoundrectRratio.ts +0 -9
  96. package/lib/sexpr/classes/PadSize.ts +0 -69
  97. package/lib/sexpr/classes/PadSolderMaskMargin.ts +0 -9
  98. package/lib/sexpr/classes/PadSolderPasteMargin.ts +0 -9
  99. package/lib/sexpr/classes/PadSolderPasteMarginRatio.ts +0 -9
  100. package/lib/sexpr/classes/PadTeardrops.ts +0 -210
  101. package/lib/sexpr/classes/PadThermalBridgeAngle.ts +0 -9
  102. package/lib/sexpr/classes/PadThermalGap.ts +0 -9
  103. package/lib/sexpr/classes/PadThermalWidth.ts +0 -9
  104. package/lib/sexpr/classes/PadZoneConnect.ts +0 -9
  105. package/lib/sexpr/classes/Paper.ts +0 -119
  106. package/lib/sexpr/classes/PcbGeneral.ts +0 -82
  107. package/lib/sexpr/classes/PcbGeneralLegacyTeardrops.ts +0 -44
  108. package/lib/sexpr/classes/PcbGeneralThickness.ts +0 -9
  109. package/lib/sexpr/classes/PcbGenerator.ts +0 -16
  110. package/lib/sexpr/classes/PcbGeneratorVersion.ts +0 -16
  111. package/lib/sexpr/classes/PcbLayerDefinition.ts +0 -106
  112. package/lib/sexpr/classes/PcbLayers.ts +0 -34
  113. package/lib/sexpr/classes/PcbNet.ts +0 -56
  114. package/lib/sexpr/classes/PcbVersion.ts +0 -9
  115. package/lib/sexpr/classes/Property.ts +0 -301
  116. package/lib/sexpr/classes/PropertyHide.ts +0 -9
  117. package/lib/sexpr/classes/PropertyUnlocked.ts +0 -9
  118. package/lib/sexpr/classes/Pts.ts +0 -67
  119. package/lib/sexpr/classes/RenderCache.ts +0 -221
  120. package/lib/sexpr/classes/SchematicText.ts +0 -171
  121. package/lib/sexpr/classes/Segment.ts +0 -243
  122. package/lib/sexpr/classes/SegmentEnd.ts +0 -59
  123. package/lib/sexpr/classes/SegmentLocked.ts +0 -33
  124. package/lib/sexpr/classes/SegmentNet.ts +0 -64
  125. package/lib/sexpr/classes/SegmentStart.ts +0 -59
  126. package/lib/sexpr/classes/Setup/PcbPlotParams.ts +0 -689
  127. package/lib/sexpr/classes/Setup/PcbPlotParamsBase.ts +0 -9
  128. package/lib/sexpr/classes/Setup/PcbPlotParamsNumericProperties.ts +0 -105
  129. package/lib/sexpr/classes/Setup/PcbPlotParamsStringPropertiesA.ts +0 -104
  130. package/lib/sexpr/classes/Setup/PcbPlotParamsStringPropertiesB.ts +0 -105
  131. package/lib/sexpr/classes/Setup/Setup.ts +0 -574
  132. package/lib/sexpr/classes/Setup/SetupPropertyTypes.ts +0 -119
  133. package/lib/sexpr/classes/Setup/Stackup.ts +0 -135
  134. package/lib/sexpr/classes/Setup/StackupLayer.ts +0 -233
  135. package/lib/sexpr/classes/Setup/StackupLayerProperties.ts +0 -80
  136. package/lib/sexpr/classes/Setup/StackupProperties.ts +0 -40
  137. package/lib/sexpr/classes/Setup/base.ts +0 -165
  138. package/lib/sexpr/classes/Setup/index.ts +0 -14
  139. package/lib/sexpr/classes/Setup/setupMultiValueProperties.ts +0 -53
  140. package/lib/sexpr/classes/Setup/setupNumericProperties.ts +0 -151
  141. package/lib/sexpr/classes/Setup/setupPropertyHandlers.ts +0 -90
  142. package/lib/sexpr/classes/Setup/setupStringProperties.ts +0 -75
  143. package/lib/sexpr/classes/Sheet.ts +0 -287
  144. package/lib/sexpr/classes/SheetFill.ts +0 -44
  145. package/lib/sexpr/classes/SheetInstances.ts +0 -168
  146. package/lib/sexpr/classes/SheetInstancesRoot.ts +0 -165
  147. package/lib/sexpr/classes/SheetPin.ts +0 -125
  148. package/lib/sexpr/classes/SheetProperty.ts +0 -115
  149. package/lib/sexpr/classes/SheetSize.ts +0 -44
  150. package/lib/sexpr/classes/Stroke.ts +0 -58
  151. package/lib/sexpr/classes/StrokeType.ts +0 -34
  152. package/lib/sexpr/classes/Symbol.ts +0 -1666
  153. package/lib/sexpr/classes/TextEffects.ts +0 -461
  154. package/lib/sexpr/classes/TitleBlock.ts +0 -369
  155. package/lib/sexpr/classes/Unit.ts +0 -28
  156. package/lib/sexpr/classes/Uuid.ts +0 -8
  157. package/lib/sexpr/classes/Via.ts +0 -363
  158. package/lib/sexpr/classes/ViaNet.ts +0 -60
  159. package/lib/sexpr/classes/Width.ts +0 -8
  160. package/lib/sexpr/classes/Wire.ts +0 -111
  161. package/lib/sexpr/classes/Xy.ts +0 -33
  162. package/lib/sexpr/classes/Zone.ts +0 -39
  163. package/lib/sexpr/index.ts +0 -130
  164. package/lib/sexpr/parseKicadSexpr.ts +0 -5
  165. package/lib/sexpr/parseToPrimitiveSExpr.ts +0 -245
  166. package/lib/sexpr/utils/indentLines.ts +0 -3
  167. package/lib/sexpr/utils/parseYesNo.ts +0 -12
  168. package/lib/sexpr/utils/quoteSExprString.ts +0 -8
  169. package/lib/sexpr/utils/strokeFromArgs.ts +0 -18
  170. package/lib/sexpr/utils/toNumberValue.ts +0 -13
  171. package/lib/sexpr/utils/toStringValue.ts +0 -11
  172. package/scripts/download-references.ts +0 -68
  173. package/tests/fixtures/expectEqualPrimitiveSExpr.ts +0 -199
  174. package/tests/fixtures/png-matcher.ts +0 -109
  175. package/tests/fixtures/preload.ts +0 -1
  176. package/tests/sexpr/KicadPcbDemos.test.ts +0 -48
  177. package/tests/sexpr/KicadSchDemos.test.ts +0 -49
  178. package/tests/sexpr/classes/Footprint.test.ts +0 -277
  179. package/tests/sexpr/classes/FootprintPad.test.ts +0 -78
  180. package/tests/sexpr/classes/FpArc.test.ts +0 -45
  181. package/tests/sexpr/classes/FpCircle.test.ts +0 -39
  182. package/tests/sexpr/classes/FpPoly.test.ts +0 -43
  183. package/tests/sexpr/classes/FpRect.test.ts +0 -40
  184. package/tests/sexpr/classes/FpTextBox.test.ts +0 -84
  185. package/tests/sexpr/classes/Image.test.ts +0 -58
  186. package/tests/sexpr/classes/KicadSch.test.ts +0 -95
  187. package/tests/sexpr/classes/Paper.test.ts +0 -30
  188. package/tests/sexpr/classes/Property.test.ts +0 -48
  189. package/tests/sexpr/classes/Setup.test.ts +0 -188
  190. package/tests/sexpr/classes/Sheet.test.ts +0 -107
  191. package/tests/sexpr/classes/Stroke.test.ts +0 -15
  192. package/tests/sexpr/classes/Symbol.test.ts +0 -96
  193. package/tests/sexpr/classes/TextEffects.test.ts +0 -56
  194. package/tests/sexpr/classes/TitleBlock.test.ts +0 -40
  195. package/tsconfig.json +0 -35
@@ -1,689 +0,0 @@
1
- import { SxClass } from "../../base-classes/SxClass"
2
- import type { PrimitiveSExpr } from "../../parseToPrimitiveSExpr"
3
-
4
- import {
5
- PlotParamDashedLineDashRatio,
6
- PlotParamDashedLineGapRatio,
7
- PlotParamDrillShape,
8
- PlotParamHpglPenDiameter,
9
- PlotParamHpglPenNumber,
10
- PlotParamHpglPenOverlay,
11
- PlotParamHpglPenSpeed,
12
- PlotParamLayerSelection,
13
- PlotParamLineWidth,
14
- PlotParamMode,
15
- PlotParamOutputFormat,
16
- PlotParamPlotOnAllLayersSelection,
17
- PlotParamScaleSelection,
18
- PlotParamSvgPrecision,
19
- } from "./PcbPlotParamsNumericProperties"
20
- import { PlotParamProperty } from "./PcbPlotParamsBase"
21
- import {
22
- PlotParamCreateGerberJobFile,
23
- PlotParamDisableApertMacros,
24
- PlotParamDxfImperialUnits,
25
- PlotParamDxfPolygonMode,
26
- PlotParamDxfUsePcbnewFont,
27
- PlotParamExcludeEdgeLayer,
28
- PlotParamPdfBackFpPropertyPopups,
29
- PlotParamPdfFrontFpPropertyPopups,
30
- PlotParamPdfMetadata,
31
- PlotParamPdfSingleDocument,
32
- PlotParamPlotFrameRef,
33
- PlotParamPsNegative,
34
- PlotParamUseAuxOrigin,
35
- PlotParamUseGerberAdvancedAttributes,
36
- PlotParamUseGerberAttributes,
37
- PlotParamUseGerberExtensions,
38
- PlotParamViaOnMask,
39
- } from "./PcbPlotParamsStringPropertiesA"
40
- import {
41
- PlotParamCrossoutDnpOnFab,
42
- PlotParamHideDnpOnFab,
43
- PlotParamMirror,
44
- PlotParamOutputDirectory,
45
- PlotParamPadOnSilk,
46
- PlotParamPlotBlackAndWhite,
47
- PlotParamPlotInvisible,
48
- PlotParamPlotInvisibleText,
49
- PlotParamPlotOnAllLayers,
50
- PlotParamPlotOtherText,
51
- PlotParamPlotPadNumbers,
52
- PlotParamPlotReference,
53
- PlotParamPlotValue,
54
- PlotParamPsA4Output,
55
- PlotParamSketchDnpOnFab,
56
- PlotParamSketchPadsOnFab,
57
- PlotParamSubtractMaskFromSilk,
58
- } from "./PcbPlotParamsStringPropertiesB"
59
-
60
- const TOKEN_TO_KEY = {
61
- layerselection: "layerselection",
62
- plot_on_all_layers_selection: "plot_on_all_layers_selection",
63
- disableapertmacros: "disableapertmacros",
64
- usegerberextensions: "usegerberextensions",
65
- usegerberattributes: "usegerberattributes",
66
- usegerberadvancedattributes: "usegerberadvancedattributes",
67
- creategerberjobfile: "creategerberjobfile",
68
- excludeedgelayer: "excludeedgelayer",
69
- dashed_line_dash_ratio: "dashed_line_dash_ratio",
70
- dashed_line_gap_ratio: "dashed_line_gap_ratio",
71
- svgprecision: "svgprecision",
72
- linewidth: "linewidth",
73
- plotframeref: "plotframeref",
74
- plotreference: "plotreference",
75
- plotvalue: "plotvalue",
76
- plotothertext: "plotothertext",
77
- plotinvisibletext: "plotinvisibletext",
78
- padsonsilk: "padsonsilk",
79
- sketchpadsonfab: "sketchpadsonfab",
80
- plotpadnumbers: "plotpadnumbers",
81
- hidednponfab: "hidednponfab",
82
- sketchdnponfab: "sketchdnponfab",
83
- crossoutdnponfab: "crossoutdnponfab",
84
- subtractmaskfromsilk: "subtractmaskfromsilk",
85
- plot_black_and_white: "plot_black_and_white",
86
- plot_on_all_layers: "plot_on_all_layers",
87
- plotinvisible: "plotinvisible",
88
- mode: "mode",
89
- useauxorigin: "useauxorigin",
90
- viasonmask: "viasonmask",
91
- hpglpennumber: "hpglpennumber",
92
- hpglpenspeed: "hpglpenspeed",
93
- hpglpendiameter: "hpglpendiameter",
94
- hpglpenoverlay: "hpglpenoverlay",
95
- pdf_front_fp_property_popups: "pdf_front_fp_property_popups",
96
- pdf_back_fp_property_popups: "pdf_back_fp_property_popups",
97
- pdf_metadata: "pdf_metadata",
98
- pdf_single_document: "pdf_single_document",
99
- dxfpolygonmode: "dxfpolygonmode",
100
- dxfimperialunits: "dxfimperialunits",
101
- dxfusepcbnewfont: "dxfusepcbnewfont",
102
- psnegative: "psnegative",
103
- psa4output: "psa4output",
104
- mirror: "mirror",
105
- outputformat: "outputformat",
106
- drillshape: "drillshape",
107
- scaleselection: "scaleselection",
108
- outputdirectory: "outputdirectory",
109
- } as const
110
-
111
- type PlotParamKey = (typeof TOKEN_TO_KEY)[keyof typeof TOKEN_TO_KEY]
112
-
113
- type PcbPlotParamValues = Partial<Record<PlotParamKey, PlotParamProperty<any>>>
114
-
115
- const PCB_PLOT_PARAM_CHILD_ORDER: PlotParamKey[] = [
116
- "layerselection",
117
- "plot_on_all_layers_selection",
118
- "disableapertmacros",
119
- "usegerberextensions",
120
- "usegerberattributes",
121
- "usegerberadvancedattributes",
122
- "creategerberjobfile",
123
- "excludeedgelayer",
124
- "dashed_line_dash_ratio",
125
- "dashed_line_gap_ratio",
126
- "svgprecision",
127
- "linewidth",
128
- "plotframeref",
129
- "plotreference",
130
- "plotvalue",
131
- "plotothertext",
132
- "mode",
133
- "useauxorigin",
134
- "viasonmask",
135
- "hpglpennumber",
136
- "hpglpenspeed",
137
- "hpglpendiameter",
138
- "hpglpenoverlay",
139
- "pdf_front_fp_property_popups",
140
- "pdf_back_fp_property_popups",
141
- "pdf_metadata",
142
- "pdf_single_document",
143
- "dxfpolygonmode",
144
- "dxfimperialunits",
145
- "dxfusepcbnewfont",
146
- "psnegative",
147
- "psa4output",
148
- "plot_black_and_white",
149
- "plot_on_all_layers",
150
- "plotinvisible",
151
- "plotinvisibletext",
152
- "padsonsilk",
153
- "sketchpadsonfab",
154
- "plotpadnumbers",
155
- "hidednponfab",
156
- "sketchdnponfab",
157
- "crossoutdnponfab",
158
- "subtractmaskfromsilk",
159
- "outputformat",
160
- "mirror",
161
- "drillshape",
162
- "scaleselection",
163
- "outputdirectory",
164
- ]
165
-
166
- export class PcbPlotParams extends SxClass {
167
- static override token = "pcbplotparams"
168
- static override parentToken = "setup"
169
- token = "pcbplotparams"
170
-
171
- private _properties: PcbPlotParamValues = {}
172
-
173
- static override fromSexprPrimitives(
174
- primitiveSexprs: PrimitiveSExpr[],
175
- ): PcbPlotParams {
176
- const params = new PcbPlotParams()
177
- const { propertyMap } = SxClass.parsePrimitivesToClassProperties(
178
- primitiveSexprs,
179
- this.token,
180
- )
181
-
182
- for (const [token, instance] of Object.entries(propertyMap)) {
183
- const key = TOKEN_TO_KEY[token as keyof typeof TOKEN_TO_KEY]
184
- if (!key) {
185
- throw new Error(`Unsupported pcbplotparams token: ${token}`)
186
- }
187
- params._properties[key] = instance as PlotParamProperty<any>
188
- }
189
-
190
- return params
191
- }
192
-
193
- override getChildren(): SxClass[] {
194
- const children: SxClass[] = []
195
- for (const key of PCB_PLOT_PARAM_CHILD_ORDER) {
196
- const child = this._properties[key]
197
- if (child) {
198
- children.push(child)
199
- }
200
- }
201
- return children
202
- }
203
-
204
- private clearProperty(key: PlotParamKey) {
205
- delete this._properties[key]
206
- }
207
-
208
- private setStringProperty<
209
- K extends PlotParamKey,
210
- T extends { new (value: string): PlotParamProperty<any> },
211
- >(key: K, value: string | undefined, ClassRef: T) {
212
- if (value === undefined) {
213
- this.clearProperty(key)
214
- return
215
- }
216
- this._properties[key] = new ClassRef(value)
217
- }
218
-
219
- private setNumberProperty<
220
- K extends PlotParamKey,
221
- T extends { new (value: number): PlotParamProperty<any> },
222
- >(key: K, value: number | undefined, ClassRef: T) {
223
- if (value === undefined) {
224
- this.clearProperty(key)
225
- return
226
- }
227
- this._properties[key] = new ClassRef(value)
228
- }
229
-
230
- private setStringOrNumberProperty<
231
- K extends PlotParamKey,
232
- T extends { new (value: string | number): PlotParamProperty<any> },
233
- >(key: K, value: string | number | undefined, ClassRef: T) {
234
- if (value === undefined) {
235
- this.clearProperty(key)
236
- return
237
- }
238
- this._properties[key] = new ClassRef(value)
239
- }
240
-
241
- get layerselection(): string | number | undefined {
242
- return this._properties.layerselection?.value
243
- }
244
-
245
- set layerselection(value: string | number | undefined) {
246
- this.setStringOrNumberProperty(
247
- "layerselection",
248
- value,
249
- PlotParamLayerSelection,
250
- )
251
- }
252
-
253
- get plot_on_all_layers_selection(): string | number | undefined {
254
- return this._properties.plot_on_all_layers_selection?.value
255
- }
256
-
257
- set plot_on_all_layers_selection(value: string | number | undefined) {
258
- this.setStringOrNumberProperty(
259
- "plot_on_all_layers_selection",
260
- value,
261
- PlotParamPlotOnAllLayersSelection,
262
- )
263
- }
264
-
265
- get disableapertmacros(): string | undefined {
266
- return this._properties.disableapertmacros?.value
267
- }
268
-
269
- set disableapertmacros(value: string | undefined) {
270
- this.setStringProperty(
271
- "disableapertmacros",
272
- value,
273
- PlotParamDisableApertMacros,
274
- )
275
- }
276
-
277
- get usegerberextensions(): string | undefined {
278
- return this._properties.usegerberextensions?.value
279
- }
280
-
281
- set usegerberextensions(value: string | undefined) {
282
- this.setStringProperty(
283
- "usegerberextensions",
284
- value,
285
- PlotParamUseGerberExtensions,
286
- )
287
- }
288
-
289
- get usegerberattributes(): string | undefined {
290
- return this._properties.usegerberattributes?.value
291
- }
292
-
293
- set usegerberattributes(value: string | undefined) {
294
- this.setStringProperty(
295
- "usegerberattributes",
296
- value,
297
- PlotParamUseGerberAttributes,
298
- )
299
- }
300
-
301
- get usegerberadvancedattributes(): string | undefined {
302
- return this._properties.usegerberadvancedattributes?.value
303
- }
304
-
305
- set usegerberadvancedattributes(value: string | undefined) {
306
- this.setStringProperty(
307
- "usegerberadvancedattributes",
308
- value,
309
- PlotParamUseGerberAdvancedAttributes,
310
- )
311
- }
312
-
313
- get creategerberjobfile(): string | undefined {
314
- return this._properties.creategerberjobfile?.value
315
- }
316
-
317
- set creategerberjobfile(value: string | undefined) {
318
- this.setStringProperty(
319
- "creategerberjobfile",
320
- value,
321
- PlotParamCreateGerberJobFile,
322
- )
323
- }
324
-
325
- get excludeedgelayer(): string | undefined {
326
- return this._properties.excludeedgelayer?.value
327
- }
328
-
329
- set excludeedgelayer(value: string | undefined) {
330
- this.setStringProperty("excludeedgelayer", value, PlotParamExcludeEdgeLayer)
331
- }
332
-
333
- get dashed_line_dash_ratio(): number | undefined {
334
- return this._properties.dashed_line_dash_ratio?.value
335
- }
336
-
337
- set dashed_line_dash_ratio(value: number | undefined) {
338
- this.setNumberProperty(
339
- "dashed_line_dash_ratio",
340
- value,
341
- PlotParamDashedLineDashRatio,
342
- )
343
- }
344
-
345
- get dashed_line_gap_ratio(): number | undefined {
346
- return this._properties.dashed_line_gap_ratio?.value
347
- }
348
-
349
- set dashed_line_gap_ratio(value: number | undefined) {
350
- this.setNumberProperty(
351
- "dashed_line_gap_ratio",
352
- value,
353
- PlotParamDashedLineGapRatio,
354
- )
355
- }
356
-
357
- get svgprecision(): number | undefined {
358
- return this._properties.svgprecision?.value
359
- }
360
-
361
- set svgprecision(value: number | undefined) {
362
- this.setNumberProperty("svgprecision", value, PlotParamSvgPrecision)
363
- }
364
-
365
- get linewidth(): number | undefined {
366
- return this._properties.linewidth?.value
367
- }
368
-
369
- set linewidth(value: number | undefined) {
370
- this.setNumberProperty("linewidth", value, PlotParamLineWidth)
371
- }
372
-
373
- get plotframeref(): string | undefined {
374
- return this._properties.plotframeref?.value
375
- }
376
-
377
- set plotframeref(value: string | undefined) {
378
- this.setStringProperty("plotframeref", value, PlotParamPlotFrameRef)
379
- }
380
-
381
- get plotreference(): string | undefined {
382
- return this._properties.plotreference?.value
383
- }
384
-
385
- set plotreference(value: string | undefined) {
386
- this.setStringProperty("plotreference", value, PlotParamPlotReference)
387
- }
388
-
389
- get plotvalue(): string | undefined {
390
- return this._properties.plotvalue?.value
391
- }
392
-
393
- set plotvalue(value: string | undefined) {
394
- this.setStringProperty("plotvalue", value, PlotParamPlotValue)
395
- }
396
-
397
- get plotothertext(): string | undefined {
398
- return this._properties.plotothertext?.value
399
- }
400
-
401
- set plotothertext(value: string | undefined) {
402
- this.setStringProperty("plotothertext", value, PlotParamPlotOtherText)
403
- }
404
-
405
- get plotinvisibletext(): string | undefined {
406
- return this._properties.plotinvisibletext?.value
407
- }
408
-
409
- set plotinvisibletext(value: string | undefined) {
410
- this.setStringProperty(
411
- "plotinvisibletext",
412
- value,
413
- PlotParamPlotInvisibleText,
414
- )
415
- }
416
-
417
- get padsonsilk(): string | undefined {
418
- return this._properties.padsonsilk?.value
419
- }
420
-
421
- set padsonsilk(value: string | undefined) {
422
- this.setStringProperty("padsonsilk", value, PlotParamPadOnSilk)
423
- }
424
-
425
- get plotpadnumbers(): string | undefined {
426
- return this._properties.plotpadnumbers?.value
427
- }
428
-
429
- set plotpadnumbers(value: string | undefined) {
430
- this.setStringProperty("plotpadnumbers", value, PlotParamPlotPadNumbers)
431
- }
432
-
433
- get sketchpadsonfab(): string | undefined {
434
- return this._properties.sketchpadsonfab?.value
435
- }
436
-
437
- set sketchpadsonfab(value: string | undefined) {
438
- this.setStringProperty("sketchpadsonfab", value, PlotParamSketchPadsOnFab)
439
- }
440
-
441
- get hidednponfab(): string | undefined {
442
- return this._properties.hidednponfab?.value
443
- }
444
-
445
- set hidednponfab(value: string | undefined) {
446
- this.setStringProperty("hidednponfab", value, PlotParamHideDnpOnFab)
447
- }
448
-
449
- get sketchdnponfab(): string | undefined {
450
- return this._properties.sketchdnponfab?.value
451
- }
452
-
453
- set sketchdnponfab(value: string | undefined) {
454
- this.setStringProperty("sketchdnponfab", value, PlotParamSketchDnpOnFab)
455
- }
456
-
457
- get crossoutdnponfab(): string | undefined {
458
- return this._properties.crossoutdnponfab?.value
459
- }
460
-
461
- set crossoutdnponfab(value: string | undefined) {
462
- this.setStringProperty("crossoutdnponfab", value, PlotParamCrossoutDnpOnFab)
463
- }
464
-
465
- get subtractmaskfromsilk(): string | undefined {
466
- return this._properties.subtractmaskfromsilk?.value
467
- }
468
-
469
- set subtractmaskfromsilk(value: string | undefined) {
470
- this.setStringProperty(
471
- "subtractmaskfromsilk",
472
- value,
473
- PlotParamSubtractMaskFromSilk,
474
- )
475
- }
476
-
477
- get plot_black_and_white(): string | undefined {
478
- return this._properties.plot_black_and_white?.value
479
- }
480
-
481
- set plot_black_and_white(value: string | undefined) {
482
- this.setStringProperty(
483
- "plot_black_and_white",
484
- value,
485
- PlotParamPlotBlackAndWhite,
486
- )
487
- }
488
-
489
- get plot_on_all_layers(): string | undefined {
490
- return this._properties.plot_on_all_layers?.value
491
- }
492
-
493
- set plot_on_all_layers(value: string | undefined) {
494
- this.setStringProperty(
495
- "plot_on_all_layers",
496
- value,
497
- PlotParamPlotOnAllLayers,
498
- )
499
- }
500
-
501
- get plotinvisible(): string | undefined {
502
- return this._properties.plotinvisible?.value
503
- }
504
-
505
- set plotinvisible(value: string | undefined) {
506
- this.setStringProperty("plotinvisible", value, PlotParamPlotInvisible)
507
- }
508
-
509
- get mode(): number | undefined {
510
- return this._properties.mode?.value
511
- }
512
-
513
- set mode(value: number | undefined) {
514
- this.setNumberProperty("mode", value, PlotParamMode)
515
- }
516
-
517
- get useauxorigin(): string | undefined {
518
- return this._properties.useauxorigin?.value
519
- }
520
-
521
- set useauxorigin(value: string | undefined) {
522
- this.setStringProperty("useauxorigin", value, PlotParamUseAuxOrigin)
523
- }
524
-
525
- get viasonmask(): string | undefined {
526
- return this._properties.viasonmask?.value
527
- }
528
-
529
- set viasonmask(value: string | undefined) {
530
- this.setStringProperty("viasonmask", value, PlotParamViaOnMask)
531
- }
532
-
533
- get hpglpennumber(): number | undefined {
534
- return this._properties.hpglpennumber?.value
535
- }
536
-
537
- set hpglpennumber(value: number | undefined) {
538
- this.setNumberProperty("hpglpennumber", value, PlotParamHpglPenNumber)
539
- }
540
-
541
- get hpglpenspeed(): number | undefined {
542
- return this._properties.hpglpenspeed?.value
543
- }
544
-
545
- set hpglpenspeed(value: number | undefined) {
546
- this.setNumberProperty("hpglpenspeed", value, PlotParamHpglPenSpeed)
547
- }
548
-
549
- get hpglpendiameter(): number | undefined {
550
- return this._properties.hpglpendiameter?.value
551
- }
552
-
553
- set hpglpendiameter(value: number | undefined) {
554
- this.setNumberProperty("hpglpendiameter", value, PlotParamHpglPenDiameter)
555
- }
556
-
557
- get hpglpenoverlay(): number | undefined {
558
- return this._properties.hpglpenoverlay?.value
559
- }
560
-
561
- set hpglpenoverlay(value: number | undefined) {
562
- this.setNumberProperty("hpglpenoverlay", value, PlotParamHpglPenOverlay)
563
- }
564
-
565
- get pdf_front_fp_property_popups(): string | undefined {
566
- return this._properties.pdf_front_fp_property_popups?.value
567
- }
568
-
569
- set pdf_front_fp_property_popups(value: string | undefined) {
570
- this.setStringProperty(
571
- "pdf_front_fp_property_popups",
572
- value,
573
- PlotParamPdfFrontFpPropertyPopups,
574
- )
575
- }
576
-
577
- get pdf_back_fp_property_popups(): string | undefined {
578
- return this._properties.pdf_back_fp_property_popups?.value
579
- }
580
-
581
- set pdf_back_fp_property_popups(value: string | undefined) {
582
- this.setStringProperty(
583
- "pdf_back_fp_property_popups",
584
- value,
585
- PlotParamPdfBackFpPropertyPopups,
586
- )
587
- }
588
-
589
- get pdf_metadata(): string | undefined {
590
- return this._properties.pdf_metadata?.value
591
- }
592
-
593
- set pdf_metadata(value: string | undefined) {
594
- this.setStringProperty("pdf_metadata", value, PlotParamPdfMetadata)
595
- }
596
-
597
- get pdf_single_document(): string | undefined {
598
- return this._properties.pdf_single_document?.value
599
- }
600
-
601
- set pdf_single_document(value: string | undefined) {
602
- this.setStringProperty(
603
- "pdf_single_document",
604
- value,
605
- PlotParamPdfSingleDocument,
606
- )
607
- }
608
-
609
- get dxfpolygonmode(): string | undefined {
610
- return this._properties.dxfpolygonmode?.value
611
- }
612
-
613
- set dxfpolygonmode(value: string | undefined) {
614
- this.setStringProperty("dxfpolygonmode", value, PlotParamDxfPolygonMode)
615
- }
616
-
617
- get dxfimperialunits(): string | undefined {
618
- return this._properties.dxfimperialunits?.value
619
- }
620
-
621
- set dxfimperialunits(value: string | undefined) {
622
- this.setStringProperty("dxfimperialunits", value, PlotParamDxfImperialUnits)
623
- }
624
-
625
- get dxfusepcbnewfont(): string | undefined {
626
- return this._properties.dxfusepcbnewfont?.value
627
- }
628
-
629
- set dxfusepcbnewfont(value: string | undefined) {
630
- this.setStringProperty("dxfusepcbnewfont", value, PlotParamDxfUsePcbnewFont)
631
- }
632
-
633
- get psnegative(): string | undefined {
634
- return this._properties.psnegative?.value
635
- }
636
-
637
- set psnegative(value: string | undefined) {
638
- this.setStringProperty("psnegative", value, PlotParamPsNegative)
639
- }
640
-
641
- get psa4output(): string | undefined {
642
- return this._properties.psa4output?.value
643
- }
644
-
645
- set psa4output(value: string | undefined) {
646
- this.setStringProperty("psa4output", value, PlotParamPsA4Output)
647
- }
648
-
649
- get mirror(): string | undefined {
650
- return this._properties.mirror?.value
651
- }
652
-
653
- set mirror(value: string | undefined) {
654
- this.setStringProperty("mirror", value, PlotParamMirror)
655
- }
656
-
657
- get outputformat(): number | undefined {
658
- return this._properties.outputformat?.value
659
- }
660
-
661
- set outputformat(value: number | undefined) {
662
- this.setNumberProperty("outputformat", value, PlotParamOutputFormat)
663
- }
664
-
665
- get drillshape(): number | undefined {
666
- return this._properties.drillshape?.value
667
- }
668
-
669
- set drillshape(value: number | undefined) {
670
- this.setNumberProperty("drillshape", value, PlotParamDrillShape)
671
- }
672
-
673
- get scaleselection(): number | undefined {
674
- return this._properties.scaleselection?.value
675
- }
676
-
677
- set scaleselection(value: number | undefined) {
678
- this.setNumberProperty("scaleselection", value, PlotParamScaleSelection)
679
- }
680
-
681
- get outputdirectory(): string | undefined {
682
- return this._properties.outputdirectory?.value
683
- }
684
-
685
- set outputdirectory(value: string | undefined) {
686
- this.setStringProperty("outputdirectory", value, PlotParamOutputDirectory)
687
- }
688
- }
689
- SxClass.register(PcbPlotParams)
@@ -1,9 +0,0 @@
1
- import { SxClass } from "../../base-classes/SxClass"
2
-
3
- import { SingleValueProperty } from "./base"
4
-
5
- export abstract class PlotParamProperty<
6
- T extends string | number,
7
- > extends SingleValueProperty<T> {
8
- static override parentToken = "pcbplotparams"
9
- }