@windypro-rourou/dsh-eda 0.1.0 → 0.1.2

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 (407) hide show
  1. package/README.md +71 -119
  2. package/cordis.patch.yml +9 -7
  3. package/lib/board.js +80 -0
  4. package/lib/client.js +2 -2
  5. package/lib/index.js +339 -11
  6. package/lib/installer.js +4 -4
  7. package/lib/skill.js +138 -0
  8. package/package.json +3 -2
  9. package/skill/INDEX.md +193 -0
  10. package/skill/README.official.md +125 -0
  11. package/skill/README.zh-Hans.official.md +125 -0
  12. package/skill/SKILL.md +746 -0
  13. package/skill/format/index.md +152 -0
  14. package/skill/format/pcb/3d.md +166 -0
  15. package/skill/format/pcb/attr.md +63 -0
  16. package/skill/format/pcb/common.md +306 -0
  17. package/skill/format/pcb/component.md +132 -0
  18. package/skill/format/pcb/dimension.md +58 -0
  19. package/skill/format/pcb/index.md +17 -0
  20. package/skill/format/pcb/obj.md +43 -0
  21. package/skill/format/pcb/pad_via.md +151 -0
  22. package/skill/format/pcb/panel.md +64 -0
  23. package/skill/format/pcb/partition.md +43 -0
  24. package/skill/format/pcb/primitive.md +196 -0
  25. package/skill/format/pcb/rule.md +71 -0
  26. package/skill/format/pcb/shape.md +441 -0
  27. package/skill/format/pcb/text.md +62 -0
  28. package/skill/format/project/blob.md +30 -0
  29. package/skill/format/project/common.md +42 -0
  30. package/skill/format/project/group.md +62 -0
  31. package/skill/format/project/index.md +12 -0
  32. package/skill/format/project/instance.md +32 -0
  33. package/skill/format/project/meta.md +189 -0
  34. package/skill/format/project/variant.md +30 -0
  35. package/skill/format/schematic/attr.md +41 -0
  36. package/skill/format/schematic/common.md +47 -0
  37. package/skill/format/schematic/component.md +91 -0
  38. package/skill/format/schematic/index.md +14 -0
  39. package/skill/format/schematic/obj.md +41 -0
  40. package/skill/format/schematic/pin.md +59 -0
  41. package/skill/format/schematic/shape.md +231 -0
  42. package/skill/format/schematic/structure.md +53 -0
  43. package/skill/format/schematic/table.md +109 -0
  44. package/skill/format/schematic/text.md +47 -0
  45. package/skill/format/schematic/wire.md +132 -0
  46. package/skill/guide/ancillary-projects/pro-api-sdk.md +1 -0
  47. package/skill/guide/ancillary-projects/pro-api-types.md +5 -0
  48. package/skill/guide/ancillary-projects.md +10 -0
  49. package/skill/guide/error-handling.md +38 -0
  50. package/skill/guide/extension-json.md +135 -0
  51. package/skill/guide/extensions-marketplace.md +61 -0
  52. package/skill/guide/how-to-start.md +301 -0
  53. package/skill/guide/i18n.md +57 -0
  54. package/skill/guide/index.md +7 -0
  55. package/skill/guide/inline-frame.md +20 -0
  56. package/skill/guide/invoke-apis.md +81 -0
  57. package/skill/guide/stability.md +37 -0
  58. package/skill/references/_index.md +398 -0
  59. package/skill/references/_quick-reference.md +3028 -0
  60. package/skill/references/classes/DMT_Board.md +533 -0
  61. package/skill/references/classes/DMT_EditorControl.md +1736 -0
  62. package/skill/references/classes/DMT_Event.md +356 -0
  63. package/skill/references/classes/DMT_Folder.md +775 -0
  64. package/skill/references/classes/DMT_Panel.md +531 -0
  65. package/skill/references/classes/DMT_Pcb.md +575 -0
  66. package/skill/references/classes/DMT_Project.md +573 -0
  67. package/skill/references/classes/DMT_Schematic.md +1477 -0
  68. package/skill/references/classes/DMT_SelectControl.md +96 -0
  69. package/skill/references/classes/DMT_Team.md +172 -0
  70. package/skill/references/classes/DMT_Workspace.md +198 -0
  71. package/skill/references/classes/EDA.md +961 -0
  72. package/skill/references/classes/IPCB_ComplexPolygon.md +299 -0
  73. package/skill/references/classes/IPCB_Polygon.md +175 -0
  74. package/skill/references/classes/IPCB_PrimitiveArc.md +1901 -0
  75. package/skill/references/classes/IPCB_PrimitiveAttribute.md +2993 -0
  76. package/skill/references/classes/IPCB_PrimitiveComponent.md +2627 -0
  77. package/skill/references/classes/IPCB_PrimitiveComponentPad.md +410 -0
  78. package/skill/references/classes/IPCB_PrimitiveDimension.md +1419 -0
  79. package/skill/references/classes/IPCB_PrimitiveFill.md +1325 -0
  80. package/skill/references/classes/IPCB_PrimitiveImage.md +1461 -0
  81. package/skill/references/classes/IPCB_PrimitiveLine.md +1639 -0
  82. package/skill/references/classes/IPCB_PrimitiveObject.md +1700 -0
  83. package/skill/references/classes/IPCB_PrimitivePad.md +3155 -0
  84. package/skill/references/classes/IPCB_PrimitivePolyline.md +1193 -0
  85. package/skill/references/classes/IPCB_PrimitivePour.md +1858 -0
  86. package/skill/references/classes/IPCB_PrimitivePoured.md +556 -0
  87. package/skill/references/classes/IPCB_PrimitiveRegion.md +1332 -0
  88. package/skill/references/classes/IPCB_PrimitiveString.md +2315 -0
  89. package/skill/references/classes/IPCB_PrimitiveVia.md +1588 -0
  90. package/skill/references/classes/ISCH_PrimitiveArc.md +1676 -0
  91. package/skill/references/classes/ISCH_PrimitiveAttribute.md +2541 -0
  92. package/skill/references/classes/ISCH_PrimitiveBus.md +973 -0
  93. package/skill/references/classes/ISCH_PrimitiveCbbSymbolComponent.md +260 -0
  94. package/skill/references/classes/ISCH_PrimitiveCircle.md +1392 -0
  95. package/skill/references/classes/ISCH_PrimitiveComponent.md +2913 -0
  96. package/skill/references/classes/ISCH_PrimitiveComponentPin.md +155 -0
  97. package/skill/references/classes/ISCH_PrimitiveObject.md +960 -0
  98. package/skill/references/classes/ISCH_PrimitivePin.md +2402 -0
  99. package/skill/references/classes/ISCH_PrimitivePolygon.md +1028 -0
  100. package/skill/references/classes/ISCH_PrimitiveRectangle.md +1777 -0
  101. package/skill/references/classes/ISCH_PrimitiveText.md +1771 -0
  102. package/skill/references/classes/ISCH_PrimitiveWire.md +973 -0
  103. package/skill/references/classes/LIB_3DModel.md +780 -0
  104. package/skill/references/classes/LIB_Cbb.md +957 -0
  105. package/skill/references/classes/LIB_Classification.md +965 -0
  106. package/skill/references/classes/LIB_Device.md +1221 -0
  107. package/skill/references/classes/LIB_Footprint.md +1153 -0
  108. package/skill/references/classes/LIB_LibrariesList.md +329 -0
  109. package/skill/references/classes/LIB_PanelLibrary.md +855 -0
  110. package/skill/references/classes/LIB_SelectControl.md +89 -0
  111. package/skill/references/classes/LIB_SimulationModel.md +821 -0
  112. package/skill/references/classes/LIB_Symbol.md +1195 -0
  113. package/skill/references/classes/PCB_Document.md +1754 -0
  114. package/skill/references/classes/PCB_Drc.md +3375 -0
  115. package/skill/references/classes/PCB_Event.md +1081 -0
  116. package/skill/references/classes/PCB_Layer.md +1911 -0
  117. package/skill/references/classes/PCB_ManufactureData.md +2968 -0
  118. package/skill/references/classes/PCB_MathPolygon.md +785 -0
  119. package/skill/references/classes/PCB_Net.md +1128 -0
  120. package/skill/references/classes/PCB_Primitive.md +217 -0
  121. package/skill/references/classes/PCB_PrimitiveArc.md +894 -0
  122. package/skill/references/classes/PCB_PrimitiveAttribute.md +717 -0
  123. package/skill/references/classes/PCB_PrimitiveComponent.md +1050 -0
  124. package/skill/references/classes/PCB_PrimitiveDimension.md +833 -0
  125. package/skill/references/classes/PCB_PrimitiveFill.md +861 -0
  126. package/skill/references/classes/PCB_PrimitiveImage.md +875 -0
  127. package/skill/references/classes/PCB_PrimitiveLine.md +858 -0
  128. package/skill/references/classes/PCB_PrimitiveObject.md +800 -0
  129. package/skill/references/classes/PCB_PrimitivePad.md +944 -0
  130. package/skill/references/classes/PCB_PrimitivePolyline.md +819 -0
  131. package/skill/references/classes/PCB_PrimitivePour.md +845 -0
  132. package/skill/references/classes/PCB_PrimitivePoured.md +363 -0
  133. package/skill/references/classes/PCB_PrimitiveRegion.md +799 -0
  134. package/skill/references/classes/PCB_PrimitiveString.md +910 -0
  135. package/skill/references/classes/PCB_PrimitiveVia.md +765 -0
  136. package/skill/references/classes/PCB_RayTracerEngine.md +263 -0
  137. package/skill/references/classes/PCB_SelectControl.md +495 -0
  138. package/skill/references/classes/PNL_Document.md +83 -0
  139. package/skill/references/classes/SCH_Document.md +809 -0
  140. package/skill/references/classes/SCH_Drc.md +242 -0
  141. package/skill/references/classes/SCH_Event.md +583 -0
  142. package/skill/references/classes/SCH_ManufactureData.md +1205 -0
  143. package/skill/references/classes/SCH_Net.md +200 -0
  144. package/skill/references/classes/SCH_Netlist.md +191 -0
  145. package/skill/references/classes/SCH_Primitive.md +337 -0
  146. package/skill/references/classes/SCH_PrimitiveArc.md +692 -0
  147. package/skill/references/classes/SCH_PrimitiveAttribute.md +590 -0
  148. package/skill/references/classes/SCH_PrimitiveBus.md +624 -0
  149. package/skill/references/classes/SCH_PrimitiveCircle.md +683 -0
  150. package/skill/references/classes/SCH_PrimitiveComponent.md +2240 -0
  151. package/skill/references/classes/SCH_PrimitiveObject.md +666 -0
  152. package/skill/references/classes/SCH_PrimitivePin.md +754 -0
  153. package/skill/references/classes/SCH_PrimitivePolygon.md +627 -0
  154. package/skill/references/classes/SCH_PrimitiveRectangle.md +731 -0
  155. package/skill/references/classes/SCH_PrimitiveText.md +746 -0
  156. package/skill/references/classes/SCH_PrimitiveWire.md +703 -0
  157. package/skill/references/classes/SCH_SelectControl.md +520 -0
  158. package/skill/references/classes/SCH_SimulationEngine.md +133 -0
  159. package/skill/references/classes/SCH_Utils.md +121 -0
  160. package/skill/references/classes/SYS_ClientUrl.md +173 -0
  161. package/skill/references/classes/SYS_Dialog.md +825 -0
  162. package/skill/references/classes/SYS_Environment.md +502 -0
  163. package/skill/references/classes/SYS_FileManager.md +1686 -0
  164. package/skill/references/classes/SYS_FileSystem.md +1171 -0
  165. package/skill/references/classes/SYS_FontManager.md +224 -0
  166. package/skill/references/classes/SYS_FormatConversion.md +349 -0
  167. package/skill/references/classes/SYS_HeaderMenu.md +479 -0
  168. package/skill/references/classes/SYS_I18n.md +861 -0
  169. package/skill/references/classes/SYS_IFrame.md +535 -0
  170. package/skill/references/classes/SYS_LoadingAndProgressBar.md +246 -0
  171. package/skill/references/classes/SYS_Log.md +424 -0
  172. package/skill/references/classes/SYS_Math.md +1565 -0
  173. package/skill/references/classes/SYS_Message.md +363 -0
  174. package/skill/references/classes/SYS_MessageBox.md +285 -0
  175. package/skill/references/classes/SYS_MessageBus.md +1618 -0
  176. package/skill/references/classes/SYS_PanelControl.md +696 -0
  177. package/skill/references/classes/SYS_RightClickMenu.md +175 -0
  178. package/skill/references/classes/SYS_Setting.md +85 -0
  179. package/skill/references/classes/SYS_ShortcutKey.md +623 -0
  180. package/skill/references/classes/SYS_Storage.md +484 -0
  181. package/skill/references/classes/SYS_Timer.md +447 -0
  182. package/skill/references/classes/SYS_ToastMessage.md +194 -0
  183. package/skill/references/classes/SYS_Tool.md +241 -0
  184. package/skill/references/classes/SYS_Unit.md +594 -0
  185. package/skill/references/classes/SYS_WebSocket.md +401 -0
  186. package/skill/references/classes/SYS_Window.md +850 -0
  187. package/skill/references/enums/EDMT_EditorDocumentType.md +279 -0
  188. package/skill/references/enums/EDMT_EditorSplitScreenDirection.md +48 -0
  189. package/skill/references/enums/EDMT_EditorTabEventType.md +63 -0
  190. package/skill/references/enums/EDMT_IndicatorMarkerType.md +81 -0
  191. package/skill/references/enums/EDMT_ItemType.md +158 -0
  192. package/skill/references/enums/EDMT_ProjectCollaborationMode.md +48 -0
  193. package/skill/references/enums/ELIB_DeviceJlcLibraryCategory.md +48 -0
  194. package/skill/references/enums/ELIB_LibraryType.md +114 -0
  195. package/skill/references/enums/ELIB_PreviewType.md +70 -0
  196. package/skill/references/enums/ELIB_SimulationModelType.md +48 -0
  197. package/skill/references/enums/ELIB_SymbolType.md +125 -0
  198. package/skill/references/enums/EPCB_AutoRoutingCornerStyle.md +48 -0
  199. package/skill/references/enums/EPCB_AutoRoutingExistingPrimitiveMode.md +48 -0
  200. package/skill/references/enums/EPCB_AutoRoutingOptimization.md +48 -0
  201. package/skill/references/enums/EPCB_DocumentCanvasUpdateCalculationActiveStatus.md +48 -0
  202. package/skill/references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md +52 -0
  203. package/skill/references/enums/EPCB_InactiveLayerDisplayMode.md +59 -0
  204. package/skill/references/enums/EPCB_LayerColorConfiguration.md +81 -0
  205. package/skill/references/enums/EPCB_LayerId.md +882 -0
  206. package/skill/references/enums/EPCB_LayerStatus.md +59 -0
  207. package/skill/references/enums/EPCB_LayerType.md +114 -0
  208. package/skill/references/enums/EPCB_MouseEventType.md +59 -0
  209. package/skill/references/enums/EPCB_NetEventType.md +59 -0
  210. package/skill/references/enums/EPCB_PcbPlateType.md +48 -0
  211. package/skill/references/enums/EPCB_PdfOutputMethod.md +59 -0
  212. package/skill/references/enums/EPCB_PrimitiveArcInteractiveMode.md +48 -0
  213. package/skill/references/enums/EPCB_PrimitiveDimensionType.md +59 -0
  214. package/skill/references/enums/EPCB_PrimitiveEventType.md +59 -0
  215. package/skill/references/enums/EPCB_PrimitiveFillMode.md +63 -0
  216. package/skill/references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md +59 -0
  217. package/skill/references/enums/EPCB_PrimitivePadHoleType.md +59 -0
  218. package/skill/references/enums/EPCB_PrimitivePadShapeType.md +81 -0
  219. package/skill/references/enums/EPCB_PrimitivePadType.md +59 -0
  220. package/skill/references/enums/EPCB_PrimitivePourFillMethod.md +59 -0
  221. package/skill/references/enums/EPCB_PrimitiveRegionRuleType.md +96 -0
  222. package/skill/references/enums/EPCB_PrimitiveStringAlignMode.md +125 -0
  223. package/skill/references/enums/EPCB_PrimitiveType.md +202 -0
  224. package/skill/references/enums/EPCB_PrimitiveViaType.md +59 -0
  225. package/skill/references/enums/ESCH_DynamicSimulationEnginePullEventType.md +103 -0
  226. package/skill/references/enums/ESCH_DynamicSimulationEnginePushEventType.md +81 -0
  227. package/skill/references/enums/ESCH_ExportDocumentFileType.md +59 -0
  228. package/skill/references/enums/ESCH_MouseEventType.md +48 -0
  229. package/skill/references/enums/ESCH_PrimitiveComponentType.md +125 -0
  230. package/skill/references/enums/ESCH_PrimitiveEventType.md +70 -0
  231. package/skill/references/enums/ESCH_PrimitiveFillStyle.md +114 -0
  232. package/skill/references/enums/ESCH_PrimitiveLineType.md +70 -0
  233. package/skill/references/enums/ESCH_PrimitivePinShape.md +70 -0
  234. package/skill/references/enums/ESCH_PrimitivePinType.md +147 -0
  235. package/skill/references/enums/ESCH_PrimitiveTextAlignMode.md +125 -0
  236. package/skill/references/enums/ESCH_PrimitiveType.md +180 -0
  237. package/skill/references/enums/ESCH_SimulationNetlistType.md +37 -0
  238. package/skill/references/enums/ESCH_SpiceSimulationEnginePullEventType.md +48 -0
  239. package/skill/references/enums/ESCH_SpiceSimulationEnginePushEventType.md +70 -0
  240. package/skill/references/enums/ESYS_BottomPanelTab.md +81 -0
  241. package/skill/references/enums/ESYS_HeaderMenuEnvironment.md +158 -0
  242. package/skill/references/enums/ESYS_ImportProjectBoardOutlineSource.md +52 -0
  243. package/skill/references/enums/ESYS_ImportProjectImportOption.md +59 -0
  244. package/skill/references/enums/ESYS_ImportProjectSchematicObjectStyle.md +48 -0
  245. package/skill/references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md +52 -0
  246. package/skill/references/enums/ESYS_LeftPanelTab.md +81 -0
  247. package/skill/references/enums/ESYS_LogType.md +103 -0
  248. package/skill/references/enums/ESYS_NetlistType.md +114 -0
  249. package/skill/references/enums/ESYS_RightPanelTab.md +202 -0
  250. package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorRange.md +191 -0
  251. package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md +92 -0
  252. package/skill/references/enums/ESYS_StartPageQuickStartItem.md +206 -0
  253. package/skill/references/enums/ESYS_Theme.md +48 -0
  254. package/skill/references/enums/ESYS_ToastMessageType.md +81 -0
  255. package/skill/references/enums/ESYS_Unit.md +103 -0
  256. package/skill/references/enums/ESYS_WindowEventType.md +48 -0
  257. package/skill/references/enums/ESYS_WindowOpenTarget.md +48 -0
  258. package/skill/references/enums/NetportDeviceName.md +147 -0
  259. package/skill/references/enums/SchToolBarDeviceName.md +279 -0
  260. package/skill/references/interfaces/BoardProps.md +169 -0
  261. package/skill/references/interfaces/ButtonProps.md +169 -0
  262. package/skill/references/interfaces/CheckBoxProps.md +196 -0
  263. package/skill/references/interfaces/ComponentPropsMap.md +448 -0
  264. package/skill/references/interfaces/DialogProps.md +385 -0
  265. package/skill/references/interfaces/FlexItemProps.md +116 -0
  266. package/skill/references/interfaces/FlexProps.md +224 -0
  267. package/skill/references/interfaces/GridItemProps.md +143 -0
  268. package/skill/references/interfaces/GridProps.md +143 -0
  269. package/skill/references/interfaces/IDMT_BoardItem.md +171 -0
  270. package/skill/references/interfaces/IDMT_BriefProjectItem.md +171 -0
  271. package/skill/references/interfaces/IDMT_EditorDocumentItem.md +169 -0
  272. package/skill/references/interfaces/IDMT_EditorSplitScreenItem.md +173 -0
  273. package/skill/references/interfaces/IDMT_EditorTabItem.md +169 -0
  274. package/skill/references/interfaces/IDMT_FolderItem.md +225 -0
  275. package/skill/references/interfaces/IDMT_IndicatorMarkerShape.md +393 -0
  276. package/skill/references/interfaces/IDMT_PanelItem.md +144 -0
  277. package/skill/references/interfaces/IDMT_PcbItem.md +171 -0
  278. package/skill/references/interfaces/IDMT_ProjectItem.md +143 -0
  279. package/skill/references/interfaces/IDMT_SchematicItem.md +225 -0
  280. package/skill/references/interfaces/IDMT_SchematicPageItem.md +198 -0
  281. package/skill/references/interfaces/IDMT_TeamItem.md +144 -0
  282. package/skill/references/interfaces/IDMT_WorkspaceItem.md +117 -0
  283. package/skill/references/interfaces/IDesignPortal.md +103 -0
  284. package/skill/references/interfaces/ILIB_3DModelItem.md +198 -0
  285. package/skill/references/interfaces/ILIB_3DModelSearchItem.md +277 -0
  286. package/skill/references/interfaces/ILIB_CbbItem.md +225 -0
  287. package/skill/references/interfaces/ILIB_CbbSearchItem.md +277 -0
  288. package/skill/references/interfaces/ILIB_ClassificationIndex.md +150 -0
  289. package/skill/references/interfaces/ILIB_DeviceAssociationItem.md +210 -0
  290. package/skill/references/interfaces/ILIB_DeviceExtendPropertyItem.md +304 -0
  291. package/skill/references/interfaces/ILIB_DeviceItem.md +279 -0
  292. package/skill/references/interfaces/ILIB_DevicePropertiesForSearch.md +250 -0
  293. package/skill/references/interfaces/ILIB_DeviceSearchItem.md +521 -0
  294. package/skill/references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md +64 -0
  295. package/skill/references/interfaces/ILIB_ExtendLibraryCbbFunctions.md +99 -0
  296. package/skill/references/interfaces/ILIB_ExtendLibraryClassificationIndex.md +150 -0
  297. package/skill/references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md +157 -0
  298. package/skill/references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md +63 -0
  299. package/skill/references/interfaces/ILIB_ExtendLibraryFunctions.md +123 -0
  300. package/skill/references/interfaces/ILIB_ExtendLibraryItem.md +97 -0
  301. package/skill/references/interfaces/ILIB_ExtendLibraryItemIndex.md +98 -0
  302. package/skill/references/interfaces/ILIB_ExtendLibrarySearchProperty.md +115 -0
  303. package/skill/references/interfaces/ILIB_ExtendLibrarySearchResult.md +169 -0
  304. package/skill/references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md +234 -0
  305. package/skill/references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md +105 -0
  306. package/skill/references/interfaces/ILIB_ExtendLibraryUserIndex.md +96 -0
  307. package/skill/references/interfaces/ILIB_FootprintItem.md +198 -0
  308. package/skill/references/interfaces/ILIB_FootprintPropertiesForSearch.md +61 -0
  309. package/skill/references/interfaces/ILIB_FootprintSearchItem.md +277 -0
  310. package/skill/references/interfaces/ILIB_LibraryInfo.md +92 -0
  311. package/skill/references/interfaces/ILIB_LibraryItem.md +115 -0
  312. package/skill/references/interfaces/ILIB_PanelLibraryItem.md +198 -0
  313. package/skill/references/interfaces/ILIB_PanelLibrarySearchItem.md +277 -0
  314. package/skill/references/interfaces/ILIB_SimulationModelItem.md +306 -0
  315. package/skill/references/interfaces/ILIB_SimulationModelSearchItem.md +304 -0
  316. package/skill/references/interfaces/ILIB_SymbolItem.md +279 -0
  317. package/skill/references/interfaces/ILIB_SymbolPropertiesForSearch.md +61 -0
  318. package/skill/references/interfaces/ILIB_SymbolSearchItem.md +304 -0
  319. package/skill/references/interfaces/IPCB_AutoLayoutResult.md +169 -0
  320. package/skill/references/interfaces/IPCB_AutoRoutingProps.md +220 -0
  321. package/skill/references/interfaces/IPCB_AutoRoutingResult.md +169 -0
  322. package/skill/references/interfaces/IPCB_BomPropertiesTableColumns.md +169 -0
  323. package/skill/references/interfaces/IPCB_DifferentialPairItem.md +115 -0
  324. package/skill/references/interfaces/IPCB_DiscretizeOptions.md +65 -0
  325. package/skill/references/interfaces/IPCB_DiscretizedPoint.md +88 -0
  326. package/skill/references/interfaces/IPCB_EqualLengthNetGroupItem.md +115 -0
  327. package/skill/references/interfaces/IPCB_LayerItem.md +277 -0
  328. package/skill/references/interfaces/IPCB_NetClassItem.md +115 -0
  329. package/skill/references/interfaces/IPCB_NetInfo.md +115 -0
  330. package/skill/references/interfaces/IPCB_PadPairGroupItem.md +88 -0
  331. package/skill/references/interfaces/IPCB_PadPairMinWireLengthItem.md +88 -0
  332. package/skill/references/interfaces/IPCB_PhysicalStackingConfiguration.md +115 -0
  333. package/skill/references/interfaces/IPCB_Primitive.md +218 -0
  334. package/skill/references/interfaces/IPCB_PrimitiveAPI.md +175 -0
  335. package/skill/references/interfaces/IPCB_PrimitivePadHeatWelding.md +151 -0
  336. package/skill/references/interfaces/IPCB_PrimitivePouredPourFill.md +142 -0
  337. package/skill/references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md +154 -0
  338. package/skill/references/interfaces/IPCB_SubstratePhysicalProperties.md +88 -0
  339. package/skill/references/interfaces/IRawNet.md +103 -0
  340. package/skill/references/interfaces/IRawPureSchematic.md +80 -0
  341. package/skill/references/interfaces/IRawSchematic.md +103 -0
  342. package/skill/references/interfaces/IRawWire.md +149 -0
  343. package/skill/references/interfaces/ISCH_DrcError.md +142 -0
  344. package/skill/references/interfaces/ISCH_DrcErrorPrimitive.md +142 -0
  345. package/skill/references/interfaces/ISCH_ExportPngResolution.md +94 -0
  346. package/skill/references/interfaces/ISCH_NetInfo.md +88 -0
  347. package/skill/references/interfaces/ISCH_Primitive.md +219 -0
  348. package/skill/references/interfaces/ISCH_PrimitiveAPI.md +175 -0
  349. package/skill/references/interfaces/ISCH_ProjectNetInfo.md +142 -0
  350. package/skill/references/interfaces/ISCH_WireInfo.md +169 -0
  351. package/skill/references/interfaces/ISYS_FileSystemFileList.md +169 -0
  352. package/skill/references/interfaces/ISYS_HeaderMenuSub1MenuItem.md +174 -0
  353. package/skill/references/interfaces/ISYS_HeaderMenuSub2MenuItem.md +147 -0
  354. package/skill/references/interfaces/ISYS_HeaderMenuTopMenuItem.md +115 -0
  355. package/skill/references/interfaces/ISYS_HeaderMenus.md +408 -0
  356. package/skill/references/interfaces/ISYS_LogLine.md +115 -0
  357. package/skill/references/interfaces/ISYS_MathBBox.md +142 -0
  358. package/skill/references/interfaces/ISYS_MathPoint.md +88 -0
  359. package/skill/references/interfaces/ISYS_MathPolygonWithHoles.md +92 -0
  360. package/skill/references/interfaces/ISYS_MessageBusTask.md +115 -0
  361. package/skill/references/interfaces/ISYS_MultilingualLanguagesData.md +13 -0
  362. package/skill/references/interfaces/ISYS_PcbComparisonResponse.md +115 -0
  363. package/skill/references/interfaces/ISYS_RightClickMenuItem.md +174 -0
  364. package/skill/references/interfaces/ISYS_ShortcutKeyData.md +169 -0
  365. package/skill/references/interfaces/ISYS_ShortcutKeyDataWithCallFn.md +62 -0
  366. package/skill/references/interfaces/ISYS_ShortcutKeyDataWithUserDefinedShortcutKey.md +62 -0
  367. package/skill/references/interfaces/ISYS_WindowEventListenerRemovableObject.md +109 -0
  368. package/skill/references/interfaces/IconProps.md +88 -0
  369. package/skill/references/interfaces/ImageProps.md +115 -0
  370. package/skill/references/interfaces/InputProps.md +520 -0
  371. package/skill/references/interfaces/ListChildren.md +223 -0
  372. package/skill/references/interfaces/ListProps.md +223 -0
  373. package/skill/references/interfaces/ModalProps.md +358 -0
  374. package/skill/references/interfaces/RadioGroupProps.md +196 -0
  375. package/skill/references/interfaces/RadioItem.md +115 -0
  376. package/skill/references/interfaces/ScrollerProps.md +169 -0
  377. package/skill/references/interfaces/SelectListItem.md +142 -0
  378. package/skill/references/interfaces/SelectProps.md +169 -0
  379. package/skill/references/interfaces/SlotProps.md +88 -0
  380. package/skill/references/interfaces/StyleProps.md +385 -0
  381. package/skill/references/interfaces/TextAreaProps.md +196 -0
  382. package/skill/references/interfaces/TextProps.md +169 -0
  383. package/skill/references/types/ISYS_LanguageKeyValuePairs.md +13 -0
  384. package/skill/references/types/TPCB_LayerTypesOfInnerLayer.md +12 -0
  385. package/skill/references/types/TPCB_LayersInTheSelectable.md +43 -0
  386. package/skill/references/types/TPCB_LayersOfComponent.md +12 -0
  387. package/skill/references/types/TPCB_LayersOfCopper.md +16 -0
  388. package/skill/references/types/TPCB_LayersOfCustom.md +42 -0
  389. package/skill/references/types/TPCB_LayersOfDimension.md +17 -0
  390. package/skill/references/types/TPCB_LayersOfFill.md +29 -0
  391. package/skill/references/types/TPCB_LayersOfImage.md +23 -0
  392. package/skill/references/types/TPCB_LayersOfInner.md +42 -0
  393. package/skill/references/types/TPCB_LayersOfLine.md +26 -0
  394. package/skill/references/types/TPCB_LayersOfObject.md +13 -0
  395. package/skill/references/types/TPCB_LayersOfPad.md +12 -0
  396. package/skill/references/types/TPCB_LayersOfRegion.md +12 -0
  397. package/skill/references/types/TPCB_NumberOfCopperLayers.md +10 -0
  398. package/skill/references/types/TPCB_PolygonSourceArray.md +83 -0
  399. package/skill/references/types/TPCB_PrimitiveDimensionCoordinateSet.md +67 -0
  400. package/skill/references/types/TPCB_PrimitivePadHole.md +31 -0
  401. package/skill/references/types/TPCB_PrimitivePadShape.md +62 -0
  402. package/skill/references/types/TPCB_PrimitiveSpecialPadShape.md +20 -0
  403. package/skill/references/types/TSYS_MathPolygonGroup.md +16 -0
  404. package/skill/references/types/TSYS_MathPolygonInput.md +21 -0
  405. package/skill/references/types/TSYS_PcbComparisonErrorCode.md +10 -0
  406. package/skill/references/types/TSYS_ShortcutKeys.md +97 -0
  407. package/skill/user-guide/using-extension.md +47 -0
