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