@jlceda/pro-api-types 0.1.84 → 0.1.86

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 (2) hide show
  1. package/index.d.ts +486 -148
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1187,7 +1187,7 @@ declare enum EPCB_LayerId {
1187
1187
  SHELL_3D_TOP = 54,
1188
1188
  /** 3D 外壳底层 */
1189
1189
  SHELL_3D_BOTTOM = 55,
1190
- /** 钻��图层 */
1190
+ /** 钻���图层 */
1191
1191
  DRILL_DRAWING = 56
1192
1192
  }
1193
1193
 
@@ -1393,6 +1393,46 @@ declare enum EPCB_PrimitiveViaType {
1393
1393
  SUTURE = 2
1394
1394
  }
1395
1395
 
1396
+ /**
1397
+ * 器件类型
1398
+ *
1399
+ * @public
1400
+ */
1401
+ declare enum ESCH_PrimitiveComponentType {
1402
+ /** 元件 */
1403
+ COMPONENT = "part",
1404
+ /** 图纸 */
1405
+ DRAWING = "Drawing",
1406
+ /** 网络标识 */
1407
+ NET_FLAG = "netflag",
1408
+ /** 网络端口 */
1409
+ NET_PORT = "netport",
1410
+ /** 无电气标识 */
1411
+ NON_ELECTRICAL_FLAG = "nonElectrical_symbol",
1412
+ /** 短接标识 */
1413
+ SHORT_CIRCUIT_FLAG = "short_symbol"
1414
+ }
1415
+
1416
+ /**
1417
+ * 引脚类型
1418
+ *
1419
+ * @public
1420
+ */
1421
+ declare enum ESCH_PrimitivePinType {
1422
+ IN = "IN",
1423
+ OUT = "OUT",
1424
+ BI = "BI",
1425
+ OPEN_COLLECTOR = "Open Collector",
1426
+ STATE_3 = "3 State",
1427
+ OPEN_EMITTER = "Open Emitter",
1428
+ POWER = "Power",
1429
+ HIZ = "HIZ",
1430
+ UNDEFINED = "Undefined",
1431
+ TERMINATOR = "Terminator",
1432
+ GROUND = "Ground",
1433
+ DEFAULT = "BI"
1434
+ }
1435
+
1396
1436
  /**
1397
1437
  * 图元类型
1398
1438
  *
@@ -1407,6 +1447,8 @@ declare enum ESCH_PrimitiveType {
1407
1447
  CIRCLE = "Circle",
1408
1448
  /** 器件 */
1409
1449
  COMPONENT = "Component",
1450
+ /** 器件引脚 */
1451
+ COMPONENT_PIN = "ComponentPin",
1410
1452
  /** 引脚 */
1411
1453
  PIN = "Pin",
1412
1454
  /** 多边形 */
@@ -1930,7 +1972,7 @@ declare interface ILIB_CbbItem {
1930
1972
  }
1931
1973
 
1932
1974
  /**
1933
- * 搜索��的复用模块属性
1975
+ * 搜索到的复用模块属性
1934
1976
  *
1935
1977
  * @public
1936
1978
  */