@@ -0,0 +1,3155 @@
1
+ # IPCB\_PrimitivePad class
2
+
3
+ Pad primitive
4
+
5
+ ## Signature
6
+
7
+ ```typescript
8
+ class IPCB_PrimitivePad implements IPCB_Primitive
9
+ ```
10
+ **Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
11
+
12
+ ## Remarks
13
+
14
+ ## Properties
15
+
16
+ <table><thead><tr><th>
17
+
18
+ Property
19
+
20
+ </th><th>
21
+
22
+ Modifiers
23
+
24
+ </th><th>
25
+
26
+ Type
27
+
28
+ </th><th>
29
+
30
+ Description
31
+
32
+ </th></tr></thead>
33
+ <tbody><tr><td>
34
+
35
+ [async](./IPCB_PrimitivePad.md)
36
+
37
+ </td><td>
38
+
39
+ `protected`
40
+
41
+ </td><td>
42
+
43
+ boolean
44
+
45
+ </td><td>
46
+
47
+ 异步
48
+
49
+ </td></tr>
50
+ <tr><td>
51
+
52
+ [heatWelding](./IPCB_PrimitivePad.md)
53
+
54
+ </td><td>
55
+
56
+ `protected`
57
+
58
+ </td><td>
59
+
60
+ [IPCB\_PrimitivePadHeatWelding](../interfaces/IPCB_PrimitivePadHeatWelding.md) \| null
61
+
62
+ </td><td>
63
+
64
+ 热焊优化参数
65
+
66
+ </td></tr>
67
+ <tr><td>
68
+
69
+ [hole](./IPCB_PrimitivePad.md)
70
+
71
+ </td><td>
72
+
73
+ `protected`
74
+
75
+ </td><td>
76
+
77
+ [TPCB\_PrimitivePadHole](../types/TPCB_PrimitivePadHole.md) \| null
78
+
79
+ </td><td>
80
+
81
+ 孔
82
+
83
+ </td></tr>
84
+ <tr><td>
85
+
86
+ [holeOffsetX](./IPCB_PrimitivePad.md)
87
+
88
+ </td><td>
89
+
90
+ `protected`
91
+
92
+ </td><td>
93
+
94
+ number
95
+
96
+ </td><td>
97
+
98
+ 孔偏移 X
99
+
100
+ </td></tr>
101
+ <tr><td>
102
+
103
+ [holeOffsetY](./IPCB_PrimitivePad.md)
104
+
105
+ </td><td>
106
+
107
+ `protected`
108
+
109
+ </td><td>
110
+
111
+ number
112
+
113
+ </td><td>
114
+
115
+ 孔偏移 Y
116
+
117
+ </td></tr>
118
+ <tr><td>
119
+
120
+ [holeRotation](./IPCB_PrimitivePad.md)
121
+
122
+ </td><td>
123
+
124
+ `protected`
125
+
126
+ </td><td>
127
+
128
+ number
129
+
130
+ </td><td>
131
+
132
+ 孔相对于焊盘的旋转角度
133
+
134
+ </td></tr>
135
+ <tr><td>
136
+
137
+ [layer](./IPCB_PrimitivePad.md)
138
+
139
+ </td><td>
140
+
141
+ `protected`
142
+
143
+ </td><td>
144
+
145
+ [TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
146
+
147
+ </td><td>
148
+
149
+ 层
150
+
151
+ </td></tr>
152
+ <tr><td>
153
+
154
+ [metallization](./IPCB_PrimitivePad.md)
155
+
156
+ </td><td>
157
+
158
+ `protected`
159
+
160
+ </td><td>
161
+
162
+ boolean
163
+
164
+ </td><td>
165
+
166
+ 是否金属化孔壁
167
+
168
+ </td></tr>
169
+ <tr><td>
170
+
171
+ [net?](./IPCB_PrimitivePad.md)
172
+
173
+ </td><td>
174
+
175
+ `protected`
176
+
177
+ </td><td>
178
+
179
+ string
180
+
181
+ </td><td>
182
+
183
+ _(Optional)_ 网络名称
184
+
185
+ </td></tr>
186
+ <tr><td>
187
+
188
+ [pad?](./IPCB_PrimitivePad.md)
189
+
190
+ </td><td>
191
+
192
+ `protected`
193
+
194
+ </td><td>
195
+
196
+ [TPCB\_PrimitivePadShape](../types/TPCB_PrimitivePadShape.md)
197
+
198
+ </td><td>
199
+
200
+ _(Optional)_ 焊盘外形
201
+
202
+ </td></tr>
203
+ <tr><td>
204
+
205
+ [padNumber](./IPCB_PrimitivePad.md)
206
+
207
+ </td><td>
208
+
209
+ `protected`
210
+
211
+ </td><td>
212
+
213
+ string
214
+
215
+ </td><td>
216
+
217
+ 焊盘编号
218
+
219
+ </td></tr>
220
+ <tr><td>
221
+
222
+ [padType](./IPCB_PrimitivePad.md)
223
+
224
+ </td><td>
225
+
226
+ `protected`
227
+
228
+ </td><td>
229
+
230
+ [EPCB\_PrimitivePadType](../enums/EPCB_PrimitivePadType.md)
231
+
232
+ </td><td>
233
+
234
+ 焊盘类型
235
+
236
+ </td></tr>
237
+ <tr><td>
238
+
239
+ [primitiveId?](./IPCB_PrimitivePad.md)
240
+
241
+ </td><td>
242
+
243
+ `protected`
244
+
245
+ </td><td>
246
+
247
+ string
248
+
249
+ </td><td>
250
+
251
+ _(Optional)_ 图元 ID
252
+
253
+ </td></tr>
254
+ <tr><td>
255
+
256
+ [primitiveLock](./IPCB_PrimitivePad.md)
257
+
258
+ </td><td>
259
+
260
+ `protected`
261
+
262
+ </td><td>
263
+
264
+ boolean
265
+
266
+ </td><td>
267
+
268
+ 是否锁定
269
+
270
+ </td></tr>
271
+ <tr><td>
272
+
273
+ [primitiveType](./IPCB_PrimitivePad.md)
274
+
275
+ </td><td>
276
+
277
+ `protected`
278
+
279
+ `readonly`
280
+
281
+ </td><td>
282
+
283
+ [EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
284
+
285
+ </td><td>
286
+
287
+ 图元类型
288
+
289
+ </td></tr>
290
+ <tr><td>
291
+
292
+ [rotation](./IPCB_PrimitivePad.md)
293
+
294
+ </td><td>
295
+
296
+ `protected`
297
+
298
+ </td><td>
299
+
300
+ number
301
+
302
+ </td><td>
303
+
304
+ 旋转角度
305
+
306
+ </td></tr>
307
+ <tr><td>
308
+
309
+ [solderMaskAndPasteMaskExpansion](./IPCB_PrimitivePad.md)
310
+
311
+ </td><td>
312
+
313
+ `protected`
314
+
315
+ </td><td>
316
+
317
+ [IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
318
+
319
+ </td><td>
320
+
321
+ 阻焊/助焊扩展
322
+
323
+ </td></tr>
324
+ <tr><td>
325
+
326
+ [specialPad?](./IPCB_PrimitivePad.md)
327
+
328
+ </td><td>
329
+
330
+ `protected`
331
+
332
+ </td><td>
333
+
334
+ [TPCB\_PrimitiveSpecialPadShape](../types/TPCB_PrimitiveSpecialPadShape.md)
335
+
336
+ </td><td>
337
+
338
+ _(Optional)_ 特殊焊盘外形
339
+
340
+ </td></tr>
341
+ <tr><td>
342
+
343
+ [x](./IPCB_PrimitivePad.md)
344
+
345
+ </td><td>
346
+
347
+ `protected`
348
+
349
+ </td><td>
350
+
351
+ number
352
+
353
+ </td><td>
354
+
355
+ 位置 X
356
+
357
+ </td></tr>
358
+ <tr><td>
359
+
360
+ [y](./IPCB_PrimitivePad.md)
361
+
362
+ </td><td>
363
+
364
+ `protected`
365
+
366
+ </td><td>
367
+
368
+ number
369
+
370
+ </td><td>
371
+
372
+ 位置 Y
373
+
374
+ </td></tr>
375
+ </tbody></table>
376
+
377
+ ## Methods
378
+
379
+ <table><thead><tr><th>
380
+
381
+ Method
382
+
383
+ </th><th>
384
+
385
+ Modifiers
386
+
387
+ </th><th>
388
+
389
+ Description
390
+
391
+ </th></tr></thead>
392
+ <tbody><tr><td>
393
+
394
+ [create()](./IPCB_PrimitivePad.md)
395
+
396
+ </td><td>
397
+
398
+ </td><td>
399
+
400
+ **_(BETA)_** In PCB canvas in create primitive
401
+
402
+ </td></tr>
403
+ <tr><td>
404
+
405
+ [done()](./IPCB_PrimitivePad.md)
406
+
407
+ </td><td>
408
+
409
+ </td><td>
410
+
411
+ **_(BETA)_** Apply the changes to the primitives to the canvas
412
+
413
+ </td></tr>
414
+ <tr><td>
415
+
416
+ [getState\_HeatWelding()](./IPCB_PrimitivePad.md)
417
+
418
+ </td><td>
419
+
420
+ </td><td>
421
+
422
+ Get the property state: thermal relief optimization parameters
423
+
424
+ </td></tr>
425
+ <tr><td>
426
+
427
+ [getState\_Hole()](./IPCB_PrimitivePad.md)
428
+
429
+ </td><td>
430
+
431
+ </td><td>
432
+
433
+ Get the property state: hole
434
+
435
+ </td></tr>
436
+ <tr><td>
437
+
438
+ [getState\_HoleOffsetX()](./IPCB_PrimitivePad.md)
439
+
440
+ </td><td>
441
+
442
+ </td><td>
443
+
444
+ Get the property state: hole offset X
445
+
446
+ </td></tr>
447
+ <tr><td>
448
+
449
+ [getState\_HoleOffsetY()](./IPCB_PrimitivePad.md)
450
+
451
+ </td><td>
452
+
453
+ </td><td>
454
+
455
+ Get the property state: hole offset Y
456
+
457
+ </td></tr>
458
+ <tr><td>
459
+
460
+ [getState\_HoleRotation()](./IPCB_PrimitivePad.md)
461
+
462
+ </td><td>
463
+
464
+ </td><td>
465
+
466
+ Get the property state: Rotation angle of the hole relative to the pad
467
+
468
+ </td></tr>
469
+ <tr><td>
470
+
471
+ [getState\_Layer()](./IPCB_PrimitivePad.md)
472
+
473
+ </td><td>
474
+
475
+ </td><td>
476
+
477
+ Get the property state: Layer
478
+
479
+ </td></tr>
480
+ <tr><td>
481
+
482
+ [getState\_Metallization()](./IPCB_PrimitivePad.md)
483
+
484
+ </td><td>
485
+
486
+ </td><td>
487
+
488
+ Get the property state: Whether the hole wall is plated
489
+
490
+ </td></tr>
491
+ <tr><td>
492
+
493
+ [getState\_Net()](./IPCB_PrimitivePad.md)
494
+
495
+ </td><td>
496
+
497
+ </td><td>
498
+
499
+ Get the property state: net name
500
+
501
+ </td></tr>
502
+ <tr><td>
503
+
504
+ [getState\_Pad()](./IPCB_PrimitivePad.md)
505
+
506
+ </td><td>
507
+
508
+ </td><td>
509
+
510
+ Get the property state: pad shape
511
+
512
+ </td></tr>
513
+ <tr><td>
514
+
515
+ [getState\_PadNumber()](./IPCB_PrimitivePad.md)
516
+
517
+ </td><td>
518
+
519
+ </td><td>
520
+
521
+ Get the property state: pad number
522
+
523
+ </td></tr>
524
+ <tr><td>
525
+
526
+ [getState\_PadType()](./IPCB_PrimitivePad.md)
527
+
528
+ </td><td>
529
+
530
+ </td><td>
531
+
532
+ Get the property state: pad type
533
+
534
+ </td></tr>
535
+ <tr><td>
536
+
537
+ [getState\_PrimitiveId()](./IPCB_PrimitivePad.md)
538
+
539
+ </td><td>
540
+
541
+ </td><td>
542
+
543
+ Get the property state: primitive ID
544
+
545
+ </td></tr>
546
+ <tr><td>
547
+
548
+ [getState\_PrimitiveLock()](./IPCB_PrimitivePad.md)
549
+
550
+ </td><td>
551
+
552
+ </td><td>
553
+
554
+ Get the property state: whether it is locked
555
+
556
+ </td></tr>
557
+ <tr><td>
558
+
559
+ [getState\_PrimitiveType()](./IPCB_PrimitivePad.md)
560
+
561
+ </td><td>
562
+
563
+ </td><td>
564
+
565
+ Get the property state: primitive type
566
+
567
+ </td></tr>
568
+ <tr><td>
569
+
570
+ [getState\_Rotation()](./IPCB_PrimitivePad.md)
571
+
572
+ </td><td>
573
+
574
+ </td><td>
575
+
576
+ Get the property state: rotation angle
577
+
578
+ </td></tr>
579
+ <tr><td>
580
+
581
+ [getState\_SolderMaskAndPasteMaskExpansion()](./IPCB_PrimitivePad.md)
582
+
583
+ </td><td>
584
+
585
+ </td><td>
586
+
587
+ Get the property state: solder mask / paste mask expansion
588
+
589
+ </td></tr>
590
+ <tr><td>
591
+
592
+ [getState\_SpecialPad()](./IPCB_PrimitivePad.md)
593
+
594
+ </td><td>
595
+
596
+ </td><td>
597
+
598
+ Get the property state: special pad shape
599
+
600
+ </td></tr>
601
+ <tr><td>
602
+
603
+ [getState\_X()](./IPCB_PrimitivePad.md)
604
+
605
+ </td><td>
606
+
607
+ </td><td>
608
+
609
+ Get the property state: X position
610
+
611
+ </td></tr>
612
+ <tr><td>
613
+
614
+ [getState\_Y()](./IPCB_PrimitivePad.md)
615
+
616
+ </td><td>
617
+
618
+ </td><td>
619
+
620
+ Get the property state: Y position
621
+
622
+ </td></tr>
623
+ <tr><td>
624
+
625
+ [isAsync()](./IPCB_PrimitivePad.md)
626
+
627
+ </td><td>
628
+
629
+ </td><td>
630
+
631
+ Query whether the primitive is an async primitive
632
+
633
+ </td></tr>
634
+ <tr><td>
635
+
636
+ [reset()](./IPCB_PrimitivePad.md)
637
+
638
+ </td><td>
639
+
640
+ </td><td>
641
+
642
+ **_(BETA)_** Reset the async primitive to the current canvas state
643
+
644
+ </td></tr>
645
+ <tr><td>
646
+
647
+ [setState\_HeatWelding(heatWelding)](./IPCB_PrimitivePad.md)
648
+
649
+ </td><td>
650
+
651
+ </td><td>
652
+
653
+ **_(BETA)_** Set the property state: thermal relief optimization parameters
654
+
655
+ </td></tr>
656
+ <tr><td>
657
+
658
+ [setState\_Hole(hole)](./IPCB_PrimitivePad.md)
659
+
660
+ </td><td>
661
+
662
+ </td><td>
663
+
664
+ **_(BETA)_** Set the property state: hole
665
+
666
+ </td></tr>
667
+ <tr><td>
668
+
669
+ [setState\_HoleOffsetX(holeOffsetX)](./IPCB_PrimitivePad.md)
670
+
671
+ </td><td>
672
+
673
+ </td><td>
674
+
675
+ **_(BETA)_** Set the property state: hole offset X
676
+
677
+ </td></tr>
678
+ <tr><td>
679
+
680
+ [setState\_HoleOffsetY(holeOffsetY)](./IPCB_PrimitivePad.md)
681
+
682
+ </td><td>
683
+
684
+ </td><td>
685
+
686
+ **_(BETA)_** Set the property state: hole offset Y
687
+
688
+ </td></tr>
689
+ <tr><td>
690
+
691
+ [setState\_HoleRotation(holeRotation)](./IPCB_PrimitivePad.md)
692
+
693
+ </td><td>
694
+
695
+ </td><td>
696
+
697
+ **_(BETA)_** Set the property state: Rotation angle of the hole relative to the pad
698
+
699
+ </td></tr>
700
+ <tr><td>
701
+
702
+ [setState\_Layer(layer)](./IPCB_PrimitivePad.md)
703
+
704
+ </td><td>
705
+
706
+ </td><td>
707
+
708
+ **_(BETA)_** Set the property state: Layer
709
+
710
+ </td></tr>
711
+ <tr><td>
712
+
713
+ [setState\_Metallization(metallization)](./IPCB_PrimitivePad.md)
714
+
715
+ </td><td>
716
+
717
+ </td><td>
718
+
719
+ **_(BETA)_** Set the property state: Whether the hole wall is plated
720
+
721
+ </td></tr>
722
+ <tr><td>
723
+
724
+ [setState\_Net(net)](./IPCB_PrimitivePad.md)
725
+
726
+ </td><td>
727
+
728
+ </td><td>
729
+
730
+ **_(BETA)_** Set the property state: net
731
+
732
+ </td></tr>
733
+ <tr><td>
734
+
735
+ [setState\_Pad(pad)](./IPCB_PrimitivePad.md)
736
+
737
+ </td><td>
738
+
739
+ </td><td>
740
+
741
+ **_(BETA)_** Set the property state: pad shape
742
+
743
+ </td></tr>
744
+ <tr><td>
745
+
746
+ [setState\_PadNumber(padNumber)](./IPCB_PrimitivePad.md)
747
+
748
+ </td><td>
749
+
750
+ </td><td>
751
+
752
+ **_(BETA)_** Set the property state: pad number
753
+
754
+ </td></tr>
755
+ <tr><td>
756
+
757
+ [setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitivePad.md)
758
+
759
+ </td><td>
760
+
761
+ </td><td>
762
+
763
+ **_(BETA)_** Set the property state: whether it is locked
764
+
765
+ </td></tr>
766
+ <tr><td>
767
+
768
+ [setState\_Rotation(rotation)](./IPCB_PrimitivePad.md)
769
+
770
+ </td><td>
771
+
772
+ </td><td>
773
+
774
+ **_(BETA)_** Set the property state: rotation angle
775
+
776
+ </td></tr>
777
+ <tr><td>
778
+
779
+ [setState\_SolderMaskAndPasteMaskExpansion(solderMaskAndPasteMaskExpansion)](./IPCB_PrimitivePad.md)
780
+
781
+ </td><td>
782
+
783
+ </td><td>
784
+
785
+ **_(BETA)_** Set the property state: solder mask / paste mask expansion
786
+
787
+ </td></tr>
788
+ <tr><td>
789
+
790
+ [setState\_SpecialPad(specialPad)](./IPCB_PrimitivePad.md)
791
+
792
+ </td><td>
793
+
794
+ </td><td>
795
+
796
+ **_(BETA)_** Set the property state: special pad shape
797
+
798
+ </td></tr>
799
+ <tr><td>
800
+
801
+ [setState\_X(x)](./IPCB_PrimitivePad.md)
802
+
803
+ </td><td>
804
+
805
+ </td><td>
806
+
807
+ **_(BETA)_** Set the property state: X position
808
+
809
+ </td></tr>
810
+ <tr><td>
811
+
812
+ [setState\_Y(y)](./IPCB_PrimitivePad.md)
813
+
814
+ </td><td>
815
+
816
+ </td><td>
817
+
818
+ **_(BETA)_** Set the property state: Y position
819
+
820
+ </td></tr>
821
+ <tr><td>
822
+
823
+ [toAsync()](./IPCB_PrimitivePad.md)
824
+
825
+ </td><td>
826
+
827
+ </td><td>
828
+
829
+ Convert Primitive to Async primitive
830
+
831
+ </td></tr>
832
+ <tr><td>
833
+
834
+ [toSync()](./IPCB_PrimitivePad.md)
835
+
836
+ </td><td>
837
+
838
+ </td><td>
839
+
840
+ Convert Primitive to Sync primitive
841
+
842
+ </td></tr>
843
+ </tbody></table>
844
+
845
+ ---
846
+
847
+ ## 属性详情
848
+
849
+ ### async
850
+
851
+ # IPCB\_PrimitivePad.async property
852
+
853
+ 异步
854
+
855
+ ## Signature
856
+
857
+ ```typescript
858
+ function async: boolean;
859
+ ```
860
+
861
+ ### heatwelding
862
+
863
+ # IPCB\_PrimitivePad.heatWelding property
864
+
865
+ 热焊优化参数
866
+
867
+ ## Signature
868
+
869
+ ```typescript
870
+ function heatWelding: IPCB_PrimitivePadHeatWelding | null;
871
+ ```
872
+
873
+ ### hole
874
+
875
+ # IPCB\_PrimitivePad.hole property
876
+
877
+ 孔
878
+
879
+ ## Signature
880
+
881
+ ```typescript
882
+ function hole: TPCB_PrimitivePadHole | null;
883
+ ```
884
+
885
+ ### holeoffsetx
886
+
887
+ # IPCB\_PrimitivePad.holeOffsetX property
888
+
889
+ 孔偏移 X
890
+
891
+ ## Signature
892
+
893
+ ```typescript
894
+ function holeOffsetX: number;
895
+ ```
896
+
897
+ ### holeoffsety
898
+
899
+ # IPCB\_PrimitivePad.holeOffsetY property
900
+
901
+ 孔偏移 Y
902
+
903
+ ## Signature
904
+
905
+ ```typescript
906
+ function holeOffsetY: number;
907
+ ```
908
+
909
+ ### holerotation
910
+
911
+ # IPCB\_PrimitivePad.holeRotation property
912
+
913
+ 孔相对于焊盘的旋转角度
914
+
915
+ ## Signature
916
+
917
+ ```typescript
918
+ function holeRotation: number;
919
+ ```
920
+
921
+ ### layer
922
+
923
+ # IPCB\_PrimitivePad.layer property
924
+
925
+ 层
926
+
927
+ ## Signature
928
+
929
+ ```typescript
930
+ function layer: TPCB_LayersOfPad;
931
+ ```
932
+
933
+ ### metallization
934
+
935
+ # IPCB\_PrimitivePad.metallization property
936
+
937
+ 是否金属化孔壁
938
+
939
+ ## Signature
940
+
941
+ ```typescript
942
+ function metallization: boolean;
943
+ ```
944
+
945
+ ### net
946
+
947
+ # IPCB\_PrimitivePad.net property
948
+
949
+ 网络名称
950
+
951
+ ## Signature
952
+
953
+ ```typescript
954
+ function net?: string;
955
+ ```
956
+
957
+ ### pad
958
+
959
+ # IPCB\_PrimitivePad.pad property
960
+
961
+ 焊盘外形
962
+
963
+ ## Signature
964
+
965
+ ```typescript
966
+ function pad?: TPCB_PrimitivePadShape;
967
+ ```
968
+
969
+ ### padnumber
970
+
971
+ # IPCB\_PrimitivePad.padNumber property
972
+
973
+ 焊盘编号
974
+
975
+ ## Signature
976
+
977
+ ```typescript
978
+ function padNumber: string;
979
+ ```
980
+
981
+ ### padtype
982
+
983
+ # IPCB\_PrimitivePad.padType property
984
+
985
+ 焊盘类型
986
+
987
+ ## Signature
988
+
989
+ ```typescript
990
+ function padType: EPCB_PrimitivePadType;
991
+ ```
992
+
993
+ ### primitiveid
994
+
995
+ # IPCB\_PrimitivePad.primitiveId property
996
+
997
+ 图元 ID
998
+
999
+ ## Signature
1000
+
1001
+ ```typescript
1002
+ function primitiveId?: string;
1003
+ ```
1004
+
1005
+ ### primitivelock
1006
+
1007
+ # IPCB\_PrimitivePad.primitiveLock property
1008
+
1009
+ 是否锁定
1010
+
1011
+ ## Signature
1012
+
1013
+ ```typescript
1014
+ function primitiveLock: boolean;
1015
+ ```
1016
+
1017
+ ### primitivetype
1018
+
1019
+ # IPCB\_PrimitivePad.primitiveType property
1020
+
1021
+ 图元类型
1022
+
1023
+ ## Signature
1024
+
1025
+ ```typescript
1026
+ function readonly primitiveType: EPCB_PrimitiveType;
1027
+ ```
1028
+
1029
+ ### rotation
1030
+
1031
+ # IPCB\_PrimitivePad.rotation property
1032
+
1033
+ 旋转角度
1034
+
1035
+ ## Signature
1036
+
1037
+ ```typescript
1038
+ function rotation: number;
1039
+ ```
1040
+
1041
+ ### soldermaskandpastemaskexpansion
1042
+
1043
+ # IPCB\_PrimitivePad.solderMaskAndPasteMaskExpansion property
1044
+
1045
+ 阻焊/助焊扩展
1046
+
1047
+ ## Signature
1048
+
1049
+ ```typescript
1050
+ function solderMaskAndPasteMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;
1051
+ ```
1052
+
1053
+ ### specialpad
1054
+
1055
+ # IPCB\_PrimitivePad.specialPad property
1056
+
1057
+ 特殊焊盘外形
1058
+
1059
+ ## Signature
1060
+
1061
+ ```typescript
1062
+ function specialPad?: TPCB_PrimitiveSpecialPadShape;
1063
+ ```
1064
+
1065
+ ### x
1066
+
1067
+ # IPCB\_PrimitivePad.x property
1068
+
1069
+ 位置 X
1070
+
1071
+ ## Signature
1072
+
1073
+ ```typescript
1074
+ function x: number;
1075
+ ```
1076
+
1077
+ ### y
1078
+
1079
+ # IPCB\_PrimitivePad.y property
1080
+
1081
+ 位置 Y
1082
+
1083
+ ## Signature
1084
+
1085
+ ```typescript
1086
+ function y: number;
1087
+ ```
1088
+
1089
+
1090
+ ---
1091
+
1092
+ ## 方法详情
1093
+
1094
+ ### create
1095
+
1096
+ # IPCB\_PrimitivePad.create() method
1097
+
1098
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1099
+
1100
+ In PCB canvas in create primitive
1101
+
1102
+ ## Signature
1103
+
1104
+ ```typescript
1105
+ function create(): Promise<IPCB_PrimitivePad>;
1106
+ ```
1107
+
1108
+ ## Returns
1109
+
1110
+ Promise&lt;[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->&gt;
1111
+
1112
+ Pad primitive object
1113
+
1114
+ ## Example
1115
+
1116
+ ```javascript
1117
+ // 1. 生成本次运行专用的坐标,在顶层放置一个圆形贴片焊盘(直径 60mil)
1118
+ const x = 3000 + Math.floor(Math.random() * 100000);
1119
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1120
+
1121
+ // 2. 读取创建结果,确认层、编号与外形(保留现场供画布观察)
1122
+ console.log('created:', !!pad);
1123
+ console.log('layer:', pad.getState_Layer());
1124
+ console.log('padNumber:', pad.getState_PadNumber());
1125
+ console.log('padShape:', pad.getState_Pad());
1126
+ ```
1127
+
1128
+ ### done
1129
+
1130
+ # IPCB\_PrimitivePad.done() method
1131
+
1132
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1133
+
1134
+ Apply the changes to the primitives to the canvas
1135
+
1136
+ ## Signature
1137
+
1138
+ ```typescript
1139
+ function done(): Promise<IPCB_PrimitivePad>;
1140
+ ```
1141
+
1142
+ ## Returns
1143
+
1144
+ Promise&lt;[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->&gt;
1145
+
1146
+ Dimension primitive object
1147
+
1148
+ ## Example
1149
+
1150
+ ```javascript
1151
+ // 1. 生成本次运行专用的坐标,在顶层放置一个圆形贴片焊盘
1152
+ const x = 3000 + Math.floor(Math.random() * 100000);
1153
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1154
+
1155
+ // 2. 异步模式下连续修改旋转和编号(此时画布尚未变化)
1156
+ const a = pad.toAsync();
1157
+ a.setState_Rotation(90);
1158
+ a.setState_PadNumber('嘉立创示例_A1');
1159
+
1160
+ // 3. 一次性提交到画布
1161
+ await a.done();
1162
+
1163
+ // 4. 从画布重新读取,确认两处修改都已生效(保留现场供观察)
1164
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
1165
+
1166
+ console.log('rotation:', ref.getState_Rotation());
1167
+ console.log('padNumber:', ref.getState_PadNumber());
1168
+ ```
1169
+
1170
+ ### getstate_heatwelding
1171
+
1172
+ # IPCB\_PrimitivePad.getState\_HeatWelding() method
1173
+
1174
+ Get the property state: thermal relief optimization parameters
1175
+
1176
+ ## Signature
1177
+
1178
+ ```typescript
1179
+ function getState_HeatWelding(): IPCB_PrimitivePadHeatWelding | null;
1180
+ ```
1181
+
1182
+ ## Returns
1183
+
1184
+ [IPCB\_PrimitivePadHeatWelding](../interfaces/IPCB_PrimitivePadHeatWelding.md) \| null
1185
+
1186
+ Thermal relief optimization parameters
1187
+
1188
+ ## Example
1189
+
1190
+ ```javascript
1191
+ // 1. 生成本次运行专用的坐标,创建一个带热焊参数的焊盘和一个普通焊盘
1192
+ const x = 3000 + Math.floor(Math.random() * 100000);
1193
+ const heated = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0, undefined, null, { connectionMethod: 'Divergent', divergenceSpacing: 10, divergenceLineWidth: 8, divergenceAngle: 45 });
1194
+ const plain = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1195
+
1196
+ // 2. 分别读取热焊参数
1197
+ const heatedConfig = heated.getState_HeatWelding();
1198
+ const plainConfig = plain.getState_HeatWelding();
1199
+
1200
+ // 3. 清理测试图元(查询类案例不留测试对象)
1201
+ await eda.pcb_PrimitivePad.delete([heated.getState_PrimitiveId(), plain.getState_PrimitiveId()]);
1202
+
1203
+ console.log('heatedConfig:', heatedConfig);
1204
+ console.log('plainConfig:', plainConfig);
1205
+ ```
1206
+
1207
+ ### getstate_hole
1208
+
1209
+ # IPCB\_PrimitivePad.getState\_Hole() method
1210
+
1211
+ Get the property state: hole
1212
+
1213
+ ## Signature
1214
+
1215
+ ```typescript
1216
+ function getState_Hole(): TPCB_PrimitivePadHole | null;
1217
+ ```
1218
+
1219
+ ## Returns
1220
+
1221
+ [TPCB\_PrimitivePadHole](../types/TPCB_PrimitivePadHole.md) \| null
1222
+
1223
+ Hole
1224
+
1225
+ ## Example
1226
+
1227
+ ```javascript
1228
+ // 1. 生成本次运行专用的坐标,创建一个带圆孔的通孔焊盘和一个贴片焊盘
1229
+ const x = 3000 + Math.floor(Math.random() * 100000);
1230
+ const through = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 0, 0, false, 0);
1231
+ const smd = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1232
+
1233
+ // 2. 分别读取钻孔参数
1234
+ const throughHole = through.getState_Hole();
1235
+ const smdHole = smd.getState_Hole();
1236
+
1237
+ // 3. 清理测试图元(查询类案例不留测试对象)
1238
+ await eda.pcb_PrimitivePad.delete([through.getState_PrimitiveId(), smd.getState_PrimitiveId()]);
1239
+
1240
+ console.log('throughHole:', throughHole);
1241
+ console.log('smdHole:', smdHole);
1242
+ ```
1243
+
1244
+ ### getstate_holeoffsetx
1245
+
1246
+ # IPCB\_PrimitivePad.getState\_HoleOffsetX() method
1247
+
1248
+ Get the property state: hole offset X
1249
+
1250
+ ## Signature
1251
+
1252
+ ```typescript
1253
+ function getState_HoleOffsetX(): number;
1254
+ ```
1255
+
1256
+ ## Returns
1257
+
1258
+ number
1259
+
1260
+ Hole offset X
1261
+
1262
+ ## Example
1263
+
1264
+ ```javascript
1265
+ // 1. 生成本次运行专用的坐标,创建一个孔心向右偏 10mil 的通孔焊盘
1266
+ const x = 3000 + Math.floor(Math.random() * 100000);
1267
+ const pad = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 10, 0, 0, false, 0);
1268
+
1269
+ // 2. 读取孔偏移 X
1270
+ const holeOffsetX = pad.getState_HoleOffsetX();
1271
+
1272
+ // 3. 清理测试图元(查询类案例不留测试对象)
1273
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1274
+
1275
+ console.log('holeOffsetX:', holeOffsetX);
1276
+ ```
1277
+
1278
+ ### getstate_holeoffsety
1279
+
1280
+ # IPCB\_PrimitivePad.getState\_HoleOffsetY() method
1281
+
1282
+ Get the property state: hole offset Y
1283
+
1284
+ ## Signature
1285
+
1286
+ ```typescript
1287
+ function getState_HoleOffsetY(): number;
1288
+ ```
1289
+
1290
+ ## Returns
1291
+
1292
+ number
1293
+
1294
+ Hole offset Y
1295
+
1296
+ ## Example
1297
+
1298
+ ```javascript
1299
+ // 1. 生成本次运行专用的坐标,创建一个孔心向上偏 20mil 的通孔焊盘
1300
+ const x = 3000 + Math.floor(Math.random() * 100000);
1301
+ const pad = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 20, 0, false, 0);
1302
+
1303
+ // 2. 读取孔偏移 Y
1304
+ const holeOffsetY = pad.getState_HoleOffsetY();
1305
+
1306
+ // 3. 清理测试图元(查询类案例不留测试对象)
1307
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1308
+
1309
+ console.log('holeOffsetY:', holeOffsetY);
1310
+ ```
1311
+
1312
+ ### getstate_holerotation
1313
+
1314
+ # IPCB\_PrimitivePad.getState\_HoleRotation() method
1315
+
1316
+ Get the property state: Rotation angle of the hole relative to the pad
1317
+
1318
+ ## Signature
1319
+
1320
+ ```typescript
1321
+ function getState_HoleRotation(): number;
1322
+ ```
1323
+
1324
+ ## Returns
1325
+
1326
+ number
1327
+
1328
+ Rotation angle of the hole relative to the pad
1329
+
1330
+ ## Example
1331
+
1332
+ ```javascript
1333
+ // 1. 生成本次运行专用的坐标,创建一个孔旋转 45 度的通孔焊盘
1334
+ const x = 3000 + Math.floor(Math.random() * 100000);
1335
+ const pad = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 0, 45, false, 0);
1336
+
1337
+ // 2. 读取孔旋转角度
1338
+ const holeRotation = pad.getState_HoleRotation();
1339
+
1340
+ // 3. 清理测试图元(查询类案例不留测试对象)
1341
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1342
+
1343
+ console.log('holeRotation:', holeRotation);
1344
+ ```
1345
+
1346
+ ### getstate_layer
1347
+
1348
+ # IPCB\_PrimitivePad.getState\_Layer() method
1349
+
1350
+ Get the property state: Layer
1351
+
1352
+ ## Signature
1353
+
1354
+ ```typescript
1355
+ function getState_Layer(): TPCB_LayersOfPad;
1356
+ ```
1357
+
1358
+ ## Returns
1359
+
1360
+ [TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
1361
+
1362
+ Layer
1363
+
1364
+ ## Example
1365
+
1366
+ ```javascript
1367
+ // 1. 生成本次运行专用的坐标,分别在顶层和多层创建焊盘
1368
+ const x = 3000 + Math.floor(Math.random() * 100000);
1369
+ const top = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1370
+ const multi = await eda.pcb_PrimitivePad.create(12, '2', x + 500, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 0, 0, false, 0);
1371
+
1372
+ // 2. 分别读取层属性
1373
+ const topLayer = top.getState_Layer();
1374
+ const multiLayer = multi.getState_Layer();
1375
+
1376
+ // 3. 清理测试图元(查询类案例不留测试对象)
1377
+ await eda.pcb_PrimitivePad.delete([top.getState_PrimitiveId(), multi.getState_PrimitiveId()]);
1378
+
1379
+ console.log('topLayer:', topLayer);
1380
+ console.log('multiLayer:', multiLayer);
1381
+ ```
1382
+
1383
+ ### getstate_metallization
1384
+
1385
+ # IPCB\_PrimitivePad.getState\_Metallization() method
1386
+
1387
+ Get the property state: Whether the hole wall is plated
1388
+
1389
+ ## Signature
1390
+
1391
+ ```typescript
1392
+ function getState_Metallization(): boolean;
1393
+ ```
1394
+
1395
+ ## Returns
1396
+
1397
+ boolean
1398
+
1399
+ Whether the hole wall is plated
1400
+
1401
+ ## Example
1402
+
1403
+ ```javascript
1404
+ // 1. 生成本次运行专用的坐标,创建一个金属化孔焊盘和一个非金属化孔焊盘
1405
+ const x = 3000 + Math.floor(Math.random() * 100000);
1406
+ const plated = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 0, 0, true, 0);
1407
+ const nonPlated = await eda.pcb_PrimitivePad.create(12, '2', x + 500, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 0, 0, false, 0);
1408
+
1409
+ // 2. 分别读取金属化状态
1410
+ const platedMetallization = plated.getState_Metallization();
1411
+ const nonPlatedMetallization = nonPlated.getState_Metallization();
1412
+
1413
+ // 3. 清理测试图元(查询类案例不留测试对象)
1414
+ await eda.pcb_PrimitivePad.delete([plated.getState_PrimitiveId(), nonPlated.getState_PrimitiveId()]);
1415
+
1416
+ console.log('platedMetallization:', platedMetallization);
1417
+ console.log('nonPlatedMetallization:', nonPlatedMetallization);
1418
+ ```
1419
+
1420
+ ### getstate_net
1421
+
1422
+ # IPCB\_PrimitivePad.getState\_Net() method
1423
+
1424
+ Get the property state: net name
1425
+
1426
+ ## Signature
1427
+
1428
+ ```typescript
1429
+ function getState_Net(): string | undefined;
1430
+ ```
1431
+
1432
+ ## Returns
1433
+
1434
+ string \| undefined
1435
+
1436
+ Net name
1437
+
1438
+ ## Example
1439
+
1440
+ ```javascript
1441
+ // 1. 生成本次运行专用的坐标,创建一个挂网络的焊盘和一个无网络焊盘
1442
+ const x = 3000 + Math.floor(Math.random() * 100000);
1443
+ const netted = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '嘉立创示例_NET1', null, 0, 0, 0, false, 0);
1444
+ const free = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1445
+
1446
+ // 2. 分别读取网络名称
1447
+ const nettedNet = netted.getState_Net();
1448
+ const freeNet = free.getState_Net();
1449
+
1450
+ // 3. 清理测试图元(查询类案例不留测试对象)
1451
+ await eda.pcb_PrimitivePad.delete([netted.getState_PrimitiveId(), free.getState_PrimitiveId()]);
1452
+
1453
+ console.log('nettedNet:', nettedNet);
1454
+ console.log('freeNet:', freeNet);
1455
+ ```
1456
+
1457
+ ### getstate_pad
1458
+
1459
+ # IPCB\_PrimitivePad.getState\_Pad() method
1460
+
1461
+ Get the property state: pad shape
1462
+
1463
+ ## Signature
1464
+
1465
+ ```typescript
1466
+ function getState_Pad(): TPCB_PrimitivePadShape | undefined;
1467
+ ```
1468
+
1469
+ ## Returns
1470
+
1471
+ [TPCB\_PrimitivePadShape](../types/TPCB_PrimitivePadShape.md) \| undefined
1472
+
1473
+ Pad shape
1474
+
1475
+ ## Example
1476
+
1477
+ ```javascript
1478
+ // 1. 生成本次运行专用的坐标,创建一个圆形贴片焊盘
1479
+ const x = 3000 + Math.floor(Math.random() * 100000);
1480
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1481
+
1482
+ // 2. 读取焊盘外形
1483
+ const padShape = pad.getState_Pad();
1484
+
1485
+ // 3. 清理测试图元(查询类案例不留测试对象)
1486
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1487
+
1488
+ console.log('padShape:', padShape);
1489
+ ```
1490
+
1491
+ ### getstate_padnumber
1492
+
1493
+ # IPCB\_PrimitivePad.getState\_PadNumber() method
1494
+
1495
+ Get the property state: pad number
1496
+
1497
+ ## Signature
1498
+
1499
+ ```typescript
1500
+ function getState_PadNumber(): string;
1501
+ ```
1502
+
1503
+ ## Returns
1504
+
1505
+ string
1506
+
1507
+ Pad number
1508
+
1509
+ ## Example
1510
+
1511
+ ```javascript
1512
+ // 1. 生成本次运行专用的坐标,创建一个编号为 '1' 的贴片焊盘
1513
+ const x = 3000 + Math.floor(Math.random() * 100000);
1514
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1515
+
1516
+ // 2. 读取焊盘编号
1517
+ const padNumber = pad.getState_PadNumber();
1518
+
1519
+ // 3. 清理测试图元(查询类案例不留测试对象)
1520
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1521
+
1522
+ console.log('padNumber:', padNumber);
1523
+ ```
1524
+
1525
+ ### getstate_padtype
1526
+
1527
+ # IPCB\_PrimitivePad.getState\_PadType() method
1528
+
1529
+ Get the property state: pad type
1530
+
1531
+ ## Signature
1532
+
1533
+ ```typescript
1534
+ function getState_PadType(): EPCB_PrimitivePadType;
1535
+ ```
1536
+
1537
+ ## Returns
1538
+
1539
+ [EPCB\_PrimitivePadType](../enums/EPCB_PrimitivePadType.md)
1540
+
1541
+ Pad type
1542
+
1543
+ ## Example
1544
+
1545
+ ```javascript
1546
+ // 1. 生成本次运行专用的坐标,创建一个普通焊盘和一个标识点
1547
+ const x = 3000 + Math.floor(Math.random() * 100000);
1548
+ const normal = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1549
+ const mark = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 2);
1550
+
1551
+ // 2. 分别读取焊盘类型(0=普通 1=测试点 2=标识点)
1552
+ const normalType = normal.getState_PadType();
1553
+ const markType = mark.getState_PadType();
1554
+
1555
+ // 3. 清理测试图元(查询类案例不留测试对象)
1556
+ await eda.pcb_PrimitivePad.delete([normal.getState_PrimitiveId(), mark.getState_PrimitiveId()]);
1557
+
1558
+ console.log('normalType:', normalType);
1559
+ console.log('markType:', markType);
1560
+ ```
1561
+
1562
+ ### getstate_primitiveid
1563
+
1564
+ # IPCB\_PrimitivePad.getState\_PrimitiveId() method
1565
+
1566
+ Get the property state: primitive ID
1567
+
1568
+ ## Signature
1569
+
1570
+ ```typescript
1571
+ function getState_PrimitiveId(): string;
1572
+ ```
1573
+
1574
+ ## Returns
1575
+
1576
+ string
1577
+
1578
+ Primitive ID
1579
+
1580
+ ## Example
1581
+
1582
+ ```javascript
1583
+ // 1. 生成本次运行专用的坐标,创建一个贴片焊盘
1584
+ const x = 3000 + Math.floor(Math.random() * 100000);
1585
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1586
+
1587
+ // 2. 读取图元 ID
1588
+ const primitiveId = pad.getState_PrimitiveId();
1589
+
1590
+ // 3. 用 ID 从画布重新获取焊盘,验证句柄有效
1591
+ const refetched = await eda.pcb_PrimitivePad.get(primitiveId);
1592
+
1593
+ // 4. 清理测试图元(查询类案例不留测试对象)
1594
+ await eda.pcb_PrimitivePad.delete([primitiveId]);
1595
+
1596
+ console.log('primitiveId:', primitiveId);
1597
+ console.log('refetchSamePad:', refetched.getState_PrimitiveId() === primitiveId);
1598
+ ```
1599
+
1600
+ ### getstate_primitivelock
1601
+
1602
+ # IPCB\_PrimitivePad.getState\_PrimitiveLock() method
1603
+
1604
+ Get the property state: whether it is locked
1605
+
1606
+ ## Signature
1607
+
1608
+ ```typescript
1609
+ function getState_PrimitiveLock(): boolean;
1610
+ ```
1611
+
1612
+ ## Returns
1613
+
1614
+ boolean
1615
+
1616
+ Whether it is locked
1617
+
1618
+ ## Example
1619
+
1620
+ ```javascript
1621
+ // 1. 生成本次运行专用的坐标,创建一个锁定的焊盘(最后一个参数 primitiveLock=true)
1622
+ const x = 3000 + Math.floor(Math.random() * 100000);
1623
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0, undefined, null, null, true);
1624
+
1625
+ // 2. 读取锁定状态
1626
+ const primitiveLock = pad.getState_PrimitiveLock();
1627
+
1628
+ // 3. 清理测试图元(查询类案例不留测试对象)
1629
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1630
+
1631
+ console.log('primitiveLock:', primitiveLock);
1632
+ ```
1633
+
1634
+ ### getstate_primitivetype
1635
+
1636
+ # IPCB\_PrimitivePad.getState\_PrimitiveType() method
1637
+
1638
+ Get the property state: primitive type
1639
+
1640
+ ## Signature
1641
+
1642
+ ```typescript
1643
+ function getState_PrimitiveType(): EPCB_PrimitiveType;
1644
+ ```
1645
+
1646
+ ## Returns
1647
+
1648
+ [EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
1649
+
1650
+ Primitive type
1651
+
1652
+ ## Example
1653
+
1654
+ ```javascript
1655
+ // 1. 生成本次运行专用的坐标,创建一个贴片焊盘
1656
+ const x = 3000 + Math.floor(Math.random() * 100000);
1657
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1658
+
1659
+ // 2. 读取图元类型(焊盘固定返回 'Pad')
1660
+ const primitiveType = pad.getState_PrimitiveType();
1661
+
1662
+ // 3. 清理测试图元(查询类案例不留测试对象)
1663
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1664
+
1665
+ console.log('primitiveType:', primitiveType);
1666
+ ```
1667
+
1668
+ ### getstate_rotation
1669
+
1670
+ # IPCB\_PrimitivePad.getState\_Rotation() method
1671
+
1672
+ Get the property state: rotation angle
1673
+
1674
+ ## Signature
1675
+
1676
+ ```typescript
1677
+ function getState_Rotation(): number;
1678
+ ```
1679
+
1680
+ ## Returns
1681
+
1682
+ number
1683
+
1684
+ Rotation angle
1685
+
1686
+ ## Example
1687
+
1688
+ ```javascript
1689
+ // 1. 生成本次运行专用的坐标,创建一个旋转 90 度的长圆形焊盘
1690
+ const x = 3000 + Math.floor(Math.random() * 100000);
1691
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 90, ['OVAL', 80, 40], '', null, 0, 0, 0, false, 0);
1692
+
1693
+ // 2. 读取旋转角度
1694
+ const rotation = pad.getState_Rotation();
1695
+
1696
+ // 3. 清理测试图元(查询类案例不留测试对象)
1697
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1698
+
1699
+ console.log('rotation:', rotation);
1700
+ ```
1701
+
1702
+ ### getstate_soldermaskandpastemaskexpansion
1703
+
1704
+ # IPCB\_PrimitivePad.getState\_SolderMaskAndPasteMaskExpansion() method
1705
+
1706
+ Get the property state: solder mask / paste mask expansion
1707
+
1708
+ ## Signature
1709
+
1710
+ ```typescript
1711
+ function getState_SolderMaskAndPasteMaskExpansion(): IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;
1712
+ ```
1713
+
1714
+ ## Returns
1715
+
1716
+ [IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
1717
+
1718
+ Solder mask / paste mask expansion
1719
+
1720
+ ## Example
1721
+
1722
+ ```javascript
1723
+ // 1. 生成本次运行专用的坐标,创建一个自定义扩展的贴片焊盘和一个默认焊盘
1724
+ const x = 3000 + Math.floor(Math.random() * 100000);
1725
+ const customized = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0, undefined, { topSolderMask: 4, topPasteMask: 2 });
1726
+ const plain = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1727
+
1728
+ // 2. 分别读取扩展配置
1729
+ const customizedExpansion = customized.getState_SolderMaskAndPasteMaskExpansion();
1730
+ const plainExpansion = plain.getState_SolderMaskAndPasteMaskExpansion();
1731
+
1732
+ // 3. 清理测试图元(查询类案例不留测试对象)
1733
+ await eda.pcb_PrimitivePad.delete([customized.getState_PrimitiveId(), plain.getState_PrimitiveId()]);
1734
+
1735
+ console.log('customizedExpansion:', customizedExpansion);
1736
+ console.log('plainExpansion:', plainExpansion);
1737
+ ```
1738
+
1739
+ ### getstate_specialpad
1740
+
1741
+ # IPCB\_PrimitivePad.getState\_SpecialPad() method
1742
+
1743
+ Get the property state: special pad shape
1744
+
1745
+ ## Signature
1746
+
1747
+ ```typescript
1748
+ function getState_SpecialPad(): TPCB_PrimitiveSpecialPadShape | undefined;
1749
+ ```
1750
+
1751
+ ## Returns
1752
+
1753
+ [TPCB\_PrimitiveSpecialPadShape](../types/TPCB_PrimitiveSpecialPadShape.md) \| undefined
1754
+
1755
+ Special pad shape
1756
+
1757
+ ## Example
1758
+
1759
+ ```javascript
1760
+ // 1. 生成本次运行专用的坐标,创建普通焊盘与创建时尝试带特殊外形的焊盘
1761
+ const x = 3000 + Math.floor(Math.random() * 100000);
1762
+ const plain = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1763
+ const attempted = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0, [[1, 1, ['ELLIPSE', 40, 40]]]);
1764
+
1765
+ // 2. 分别读取特殊焊盘外形
1766
+ const plainSpecial = plain.getState_SpecialPad();
1767
+ const attemptedSpecial = attempted.getState_SpecialPad();
1768
+
1769
+ // 3. 清理测试图元(查询类案例不留测试对象)
1770
+ await eda.pcb_PrimitivePad.delete([plain.getState_PrimitiveId(), attempted.getState_PrimitiveId()]);
1771
+
1772
+ console.log('plainSpecial:', plainSpecial);
1773
+ console.log('attemptedSpecial:', attemptedSpecial);
1774
+ console.log('normalShapeKept:', JSON.stringify(attempted.getState_Pad()) === JSON.stringify(['ELLIPSE', 60, 60]));
1775
+ ```
1776
+
1777
+ ### getstate_x
1778
+
1779
+ # IPCB\_PrimitivePad.getState\_X() method
1780
+
1781
+ Get the property state: X position
1782
+
1783
+ ## Signature
1784
+
1785
+ ```typescript
1786
+ function getState_X(): number;
1787
+ ```
1788
+
1789
+ ## Returns
1790
+
1791
+ number
1792
+
1793
+ X position
1794
+
1795
+ ## Example
1796
+
1797
+ ```javascript
1798
+ // 1. 生成本次运行专用的坐标,创建一个贴片焊盘
1799
+ const x = 3000 + Math.floor(Math.random() * 100000);
1800
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1801
+
1802
+ // 2. 读取位置 X
1803
+ const posX = pad.getState_X();
1804
+
1805
+ // 3. 清理测试图元(查询类案例不留测试对象)
1806
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1807
+
1808
+ console.log('posX:', posX);
1809
+ ```
1810
+
1811
+ ### getstate_y
1812
+
1813
+ # IPCB\_PrimitivePad.getState\_Y() method
1814
+
1815
+ Get the property state: Y position
1816
+
1817
+ ## Signature
1818
+
1819
+ ```typescript
1820
+ function getState_Y(): number;
1821
+ ```
1822
+
1823
+ ## Returns
1824
+
1825
+ number
1826
+
1827
+ Y position
1828
+
1829
+ ## Example
1830
+
1831
+ ```javascript
1832
+ // 1. 生成本次运行专用的坐标,创建一个贴片焊盘
1833
+ const x = 3000 + Math.floor(Math.random() * 100000);
1834
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3500, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1835
+
1836
+ // 2. 读取位置 Y
1837
+ const posY = pad.getState_Y();
1838
+
1839
+ // 3. 清理测试图元(查询类案例不留测试对象)
1840
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1841
+
1842
+ console.log('posY:', posY);
1843
+ ```
1844
+
1845
+ ### isasync
1846
+
1847
+ # IPCB\_PrimitivePad.isAsync() method
1848
+
1849
+ Query whether the primitive is an async primitive
1850
+
1851
+ ## Signature
1852
+
1853
+ ```typescript
1854
+ function isAsync(): boolean;
1855
+ ```
1856
+
1857
+ ## Returns
1858
+
1859
+ boolean
1860
+
1861
+ Whether Is async primitive
1862
+
1863
+ ## Example
1864
+
1865
+ ```javascript
1866
+ // 1. 在顶层放置一个圆形贴片焊盘
1867
+ const x = 3000 + Math.floor(Math.random() * 100000);
1868
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1869
+
1870
+ // 2. 读取创建后的模式
1871
+ const afterCreate = pad.isAsync();
1872
+
1873
+ // 3. 切换模式再各读一次
1874
+ const afterToSync = pad.toSync().isAsync();
1875
+ const afterToAsync = pad.toAsync().isAsync();
1876
+
1877
+ // 4. 清理测试图元(查询类案例不留测试对象)
1878
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1879
+
1880
+ console.log('afterCreate:', afterCreate);
1881
+ console.log('afterToSync:', afterToSync);
1882
+ console.log('afterToAsync:', afterToAsync);
1883
+ ```
1884
+
1885
+ ### reset
1886
+
1887
+ # IPCB\_PrimitivePad.reset() method
1888
+
1889
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1890
+
1891
+ Reset the async primitive to the current canvas state
1892
+
1893
+ ## Signature
1894
+
1895
+ ```typescript
1896
+ function reset(): Promise<IPCB_PrimitivePad>;
1897
+ ```
1898
+
1899
+ ## Returns
1900
+
1901
+ Promise&lt;[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->&gt;
1902
+
1903
+ Pad primitive object
1904
+
1905
+ ## Example
1906
+
1907
+ ```javascript
1908
+ // 1. 在顶层放置一个未旋转的圆形贴片焊盘
1909
+ const x = 3000 + Math.floor(Math.random() * 100000);
1910
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1911
+
1912
+ // 2. 异步模式下把旋转改成 45 度(尚未提交)
1913
+ const a = pad.toAsync();
1914
+ a.setState_Rotation(45);
1915
+
1916
+ // 3. 重置:丢弃未提交的修改,回到画布当前状态
1917
+ await a.reset();
1918
+
1919
+ // 4. 从画布重新读取,确认旋转仍是 0(reset 后要以重新 get() 的结果为准)
1920
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
1921
+
1922
+ // 5. 清理测试图元
1923
+ await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
1924
+
1925
+ console.log('rotationAfterReset:', ref.getState_Rotation());
1926
+ ```
1927
+
1928
+ ### setstate_heatwelding
1929
+
1930
+ # IPCB\_PrimitivePad.setState\_HeatWelding() method
1931
+
1932
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1933
+
1934
+ Set the property state: thermal relief optimization parameters
1935
+
1936
+ ## Signature
1937
+
1938
+ ```typescript
1939
+ function setState_HeatWelding(heatWelding: IPCB_PrimitivePadHeatWelding | null): IPCB_PrimitivePad;
1940
+ ```
1941
+
1942
+ ## Parameters
1943
+
1944
+ <table><thead><tr><th>
1945
+
1946
+ Parameter
1947
+
1948
+ </th><th>
1949
+
1950
+ Type
1951
+
1952
+ </th><th>
1953
+
1954
+ Description
1955
+
1956
+ </th></tr></thead>
1957
+ <tbody><tr><td>
1958
+
1959
+ heatWelding
1960
+
1961
+ </td><td>
1962
+
1963
+ [IPCB\_PrimitivePadHeatWelding](../interfaces/IPCB_PrimitivePadHeatWelding.md) \| null
1964
+
1965
+ </td><td>
1966
+
1967
+ Thermal relief optimization parameters
1968
+
1969
+ </td></tr>
1970
+ </tbody></table>
1971
+
1972
+ ## Returns
1973
+
1974
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
1975
+
1976
+ Pad primitive object
1977
+
1978
+ ## Example
1979
+
1980
+ ```javascript
1981
+ // 1. 生成本次运行专用的坐标,创建一个无热焊参数的贴片焊盘
1982
+ const x = 3000 + Math.floor(Math.random() * 100000);
1983
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
1984
+ const before = pad.getState_HeatWelding();
1985
+
1986
+ // 2. 异步模式下配置发散式热焊参数并提交
1987
+ const a = pad.toAsync();
1988
+ a.setState_HeatWelding({ connectionMethod: 'Divergent', divergenceSpacing: 10, divergenceLineWidth: 8, divergenceAngle: 45 });
1989
+ await a.done();
1990
+
1991
+ // 3. 从图元对象读取配置结果(保留现场供观察)
1992
+ const after = pad.getState_HeatWelding();
1993
+
1994
+ console.log('heatWelding:', before, '→', after);
1995
+ ```
1996
+
1997
+ ### setstate_hole
1998
+
1999
+ # IPCB\_PrimitivePad.setState\_Hole() method
2000
+
2001
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2002
+
2003
+ Set the property state: hole
2004
+
2005
+ ## Signature
2006
+
2007
+ ```typescript
2008
+ function setState_Hole(hole: TPCB_PrimitivePadHole): IPCB_PrimitivePad;
2009
+ ```
2010
+
2011
+ ## Parameters
2012
+
2013
+ <table><thead><tr><th>
2014
+
2015
+ Parameter
2016
+
2017
+ </th><th>
2018
+
2019
+ Type
2020
+
2021
+ </th><th>
2022
+
2023
+ Description
2024
+
2025
+ </th></tr></thead>
2026
+ <tbody><tr><td>
2027
+
2028
+ hole
2029
+
2030
+ </td><td>
2031
+
2032
+ [TPCB\_PrimitivePadHole](../types/TPCB_PrimitivePadHole.md)
2033
+
2034
+ </td><td>
2035
+
2036
+ Pad drilling
2037
+
2038
+ </td></tr>
2039
+ </tbody></table>
2040
+
2041
+ ## Returns
2042
+
2043
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2044
+
2045
+ Pad primitive object
2046
+
2047
+ ## Remarks
2048
+
2049
+ When setting the hole, some other property states will be set in conjunction:
2050
+
2051
+ 1. The layer will be forcibly switched to multi-layer
2052
+
2053
+ This API cannot set the hole to `null`<!-- -->. If you want to remove the hole property, use the [setState\_Layer](./IPCB_PrimitivePad.md) method to switch the layer to the top or bottom layer
2054
+
2055
+ ## Example
2056
+
2057
+ ```javascript
2058
+ // 1. 生成本次运行专用的坐标,创建一个无孔的贴片焊盘
2059
+ const x = 3000 + Math.floor(Math.random() * 100000);
2060
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', null, 0, 0, 0, false, 0);
2061
+ const beforeHole = pad.getState_Hole();
2062
+
2063
+ // 2. 异步模式下设置 35mil 圆孔并提交
2064
+ const a = pad.toAsync();
2065
+ a.setState_Hole(['ROUND', 35]);
2066
+ await a.done();
2067
+
2068
+ // 3. 从画布重新读取,确认孔已生效且层被联动切到多层(保留现场供观察)
2069
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2070
+
2071
+ console.log('hole:', beforeHole, '→', ref.getState_Hole());
2072
+ console.log('layer:', ref.getState_Layer());
2073
+ ```
2074
+
2075
+ ### setstate_holeoffsetx
2076
+
2077
+ # IPCB\_PrimitivePad.setState\_HoleOffsetX() method
2078
+
2079
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2080
+
2081
+ Set the property state: hole offset X
2082
+
2083
+ ## Signature
2084
+
2085
+ ```typescript
2086
+ function setState_HoleOffsetX(holeOffsetX: number): IPCB_PrimitivePad;
2087
+ ```
2088
+
2089
+ ## Parameters
2090
+
2091
+ <table><thead><tr><th>
2092
+
2093
+ Parameter
2094
+
2095
+ </th><th>
2096
+
2097
+ Type
2098
+
2099
+ </th><th>
2100
+
2101
+ Description
2102
+
2103
+ </th></tr></thead>
2104
+ <tbody><tr><td>
2105
+
2106
+ holeOffsetX
2107
+
2108
+ </td><td>
2109
+
2110
+ number
2111
+
2112
+ </td><td>
2113
+
2114
+ Hole offset X
2115
+
2116
+ </td></tr>
2117
+ </tbody></table>
2118
+
2119
+ ## Returns
2120
+
2121
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2122
+
2123
+ Pad primitive object
2124
+
2125
+ ## Remarks
2126
+
2127
+ If the hole does not exist, the property will not be modified
2128
+
2129
+ ## Example
2130
+
2131
+ ```javascript
2132
+ // 1. 生成本次运行专用的坐标,创建一个中心孔的通孔焊盘
2133
+ const x = 3000 + Math.floor(Math.random() * 100000);
2134
+ const pad = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 0, 0, false, 0);
2135
+ const before = pad.getState_HoleOffsetX();
2136
+
2137
+ // 2. 异步模式下把孔向右偏移 10mil 并提交
2138
+ const a = pad.toAsync();
2139
+ a.setState_HoleOffsetX(10);
2140
+ await a.done();
2141
+
2142
+ // 3. 从画布重新读取,确认偏移已生效(保留现场供观察)
2143
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2144
+
2145
+ console.log('holeOffsetX:', before, '→', ref.getState_HoleOffsetX());
2146
+ ```
2147
+
2148
+ ### setstate_holeoffsety
2149
+
2150
+ # IPCB\_PrimitivePad.setState\_HoleOffsetY() method
2151
+
2152
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2153
+
2154
+ Set the property state: hole offset Y
2155
+
2156
+ ## Signature
2157
+
2158
+ ```typescript
2159
+ function setState_HoleOffsetY(holeOffsetY: number): IPCB_PrimitivePad;
2160
+ ```
2161
+
2162
+ ## Parameters
2163
+
2164
+ <table><thead><tr><th>
2165
+
2166
+ Parameter
2167
+
2168
+ </th><th>
2169
+
2170
+ Type
2171
+
2172
+ </th><th>
2173
+
2174
+ Description
2175
+
2176
+ </th></tr></thead>
2177
+ <tbody><tr><td>
2178
+
2179
+ holeOffsetY
2180
+
2181
+ </td><td>
2182
+
2183
+ number
2184
+
2185
+ </td><td>
2186
+
2187
+ Hole offset Y
2188
+
2189
+ </td></tr>
2190
+ </tbody></table>
2191
+
2192
+ ## Returns
2193
+
2194
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2195
+
2196
+ Pad primitive object
2197
+
2198
+ ## Remarks
2199
+
2200
+ If the hole does not exist, the property will not be modified
2201
+
2202
+ ## Example
2203
+
2204
+ ```javascript
2205
+ // 1. 生成本次运行专用的坐标,创建一个中心孔的通孔焊盘
2206
+ const x = 3000 + Math.floor(Math.random() * 100000);
2207
+ const pad = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 0, 0, false, 0);
2208
+ const before = pad.getState_HoleOffsetY();
2209
+
2210
+ // 2. 异步模式下把孔向上偏移 20mil 并提交
2211
+ const a = pad.toAsync();
2212
+ a.setState_HoleOffsetY(20);
2213
+ await a.done();
2214
+
2215
+ // 3. 从画布重新读取,确认偏移已生效(保留现场供观察)
2216
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2217
+
2218
+ console.log('holeOffsetY:', before, '→', ref.getState_HoleOffsetY());
2219
+ ```
2220
+
2221
+ ### setstate_holerotation
2222
+
2223
+ # IPCB\_PrimitivePad.setState\_HoleRotation() method
2224
+
2225
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2226
+
2227
+ Set the property state: Rotation angle of the hole relative to the pad
2228
+
2229
+ ## Signature
2230
+
2231
+ ```typescript
2232
+ function setState_HoleRotation(holeRotation: number): IPCB_PrimitivePad;
2233
+ ```
2234
+
2235
+ ## Parameters
2236
+
2237
+ <table><thead><tr><th>
2238
+
2239
+ Parameter
2240
+
2241
+ </th><th>
2242
+
2243
+ Type
2244
+
2245
+ </th><th>
2246
+
2247
+ Description
2248
+
2249
+ </th></tr></thead>
2250
+ <tbody><tr><td>
2251
+
2252
+ holeRotation
2253
+
2254
+ </td><td>
2255
+
2256
+ number
2257
+
2258
+ </td><td>
2259
+
2260
+ Rotation angle of the hole relative to the pad
2261
+
2262
+ </td></tr>
2263
+ </tbody></table>
2264
+
2265
+ ## Returns
2266
+
2267
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2268
+
2269
+ Pad primitive object
2270
+
2271
+ ## Remarks
2272
+
2273
+ If the hole does not exist, the property will not be modified
2274
+
2275
+ ## Example
2276
+
2277
+ ```javascript
2278
+ // 1. 生成本次运行专用的坐标,创建一个插槽通孔焊盘(槽未旋转)
2279
+ const x = 3000 + Math.floor(Math.random() * 100000);
2280
+ const pad = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['SLOT', 30, 80], 0, 0, 0, false, 0);
2281
+ const before = pad.getState_HoleRotation();
2282
+
2283
+ // 2. 异步模式下把孔旋转 45 度并提交
2284
+ const a = pad.toAsync();
2285
+ a.setState_HoleRotation(45);
2286
+ await a.done();
2287
+
2288
+ // 3. 从画布重新读取,确认旋转已生效(保留现场供观察)
2289
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2290
+
2291
+ console.log('holeRotation:', before, '→', ref.getState_HoleRotation());
2292
+ ```
2293
+
2294
+ ### setstate_layer
2295
+
2296
+ # IPCB\_PrimitivePad.setState\_Layer() method
2297
+
2298
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2299
+
2300
+ Set the property state: Layer
2301
+
2302
+ ## Signature
2303
+
2304
+ ```typescript
2305
+ function setState_Layer(layer: TPCB_LayersOfPad): IPCB_PrimitivePad;
2306
+ ```
2307
+
2308
+ ## Parameters
2309
+
2310
+ <table><thead><tr><th>
2311
+
2312
+ Parameter
2313
+
2314
+ </th><th>
2315
+
2316
+ Type
2317
+
2318
+ </th><th>
2319
+
2320
+ Description
2321
+
2322
+ </th></tr></thead>
2323
+ <tbody><tr><td>
2324
+
2325
+ layer
2326
+
2327
+ </td><td>
2328
+
2329
+ [TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
2330
+
2331
+ </td><td>
2332
+
2333
+ Layer
2334
+
2335
+ </td></tr>
2336
+ </tbody></table>
2337
+
2338
+ ## Returns
2339
+
2340
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2341
+
2342
+ Pad primitive object
2343
+
2344
+ ## Remarks
2345
+
2346
+ When setting the layer, some other property states will be set in conjunction:
2347
+
2348
+ 1. When switching between the top and bottom layers: the solder mask/paste mask expansion properties will switch accordingly, and the data values remain unchanged
2349
+
2350
+ 2. When switching from multi-layer to single layer: it determines whether to switch to the top or bottom layer, and the solder mask/paste mask expansion properties will only keep the data corresponding to the specified layer. If a special pad exists, it will be converted to a normal pad property, and only the data corresponding to the specified layer will be kept. Hole-related properties will be reset to their default values
2351
+
2352
+ 3. When switching from single layer to multi-layer: the solder mask/paste mask expansion properties will only keep the solder mask expansion, and the original data will be copied and applied to the top and bottom layers. The pad drilling property will be assigned a specified value: a rounded rectangle whose length and width are 60% of the pad diameter (for rounded or regular polygon pads) or the pad width (for rectangular pads). Data-wise it is a rounded rectangle, but actually it is a circle. If the pad is a polyline complex polygon, the data is calculated through a dedicated algorithm (usually abstract; it is recommended to modify it later)
2353
+
2354
+ ## Example
2355
+
2356
+ ```javascript
2357
+ // 1. 生成本次运行专用的坐标,在顶层创建一个贴片焊盘
2358
+ const x = 3000 + Math.floor(Math.random() * 100000);
2359
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
2360
+ const before = pad.getState_Layer();
2361
+
2362
+ // 2. 异步模式下切换到底层并提交
2363
+ const a = pad.toAsync();
2364
+ a.setState_Layer(2);
2365
+ await a.done();
2366
+
2367
+ // 3. 从画布重新读取,确认层已切换(保留现场供观察)
2368
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2369
+
2370
+ console.log('layer:', before, '→', ref.getState_Layer());
2371
+ ```
2372
+
2373
+ ### setstate_metallization
2374
+
2375
+ # IPCB\_PrimitivePad.setState\_Metallization() method
2376
+
2377
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2378
+
2379
+ Set the property state: Whether the hole wall is plated
2380
+
2381
+ ## Signature
2382
+
2383
+ ```typescript
2384
+ function setState_Metallization(metallization: boolean): IPCB_PrimitivePad;
2385
+ ```
2386
+
2387
+ ## Parameters
2388
+
2389
+ <table><thead><tr><th>
2390
+
2391
+ Parameter
2392
+
2393
+ </th><th>
2394
+
2395
+ Type
2396
+
2397
+ </th><th>
2398
+
2399
+ Description
2400
+
2401
+ </th></tr></thead>
2402
+ <tbody><tr><td>
2403
+
2404
+ metallization
2405
+
2406
+ </td><td>
2407
+
2408
+ boolean
2409
+
2410
+ </td><td>
2411
+
2412
+ Whether the hole wall is plated
2413
+
2414
+ </td></tr>
2415
+ </tbody></table>
2416
+
2417
+ ## Returns
2418
+
2419
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2420
+
2421
+ Pad primitive object
2422
+
2423
+ ## Remarks
2424
+
2425
+ If the hole does not exist, the property will not be modified
2426
+
2427
+ ## Example
2428
+
2429
+ ```javascript
2430
+ // 1. 生成本次运行专用的坐标,创建一个非金属化的通孔焊盘
2431
+ const x = 3000 + Math.floor(Math.random() * 100000);
2432
+ const pad = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 0, 0, false, 0);
2433
+ const before = pad.getState_Metallization();
2434
+
2435
+ // 2. 异步模式下打开金属化并提交
2436
+ const a = pad.toAsync();
2437
+ a.setState_Metallization(true);
2438
+ await a.done();
2439
+
2440
+ // 3. 从画布重新读取,确认金属化已生效(保留现场供观察)
2441
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2442
+
2443
+ console.log('metallization:', before, '→', ref.getState_Metallization());
2444
+ ```
2445
+
2446
+ ### setstate_net
2447
+
2448
+ # IPCB\_PrimitivePad.setState\_Net() method
2449
+
2450
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2451
+
2452
+ Set the property state: net
2453
+
2454
+ ## Signature
2455
+
2456
+ ```typescript
2457
+ function setState_Net(net?: string): IPCB_PrimitivePad;
2458
+ ```
2459
+
2460
+ ## Parameters
2461
+
2462
+ <table><thead><tr><th>
2463
+
2464
+ Parameter
2465
+
2466
+ </th><th>
2467
+
2468
+ Type
2469
+
2470
+ </th><th>
2471
+
2472
+ Description
2473
+
2474
+ </th></tr></thead>
2475
+ <tbody><tr><td>
2476
+
2477
+ net
2478
+
2479
+ </td><td>
2480
+
2481
+ string
2482
+
2483
+ </td><td>
2484
+
2485
+ _(Optional)_ Net name
2486
+
2487
+ </td></tr>
2488
+ </tbody></table>
2489
+
2490
+ ## Returns
2491
+
2492
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2493
+
2494
+ Pad primitive object
2495
+
2496
+ ## Remarks
2497
+
2498
+ This API is only available in the PCB editor. Both an empty string and `undefined` are treated as an empty net
2499
+
2500
+ ## Example
2501
+
2502
+ ```javascript
2503
+ // 1. 生成本次运行专用的坐标,创建一个无网络的贴片焊盘
2504
+ const x = 3000 + Math.floor(Math.random() * 100000);
2505
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
2506
+ const before = pad.getState_Net();
2507
+
2508
+ // 2. 异步模式下挂载网络并提交
2509
+ const a = pad.toAsync();
2510
+ a.setState_Net('嘉立创示例_NET1');
2511
+ await a.done();
2512
+
2513
+ // 3. 从画布重新读取,确认网络已挂载(保留现场供观察)
2514
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2515
+
2516
+ console.log('net:', before, '→', ref.getState_Net());
2517
+ ```
2518
+
2519
+ ### setstate_pad
2520
+
2521
+ # IPCB\_PrimitivePad.setState\_Pad() method
2522
+
2523
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2524
+
2525
+ Set the property state: pad shape
2526
+
2527
+ ## Signature
2528
+
2529
+ ```typescript
2530
+ function setState_Pad(pad: TPCB_PrimitivePadShape): IPCB_PrimitivePad;
2531
+ ```
2532
+
2533
+ ## Parameters
2534
+
2535
+ <table><thead><tr><th>
2536
+
2537
+ Parameter
2538
+
2539
+ </th><th>
2540
+
2541
+ Type
2542
+
2543
+ </th><th>
2544
+
2545
+ Description
2546
+
2547
+ </th></tr></thead>
2548
+ <tbody><tr><td>
2549
+
2550
+ pad
2551
+
2552
+ </td><td>
2553
+
2554
+ [TPCB\_PrimitivePadShape](../types/TPCB_PrimitivePadShape.md)
2555
+
2556
+ </td><td>
2557
+
2558
+ Pad shape
2559
+
2560
+ </td></tr>
2561
+ </tbody></table>
2562
+
2563
+ ## Returns
2564
+
2565
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2566
+
2567
+ Pad primitive object
2568
+
2569
+ ## Remarks
2570
+
2571
+ When setting the pad shape, some other property states will be set in conjunction:
2572
+
2573
+ 1. The special pad shape property will be cleared
2574
+
2575
+ ## Example
2576
+
2577
+ ```javascript
2578
+ // 1. 生成本次运行专用的坐标,创建一个圆形贴片焊盘
2579
+ const x = 3000 + Math.floor(Math.random() * 100000);
2580
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
2581
+ const before = pad.getState_Pad();
2582
+
2583
+ // 2. 异步模式下改成 80 x 50 矩形并提交
2584
+ const a = pad.toAsync();
2585
+ a.setState_Pad(['RECT', 80, 50, 0]);
2586
+ await a.done();
2587
+
2588
+ // 3. 从画布重新读取,确认外形已更新(保留现场供观察)
2589
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2590
+
2591
+ console.log('padShape:', before, '→', ref.getState_Pad());
2592
+ ```
2593
+
2594
+ ### setstate_padnumber
2595
+
2596
+ # IPCB\_PrimitivePad.setState\_PadNumber() method
2597
+
2598
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2599
+
2600
+ Set the property state: pad number
2601
+
2602
+ ## Signature
2603
+
2604
+ ```typescript
2605
+ function setState_PadNumber(padNumber: string): IPCB_PrimitivePad;
2606
+ ```
2607
+
2608
+ ## Parameters
2609
+
2610
+ <table><thead><tr><th>
2611
+
2612
+ Parameter
2613
+
2614
+ </th><th>
2615
+
2616
+ Type
2617
+
2618
+ </th><th>
2619
+
2620
+ Description
2621
+
2622
+ </th></tr></thead>
2623
+ <tbody><tr><td>
2624
+
2625
+ padNumber
2626
+
2627
+ </td><td>
2628
+
2629
+ string
2630
+
2631
+ </td><td>
2632
+
2633
+ Pad number
2634
+
2635
+ </td></tr>
2636
+ </tbody></table>
2637
+
2638
+ ## Returns
2639
+
2640
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2641
+
2642
+ Pad primitive object
2643
+
2644
+ ## Example
2645
+
2646
+ ```javascript
2647
+ // 1. 生成本次运行专用的坐标,创建一个编号为 '1' 的贴片焊盘
2648
+ const x = 3000 + Math.floor(Math.random() * 100000);
2649
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
2650
+ const before = pad.getState_PadNumber();
2651
+
2652
+ // 2. 异步模式下修改编号并提交
2653
+ const a = pad.toAsync();
2654
+ a.setState_PadNumber('嘉立创示例_A1');
2655
+ await a.done();
2656
+
2657
+ // 3. 从画布重新读取,确认编号已更新(保留现场供观察)
2658
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2659
+
2660
+ console.log('padNumber:', before, '→', ref.getState_PadNumber());
2661
+ ```
2662
+
2663
+ ### setstate_primitivelock
2664
+
2665
+ # IPCB\_PrimitivePad.setState\_PrimitiveLock() method
2666
+
2667
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2668
+
2669
+ Set the property state: whether it is locked
2670
+
2671
+ ## Signature
2672
+
2673
+ ```typescript
2674
+ function setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitivePad;
2675
+ ```
2676
+
2677
+ ## Parameters
2678
+
2679
+ <table><thead><tr><th>
2680
+
2681
+ Parameter
2682
+
2683
+ </th><th>
2684
+
2685
+ Type
2686
+
2687
+ </th><th>
2688
+
2689
+ Description
2690
+
2691
+ </th></tr></thead>
2692
+ <tbody><tr><td>
2693
+
2694
+ primitiveLock
2695
+
2696
+ </td><td>
2697
+
2698
+ boolean
2699
+
2700
+ </td><td>
2701
+
2702
+ Whether it is locked
2703
+
2704
+ </td></tr>
2705
+ </tbody></table>
2706
+
2707
+ ## Returns
2708
+
2709
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2710
+
2711
+ Pad primitive object
2712
+
2713
+ ## Example
2714
+
2715
+ ```javascript
2716
+ // 1. 生成本次运行专用的坐标,创建一个未锁定的贴片焊盘
2717
+ const x = 3000 + Math.floor(Math.random() * 100000);
2718
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
2719
+ const before = pad.getState_PrimitiveLock();
2720
+
2721
+ // 2. 异步模式下锁定焊盘并提交
2722
+ const a = pad.toAsync();
2723
+ a.setState_PrimitiveLock(true);
2724
+ await a.done();
2725
+
2726
+ // 3. 从画布重新读取,确认锁定状态已生效(保留现场供观察)
2727
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2728
+
2729
+ console.log('primitiveLock:', before, '→', ref.getState_PrimitiveLock());
2730
+ ```
2731
+
2732
+ ### setstate_rotation
2733
+
2734
+ # IPCB\_PrimitivePad.setState\_Rotation() method
2735
+
2736
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2737
+
2738
+ Set the property state: rotation angle
2739
+
2740
+ ## Signature
2741
+
2742
+ ```typescript
2743
+ function setState_Rotation(rotation: number): IPCB_PrimitivePad;
2744
+ ```
2745
+
2746
+ ## Parameters
2747
+
2748
+ <table><thead><tr><th>
2749
+
2750
+ Parameter
2751
+
2752
+ </th><th>
2753
+
2754
+ Type
2755
+
2756
+ </th><th>
2757
+
2758
+ Description
2759
+
2760
+ </th></tr></thead>
2761
+ <tbody><tr><td>
2762
+
2763
+ rotation
2764
+
2765
+ </td><td>
2766
+
2767
+ number
2768
+
2769
+ </td><td>
2770
+
2771
+ Rotation angle
2772
+
2773
+ </td></tr>
2774
+ </tbody></table>
2775
+
2776
+ ## Returns
2777
+
2778
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2779
+
2780
+ Pad primitive object
2781
+
2782
+ ## Example
2783
+
2784
+ ```javascript
2785
+ // 1. 生成本次运行专用的坐标,创建一个未旋转的长圆形焊盘
2786
+ const x = 3000 + Math.floor(Math.random() * 100000);
2787
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['OVAL', 80, 40], '', null, 0, 0, 0, false, 0);
2788
+ const before = pad.getState_Rotation();
2789
+
2790
+ // 2. 异步模式下旋转 90 度并提交
2791
+ const a = pad.toAsync();
2792
+ a.setState_Rotation(90);
2793
+ await a.done();
2794
+
2795
+ // 3. 从画布重新读取,确认角度已更新(保留现场供观察)
2796
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2797
+
2798
+ console.log('rotation:', before, '→', ref.getState_Rotation());
2799
+ ```
2800
+
2801
+ ### setstate_soldermaskandpastemaskexpansion
2802
+
2803
+ # IPCB\_PrimitivePad.setState\_SolderMaskAndPasteMaskExpansion() method
2804
+
2805
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2806
+
2807
+ Set the property state: solder mask / paste mask expansion
2808
+
2809
+ ## Signature
2810
+
2811
+ ```typescript
2812
+ function setState_SolderMaskAndPasteMaskExpansion(
2813
+ solderMaskAndPasteMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null,
2814
+ ): IPCB_PrimitivePad;
2815
+ ```
2816
+
2817
+ ## Parameters
2818
+
2819
+ <table><thead><tr><th>
2820
+
2821
+ Parameter
2822
+
2823
+ </th><th>
2824
+
2825
+ Type
2826
+
2827
+ </th><th>
2828
+
2829
+ Description
2830
+
2831
+ </th></tr></thead>
2832
+ <tbody><tr><td>
2833
+
2834
+ solderMaskAndPasteMaskExpansion
2835
+
2836
+ </td><td>
2837
+
2838
+ [IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
2839
+
2840
+ </td><td>
2841
+
2842
+ Solder mask / paste mask expansion
2843
+
2844
+ </td></tr>
2845
+ </tbody></table>
2846
+
2847
+ ## Returns
2848
+
2849
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2850
+
2851
+ Pad primitive object
2852
+
2853
+ ## Example
2854
+
2855
+ ```javascript
2856
+ // 1. 生成本次运行专用的坐标,创建一个默认扩展(遵循规则)的贴片焊盘
2857
+ const x = 3000 + Math.floor(Math.random() * 100000);
2858
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
2859
+ const before = pad.getState_SolderMaskAndPasteMaskExpansion();
2860
+
2861
+ // 2. 异步模式下自定义顶层扩展并提交
2862
+ const a = pad.toAsync();
2863
+ a.setState_SolderMaskAndPasteMaskExpansion({ topSolderMask: 4, topPasteMask: 2 });
2864
+ await a.done();
2865
+
2866
+ // 3. 从画布重新读取,确认扩展已生效(未显式设置的项由后端补默认值)
2867
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
2868
+
2869
+ console.log('expansion:', before, '→', ref.getState_SolderMaskAndPasteMaskExpansion());
2870
+ ```
2871
+
2872
+ ### setstate_specialpad
2873
+
2874
+ # IPCB\_PrimitivePad.setState\_SpecialPad() method
2875
+
2876
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2877
+
2878
+ Set the property state: special pad shape
2879
+
2880
+ ## Signature
2881
+
2882
+ ```typescript
2883
+ function setState_SpecialPad(specialPad: TPCB_PrimitiveSpecialPadShape): IPCB_PrimitivePad;
2884
+ ```
2885
+
2886
+ ## Parameters
2887
+
2888
+ <table><thead><tr><th>
2889
+
2890
+ Parameter
2891
+
2892
+ </th><th>
2893
+
2894
+ Type
2895
+
2896
+ </th><th>
2897
+
2898
+ Description
2899
+
2900
+ </th></tr></thead>
2901
+ <tbody><tr><td>
2902
+
2903
+ specialPad
2904
+
2905
+ </td><td>
2906
+
2907
+ [TPCB\_PrimitiveSpecialPadShape](../types/TPCB_PrimitiveSpecialPadShape.md)
2908
+
2909
+ </td><td>
2910
+
2911
+ </td></tr>
2912
+ </tbody></table>
2913
+
2914
+ ## Returns
2915
+
2916
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2917
+
2918
+ Pad primitive object
2919
+
2920
+ ## Remarks
2921
+
2922
+ When setting the special pad shape, some other property states will be set in conjunction:
2923
+
2924
+ 1. The pad shape property will be cleared
2925
+
2926
+ ## Example
2927
+
2928
+ ```javascript
2929
+ // 1. 生成本次运行专用的坐标,创建一个普通贴片焊盘
2930
+ const x = 3000 + Math.floor(Math.random() * 100000);
2931
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
2932
+
2933
+ // 2. 调用设置接口(当前版本不产生任何效果)
2934
+ pad.setState_SpecialPad([[1, 1, ['ELLIPSE', 40, 40]]]);
2935
+
2936
+ // 3. 读取确认特殊外形未生效、普通外形保持不变
2937
+ const special = pad.getState_SpecialPad();
2938
+ const normalShape = pad.getState_Pad();
2939
+
2940
+ console.log('specialPadApplied:', special !== undefined);
2941
+ console.log('normalShapeKept:', JSON.stringify(normalShape) === JSON.stringify(['ELLIPSE', 60, 60]));
2942
+ ```
2943
+
2944
+ ### setstate_x
2945
+
2946
+ # IPCB\_PrimitivePad.setState\_X() method
2947
+
2948
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2949
+
2950
+ Set the property state: X position
2951
+
2952
+ ## Signature
2953
+
2954
+ ```typescript
2955
+ function setState_X(x: number): IPCB_PrimitivePad;
2956
+ ```
2957
+
2958
+ ## Parameters
2959
+
2960
+ <table><thead><tr><th>
2961
+
2962
+ Parameter
2963
+
2964
+ </th><th>
2965
+
2966
+ Type
2967
+
2968
+ </th><th>
2969
+
2970
+ Description
2971
+
2972
+ </th></tr></thead>
2973
+ <tbody><tr><td>
2974
+
2975
+ x
2976
+
2977
+ </td><td>
2978
+
2979
+ number
2980
+
2981
+ </td><td>
2982
+
2983
+ X position
2984
+
2985
+ </td></tr>
2986
+ </tbody></table>
2987
+
2988
+ ## Returns
2989
+
2990
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
2991
+
2992
+ Pad primitive object
2993
+
2994
+ ## Example
2995
+
2996
+ ```javascript
2997
+ // 1. 生成本次运行专用的坐标,创建一个贴片焊盘
2998
+ const x = 3000 + Math.floor(Math.random() * 100000);
2999
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
3000
+
3001
+ // 2. 异步模式下右移 200mil 并提交
3002
+ const a = pad.toAsync();
3003
+ a.setState_X(x + 200);
3004
+ await a.done();
3005
+
3006
+ // 3. 从画布重新读取,确认位置已更新(保留现场供观察)
3007
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
3008
+
3009
+ console.log('x:', x, '→', ref.getState_X());
3010
+ ```
3011
+
3012
+ ### setstate_y
3013
+
3014
+ # IPCB\_PrimitivePad.setState\_Y() method
3015
+
3016
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
3017
+
3018
+ Set the property state: Y position
3019
+
3020
+ ## Signature
3021
+
3022
+ ```typescript
3023
+ function setState_Y(y: number): IPCB_PrimitivePad;
3024
+ ```
3025
+
3026
+ ## Parameters
3027
+
3028
+ <table><thead><tr><th>
3029
+
3030
+ Parameter
3031
+
3032
+ </th><th>
3033
+
3034
+ Type
3035
+
3036
+ </th><th>
3037
+
3038
+ Description
3039
+
3040
+ </th></tr></thead>
3041
+ <tbody><tr><td>
3042
+
3043
+ y
3044
+
3045
+ </td><td>
3046
+
3047
+ number
3048
+
3049
+ </td><td>
3050
+
3051
+ Y position
3052
+
3053
+ </td></tr>
3054
+ </tbody></table>
3055
+
3056
+ ## Returns
3057
+
3058
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
3059
+
3060
+ Pad primitive object
3061
+
3062
+ ## Example
3063
+
3064
+ ```javascript
3065
+ // 1. 生成本次运行专用的坐标,创建一个贴片焊盘
3066
+ const x = 3000 + Math.floor(Math.random() * 100000);
3067
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
3068
+
3069
+ // 2. 异步模式下移 200mil 并提交
3070
+ const a = pad.toAsync();
3071
+ a.setState_Y(3000 + 200);
3072
+ await a.done();
3073
+
3074
+ // 3. 从画布重新读取,确认位置已更新(保留现场供观察)
3075
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
3076
+
3077
+ console.log('y:', 3000, '→', ref.getState_Y());
3078
+ ```
3079
+
3080
+ ### toasync
3081
+
3082
+ # IPCB\_PrimitivePad.toAsync() method
3083
+
3084
+ Convert Primitive to Async primitive
3085
+
3086
+ ## Signature
3087
+
3088
+ ```typescript
3089
+ function toAsync(): IPCB_PrimitivePad;
3090
+ ```
3091
+
3092
+ ## Returns
3093
+
3094
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
3095
+
3096
+ Pad primitive object
3097
+
3098
+ ## Example
3099
+
3100
+ ```javascript
3101
+ // 1. 在顶层放置一个圆形贴片焊盘
3102
+ const x = 3000 + Math.floor(Math.random() * 100000);
3103
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
3104
+
3105
+ // 2. 切换为异步图元(返回同一图元的异步形态)
3106
+ const asyncPad = pad.toAsync();
3107
+
3108
+ // 3. 在异步模式下修改位置并提交
3109
+ asyncPad.setState_X(x + 200);
3110
+ await asyncPad.done();
3111
+
3112
+ // 4. 从画布重新读取,确认修改已落画布(保留现场供观察)
3113
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
3114
+
3115
+ console.log('isAsync:', asyncPad.isAsync());
3116
+ console.log('x:', x, '→', ref.getState_X());
3117
+ ```
3118
+
3119
+ ### tosync
3120
+
3121
+ # IPCB\_PrimitivePad.toSync() method
3122
+
3123
+ Convert Primitive to Sync primitive
3124
+
3125
+ ## Signature
3126
+
3127
+ ```typescript
3128
+ function toSync(): IPCB_PrimitivePad;
3129
+ ```
3130
+
3131
+ ## Returns
3132
+
3133
+ [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
3134
+
3135
+ Pad primitive object
3136
+
3137
+ ## Example
3138
+
3139
+ ```javascript
3140
+ // 1. 在顶层放置一个圆形贴片焊盘
3141
+ const x = 3000 + Math.floor(Math.random() * 100000);
3142
+ const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
3143
+
3144
+ // 2. 切换为同步图元(返回同一图元的同步形态)
3145
+ const syncPad = pad.toSync();
3146
+
3147
+ // 3. 同步模式下直接修改位置,无需 done() 立即生效
3148
+ syncPad.setState_X(x + 300);
3149
+
3150
+ // 4. 从画布重新读取,确认修改已落画布(保留现场供观察)
3151
+ const ref = await eda.pcb_PrimitivePad.get(pad.getState_PrimitiveId());
3152
+
3153
+ console.log('isAsync:', syncPad.isAsync());
3154
+ console.log('x:', x, '→', ref.getState_X());
3155
+ ```