@windypro-rourou/dsh-eda 0.1.4 → 0.1.5

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 (483) hide show
  1. package/README.md +1 -1
  2. package/lib/capabilities.js +3 -2
  3. package/lib/client.js +33 -0
  4. package/lib/index.js +89 -2
  5. package/package.json +10 -1
  6. package/skill/INDEX.md +10 -8
  7. package/skill/README.md +125 -0
  8. package/skill/README.zh-Hans.md +125 -0
  9. package/skill/SKILL.md +746 -746
  10. package/skill/format/index.md +152 -152
  11. package/skill/format/pcb/3d.md +166 -166
  12. package/skill/format/pcb/attr.md +63 -63
  13. package/skill/format/pcb/common.md +306 -306
  14. package/skill/format/pcb/component.md +132 -132
  15. package/skill/format/pcb/dimension.md +58 -58
  16. package/skill/format/pcb/index.md +17 -17
  17. package/skill/format/pcb/obj.md +43 -43
  18. package/skill/format/pcb/pad_via.md +151 -151
  19. package/skill/format/pcb/panel.md +64 -64
  20. package/skill/format/pcb/partition.md +43 -43
  21. package/skill/format/pcb/primitive.md +196 -196
  22. package/skill/format/pcb/rule.md +71 -71
  23. package/skill/format/pcb/shape.md +441 -441
  24. package/skill/format/pcb/text.md +62 -62
  25. package/skill/format/project/blob.md +30 -30
  26. package/skill/format/project/common.md +42 -42
  27. package/skill/format/project/group.md +62 -62
  28. package/skill/format/project/index.md +12 -12
  29. package/skill/format/project/instance.md +32 -32
  30. package/skill/format/project/meta.md +189 -189
  31. package/skill/format/project/variant.md +30 -30
  32. package/skill/format/schematic/attr.md +41 -41
  33. package/skill/format/schematic/common.md +47 -47
  34. package/skill/format/schematic/component.md +91 -91
  35. package/skill/format/schematic/index.md +14 -14
  36. package/skill/format/schematic/obj.md +41 -41
  37. package/skill/format/schematic/pin.md +59 -59
  38. package/skill/format/schematic/shape.md +231 -231
  39. package/skill/format/schematic/structure.md +53 -53
  40. package/skill/format/schematic/table.md +109 -109
  41. package/skill/format/schematic/text.md +47 -47
  42. package/skill/format/schematic/wire.md +132 -132
  43. package/skill/guide/ancillary-projects/easyeda-api-sdk.md +1 -0
  44. package/skill/guide/ancillary-projects/pro-api-types.md +5 -5
  45. package/skill/guide/ancillary-projects.md +10 -10
  46. package/skill/guide/cli.md +1510 -0
  47. package/skill/guide/error-handling.md +38 -38
  48. package/skill/guide/extension-json.md +135 -135
  49. package/skill/guide/extensions-marketplace.md +61 -61
  50. package/skill/guide/how-to-start.md +316 -301
  51. package/skill/guide/i18n.md +57 -57
  52. package/skill/guide/index.md +7 -7
  53. package/skill/guide/inline-frame.md +20 -20
  54. package/skill/guide/invoke-apis.md +81 -81
  55. package/skill/guide/stability.md +37 -37
  56. package/skill/references/_index.md +471 -398
  57. package/skill/references/_quick-reference.md +3103 -3028
  58. package/skill/references/classes/DMT_Board.md +537 -533
  59. package/skill/references/classes/DMT_EditorControl.md +1736 -1736
  60. package/skill/references/classes/DMT_Event.md +356 -356
  61. package/skill/references/classes/DMT_Folder.md +775 -775
  62. package/skill/references/classes/DMT_Panel.md +531 -531
  63. package/skill/references/classes/DMT_Pcb.md +579 -575
  64. package/skill/references/classes/DMT_Project.md +734 -573
  65. package/skill/references/classes/DMT_Schematic.md +1482 -1477
  66. package/skill/references/classes/DMT_SelectControl.md +96 -96
  67. package/skill/references/classes/DMT_Team.md +172 -172
  68. package/skill/references/classes/DMT_Workspace.md +198 -198
  69. package/skill/references/classes/EDA.md +1001 -961
  70. package/skill/references/classes/IPCB_ComplexPolygon.md +299 -299
  71. package/skill/references/classes/IPCB_Polygon.md +175 -175
  72. package/skill/references/classes/IPCB_PrimitiveArc.md +1901 -1901
  73. package/skill/references/classes/IPCB_PrimitiveAttribute.md +2993 -2993
  74. package/skill/references/classes/IPCB_PrimitiveComponent.md +2624 -2627
  75. package/skill/references/classes/IPCB_PrimitiveComponentPad.md +410 -410
  76. package/skill/references/classes/IPCB_PrimitiveDimension.md +1419 -1419
  77. package/skill/references/classes/IPCB_PrimitiveFill.md +1325 -1325
  78. package/skill/references/classes/IPCB_PrimitiveImage.md +1461 -1461
  79. package/skill/references/classes/IPCB_PrimitiveLine.md +1639 -1639
  80. package/skill/references/classes/IPCB_PrimitiveObject.md +1700 -1700
  81. package/skill/references/classes/IPCB_PrimitivePad.md +3155 -3155
  82. package/skill/references/classes/IPCB_PrimitivePolyline.md +1193 -1193
  83. package/skill/references/classes/IPCB_PrimitivePour.md +1858 -1858
  84. package/skill/references/classes/IPCB_PrimitivePoured.md +556 -556
  85. package/skill/references/classes/IPCB_PrimitiveRegion.md +1332 -1332
  86. package/skill/references/classes/IPCB_PrimitiveString.md +2315 -2315
  87. package/skill/references/classes/IPCB_PrimitiveVia.md +1588 -1588
  88. package/skill/references/classes/ISCH_PrimitiveArc.md +1676 -1676
  89. package/skill/references/classes/ISCH_PrimitiveAttribute.md +2541 -2541
  90. package/skill/references/classes/ISCH_PrimitiveBus.md +973 -973
  91. package/skill/references/classes/ISCH_PrimitiveCbbSymbolComponent.md +260 -260
  92. package/skill/references/classes/ISCH_PrimitiveCircle.md +1392 -1392
  93. package/skill/references/classes/ISCH_PrimitiveComponent.md +2910 -2913
  94. package/skill/references/classes/ISCH_PrimitiveComponentPin.md +155 -155
  95. package/skill/references/classes/ISCH_PrimitiveObject.md +960 -960
  96. package/skill/references/classes/ISCH_PrimitivePin.md +2402 -2402
  97. package/skill/references/classes/ISCH_PrimitivePolygon.md +1028 -1028
  98. package/skill/references/classes/ISCH_PrimitiveRectangle.md +1777 -1777
  99. package/skill/references/classes/ISCH_PrimitiveText.md +1771 -1771
  100. package/skill/references/classes/ISCH_PrimitiveWire.md +973 -973
  101. package/skill/references/classes/LIB_3DModel.md +782 -780
  102. package/skill/references/classes/LIB_Cbb.md +957 -957
  103. package/skill/references/classes/LIB_Classification.md +969 -965
  104. package/skill/references/classes/LIB_Device.md +1222 -1221
  105. package/skill/references/classes/LIB_Footprint.md +1298 -1153
  106. package/skill/references/classes/LIB_LibrariesList.md +361 -329
  107. package/skill/references/classes/LIB_PanelLibrary.md +855 -855
  108. package/skill/references/classes/LIB_SelectControl.md +89 -89
  109. package/skill/references/classes/LIB_SimulationModel.md +807 -821
  110. package/skill/references/classes/LIB_Symbol.md +1341 -1195
  111. package/skill/references/classes/PCB_Document.md +1770 -1754
  112. package/skill/references/classes/PCB_Drc.md +3379 -3375
  113. package/skill/references/classes/PCB_Event.md +1166 -1081
  114. package/skill/references/classes/PCB_ImageTool.md +363 -0
  115. package/skill/references/classes/PCB_Layer.md +1915 -1911
  116. package/skill/references/classes/PCB_ManufactureData.md +2968 -2968
  117. package/skill/references/classes/PCB_MathPolygon.md +916 -785
  118. package/skill/references/classes/PCB_Net.md +1128 -1128
  119. package/skill/references/classes/PCB_Primitive.md +217 -217
  120. package/skill/references/classes/PCB_PrimitiveArc.md +820 -894
  121. package/skill/references/classes/PCB_PrimitiveAttribute.md +635 -717
  122. package/skill/references/classes/PCB_PrimitiveComponent.md +1050 -1050
  123. package/skill/references/classes/PCB_PrimitiveDimension.md +789 -833
  124. package/skill/references/classes/PCB_PrimitiveFill.md +783 -861
  125. package/skill/references/classes/PCB_PrimitiveImage.md +803 -875
  126. package/skill/references/classes/PCB_PrimitiveLine.md +787 -858
  127. package/skill/references/classes/PCB_PrimitiveObject.md +796 -800
  128. package/skill/references/classes/PCB_PrimitivePad.md +947 -944
  129. package/skill/references/classes/PCB_PrimitivePolyline.md +744 -819
  130. package/skill/references/classes/PCB_PrimitivePour.md +808 -845
  131. package/skill/references/classes/PCB_PrimitivePoured.md +363 -363
  132. package/skill/references/classes/PCB_PrimitiveRegion.md +765 -799
  133. package/skill/references/classes/PCB_PrimitiveString.md +828 -910
  134. package/skill/references/classes/PCB_PrimitiveVia.md +761 -765
  135. package/skill/references/classes/PCB_RayTracerEngine.md +603 -263
  136. package/skill/references/classes/PCB_SelectControl.md +495 -495
  137. package/skill/references/classes/PCB_Tool.md +9 -0
  138. package/skill/references/classes/PNL_Document.md +83 -83
  139. package/skill/references/classes/SCH_Document.md +797 -809
  140. package/skill/references/classes/SCH_Drc.md +246 -242
  141. package/skill/references/classes/SCH_Event.md +583 -583
  142. package/skill/references/classes/SCH_ManufactureData.md +1209 -1205
  143. package/skill/references/classes/SCH_Net.md +200 -200
  144. package/skill/references/classes/SCH_Netlist.md +191 -191
  145. package/skill/references/classes/SCH_Primitive.md +337 -337
  146. package/skill/references/classes/SCH_PrimitiveArc.md +686 -692
  147. package/skill/references/classes/SCH_PrimitiveAttribute.md +579 -590
  148. package/skill/references/classes/SCH_PrimitiveBus.md +618 -624
  149. package/skill/references/classes/SCH_PrimitiveCircle.md +667 -683
  150. package/skill/references/classes/SCH_PrimitiveComponent.md +2256 -2240
  151. package/skill/references/classes/SCH_PrimitiveObject.md +666 -666
  152. package/skill/references/classes/SCH_PrimitivePin.md +737 -754
  153. package/skill/references/classes/SCH_PrimitivePolygon.md +621 -627
  154. package/skill/references/classes/SCH_PrimitiveRectangle.md +715 -731
  155. package/skill/references/classes/SCH_PrimitiveText.md +736 -746
  156. package/skill/references/classes/SCH_PrimitiveWire.md +701 -703
  157. package/skill/references/classes/SCH_SelectControl.md +520 -520
  158. package/skill/references/classes/SCH_SimulationEngine.md +133 -133
  159. package/skill/references/classes/SCH_Utils.md +121 -121
  160. package/skill/references/classes/SYS_ClientUrl.md +173 -173
  161. package/skill/references/classes/SYS_Dialog.md +825 -825
  162. package/skill/references/classes/SYS_Environment.md +640 -502
  163. package/skill/references/classes/SYS_ExternalApi.md +246 -0
  164. package/skill/references/classes/SYS_FileManager.md +1664 -1686
  165. package/skill/references/classes/SYS_FileSystem.md +1366 -1171
  166. package/skill/references/classes/SYS_FontManager.md +224 -224
  167. package/skill/references/classes/SYS_FormatConversion.md +349 -349
  168. package/skill/references/classes/SYS_HeaderMenu.md +480 -479
  169. package/skill/references/classes/SYS_Help.md +141 -0
  170. package/skill/references/classes/SYS_I18n.md +861 -861
  171. package/skill/references/classes/SYS_IFrame.md +541 -535
  172. package/skill/references/classes/SYS_LoadingAndProgressBar.md +246 -246
  173. package/skill/references/classes/SYS_Log.md +422 -424
  174. package/skill/references/classes/SYS_Math.md +1565 -1565
  175. package/skill/references/classes/SYS_Message.md +363 -363
  176. package/skill/references/classes/SYS_MessageBox.md +285 -285
  177. package/skill/references/classes/SYS_MessageBus.md +1618 -1618
  178. package/skill/references/classes/SYS_PanelControl.md +696 -696
  179. package/skill/references/classes/SYS_RightClickMenu.md +175 -175
  180. package/skill/references/classes/SYS_Setting.md +134 -85
  181. package/skill/references/classes/SYS_ShortcutKey.md +623 -623
  182. package/skill/references/classes/SYS_Storage.md +484 -484
  183. package/skill/references/classes/SYS_Timer.md +447 -447
  184. package/skill/references/classes/SYS_ToastMessage.md +194 -194
  185. package/skill/references/classes/SYS_Tool.md +317 -241
  186. package/skill/references/classes/SYS_Unit.md +594 -594
  187. package/skill/references/classes/SYS_WebSocket.md +401 -401
  188. package/skill/references/classes/SYS_Window.md +849 -850
  189. package/skill/references/enums/EDMT_EditorDocumentType.md +324 -278
  190. package/skill/references/enums/EDMT_EditorSplitScreenDirection.md +51 -47
  191. package/skill/references/enums/EDMT_EditorTabEventType.md +68 -62
  192. package/skill/references/enums/EDMT_IndicatorMarkerType.md +90 -80
  193. package/skill/references/enums/EDMT_ItemType.md +181 -157
  194. package/skill/references/enums/EDMT_ProjectCollaborationMode.md +51 -47
  195. package/skill/references/enums/EDMT_ProjectFileFormat.md +60 -0
  196. package/skill/references/enums/EDMT_ProjectReadyState.md +82 -0
  197. package/skill/references/enums/ELIB_DeviceJlcLibraryCategory.md +51 -47
  198. package/skill/references/enums/ELIB_LibraryType.md +129 -113
  199. package/skill/references/enums/ELIB_PreviewType.md +77 -69
  200. package/skill/references/enums/ELIB_SimulationModelType.md +51 -47
  201. package/skill/references/enums/ELIB_SymbolType.md +142 -124
  202. package/skill/references/enums/EPCB_AutoRoutingCornerStyle.md +51 -47
  203. package/skill/references/enums/EPCB_AutoRoutingExistingPrimitiveMode.md +51 -47
  204. package/skill/references/enums/EPCB_AutoRoutingOptimization.md +51 -47
  205. package/skill/references/enums/EPCB_DocumentCanvasUpdateCalculationActiveStatus.md +51 -47
  206. package/skill/references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md +55 -51
  207. package/skill/references/enums/EPCB_InactiveLayerDisplayMode.md +64 -58
  208. package/skill/references/enums/EPCB_LayerColorConfiguration.md +90 -80
  209. package/skill/references/enums/EPCB_LayerId.md +1169 -881
  210. package/skill/references/enums/EPCB_LayerStatus.md +64 -58
  211. package/skill/references/enums/EPCB_LayerType.md +129 -113
  212. package/skill/references/enums/EPCB_MouseEventType.md +64 -58
  213. package/skill/references/enums/EPCB_NetEventType.md +64 -58
  214. package/skill/references/enums/EPCB_PcbPlateType.md +51 -47
  215. package/skill/references/enums/EPCB_PdfOutputMethod.md +64 -58
  216. package/skill/references/enums/EPCB_PrimitiveArcInteractiveMode.md +51 -47
  217. package/skill/references/enums/EPCB_PrimitiveDimensionType.md +64 -58
  218. package/skill/references/enums/EPCB_PrimitiveEventType.md +64 -58
  219. package/skill/references/enums/EPCB_PrimitiveFillMode.md +68 -62
  220. package/skill/references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md +64 -58
  221. package/skill/references/enums/EPCB_PrimitivePadHoleType.md +64 -58
  222. package/skill/references/enums/EPCB_PrimitivePadShapeType.md +90 -80
  223. package/skill/references/enums/EPCB_PrimitivePadType.md +64 -58
  224. package/skill/references/enums/EPCB_PrimitivePourFillMethod.md +64 -58
  225. package/skill/references/enums/EPCB_PrimitiveRegionRuleType.md +107 -95
  226. package/skill/references/enums/EPCB_PrimitiveStringAlignMode.md +142 -124
  227. package/skill/references/enums/EPCB_PrimitiveType.md +233 -201
  228. package/skill/references/enums/EPCB_PrimitiveViaType.md +64 -58
  229. package/skill/references/enums/ESCH_DynamicSimulationEnginePullEventType.md +116 -102
  230. package/skill/references/enums/ESCH_DynamicSimulationEnginePushEventType.md +90 -80
  231. package/skill/references/enums/ESCH_ExportDocumentFileType.md +64 -58
  232. package/skill/references/enums/ESCH_MouseEventType.md +51 -47
  233. package/skill/references/enums/ESCH_PrimitiveComponentType.md +142 -124
  234. package/skill/references/enums/ESCH_PrimitiveEventType.md +77 -69
  235. package/skill/references/enums/ESCH_PrimitiveFillStyle.md +129 -113
  236. package/skill/references/enums/ESCH_PrimitiveLineType.md +77 -69
  237. package/skill/references/enums/ESCH_PrimitivePinShape.md +77 -69
  238. package/skill/references/enums/ESCH_PrimitivePinType.md +168 -146
  239. package/skill/references/enums/ESCH_PrimitiveTextAlignMode.md +142 -124
  240. package/skill/references/enums/ESCH_PrimitiveType.md +207 -179
  241. package/skill/references/enums/ESCH_SimulationNetlistType.md +38 -36
  242. package/skill/references/enums/ESCH_SpiceSimulationEnginePullEventType.md +51 -47
  243. package/skill/references/enums/ESCH_SpiceSimulationEnginePushEventType.md +77 -69
  244. package/skill/references/enums/ESYS_BottomPanelTab.md +94 -80
  245. package/skill/references/enums/ESYS_HeaderMenuEnvironment.md +181 -157
  246. package/skill/references/enums/ESYS_ImportProjectBoardOutlineSource.md +55 -51
  247. package/skill/references/enums/ESYS_ImportProjectImportOption.md +64 -58
  248. package/skill/references/enums/ESYS_ImportProjectSchematicObjectStyle.md +51 -47
  249. package/skill/references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md +55 -51
  250. package/skill/references/enums/ESYS_JobState.md +95 -0
  251. package/skill/references/enums/ESYS_LeftPanelTab.md +94 -80
  252. package/skill/references/enums/ESYS_LogType.md +77 -102
  253. package/skill/references/enums/ESYS_NetlistType.md +129 -113
  254. package/skill/references/enums/ESYS_PanelPosition.md +69 -0
  255. package/skill/references/enums/ESYS_PanelTab.md +368 -0
  256. package/skill/references/enums/ESYS_RightPanelTab.md +237 -201
  257. package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorRange.md +220 -190
  258. package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md +103 -91
  259. package/skill/references/enums/ESYS_StartPageQuickStartItem.md +237 -205
  260. package/skill/references/enums/ESYS_Theme.md +51 -47
  261. package/skill/references/enums/ESYS_ToastMessageType.md +90 -80
  262. package/skill/references/enums/ESYS_Unit.md +116 -102
  263. package/skill/references/enums/ESYS_WindowEventType.md +64 -47
  264. package/skill/references/enums/ESYS_WindowOpenTarget.md +51 -47
  265. package/skill/references/enums/NetportDeviceName.md +146 -146
  266. package/skill/references/enums/SchToolBarDeviceName.md +278 -278
  267. package/skill/references/interfaces/BoardProps.md +169 -169
  268. package/skill/references/interfaces/BorderConfig.md +109 -0
  269. package/skill/references/interfaces/ButtonProps.md +196 -169
  270. package/skill/references/interfaces/CellClickInfo.md +142 -0
  271. package/skill/references/interfaces/CellCoord.md +88 -0
  272. package/skill/references/interfaces/CheckBoxProps.md +223 -196
  273. package/skill/references/interfaces/CheckChangeDetail.md +88 -0
  274. package/skill/references/interfaces/CheckboxEditConfig.md +159 -0
  275. package/skill/references/interfaces/ClipboardCellData.md +142 -0
  276. package/skill/references/interfaces/ClipboardConfig.md +115 -0
  277. package/skill/references/interfaces/ColorPickerProps.md +169 -0
  278. package/skill/references/interfaces/ColumnDef.md +605 -0
  279. package/skill/references/interfaces/ColumnEditTrigger.md +57 -0
  280. package/skill/references/interfaces/ColumnGroupDef.md +192 -0
  281. package/skill/references/interfaces/ColumnResizeConfig.md +142 -0
  282. package/skill/references/interfaces/ComponentPropsMap.md +517 -448
  283. package/skill/references/interfaces/CustomHeaderConfig.md +169 -0
  284. package/skill/references/interfaces/DialogProps.md +385 -385
  285. package/skill/references/interfaces/DragSortConfig.md +115 -0
  286. package/skill/references/interfaces/EditingConfig.md +196 -0
  287. package/skill/references/interfaces/FilteringConfig.md +250 -0
  288. package/skill/references/interfaces/FixedColumnConfig.md +88 -0
  289. package/skill/references/interfaces/FlexItemProps.md +116 -116
  290. package/skill/references/interfaces/FlexProps.md +224 -224
  291. package/skill/references/interfaces/GridItemProps.md +143 -143
  292. package/skill/references/interfaces/GridProps.md +143 -143
  293. package/skill/references/interfaces/IDMT_BoardItem.md +171 -171
  294. package/skill/references/interfaces/IDMT_BriefProjectItem.md +171 -171
  295. package/skill/references/interfaces/IDMT_EditorDocumentItem.md +169 -169
  296. package/skill/references/interfaces/IDMT_EditorSplitScreenItem.md +173 -173
  297. package/skill/references/interfaces/IDMT_EditorTabItem.md +169 -169
  298. package/skill/references/interfaces/IDMT_FolderItem.md +225 -225
  299. package/skill/references/interfaces/IDMT_IndicatorMarkerShape.md +393 -393
  300. package/skill/references/interfaces/IDMT_PanelItem.md +144 -144
  301. package/skill/references/interfaces/IDMT_PcbItem.md +171 -171
  302. package/skill/references/interfaces/IDMT_ProjectItem.md +143 -143
  303. package/skill/references/interfaces/IDMT_SchematicItem.md +225 -225
  304. package/skill/references/interfaces/IDMT_SchematicPageItem.md +198 -198
  305. package/skill/references/interfaces/IDMT_TeamItem.md +144 -144
  306. package/skill/references/interfaces/IDMT_WorkspaceItem.md +117 -117
  307. package/skill/references/interfaces/IDesignPortal.md +103 -103
  308. package/skill/references/interfaces/ILIB_3DModelItem.md +198 -198
  309. package/skill/references/interfaces/ILIB_3DModelSearchItem.md +277 -277
  310. package/skill/references/interfaces/ILIB_CbbItem.md +225 -225
  311. package/skill/references/interfaces/ILIB_CbbSearchItem.md +277 -277
  312. package/skill/references/interfaces/ILIB_ClassificationIndex.md +150 -150
  313. package/skill/references/interfaces/ILIB_ClassificationNode.md +98 -0
  314. package/skill/references/interfaces/ILIB_DeviceAssociationItem.md +210 -210
  315. package/skill/references/interfaces/ILIB_DeviceExtendPropertyItem.md +304 -304
  316. package/skill/references/interfaces/ILIB_DeviceItem.md +279 -279
  317. package/skill/references/interfaces/ILIB_DevicePropertiesForSearch.md +250 -250
  318. package/skill/references/interfaces/ILIB_DeviceSearchItem.md +521 -521
  319. package/skill/references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md +64 -64
  320. package/skill/references/interfaces/ILIB_ExtendLibraryCbbFunctions.md +93 -99
  321. package/skill/references/interfaces/ILIB_ExtendLibraryClassificationIndex.md +150 -150
  322. package/skill/references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md +143 -157
  323. package/skill/references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md +63 -63
  324. package/skill/references/interfaces/ILIB_ExtendLibraryFunctions.md +123 -123
  325. package/skill/references/interfaces/ILIB_ExtendLibraryItem.md +97 -97
  326. package/skill/references/interfaces/ILIB_ExtendLibraryItemIndex.md +98 -98
  327. package/skill/references/interfaces/ILIB_ExtendLibrarySearchProperty.md +115 -115
  328. package/skill/references/interfaces/ILIB_ExtendLibrarySearchResult.md +169 -169
  329. package/skill/references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md +234 -234
  330. package/skill/references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md +91 -105
  331. package/skill/references/interfaces/ILIB_ExtendLibraryUserIndex.md +96 -96
  332. package/skill/references/interfaces/ILIB_FootprintItem.md +256 -198
  333. package/skill/references/interfaces/ILIB_FootprintPropertiesForSearch.md +61 -61
  334. package/skill/references/interfaces/ILIB_FootprintSearchItem.md +277 -277
  335. package/skill/references/interfaces/ILIB_LibraryInfo.md +92 -92
  336. package/skill/references/interfaces/ILIB_LibraryItem.md +115 -115
  337. package/skill/references/interfaces/ILIB_PanelLibraryItem.md +198 -198
  338. package/skill/references/interfaces/ILIB_PanelLibrarySearchItem.md +277 -277
  339. package/skill/references/interfaces/ILIB_RegisterExtendLibraryProps.md +71 -0
  340. package/skill/references/interfaces/ILIB_SimulationModelItem.md +306 -306
  341. package/skill/references/interfaces/ILIB_SimulationModelSearchItem.md +304 -304
  342. package/skill/references/interfaces/ILIB_SymbolItem.md +306 -279
  343. package/skill/references/interfaces/ILIB_SymbolPropertiesForSearch.md +61 -61
  344. package/skill/references/interfaces/ILIB_SymbolSearchItem.md +304 -304
  345. package/skill/references/interfaces/IPCB_AutoLayoutResult.md +169 -169
  346. package/skill/references/interfaces/IPCB_AutoRoutingProps.md +220 -220
  347. package/skill/references/interfaces/IPCB_AutoRoutingResult.md +169 -169
  348. package/skill/references/interfaces/IPCB_BomPropertiesTableColumns.md +169 -169
  349. package/skill/references/interfaces/IPCB_DifferentialPairItem.md +115 -115
  350. package/skill/references/interfaces/IPCB_DiscretizeOptions.md +65 -65
  351. package/skill/references/interfaces/IPCB_DiscretizedPoint.md +88 -88
  352. package/skill/references/interfaces/IPCB_EqualLengthNetGroupItem.md +115 -115
  353. package/skill/references/interfaces/IPCB_LayerItem.md +277 -277
  354. package/skill/references/interfaces/IPCB_NetClassItem.md +115 -115
  355. package/skill/references/interfaces/IPCB_NetInfo.md +115 -115
  356. package/skill/references/interfaces/IPCB_PadPairGroupItem.md +88 -88
  357. package/skill/references/interfaces/IPCB_PadPairMinWireLengthItem.md +88 -88
  358. package/skill/references/interfaces/IPCB_PhysicalStackingConfiguration.md +115 -115
  359. package/skill/references/interfaces/IPCB_Primitive.md +218 -218
  360. package/skill/references/interfaces/IPCB_PrimitiveAPI.md +174 -175
  361. package/skill/references/interfaces/IPCB_PrimitivePadHeatWelding.md +151 -151
  362. package/skill/references/interfaces/IPCB_PrimitivePouredPourFill.md +142 -142
  363. package/skill/references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md +154 -154
  364. package/skill/references/interfaces/IPCB_RayTracerBackgroundConfig.md +223 -0
  365. package/skill/references/interfaces/IPCB_RayTracerLightConfig.md +412 -0
  366. package/skill/references/interfaces/IPCB_RayTracerMaterialConfig.md +547 -0
  367. package/skill/references/interfaces/IPCB_RayTracerPcbMaterialConfig.md +196 -0
  368. package/skill/references/interfaces/IPCB_RayTracerRenderConfigurations.md +200 -0
  369. package/skill/references/interfaces/IPCB_RayTracerRendererConfig.md +196 -0
  370. package/skill/references/interfaces/IPCB_RayTracerSceneElement.md +115 -0
  371. package/skill/references/interfaces/IPCB_RayTracerSceneElementTransform.md +123 -0
  372. package/skill/references/interfaces/IPCB_RayTracerTexture.md +88 -0
  373. package/skill/references/interfaces/IPCB_SubstratePhysicalProperties.md +88 -88
  374. package/skill/references/interfaces/IRawNet.md +103 -103
  375. package/skill/references/interfaces/IRawPureSchematic.md +80 -80
  376. package/skill/references/interfaces/IRawSchematic.md +103 -103
  377. package/skill/references/interfaces/IRawWire.md +149 -149
  378. package/skill/references/interfaces/ISCH_DrcError.md +142 -142
  379. package/skill/references/interfaces/ISCH_DrcErrorPrimitive.md +142 -142
  380. package/skill/references/interfaces/ISCH_ExportPngResolution.md +94 -94
  381. package/skill/references/interfaces/ISCH_NetInfo.md +88 -88
  382. package/skill/references/interfaces/ISCH_Primitive.md +218 -219
  383. package/skill/references/interfaces/ISCH_PrimitiveAPI.md +174 -175
  384. package/skill/references/interfaces/ISCH_ProjectNetInfo.md +142 -142
  385. package/skill/references/interfaces/ISCH_WireInfo.md +169 -169
  386. package/skill/references/interfaces/ISYS_ComparisonResponse.md +115 -0
  387. package/skill/references/interfaces/ISYS_ExtensionExternalApiIndex.md +13 -0
  388. package/skill/references/interfaces/ISYS_ExtensionRegisteredExternalApis.md +13 -0
  389. package/skill/references/interfaces/ISYS_ExternalApiHelp.md +173 -0
  390. package/skill/references/interfaces/ISYS_ExternalApiRegistration.md +146 -0
  391. package/skill/references/interfaces/ISYS_FileSystemFileList.md +169 -169
  392. package/skill/references/interfaces/ISYS_HeaderMenuSub1MenuItem.md +205 -174
  393. package/skill/references/interfaces/ISYS_HeaderMenuSub2MenuItem.md +178 -147
  394. package/skill/references/interfaces/ISYS_HeaderMenuTopMenuItem.md +115 -115
  395. package/skill/references/interfaces/ISYS_HeaderMenus.md +408 -408
  396. package/skill/references/interfaces/ISYS_HelpAudienceEntry.md +92 -0
  397. package/skill/references/interfaces/ISYS_HelpClassSummary.md +205 -0
  398. package/skill/references/interfaces/ISYS_HelpData.md +92 -0
  399. package/skill/references/interfaces/ISYS_HelpMethodDetail.md +310 -0
  400. package/skill/references/interfaces/ISYS_JobHandle.md +65 -0
  401. package/skill/references/interfaces/ISYS_JobLogEntry.md +142 -0
  402. package/skill/references/interfaces/ISYS_JobStatus.md +176 -0
  403. package/skill/references/interfaces/ISYS_LogLine.md +115 -115
  404. package/skill/references/interfaces/ISYS_MathBBox.md +142 -142
  405. package/skill/references/interfaces/ISYS_MathPoint.md +88 -88
  406. package/skill/references/interfaces/ISYS_MathPolygonWithHoles.md +92 -92
  407. package/skill/references/interfaces/ISYS_MessageBusTask.md +115 -115
  408. package/skill/references/interfaces/ISYS_MultilingualLanguagesData.md +12 -12
  409. package/skill/references/interfaces/ISYS_RightClickMenuItem.md +174 -174
  410. package/skill/references/interfaces/ISYS_ShortcutKeyData.md +169 -169
  411. package/skill/references/interfaces/ISYS_ShortcutKeyDataWithCallFn.md +62 -62
  412. package/skill/references/interfaces/ISYS_ShortcutKeyDataWithUserDefinedShortcutKey.md +62 -62
  413. package/skill/references/interfaces/ISYS_WindowEventListenerRemovableObject.md +109 -109
  414. package/skill/references/interfaces/IconProps.md +88 -88
  415. package/skill/references/interfaces/ImageProps.md +115 -115
  416. package/skill/references/interfaces/InputEditConfig.md +182 -0
  417. package/skill/references/interfaces/InputProps.md +547 -520
  418. package/skill/references/interfaces/KeyboardConfig.md +61 -0
  419. package/skill/references/interfaces/ListChildren.md +223 -223
  420. package/skill/references/interfaces/ListProps.md +250 -223
  421. package/skill/references/interfaces/ModalProps.md +358 -358
  422. package/skill/references/interfaces/NumberEditConfig.md +234 -0
  423. package/skill/references/interfaces/RadioGroupProps.md +196 -196
  424. package/skill/references/interfaces/RadioItem.md +115 -115
  425. package/skill/references/interfaces/RichTableProps.md +1357 -0
  426. package/skill/references/interfaces/RowMetaConfig.md +142 -0
  427. package/skill/references/interfaces/ScrollerProps.md +169 -169
  428. package/skill/references/interfaces/SelectEditConfig.md +211 -0
  429. package/skill/references/interfaces/SelectListItem.md +142 -142
  430. package/skill/references/interfaces/SelectOption.md +142 -0
  431. package/skill/references/interfaces/SelectProps.md +169 -169
  432. package/skill/references/interfaces/SelectionConfig.md +358 -0
  433. package/skill/references/interfaces/SliderProps.md +142 -0
  434. package/skill/references/interfaces/SlotProps.md +88 -88
  435. package/skill/references/interfaces/SortState.md +88 -0
  436. package/skill/references/interfaces/SortingConfig.md +169 -0
  437. package/skill/references/interfaces/StyleProps.md +439 -385
  438. package/skill/references/interfaces/TextAreaProps.md +196 -196
  439. package/skill/references/interfaces/TextProps.md +169 -169
  440. package/skill/references/interfaces/TextareaEditConfig.md +182 -0
  441. package/skill/references/interfaces/ValidationRule.md +223 -0
  442. package/skill/references/interfaces/VirtualScrollConfig.md +115 -0
  443. package/skill/references/types/Align.md +9 -0
  444. package/skill/references/types/CellContentType.md +9 -0
  445. package/skill/references/types/ColumnDefOrGroup.md +12 -0
  446. package/skill/references/types/ColumnEditConfig.md +13 -0
  447. package/skill/references/types/ColumnType.md +9 -0
  448. package/skill/references/types/DataChangeType.md +9 -0
  449. package/skill/references/types/FilterMatchMode.md +9 -0
  450. package/skill/references/types/RichTableRow.md +12 -0
  451. package/skill/references/types/Serializable.md +10 -0
  452. package/skill/references/types/SerializablePrimitive.md +9 -0
  453. package/skill/references/types/SortOrder.md +9 -0
  454. package/skill/references/types/TPCB_LayerTypesOfInnerLayer.md +11 -11
  455. package/skill/references/types/TPCB_LayersInTheSelectable.md +42 -42
  456. package/skill/references/types/TPCB_LayersOfComponent.md +11 -11
  457. package/skill/references/types/TPCB_LayersOfCopper.md +15 -15
  458. package/skill/references/types/TPCB_LayersOfCustom.md +41 -41
  459. package/skill/references/types/TPCB_LayersOfDimension.md +16 -16
  460. package/skill/references/types/TPCB_LayersOfFill.md +28 -28
  461. package/skill/references/types/TPCB_LayersOfImage.md +22 -22
  462. package/skill/references/types/TPCB_LayersOfInner.md +41 -41
  463. package/skill/references/types/TPCB_LayersOfLine.md +25 -25
  464. package/skill/references/types/TPCB_LayersOfObject.md +12 -12
  465. package/skill/references/types/TPCB_LayersOfPad.md +11 -11
  466. package/skill/references/types/TPCB_LayersOfRegion.md +11 -11
  467. package/skill/references/types/TPCB_NumberOfCopperLayers.md +9 -9
  468. package/skill/references/types/TPCB_PolygonSourceArray.md +85 -83
  469. package/skill/references/types/TPCB_PrimitiveDimensionCoordinateSet.md +66 -66
  470. package/skill/references/types/TPCB_PrimitivePadHole.md +30 -30
  471. package/skill/references/types/TPCB_PrimitivePadShape.md +61 -61
  472. package/skill/references/types/TPCB_PrimitiveSpecialPadShape.md +19 -19
  473. package/skill/references/types/TSYS_ComparisonErrorCode.md +15 -0
  474. package/skill/references/types/TSYS_LanguageKeyValuePairs.md +13 -0
  475. package/skill/references/types/TSYS_MathPolygonGroup.md +15 -15
  476. package/skill/references/types/TSYS_MathPolygonInput.md +20 -20
  477. package/skill/references/types/TSYS_ShortcutKeys.md +96 -96
  478. package/skill/user-guide/using-extension.md +47 -47
  479. package/src/json-gen.test.js +430 -0
  480. package/skill/guide/ancillary-projects/pro-api-sdk.md +0 -1
  481. package/skill/references/interfaces/ISYS_PcbComparisonResponse.md +0 -115
  482. package/skill/references/types/ISYS_LanguageKeyValuePairs.md +0 -13
  483. package/skill/references/types/TSYS_PcbComparisonErrorCode.md +0 -10