@@ -2250,7 +2292,7 @@ declare interface ILIB_SymbolSearchItem {
2250
2292
  *
2251
2293
  * @public
2252
2294
  * @remarks
2253
- * 复杂多边形可以包含多个单多边形,通过 {@link https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/fill-rule | fill-rule} 将其组合,以实现多边形的布尔运算。
2295
+ * 复杂多边形可以包含��个单多边形,通过 {@link https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/fill-rule | fill-rule} 将其组合,以实现多边形的布尔运算。
2254
2296
  * 目前嘉立创 EDA 专业版固定使用 {@link https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/fill-rule#nonzero | nonzero} 这个 fill-rule。
2255
2297
  */
2256
2298
  declare class IPCB_ComplexPolygon {
@@ -2562,7 +2604,7 @@ declare class IPCB_PrimitiveArc implements IPCB_Primitive {
2562
2604
  * 设置属性状态:终止位置 Y
2563
2605
  *
2564
2606
  * @beta
2565
- * @param endY - 终止位置 Y
2607
+ * @param endY - 终��位置 Y
2566
2608
  * @returns 圆弧线图元对象
2567
2609
  */
2568
2610
  setState_EndY(endY: number): IPCB_PrimitiveArc;
@@ -2711,7 +2753,16 @@ declare class IPCB_PrimitiveComponent implements IPCB_Primitive {
2711
2753
  /* Excluded from this release type: setState_SupplierId */
2712
2754
  /* Excluded from this release type: setState_Manufacturer */
2713
2755
  /* Excluded from this release type: setState_ManufacturerId */
2714
- /* Excluded from this release type: setState_OtherProperty */
2756
+ /**
2757
+ * 设置属性状态:其它参数
2758
+ *
2759
+ * @beta
2760
+ * @param otherProperty - 其它参数
2761
+ * @returns 器件图元对象
2762
+ */
2763
+ setState_OtherProperty(otherProperty: {
2764
+ [key: string]: string;
2765
+ }): IPCB_PrimitiveComponent;
2715
2766
  /**
2716
2767
  * 将图元转换为异步图元
2717
2768
  *
@@ -3066,7 +3117,7 @@ declare class IPCB_PrimitiveFill implements IPCB_Primitive {
3066
3117
  */
3067
3118
  setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveFill;
3068
3119
  /**
3069
- * 将图元转换为异步���元
3120
+ * 将图元转换为异步图元
3070
3121
  *
3071
3122
  * @public
3072
3123
  * @returns 填充图元对象
@@ -3844,7 +3895,7 @@ declare class IPCB_PrimitivePad implements IPCB_Primitive {
3844
3895
  */
3845
3896
  setState_SolderMaskAndPasteMaskExpansion(solderMaskAndPasteMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null): IPCB_PrimitivePad;
3846
3897
  /**
3847
- * 设置属性状态��热焊优化参数
3898
+ * 设置属性状态:热焊优化参数
3848
3899
  *
3849
3900
  * @beta
3850
3901
  * @param heatWelding - 热焊优化参数
@@ -4004,7 +4055,7 @@ declare class IPCB_PrimitivePolyline implements IPCB_Primitive {
4004
4055
  */
4005
4056
  setState_Layer(layer: TPCB_LayersOfLine): IPCB_PrimitivePolyline;
4006
4057
  /**
4007
- * 设置属性���态:单多边形
4058
+ * 设置属性状态:单多边形
4008
4059
  *
4009
4060
  * @beta
4010
4061
  * @param polygon - 单多边形
@@ -4981,30 +5032,28 @@ declare class ISCH_PrimitiveComponent implements ISCH_Primitive {
4981
5032
  private componentType;
4982
5033
  /** 图元 ID */
4983
5034
  private primitiveId?;
4984
- /** 关联库器件 UUID */
4985
- private componentUuid;
4986
- /** 子库编号 */
4987
- private subLibraryId;
4988
- /** 关联库符号 UUID */
4989
- private symbolUuid?;
5035
+ /** 关联库器件 */
5036
+ private component;
4990
5037
  /** 坐标 X */
4991
5038
  private x;
4992
5039
  /** 坐标 Y */
4993
5040
  private y;
5041
+ /** 子图块名称 */
5042
+ private subPartName?;
4994
5043
  /** 旋转角度 */
4995
5044
  private rotation;
4996
5045
  /** 是否镜像 */
4997
5046
  private mirror;
4998
- /** 库路径 */
4999
- private libraryPath;
5000
5047
  /** Component 属性:是否加入 BOM */
5001
5048
  private addIntoBom?;
5002
5049
  /** Component 属性:是否转到 PCB */
5003
5050
  private addIntoPcb?;
5004
5051
  /** NetPort 和 NetFlag 属性:网络名称 */
5005
5052
  private net?;
5053
+ /** 关联库符号 UUID */
5054
+ private symbol?;
5006
5055
  /** 关联库封装 UUID */
5007
- private footprintUuid?;
5056
+ private footprint?;
5008
5057
  /** Component 属性:位号 */
5009
5058
  private designator?;
5010
5059
  /** Component 属性:名称 */
@@ -5019,93 +5068,351 @@ declare class ISCH_PrimitiveComponent implements ISCH_Primitive {
5019
5068
  private supplier?;
5020
5069
  /** Component 属性:供应商编号 */
5021
5070
  private supplierId?;
5071
+ /** 其它参数 */
5072
+ private otherProperty?;
5022
5073
  /* Excluded from this release type: __constructor */
5074
+ /* Excluded from this release type: create */
5023
5075
  /**
5024
- * 在原理图画布中创建图元
5076
+ * 获取属性状态:图元类型
5025
5077
  *
5026
- * @returns 器件图元对象
5078
+ * @public
5079
+ * @returns 图元类型
5080
+ */
5081
+ getState_PrimitiveType(): ESCH_PrimitiveType;
5082
+ /**
5083
+ * 获取属性状态:器件类型
5084
+ *
5085
+ * @public
5086
+ * @returns 器件类型
5087
+ */
5088
+ getState_ComponentType(): ESCH_PrimitiveComponentType;
5089
+ /**
5090
+ * 获取属性状态:图元 ID
5091
+ *
5092
+ * @public
5093
+ * @returns 图元 ID
5027
5094
  */
5028
- create(): Promise<ISCH_PrimitiveComponent>;
5029
- getState_PrimitiveType(): string;
5030
- getState_ComponentType(): string;
5031
5095
  getState_PrimitiveId(): string;
5032
- getState_ComponentUuid(): string;
5033
- getState_SubLibraryId(): string;
5034
- getState_SymbolUuid(): string | undefined;
5096
+ /**
5097
+ * 获取属性状态:关联库器件
5098
+ *
5099
+ * @public
5100
+ * @returns 关联库器件
5101
+ */
5102
+ getState_Component(): {
5103
+ libraryUuid: string;
5104
+ uuid: string;
5105
+ };
5106
+ /**
5107
+ * 获取属性状态:坐标 X
5108
+ *
5109
+ * @public
5110
+ * @returns 坐标 X
5111
+ */
5035
5112
  getState_X(): number;
5113
+ /**
5114
+ * 获取属性状态:坐标 Y
5115
+ *
5116
+ * @public
5117
+ * @returns 坐标 Y
5118
+ */
5036
5119
  getState_Y(): number;
5120
+ /**
5121
+ * 获取属性状态:子图块名称
5122
+ *
5123
+ * @public
5124
+ * @returns 子图块名称
5125
+ */
5126
+ getState_SubPartName(): string | undefined;
5127
+ /**
5128
+ * 获取属性状态:旋转角度
5129
+ *
5130
+ * @public
5131
+ * @returns 旋转角度
5132
+ */
5037
5133
  getState_Rotation(): number;
5134
+ /**
5135
+ * 获取属性状态:是否镜像
5136
+ *
5137
+ * @public
5138
+ * @returns 是否镜像
5139
+ */
5038
5140
  getState_Mirror(): boolean;
5141
+ /**
5142
+ * 获取属性状态:是否加入 BOM
5143
+ *
5144
+ * @public
5145
+ * @returns 是否加入 BOM
5146
+ */
5039
5147
  getState_AddIntoBom(): boolean | undefined;
5148
+ /**
5149
+ * 获取属性状态:是否转到 PCB
5150
+ *
5151
+ * @public
5152
+ * @returns 是否转到 PCB
5153
+ */
5040
5154
  getState_AddIntoPcb(): boolean | undefined;
5155
+ /**
5156
+ * 获取属性状态:网络名称
5157
+ *
5158
+ * @public
5159
+ * @returns 网络名称
5160
+ */
5041
5161
  getState_Net(): string | undefined;
5042
- getState_FootprintUuid(): string | undefined;
5162
+ /**
5163
+ * 获取属性状态:关联库符号
5164
+ *
5165
+ * @public
5166
+ * @returns 关联库符号
5167
+ */
5168
+ getState_Symbol(): {
5169
+ libraryUuid: string;
5170
+ uuid: string;
5171
+ } | undefined;
5172
+ /**
5173
+ * 获取属性状态:关联库封装
5174
+ *
5175
+ * @public
5176
+ * @returns 关联库封装
5177
+ */
5178
+ getState_Footprint(): {
5179
+ libraryUuid: string;
5180
+ uuid: string;
5181
+ } | undefined;
5182
+ /**
5183
+ * 获取属性状态:位号
5184
+ *
5185
+ * @public
5186
+ * @returns 位号
5187
+ */
5043
5188
  getState_Designator(): string | undefined;
5189
+ /**
5190
+ * 获取属性状态:名称
5191
+ *
5192
+ * @public
5193
+ * @returns 名称
5194
+ */
5044
5195
  getState_Name(): string | undefined;
5196
+ /**
5197
+ * 获取属性状态:唯一 ID
5198
+ *
5199
+ * @public
5200
+ * @returns 唯一 ID
5201
+ */
5045
5202
  getState_UniqueId(): string | undefined;
5203
+ /**
5204
+ * 获取属性状态:制造商
5205
+ *
5206
+ * @public
5207
+ * @returns 制造商
5208
+ */
5046
5209
  getState_Manufacturer(): string | undefined;
5210
+ /**
5211
+ * 获取属性状态:制造商编号
5212
+ *
5213
+ * @public
5214
+ * @returns 制造商编号
5215
+ */
5047
5216
  getState_ManufacturerId(): string | undefined;
5217
+ /**
5218
+ * 获取属性状态:供应商
5219
+ *
5220
+ * @public
5221
+ * @returns 供应商
5222
+ */
5048
5223
  getState_Supplier(): string | undefined;
5224
+ /**
5225
+ * 获取属性状态:供应商编号
5226
+ *
5227
+ * @public
5228
+ * @returns 供应商编号
5229
+ */
5049
5230
  getState_SupplierId(): string | undefined;
5050
- /** 数据校验 */
5231
+ /**
5232
+ * 获取属性状态:其它参数
5233
+ *
5234
+ * @public
5235
+ * @returns 其它参数
5236
+ */
5237
+ getState_OtherProperty(): {
5238
+ [key: string]: string;
5239
+ } | undefined;
5240
+ /**
5241
+ * 设置属性状态:坐标 X
5242
+ *
5243
+ * @beta
5244
+ * @param x - 坐标 X
5245
+ * @returns 器件图元对象
5246
+ */
5051
5247
  setState_X(x: number): ISCH_PrimitiveComponent;
5052
- /** 数据校验 */
5248
+ /**
5249
+ * 设置属性状态:坐标 Y
5250
+ *
5251
+ * @beta
5252
+ * @param y - 坐标 Y
5253
+ * @returns 器件图元对象
5254
+ */
5053
5255
  setState_Y(y: number): ISCH_PrimitiveComponent;
5054
- /** 数据校验 */
5256
+ /**
5257
+ * 设置属性状态:旋转角度
5258
+ *
5259
+ * @beta
5260
+ * @param rotation - 旋转角度
5261
+ * @returns 器件图元对象
5262
+ */
5055
5263
  setState_Rotation(rotation: number): ISCH_PrimitiveComponent;
5056
- /** 数据校验 */
5264
+ /**
5265
+ * 设置属性状态:是否镜像
5266
+ *
5267
+ * @beta
5268
+ * @param mirror - 是否镜像
5269
+ * @returns 器件图元对象
5270
+ */
5057
5271
  setState_Mirror(mirror: boolean): ISCH_PrimitiveComponent;
5058
- /** 数据校验 */
5059
- setState_AddIntoBom(addIntoBom: any): ISCH_PrimitiveComponent;
5060
- /** 数据校验 */
5061
- setState_AddIntoPcb(addIntoPcb: any): ISCH_PrimitiveComponent;
5062
- /** 数据校验 */
5272
+ /**
5273
+ * 设置属性状态:是否加入 BOM
5274
+ *
5275
+ * @beta
5276
+ * @param addIntoBom - 是否加入 BOM
5277
+ * @returns 器件图元对象
5278
+ */
5279
+ setState_AddIntoBom(addIntoBom: boolean | undefined): ISCH_PrimitiveComponent;
5280
+ /**
5281
+ * 设置属性状态:是否转到 PCB
5282
+ *
5283
+ * @beta
5284
+ * @param addIntoPcb - 是否转到 PCB
5285
+ * @returns 器件图元对象
5286
+ */
5287
+ setState_AddIntoPcb(addIntoPcb: boolean | undefined): ISCH_PrimitiveComponent;
5288
+ /**
5289
+ * 设置属性状态:网络名称
5290
+ *
5291
+ * @beta
5292
+ * @param net - 网络名称
5293
+ * @returns 器件图元对象
5294
+ */
5063
5295
  setState_Net(net: string | undefined): ISCH_PrimitiveComponent;
5064
- /** 数据校验 */
5296
+ /**
5297
+ * 设置属性状态:位号
5298
+ *
5299
+ * @beta
5300
+ * @param designator - 位号
5301
+ * @returns 器件图元对象
5302
+ */
5065
5303
  setState_Designator(designator: string | undefined): ISCH_PrimitiveComponent;
5066
- /** 数据校验 */
5304
+ /**
5305
+ * 设置属性状态:名称
5306
+ *
5307
+ * @beta
5308
+ * @param name - 名称
5309
+ * @returns 器件图元对象
5310
+ */
5067
5311
  setState_Name(name: string | undefined): ISCH_PrimitiveComponent;
5068
- /** 数据校验 */
5312
+ /**
5313
+ * 设置属性状态:唯一 ID
5314
+ *
5315
+ * @beta
5316
+ * @param uniqueId - 唯一 ID
5317
+ * @returns 器件图元对象
5318
+ */
5069
5319
  setState_UniqueId(uniqueId: string | undefined): ISCH_PrimitiveComponent;
5070
- /** 数据校验 */
5071
- setState_Supplier(supplier: string | undefined): ISCH_PrimitiveComponent;
5072
- /** 数据校验 */
5073
- setState_SupplierId(supplierId: string | undefined): ISCH_PrimitiveComponent;
5074
- /** 数据校验 */
5320
+ /**
5321
+ * 设置属性状态:制造商
5322
+ *
5323
+ * @beta
5324
+ * @param manufacturer - 制造商
5325
+ * @returns 器件图元对象
5326
+ */
5075
5327
  setState_Manufacturer(manufacturer: string | undefined): ISCH_PrimitiveComponent;
5076
- /** 数据校验 */
5328
+ /**
5329
+ * 设置属性状态:制造商编号
5330
+ *
5331
+ * @beta
5332
+ * @param manufacturerId - 制造商编号
5333
+ * @returns 器件图元对象
5334
+ */
5077
5335
  setState_ManufacturerId(manufacturerId: string | undefined): ISCH_PrimitiveComponent;
5336
+ /**
5337
+ * 设置属性状态:供应商
5338
+ *
5339
+ * @beta
5340
+ * @param supplier - 供应商
5341
+ * @returns 器件图元对象
5342
+ */
5343
+ setState_Supplier(supplier: string | undefined): ISCH_PrimitiveComponent;
5344
+ /**
5345
+ * 设置属性状态:供应商编号
5346
+ *
5347
+ * @beta
5348
+ * @param supplierId - 供应商编号
5349
+ * @returns 器件图元对象
5350
+ */
5351
+ setState_SupplierId(supplierId: string | undefined): ISCH_PrimitiveComponent;
5352
+ /**
5353
+ * 设置属性状态:其它参数
5354
+ *
5355
+ * @beta
5356
+ * @param otherProperty - 其它参数
5357
+ * @returns 器件图元对象
5358
+ */
5359
+ setState_OtherProperty(otherProperty: {
5360
+ [key: string]: string;
5361
+ }): ISCH_PrimitiveComponent;
5078
5362
  /**
5079
5363
  * 将图元转换为异步图元
5364
+ *
5365
+ * @public
5366
+ * @returns 圆弧线图元对象
5080
5367
  */
5081
5368
  toAsync(): ISCH_PrimitiveComponent;
5082
5369
  /**
5083
5370
  * 将图元转换为同步图元
5371
+ *
5372
+ * @public
5373
+ * @returns 圆弧线图元对象
5084
5374
  */
5085
5375
  toSync(): ISCH_PrimitiveComponent;
5086
5376
  /**
5087
5377
  * 查询图元是否为异步图元
5378
+ *
5379
+ * @public
5380
+ * @returns 是否为异步图元
5088
5381
  */
5089
5382
  isAsync(): boolean;
5090
5383
  /**
5091
5384
  * 将异步图元重置为当前画布状态
5092
5385
  *
5093
5386
  * @beta
5387
+ * @returns 器件图元对象
5094
5388
  */
5095
5389
  reset(): Promise<ISCH_PrimitiveComponent>;
5096
5390
  /**
5097
5391
  * 将对图元的更改应用到画布
5098
5392
  *
5099
5393
  * @beta
5100
- * @remarks 此处需要通过 componentUuid 区分器件类型,并在原理图画布中用正确的方式修改器件
5394
+ * @returns 器件图元对象
5101
5395
  */
5102
5396
  done(): Promise<ISCH_PrimitiveComponent>;
5103
- /** 数据校验 */
5104
- private setState_ComponentUuid;
5105
- /** 数据校验 */
5106
- private setState_SubLibraryId;
5107
- /** 数据校验 */
5108
- private setState_LibraryPath;
5397
+ /* Excluded from this release type: setState_Component */
5398
+ /* Excluded from this release type: setState_SubPartName */
5399
+ }
5400
+
5401
+ /**
5402
+ * 器件引脚
5403
+ *
5404
+ * @public
5405
+ */
5406
+ declare interface ISCH_PrimitiveComponentPin {
5407
+ readonly primitiveType: ESCH_PrimitiveType.COMPONENT_PIN;
5408
+ readonly primitiveId: string;
5409
+ readonly x: number;
5410
+ readonly y: number;
5411
+ readonly pinNumber: string;
5412
+ readonly pinName: string;
5413
+ readonly pinShape: string;
5414
+ readonly pinType: ESCH_PrimitivePinType;
5415
+ readonly noConnectFlag: boolean;
5109
5416
  }
5110
5417
 
5111
5418
  /**
@@ -5156,7 +5463,7 @@ declare class ISCH_PrimitivePin implements ISCH_Primitive {
5156
5463
  getState_PinLength(): number;
5157
5464
  getState_PinColor(): string | null;
5158
5465
  getState_PinShape(): string;
5159
- getState_pinType(): PIN_TYPE;
5466
+ getState_pinType(): ESCH_PrimitivePinType;
5160
5467
  setState_X(x: number): ISCH_PrimitivePin;
5161
5468
  setState_Y(y: number): ISCH_PrimitivePin;
5162
5469
  setState_PinNumber(pinNumber: string): ISCH_PrimitivePin;
@@ -5165,7 +5472,7 @@ declare class ISCH_PrimitivePin implements ISCH_Primitive {
5165
5472
  setState_PinLength(pinLength: number): ISCH_PrimitivePin;
5166
5473
  setState_PinColor(pinColor: string | null): ISCH_PrimitivePin;
5167
5474
  setState_PinShape(pinShape: string): this;
5168
- setState_PinType(pinType: PIN_TYPE): ISCH_PrimitivePin;
5475
+ setState_PinType(pinType: ESCH_PrimitivePinType): ISCH_PrimitivePin;
5169
5476
  /**
5170
5477
  * 将图元转换为异步图元
5171
5478
  */
@@ -6349,7 +6656,7 @@ declare class PCB_Document {
6349
6656
  * 嘉立创 EDA 专业版 API 使用的均为数据原点;
6350
6657
  *
6351
6658
  * 如果返回的数据为 `{ canvasOriginOffsetX: 100, canvasOriginOffsetY: 200 }`,
6352
- * 则代表画布原点在数据原点的向右 100 单位且向上 200 单位的位��;
6659
+ * 则代表画布原点在数据原点的向右 100 单位且向上 200 单位的位置;
6353
6660
  *
6354
6661
  * 此处的单位为数据层面单位,在跨度上等同于画布层面的 mil
6355
6662
  * @returns 画布原点相对于数据原点的偏移坐标
@@ -6851,7 +7158,7 @@ declare class PCB_Layer {
6851
7158
  * @param numberOfLayers - 层数
6852
7159
  * @returns 操作是否成功
6853
7160
  */
6854
- setTheNumberOfCopperLayers(numberOfLayers: 1 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32): Promise<boolean>;
7161
+ setTheNumberOfCopperLayers(numberOfLayers: 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32): Promise<boolean>;
6855
7162
  /**
6856
7163
  * 设置层颜色配置
6857
7164
  *
@@ -6937,7 +7244,7 @@ declare class PCB_ManufactureData {
6937
7244
  * @beta
6938
7245
  * @remarks 可以使用 {@link SYS_FileSystem.saveFile} 接口将文件导出到本地文件系统
6939
7246
  * @param fileName - 文件名
6940
- * @param colorSilkscreen - 是否生成彩色丝印制造文件(嘉立���专用文件)
7247
+ * @param colorSilkscreen - 是否生成彩色丝印制造文件(嘉立创专用文件)
6941
7248
  * @param unit - 单位
6942
7249
  * @param digitalFormat - 数字格式
6943
7250
  * @param drilledHole - 钻孔
@@ -7246,14 +7553,8 @@ declare class PCB_Net {
7246
7553
  declare class PCB_Primitive {
7247
7554
  /* Excluded from this release type: getPrimitiveTypeByPrimitiveId */
7248
7555
  /* Excluded from this release type: getPrimitiveByPrimitiveId */
7249
- /**
7250
- * 获取指定所有 ID 的图元的所有属性
7251
- *
7252
- * @public
7253
- * @param ids - 图元 ID 数组
7254
- * @returns 所有图元的所有属性
7255
- */
7256
- getPrimitivesByPrimitiveId(ids: Array<string>): Promise<Array<IPCB_Primitive>>;
7556
+ /* Excluded from this release type: getPrimitivesByPrimitiveId */
7557
+ /* Excluded from this release type: getPrimitivesBBox */
7257
7558
  }
7258
7559
 
7259
7560
  /**
@@ -7362,15 +7663,12 @@ declare class PCB_PrimitiveComponent implements IPCB_PrimitiveAPI {
7362
7663
  * @param y - 坐标 Y
7363
7664
  * @param rotation - 旋转角度
7364
7665
  * @param primitiveLock - 是否锁定
7365
- * @param addIntoBom - 是否加入 BOM
7366
7666
  * @returns 器件图元对象
7367
7667
  */
7368
7668
  create(component: {
7369
7669
  libraryUuid: string;
7370
7670
  uuid: string;
7371
- } | ILIB_DeviceItem, layer: TPCB_LayersOfComponent, x: number, y: number, rotation?: number, primitiveLock?: number, attributes?: {
7372
- [key: string]: any;
7373
- }): Promise<IPCB_PrimitiveComponent | undefined>;
7671
+ } | ILIB_DeviceItem, layer: TPCB_LayersOfComponent, x: number, y: number, rotation?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveComponent | undefined>;
7374
7672
  /**
7375
7673
  * 删除器件
7376
7674
  *
@@ -7441,7 +7739,7 @@ declare class PCB_PrimitiveComponent implements IPCB_PrimitiveAPI {
7441
7739
  * @beta
7442
7740
  * @param layer - 层
7443
7741
  * @param primitiveLock - 是否锁定
7444
- * @returns 器件图��对象数组
7742
+ * @returns 器件图元对象数组
7445
7743
  */
7446
7744
  getAll(layer?: TPCB_LayersOfComponent, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveComponent>>;
7447
7745
  /* Excluded from this release type: placeComponentWithMouse */
@@ -8067,21 +8365,6 @@ declare class PCB_SelectControl {
8067
8365
  /* Excluded from this release type: getCurrentMousePosition */
8068
8366
  }
8069
8367
 
8070
- declare enum PIN_TYPE {
8071
- IN = "IN",
8072
- OUT = "OUT",
8073
- BI = "BI",
8074
- OPEN_COLLECTOR = "Open Collector",
8075
- STATE_3 = "3 State",
8076
- OPEN_EMITTER = "Open Emitter",
8077
- POWER = "Power",
8078
- HIZ = "HIZ",
8079
- UNDEFINED = "Undefined",
8080
- TERMINATOR = "Terminator",
8081
- GROUND = "Ground",
8082
- DEFAULT = "BI"
8083
- }
8084
-
8085
8368
  /**
8086
8369
  * 面板 / 文档操作类
8087
8370
  *
@@ -8201,8 +8484,44 @@ declare class SCH_ManufactureData {
8201
8484
  * @returns 网表文件数据
8202
8485
  */
8203
8486
  getNetlistFile(fileName?: string, netlistType?: ENetlistType): Promise<File | undefined>;
8204
- /* Excluded from this release type: placeComponentsOrder */
8205
- /* Excluded from this release type: placeSmtComponentsOrder */
8487
+ /**
8488
+ * 元件下单
8489
+ *
8490
+ * @beta
8491
+ * @param interactive - 是否启用交互式检查
8492
+ *
8493
+ * 如若启用,则会存在弹窗等待用户进行交互,且无法使用 `ignoreWarning` 参数忽略警告,
8494
+ * 即 `ignoreWarning` 参数将被忽略;
8495
+ *
8496
+ * 如若禁用,则在调用后不会有任何 EDA 内部弹窗,程序执行静默检查,
8497
+ * 如若达成下单条件,将返回 `true` 并在新标签页打开下单页面
8498
+ * @param ignoreWarning - 在非交互式检查时忽略警告
8499
+ *
8500
+ * 如果设置为 `true`,将会忽略所有检查警告项并尽可能生成下单资料;
8501
+ *
8502
+ * 如果设置为 `false`,存在任意警告将中断执行并返回 `false` 的结果
8503
+ * @returns 是否通过下单检查
8504
+ */
8505
+ placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
8506
+ /**
8507
+ * SMT 元件下单
8508
+ *
8509
+ * @beta
8510
+ * @param interactive - 是否启用交互式检查
8511
+ *
8512
+ * 如若启用,则会存在弹窗等待用户进行交互,且无法使用 `ignoreWarning` 参数忽略警告,
8513
+ * 即 `ignoreWarning` 参数将被忽略;
8514
+ *
8515
+ * 如若禁用,则在调用后不会有任何 EDA 内部弹窗,程序执行静默检查,
8516
+ * 如若达成下单条件,将返回 `true` 并在新标签页打开下单页面
8517
+ * @param ignoreWarning - 在非交互式检查时忽略警告
8518
+ *
8519
+ * 如果设置为 `true`,将会忽略所有检查警告项并尽可能生成下单资料;
8520
+ *
8521
+ * 如果设置为 `false`,存在任意警告将中断执行并返回 `false` 的结果
8522
+ * @returns 是否通过下单检查
8523
+ */
8524
+ placeSmtComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
8206
8525
  }
8207
8526
 
8208
8527
  /**
@@ -8253,14 +8572,8 @@ declare class SCH_Primitive {
8253
8572
  * @returns 图元的所有属性
8254
8573
  */
8255
8574
  getPrimitiveByPrimitiveId(id: string): Promise<ISCH_Primitive | undefined>;
8256
- /**
8257
- * 获取指定所有 ID 的图元的所有属性
8258
- *
8259
- * @public
8260
- * @param ids - 图元 ID 数组
8261
- * @returns 所有图元的所有属性
8262
- */
8263
- getPrimitivesByPrimitiveId(ids: Array<string>): Promise<Array<ISCH_Primitive>>;
8575
+ /* Excluded from this release type: getPrimitivesByPrimitiveId */
8576
+ /* Excluded from this release type: getPrimitivesBBox */
8264
8577
  }
8265
8578
 
8266
8579
  /**
@@ -8316,7 +8629,7 @@ declare class SCH_PrimitiveArc implements ISCH_PrimitiveAPI {
8316
8629
  * 获取圆弧
8317
8630
  *
8318
8631
  * @beta
8319
- * @param primitiveIds - 圆弧的图元 ID,可以为字符串或字符串数组,如若为数组,则返回��也是数组
8632
+ * @param primitiveIds - 圆弧的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
8320
8633
  * @returns 圆弧图元对象
8321
8634
  */
8322
8635
  get(primitiveIds: string): Promise<ISCH_PrimitiveArc | undefined>;
@@ -8483,87 +8796,103 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
8483
8796
  private netPortComponentUuid_OUT;
8484
8797
  private netPortComponentUuid_BI;
8485
8798
  private shortCircuitFlagComponentUuid;
8486
- private SystematicUuid;
8487
- constructor();
8799
+ private defaultLibraryUuid;
8800
+ /* Excluded from this release type: __constructor */
8488
8801
  /**
8489
8802
  * 设置在扩展 API 中 Power 网络标识关联的器件 UUID
8490
8803
  *
8491
8804
  * @beta
8492
- * @param componentUuid - 器件 UUID
8493
- * @param libraryPath - 库路径,默认为系统库
8805
+ * @param component - 关联库器件
8494
8806
  * @returns 操作是否成功
8495
8807
  */
8496
- setNetFlagComponentUuid_Power(componentUuid: string, libraryPath?: string): Promise<boolean>;
8808
+ setNetFlagComponentUuid_Power(component: {
8809
+ libraryUuid: string;
8810
+ uuid: string;
8811
+ } | ILIB_DeviceItem): Promise<boolean>;
8497
8812
  /**
8498
8813
  * 设置在扩展 API 中 Ground 网络标识关联的器件 UUID
8499
8814
  *
8500
8815
  * @beta
8501
- * @param componentUuid - 器件 UUID
8502
- * @param libraryPath - 库路径,默认为系统库
8816
+ * @param component - 关联库器件
8503
8817
  * @returns 操作是否成功
8504
8818
  */
8505
- setNetFlagComponentUuid_Ground(componentUuid: string, libraryPath?: string): Promise<boolean>;
8819
+ setNetFlagComponentUuid_Ground(component: {
8820
+ libraryUuid: string;
8821
+ uuid: string;
8822
+ } | ILIB_DeviceItem): Promise<boolean>;
8506
8823
  /**
8507
8824
  * 设置在扩展 API 中 AnalogGround 网络标识关联的器件 UUID
8508
8825
  *
8509
8826
  * @beta
8510
- * @param componentUuid - 器件 UUID
8511
- * @param libraryPath - 库路径,默认为系统库
8827
+ * @param component - 关联库器件
8512
8828
  * @returns 操作是否成功
8513
8829
  */
8514
- setNetFlagComponentUuid_AnalogGround(componentUuid: string, libraryPath?: string): Promise<boolean>;
8830
+ setNetFlagComponentUuid_AnalogGround(component: {
8831
+ libraryUuid: string;
8832
+ uuid: string;
8833
+ } | ILIB_DeviceItem): Promise<boolean>;
8515
8834
  /**
8516
8835
  * 设置在扩展 API 中 ProtectGround 网络标识关联的器件 UUID
8517
8836
  *
8518
8837
  * @beta
8519
- * @param componentUuid - 器件 UUID
8520
- * @param libraryPath - 库路径,默认为系统库
8838
+ * @param component - 关联库器件
8521
8839
  * @returns 操作是否成功
8522
8840
  */
8523
- setNetFlagComponentUuid_ProtectGround(componentUuid: string, libraryPath?: string): Promise<boolean>;
8841
+ setNetFlagComponentUuid_ProtectGround(component: {
8842
+ libraryUuid: string;
8843
+ uuid: string;
8844
+ } | ILIB_DeviceItem): Promise<boolean>;
8524
8845
  /**
8525
8846
  * 设置在扩展 API 中 IN 网络端口关联的器件 UUID
8526
8847
  *
8527
8848
  * @beta
8528
- * @param componentUuid - 器件 UUID
8529
- * @param libraryPath - 库路径,默认为系统库
8849
+ * @param component - 关联库器件
8530
8850
  * @returns 操作是否成功
8531
8851
  */
8532
- setNetPortComponentUuid_IN(componentUuid: string, libraryPath?: string): Promise<boolean>;
8852
+ setNetPortComponentUuid_IN(component: {
8853
+ libraryUuid: string;
8854
+ uuid: string;
8855
+ } | ILIB_DeviceItem): Promise<boolean>;
8533
8856
  /**
8534
8857
  * 设置在扩展 API 中 OUT 网络端口关联的器件 UUID
8535
8858
  *
8536
8859
  * @beta
8537
- * @param componentUuid - 器件 UUID
8538
- * @param libraryPath - 库路径,默认为系统库
8860
+ * @param component - 关联库器件
8539
8861
  * @returns 操作是否成功
8540
8862
  */
8541
- setNetPortComponentUuid_OUT(componentUuid: string, libraryPath?: string): Promise<boolean>;
8863
+ setNetPortComponentUuid_OUT(component: {
8864
+ libraryUuid: string;
8865
+ uuid: string;
8866
+ } | ILIB_DeviceItem): Promise<boolean>;
8542
8867
  /**
8543
8868
  * 设置在扩展 API 中 BI 网络端口关联的器件 UUID
8544
8869
  *
8545
8870
  * @beta
8546
- * @param componentUuid - 器件 UUID
8547
- * @param libraryPath - 库路径,默认为系统库
8871
+ * @param component - 关联库器件
8548
8872
  * @returns 操作是否成功
8549
8873
  */
8550
- setNetPortComponentUuid_BI(componentUuid: string, libraryPath?: string): Promise<boolean>;
8874
+ setNetPortComponentUuid_BI(component: {
8875
+ libraryUuid: string;
8876
+ uuid: string;
8877
+ } | ILIB_DeviceItem): Promise<boolean>;
8551
8878
  /**
8552
8879
  * 创建器件
8553
8880
  *
8554
8881
  * @beta
8555
- * @param componentUuid - 关联库器件 UUID
8556
- * @param libraryPath - 库路
8557
- * @param subLibraryId - 子库编号 part名称
8882
+ * @param component - 关联库器件
8883
+ * @param subPartName - 子图块名称
8558
8884
  * @param x - 坐标 X
8559
8885
  * @param y - 坐标 Y
8560
- * @param rotation - 旋转角度,可选 `0` `90` `180` `270`
8886
+ * @param rotation - 旋转角度
8561
8887
  * @param mirror - 是否镜像
8562
8888
  * @param addIntoBom - 是否加入 BOM
8563
8889
  * @param addIntoPcb - 是否转到 PCB
8564
8890
  * @returns 器件图元对象
8565
8891
  */
8566
- create(componentUuid: string, libraryPath: string, subLibraryId: string, x: number, y: number, rotation?: number, mirror?: boolean, addIntoBom?: boolean, addIntoPcb?: boolean): Promise<ISCH_PrimitiveComponent | undefined>;
8892
+ create(component: {
8893
+ libraryUuid: string;
8894
+ uuid: string;
8895
+ } | ILIB_DeviceItem, x: number, y: number, subPartName?: string, rotation?: number, mirror?: boolean, addIntoBom?: boolean, addIntoPcb?: boolean): Promise<ISCH_PrimitiveComponent | undefined>;
8567
8896
  /**
8568
8897
  * 创建网络标识
8569
8898
  *
@@ -8613,11 +8942,11 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
8613
8942
  * 修改器件
8614
8943
  *
8615
8944
  * @beta
8616
- * @remarks 仅当器件类型为 `Component` 时允许使用该函数进行修改
8945
+ * @remarks 仅当器件类型为 {@link ESCH_PrimitiveComponentType.COMPONENT | COMPONENT} 时允许使用该方法进行修改
8617
8946
  * @param primitiveId - 图元 ID
8618
8947
  * @param x - 坐标 X
8619
8948
  * @param y - 坐标 Y
8620
- * @param rotation - 旋转角度,可选 `0` `90` `180` `270`
8949
+ * @param rotation - 旋转角度
8621
8950
  * @param mirror - 是否镜像
8622
8951
  * @param libraryPath - 库路径,默认为系统库
8623
8952
  * @param addIntoBom - 是否加入 BOM
@@ -8631,17 +8960,41 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
8631
8960
  * @param supplierId - 供应商编号,`null` 表示留空
8632
8961
  * @returns 器件图元对象
8633
8962
  */
8634
- modify(primitiveId: string | ISCH_PrimitiveComponent, x?: number, y?: number, rotation?: number, mirror?: boolean, addIntoBom?: boolean, addIntoPcb?: boolean, designator?: string | null, name?: string | null, uniqueId?: string | null, manufacturer?: string | null, manufacturerId?: string | null, supplier?: string | null, supplierId?: string | null): Promise<ISCH_PrimitiveComponent | undefined>;
8963
+ modify(primitiveId: string | ISCH_PrimitiveComponent, property: {
8964
+ x?: number;
8965
+ y?: number;
8966
+ rotation?: number;
8967
+ mirror?: boolean;
8968
+ addIntoBom?: boolean;
8969
+ addIntoPcb?: boolean;
8970
+ designator?: string | null;
8971
+ name?: string | null;
8972
+ uniqueId?: string | null;
8973
+ manufacturer?: string | null;
8974
+ manufacturerId?: string | null;
8975
+ supplier?: string | null;
8976
+ supplierId?: string | null;
8977
+ otherProperty?: {
8978
+ [key: string]: string;
8979
+ };
8980
+ }): Promise<ISCH_PrimitiveComponent | undefined>;
8635
8981
  /**
8636
8982
  * 获取器件
8637
8983
  *
8638
8984
  * @beta
8639
8985
  * @param primitiveIds - 器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
8640
- * @returns 器件图元对象
8986
+ * @returns 器件图元对象,`undefined` 表示获取失败
8641
8987
  */
8642
8988
  get(primitiveIds: string): Promise<ISCH_PrimitiveComponent | undefined>;
8989
+ /**
8990
+ * 获取器件
8991
+ *
8992
+ * @beta
8993
+ * @remarks 如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
8994
+ * @param primitiveIds - 器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
8995
+ * @returns 器件图元对象,空数组表示获取失败
8996
+ */
8643
8997
  get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveComponent>>;
8644
- /* Excluded from this release type: transformPrimitiveTypeToCmdKey */
8645
8998
  /**
8646
8999
  * 获取所有器件的图元 ID
8647
9000
  *
@@ -8660,23 +9013,8 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
8660
9013
  getAll(componentType?: string, allSchematicPages?: boolean): Promise<Array<ISCH_PrimitiveComponent>>;
8661
9014
  /* Excluded from this release type: getAllPinsByPrimitiveId */
8662
9015
  /* Excluded from this release type: placeComponentWithMouse */
8663
- /**
8664
- * pro-ui 获取器件的详细信息
8665
- *
8666
- * @param componentUuid - 器件 UUID
8667
- * @param libraryPath - 库 PATH
8668
- * @returns 器件的详细信息
8669
- */
8670
- private getComponentDetail;
8671
- /**
8672
- * 根据 DOCTYPE 验证输入的 UUID 是否正确
8673
- *
8674
- * @param componentType - 器件类型
8675
- * @param componentUuid - 器件 UUID
8676
- * @param libraryPath - 库 PATH
8677
- * @returns 是否正确
8678
- */
8679
- private checkComponentType;
9016
+ /* Excluded from this release type: getComponentDetail */
9017
+ /* Excluded from this release type: checkComponentType */
8680
9018
  }
8681
9019
 
8682
9020
  /**
@@ -8700,7 +9038,7 @@ declare class SCH_PrimitivePin implements ISCH_PrimitiveAPI {
8700
9038
  * @param pinType - 引脚类型
8701
9039
  * @returns 引脚图元对象
8702
9040
  */
8703
- create(x: number, y: number, pinNumber: string, pinName?: string, rotation?: number, pinLength?: number, pinColor?: string | null, pinShape?: string, pinType?: PIN_TYPE): Promise<ISCH_PrimitivePin | undefined>;
9041
+ create(x: number, y: number, pinNumber: string, pinName?: string, rotation?: number, pinLength?: number, pinColor?: string | null, pinShape?: string, pinType?: ESCH_PrimitivePinType): Promise<ISCH_PrimitivePin | undefined>;
8704
9042
  /**
8705
9043
  * 删除引脚
8706
9044
  *
@@ -8725,7 +9063,7 @@ declare class SCH_PrimitivePin implements ISCH_PrimitiveAPI {
8725
9063
  * @param pinType - 引脚类型
8726
9064
  * @returns 引脚图元对象
8727
9065
  */
8728
- modify(primitiveId: string | ISCH_PrimitivePin, x?: number, y?: number, pinNumber?: string, pinName?: string, rotation?: number, pinLength?: number, pinColor?: string | null, pinShape?: string, pinType?: PIN_TYPE): Promise<ISCH_PrimitivePin | undefined>;
9066
+ modify(primitiveId: string | ISCH_PrimitivePin, x?: number, y?: number, pinNumber?: string, pinName?: string, rotation?: number, pinLength?: number, pinColor?: string | null, pinShape?: string, pinType?: ESCH_PrimitivePinType): Promise<ISCH_PrimitivePin | undefined>;
8729
9067
  /**
8730
9068
  * 获取引脚
8731
9069
  *
@@ -9017,7 +9355,7 @@ declare class SCH_PrimitiveWire implements ISCH_PrimitiveAPI {
9017
9355
  * 获取导线
9018
9356
  *
9019
9357
  * @beta
9020
- * @param primitiveIds - 导线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
9358
+ * @param primitiveIds - 导线的图元 ID,可以为字符串或字符串数组,如若为数���,则返回的也是数组
9021
9359
  * @returns 导线图元对象
9022
9360
  */
9023
9361
  get(primitiveIds: string): ISCH_PrimitiveWire | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jlceda/pro-api-types",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
4
4
  "description": "嘉立创EDA & EasyEDA 专业版扩展 API 接口类型定义",
5
5
  "typings": "index.d.ts",
6
6
  "keywords": [