@@ -1,1392 +1,1392 @@
1
- # ISCH\_PrimitiveCircle class
2
-
3
- Circle primitive
4
-
5
- ## Signature
6
-
7
- ```typescript
8
- class ISCH_PrimitiveCircle implements ISCH_Primitive
9
- ```
10
- **Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
11
-
12
- ## Remarks
13
-
14
- ## Methods
15
-
16
- <table><thead><tr><th>
17
-
18
- Method
19
-
20
- </th><th>
21
-
22
- Modifiers
23
-
24
- </th><th>
25
-
26
- Description
27
-
28
- </th></tr></thead>
29
- <tbody><tr><td>
30
-
31
- [done()](./ISCH_PrimitiveCircle.md)
32
-
33
- </td><td>
34
-
35
- </td><td>
36
-
37
- **_(BETA)_** Apply the changes to the primitives to the canvas
38
-
39
- </td></tr>
40
- <tr><td>
41
-
42
- [getState\_CenterX()](./ISCH_PrimitiveCircle.md)
43
-
44
- </td><td>
45
-
46
- </td><td>
47
-
48
- Get the property state: center of the circle X
49
-
50
- </td></tr>
51
- <tr><td>
52
-
53
- [getState\_CenterY()](./ISCH_PrimitiveCircle.md)
54
-
55
- </td><td>
56
-
57
- </td><td>
58
-
59
- Get the property state: center of the circle Y
60
-
61
- </td></tr>
62
- <tr><td>
63
-
64
- [getState\_Color()](./ISCH_PrimitiveCircle.md)
65
-
66
- </td><td>
67
-
68
- </td><td>
69
-
70
- Get the property state: color
71
-
72
- </td></tr>
73
- <tr><td>
74
-
75
- [getState\_FillColor()](./ISCH_PrimitiveCircle.md)
76
-
77
- </td><td>
78
-
79
- </td><td>
80
-
81
- Get the property state: fill color
82
-
83
- </td></tr>
84
- <tr><td>
85
-
86
- [getState\_FillStyle()](./ISCH_PrimitiveCircle.md)
87
-
88
- </td><td>
89
-
90
- </td><td>
91
-
92
- Get the property state: fill style
93
-
94
- </td></tr>
95
- <tr><td>
96
-
97
- [getState\_LineType()](./ISCH_PrimitiveCircle.md)
98
-
99
- </td><td>
100
-
101
- </td><td>
102
-
103
- Get the property state: line type
104
-
105
- </td></tr>
106
- <tr><td>
107
-
108
- [getState\_LineWidth()](./ISCH_PrimitiveCircle.md)
109
-
110
- </td><td>
111
-
112
- </td><td>
113
-
114
- Get the property state: Line width
115
-
116
- </td></tr>
117
- <tr><td>
118
-
119
- [getState\_PrimitiveId()](./ISCH_PrimitiveCircle.md)
120
-
121
- </td><td>
122
-
123
- </td><td>
124
-
125
- Get the property state: primitive ID
126
-
127
- </td></tr>
128
- <tr><td>
129
-
130
- [getState\_PrimitiveType()](./ISCH_PrimitiveCircle.md)
131
-
132
- </td><td>
133
-
134
- </td><td>
135
-
136
- Get the property state: primitive type
137
-
138
- </td></tr>
139
- <tr><td>
140
-
141
- [getState\_Radius()](./ISCH_PrimitiveCircle.md)
142
-
143
- </td><td>
144
-
145
- </td><td>
146
-
147
- Get the property state: radius
148
-
149
- </td></tr>
150
- <tr><td>
151
-
152
- [isAsync()](./ISCH_PrimitiveCircle.md)
153
-
154
- </td><td>
155
-
156
- </td><td>
157
-
158
- Query whether the primitive is an async primitive
159
-
160
- </td></tr>
161
- <tr><td>
162
-
163
- [reset()](./ISCH_PrimitiveCircle.md)
164
-
165
- </td><td>
166
-
167
- </td><td>
168
-
169
- **_(BETA)_** Reset the async primitive to the current canvas state
170
-
171
- </td></tr>
172
- <tr><td>
173
-
174
- [setState\_CenterX(centerX)](./ISCH_PrimitiveCircle.md)
175
-
176
- </td><td>
177
-
178
- </td><td>
179
-
180
- **_(BETA)_** Set the property state: center of the circle X
181
-
182
- </td></tr>
183
- <tr><td>
184
-
185
- [setState\_CenterY(centerY)](./ISCH_PrimitiveCircle.md)
186
-
187
- </td><td>
188
-
189
- </td><td>
190
-
191
- **_(BETA)_** Set the property state: center of the circle Y
192
-
193
- </td></tr>
194
- <tr><td>
195
-
196
- [setState\_Color(color)](./ISCH_PrimitiveCircle.md)
197
-
198
- </td><td>
199
-
200
- </td><td>
201
-
202
- **_(BETA)_** Set the property state: color
203
-
204
- </td></tr>
205
- <tr><td>
206
-
207
- [setState\_FillColor(fillColor)](./ISCH_PrimitiveCircle.md)
208
-
209
- </td><td>
210
-
211
- </td><td>
212
-
213
- **_(BETA)_** Set the property state: fill color
214
-
215
- </td></tr>
216
- <tr><td>
217
-
218
- [setState\_FillStyle(fillStyle)](./ISCH_PrimitiveCircle.md)
219
-
220
- </td><td>
221
-
222
- </td><td>
223
-
224
- **_(BETA)_** Set the property state: fill style
225
-
226
- </td></tr>
227
- <tr><td>
228
-
229
- [setState\_LineType(lineType)](./ISCH_PrimitiveCircle.md)
230
-
231
- </td><td>
232
-
233
- </td><td>
234
-
235
- **_(BETA)_** Set the property state: line type
236
-
237
- </td></tr>
238
- <tr><td>
239
-
240
- [setState\_LineWidth(lineWidth)](./ISCH_PrimitiveCircle.md)
241
-
242
- </td><td>
243
-
244
- </td><td>
245
-
246
- **_(BETA)_** Set the property state: Line width
247
-
248
- </td></tr>
249
- <tr><td>
250
-
251
- [setState\_Radius(radius)](./ISCH_PrimitiveCircle.md)
252
-
253
- </td><td>
254
-
255
- </td><td>
256
-
257
- **_(BETA)_** Set the property state: radius
258
-
259
- </td></tr>
260
- <tr><td>
261
-
262
- [toAsync()](./ISCH_PrimitiveCircle.md)
263
-
264
- </td><td>
265
-
266
- </td><td>
267
-
268
- Convert Primitive to Async primitive
269
-
270
- </td></tr>
271
- <tr><td>
272
-
273
- [toSync()](./ISCH_PrimitiveCircle.md)
274
-
275
- </td><td>
276
-
277
- </td><td>
278
-
279
- Convert Primitive to Sync primitive
280
-
281
- </td></tr>
282
- </tbody></table>
283
-
284
- ---
285
-
286
- ## 方法详情
287
-
288
- ### done
289
-
290
- # ISCH\_PrimitiveCircle.done() method
291
-
292
- > 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.
293
-
294
- Apply the changes to the primitives to the canvas
295
-
296
- ## Signature
297
-
298
- ```typescript
299
- function done(): Promise<ISCH_PrimitiveCircle>;
300
- ```
301
-
302
- ## Returns
303
-
304
- Promise&lt;[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->&gt;
305
-
306
- Circle primitive object
307
-
308
- ## Example
309
-
310
- ```javascript
311
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
312
- const x = 2000 + Math.floor(Math.random() * 8000);
313
- const y = 2000 + Math.floor(Math.random() * 8000);
314
-
315
- // 2. 创建一个测试圆,圆心 (x, y)、半径 150(SCH 坐标单位 10mil)
316
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
317
-
318
- // 3. 切换异步模式,累计两处修改(半径扩大 + 改颜色)
319
- const asyncCircle = circle.toAsync();
320
- asyncCircle.setState_Radius(250);
321
- asyncCircle.setState_Color('#00AA00');
322
-
323
- // 4. 一次性提交到画布
324
- await asyncCircle.done();
325
-
326
- // 5. 从画布重新读取,确认两处修改都已生效(保留现场供观察)
327
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
328
-
329
- console.log('radius:', 150, '→', refetched.getState_Radius());
330
- console.log('color:', '#00AA00', '→', refetched.getState_Color());
331
- ```
332
-
333
- ### getstate_centerx
334
-
335
- # ISCH\_PrimitiveCircle.getState\_CenterX() method
336
-
337
- Get the property state: center of the circle X
338
-
339
- ## Signature
340
-
341
- ```typescript
342
- function getState_CenterX(): number;
343
- ```
344
-
345
- ## Returns
346
-
347
- number
348
-
349
- Center of the circle X
350
-
351
- ## Example
352
-
353
- ```javascript
354
- // 1. 创建一个测试圆,圆心 (400, 300)、半径 150(SCH 坐标单位 10mil)
355
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
356
-
357
- // 2. 读取圆心 X
358
- const centerX = circle.getState_CenterX();
359
-
360
- // 3. 清理测试图元(查询类案例不留测试对象)
361
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
362
-
363
- console.log('centerX:', centerX);
364
- ```
365
-
366
- ### getstate_centery
367
-
368
- # ISCH\_PrimitiveCircle.getState\_CenterY() method
369
-
370
- Get the property state: center of the circle Y
371
-
372
- ## Signature
373
-
374
- ```typescript
375
- function getState_CenterY(): number;
376
- ```
377
-
378
- ## Returns
379
-
380
- number
381
-
382
- Center of the circle Y
383
-
384
- ## Example
385
-
386
- ```javascript
387
- // 1. 创建一个测试圆,圆心 (400, 300)、半径 150(SCH 坐标单位 10mil)
388
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
389
-
390
- // 2. 读取圆心 Y
391
- const centerY = circle.getState_CenterY();
392
-
393
- // 3. 清理测试图元(查询类案例不留测试对象)
394
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
395
-
396
- console.log('centerY:', centerY);
397
- ```
398
-
399
- ### getstate_color
400
-
401
- # ISCH\_PrimitiveCircle.getState\_Color() method
402
-
403
- Get the property state: color
404
-
405
- ## Signature
406
-
407
- ```typescript
408
- function getState_Color(): string | null;
409
- ```
410
-
411
- ## Returns
412
-
413
- string \| null
414
-
415
- Color
416
-
417
- ## Example
418
-
419
- ```javascript
420
- // 1. 创建一个红色轮廓的测试圆(SCH 坐标单位 10mil)
421
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000');
422
-
423
- // 2. 读取轮廓颜色
424
- const color = circle.getState_Color();
425
-
426
- // 3. 清理测试图元(查询类案例不留测试对象)
427
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
428
-
429
- console.log('color:', color);
430
- ```
431
-
432
- ### getstate_fillcolor
433
-
434
- # ISCH\_PrimitiveCircle.getState\_FillColor() method
435
-
436
- Get the property state: fill color
437
-
438
- ## Signature
439
-
440
- ```typescript
441
- function getState_FillColor(): string | null;
442
- ```
443
-
444
- ## Returns
445
-
446
- string \| null
447
-
448
- Fill color
449
-
450
- ## Example
451
-
452
- ```javascript
453
- // 1. 创建一个带填充色的测试圆:轮廓红、填充黄(SCH 坐标单位 10mil)
454
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000', '#FFEC8B');
455
-
456
- // 2. 读取填充颜色
457
- const fillColor = circle.getState_FillColor();
458
-
459
- // 3. 清理测试图元(查询类案例不留测试对象)
460
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
461
-
462
- console.log('fillColor:', fillColor);
463
- ```
464
-
465
- ### getstate_fillstyle
466
-
467
- # ISCH\_PrimitiveCircle.getState\_FillStyle() method
468
-
469
- Get the property state: fill style
470
-
471
- ## Signature
472
-
473
- ```typescript
474
- function getState_FillStyle(): ESCH_PrimitiveFillStyle | null;
475
- ```
476
-
477
- ## Returns
478
-
479
- [ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
480
-
481
- Fill style
482
-
483
- ## Example
484
-
485
- ```javascript
486
- // 1. 创建一个实心填充的测试圆(fillStyle 传字符串枚举,如 'Solid')
487
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000', '#FFEC8B', 6, 0, 'Solid');
488
-
489
- // 2. 读取填充样式
490
- const fillStyle = circle.getState_FillStyle();
491
-
492
- // 3. 清理测试图元(查询类案例不留测试对象)
493
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
494
-
495
- console.log('fillStyle:', fillStyle);
496
- ```
497
-
498
- ### getstate_linetype
499
-
500
- # ISCH\_PrimitiveCircle.getState\_LineType() method
501
-
502
- Get the property state: line type
503
-
504
- ## Signature
505
-
506
- ```typescript
507
- function getState_LineType(): ESCH_PrimitiveLineType | null;
508
- ```
509
-
510
- ## Returns
511
-
512
- [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
513
-
514
- Line type
515
-
516
- ## Example
517
-
518
- ```javascript
519
- // 1. 创建一个虚线轮廓的测试圆(lineType 传数字枚举,1 = DASHED)
520
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000', null, 6, 1);
521
-
522
- // 2. 读取线型
523
- const lineType = circle.getState_LineType();
524
-
525
- // 3. 清理测试图元(查询类案例不留测试对象)
526
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
527
-
528
- console.log('lineType:', lineType);
529
- ```
530
-
531
- ### getstate_linewidth
532
-
533
- # ISCH\_PrimitiveCircle.getState\_LineWidth() method
534
-
535
- Get the property state: Line width
536
-
537
- ## Signature
538
-
539
- ```typescript
540
- function getState_LineWidth(): number | null;
541
- ```
542
-
543
- ## Returns
544
-
545
- number \| null
546
-
547
- Line width
548
-
549
- ## Example
550
-
551
- ```javascript
552
- // 1. 创建一个线宽 6 的测试圆(SCH 坐标单位 10mil)
553
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000', null, 6, 0);
554
-
555
- // 2. 读取线宽
556
- const lineWidth = circle.getState_LineWidth();
557
-
558
- // 3. 清理测试图元(查询类案例不留测试对象)
559
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
560
-
561
- console.log('lineWidth:', lineWidth);
562
- ```
563
-
564
- ### getstate_primitiveid
565
-
566
- # ISCH\_PrimitiveCircle.getState\_PrimitiveId() method
567
-
568
- Get the property state: primitive ID
569
-
570
- ## Signature
571
-
572
- ```typescript
573
- function getState_PrimitiveId(): string;
574
- ```
575
-
576
- ## Returns
577
-
578
- string
579
-
580
- Primitive ID
581
-
582
- ## Example
583
-
584
- ```javascript
585
- // 1. 创建一个测试圆(SCH 坐标单位 10mil)
586
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
587
-
588
- // 2. 读取图元 ID
589
- const primitiveId = circle.getState_PrimitiveId();
590
-
591
- // 3. 清理测试图元(查询类案例不留测试对象)
592
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
593
-
594
- console.log('primitiveId:', primitiveId);
595
- ```
596
-
597
- ### getstate_primitivetype
598
-
599
- # ISCH\_PrimitiveCircle.getState\_PrimitiveType() method
600
-
601
- Get the property state: primitive type
602
-
603
- ## Signature
604
-
605
- ```typescript
606
- function getState_PrimitiveType(): ESCH_PrimitiveType;
607
- ```
608
-
609
- ## Returns
610
-
611
- [ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
612
-
613
- Primitive type
614
-
615
- ## Example
616
-
617
- ```javascript
618
- // 1. 创建一个测试圆(SCH 坐标单位 10mil)
619
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
620
-
621
- // 2. 读取图元类型
622
- const primitiveType = circle.getState_PrimitiveType();
623
-
624
- // 3. 清理测试图元(查询类案例不留测试对象)
625
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
626
-
627
- console.log('primitiveType:', primitiveType);
628
- ```
629
-
630
- ### getstate_radius
631
-
632
- # ISCH\_PrimitiveCircle.getState\_Radius() method
633
-
634
- Get the property state: radius
635
-
636
- ## Signature
637
-
638
- ```typescript
639
- function getState_Radius(): number;
640
- ```
641
-
642
- ## Returns
643
-
644
- number
645
-
646
- Radius
647
-
648
- ## Example
649
-
650
- ```javascript
651
- // 1. 创建一个半径 150 的测试圆(SCH 坐标单位 10mil)
652
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
653
-
654
- // 2. 读取半径
655
- const radius = circle.getState_Radius();
656
-
657
- // 3. 清理测试图元(查询类案例不留测试对象)
658
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
659
-
660
- console.log('radius:', radius);
661
- ```
662
-
663
- ### isasync
664
-
665
- # ISCH\_PrimitiveCircle.isAsync() method
666
-
667
- Query whether the primitive is an async primitive
668
-
669
- ## Signature
670
-
671
- ```typescript
672
- function isAsync(): boolean;
673
- ```
674
-
675
- ## Returns
676
-
677
- boolean
678
-
679
- Whether Is async primitive
680
-
681
- ## Example
682
-
683
- ```javascript
684
- // 1. 创建一个测试圆,创建后默认处于异步模式
685
- const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
686
- const asyncOnCreate = circle.isAsync();
687
-
688
- // 2. 切换到同步模式再查询一次,对比两种模式
689
- circle.toSync();
690
- const asyncAfterToSync = circle.isAsync();
691
-
692
- // 3. 清理测试图元(查询类案例不留测试对象)
693
- await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
694
-
695
- console.log('isAsync on create:', asyncOnCreate);
696
- console.log('isAsync after toSync:', asyncAfterToSync);
697
- ```
698
-
699
- ### reset
700
-
701
- # ISCH\_PrimitiveCircle.reset() method
702
-
703
- > 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.
704
-
705
- Reset the async primitive to the current canvas state
706
-
707
- ## Signature
708
-
709
- ```typescript
710
- function reset(): Promise<ISCH_PrimitiveCircle>;
711
- ```
712
-
713
- ## Returns
714
-
715
- Promise&lt;[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->&gt;
716
-
717
- Circle primitive object
718
-
719
- ## Example
720
-
721
- ```javascript
722
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
723
- const x = 2000 + Math.floor(Math.random() * 8000);
724
- const y = 2000 + Math.floor(Math.random() * 8000);
725
-
726
- // 2. 创建一个线宽 6 的测试圆(SCH 坐标单位 10mil)
727
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', null, 6, 0);
728
-
729
- // 3. 切换异步模式,累计一处未提交的线宽修改(6 → 99)
730
- const asyncCircle = circle.toAsync();
731
- asyncCircle.setState_LineWidth(99);
732
-
733
- // 4. 重置:丢弃未提交的修改,回到画布当前状态
734
- await asyncCircle.reset();
735
-
736
- // 5. 从画布重新读取,线宽仍是 6(保留现场供观察)
737
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
738
-
739
- console.log('lineWidth after reset:', refetched.getState_LineWidth());
740
- ```
741
-
742
- ### setstate_centerx
743
-
744
- # ISCH\_PrimitiveCircle.setState\_CenterX() method
745
-
746
- > 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.
747
-
748
- Set the property state: center of the circle X
749
-
750
- ## Signature
751
-
752
- ```typescript
753
- function setState_CenterX(centerX: number): ISCH_PrimitiveCircle;
754
- ```
755
-
756
- ## Parameters
757
-
758
- <table><thead><tr><th>
759
-
760
- Parameter
761
-
762
- </th><th>
763
-
764
- Type
765
-
766
- </th><th>
767
-
768
- Description
769
-
770
- </th></tr></thead>
771
- <tbody><tr><td>
772
-
773
- centerX
774
-
775
- </td><td>
776
-
777
- number
778
-
779
- </td><td>
780
-
781
- Center of the circle X
782
-
783
- </td></tr>
784
- </tbody></table>
785
-
786
- ## Returns
787
-
788
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
789
-
790
- Circle primitive object
791
-
792
- ## Example
793
-
794
- ```javascript
795
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
796
- const x = 2000 + Math.floor(Math.random() * 8000);
797
- const y = 2000 + Math.floor(Math.random() * 8000);
798
-
799
- // 2. 创建一个测试圆,圆心 (x, y)、半径 150(SCH 坐标单位 10mil)
800
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
801
-
802
- // 3. 切换异步模式并把圆心右移 200
803
- const asyncCircle = circle.toAsync();
804
- asyncCircle.setState_CenterX(x + 200);
805
- await asyncCircle.done();
806
-
807
- // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
808
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
809
-
810
- console.log('centerX:', x, '→', refetched.getState_CenterX());
811
- ```
812
-
813
- ### setstate_centery
814
-
815
- # ISCH\_PrimitiveCircle.setState\_CenterY() method
816
-
817
- > 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.
818
-
819
- Set the property state: center of the circle Y
820
-
821
- ## Signature
822
-
823
- ```typescript
824
- function setState_CenterY(centerY: number): ISCH_PrimitiveCircle;
825
- ```
826
-
827
- ## Parameters
828
-
829
- <table><thead><tr><th>
830
-
831
- Parameter
832
-
833
- </th><th>
834
-
835
- Type
836
-
837
- </th><th>
838
-
839
- Description
840
-
841
- </th></tr></thead>
842
- <tbody><tr><td>
843
-
844
- centerY
845
-
846
- </td><td>
847
-
848
- number
849
-
850
- </td><td>
851
-
852
- Center of the circle Y
853
-
854
- </td></tr>
855
- </tbody></table>
856
-
857
- ## Returns
858
-
859
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
860
-
861
- Circle primitive object
862
-
863
- ## Example
864
-
865
- ```javascript
866
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
867
- const x = 2000 + Math.floor(Math.random() * 8000);
868
- const y = 2000 + Math.floor(Math.random() * 8000);
869
-
870
- // 2. 创建一个测试圆,圆心 (x, y)、半径 150(SCH 坐标单位 10mil)
871
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
872
-
873
- // 3. 切换异步模式并把圆心上移 200
874
- const asyncCircle = circle.toAsync();
875
- asyncCircle.setState_CenterY(y + 200);
876
- await asyncCircle.done();
877
-
878
- // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
879
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
880
-
881
- console.log('centerY:', y, '→', refetched.getState_CenterY());
882
- ```
883
-
884
- ### setstate_color
885
-
886
- # ISCH\_PrimitiveCircle.setState\_Color() method
887
-
888
- > 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.
889
-
890
- Set the property state: color
891
-
892
- ## Signature
893
-
894
- ```typescript
895
- function setState_Color(color: string | null): ISCH_PrimitiveCircle;
896
- ```
897
-
898
- ## Parameters
899
-
900
- <table><thead><tr><th>
901
-
902
- Parameter
903
-
904
- </th><th>
905
-
906
- Type
907
-
908
- </th><th>
909
-
910
- Description
911
-
912
- </th></tr></thead>
913
- <tbody><tr><td>
914
-
915
- color
916
-
917
- </td><td>
918
-
919
- string \| null
920
-
921
- </td><td>
922
-
923
- Color
924
-
925
- </td></tr>
926
- </tbody></table>
927
-
928
- ## Returns
929
-
930
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
931
-
932
- Circle primitive object
933
-
934
- ## Example
935
-
936
- ```javascript
937
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
938
- const x = 2000 + Math.floor(Math.random() * 8000);
939
- const y = 2000 + Math.floor(Math.random() * 8000);
940
-
941
- // 2. 创建一个红色轮廓的测试圆(SCH 坐标单位 10mil)
942
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000');
943
-
944
- // 3. 切换异步模式并改为绿色
945
- const asyncCircle = circle.toAsync();
946
- asyncCircle.setState_Color('#00AA00');
947
- await asyncCircle.done();
948
-
949
- // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
950
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
951
-
952
- console.log('color:', '#FF0000', '→', refetched.getState_Color());
953
- ```
954
-
955
- ### setstate_fillcolor
956
-
957
- # ISCH\_PrimitiveCircle.setState\_FillColor() method
958
-
959
- > 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.
960
-
961
- Set the property state: fill color
962
-
963
- ## Signature
964
-
965
- ```typescript
966
- function setState_FillColor(fillColor: string | null): ISCH_PrimitiveCircle;
967
- ```
968
-
969
- ## Parameters
970
-
971
- <table><thead><tr><th>
972
-
973
- Parameter
974
-
975
- </th><th>
976
-
977
- Type
978
-
979
- </th><th>
980
-
981
- Description
982
-
983
- </th></tr></thead>
984
- <tbody><tr><td>
985
-
986
- fillColor
987
-
988
- </td><td>
989
-
990
- string \| null
991
-
992
- </td><td>
993
-
994
- Fill color
995
-
996
- </td></tr>
997
- </tbody></table>
998
-
999
- ## Returns
1000
-
1001
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1002
-
1003
- Circle primitive object
1004
-
1005
- ## Example
1006
-
1007
- ```javascript
1008
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1009
- const x = 2000 + Math.floor(Math.random() * 8000);
1010
- const y = 2000 + Math.floor(Math.random() * 8000);
1011
-
1012
- // 2. 创建一个黄色填充的测试圆(SCH 坐标单位 10mil)
1013
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', '#FFEC8B');
1014
-
1015
- // 3. 切换异步模式并改为浅蓝填充
1016
- const asyncCircle = circle.toAsync();
1017
- asyncCircle.setState_FillColor('#A0D8EF');
1018
- await asyncCircle.done();
1019
-
1020
- // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1021
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1022
-
1023
- console.log('fillColor:', '#FFEC8B', '→', refetched.getState_FillColor());
1024
- ```
1025
-
1026
- ### setstate_fillstyle
1027
-
1028
- # ISCH\_PrimitiveCircle.setState\_FillStyle() method
1029
-
1030
- > 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.
1031
-
1032
- Set the property state: fill style
1033
-
1034
- ## Signature
1035
-
1036
- ```typescript
1037
- function setState_FillStyle(fillStyle: ESCH_PrimitiveFillStyle | null): ISCH_PrimitiveCircle;
1038
- ```
1039
-
1040
- ## Parameters
1041
-
1042
- <table><thead><tr><th>
1043
-
1044
- Parameter
1045
-
1046
- </th><th>
1047
-
1048
- Type
1049
-
1050
- </th><th>
1051
-
1052
- Description
1053
-
1054
- </th></tr></thead>
1055
- <tbody><tr><td>
1056
-
1057
- fillStyle
1058
-
1059
- </td><td>
1060
-
1061
- [ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
1062
-
1063
- </td><td>
1064
-
1065
- Fill style
1066
-
1067
- </td></tr>
1068
- </tbody></table>
1069
-
1070
- ## Returns
1071
-
1072
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1073
-
1074
- Circle primitive object
1075
-
1076
- ## Example
1077
-
1078
- ```javascript
1079
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1080
- const x = 2000 + Math.floor(Math.random() * 8000);
1081
- const y = 2000 + Math.floor(Math.random() * 8000);
1082
-
1083
- // 2. 创建一个实心填充的测试圆(fillStyle 传字符串枚举 'Solid')
1084
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', '#FFEC8B', 6, 0, 'Solid');
1085
-
1086
- // 3. 切换异步模式并改为网格填充
1087
- const asyncCircle = circle.toAsync();
1088
- asyncCircle.setState_FillStyle('Grid');
1089
- await asyncCircle.done();
1090
-
1091
- // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1092
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1093
-
1094
- console.log('fillStyle:', 'Solid', '→', refetched.getState_FillStyle());
1095
- ```
1096
-
1097
- ### setstate_linetype
1098
-
1099
- # ISCH\_PrimitiveCircle.setState\_LineType() method
1100
-
1101
- > 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.
1102
-
1103
- Set the property state: line type
1104
-
1105
- ## Signature
1106
-
1107
- ```typescript
1108
- function setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveCircle;
1109
- ```
1110
-
1111
- ## Parameters
1112
-
1113
- <table><thead><tr><th>
1114
-
1115
- Parameter
1116
-
1117
- </th><th>
1118
-
1119
- Type
1120
-
1121
- </th><th>
1122
-
1123
- Description
1124
-
1125
- </th></tr></thead>
1126
- <tbody><tr><td>
1127
-
1128
- lineType
1129
-
1130
- </td><td>
1131
-
1132
- [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
1133
-
1134
- </td><td>
1135
-
1136
- Line type
1137
-
1138
- </td></tr>
1139
- </tbody></table>
1140
-
1141
- ## Returns
1142
-
1143
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1144
-
1145
- Circle primitive object
1146
-
1147
- ## Example
1148
-
1149
- ```javascript
1150
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1151
- const x = 2000 + Math.floor(Math.random() * 8000);
1152
- const y = 2000 + Math.floor(Math.random() * 8000);
1153
-
1154
- // 2. 创建一个实线轮廓的测试圆(lineType 0 = SOLID)
1155
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', null, 6, 0);
1156
-
1157
- // 3. 切换异步模式并改为虚线
1158
- const asyncCircle = circle.toAsync();
1159
- asyncCircle.setState_LineType(1);
1160
- await asyncCircle.done();
1161
-
1162
- // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1163
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1164
-
1165
- console.log('lineType:', 0, '→', refetched.getState_LineType());
1166
- ```
1167
-
1168
- ### setstate_linewidth
1169
-
1170
- # ISCH\_PrimitiveCircle.setState\_LineWidth() method
1171
-
1172
- > 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.
1173
-
1174
- Set the property state: Line width
1175
-
1176
- ## Signature
1177
-
1178
- ```typescript
1179
- function setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveCircle;
1180
- ```
1181
-
1182
- ## Parameters
1183
-
1184
- <table><thead><tr><th>
1185
-
1186
- Parameter
1187
-
1188
- </th><th>
1189
-
1190
- Type
1191
-
1192
- </th><th>
1193
-
1194
- Description
1195
-
1196
- </th></tr></thead>
1197
- <tbody><tr><td>
1198
-
1199
- lineWidth
1200
-
1201
- </td><td>
1202
-
1203
- number \| null
1204
-
1205
- </td><td>
1206
-
1207
- Line width
1208
-
1209
- </td></tr>
1210
- </tbody></table>
1211
-
1212
- ## Returns
1213
-
1214
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1215
-
1216
- Circle primitive object
1217
-
1218
- ## Example
1219
-
1220
- ```javascript
1221
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1222
- const x = 2000 + Math.floor(Math.random() * 8000);
1223
- const y = 2000 + Math.floor(Math.random() * 8000);
1224
-
1225
- // 2. 创建一个线宽 6 的测试圆(SCH 坐标单位 10mil)
1226
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', null, 6, 0);
1227
-
1228
- // 3. 切换异步模式并把线宽加粗到 10
1229
- const asyncCircle = circle.toAsync();
1230
- asyncCircle.setState_LineWidth(10);
1231
- await asyncCircle.done();
1232
-
1233
- // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1234
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1235
-
1236
- console.log('lineWidth:', 6, '→', refetched.getState_LineWidth());
1237
- ```
1238
-
1239
- ### setstate_radius
1240
-
1241
- # ISCH\_PrimitiveCircle.setState\_Radius() method
1242
-
1243
- > 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.
1244
-
1245
- Set the property state: radius
1246
-
1247
- ## Signature
1248
-
1249
- ```typescript
1250
- function setState_Radius(radius: number): ISCH_PrimitiveCircle;
1251
- ```
1252
-
1253
- ## Parameters
1254
-
1255
- <table><thead><tr><th>
1256
-
1257
- Parameter
1258
-
1259
- </th><th>
1260
-
1261
- Type
1262
-
1263
- </th><th>
1264
-
1265
- Description
1266
-
1267
- </th></tr></thead>
1268
- <tbody><tr><td>
1269
-
1270
- radius
1271
-
1272
- </td><td>
1273
-
1274
- number
1275
-
1276
- </td><td>
1277
-
1278
- Radius
1279
-
1280
- </td></tr>
1281
- </tbody></table>
1282
-
1283
- ## Returns
1284
-
1285
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1286
-
1287
- Circle primitive object
1288
-
1289
- ## Example
1290
-
1291
- ```javascript
1292
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1293
- const x = 2000 + Math.floor(Math.random() * 8000);
1294
- const y = 2000 + Math.floor(Math.random() * 8000);
1295
-
1296
- // 2. 创建一个半径 150 的测试圆(SCH 坐标单位 10mil)
1297
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
1298
-
1299
- // 3. 切换异步模式并把半径扩大到 250
1300
- const asyncCircle = circle.toAsync();
1301
- asyncCircle.setState_Radius(250);
1302
- await asyncCircle.done();
1303
-
1304
- // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1305
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1306
-
1307
- console.log('radius:', 150, '→', refetched.getState_Radius());
1308
- ```
1309
-
1310
- ### toasync
1311
-
1312
- # ISCH\_PrimitiveCircle.toAsync() method
1313
-
1314
- Convert Primitive to Async primitive
1315
-
1316
- ## Signature
1317
-
1318
- ```typescript
1319
- function toAsync(): ISCH_PrimitiveCircle;
1320
- ```
1321
-
1322
- ## Returns
1323
-
1324
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1325
-
1326
- Circle primitive object
1327
-
1328
- ## Example
1329
-
1330
- ```javascript
1331
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1332
- const x = 2000 + Math.floor(Math.random() * 8000);
1333
- const y = 2000 + Math.floor(Math.random() * 8000);
1334
-
1335
- // 2. 创建一个测试圆(SCH 坐标单位 10mil)
1336
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
1337
-
1338
- // 3. 先切换到同步模式,再切回异步模式
1339
- circle.toSync();
1340
- const asyncCircle = circle.toAsync();
1341
-
1342
- // 4. 异步模式下修改半径,调用 done() 提交到画布
1343
- asyncCircle.setState_Radius(250);
1344
- await asyncCircle.done();
1345
-
1346
- // 5. 从画布重新读取,确认修改已生效(保留现场供观察)
1347
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1348
-
1349
- console.log('isAsync after toAsync:', circle.isAsync());
1350
- console.log('radius:', 150, '→', refetched.getState_Radius());
1351
- ```
1352
-
1353
- ### tosync
1354
-
1355
- # ISCH\_PrimitiveCircle.toSync() method
1356
-
1357
- Convert Primitive to Sync primitive
1358
-
1359
- ## Signature
1360
-
1361
- ```typescript
1362
- function toSync(): ISCH_PrimitiveCircle;
1363
- ```
1364
-
1365
- ## Returns
1366
-
1367
- [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1368
-
1369
- Circle primitive object
1370
-
1371
- ## Example
1372
-
1373
- ```javascript
1374
- // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1375
- const x = 2000 + Math.floor(Math.random() * 8000);
1376
- const y = 2000 + Math.floor(Math.random() * 8000);
1377
-
1378
- // 2. 创建一个测试圆(创建后默认处于异步模式)
1379
- const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
1380
-
1381
- // 3. 转换为同步图元
1382
- const syncCircle = circle.toSync();
1383
-
1384
- // 4. 同步模式下扩大半径,立即生效,无需 done()
1385
- syncCircle.setState_Radius(250);
1386
-
1387
- // 5. 从画布重新读取,确认修改已生效(保留现场供观察)
1388
- const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1389
-
1390
- console.log('isAsync after toSync:', circle.isAsync());
1391
- console.log('radius:', 150, '→', refetched.getState_Radius());
1392
- ```
1
+ # ISCH\_PrimitiveCircle class
2
+
3
+ Circle primitive
4
+
5
+ ## Signature
6
+
7
+ ```typescript
8
+ class ISCH_PrimitiveCircle implements ISCH_Primitive
9
+ ```
10
+ **Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
11
+
12
+ ## Remarks
13
+
14
+ ## Methods
15
+
16
+ <table><thead><tr><th>
17
+
18
+ Method
19
+
20
+ </th><th>
21
+
22
+ Modifiers
23
+
24
+ </th><th>
25
+
26
+ Description
27
+
28
+ </th></tr></thead>
29
+ <tbody><tr><td>
30
+
31
+ [done()](./ISCH_PrimitiveCircle.md)
32
+
33
+ </td><td>
34
+
35
+ </td><td>
36
+
37
+ **_(BETA)_** Apply the changes to the primitives to the canvas
38
+
39
+ </td></tr>
40
+ <tr><td>
41
+
42
+ [getState\_CenterX()](./ISCH_PrimitiveCircle.md)
43
+
44
+ </td><td>
45
+
46
+ </td><td>
47
+
48
+ Get the property state: center of the circle X
49
+
50
+ </td></tr>
51
+ <tr><td>
52
+
53
+ [getState\_CenterY()](./ISCH_PrimitiveCircle.md)
54
+
55
+ </td><td>
56
+
57
+ </td><td>
58
+
59
+ Get the property state: center of the circle Y
60
+
61
+ </td></tr>
62
+ <tr><td>
63
+
64
+ [getState\_Color()](./ISCH_PrimitiveCircle.md)
65
+
66
+ </td><td>
67
+
68
+ </td><td>
69
+
70
+ Get the property state: color
71
+
72
+ </td></tr>
73
+ <tr><td>
74
+
75
+ [getState\_FillColor()](./ISCH_PrimitiveCircle.md)
76
+
77
+ </td><td>
78
+
79
+ </td><td>
80
+
81
+ Get the property state: fill color
82
+
83
+ </td></tr>
84
+ <tr><td>
85
+
86
+ [getState\_FillStyle()](./ISCH_PrimitiveCircle.md)
87
+
88
+ </td><td>
89
+
90
+ </td><td>
91
+
92
+ Get the property state: fill style
93
+
94
+ </td></tr>
95
+ <tr><td>
96
+
97
+ [getState\_LineType()](./ISCH_PrimitiveCircle.md)
98
+
99
+ </td><td>
100
+
101
+ </td><td>
102
+
103
+ Get the property state: line type
104
+
105
+ </td></tr>
106
+ <tr><td>
107
+
108
+ [getState\_LineWidth()](./ISCH_PrimitiveCircle.md)
109
+
110
+ </td><td>
111
+
112
+ </td><td>
113
+
114
+ Get the property state: Line width
115
+
116
+ </td></tr>
117
+ <tr><td>
118
+
119
+ [getState\_PrimitiveId()](./ISCH_PrimitiveCircle.md)
120
+
121
+ </td><td>
122
+
123
+ </td><td>
124
+
125
+ Get the property state: primitive ID
126
+
127
+ </td></tr>
128
+ <tr><td>
129
+
130
+ [getState\_PrimitiveType()](./ISCH_PrimitiveCircle.md)
131
+
132
+ </td><td>
133
+
134
+ </td><td>
135
+
136
+ Get the property state: primitive type
137
+
138
+ </td></tr>
139
+ <tr><td>
140
+
141
+ [getState\_Radius()](./ISCH_PrimitiveCircle.md)
142
+
143
+ </td><td>
144
+
145
+ </td><td>
146
+
147
+ Get the property state: radius
148
+
149
+ </td></tr>
150
+ <tr><td>
151
+
152
+ [isAsync()](./ISCH_PrimitiveCircle.md)
153
+
154
+ </td><td>
155
+
156
+ </td><td>
157
+
158
+ Query whether the primitive is an async primitive
159
+
160
+ </td></tr>
161
+ <tr><td>
162
+
163
+ [reset()](./ISCH_PrimitiveCircle.md)
164
+
165
+ </td><td>
166
+
167
+ </td><td>
168
+
169
+ **_(BETA)_** Reset the async primitive to the current canvas state
170
+
171
+ </td></tr>
172
+ <tr><td>
173
+
174
+ [setState\_CenterX(centerX)](./ISCH_PrimitiveCircle.md)
175
+
176
+ </td><td>
177
+
178
+ </td><td>
179
+
180
+ **_(BETA)_** Set the property state: center of the circle X
181
+
182
+ </td></tr>
183
+ <tr><td>
184
+
185
+ [setState\_CenterY(centerY)](./ISCH_PrimitiveCircle.md)
186
+
187
+ </td><td>
188
+
189
+ </td><td>
190
+
191
+ **_(BETA)_** Set the property state: center of the circle Y
192
+
193
+ </td></tr>
194
+ <tr><td>
195
+
196
+ [setState\_Color(color)](./ISCH_PrimitiveCircle.md)
197
+
198
+ </td><td>
199
+
200
+ </td><td>
201
+
202
+ **_(BETA)_** Set the property state: color
203
+
204
+ </td></tr>
205
+ <tr><td>
206
+
207
+ [setState\_FillColor(fillColor)](./ISCH_PrimitiveCircle.md)
208
+
209
+ </td><td>
210
+
211
+ </td><td>
212
+
213
+ **_(BETA)_** Set the property state: fill color
214
+
215
+ </td></tr>
216
+ <tr><td>
217
+
218
+ [setState\_FillStyle(fillStyle)](./ISCH_PrimitiveCircle.md)
219
+
220
+ </td><td>
221
+
222
+ </td><td>
223
+
224
+ **_(BETA)_** Set the property state: fill style
225
+
226
+ </td></tr>
227
+ <tr><td>
228
+
229
+ [setState\_LineType(lineType)](./ISCH_PrimitiveCircle.md)
230
+
231
+ </td><td>
232
+
233
+ </td><td>
234
+
235
+ **_(BETA)_** Set the property state: line type
236
+
237
+ </td></tr>
238
+ <tr><td>
239
+
240
+ [setState\_LineWidth(lineWidth)](./ISCH_PrimitiveCircle.md)
241
+
242
+ </td><td>
243
+
244
+ </td><td>
245
+
246
+ **_(BETA)_** Set the property state: Line width
247
+
248
+ </td></tr>
249
+ <tr><td>
250
+
251
+ [setState\_Radius(radius)](./ISCH_PrimitiveCircle.md)
252
+
253
+ </td><td>
254
+
255
+ </td><td>
256
+
257
+ **_(BETA)_** Set the property state: radius
258
+
259
+ </td></tr>
260
+ <tr><td>
261
+
262
+ [toAsync()](./ISCH_PrimitiveCircle.md)
263
+
264
+ </td><td>
265
+
266
+ </td><td>
267
+
268
+ Convert Primitive to Async primitive
269
+
270
+ </td></tr>
271
+ <tr><td>
272
+
273
+ [toSync()](./ISCH_PrimitiveCircle.md)
274
+
275
+ </td><td>
276
+
277
+ </td><td>
278
+
279
+ Convert Primitive to Sync primitive
280
+
281
+ </td></tr>
282
+ </tbody></table>
283
+
284
+ ---
285
+
286
+ ## 方法详情
287
+
288
+ ### done
289
+
290
+ # ISCH\_PrimitiveCircle.done() method
291
+
292
+ > 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.
293
+
294
+ Apply the changes to the primitives to the canvas
295
+
296
+ ## Signature
297
+
298
+ ```typescript
299
+ function done(): Promise<ISCH_PrimitiveCircle>;
300
+ ```
301
+
302
+ ## Returns
303
+
304
+ Promise&lt;[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->&gt;
305
+
306
+ Circle primitive object
307
+
308
+ ## Example
309
+
310
+ ```javascript
311
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
312
+ const x = 2000 + Math.floor(Math.random() * 8000);
313
+ const y = 2000 + Math.floor(Math.random() * 8000);
314
+
315
+ // 2. 创建一个测试圆,圆心 (x, y)、半径 150(SCH 坐标单位 10mil)
316
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
317
+
318
+ // 3. 切换异步模式,累计两处修改(半径扩大 + 改颜色)
319
+ const asyncCircle = circle.toAsync();
320
+ asyncCircle.setState_Radius(250);
321
+ asyncCircle.setState_Color('#00AA00');
322
+
323
+ // 4. 一次性提交到画布
324
+ await asyncCircle.done();
325
+
326
+ // 5. 从画布重新读取,确认两处修改都已生效(保留现场供观察)
327
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
328
+
329
+ console.log('radius:', 150, '→', refetched.getState_Radius());
330
+ console.log('color:', '#00AA00', '→', refetched.getState_Color());
331
+ ```
332
+
333
+ ### getstate_centerx
334
+
335
+ # ISCH\_PrimitiveCircle.getState\_CenterX() method
336
+
337
+ Get the property state: center of the circle X
338
+
339
+ ## Signature
340
+
341
+ ```typescript
342
+ function getState_CenterX(): number;
343
+ ```
344
+
345
+ ## Returns
346
+
347
+ number
348
+
349
+ Center of the circle X
350
+
351
+ ## Example
352
+
353
+ ```javascript
354
+ // 1. 创建一个测试圆,圆心 (400, 300)、半径 150(SCH 坐标单位 10mil)
355
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
356
+
357
+ // 2. 读取圆心 X
358
+ const centerX = circle.getState_CenterX();
359
+
360
+ // 3. 清理测试图元(查询类案例不留测试对象)
361
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
362
+
363
+ console.log('centerX:', centerX);
364
+ ```
365
+
366
+ ### getstate_centery
367
+
368
+ # ISCH\_PrimitiveCircle.getState\_CenterY() method
369
+
370
+ Get the property state: center of the circle Y
371
+
372
+ ## Signature
373
+
374
+ ```typescript
375
+ function getState_CenterY(): number;
376
+ ```
377
+
378
+ ## Returns
379
+
380
+ number
381
+
382
+ Center of the circle Y
383
+
384
+ ## Example
385
+
386
+ ```javascript
387
+ // 1. 创建一个测试圆,圆心 (400, 300)、半径 150(SCH 坐标单位 10mil)
388
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
389
+
390
+ // 2. 读取圆心 Y
391
+ const centerY = circle.getState_CenterY();
392
+
393
+ // 3. 清理测试图元(查询类案例不留测试对象)
394
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
395
+
396
+ console.log('centerY:', centerY);
397
+ ```
398
+
399
+ ### getstate_color
400
+
401
+ # ISCH\_PrimitiveCircle.getState\_Color() method
402
+
403
+ Get the property state: color
404
+
405
+ ## Signature
406
+
407
+ ```typescript
408
+ function getState_Color(): string | null;
409
+ ```
410
+
411
+ ## Returns
412
+
413
+ string \| null
414
+
415
+ Color
416
+
417
+ ## Example
418
+
419
+ ```javascript
420
+ // 1. 创建一个红色轮廓的测试圆(SCH 坐标单位 10mil)
421
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000');
422
+
423
+ // 2. 读取轮廓颜色
424
+ const color = circle.getState_Color();
425
+
426
+ // 3. 清理测试图元(查询类案例不留测试对象)
427
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
428
+
429
+ console.log('color:', color);
430
+ ```
431
+
432
+ ### getstate_fillcolor
433
+
434
+ # ISCH\_PrimitiveCircle.getState\_FillColor() method
435
+
436
+ Get the property state: fill color
437
+
438
+ ## Signature
439
+
440
+ ```typescript
441
+ function getState_FillColor(): string | null;
442
+ ```
443
+
444
+ ## Returns
445
+
446
+ string \| null
447
+
448
+ Fill color
449
+
450
+ ## Example
451
+
452
+ ```javascript
453
+ // 1. 创建一个带填充色的测试圆:轮廓红、填充黄(SCH 坐标单位 10mil)
454
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000', '#FFEC8B');
455
+
456
+ // 2. 读取填充颜色
457
+ const fillColor = circle.getState_FillColor();
458
+
459
+ // 3. 清理测试图元(查询类案例不留测试对象)
460
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
461
+
462
+ console.log('fillColor:', fillColor);
463
+ ```
464
+
465
+ ### getstate_fillstyle
466
+
467
+ # ISCH\_PrimitiveCircle.getState\_FillStyle() method
468
+
469
+ Get the property state: fill style
470
+
471
+ ## Signature
472
+
473
+ ```typescript
474
+ function getState_FillStyle(): ESCH_PrimitiveFillStyle | null;
475
+ ```
476
+
477
+ ## Returns
478
+
479
+ [ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
480
+
481
+ Fill style
482
+
483
+ ## Example
484
+
485
+ ```javascript
486
+ // 1. 创建一个实心填充的测试圆(fillStyle 传字符串枚举,如 'Solid')
487
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000', '#FFEC8B', 6, 0, 'Solid');
488
+
489
+ // 2. 读取填充样式
490
+ const fillStyle = circle.getState_FillStyle();
491
+
492
+ // 3. 清理测试图元(查询类案例不留测试对象)
493
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
494
+
495
+ console.log('fillStyle:', fillStyle);
496
+ ```
497
+
498
+ ### getstate_linetype
499
+
500
+ # ISCH\_PrimitiveCircle.getState\_LineType() method
501
+
502
+ Get the property state: line type
503
+
504
+ ## Signature
505
+
506
+ ```typescript
507
+ function getState_LineType(): ESCH_PrimitiveLineType | null;
508
+ ```
509
+
510
+ ## Returns
511
+
512
+ [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
513
+
514
+ Line type
515
+
516
+ ## Example
517
+
518
+ ```javascript
519
+ // 1. 创建一个虚线轮廓的测试圆(lineType 传数字枚举,1 = DASHED)
520
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000', null, 6, 1);
521
+
522
+ // 2. 读取线型
523
+ const lineType = circle.getState_LineType();
524
+
525
+ // 3. 清理测试图元(查询类案例不留测试对象)
526
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
527
+
528
+ console.log('lineType:', lineType);
529
+ ```
530
+
531
+ ### getstate_linewidth
532
+
533
+ # ISCH\_PrimitiveCircle.getState\_LineWidth() method
534
+
535
+ Get the property state: Line width
536
+
537
+ ## Signature
538
+
539
+ ```typescript
540
+ function getState_LineWidth(): number | null;
541
+ ```
542
+
543
+ ## Returns
544
+
545
+ number \| null
546
+
547
+ Line width
548
+
549
+ ## Example
550
+
551
+ ```javascript
552
+ // 1. 创建一个线宽 6 的测试圆(SCH 坐标单位 10mil)
553
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150, '#FF0000', null, 6, 0);
554
+
555
+ // 2. 读取线宽
556
+ const lineWidth = circle.getState_LineWidth();
557
+
558
+ // 3. 清理测试图元(查询类案例不留测试对象)
559
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
560
+
561
+ console.log('lineWidth:', lineWidth);
562
+ ```
563
+
564
+ ### getstate_primitiveid
565
+
566
+ # ISCH\_PrimitiveCircle.getState\_PrimitiveId() method
567
+
568
+ Get the property state: primitive ID
569
+
570
+ ## Signature
571
+
572
+ ```typescript
573
+ function getState_PrimitiveId(): string;
574
+ ```
575
+
576
+ ## Returns
577
+
578
+ string
579
+
580
+ Primitive ID
581
+
582
+ ## Example
583
+
584
+ ```javascript
585
+ // 1. 创建一个测试圆(SCH 坐标单位 10mil)
586
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
587
+
588
+ // 2. 读取图元 ID
589
+ const primitiveId = circle.getState_PrimitiveId();
590
+
591
+ // 3. 清理测试图元(查询类案例不留测试对象)
592
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
593
+
594
+ console.log('primitiveId:', primitiveId);
595
+ ```
596
+
597
+ ### getstate_primitivetype
598
+
599
+ # ISCH\_PrimitiveCircle.getState\_PrimitiveType() method
600
+
601
+ Get the property state: primitive type
602
+
603
+ ## Signature
604
+
605
+ ```typescript
606
+ function getState_PrimitiveType(): ESCH_PrimitiveType;
607
+ ```
608
+
609
+ ## Returns
610
+
611
+ [ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
612
+
613
+ Primitive type
614
+
615
+ ## Example
616
+
617
+ ```javascript
618
+ // 1. 创建一个测试圆(SCH 坐标单位 10mil)
619
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
620
+
621
+ // 2. 读取图元类型
622
+ const primitiveType = circle.getState_PrimitiveType();
623
+
624
+ // 3. 清理测试图元(查询类案例不留测试对象)
625
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
626
+
627
+ console.log('primitiveType:', primitiveType);
628
+ ```
629
+
630
+ ### getstate_radius
631
+
632
+ # ISCH\_PrimitiveCircle.getState\_Radius() method
633
+
634
+ Get the property state: radius
635
+
636
+ ## Signature
637
+
638
+ ```typescript
639
+ function getState_Radius(): number;
640
+ ```
641
+
642
+ ## Returns
643
+
644
+ number
645
+
646
+ Radius
647
+
648
+ ## Example
649
+
650
+ ```javascript
651
+ // 1. 创建一个半径 150 的测试圆(SCH 坐标单位 10mil)
652
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
653
+
654
+ // 2. 读取半径
655
+ const radius = circle.getState_Radius();
656
+
657
+ // 3. 清理测试图元(查询类案例不留测试对象)
658
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
659
+
660
+ console.log('radius:', radius);
661
+ ```
662
+
663
+ ### isasync
664
+
665
+ # ISCH\_PrimitiveCircle.isAsync() method
666
+
667
+ Query whether the primitive is an async primitive
668
+
669
+ ## Signature
670
+
671
+ ```typescript
672
+ function isAsync(): boolean;
673
+ ```
674
+
675
+ ## Returns
676
+
677
+ boolean
678
+
679
+ Whether Is async primitive
680
+
681
+ ## Example
682
+
683
+ ```javascript
684
+ // 1. 创建一个测试圆,创建后默认处于异步模式
685
+ const circle = await eda.sch_PrimitiveCircle.create(400, 300, 150);
686
+ const asyncOnCreate = circle.isAsync();
687
+
688
+ // 2. 切换到同步模式再查询一次,对比两种模式
689
+ circle.toSync();
690
+ const asyncAfterToSync = circle.isAsync();
691
+
692
+ // 3. 清理测试图元(查询类案例不留测试对象)
693
+ await eda.sch_PrimitiveCircle.delete([circle.getState_PrimitiveId()]);
694
+
695
+ console.log('isAsync on create:', asyncOnCreate);
696
+ console.log('isAsync after toSync:', asyncAfterToSync);
697
+ ```
698
+
699
+ ### reset
700
+
701
+ # ISCH\_PrimitiveCircle.reset() method
702
+
703
+ > 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.
704
+
705
+ Reset the async primitive to the current canvas state
706
+
707
+ ## Signature
708
+
709
+ ```typescript
710
+ function reset(): Promise<ISCH_PrimitiveCircle>;
711
+ ```
712
+
713
+ ## Returns
714
+
715
+ Promise&lt;[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->&gt;
716
+
717
+ Circle primitive object
718
+
719
+ ## Example
720
+
721
+ ```javascript
722
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
723
+ const x = 2000 + Math.floor(Math.random() * 8000);
724
+ const y = 2000 + Math.floor(Math.random() * 8000);
725
+
726
+ // 2. 创建一个线宽 6 的测试圆(SCH 坐标单位 10mil)
727
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', null, 6, 0);
728
+
729
+ // 3. 切换异步模式,累计一处未提交的线宽修改(6 → 99)
730
+ const asyncCircle = circle.toAsync();
731
+ asyncCircle.setState_LineWidth(99);
732
+
733
+ // 4. 重置:丢弃未提交的修改,回到画布当前状态
734
+ await asyncCircle.reset();
735
+
736
+ // 5. 从画布重新读取,线宽仍是 6(保留现场供观察)
737
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
738
+
739
+ console.log('lineWidth after reset:', refetched.getState_LineWidth());
740
+ ```
741
+
742
+ ### setstate_centerx
743
+
744
+ # ISCH\_PrimitiveCircle.setState\_CenterX() method
745
+
746
+ > 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.
747
+
748
+ Set the property state: center of the circle X
749
+
750
+ ## Signature
751
+
752
+ ```typescript
753
+ function setState_CenterX(centerX: number): ISCH_PrimitiveCircle;
754
+ ```
755
+
756
+ ## Parameters
757
+
758
+ <table><thead><tr><th>
759
+
760
+ Parameter
761
+
762
+ </th><th>
763
+
764
+ Type
765
+
766
+ </th><th>
767
+
768
+ Description
769
+
770
+ </th></tr></thead>
771
+ <tbody><tr><td>
772
+
773
+ centerX
774
+
775
+ </td><td>
776
+
777
+ number
778
+
779
+ </td><td>
780
+
781
+ Center of the circle X
782
+
783
+ </td></tr>
784
+ </tbody></table>
785
+
786
+ ## Returns
787
+
788
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
789
+
790
+ Circle primitive object
791
+
792
+ ## Example
793
+
794
+ ```javascript
795
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
796
+ const x = 2000 + Math.floor(Math.random() * 8000);
797
+ const y = 2000 + Math.floor(Math.random() * 8000);
798
+
799
+ // 2. 创建一个测试圆,圆心 (x, y)、半径 150(SCH 坐标单位 10mil)
800
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
801
+
802
+ // 3. 切换异步模式并把圆心右移 200
803
+ const asyncCircle = circle.toAsync();
804
+ asyncCircle.setState_CenterX(x + 200);
805
+ await asyncCircle.done();
806
+
807
+ // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
808
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
809
+
810
+ console.log('centerX:', x, '→', refetched.getState_CenterX());
811
+ ```
812
+
813
+ ### setstate_centery
814
+
815
+ # ISCH\_PrimitiveCircle.setState\_CenterY() method
816
+
817
+ > 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.
818
+
819
+ Set the property state: center of the circle Y
820
+
821
+ ## Signature
822
+
823
+ ```typescript
824
+ function setState_CenterY(centerY: number): ISCH_PrimitiveCircle;
825
+ ```
826
+
827
+ ## Parameters
828
+
829
+ <table><thead><tr><th>
830
+
831
+ Parameter
832
+
833
+ </th><th>
834
+
835
+ Type
836
+
837
+ </th><th>
838
+
839
+ Description
840
+
841
+ </th></tr></thead>
842
+ <tbody><tr><td>
843
+
844
+ centerY
845
+
846
+ </td><td>
847
+
848
+ number
849
+
850
+ </td><td>
851
+
852
+ Center of the circle Y
853
+
854
+ </td></tr>
855
+ </tbody></table>
856
+
857
+ ## Returns
858
+
859
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
860
+
861
+ Circle primitive object
862
+
863
+ ## Example
864
+
865
+ ```javascript
866
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
867
+ const x = 2000 + Math.floor(Math.random() * 8000);
868
+ const y = 2000 + Math.floor(Math.random() * 8000);
869
+
870
+ // 2. 创建一个测试圆,圆心 (x, y)、半径 150(SCH 坐标单位 10mil)
871
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
872
+
873
+ // 3. 切换异步模式并把圆心上移 200
874
+ const asyncCircle = circle.toAsync();
875
+ asyncCircle.setState_CenterY(y + 200);
876
+ await asyncCircle.done();
877
+
878
+ // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
879
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
880
+
881
+ console.log('centerY:', y, '→', refetched.getState_CenterY());
882
+ ```
883
+
884
+ ### setstate_color
885
+
886
+ # ISCH\_PrimitiveCircle.setState\_Color() method
887
+
888
+ > 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.
889
+
890
+ Set the property state: color
891
+
892
+ ## Signature
893
+
894
+ ```typescript
895
+ function setState_Color(color: string | null): ISCH_PrimitiveCircle;
896
+ ```
897
+
898
+ ## Parameters
899
+
900
+ <table><thead><tr><th>
901
+
902
+ Parameter
903
+
904
+ </th><th>
905
+
906
+ Type
907
+
908
+ </th><th>
909
+
910
+ Description
911
+
912
+ </th></tr></thead>
913
+ <tbody><tr><td>
914
+
915
+ color
916
+
917
+ </td><td>
918
+
919
+ string \| null
920
+
921
+ </td><td>
922
+
923
+ Color
924
+
925
+ </td></tr>
926
+ </tbody></table>
927
+
928
+ ## Returns
929
+
930
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
931
+
932
+ Circle primitive object
933
+
934
+ ## Example
935
+
936
+ ```javascript
937
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
938
+ const x = 2000 + Math.floor(Math.random() * 8000);
939
+ const y = 2000 + Math.floor(Math.random() * 8000);
940
+
941
+ // 2. 创建一个红色轮廓的测试圆(SCH 坐标单位 10mil)
942
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000');
943
+
944
+ // 3. 切换异步模式并改为绿色
945
+ const asyncCircle = circle.toAsync();
946
+ asyncCircle.setState_Color('#00AA00');
947
+ await asyncCircle.done();
948
+
949
+ // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
950
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
951
+
952
+ console.log('color:', '#FF0000', '→', refetched.getState_Color());
953
+ ```
954
+
955
+ ### setstate_fillcolor
956
+
957
+ # ISCH\_PrimitiveCircle.setState\_FillColor() method
958
+
959
+ > 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.
960
+
961
+ Set the property state: fill color
962
+
963
+ ## Signature
964
+
965
+ ```typescript
966
+ function setState_FillColor(fillColor: string | null): ISCH_PrimitiveCircle;
967
+ ```
968
+
969
+ ## Parameters
970
+
971
+ <table><thead><tr><th>
972
+
973
+ Parameter
974
+
975
+ </th><th>
976
+
977
+ Type
978
+
979
+ </th><th>
980
+
981
+ Description
982
+
983
+ </th></tr></thead>
984
+ <tbody><tr><td>
985
+
986
+ fillColor
987
+
988
+ </td><td>
989
+
990
+ string \| null
991
+
992
+ </td><td>
993
+
994
+ Fill color
995
+
996
+ </td></tr>
997
+ </tbody></table>
998
+
999
+ ## Returns
1000
+
1001
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1002
+
1003
+ Circle primitive object
1004
+
1005
+ ## Example
1006
+
1007
+ ```javascript
1008
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1009
+ const x = 2000 + Math.floor(Math.random() * 8000);
1010
+ const y = 2000 + Math.floor(Math.random() * 8000);
1011
+
1012
+ // 2. 创建一个黄色填充的测试圆(SCH 坐标单位 10mil)
1013
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', '#FFEC8B');
1014
+
1015
+ // 3. 切换异步模式并改为浅蓝填充
1016
+ const asyncCircle = circle.toAsync();
1017
+ asyncCircle.setState_FillColor('#A0D8EF');
1018
+ await asyncCircle.done();
1019
+
1020
+ // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1021
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1022
+
1023
+ console.log('fillColor:', '#FFEC8B', '→', refetched.getState_FillColor());
1024
+ ```
1025
+
1026
+ ### setstate_fillstyle
1027
+
1028
+ # ISCH\_PrimitiveCircle.setState\_FillStyle() method
1029
+
1030
+ > 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.
1031
+
1032
+ Set the property state: fill style
1033
+
1034
+ ## Signature
1035
+
1036
+ ```typescript
1037
+ function setState_FillStyle(fillStyle: ESCH_PrimitiveFillStyle | null): ISCH_PrimitiveCircle;
1038
+ ```
1039
+
1040
+ ## Parameters
1041
+
1042
+ <table><thead><tr><th>
1043
+
1044
+ Parameter
1045
+
1046
+ </th><th>
1047
+
1048
+ Type
1049
+
1050
+ </th><th>
1051
+
1052
+ Description
1053
+
1054
+ </th></tr></thead>
1055
+ <tbody><tr><td>
1056
+
1057
+ fillStyle
1058
+
1059
+ </td><td>
1060
+
1061
+ [ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
1062
+
1063
+ </td><td>
1064
+
1065
+ Fill style
1066
+
1067
+ </td></tr>
1068
+ </tbody></table>
1069
+
1070
+ ## Returns
1071
+
1072
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1073
+
1074
+ Circle primitive object
1075
+
1076
+ ## Example
1077
+
1078
+ ```javascript
1079
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1080
+ const x = 2000 + Math.floor(Math.random() * 8000);
1081
+ const y = 2000 + Math.floor(Math.random() * 8000);
1082
+
1083
+ // 2. 创建一个实心填充的测试圆(fillStyle 传字符串枚举 'Solid')
1084
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', '#FFEC8B', 6, 0, 'Solid');
1085
+
1086
+ // 3. 切换异步模式并改为网格填充
1087
+ const asyncCircle = circle.toAsync();
1088
+ asyncCircle.setState_FillStyle('Grid');
1089
+ await asyncCircle.done();
1090
+
1091
+ // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1092
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1093
+
1094
+ console.log('fillStyle:', 'Solid', '→', refetched.getState_FillStyle());
1095
+ ```
1096
+
1097
+ ### setstate_linetype
1098
+
1099
+ # ISCH\_PrimitiveCircle.setState\_LineType() method
1100
+
1101
+ > 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.
1102
+
1103
+ Set the property state: line type
1104
+
1105
+ ## Signature
1106
+
1107
+ ```typescript
1108
+ function setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveCircle;
1109
+ ```
1110
+
1111
+ ## Parameters
1112
+
1113
+ <table><thead><tr><th>
1114
+
1115
+ Parameter
1116
+
1117
+ </th><th>
1118
+
1119
+ Type
1120
+
1121
+ </th><th>
1122
+
1123
+ Description
1124
+
1125
+ </th></tr></thead>
1126
+ <tbody><tr><td>
1127
+
1128
+ lineType
1129
+
1130
+ </td><td>
1131
+
1132
+ [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
1133
+
1134
+ </td><td>
1135
+
1136
+ Line type
1137
+
1138
+ </td></tr>
1139
+ </tbody></table>
1140
+
1141
+ ## Returns
1142
+
1143
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1144
+
1145
+ Circle primitive object
1146
+
1147
+ ## Example
1148
+
1149
+ ```javascript
1150
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1151
+ const x = 2000 + Math.floor(Math.random() * 8000);
1152
+ const y = 2000 + Math.floor(Math.random() * 8000);
1153
+
1154
+ // 2. 创建一个实线轮廓的测试圆(lineType 0 = SOLID)
1155
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', null, 6, 0);
1156
+
1157
+ // 3. 切换异步模式并改为虚线
1158
+ const asyncCircle = circle.toAsync();
1159
+ asyncCircle.setState_LineType(1);
1160
+ await asyncCircle.done();
1161
+
1162
+ // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1163
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1164
+
1165
+ console.log('lineType:', 0, '→', refetched.getState_LineType());
1166
+ ```
1167
+
1168
+ ### setstate_linewidth
1169
+
1170
+ # ISCH\_PrimitiveCircle.setState\_LineWidth() method
1171
+
1172
+ > 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.
1173
+
1174
+ Set the property state: Line width
1175
+
1176
+ ## Signature
1177
+
1178
+ ```typescript
1179
+ function setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveCircle;
1180
+ ```
1181
+
1182
+ ## Parameters
1183
+
1184
+ <table><thead><tr><th>
1185
+
1186
+ Parameter
1187
+
1188
+ </th><th>
1189
+
1190
+ Type
1191
+
1192
+ </th><th>
1193
+
1194
+ Description
1195
+
1196
+ </th></tr></thead>
1197
+ <tbody><tr><td>
1198
+
1199
+ lineWidth
1200
+
1201
+ </td><td>
1202
+
1203
+ number \| null
1204
+
1205
+ </td><td>
1206
+
1207
+ Line width
1208
+
1209
+ </td></tr>
1210
+ </tbody></table>
1211
+
1212
+ ## Returns
1213
+
1214
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1215
+
1216
+ Circle primitive object
1217
+
1218
+ ## Example
1219
+
1220
+ ```javascript
1221
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1222
+ const x = 2000 + Math.floor(Math.random() * 8000);
1223
+ const y = 2000 + Math.floor(Math.random() * 8000);
1224
+
1225
+ // 2. 创建一个线宽 6 的测试圆(SCH 坐标单位 10mil)
1226
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150, '#FF0000', null, 6, 0);
1227
+
1228
+ // 3. 切换异步模式并把线宽加粗到 10
1229
+ const asyncCircle = circle.toAsync();
1230
+ asyncCircle.setState_LineWidth(10);
1231
+ await asyncCircle.done();
1232
+
1233
+ // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1234
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1235
+
1236
+ console.log('lineWidth:', 6, '→', refetched.getState_LineWidth());
1237
+ ```
1238
+
1239
+ ### setstate_radius
1240
+
1241
+ # ISCH\_PrimitiveCircle.setState\_Radius() method
1242
+
1243
+ > 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.
1244
+
1245
+ Set the property state: radius
1246
+
1247
+ ## Signature
1248
+
1249
+ ```typescript
1250
+ function setState_Radius(radius: number): ISCH_PrimitiveCircle;
1251
+ ```
1252
+
1253
+ ## Parameters
1254
+
1255
+ <table><thead><tr><th>
1256
+
1257
+ Parameter
1258
+
1259
+ </th><th>
1260
+
1261
+ Type
1262
+
1263
+ </th><th>
1264
+
1265
+ Description
1266
+
1267
+ </th></tr></thead>
1268
+ <tbody><tr><td>
1269
+
1270
+ radius
1271
+
1272
+ </td><td>
1273
+
1274
+ number
1275
+
1276
+ </td><td>
1277
+
1278
+ Radius
1279
+
1280
+ </td></tr>
1281
+ </tbody></table>
1282
+
1283
+ ## Returns
1284
+
1285
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1286
+
1287
+ Circle primitive object
1288
+
1289
+ ## Example
1290
+
1291
+ ```javascript
1292
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1293
+ const x = 2000 + Math.floor(Math.random() * 8000);
1294
+ const y = 2000 + Math.floor(Math.random() * 8000);
1295
+
1296
+ // 2. 创建一个半径 150 的测试圆(SCH 坐标单位 10mil)
1297
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
1298
+
1299
+ // 3. 切换异步模式并把半径扩大到 250
1300
+ const asyncCircle = circle.toAsync();
1301
+ asyncCircle.setState_Radius(250);
1302
+ await asyncCircle.done();
1303
+
1304
+ // 4. 从画布重新读取,确认修改已生效(保留现场供观察)
1305
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1306
+
1307
+ console.log('radius:', 150, '→', refetched.getState_Radius());
1308
+ ```
1309
+
1310
+ ### toasync
1311
+
1312
+ # ISCH\_PrimitiveCircle.toAsync() method
1313
+
1314
+ Convert Primitive to Async primitive
1315
+
1316
+ ## Signature
1317
+
1318
+ ```typescript
1319
+ function toAsync(): ISCH_PrimitiveCircle;
1320
+ ```
1321
+
1322
+ ## Returns
1323
+
1324
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1325
+
1326
+ Circle primitive object
1327
+
1328
+ ## Example
1329
+
1330
+ ```javascript
1331
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1332
+ const x = 2000 + Math.floor(Math.random() * 8000);
1333
+ const y = 2000 + Math.floor(Math.random() * 8000);
1334
+
1335
+ // 2. 创建一个测试圆(SCH 坐标单位 10mil)
1336
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
1337
+
1338
+ // 3. 先切换到同步模式,再切回异步模式
1339
+ circle.toSync();
1340
+ const asyncCircle = circle.toAsync();
1341
+
1342
+ // 4. 异步模式下修改半径,调用 done() 提交到画布
1343
+ asyncCircle.setState_Radius(250);
1344
+ await asyncCircle.done();
1345
+
1346
+ // 5. 从画布重新读取,确认修改已生效(保留现场供观察)
1347
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1348
+
1349
+ console.log('isAsync after toAsync:', circle.isAsync());
1350
+ console.log('radius:', 150, '→', refetched.getState_Radius());
1351
+ ```
1352
+
1353
+ ### tosync
1354
+
1355
+ # ISCH\_PrimitiveCircle.toSync() method
1356
+
1357
+ Convert Primitive to Sync primitive
1358
+
1359
+ ## Signature
1360
+
1361
+ ```typescript
1362
+ function toSync(): ISCH_PrimitiveCircle;
1363
+ ```
1364
+
1365
+ ## Returns
1366
+
1367
+ [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
1368
+
1369
+ Circle primitive object
1370
+
1371
+ ## Example
1372
+
1373
+ ```javascript
1374
+ // 1. 生成本次运行专用的坐标,避免与之前保留的测试圆重合
1375
+ const x = 2000 + Math.floor(Math.random() * 8000);
1376
+ const y = 2000 + Math.floor(Math.random() * 8000);
1377
+
1378
+ // 2. 创建一个测试圆(创建后默认处于异步模式)
1379
+ const circle = await eda.sch_PrimitiveCircle.create(x, y, 150);
1380
+
1381
+ // 3. 转换为同步图元
1382
+ const syncCircle = circle.toSync();
1383
+
1384
+ // 4. 同步模式下扩大半径,立即生效,无需 done()
1385
+ syncCircle.setState_Radius(250);
1386
+
1387
+ // 5. 从画布重新读取,确认修改已生效(保留现场供观察)
1388
+ const refetched = await eda.sch_PrimitiveCircle.get(circle.getState_PrimitiveId());
1389
+
1390
+ console.log('isAsync after toSync:', circle.isAsync());
1391
+ console.log('radius:', 150, '→', refetched.getState_Radius());
1392
+ ```