@windypro-rourou/dsh-eda 0.1.0 → 0.1.1
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 +71 -119
- package/cordis.patch.yml +9 -7
- package/lib/board.js +80 -0
- package/lib/client.js +2 -2
- package/lib/index.js +339 -11
- package/lib/installer.js +4 -4
- package/lib/skill.js +138 -0
- package/package.json +12 -2
- package/skill/INDEX.md +193 -0
- package/skill/README.official.md +125 -0
- package/skill/README.zh-Hans.official.md +125 -0
- package/skill/SKILL.md +746 -0
- package/skill/format/index.md +152 -0
- package/skill/format/pcb/3d.md +166 -0
- package/skill/format/pcb/attr.md +63 -0
- package/skill/format/pcb/common.md +306 -0
- package/skill/format/pcb/component.md +132 -0
- package/skill/format/pcb/dimension.md +58 -0
- package/skill/format/pcb/index.md +17 -0
- package/skill/format/pcb/obj.md +43 -0
- package/skill/format/pcb/pad_via.md +151 -0
- package/skill/format/pcb/panel.md +64 -0
- package/skill/format/pcb/partition.md +43 -0
- package/skill/format/pcb/primitive.md +196 -0
- package/skill/format/pcb/rule.md +71 -0
- package/skill/format/pcb/shape.md +441 -0
- package/skill/format/pcb/text.md +62 -0
- package/skill/format/project/blob.md +30 -0
- package/skill/format/project/common.md +42 -0
- package/skill/format/project/group.md +62 -0
- package/skill/format/project/index.md +12 -0
- package/skill/format/project/instance.md +32 -0
- package/skill/format/project/meta.md +189 -0
- package/skill/format/project/variant.md +30 -0
- package/skill/format/schematic/attr.md +41 -0
- package/skill/format/schematic/common.md +47 -0
- package/skill/format/schematic/component.md +91 -0
- package/skill/format/schematic/index.md +14 -0
- package/skill/format/schematic/obj.md +41 -0
- package/skill/format/schematic/pin.md +59 -0
- package/skill/format/schematic/shape.md +231 -0
- package/skill/format/schematic/structure.md +53 -0
- package/skill/format/schematic/table.md +109 -0
- package/skill/format/schematic/text.md +47 -0
- package/skill/format/schematic/wire.md +132 -0
- package/skill/guide/ancillary-projects/pro-api-sdk.md +1 -0
- package/skill/guide/ancillary-projects/pro-api-types.md +5 -0
- package/skill/guide/ancillary-projects.md +10 -0
- package/skill/guide/error-handling.md +38 -0
- package/skill/guide/extension-json.md +135 -0
- package/skill/guide/extensions-marketplace.md +61 -0
- package/skill/guide/how-to-start.md +301 -0
- package/skill/guide/i18n.md +57 -0
- package/skill/guide/index.md +7 -0
- package/skill/guide/inline-frame.md +20 -0
- package/skill/guide/invoke-apis.md +81 -0
- package/skill/guide/stability.md +37 -0
- package/skill/references/_index.md +398 -0
- package/skill/references/_quick-reference.md +3028 -0
- package/skill/references/classes/DMT_Board.md +533 -0
- package/skill/references/classes/DMT_EditorControl.md +1736 -0
- package/skill/references/classes/DMT_Event.md +356 -0
- package/skill/references/classes/DMT_Folder.md +775 -0
- package/skill/references/classes/DMT_Panel.md +531 -0
- package/skill/references/classes/DMT_Pcb.md +575 -0
- package/skill/references/classes/DMT_Project.md +573 -0
- package/skill/references/classes/DMT_Schematic.md +1477 -0
- package/skill/references/classes/DMT_SelectControl.md +96 -0
- package/skill/references/classes/DMT_Team.md +172 -0
- package/skill/references/classes/DMT_Workspace.md +198 -0
- package/skill/references/classes/EDA.md +961 -0
- package/skill/references/classes/IPCB_ComplexPolygon.md +299 -0
- package/skill/references/classes/IPCB_Polygon.md +175 -0
- package/skill/references/classes/IPCB_PrimitiveArc.md +1901 -0
- package/skill/references/classes/IPCB_PrimitiveAttribute.md +2993 -0
- package/skill/references/classes/IPCB_PrimitiveComponent.md +2627 -0
- package/skill/references/classes/IPCB_PrimitiveComponentPad.md +410 -0
- package/skill/references/classes/IPCB_PrimitiveDimension.md +1419 -0
- package/skill/references/classes/IPCB_PrimitiveFill.md +1325 -0
- package/skill/references/classes/IPCB_PrimitiveImage.md +1461 -0
- package/skill/references/classes/IPCB_PrimitiveLine.md +1639 -0
- package/skill/references/classes/IPCB_PrimitiveObject.md +1700 -0
- package/skill/references/classes/IPCB_PrimitivePad.md +3155 -0
- package/skill/references/classes/IPCB_PrimitivePolyline.md +1193 -0
- package/skill/references/classes/IPCB_PrimitivePour.md +1858 -0
- package/skill/references/classes/IPCB_PrimitivePoured.md +556 -0
- package/skill/references/classes/IPCB_PrimitiveRegion.md +1332 -0
- package/skill/references/classes/IPCB_PrimitiveString.md +2315 -0
- package/skill/references/classes/IPCB_PrimitiveVia.md +1588 -0
- package/skill/references/classes/ISCH_PrimitiveArc.md +1676 -0
- package/skill/references/classes/ISCH_PrimitiveAttribute.md +2541 -0
- package/skill/references/classes/ISCH_PrimitiveBus.md +973 -0
- package/skill/references/classes/ISCH_PrimitiveCbbSymbolComponent.md +260 -0
- package/skill/references/classes/ISCH_PrimitiveCircle.md +1392 -0
- package/skill/references/classes/ISCH_PrimitiveComponent.md +2913 -0
- package/skill/references/classes/ISCH_PrimitiveComponentPin.md +155 -0
- package/skill/references/classes/ISCH_PrimitiveObject.md +960 -0
- package/skill/references/classes/ISCH_PrimitivePin.md +2402 -0
- package/skill/references/classes/ISCH_PrimitivePolygon.md +1028 -0
- package/skill/references/classes/ISCH_PrimitiveRectangle.md +1777 -0
- package/skill/references/classes/ISCH_PrimitiveText.md +1771 -0
- package/skill/references/classes/ISCH_PrimitiveWire.md +973 -0
- package/skill/references/classes/LIB_3DModel.md +780 -0
- package/skill/references/classes/LIB_Cbb.md +957 -0
- package/skill/references/classes/LIB_Classification.md +965 -0
- package/skill/references/classes/LIB_Device.md +1221 -0
- package/skill/references/classes/LIB_Footprint.md +1153 -0
- package/skill/references/classes/LIB_LibrariesList.md +329 -0
- package/skill/references/classes/LIB_PanelLibrary.md +855 -0
- package/skill/references/classes/LIB_SelectControl.md +89 -0
- package/skill/references/classes/LIB_SimulationModel.md +821 -0
- package/skill/references/classes/LIB_Symbol.md +1195 -0
- package/skill/references/classes/PCB_Document.md +1754 -0
- package/skill/references/classes/PCB_Drc.md +3375 -0
- package/skill/references/classes/PCB_Event.md +1081 -0
- package/skill/references/classes/PCB_Layer.md +1911 -0
- package/skill/references/classes/PCB_ManufactureData.md +2968 -0
- package/skill/references/classes/PCB_MathPolygon.md +785 -0
- package/skill/references/classes/PCB_Net.md +1128 -0
- package/skill/references/classes/PCB_Primitive.md +217 -0
- package/skill/references/classes/PCB_PrimitiveArc.md +894 -0
- package/skill/references/classes/PCB_PrimitiveAttribute.md +717 -0
- package/skill/references/classes/PCB_PrimitiveComponent.md +1050 -0
- package/skill/references/classes/PCB_PrimitiveDimension.md +833 -0
- package/skill/references/classes/PCB_PrimitiveFill.md +861 -0
- package/skill/references/classes/PCB_PrimitiveImage.md +875 -0
- package/skill/references/classes/PCB_PrimitiveLine.md +858 -0
- package/skill/references/classes/PCB_PrimitiveObject.md +800 -0
- package/skill/references/classes/PCB_PrimitivePad.md +944 -0
- package/skill/references/classes/PCB_PrimitivePolyline.md +819 -0
- package/skill/references/classes/PCB_PrimitivePour.md +845 -0
- package/skill/references/classes/PCB_PrimitivePoured.md +363 -0
- package/skill/references/classes/PCB_PrimitiveRegion.md +799 -0
- package/skill/references/classes/PCB_PrimitiveString.md +910 -0
- package/skill/references/classes/PCB_PrimitiveVia.md +765 -0
- package/skill/references/classes/PCB_RayTracerEngine.md +263 -0
- package/skill/references/classes/PCB_SelectControl.md +495 -0
- package/skill/references/classes/PNL_Document.md +83 -0
- package/skill/references/classes/SCH_Document.md +809 -0
- package/skill/references/classes/SCH_Drc.md +242 -0
- package/skill/references/classes/SCH_Event.md +583 -0
- package/skill/references/classes/SCH_ManufactureData.md +1205 -0
- package/skill/references/classes/SCH_Net.md +200 -0
- package/skill/references/classes/SCH_Netlist.md +191 -0
- package/skill/references/classes/SCH_Primitive.md +337 -0
- package/skill/references/classes/SCH_PrimitiveArc.md +692 -0
- package/skill/references/classes/SCH_PrimitiveAttribute.md +590 -0
- package/skill/references/classes/SCH_PrimitiveBus.md +624 -0
- package/skill/references/classes/SCH_PrimitiveCircle.md +683 -0
- package/skill/references/classes/SCH_PrimitiveComponent.md +2240 -0
- package/skill/references/classes/SCH_PrimitiveObject.md +666 -0
- package/skill/references/classes/SCH_PrimitivePin.md +754 -0
- package/skill/references/classes/SCH_PrimitivePolygon.md +627 -0
- package/skill/references/classes/SCH_PrimitiveRectangle.md +731 -0
- package/skill/references/classes/SCH_PrimitiveText.md +746 -0
- package/skill/references/classes/SCH_PrimitiveWire.md +703 -0
- package/skill/references/classes/SCH_SelectControl.md +520 -0
- package/skill/references/classes/SCH_SimulationEngine.md +133 -0
- package/skill/references/classes/SCH_Utils.md +121 -0
- package/skill/references/classes/SYS_ClientUrl.md +173 -0
- package/skill/references/classes/SYS_Dialog.md +825 -0
- package/skill/references/classes/SYS_Environment.md +502 -0
- package/skill/references/classes/SYS_FileManager.md +1686 -0
- package/skill/references/classes/SYS_FileSystem.md +1171 -0
- package/skill/references/classes/SYS_FontManager.md +224 -0
- package/skill/references/classes/SYS_FormatConversion.md +349 -0
- package/skill/references/classes/SYS_HeaderMenu.md +479 -0
- package/skill/references/classes/SYS_I18n.md +861 -0
- package/skill/references/classes/SYS_IFrame.md +535 -0
- package/skill/references/classes/SYS_LoadingAndProgressBar.md +246 -0
- package/skill/references/classes/SYS_Log.md +424 -0
- package/skill/references/classes/SYS_Math.md +1565 -0
- package/skill/references/classes/SYS_Message.md +363 -0
- package/skill/references/classes/SYS_MessageBox.md +285 -0
- package/skill/references/classes/SYS_MessageBus.md +1618 -0
- package/skill/references/classes/SYS_PanelControl.md +696 -0
- package/skill/references/classes/SYS_RightClickMenu.md +175 -0
- package/skill/references/classes/SYS_Setting.md +85 -0
- package/skill/references/classes/SYS_ShortcutKey.md +623 -0
- package/skill/references/classes/SYS_Storage.md +484 -0
- package/skill/references/classes/SYS_Timer.md +447 -0
- package/skill/references/classes/SYS_ToastMessage.md +194 -0
- package/skill/references/classes/SYS_Tool.md +241 -0
- package/skill/references/classes/SYS_Unit.md +594 -0
- package/skill/references/classes/SYS_WebSocket.md +401 -0
- package/skill/references/classes/SYS_Window.md +850 -0
- package/skill/references/enums/EDMT_EditorDocumentType.md +279 -0
- package/skill/references/enums/EDMT_EditorSplitScreenDirection.md +48 -0
- package/skill/references/enums/EDMT_EditorTabEventType.md +63 -0
- package/skill/references/enums/EDMT_IndicatorMarkerType.md +81 -0
- package/skill/references/enums/EDMT_ItemType.md +158 -0
- package/skill/references/enums/EDMT_ProjectCollaborationMode.md +48 -0
- package/skill/references/enums/ELIB_DeviceJlcLibraryCategory.md +48 -0
- package/skill/references/enums/ELIB_LibraryType.md +114 -0
- package/skill/references/enums/ELIB_PreviewType.md +70 -0
- package/skill/references/enums/ELIB_SimulationModelType.md +48 -0
- package/skill/references/enums/ELIB_SymbolType.md +125 -0
- package/skill/references/enums/EPCB_AutoRoutingCornerStyle.md +48 -0
- package/skill/references/enums/EPCB_AutoRoutingExistingPrimitiveMode.md +48 -0
- package/skill/references/enums/EPCB_AutoRoutingOptimization.md +48 -0
- package/skill/references/enums/EPCB_DocumentCanvasUpdateCalculationActiveStatus.md +48 -0
- package/skill/references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md +52 -0
- package/skill/references/enums/EPCB_InactiveLayerDisplayMode.md +59 -0
- package/skill/references/enums/EPCB_LayerColorConfiguration.md +81 -0
- package/skill/references/enums/EPCB_LayerId.md +882 -0
- package/skill/references/enums/EPCB_LayerStatus.md +59 -0
- package/skill/references/enums/EPCB_LayerType.md +114 -0
- package/skill/references/enums/EPCB_MouseEventType.md +59 -0
- package/skill/references/enums/EPCB_NetEventType.md +59 -0
- package/skill/references/enums/EPCB_PcbPlateType.md +48 -0
- package/skill/references/enums/EPCB_PdfOutputMethod.md +59 -0
- package/skill/references/enums/EPCB_PrimitiveArcInteractiveMode.md +48 -0
- package/skill/references/enums/EPCB_PrimitiveDimensionType.md +59 -0
- package/skill/references/enums/EPCB_PrimitiveEventType.md +59 -0
- package/skill/references/enums/EPCB_PrimitiveFillMode.md +63 -0
- package/skill/references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md +59 -0
- package/skill/references/enums/EPCB_PrimitivePadHoleType.md +59 -0
- package/skill/references/enums/EPCB_PrimitivePadShapeType.md +81 -0
- package/skill/references/enums/EPCB_PrimitivePadType.md +59 -0
- package/skill/references/enums/EPCB_PrimitivePourFillMethod.md +59 -0
- package/skill/references/enums/EPCB_PrimitiveRegionRuleType.md +96 -0
- package/skill/references/enums/EPCB_PrimitiveStringAlignMode.md +125 -0
- package/skill/references/enums/EPCB_PrimitiveType.md +202 -0
- package/skill/references/enums/EPCB_PrimitiveViaType.md +59 -0
- package/skill/references/enums/ESCH_DynamicSimulationEnginePullEventType.md +103 -0
- package/skill/references/enums/ESCH_DynamicSimulationEnginePushEventType.md +81 -0
- package/skill/references/enums/ESCH_ExportDocumentFileType.md +59 -0
- package/skill/references/enums/ESCH_MouseEventType.md +48 -0
- package/skill/references/enums/ESCH_PrimitiveComponentType.md +125 -0
- package/skill/references/enums/ESCH_PrimitiveEventType.md +70 -0
- package/skill/references/enums/ESCH_PrimitiveFillStyle.md +114 -0
- package/skill/references/enums/ESCH_PrimitiveLineType.md +70 -0
- package/skill/references/enums/ESCH_PrimitivePinShape.md +70 -0
- package/skill/references/enums/ESCH_PrimitivePinType.md +147 -0
- package/skill/references/enums/ESCH_PrimitiveTextAlignMode.md +125 -0
- package/skill/references/enums/ESCH_PrimitiveType.md +180 -0
- package/skill/references/enums/ESCH_SimulationNetlistType.md +37 -0
- package/skill/references/enums/ESCH_SpiceSimulationEnginePullEventType.md +48 -0
- package/skill/references/enums/ESCH_SpiceSimulationEnginePushEventType.md +70 -0
- package/skill/references/enums/ESYS_BottomPanelTab.md +81 -0
- package/skill/references/enums/ESYS_HeaderMenuEnvironment.md +158 -0
- package/skill/references/enums/ESYS_ImportProjectBoardOutlineSource.md +52 -0
- package/skill/references/enums/ESYS_ImportProjectImportOption.md +59 -0
- package/skill/references/enums/ESYS_ImportProjectSchematicObjectStyle.md +48 -0
- package/skill/references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md +52 -0
- package/skill/references/enums/ESYS_LeftPanelTab.md +81 -0
- package/skill/references/enums/ESYS_LogType.md +103 -0
- package/skill/references/enums/ESYS_NetlistType.md +114 -0
- package/skill/references/enums/ESYS_RightPanelTab.md +202 -0
- package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorRange.md +191 -0
- package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md +92 -0
- package/skill/references/enums/ESYS_StartPageQuickStartItem.md +206 -0
- package/skill/references/enums/ESYS_Theme.md +48 -0
- package/skill/references/enums/ESYS_ToastMessageType.md +81 -0
- package/skill/references/enums/ESYS_Unit.md +103 -0
- package/skill/references/enums/ESYS_WindowEventType.md +48 -0
- package/skill/references/enums/ESYS_WindowOpenTarget.md +48 -0
- package/skill/references/enums/NetportDeviceName.md +147 -0
- package/skill/references/enums/SchToolBarDeviceName.md +279 -0
- package/skill/references/interfaces/BoardProps.md +169 -0
- package/skill/references/interfaces/ButtonProps.md +169 -0
- package/skill/references/interfaces/CheckBoxProps.md +196 -0
- package/skill/references/interfaces/ComponentPropsMap.md +448 -0
- package/skill/references/interfaces/DialogProps.md +385 -0
- package/skill/references/interfaces/FlexItemProps.md +116 -0
- package/skill/references/interfaces/FlexProps.md +224 -0
- package/skill/references/interfaces/GridItemProps.md +143 -0
- package/skill/references/interfaces/GridProps.md +143 -0
- package/skill/references/interfaces/IDMT_BoardItem.md +171 -0
- package/skill/references/interfaces/IDMT_BriefProjectItem.md +171 -0
- package/skill/references/interfaces/IDMT_EditorDocumentItem.md +169 -0
- package/skill/references/interfaces/IDMT_EditorSplitScreenItem.md +173 -0
- package/skill/references/interfaces/IDMT_EditorTabItem.md +169 -0
- package/skill/references/interfaces/IDMT_FolderItem.md +225 -0
- package/skill/references/interfaces/IDMT_IndicatorMarkerShape.md +393 -0
- package/skill/references/interfaces/IDMT_PanelItem.md +144 -0
- package/skill/references/interfaces/IDMT_PcbItem.md +171 -0
- package/skill/references/interfaces/IDMT_ProjectItem.md +143 -0
- package/skill/references/interfaces/IDMT_SchematicItem.md +225 -0
- package/skill/references/interfaces/IDMT_SchematicPageItem.md +198 -0
- package/skill/references/interfaces/IDMT_TeamItem.md +144 -0
- package/skill/references/interfaces/IDMT_WorkspaceItem.md +117 -0
- package/skill/references/interfaces/IDesignPortal.md +103 -0
- package/skill/references/interfaces/ILIB_3DModelItem.md +198 -0
- package/skill/references/interfaces/ILIB_3DModelSearchItem.md +277 -0
- package/skill/references/interfaces/ILIB_CbbItem.md +225 -0
- package/skill/references/interfaces/ILIB_CbbSearchItem.md +277 -0
- package/skill/references/interfaces/ILIB_ClassificationIndex.md +150 -0
- package/skill/references/interfaces/ILIB_DeviceAssociationItem.md +210 -0
- package/skill/references/interfaces/ILIB_DeviceExtendPropertyItem.md +304 -0
- package/skill/references/interfaces/ILIB_DeviceItem.md +279 -0
- package/skill/references/interfaces/ILIB_DevicePropertiesForSearch.md +250 -0
- package/skill/references/interfaces/ILIB_DeviceSearchItem.md +521 -0
- package/skill/references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md +64 -0
- package/skill/references/interfaces/ILIB_ExtendLibraryCbbFunctions.md +99 -0
- package/skill/references/interfaces/ILIB_ExtendLibraryClassificationIndex.md +150 -0
- package/skill/references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md +157 -0
- package/skill/references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md +63 -0
- package/skill/references/interfaces/ILIB_ExtendLibraryFunctions.md +123 -0
- package/skill/references/interfaces/ILIB_ExtendLibraryItem.md +97 -0
- package/skill/references/interfaces/ILIB_ExtendLibraryItemIndex.md +98 -0
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchProperty.md +115 -0
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchResult.md +169 -0
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md +234 -0
- package/skill/references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md +105 -0
- package/skill/references/interfaces/ILIB_ExtendLibraryUserIndex.md +96 -0
- package/skill/references/interfaces/ILIB_FootprintItem.md +198 -0
- package/skill/references/interfaces/ILIB_FootprintPropertiesForSearch.md +61 -0
- package/skill/references/interfaces/ILIB_FootprintSearchItem.md +277 -0
- package/skill/references/interfaces/ILIB_LibraryInfo.md +92 -0
- package/skill/references/interfaces/ILIB_LibraryItem.md +115 -0
- package/skill/references/interfaces/ILIB_PanelLibraryItem.md +198 -0
- package/skill/references/interfaces/ILIB_PanelLibrarySearchItem.md +277 -0
- package/skill/references/interfaces/ILIB_SimulationModelItem.md +306 -0
- package/skill/references/interfaces/ILIB_SimulationModelSearchItem.md +304 -0
- package/skill/references/interfaces/ILIB_SymbolItem.md +279 -0
- package/skill/references/interfaces/ILIB_SymbolPropertiesForSearch.md +61 -0
- package/skill/references/interfaces/ILIB_SymbolSearchItem.md +304 -0
- package/skill/references/interfaces/IPCB_AutoLayoutResult.md +169 -0
- package/skill/references/interfaces/IPCB_AutoRoutingProps.md +220 -0
- package/skill/references/interfaces/IPCB_AutoRoutingResult.md +169 -0
- package/skill/references/interfaces/IPCB_BomPropertiesTableColumns.md +169 -0
- package/skill/references/interfaces/IPCB_DifferentialPairItem.md +115 -0
- package/skill/references/interfaces/IPCB_DiscretizeOptions.md +65 -0
- package/skill/references/interfaces/IPCB_DiscretizedPoint.md +88 -0
- package/skill/references/interfaces/IPCB_EqualLengthNetGroupItem.md +115 -0
- package/skill/references/interfaces/IPCB_LayerItem.md +277 -0
- package/skill/references/interfaces/IPCB_NetClassItem.md +115 -0
- package/skill/references/interfaces/IPCB_NetInfo.md +115 -0
- package/skill/references/interfaces/IPCB_PadPairGroupItem.md +88 -0
- package/skill/references/interfaces/IPCB_PadPairMinWireLengthItem.md +88 -0
- package/skill/references/interfaces/IPCB_PhysicalStackingConfiguration.md +115 -0
- package/skill/references/interfaces/IPCB_Primitive.md +218 -0
- package/skill/references/interfaces/IPCB_PrimitiveAPI.md +175 -0
- package/skill/references/interfaces/IPCB_PrimitivePadHeatWelding.md +151 -0
- package/skill/references/interfaces/IPCB_PrimitivePouredPourFill.md +142 -0
- package/skill/references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md +154 -0
- package/skill/references/interfaces/IPCB_SubstratePhysicalProperties.md +88 -0
- package/skill/references/interfaces/IRawNet.md +103 -0
- package/skill/references/interfaces/IRawPureSchematic.md +80 -0
- package/skill/references/interfaces/IRawSchematic.md +103 -0
- package/skill/references/interfaces/IRawWire.md +149 -0
- package/skill/references/interfaces/ISCH_DrcError.md +142 -0
- package/skill/references/interfaces/ISCH_DrcErrorPrimitive.md +142 -0
- package/skill/references/interfaces/ISCH_ExportPngResolution.md +94 -0
- package/skill/references/interfaces/ISCH_NetInfo.md +88 -0
- package/skill/references/interfaces/ISCH_Primitive.md +219 -0
- package/skill/references/interfaces/ISCH_PrimitiveAPI.md +175 -0
- package/skill/references/interfaces/ISCH_ProjectNetInfo.md +142 -0
- package/skill/references/interfaces/ISCH_WireInfo.md +169 -0
- package/skill/references/interfaces/ISYS_FileSystemFileList.md +169 -0
- package/skill/references/interfaces/ISYS_HeaderMenuSub1MenuItem.md +174 -0
- package/skill/references/interfaces/ISYS_HeaderMenuSub2MenuItem.md +147 -0
- package/skill/references/interfaces/ISYS_HeaderMenuTopMenuItem.md +115 -0
- package/skill/references/interfaces/ISYS_HeaderMenus.md +408 -0
- package/skill/references/interfaces/ISYS_LogLine.md +115 -0
- package/skill/references/interfaces/ISYS_MathBBox.md +142 -0
- package/skill/references/interfaces/ISYS_MathPoint.md +88 -0
- package/skill/references/interfaces/ISYS_MathPolygonWithHoles.md +92 -0
- package/skill/references/interfaces/ISYS_MessageBusTask.md +115 -0
- package/skill/references/interfaces/ISYS_MultilingualLanguagesData.md +13 -0
- package/skill/references/interfaces/ISYS_PcbComparisonResponse.md +115 -0
- package/skill/references/interfaces/ISYS_RightClickMenuItem.md +174 -0
- package/skill/references/interfaces/ISYS_ShortcutKeyData.md +169 -0
- package/skill/references/interfaces/ISYS_ShortcutKeyDataWithCallFn.md +62 -0
- package/skill/references/interfaces/ISYS_ShortcutKeyDataWithUserDefinedShortcutKey.md +62 -0
- package/skill/references/interfaces/ISYS_WindowEventListenerRemovableObject.md +109 -0
- package/skill/references/interfaces/IconProps.md +88 -0
- package/skill/references/interfaces/ImageProps.md +115 -0
- package/skill/references/interfaces/InputProps.md +520 -0
- package/skill/references/interfaces/ListChildren.md +223 -0
- package/skill/references/interfaces/ListProps.md +223 -0
- package/skill/references/interfaces/ModalProps.md +358 -0
- package/skill/references/interfaces/RadioGroupProps.md +196 -0
- package/skill/references/interfaces/RadioItem.md +115 -0
- package/skill/references/interfaces/ScrollerProps.md +169 -0
- package/skill/references/interfaces/SelectListItem.md +142 -0
- package/skill/references/interfaces/SelectProps.md +169 -0
- package/skill/references/interfaces/SlotProps.md +88 -0
- package/skill/references/interfaces/StyleProps.md +385 -0
- package/skill/references/interfaces/TextAreaProps.md +196 -0
- package/skill/references/interfaces/TextProps.md +169 -0
- package/skill/references/types/ISYS_LanguageKeyValuePairs.md +13 -0
- package/skill/references/types/TPCB_LayerTypesOfInnerLayer.md +12 -0
- package/skill/references/types/TPCB_LayersInTheSelectable.md +43 -0
- package/skill/references/types/TPCB_LayersOfComponent.md +12 -0
- package/skill/references/types/TPCB_LayersOfCopper.md +16 -0
- package/skill/references/types/TPCB_LayersOfCustom.md +42 -0
- package/skill/references/types/TPCB_LayersOfDimension.md +17 -0
- package/skill/references/types/TPCB_LayersOfFill.md +29 -0
- package/skill/references/types/TPCB_LayersOfImage.md +23 -0
- package/skill/references/types/TPCB_LayersOfInner.md +42 -0
- package/skill/references/types/TPCB_LayersOfLine.md +26 -0
- package/skill/references/types/TPCB_LayersOfObject.md +13 -0
- package/skill/references/types/TPCB_LayersOfPad.md +12 -0
- package/skill/references/types/TPCB_LayersOfRegion.md +12 -0
- package/skill/references/types/TPCB_NumberOfCopperLayers.md +10 -0
- package/skill/references/types/TPCB_PolygonSourceArray.md +83 -0
- package/skill/references/types/TPCB_PrimitiveDimensionCoordinateSet.md +67 -0
- package/skill/references/types/TPCB_PrimitivePadHole.md +31 -0
- package/skill/references/types/TPCB_PrimitivePadShape.md +62 -0
- package/skill/references/types/TPCB_PrimitiveSpecialPadShape.md +20 -0
- package/skill/references/types/TSYS_MathPolygonGroup.md +16 -0
- package/skill/references/types/TSYS_MathPolygonInput.md +21 -0
- package/skill/references/types/TSYS_PcbComparisonErrorCode.md +10 -0
- package/skill/references/types/TSYS_ShortcutKeys.md +97 -0
- package/skill/user-guide/using-extension.md +47 -0
|
@@ -0,0 +1,3375 @@
|
|
|
1
|
+
# PCB\_Drc class
|
|
2
|
+
|
|
3
|
+
PCB & footprint / design rule check (DRC) class
|
|
4
|
+
|
|
5
|
+
## Signature
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
class PCB_Drc
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Remarks
|
|
12
|
+
|
|
13
|
+
Check and set DRC rules
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Method
|
|
20
|
+
|
|
21
|
+
</th><th>
|
|
22
|
+
|
|
23
|
+
Modifiers
|
|
24
|
+
|
|
25
|
+
</th><th>
|
|
26
|
+
|
|
27
|
+
Description
|
|
28
|
+
|
|
29
|
+
</th></tr></thead>
|
|
30
|
+
<tbody><tr><td>
|
|
31
|
+
|
|
32
|
+
[addNetToEqualLengthNetGroup(equalLengthNetGroupName, net)](./PCB_Drc.md)
|
|
33
|
+
|
|
34
|
+
</td><td>
|
|
35
|
+
|
|
36
|
+
</td><td>
|
|
37
|
+
|
|
38
|
+
**_(BETA)_** Add a net to an equal-length net group
|
|
39
|
+
|
|
40
|
+
</td></tr>
|
|
41
|
+
<tr><td>
|
|
42
|
+
|
|
43
|
+
[addNetToNetClass(netClassName, net)](./PCB_Drc.md)
|
|
44
|
+
|
|
45
|
+
</td><td>
|
|
46
|
+
|
|
47
|
+
</td><td>
|
|
48
|
+
|
|
49
|
+
**_(BETA)_** Will net add to net class
|
|
50
|
+
|
|
51
|
+
</td></tr>
|
|
52
|
+
<tr><td>
|
|
53
|
+
|
|
54
|
+
[addPadPairToPadPairGroup(padPairGroupName, padPair)](./PCB_Drc.md)
|
|
55
|
+
|
|
56
|
+
</td><td>
|
|
57
|
+
|
|
58
|
+
</td><td>
|
|
59
|
+
|
|
60
|
+
**_(BETA)_** Add a pad pair to a pad pair group
|
|
61
|
+
|
|
62
|
+
</td></tr>
|
|
63
|
+
<tr><td>
|
|
64
|
+
|
|
65
|
+
[check(strict, userInterface, includeVerboseError)](./PCB_Drc.md)
|
|
66
|
+
|
|
67
|
+
</td><td>
|
|
68
|
+
|
|
69
|
+
</td><td>
|
|
70
|
+
|
|
71
|
+
**_(BETA)_** Check DRC
|
|
72
|
+
|
|
73
|
+
</td></tr>
|
|
74
|
+
<tr><td>
|
|
75
|
+
|
|
76
|
+
[check(strict, userInterface, includeVerboseError)](./PCB_Drc.md)
|
|
77
|
+
|
|
78
|
+
</td><td>
|
|
79
|
+
|
|
80
|
+
</td><td>
|
|
81
|
+
|
|
82
|
+
**_(BETA)_** Check DRC
|
|
83
|
+
|
|
84
|
+
</td></tr>
|
|
85
|
+
<tr><td>
|
|
86
|
+
|
|
87
|
+
[createDifferentialPair(differentialPairName, positiveNet, negativeNet)](./PCB_Drc.md)
|
|
88
|
+
|
|
89
|
+
</td><td>
|
|
90
|
+
|
|
91
|
+
</td><td>
|
|
92
|
+
|
|
93
|
+
**_(BETA)_** Create a differential pair
|
|
94
|
+
|
|
95
|
+
</td></tr>
|
|
96
|
+
<tr><td>
|
|
97
|
+
|
|
98
|
+
[createEqualLengthNetGroup(equalLengthNetGroupName, nets, color)](./PCB_Drc.md)
|
|
99
|
+
|
|
100
|
+
</td><td>
|
|
101
|
+
|
|
102
|
+
</td><td>
|
|
103
|
+
|
|
104
|
+
**_(BETA)_** Create an equal-length net group
|
|
105
|
+
|
|
106
|
+
</td></tr>
|
|
107
|
+
<tr><td>
|
|
108
|
+
|
|
109
|
+
[createNetClass(netClassName, nets, color)](./PCB_Drc.md)
|
|
110
|
+
|
|
111
|
+
</td><td>
|
|
112
|
+
|
|
113
|
+
</td><td>
|
|
114
|
+
|
|
115
|
+
**_(BETA)_** Create Net class
|
|
116
|
+
|
|
117
|
+
</td></tr>
|
|
118
|
+
<tr><td>
|
|
119
|
+
|
|
120
|
+
[createPadPairGroup(padPairGroupName, padPairs)](./PCB_Drc.md)
|
|
121
|
+
|
|
122
|
+
</td><td>
|
|
123
|
+
|
|
124
|
+
</td><td>
|
|
125
|
+
|
|
126
|
+
**_(BETA)_** Create a pad pair group
|
|
127
|
+
|
|
128
|
+
</td></tr>
|
|
129
|
+
<tr><td>
|
|
130
|
+
|
|
131
|
+
[deleteDifferentialPair(differentialPairName)](./PCB_Drc.md)
|
|
132
|
+
|
|
133
|
+
</td><td>
|
|
134
|
+
|
|
135
|
+
</td><td>
|
|
136
|
+
|
|
137
|
+
**_(BETA)_** Delete the differential pair
|
|
138
|
+
|
|
139
|
+
</td></tr>
|
|
140
|
+
<tr><td>
|
|
141
|
+
|
|
142
|
+
[deleteEqualLengthNetGroup(equalLengthNetGroupName)](./PCB_Drc.md)
|
|
143
|
+
|
|
144
|
+
</td><td>
|
|
145
|
+
|
|
146
|
+
</td><td>
|
|
147
|
+
|
|
148
|
+
**_(BETA)_** Delete the equal-length net group
|
|
149
|
+
|
|
150
|
+
</td></tr>
|
|
151
|
+
<tr><td>
|
|
152
|
+
|
|
153
|
+
[deleteNetClass(netClassName)](./PCB_Drc.md)
|
|
154
|
+
|
|
155
|
+
</td><td>
|
|
156
|
+
|
|
157
|
+
</td><td>
|
|
158
|
+
|
|
159
|
+
**_(BETA)_** Delete Net class
|
|
160
|
+
|
|
161
|
+
</td></tr>
|
|
162
|
+
<tr><td>
|
|
163
|
+
|
|
164
|
+
[deletePadPairGroup(padPairGroupName)](./PCB_Drc.md)
|
|
165
|
+
|
|
166
|
+
</td><td>
|
|
167
|
+
|
|
168
|
+
</td><td>
|
|
169
|
+
|
|
170
|
+
**_(BETA)_** Delete the pad pair group
|
|
171
|
+
|
|
172
|
+
</td></tr>
|
|
173
|
+
<tr><td>
|
|
174
|
+
|
|
175
|
+
[deleteRuleConfiguration(configurationName)](./PCB_Drc.md)
|
|
176
|
+
|
|
177
|
+
</td><td>
|
|
178
|
+
|
|
179
|
+
</td><td>
|
|
180
|
+
|
|
181
|
+
**_(BETA)_** Delete Design rule configuration
|
|
182
|
+
|
|
183
|
+
</td></tr>
|
|
184
|
+
<tr><td>
|
|
185
|
+
|
|
186
|
+
[getAllDifferentialPairs()](./PCB_Drc.md)
|
|
187
|
+
|
|
188
|
+
</td><td>
|
|
189
|
+
|
|
190
|
+
</td><td>
|
|
191
|
+
|
|
192
|
+
**_(BETA)_** Get the detailed properties of all differential pairs
|
|
193
|
+
|
|
194
|
+
</td></tr>
|
|
195
|
+
<tr><td>
|
|
196
|
+
|
|
197
|
+
[getAllEqualLengthNetGroups()](./PCB_Drc.md)
|
|
198
|
+
|
|
199
|
+
</td><td>
|
|
200
|
+
|
|
201
|
+
</td><td>
|
|
202
|
+
|
|
203
|
+
**_(BETA)_** Get the detailed properties of all equal-length net groups
|
|
204
|
+
|
|
205
|
+
</td></tr>
|
|
206
|
+
<tr><td>
|
|
207
|
+
|
|
208
|
+
[getAllNetClasses()](./PCB_Drc.md)
|
|
209
|
+
|
|
210
|
+
</td><td>
|
|
211
|
+
|
|
212
|
+
</td><td>
|
|
213
|
+
|
|
214
|
+
**_(BETA)_** Get all Net class detailed properties of
|
|
215
|
+
|
|
216
|
+
</td></tr>
|
|
217
|
+
<tr><td>
|
|
218
|
+
|
|
219
|
+
[getAllPadPairGroups()](./PCB_Drc.md)
|
|
220
|
+
|
|
221
|
+
</td><td>
|
|
222
|
+
|
|
223
|
+
</td><td>
|
|
224
|
+
|
|
225
|
+
**_(BETA)_** Get the detailed properties of all pad pair groups
|
|
226
|
+
|
|
227
|
+
</td></tr>
|
|
228
|
+
<tr><td>
|
|
229
|
+
|
|
230
|
+
[getAllRuleConfigurations(includeSystem)](./PCB_Drc.md)
|
|
231
|
+
|
|
232
|
+
</td><td>
|
|
233
|
+
|
|
234
|
+
</td><td>
|
|
235
|
+
|
|
236
|
+
**_(BETA)_** Get all Design rule configuration
|
|
237
|
+
|
|
238
|
+
</td></tr>
|
|
239
|
+
<tr><td>
|
|
240
|
+
|
|
241
|
+
[getCurrentRuleConfiguration()](./PCB_Drc.md)
|
|
242
|
+
|
|
243
|
+
</td><td>
|
|
244
|
+
|
|
245
|
+
</td><td>
|
|
246
|
+
|
|
247
|
+
**_(BETA)_** Get Current design rule configuration
|
|
248
|
+
|
|
249
|
+
</td></tr>
|
|
250
|
+
<tr><td>
|
|
251
|
+
|
|
252
|
+
[getCurrentRuleConfigurationName()](./PCB_Drc.md)
|
|
253
|
+
|
|
254
|
+
</td><td>
|
|
255
|
+
|
|
256
|
+
</td><td>
|
|
257
|
+
|
|
258
|
+
Get Current design rule configuration name
|
|
259
|
+
|
|
260
|
+
</td></tr>
|
|
261
|
+
<tr><td>
|
|
262
|
+
|
|
263
|
+
[getDefaultRuleConfigurationName()](./PCB_Drc.md)
|
|
264
|
+
|
|
265
|
+
</td><td>
|
|
266
|
+
|
|
267
|
+
</td><td>
|
|
268
|
+
|
|
269
|
+
**_(BETA)_** Get the name of the default design rule configuration for new PCBs
|
|
270
|
+
|
|
271
|
+
</td></tr>
|
|
272
|
+
<tr><td>
|
|
273
|
+
|
|
274
|
+
[getNetByNetRules()](./PCB_Drc.md)
|
|
275
|
+
|
|
276
|
+
</td><td>
|
|
277
|
+
|
|
278
|
+
</td><td>
|
|
279
|
+
|
|
280
|
+
**_(BETA)_** Get Net - net rules
|
|
281
|
+
|
|
282
|
+
</td></tr>
|
|
283
|
+
<tr><td>
|
|
284
|
+
|
|
285
|
+
[getNetRules()](./PCB_Drc.md)
|
|
286
|
+
|
|
287
|
+
</td><td>
|
|
288
|
+
|
|
289
|
+
</td><td>
|
|
290
|
+
|
|
291
|
+
**_(BETA)_** Get Net rules
|
|
292
|
+
|
|
293
|
+
</td></tr>
|
|
294
|
+
<tr><td>
|
|
295
|
+
|
|
296
|
+
[getPadPairGroupMinWireLength(padPairGroupName)](./PCB_Drc.md)
|
|
297
|
+
|
|
298
|
+
</td><td>
|
|
299
|
+
|
|
300
|
+
</td><td>
|
|
301
|
+
|
|
302
|
+
**_(BETA)_** Get the minimum wire length of a pad pair group
|
|
303
|
+
|
|
304
|
+
</td></tr>
|
|
305
|
+
<tr><td>
|
|
306
|
+
|
|
307
|
+
[getRealTimeDrcStatus()](./PCB_Drc.md)
|
|
308
|
+
|
|
309
|
+
</td><td>
|
|
310
|
+
|
|
311
|
+
</td><td>
|
|
312
|
+
|
|
313
|
+
**_(BETA)_** Get Real-time DRC check state
|
|
314
|
+
|
|
315
|
+
</td></tr>
|
|
316
|
+
<tr><td>
|
|
317
|
+
|
|
318
|
+
[getRegionRules()](./PCB_Drc.md)
|
|
319
|
+
|
|
320
|
+
</td><td>
|
|
321
|
+
|
|
322
|
+
</td><td>
|
|
323
|
+
|
|
324
|
+
**_(BETA)_** Get region rules
|
|
325
|
+
|
|
326
|
+
</td></tr>
|
|
327
|
+
<tr><td>
|
|
328
|
+
|
|
329
|
+
[getRuleConfiguration(configurationName)](./PCB_Drc.md)
|
|
330
|
+
|
|
331
|
+
</td><td>
|
|
332
|
+
|
|
333
|
+
</td><td>
|
|
334
|
+
|
|
335
|
+
Get Specify design rule configuration
|
|
336
|
+
|
|
337
|
+
</td></tr>
|
|
338
|
+
<tr><td>
|
|
339
|
+
|
|
340
|
+
[modifyDifferentialPairName(originalDifferentialPairName, differentialPairName)](./PCB_Drc.md)
|
|
341
|
+
|
|
342
|
+
</td><td>
|
|
343
|
+
|
|
344
|
+
</td><td>
|
|
345
|
+
|
|
346
|
+
**_(BETA)_** Modify the name of the differential pair
|
|
347
|
+
|
|
348
|
+
</td></tr>
|
|
349
|
+
<tr><td>
|
|
350
|
+
|
|
351
|
+
[modifyDifferentialPairNegativeNet(differentialPairName, negativeNet)](./PCB_Drc.md)
|
|
352
|
+
|
|
353
|
+
</td><td>
|
|
354
|
+
|
|
355
|
+
</td><td>
|
|
356
|
+
|
|
357
|
+
**_(BETA)_** Modify the negative net of the differential pair
|
|
358
|
+
|
|
359
|
+
</td></tr>
|
|
360
|
+
<tr><td>
|
|
361
|
+
|
|
362
|
+
[modifyDifferentialPairPositiveNet(differentialPairName, positiveNet)](./PCB_Drc.md)
|
|
363
|
+
|
|
364
|
+
</td><td>
|
|
365
|
+
|
|
366
|
+
</td><td>
|
|
367
|
+
|
|
368
|
+
**_(BETA)_** Modify the positive net of the differential pair
|
|
369
|
+
|
|
370
|
+
</td></tr>
|
|
371
|
+
<tr><td>
|
|
372
|
+
|
|
373
|
+
[modifyEqualLengthNetGroupName(originalEqualLengthNetGroupName, equalLengthNetGroupName)](./PCB_Drc.md)
|
|
374
|
+
|
|
375
|
+
</td><td>
|
|
376
|
+
|
|
377
|
+
</td><td>
|
|
378
|
+
|
|
379
|
+
**_(BETA)_** Modify the name of the equal-length net group
|
|
380
|
+
|
|
381
|
+
</td></tr>
|
|
382
|
+
<tr><td>
|
|
383
|
+
|
|
384
|
+
[modifyNetClassName(originalNetClassName, netClassName)](./PCB_Drc.md)
|
|
385
|
+
|
|
386
|
+
</td><td>
|
|
387
|
+
|
|
388
|
+
</td><td>
|
|
389
|
+
|
|
390
|
+
**_(BETA)_** Modify Net class name of
|
|
391
|
+
|
|
392
|
+
</td></tr>
|
|
393
|
+
<tr><td>
|
|
394
|
+
|
|
395
|
+
[modifyPadPairGroupName(originalPadPairGroupName, padPairGroupName)](./PCB_Drc.md)
|
|
396
|
+
|
|
397
|
+
</td><td>
|
|
398
|
+
|
|
399
|
+
</td><td>
|
|
400
|
+
|
|
401
|
+
**_(BETA)_** Modify the name of the pad pair group
|
|
402
|
+
|
|
403
|
+
</td></tr>
|
|
404
|
+
<tr><td>
|
|
405
|
+
|
|
406
|
+
[overwriteCurrentRuleConfiguration(ruleConfiguration)](./PCB_Drc.md)
|
|
407
|
+
|
|
408
|
+
</td><td>
|
|
409
|
+
|
|
410
|
+
</td><td>
|
|
411
|
+
|
|
412
|
+
**_(BETA)_** Overwrite current design rule configuration
|
|
413
|
+
|
|
414
|
+
</td></tr>
|
|
415
|
+
<tr><td>
|
|
416
|
+
|
|
417
|
+
[overwriteNetByNetRules(netByNetRules)](./PCB_Drc.md)
|
|
418
|
+
|
|
419
|
+
</td><td>
|
|
420
|
+
|
|
421
|
+
</td><td>
|
|
422
|
+
|
|
423
|
+
**_(BETA)_** Overwrite net - net rules
|
|
424
|
+
|
|
425
|
+
</td></tr>
|
|
426
|
+
<tr><td>
|
|
427
|
+
|
|
428
|
+
[overwriteNetRules(netRules)](./PCB_Drc.md)
|
|
429
|
+
|
|
430
|
+
</td><td>
|
|
431
|
+
|
|
432
|
+
</td><td>
|
|
433
|
+
|
|
434
|
+
**_(BETA)_** Overwrite net rules
|
|
435
|
+
|
|
436
|
+
</td></tr>
|
|
437
|
+
<tr><td>
|
|
438
|
+
|
|
439
|
+
[overwriteRegionRules(regionRules)](./PCB_Drc.md)
|
|
440
|
+
|
|
441
|
+
</td><td>
|
|
442
|
+
|
|
443
|
+
</td><td>
|
|
444
|
+
|
|
445
|
+
**_(BETA)_** Overwrite region rules
|
|
446
|
+
|
|
447
|
+
</td></tr>
|
|
448
|
+
<tr><td>
|
|
449
|
+
|
|
450
|
+
[removeNetFromEqualLengthNetGroup(equalLengthNetGroupName, net)](./PCB_Drc.md)
|
|
451
|
+
|
|
452
|
+
</td><td>
|
|
453
|
+
|
|
454
|
+
</td><td>
|
|
455
|
+
|
|
456
|
+
**_(BETA)_** Remove a net from an equal-length net group
|
|
457
|
+
|
|
458
|
+
</td></tr>
|
|
459
|
+
<tr><td>
|
|
460
|
+
|
|
461
|
+
[removeNetFromNetClass(netClassName, net)](./PCB_Drc.md)
|
|
462
|
+
|
|
463
|
+
</td><td>
|
|
464
|
+
|
|
465
|
+
</td><td>
|
|
466
|
+
|
|
467
|
+
**_(BETA)_** From net class in remove net
|
|
468
|
+
|
|
469
|
+
</td></tr>
|
|
470
|
+
<tr><td>
|
|
471
|
+
|
|
472
|
+
[removePadPairFromPadPairGroup(padPairGroupName, padPair)](./PCB_Drc.md)
|
|
473
|
+
|
|
474
|
+
</td><td>
|
|
475
|
+
|
|
476
|
+
</td><td>
|
|
477
|
+
|
|
478
|
+
**_(BETA)_** Remove a pad pair from a pad pair group
|
|
479
|
+
|
|
480
|
+
</td></tr>
|
|
481
|
+
<tr><td>
|
|
482
|
+
|
|
483
|
+
[renameRuleConfiguration(originalConfigurationName, configurationName)](./PCB_Drc.md)
|
|
484
|
+
|
|
485
|
+
</td><td>
|
|
486
|
+
|
|
487
|
+
</td><td>
|
|
488
|
+
|
|
489
|
+
**_(BETA)_** Rename the design rule configuration
|
|
490
|
+
|
|
491
|
+
</td></tr>
|
|
492
|
+
<tr><td>
|
|
493
|
+
|
|
494
|
+
[saveRuleConfiguration(ruleConfiguration, configurationName, allowOverwrite)](./PCB_Drc.md)
|
|
495
|
+
|
|
496
|
+
</td><td>
|
|
497
|
+
|
|
498
|
+
</td><td>
|
|
499
|
+
|
|
500
|
+
**_(BETA)_** Save Design rule configuration
|
|
501
|
+
|
|
502
|
+
</td></tr>
|
|
503
|
+
<tr><td>
|
|
504
|
+
|
|
505
|
+
[setAsDefaultRuleConfiguration(configurationName)](./PCB_Drc.md)
|
|
506
|
+
|
|
507
|
+
</td><td>
|
|
508
|
+
|
|
509
|
+
</td><td>
|
|
510
|
+
|
|
511
|
+
**_(BETA)_** Set as the default design rule configuration for new PCBs
|
|
512
|
+
|
|
513
|
+
</td></tr>
|
|
514
|
+
<tr><td>
|
|
515
|
+
|
|
516
|
+
[startRealTimeDrc()](./PCB_Drc.md)
|
|
517
|
+
|
|
518
|
+
</td><td>
|
|
519
|
+
|
|
520
|
+
</td><td>
|
|
521
|
+
|
|
522
|
+
**_(BETA)_** Start real-time DRC check
|
|
523
|
+
|
|
524
|
+
</td></tr>
|
|
525
|
+
<tr><td>
|
|
526
|
+
|
|
527
|
+
[stopRealTimeDrc()](./PCB_Drc.md)
|
|
528
|
+
|
|
529
|
+
</td><td>
|
|
530
|
+
|
|
531
|
+
</td><td>
|
|
532
|
+
|
|
533
|
+
**_(BETA)_** Stop real-time DRC check
|
|
534
|
+
|
|
535
|
+
</td></tr>
|
|
536
|
+
</tbody></table>
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
## 方法详情
|
|
541
|
+
|
|
542
|
+
### addnettoequallengthnetgroup
|
|
543
|
+
|
|
544
|
+
# PCB\_Drc.addNetToEqualLengthNetGroup() method
|
|
545
|
+
|
|
546
|
+
> 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.
|
|
547
|
+
|
|
548
|
+
Add a net to an equal-length net group
|
|
549
|
+
|
|
550
|
+
## Signature
|
|
551
|
+
|
|
552
|
+
```typescript
|
|
553
|
+
function addNetToEqualLengthNetGroup(
|
|
554
|
+
equalLengthNetGroupName: string,
|
|
555
|
+
net: string | Array<string>,
|
|
556
|
+
): Promise<boolean>;
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
## Parameters
|
|
560
|
+
|
|
561
|
+
<table><thead><tr><th>
|
|
562
|
+
|
|
563
|
+
Parameter
|
|
564
|
+
|
|
565
|
+
</th><th>
|
|
566
|
+
|
|
567
|
+
Type
|
|
568
|
+
|
|
569
|
+
</th><th>
|
|
570
|
+
|
|
571
|
+
Description
|
|
572
|
+
|
|
573
|
+
</th></tr></thead>
|
|
574
|
+
<tbody><tr><td>
|
|
575
|
+
|
|
576
|
+
equalLengthNetGroupName
|
|
577
|
+
|
|
578
|
+
</td><td>
|
|
579
|
+
|
|
580
|
+
string
|
|
581
|
+
|
|
582
|
+
</td><td>
|
|
583
|
+
|
|
584
|
+
Equal-length net group name
|
|
585
|
+
|
|
586
|
+
</td></tr>
|
|
587
|
+
<tr><td>
|
|
588
|
+
|
|
589
|
+
net
|
|
590
|
+
|
|
591
|
+
</td><td>
|
|
592
|
+
|
|
593
|
+
string \| Array<string>
|
|
594
|
+
|
|
595
|
+
</td><td>
|
|
596
|
+
|
|
597
|
+
Net name
|
|
598
|
+
|
|
599
|
+
</td></tr>
|
|
600
|
+
</tbody></table>
|
|
601
|
+
|
|
602
|
+
## Returns
|
|
603
|
+
|
|
604
|
+
Promise<boolean>
|
|
605
|
+
|
|
606
|
+
Whether the operation is successful
|
|
607
|
+
|
|
608
|
+
## Example
|
|
609
|
+
|
|
610
|
+
```javascript
|
|
611
|
+
// 1. 准备三个真实网络(放带网络的测试焊盘,模拟一组数据总线)
|
|
612
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
613
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_D0', null, 0, 0, 0, false, 0);
|
|
614
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_D1', null, 0, 0, 0, false, 0);
|
|
615
|
+
await eda.pcb_PrimitivePad.create(1, '3', x + 1000, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_D2', null, 0, 0, 0, false, 0);
|
|
616
|
+
|
|
617
|
+
// 2. 先建空等长组,再逐个/批量添加网络
|
|
618
|
+
await eda.pcb_Drc.createEqualLengthNetGroup('嘉立创示例_等长网络组', [], { r: 0, g: 255, b: 0, alpha: 1 });
|
|
619
|
+
const addedOne = await eda.pcb_Drc.addNetToEqualLengthNetGroup('嘉立创示例_等长网络组', 'JLC_DEMO_D0');
|
|
620
|
+
const addedBatch = await eda.pcb_Drc.addNetToEqualLengthNetGroup('嘉立创示例_等长网络组', ['JLC_DEMO_D1', 'JLC_DEMO_D2']);
|
|
621
|
+
|
|
622
|
+
console.log('addedOne:', addedOne);
|
|
623
|
+
console.log('addedBatch:', addedBatch);
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
### addnettonetclass
|
|
627
|
+
|
|
628
|
+
# PCB\_Drc.addNetToNetClass() method
|
|
629
|
+
|
|
630
|
+
> 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.
|
|
631
|
+
|
|
632
|
+
Will net add to net class
|
|
633
|
+
|
|
634
|
+
## Signature
|
|
635
|
+
|
|
636
|
+
```typescript
|
|
637
|
+
function addNetToNetClass(netClassName: string, net: string | Array<string>): Promise<boolean>;
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
## Parameters
|
|
641
|
+
|
|
642
|
+
<table><thead><tr><th>
|
|
643
|
+
|
|
644
|
+
Parameter
|
|
645
|
+
|
|
646
|
+
</th><th>
|
|
647
|
+
|
|
648
|
+
Type
|
|
649
|
+
|
|
650
|
+
</th><th>
|
|
651
|
+
|
|
652
|
+
Description
|
|
653
|
+
|
|
654
|
+
</th></tr></thead>
|
|
655
|
+
<tbody><tr><td>
|
|
656
|
+
|
|
657
|
+
netClassName
|
|
658
|
+
|
|
659
|
+
</td><td>
|
|
660
|
+
|
|
661
|
+
string
|
|
662
|
+
|
|
663
|
+
</td><td>
|
|
664
|
+
|
|
665
|
+
Net class name
|
|
666
|
+
|
|
667
|
+
</td></tr>
|
|
668
|
+
<tr><td>
|
|
669
|
+
|
|
670
|
+
net
|
|
671
|
+
|
|
672
|
+
</td><td>
|
|
673
|
+
|
|
674
|
+
string \| Array<string>
|
|
675
|
+
|
|
676
|
+
</td><td>
|
|
677
|
+
|
|
678
|
+
Net name
|
|
679
|
+
|
|
680
|
+
</td></tr>
|
|
681
|
+
</tbody></table>
|
|
682
|
+
|
|
683
|
+
## Returns
|
|
684
|
+
|
|
685
|
+
Promise<boolean>
|
|
686
|
+
|
|
687
|
+
Whether the operation is successful
|
|
688
|
+
|
|
689
|
+
## Example
|
|
690
|
+
|
|
691
|
+
```javascript
|
|
692
|
+
// 1. 准备三个真实网络(放带网络的测试焊盘)
|
|
693
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
694
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_P', null, 0, 0, 0, false, 0);
|
|
695
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_N', null, 0, 0, 0, false, 0);
|
|
696
|
+
await eda.pcb_PrimitivePad.create(1, '3', x + 1000, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_CLK', null, 0, 0, 0, false, 0);
|
|
697
|
+
|
|
698
|
+
// 2. 先建网络类,再逐个/批量添加网络
|
|
699
|
+
await eda.pcb_Drc.createNetClass('嘉立创示例_网络类', [], { r: 255, g: 0, b: 0, alpha: 1 });
|
|
700
|
+
const addedOne = await eda.pcb_Drc.addNetToNetClass('嘉立创示例_网络类', 'JLC_DEMO_P');
|
|
701
|
+
const addedBatch = await eda.pcb_Drc.addNetToNetClass('嘉立创示例_网络类', ['JLC_DEMO_N', 'JLC_DEMO_CLK']);
|
|
702
|
+
|
|
703
|
+
console.log('addedOne:', addedOne);
|
|
704
|
+
console.log('addedBatch:', addedBatch);
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
### addpadpairtopadpairgroup
|
|
708
|
+
|
|
709
|
+
# PCB\_Drc.addPadPairToPadPairGroup() method
|
|
710
|
+
|
|
711
|
+
> 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.
|
|
712
|
+
|
|
713
|
+
Add a pad pair to a pad pair group
|
|
714
|
+
|
|
715
|
+
## Signature
|
|
716
|
+
|
|
717
|
+
```typescript
|
|
718
|
+
function addPadPairToPadPairGroup(
|
|
719
|
+
padPairGroupName: string,
|
|
720
|
+
padPair: [string, string] | Array<[string, string]>,
|
|
721
|
+
): Promise<boolean>;
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
## Parameters
|
|
725
|
+
|
|
726
|
+
<table><thead><tr><th>
|
|
727
|
+
|
|
728
|
+
Parameter
|
|
729
|
+
|
|
730
|
+
</th><th>
|
|
731
|
+
|
|
732
|
+
Type
|
|
733
|
+
|
|
734
|
+
</th><th>
|
|
735
|
+
|
|
736
|
+
Description
|
|
737
|
+
|
|
738
|
+
</th></tr></thead>
|
|
739
|
+
<tbody><tr><td>
|
|
740
|
+
|
|
741
|
+
padPairGroupName
|
|
742
|
+
|
|
743
|
+
</td><td>
|
|
744
|
+
|
|
745
|
+
string
|
|
746
|
+
|
|
747
|
+
</td><td>
|
|
748
|
+
|
|
749
|
+
Pad pair group name
|
|
750
|
+
|
|
751
|
+
</td></tr>
|
|
752
|
+
<tr><td>
|
|
753
|
+
|
|
754
|
+
padPair
|
|
755
|
+
|
|
756
|
+
</td><td>
|
|
757
|
+
|
|
758
|
+
\[string, string\] \| Array<\[string, string\]>
|
|
759
|
+
|
|
760
|
+
</td><td>
|
|
761
|
+
|
|
762
|
+
Pad for
|
|
763
|
+
|
|
764
|
+
</td></tr>
|
|
765
|
+
</tbody></table>
|
|
766
|
+
|
|
767
|
+
## Returns
|
|
768
|
+
|
|
769
|
+
Promise<boolean>
|
|
770
|
+
|
|
771
|
+
Whether the operation is successful
|
|
772
|
+
|
|
773
|
+
## Example
|
|
774
|
+
|
|
775
|
+
There are three different usages, and make sure the corresponding pads already exist on the canvas. They are: 1. Free pad - free pad; 2. Device pad - device pad; 3. Device pad - free pad await eda.pcb\_Drc.addPadPairToPadPairGroup('test',\['e0','e1'\]) // 游离焊盘-游离焊盘 await eda.pcb\_Drc.addPadPairToPadPairGroup('test',\['R1:1','R1:2'\]) // 器件焊盘 - 器件焊盘 await eda.pcb\_Drc.addPadPairToPadPairGroup('test',\['R1:1','e1'\]) // 器件焊盘 - 游离焊盘
|
|
776
|
+
|
|
777
|
+
### check
|
|
778
|
+
|
|
779
|
+
# PCB\_Drc.check() method
|
|
780
|
+
|
|
781
|
+
> 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.
|
|
782
|
+
|
|
783
|
+
Check DRC
|
|
784
|
+
|
|
785
|
+
## Signature
|
|
786
|
+
|
|
787
|
+
```typescript
|
|
788
|
+
function check(
|
|
789
|
+
strict: boolean,
|
|
790
|
+
userInterface: boolean,
|
|
791
|
+
includeVerboseError: false,
|
|
792
|
+
): Promise<boolean>;
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
## Parameters
|
|
796
|
+
|
|
797
|
+
<table><thead><tr><th>
|
|
798
|
+
|
|
799
|
+
Parameter
|
|
800
|
+
|
|
801
|
+
</th><th>
|
|
802
|
+
|
|
803
|
+
Type
|
|
804
|
+
|
|
805
|
+
</th><th>
|
|
806
|
+
|
|
807
|
+
Description
|
|
808
|
+
|
|
809
|
+
</th></tr></thead>
|
|
810
|
+
<tbody><tr><td>
|
|
811
|
+
|
|
812
|
+
strict
|
|
813
|
+
|
|
814
|
+
</td><td>
|
|
815
|
+
|
|
816
|
+
boolean
|
|
817
|
+
|
|
818
|
+
</td><td>
|
|
819
|
+
|
|
820
|
+
Whether strict checking is enabled. The current PCB is uniformly in strict checking mode
|
|
821
|
+
|
|
822
|
+
</td></tr>
|
|
823
|
+
<tr><td>
|
|
824
|
+
|
|
825
|
+
userInterface
|
|
826
|
+
|
|
827
|
+
</td><td>
|
|
828
|
+
|
|
829
|
+
boolean
|
|
830
|
+
|
|
831
|
+
</td><td>
|
|
832
|
+
|
|
833
|
+
Whether to show the UI (open the bottom DRC window)
|
|
834
|
+
|
|
835
|
+
</td></tr>
|
|
836
|
+
<tr><td>
|
|
837
|
+
|
|
838
|
+
includeVerboseError
|
|
839
|
+
|
|
840
|
+
</td><td>
|
|
841
|
+
|
|
842
|
+
false
|
|
843
|
+
|
|
844
|
+
</td><td>
|
|
845
|
+
|
|
846
|
+
Whether to include detailed error information in the return value. If it is `true`<!-- -->, the return value will always be an array
|
|
847
|
+
|
|
848
|
+
</td></tr>
|
|
849
|
+
</tbody></table>
|
|
850
|
+
|
|
851
|
+
## Returns
|
|
852
|
+
|
|
853
|
+
Promise<boolean>
|
|
854
|
+
|
|
855
|
+
Whether the DRC check passed
|
|
856
|
+
|
|
857
|
+
## Example
|
|
858
|
+
|
|
859
|
+
```javascript
|
|
860
|
+
// 1. 详细模式:返回全部违规项(含描述),无违规则为空数组
|
|
861
|
+
const details = await eda.pcb_Drc.check(true, false, true);
|
|
862
|
+
console.log('violationCount:', details.length);
|
|
863
|
+
details.forEach((d, i) => {
|
|
864
|
+
console.log(`[${i}]`, typeof d === 'string' ? d : JSON.stringify(d));
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
// 2. 布尔模式:只返回是否全部通过
|
|
868
|
+
const passed = await eda.pcb_Drc.check(true, false, false);
|
|
869
|
+
console.log('allPassed:', passed);
|
|
870
|
+
```
|
|
871
|
+
|
|
872
|
+
### check_1
|
|
873
|
+
|
|
874
|
+
# PCB\_Drc.check() method
|
|
875
|
+
|
|
876
|
+
> 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.
|
|
877
|
+
|
|
878
|
+
Check DRC
|
|
879
|
+
|
|
880
|
+
## Signature
|
|
881
|
+
|
|
882
|
+
```typescript
|
|
883
|
+
function check(
|
|
884
|
+
strict: boolean,
|
|
885
|
+
userInterface: boolean,
|
|
886
|
+
includeVerboseError: true,
|
|
887
|
+
): Promise<Array<any>>;
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
## Parameters
|
|
891
|
+
|
|
892
|
+
<table><thead><tr><th>
|
|
893
|
+
|
|
894
|
+
Parameter
|
|
895
|
+
|
|
896
|
+
</th><th>
|
|
897
|
+
|
|
898
|
+
Type
|
|
899
|
+
|
|
900
|
+
</th><th>
|
|
901
|
+
|
|
902
|
+
Description
|
|
903
|
+
|
|
904
|
+
</th></tr></thead>
|
|
905
|
+
<tbody><tr><td>
|
|
906
|
+
|
|
907
|
+
strict
|
|
908
|
+
|
|
909
|
+
</td><td>
|
|
910
|
+
|
|
911
|
+
boolean
|
|
912
|
+
|
|
913
|
+
</td><td>
|
|
914
|
+
|
|
915
|
+
Whether strict checking is enabled. The current PCB is uniformly in strict checking mode
|
|
916
|
+
|
|
917
|
+
</td></tr>
|
|
918
|
+
<tr><td>
|
|
919
|
+
|
|
920
|
+
userInterface
|
|
921
|
+
|
|
922
|
+
</td><td>
|
|
923
|
+
|
|
924
|
+
boolean
|
|
925
|
+
|
|
926
|
+
</td><td>
|
|
927
|
+
|
|
928
|
+
Whether to show the UI (open the bottom DRC window)
|
|
929
|
+
|
|
930
|
+
</td></tr>
|
|
931
|
+
<tr><td>
|
|
932
|
+
|
|
933
|
+
includeVerboseError
|
|
934
|
+
|
|
935
|
+
</td><td>
|
|
936
|
+
|
|
937
|
+
true
|
|
938
|
+
|
|
939
|
+
</td><td>
|
|
940
|
+
|
|
941
|
+
Whether to include detailed error information in the return value. If it is `true`<!-- -->, the return value will always be an array
|
|
942
|
+
|
|
943
|
+
</td></tr>
|
|
944
|
+
</tbody></table>
|
|
945
|
+
|
|
946
|
+
## Returns
|
|
947
|
+
|
|
948
|
+
Promise<Array<any>>
|
|
949
|
+
|
|
950
|
+
Detailed results of the DRC check
|
|
951
|
+
|
|
952
|
+
### createdifferentialpair
|
|
953
|
+
|
|
954
|
+
# PCB\_Drc.createDifferentialPair() method
|
|
955
|
+
|
|
956
|
+
> 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.
|
|
957
|
+
|
|
958
|
+
Create a differential pair
|
|
959
|
+
|
|
960
|
+
## Signature
|
|
961
|
+
|
|
962
|
+
```typescript
|
|
963
|
+
function createDifferentialPair(
|
|
964
|
+
differentialPairName: string,
|
|
965
|
+
positiveNet: string,
|
|
966
|
+
negativeNet: string,
|
|
967
|
+
): Promise<boolean>;
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
## Parameters
|
|
971
|
+
|
|
972
|
+
<table><thead><tr><th>
|
|
973
|
+
|
|
974
|
+
Parameter
|
|
975
|
+
|
|
976
|
+
</th><th>
|
|
977
|
+
|
|
978
|
+
Type
|
|
979
|
+
|
|
980
|
+
</th><th>
|
|
981
|
+
|
|
982
|
+
Description
|
|
983
|
+
|
|
984
|
+
</th></tr></thead>
|
|
985
|
+
<tbody><tr><td>
|
|
986
|
+
|
|
987
|
+
differentialPairName
|
|
988
|
+
|
|
989
|
+
</td><td>
|
|
990
|
+
|
|
991
|
+
string
|
|
992
|
+
|
|
993
|
+
</td><td>
|
|
994
|
+
|
|
995
|
+
Differential pair name
|
|
996
|
+
|
|
997
|
+
</td></tr>
|
|
998
|
+
<tr><td>
|
|
999
|
+
|
|
1000
|
+
positiveNet
|
|
1001
|
+
|
|
1002
|
+
</td><td>
|
|
1003
|
+
|
|
1004
|
+
string
|
|
1005
|
+
|
|
1006
|
+
</td><td>
|
|
1007
|
+
|
|
1008
|
+
Positive net name
|
|
1009
|
+
|
|
1010
|
+
</td></tr>
|
|
1011
|
+
<tr><td>
|
|
1012
|
+
|
|
1013
|
+
negativeNet
|
|
1014
|
+
|
|
1015
|
+
</td><td>
|
|
1016
|
+
|
|
1017
|
+
string
|
|
1018
|
+
|
|
1019
|
+
</td><td>
|
|
1020
|
+
|
|
1021
|
+
Negative net name
|
|
1022
|
+
|
|
1023
|
+
</td></tr>
|
|
1024
|
+
</tbody></table>
|
|
1025
|
+
|
|
1026
|
+
## Returns
|
|
1027
|
+
|
|
1028
|
+
Promise<boolean>
|
|
1029
|
+
|
|
1030
|
+
Whether the operation is successful
|
|
1031
|
+
|
|
1032
|
+
## Example
|
|
1033
|
+
|
|
1034
|
+
```javascript
|
|
1035
|
+
// 1. 生成本次运行专用的网络名和差分对名(差分对名和网络名不能与其他差分对重复)
|
|
1036
|
+
const ts = Date.now();
|
|
1037
|
+
const netP = `JLC_DEMO_DP_P_${ts}`;
|
|
1038
|
+
const netN = `JLC_DEMO_DP_N_${ts}`;
|
|
1039
|
+
|
|
1040
|
+
// 2. 放两个带差分网络的焊盘,让网络进入网表
|
|
1041
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
1042
|
+
const padP = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], netP, null, 0, 0, 0, false, 0);
|
|
1043
|
+
const padN = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], netN, null, 0, 0, 0, false, 0);
|
|
1044
|
+
|
|
1045
|
+
// 3. 创建差分对(保留现场供观察)
|
|
1046
|
+
const created = await eda.pcb_Drc.createDifferentialPair(`嘉立创示例_差分对_${ts}`, netP, netN);
|
|
1047
|
+
|
|
1048
|
+
console.log('pairName:', `嘉立创示例_差分对_${ts}`);
|
|
1049
|
+
console.log('created:', created);
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
### createequallengthnetgroup
|
|
1053
|
+
|
|
1054
|
+
# PCB\_Drc.createEqualLengthNetGroup() method
|
|
1055
|
+
|
|
1056
|
+
> 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.
|
|
1057
|
+
|
|
1058
|
+
Create an equal-length net group
|
|
1059
|
+
|
|
1060
|
+
## Signature
|
|
1061
|
+
|
|
1062
|
+
```typescript
|
|
1063
|
+
function createEqualLengthNetGroup(
|
|
1064
|
+
equalLengthNetGroupName: string,
|
|
1065
|
+
nets: Array<string>,
|
|
1066
|
+
color: IPCB_EqualLengthNetGroupItem['color'],
|
|
1067
|
+
): Promise<boolean>;
|
|
1068
|
+
```
|
|
1069
|
+
|
|
1070
|
+
## Parameters
|
|
1071
|
+
|
|
1072
|
+
<table><thead><tr><th>
|
|
1073
|
+
|
|
1074
|
+
Parameter
|
|
1075
|
+
|
|
1076
|
+
</th><th>
|
|
1077
|
+
|
|
1078
|
+
Type
|
|
1079
|
+
|
|
1080
|
+
</th><th>
|
|
1081
|
+
|
|
1082
|
+
Description
|
|
1083
|
+
|
|
1084
|
+
</th></tr></thead>
|
|
1085
|
+
<tbody><tr><td>
|
|
1086
|
+
|
|
1087
|
+
equalLengthNetGroupName
|
|
1088
|
+
|
|
1089
|
+
</td><td>
|
|
1090
|
+
|
|
1091
|
+
string
|
|
1092
|
+
|
|
1093
|
+
</td><td>
|
|
1094
|
+
|
|
1095
|
+
Equal-length net group name
|
|
1096
|
+
|
|
1097
|
+
</td></tr>
|
|
1098
|
+
<tr><td>
|
|
1099
|
+
|
|
1100
|
+
nets
|
|
1101
|
+
|
|
1102
|
+
</td><td>
|
|
1103
|
+
|
|
1104
|
+
Array<string>
|
|
1105
|
+
|
|
1106
|
+
</td><td>
|
|
1107
|
+
|
|
1108
|
+
Net name array
|
|
1109
|
+
|
|
1110
|
+
</td></tr>
|
|
1111
|
+
<tr><td>
|
|
1112
|
+
|
|
1113
|
+
color
|
|
1114
|
+
|
|
1115
|
+
</td><td>
|
|
1116
|
+
|
|
1117
|
+
[IPCB\_EqualLengthNetGroupItem](../interfaces/IPCB_EqualLengthNetGroupItem.md)<!-- -->\['color'\]
|
|
1118
|
+
|
|
1119
|
+
</td><td>
|
|
1120
|
+
|
|
1121
|
+
Equal-length net group color
|
|
1122
|
+
|
|
1123
|
+
</td></tr>
|
|
1124
|
+
</tbody></table>
|
|
1125
|
+
|
|
1126
|
+
## Returns
|
|
1127
|
+
|
|
1128
|
+
Promise<boolean>
|
|
1129
|
+
|
|
1130
|
+
Whether the operation is successful
|
|
1131
|
+
|
|
1132
|
+
## Example
|
|
1133
|
+
|
|
1134
|
+
```javascript
|
|
1135
|
+
// 1. 创建一个空的等长网络组,指定面板显示颜色(保留现场供观察)
|
|
1136
|
+
const created = await eda.pcb_Drc.createEqualLengthNetGroup('嘉立创示例_等长网络组', [], { r: 0, g: 255, b: 0, alpha: 1 });
|
|
1137
|
+
|
|
1138
|
+
console.log('created:', created);
|
|
1139
|
+
```
|
|
1140
|
+
|
|
1141
|
+
### createnetclass
|
|
1142
|
+
|
|
1143
|
+
# PCB\_Drc.createNetClass() method
|
|
1144
|
+
|
|
1145
|
+
> 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.
|
|
1146
|
+
|
|
1147
|
+
Create Net class
|
|
1148
|
+
|
|
1149
|
+
## Signature
|
|
1150
|
+
|
|
1151
|
+
```typescript
|
|
1152
|
+
function createNetClass(
|
|
1153
|
+
netClassName: string,
|
|
1154
|
+
nets: Array<string>,
|
|
1155
|
+
color: IPCB_EqualLengthNetGroupItem['color'],
|
|
1156
|
+
): Promise<boolean>;
|
|
1157
|
+
```
|
|
1158
|
+
|
|
1159
|
+
## Parameters
|
|
1160
|
+
|
|
1161
|
+
<table><thead><tr><th>
|
|
1162
|
+
|
|
1163
|
+
Parameter
|
|
1164
|
+
|
|
1165
|
+
</th><th>
|
|
1166
|
+
|
|
1167
|
+
Type
|
|
1168
|
+
|
|
1169
|
+
</th><th>
|
|
1170
|
+
|
|
1171
|
+
Description
|
|
1172
|
+
|
|
1173
|
+
</th></tr></thead>
|
|
1174
|
+
<tbody><tr><td>
|
|
1175
|
+
|
|
1176
|
+
netClassName
|
|
1177
|
+
|
|
1178
|
+
</td><td>
|
|
1179
|
+
|
|
1180
|
+
string
|
|
1181
|
+
|
|
1182
|
+
</td><td>
|
|
1183
|
+
|
|
1184
|
+
Net class name
|
|
1185
|
+
|
|
1186
|
+
</td></tr>
|
|
1187
|
+
<tr><td>
|
|
1188
|
+
|
|
1189
|
+
nets
|
|
1190
|
+
|
|
1191
|
+
</td><td>
|
|
1192
|
+
|
|
1193
|
+
Array<string>
|
|
1194
|
+
|
|
1195
|
+
</td><td>
|
|
1196
|
+
|
|
1197
|
+
Net name array
|
|
1198
|
+
|
|
1199
|
+
</td></tr>
|
|
1200
|
+
<tr><td>
|
|
1201
|
+
|
|
1202
|
+
color
|
|
1203
|
+
|
|
1204
|
+
</td><td>
|
|
1205
|
+
|
|
1206
|
+
[IPCB\_EqualLengthNetGroupItem](../interfaces/IPCB_EqualLengthNetGroupItem.md)<!-- -->\['color'\]
|
|
1207
|
+
|
|
1208
|
+
</td><td>
|
|
1209
|
+
|
|
1210
|
+
Net class color
|
|
1211
|
+
|
|
1212
|
+
</td></tr>
|
|
1213
|
+
</tbody></table>
|
|
1214
|
+
|
|
1215
|
+
## Returns
|
|
1216
|
+
|
|
1217
|
+
Promise<boolean>
|
|
1218
|
+
|
|
1219
|
+
Whether the operation is successful
|
|
1220
|
+
|
|
1221
|
+
## Example
|
|
1222
|
+
|
|
1223
|
+
```javascript
|
|
1224
|
+
// 1. 放两个带网络的测试焊盘,让 JLC_DEMO_P / JLC_DEMO_N 进入网表
|
|
1225
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
1226
|
+
const padP = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_P', null, 0, 0, 0, false, 0);
|
|
1227
|
+
const padN = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_N', null, 0, 0, 0, false, 0);
|
|
1228
|
+
|
|
1229
|
+
// 2. 创建网络类并纳入这两个网络,颜色用于面板区分(保留现场供观察)
|
|
1230
|
+
const created = await eda.pcb_Drc.createNetClass('嘉立创示例_网络类', ['JLC_DEMO_P', 'JLC_DEMO_N'], { r: 255, g: 0, b: 0, alpha: 1 });
|
|
1231
|
+
|
|
1232
|
+
console.log('created:', created);
|
|
1233
|
+
```
|
|
1234
|
+
|
|
1235
|
+
### createpadpairgroup
|
|
1236
|
+
|
|
1237
|
+
# PCB\_Drc.createPadPairGroup() method
|
|
1238
|
+
|
|
1239
|
+
> 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.
|
|
1240
|
+
|
|
1241
|
+
Create a pad pair group
|
|
1242
|
+
|
|
1243
|
+
## Signature
|
|
1244
|
+
|
|
1245
|
+
```typescript
|
|
1246
|
+
function createPadPairGroup(
|
|
1247
|
+
padPairGroupName: string,
|
|
1248
|
+
padPairs: Array<[string, string]>,
|
|
1249
|
+
): Promise<boolean>;
|
|
1250
|
+
```
|
|
1251
|
+
|
|
1252
|
+
## Parameters
|
|
1253
|
+
|
|
1254
|
+
<table><thead><tr><th>
|
|
1255
|
+
|
|
1256
|
+
Parameter
|
|
1257
|
+
|
|
1258
|
+
</th><th>
|
|
1259
|
+
|
|
1260
|
+
Type
|
|
1261
|
+
|
|
1262
|
+
</th><th>
|
|
1263
|
+
|
|
1264
|
+
Description
|
|
1265
|
+
|
|
1266
|
+
</th></tr></thead>
|
|
1267
|
+
<tbody><tr><td>
|
|
1268
|
+
|
|
1269
|
+
padPairGroupName
|
|
1270
|
+
|
|
1271
|
+
</td><td>
|
|
1272
|
+
|
|
1273
|
+
string
|
|
1274
|
+
|
|
1275
|
+
</td><td>
|
|
1276
|
+
|
|
1277
|
+
Pad pair group name
|
|
1278
|
+
|
|
1279
|
+
</td></tr>
|
|
1280
|
+
<tr><td>
|
|
1281
|
+
|
|
1282
|
+
padPairs
|
|
1283
|
+
|
|
1284
|
+
</td><td>
|
|
1285
|
+
|
|
1286
|
+
Array<\[string, string\]>
|
|
1287
|
+
|
|
1288
|
+
</td><td>
|
|
1289
|
+
|
|
1290
|
+
Pad for array
|
|
1291
|
+
|
|
1292
|
+
</td></tr>
|
|
1293
|
+
</tbody></table>
|
|
1294
|
+
|
|
1295
|
+
## Returns
|
|
1296
|
+
|
|
1297
|
+
Promise<boolean>
|
|
1298
|
+
|
|
1299
|
+
Whether the operation is successful
|
|
1300
|
+
|
|
1301
|
+
## Example
|
|
1302
|
+
|
|
1303
|
+
There are three different usages, and make sure the corresponding pads already exist on the canvas. They are: 1. Free pad - free pad; 2. Device pad - device pad; 3. Device pad - free pad await eda.pcb\_Drc.createPadPairGroup('test',\[\['e0','e1'\]\]) // 游离焊盘-游离焊盘 await eda.pcb\_Drc.createPadPairGroup('test',\[\['R1:1','R1:2'\],\['R2:1','R2:2'\]\]) // 器件焊盘 - 器件焊盘 await eda.pcb\_Drc.createPadPairGroup('test',\[\['R1:1','e0'\],\['R1:2','e1'\]\]) // 器件焊盘 - 游离焊盘
|
|
1304
|
+
|
|
1305
|
+
### deletedifferentialpair
|
|
1306
|
+
|
|
1307
|
+
# PCB\_Drc.deleteDifferentialPair() method
|
|
1308
|
+
|
|
1309
|
+
> 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.
|
|
1310
|
+
|
|
1311
|
+
Delete the differential pair
|
|
1312
|
+
|
|
1313
|
+
## Signature
|
|
1314
|
+
|
|
1315
|
+
```typescript
|
|
1316
|
+
function deleteDifferentialPair(differentialPairName: string): Promise<boolean>;
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
## Parameters
|
|
1320
|
+
|
|
1321
|
+
<table><thead><tr><th>
|
|
1322
|
+
|
|
1323
|
+
Parameter
|
|
1324
|
+
|
|
1325
|
+
</th><th>
|
|
1326
|
+
|
|
1327
|
+
Type
|
|
1328
|
+
|
|
1329
|
+
</th><th>
|
|
1330
|
+
|
|
1331
|
+
Description
|
|
1332
|
+
|
|
1333
|
+
</th></tr></thead>
|
|
1334
|
+
<tbody><tr><td>
|
|
1335
|
+
|
|
1336
|
+
differentialPairName
|
|
1337
|
+
|
|
1338
|
+
</td><td>
|
|
1339
|
+
|
|
1340
|
+
string
|
|
1341
|
+
|
|
1342
|
+
</td><td>
|
|
1343
|
+
|
|
1344
|
+
Differential pair name
|
|
1345
|
+
|
|
1346
|
+
</td></tr>
|
|
1347
|
+
</tbody></table>
|
|
1348
|
+
|
|
1349
|
+
## Returns
|
|
1350
|
+
|
|
1351
|
+
Promise<boolean>
|
|
1352
|
+
|
|
1353
|
+
Whether the operation is successful
|
|
1354
|
+
|
|
1355
|
+
## Example
|
|
1356
|
+
|
|
1357
|
+
```javascript
|
|
1358
|
+
// 1. 生成本次运行专用的网络名和差分对名(网络不能属于其他差分对)
|
|
1359
|
+
const ts = Date.now();
|
|
1360
|
+
const netP = `JLC_DEMO_DP_P_${ts}`;
|
|
1361
|
+
const netN = `JLC_DEMO_DP_N_${ts}`;
|
|
1362
|
+
|
|
1363
|
+
// 2. 放带差分网络的焊盘并创建差分对
|
|
1364
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
1365
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], netP, null, 0, 0, 0, false, 0);
|
|
1366
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], netN, null, 0, 0, 0, false, 0);
|
|
1367
|
+
const pairName = `嘉立创示例_待删差分对_${ts}`;
|
|
1368
|
+
await eda.pcb_Drc.createDifferentialPair(pairName, netP, netN);
|
|
1369
|
+
|
|
1370
|
+
// 3. 删除该差分对
|
|
1371
|
+
const result = await eda.pcb_Drc.deleteDifferentialPair(pairName);
|
|
1372
|
+
|
|
1373
|
+
console.log('result:', result);
|
|
1374
|
+
```
|
|
1375
|
+
|
|
1376
|
+
### deleteequallengthnetgroup
|
|
1377
|
+
|
|
1378
|
+
# PCB\_Drc.deleteEqualLengthNetGroup() method
|
|
1379
|
+
|
|
1380
|
+
> 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.
|
|
1381
|
+
|
|
1382
|
+
Delete the equal-length net group
|
|
1383
|
+
|
|
1384
|
+
## Signature
|
|
1385
|
+
|
|
1386
|
+
```typescript
|
|
1387
|
+
function deleteEqualLengthNetGroup(equalLengthNetGroupName: string): Promise<boolean>;
|
|
1388
|
+
```
|
|
1389
|
+
|
|
1390
|
+
## Parameters
|
|
1391
|
+
|
|
1392
|
+
<table><thead><tr><th>
|
|
1393
|
+
|
|
1394
|
+
Parameter
|
|
1395
|
+
|
|
1396
|
+
</th><th>
|
|
1397
|
+
|
|
1398
|
+
Type
|
|
1399
|
+
|
|
1400
|
+
</th><th>
|
|
1401
|
+
|
|
1402
|
+
Description
|
|
1403
|
+
|
|
1404
|
+
</th></tr></thead>
|
|
1405
|
+
<tbody><tr><td>
|
|
1406
|
+
|
|
1407
|
+
equalLengthNetGroupName
|
|
1408
|
+
|
|
1409
|
+
</td><td>
|
|
1410
|
+
|
|
1411
|
+
string
|
|
1412
|
+
|
|
1413
|
+
</td><td>
|
|
1414
|
+
|
|
1415
|
+
Equal-length net group name
|
|
1416
|
+
|
|
1417
|
+
</td></tr>
|
|
1418
|
+
</tbody></table>
|
|
1419
|
+
|
|
1420
|
+
## Returns
|
|
1421
|
+
|
|
1422
|
+
Promise<boolean>
|
|
1423
|
+
|
|
1424
|
+
Whether the operation is successful
|
|
1425
|
+
|
|
1426
|
+
## Example
|
|
1427
|
+
|
|
1428
|
+
```javascript
|
|
1429
|
+
// 1. 建一个待删除的等长网络组(重名创建是幂等的,重复运行也安全)
|
|
1430
|
+
await eda.pcb_Drc.createEqualLengthNetGroup('嘉立创示例_待删等长组', [], { r: 0, g: 255, b: 0, alpha: 1 });
|
|
1431
|
+
|
|
1432
|
+
// 2. 删除该等长网络组
|
|
1433
|
+
const result = await eda.pcb_Drc.deleteEqualLengthNetGroup('嘉立创示例_待删等长组');
|
|
1434
|
+
|
|
1435
|
+
console.log('result:', result);
|
|
1436
|
+
```
|
|
1437
|
+
|
|
1438
|
+
### deletenetclass
|
|
1439
|
+
|
|
1440
|
+
# PCB\_Drc.deleteNetClass() method
|
|
1441
|
+
|
|
1442
|
+
> 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.
|
|
1443
|
+
|
|
1444
|
+
Delete Net class
|
|
1445
|
+
|
|
1446
|
+
## Signature
|
|
1447
|
+
|
|
1448
|
+
```typescript
|
|
1449
|
+
function deleteNetClass(netClassName: string): Promise<boolean>;
|
|
1450
|
+
```
|
|
1451
|
+
|
|
1452
|
+
## Parameters
|
|
1453
|
+
|
|
1454
|
+
<table><thead><tr><th>
|
|
1455
|
+
|
|
1456
|
+
Parameter
|
|
1457
|
+
|
|
1458
|
+
</th><th>
|
|
1459
|
+
|
|
1460
|
+
Type
|
|
1461
|
+
|
|
1462
|
+
</th><th>
|
|
1463
|
+
|
|
1464
|
+
Description
|
|
1465
|
+
|
|
1466
|
+
</th></tr></thead>
|
|
1467
|
+
<tbody><tr><td>
|
|
1468
|
+
|
|
1469
|
+
netClassName
|
|
1470
|
+
|
|
1471
|
+
</td><td>
|
|
1472
|
+
|
|
1473
|
+
string
|
|
1474
|
+
|
|
1475
|
+
</td><td>
|
|
1476
|
+
|
|
1477
|
+
Net class name
|
|
1478
|
+
|
|
1479
|
+
</td></tr>
|
|
1480
|
+
</tbody></table>
|
|
1481
|
+
|
|
1482
|
+
## Returns
|
|
1483
|
+
|
|
1484
|
+
Promise<boolean>
|
|
1485
|
+
|
|
1486
|
+
Whether the operation is successful
|
|
1487
|
+
|
|
1488
|
+
## Example
|
|
1489
|
+
|
|
1490
|
+
```javascript
|
|
1491
|
+
// 1. 建一个待删除的网络类(重名创建是幂等的,重复运行也安全)
|
|
1492
|
+
await eda.pcb_Drc.createNetClass('嘉立创示例_待删网络类', [], { r: 255, g: 0, b: 0, alpha: 1 });
|
|
1493
|
+
|
|
1494
|
+
// 2. 删除该网络类
|
|
1495
|
+
const result = await eda.pcb_Drc.deleteNetClass('嘉立创示例_待删网络类');
|
|
1496
|
+
|
|
1497
|
+
console.log('result:', result);
|
|
1498
|
+
```
|
|
1499
|
+
|
|
1500
|
+
### deletepadpairgroup
|
|
1501
|
+
|
|
1502
|
+
# PCB\_Drc.deletePadPairGroup() method
|
|
1503
|
+
|
|
1504
|
+
> 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.
|
|
1505
|
+
|
|
1506
|
+
Delete the pad pair group
|
|
1507
|
+
|
|
1508
|
+
## Signature
|
|
1509
|
+
|
|
1510
|
+
```typescript
|
|
1511
|
+
function deletePadPairGroup(padPairGroupName: string): Promise<boolean>;
|
|
1512
|
+
```
|
|
1513
|
+
|
|
1514
|
+
## Parameters
|
|
1515
|
+
|
|
1516
|
+
<table><thead><tr><th>
|
|
1517
|
+
|
|
1518
|
+
Parameter
|
|
1519
|
+
|
|
1520
|
+
</th><th>
|
|
1521
|
+
|
|
1522
|
+
Type
|
|
1523
|
+
|
|
1524
|
+
</th><th>
|
|
1525
|
+
|
|
1526
|
+
Description
|
|
1527
|
+
|
|
1528
|
+
</th></tr></thead>
|
|
1529
|
+
<tbody><tr><td>
|
|
1530
|
+
|
|
1531
|
+
padPairGroupName
|
|
1532
|
+
|
|
1533
|
+
</td><td>
|
|
1534
|
+
|
|
1535
|
+
string
|
|
1536
|
+
|
|
1537
|
+
</td><td>
|
|
1538
|
+
|
|
1539
|
+
Pad pair group name
|
|
1540
|
+
|
|
1541
|
+
</td></tr>
|
|
1542
|
+
</tbody></table>
|
|
1543
|
+
|
|
1544
|
+
## Returns
|
|
1545
|
+
|
|
1546
|
+
Promise<boolean>
|
|
1547
|
+
|
|
1548
|
+
Whether the operation is successful
|
|
1549
|
+
|
|
1550
|
+
### deleteruleconfiguration
|
|
1551
|
+
|
|
1552
|
+
# PCB\_Drc.deleteRuleConfiguration() method
|
|
1553
|
+
|
|
1554
|
+
> 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.
|
|
1555
|
+
|
|
1556
|
+
Delete Design rule configuration
|
|
1557
|
+
|
|
1558
|
+
## Signature
|
|
1559
|
+
|
|
1560
|
+
```typescript
|
|
1561
|
+
function deleteRuleConfiguration(configurationName: string): Promise<boolean>;
|
|
1562
|
+
```
|
|
1563
|
+
|
|
1564
|
+
## Parameters
|
|
1565
|
+
|
|
1566
|
+
<table><thead><tr><th>
|
|
1567
|
+
|
|
1568
|
+
Parameter
|
|
1569
|
+
|
|
1570
|
+
</th><th>
|
|
1571
|
+
|
|
1572
|
+
Type
|
|
1573
|
+
|
|
1574
|
+
</th><th>
|
|
1575
|
+
|
|
1576
|
+
Description
|
|
1577
|
+
|
|
1578
|
+
</th></tr></thead>
|
|
1579
|
+
<tbody><tr><td>
|
|
1580
|
+
|
|
1581
|
+
configurationName
|
|
1582
|
+
|
|
1583
|
+
</td><td>
|
|
1584
|
+
|
|
1585
|
+
string
|
|
1586
|
+
|
|
1587
|
+
</td><td>
|
|
1588
|
+
|
|
1589
|
+
Configuration name
|
|
1590
|
+
|
|
1591
|
+
</td></tr>
|
|
1592
|
+
</tbody></table>
|
|
1593
|
+
|
|
1594
|
+
## Returns
|
|
1595
|
+
|
|
1596
|
+
Promise<boolean>
|
|
1597
|
+
|
|
1598
|
+
Delete Whether Successful
|
|
1599
|
+
|
|
1600
|
+
## Remarks
|
|
1601
|
+
|
|
1602
|
+
The system configuration does not allow deletion
|
|
1603
|
+
|
|
1604
|
+
## Example
|
|
1605
|
+
|
|
1606
|
+
```javascript
|
|
1607
|
+
// 1. 读取当前配置并保存为待删除的自定义配置
|
|
1608
|
+
const current = await eda.pcb_Drc.getCurrentRuleConfiguration();
|
|
1609
|
+
await eda.pcb_Drc.saveRuleConfiguration(current.config, '嘉立创示例_待删配置', true);
|
|
1610
|
+
|
|
1611
|
+
// 2. 删除该自定义配置
|
|
1612
|
+
const result = await eda.pcb_Drc.deleteRuleConfiguration('嘉立创示例_待删配置');
|
|
1613
|
+
|
|
1614
|
+
console.log('result:', result);
|
|
1615
|
+
```
|
|
1616
|
+
|
|
1617
|
+
### getalldifferentialpairs
|
|
1618
|
+
|
|
1619
|
+
# PCB\_Drc.getAllDifferentialPairs() method
|
|
1620
|
+
|
|
1621
|
+
> 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.
|
|
1622
|
+
|
|
1623
|
+
Get the detailed properties of all differential pairs
|
|
1624
|
+
|
|
1625
|
+
## Signature
|
|
1626
|
+
|
|
1627
|
+
```typescript
|
|
1628
|
+
function getAllDifferentialPairs(): Promise<Array<IPCB_DifferentialPairItem> | Record<string, any>>;
|
|
1629
|
+
```
|
|
1630
|
+
|
|
1631
|
+
## Returns
|
|
1632
|
+
|
|
1633
|
+
Promise<Array<[IPCB\_DifferentialPairItem](../interfaces/IPCB_DifferentialPairItem.md)<!-- -->> \| Record<string, any>>
|
|
1634
|
+
|
|
1635
|
+
Detailed properties of all differential pairs
|
|
1636
|
+
|
|
1637
|
+
## Remarks
|
|
1638
|
+
|
|
1639
|
+
- The return value type is changed to an object BREAKING CHANGE since EDA v3.4
|
|
1640
|
+
|
|
1641
|
+
## Example
|
|
1642
|
+
|
|
1643
|
+
```javascript
|
|
1644
|
+
// 1. 生成本次运行专用的网络名和差分对名,创建测试差分对
|
|
1645
|
+
const ts = Date.now();
|
|
1646
|
+
const netP = `JLC_DEMO_DP_P_${ts}`;
|
|
1647
|
+
const netN = `JLC_DEMO_DP_N_${ts}`;
|
|
1648
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
1649
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], netP, null, 0, 0, 0, false, 0);
|
|
1650
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], netN, null, 0, 0, 0, false, 0);
|
|
1651
|
+
const pairName = `嘉立创示例_查询差分对_${ts}`;
|
|
1652
|
+
await eda.pcb_Drc.createDifferentialPair(pairName, netP, netN);
|
|
1653
|
+
|
|
1654
|
+
// 2. 查询所有差分对(v3.4 起返回结构可能为数组或对象,先按数组遍历)
|
|
1655
|
+
const pairs = await eda.pcb_Drc.getAllDifferentialPairs();
|
|
1656
|
+
const list = Array.isArray(pairs) ? pairs : Object.values(pairs);
|
|
1657
|
+
console.log('count:', list.length);
|
|
1658
|
+
list.forEach((p, i) => {
|
|
1659
|
+
console.log(`[${i}] name:`, p.name, 'positiveNet:', p.positiveNet, 'negativeNet:', p.negativeNet);
|
|
1660
|
+
});
|
|
1661
|
+
|
|
1662
|
+
// 3. 清理测试差分对(查询类清理现场)
|
|
1663
|
+
await eda.pcb_Drc.deleteDifferentialPair(pairName);
|
|
1664
|
+
```
|
|
1665
|
+
|
|
1666
|
+
### getallequallengthnetgroups
|
|
1667
|
+
|
|
1668
|
+
# PCB\_Drc.getAllEqualLengthNetGroups() method
|
|
1669
|
+
|
|
1670
|
+
> 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.
|
|
1671
|
+
|
|
1672
|
+
Get the detailed properties of all equal-length net groups
|
|
1673
|
+
|
|
1674
|
+
## Signature
|
|
1675
|
+
|
|
1676
|
+
```typescript
|
|
1677
|
+
function getAllEqualLengthNetGroups(): Promise<Array<IPCB_EqualLengthNetGroupItem>>;
|
|
1678
|
+
```
|
|
1679
|
+
|
|
1680
|
+
## Returns
|
|
1681
|
+
|
|
1682
|
+
Promise<Array<[IPCB\_EqualLengthNetGroupItem](../interfaces/IPCB_EqualLengthNetGroupItem.md)<!-- -->>>
|
|
1683
|
+
|
|
1684
|
+
Detailed properties of all equal-length net groups
|
|
1685
|
+
|
|
1686
|
+
## Example
|
|
1687
|
+
|
|
1688
|
+
```javascript
|
|
1689
|
+
// 1. 建一个测试等长组作为查询对象
|
|
1690
|
+
await eda.pcb_Drc.createEqualLengthNetGroup('嘉立创示例_查询等长组', [], { r: 0, g: 255, b: 0, alpha: 1 });
|
|
1691
|
+
|
|
1692
|
+
// 2. 查询所有等长网络组
|
|
1693
|
+
const groups = await eda.pcb_Drc.getAllEqualLengthNetGroups();
|
|
1694
|
+
console.log('count:', groups.length);
|
|
1695
|
+
groups.forEach((g, i) => {
|
|
1696
|
+
console.log(`[${i}] name:`, g.name);
|
|
1697
|
+
});
|
|
1698
|
+
|
|
1699
|
+
// 3. 清理测试等长组(查询类清理现场)
|
|
1700
|
+
await eda.pcb_Drc.deleteEqualLengthNetGroup('嘉立创示例_查询等长组');
|
|
1701
|
+
```
|
|
1702
|
+
|
|
1703
|
+
### getallnetclasses
|
|
1704
|
+
|
|
1705
|
+
# PCB\_Drc.getAllNetClasses() method
|
|
1706
|
+
|
|
1707
|
+
> 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.
|
|
1708
|
+
|
|
1709
|
+
Get all Net class detailed properties of
|
|
1710
|
+
|
|
1711
|
+
## Signature
|
|
1712
|
+
|
|
1713
|
+
```typescript
|
|
1714
|
+
function getAllNetClasses(): Promise<Array<IPCB_NetClassItem>>;
|
|
1715
|
+
```
|
|
1716
|
+
|
|
1717
|
+
## Returns
|
|
1718
|
+
|
|
1719
|
+
Promise<Array<[IPCB\_NetClassItem](../interfaces/IPCB_NetClassItem.md)<!-- -->>>
|
|
1720
|
+
|
|
1721
|
+
Detailed properties of all net classes
|
|
1722
|
+
|
|
1723
|
+
## Example
|
|
1724
|
+
|
|
1725
|
+
```javascript
|
|
1726
|
+
// 1. 建一个测试网络类作为查询对象
|
|
1727
|
+
await eda.pcb_Drc.createNetClass('嘉立创示例_查询网络类', [], { r: 255, g: 0, b: 0, alpha: 1 });
|
|
1728
|
+
|
|
1729
|
+
// 2. 查询所有网络类
|
|
1730
|
+
const classes = await eda.pcb_Drc.getAllNetClasses();
|
|
1731
|
+
console.log('count:', classes.length);
|
|
1732
|
+
classes.forEach((c, i) => {
|
|
1733
|
+
console.log(`[${i}] name:`, c.name);
|
|
1734
|
+
});
|
|
1735
|
+
|
|
1736
|
+
// 3. 清理测试网络类(查询类清理现场)
|
|
1737
|
+
await eda.pcb_Drc.deleteNetClass('嘉立创示例_查询网络类');
|
|
1738
|
+
```
|
|
1739
|
+
|
|
1740
|
+
### getallpadpairgroups
|
|
1741
|
+
|
|
1742
|
+
# PCB\_Drc.getAllPadPairGroups() method
|
|
1743
|
+
|
|
1744
|
+
> 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.
|
|
1745
|
+
|
|
1746
|
+
Get the detailed properties of all pad pair groups
|
|
1747
|
+
|
|
1748
|
+
## Signature
|
|
1749
|
+
|
|
1750
|
+
```typescript
|
|
1751
|
+
function getAllPadPairGroups(): Promise<Array<IPCB_PadPairGroupItem>>;
|
|
1752
|
+
```
|
|
1753
|
+
|
|
1754
|
+
## Returns
|
|
1755
|
+
|
|
1756
|
+
Promise<Array<[IPCB\_PadPairGroupItem](../interfaces/IPCB_PadPairGroupItem.md)<!-- -->>>
|
|
1757
|
+
|
|
1758
|
+
Detailed properties of all pad pair groups
|
|
1759
|
+
|
|
1760
|
+
## Example
|
|
1761
|
+
|
|
1762
|
+
```javascript
|
|
1763
|
+
// 1. 查询所有焊盘对组
|
|
1764
|
+
const groups = await eda.pcb_Drc.getAllPadPairGroups();
|
|
1765
|
+
|
|
1766
|
+
// 2. 输出每个组的名称和焊盘对
|
|
1767
|
+
console.log('count:', groups.length);
|
|
1768
|
+
groups.forEach((g, i) => {
|
|
1769
|
+
console.log(`[${i}] name:`, g.name);
|
|
1770
|
+
g.padPairs.forEach((pair, j) => {
|
|
1771
|
+
console.log(` pair[${j}]:`, pair[0], '↔', pair[1]);
|
|
1772
|
+
});
|
|
1773
|
+
});
|
|
1774
|
+
```
|
|
1775
|
+
|
|
1776
|
+
### getallruleconfigurations
|
|
1777
|
+
|
|
1778
|
+
# PCB\_Drc.getAllRuleConfigurations() method
|
|
1779
|
+
|
|
1780
|
+
> 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.
|
|
1781
|
+
|
|
1782
|
+
Get all Design rule configuration
|
|
1783
|
+
|
|
1784
|
+
## Signature
|
|
1785
|
+
|
|
1786
|
+
```typescript
|
|
1787
|
+
function getAllRuleConfigurations(includeSystem?: boolean): Promise<Array<Record<string, any>>>;
|
|
1788
|
+
```
|
|
1789
|
+
|
|
1790
|
+
## Parameters
|
|
1791
|
+
|
|
1792
|
+
<table><thead><tr><th>
|
|
1793
|
+
|
|
1794
|
+
Parameter
|
|
1795
|
+
|
|
1796
|
+
</th><th>
|
|
1797
|
+
|
|
1798
|
+
Type
|
|
1799
|
+
|
|
1800
|
+
</th><th>
|
|
1801
|
+
|
|
1802
|
+
Description
|
|
1803
|
+
|
|
1804
|
+
</th></tr></thead>
|
|
1805
|
+
<tbody><tr><td>
|
|
1806
|
+
|
|
1807
|
+
includeSystem
|
|
1808
|
+
|
|
1809
|
+
</td><td>
|
|
1810
|
+
|
|
1811
|
+
boolean
|
|
1812
|
+
|
|
1813
|
+
</td><td>
|
|
1814
|
+
|
|
1815
|
+
_(Optional)_ Whether Get System design rule configuration
|
|
1816
|
+
|
|
1817
|
+
</td></tr>
|
|
1818
|
+
</tbody></table>
|
|
1819
|
+
|
|
1820
|
+
## Returns
|
|
1821
|
+
|
|
1822
|
+
Promise<Array<Record<string, any>>>
|
|
1823
|
+
|
|
1824
|
+
All design rule configurations
|
|
1825
|
+
|
|
1826
|
+
## Example
|
|
1827
|
+
|
|
1828
|
+
```javascript
|
|
1829
|
+
// 1. 查询全部设计规则配置(含系统配置)
|
|
1830
|
+
const all = await eda.pcb_Drc.getAllRuleConfigurations(true);
|
|
1831
|
+
|
|
1832
|
+
// 2. 输出配置数量和名称
|
|
1833
|
+
console.log('count:', all.length);
|
|
1834
|
+
all.forEach((c, i) => {
|
|
1835
|
+
console.log(`[${i}] name:`, c.name);
|
|
1836
|
+
});
|
|
1837
|
+
```
|
|
1838
|
+
|
|
1839
|
+
### getcurrentruleconfiguration
|
|
1840
|
+
|
|
1841
|
+
# PCB\_Drc.getCurrentRuleConfiguration() method
|
|
1842
|
+
|
|
1843
|
+
> 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.
|
|
1844
|
+
|
|
1845
|
+
Get Current design rule configuration
|
|
1846
|
+
|
|
1847
|
+
## Signature
|
|
1848
|
+
|
|
1849
|
+
```typescript
|
|
1850
|
+
function getCurrentRuleConfiguration(): Promise<Record<string, any> | undefined>;
|
|
1851
|
+
```
|
|
1852
|
+
|
|
1853
|
+
## Returns
|
|
1854
|
+
|
|
1855
|
+
Promise<Record<string, any> \| undefined>
|
|
1856
|
+
|
|
1857
|
+
Current design rule configuration; `undefined` indicates that the retrieval failed
|
|
1858
|
+
|
|
1859
|
+
### getcurrentruleconfigurationname
|
|
1860
|
+
|
|
1861
|
+
# PCB\_Drc.getCurrentRuleConfigurationName() method
|
|
1862
|
+
|
|
1863
|
+
Get Current design rule configuration name
|
|
1864
|
+
|
|
1865
|
+
## Signature
|
|
1866
|
+
|
|
1867
|
+
```typescript
|
|
1868
|
+
function getCurrentRuleConfigurationName(): Promise<string | undefined>;
|
|
1869
|
+
```
|
|
1870
|
+
|
|
1871
|
+
## Returns
|
|
1872
|
+
|
|
1873
|
+
Promise<string \| undefined>
|
|
1874
|
+
|
|
1875
|
+
Current design rule configuration name; `undefined` indicates that the retrieval failed
|
|
1876
|
+
|
|
1877
|
+
### getdefaultruleconfigurationname
|
|
1878
|
+
|
|
1879
|
+
# PCB\_Drc.getDefaultRuleConfigurationName() method
|
|
1880
|
+
|
|
1881
|
+
> 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.
|
|
1882
|
+
|
|
1883
|
+
Get the name of the default design rule configuration for new PCBs
|
|
1884
|
+
|
|
1885
|
+
## Signature
|
|
1886
|
+
|
|
1887
|
+
```typescript
|
|
1888
|
+
function getDefaultRuleConfigurationName(): Promise<string | undefined>;
|
|
1889
|
+
```
|
|
1890
|
+
|
|
1891
|
+
## Returns
|
|
1892
|
+
|
|
1893
|
+
Promise<string \| undefined>
|
|
1894
|
+
|
|
1895
|
+
Default design rule configuration name of; `undefined` indicates that the retrieval failed
|
|
1896
|
+
|
|
1897
|
+
### getnetbynetrules
|
|
1898
|
+
|
|
1899
|
+
# PCB\_Drc.getNetByNetRules() method
|
|
1900
|
+
|
|
1901
|
+
> 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.
|
|
1902
|
+
|
|
1903
|
+
Get Net - net rules
|
|
1904
|
+
|
|
1905
|
+
## Signature
|
|
1906
|
+
|
|
1907
|
+
```typescript
|
|
1908
|
+
function getNetByNetRules(): Promise<Record<string, any>>;
|
|
1909
|
+
```
|
|
1910
|
+
|
|
1911
|
+
## Returns
|
|
1912
|
+
|
|
1913
|
+
Promise<Record<string, any>>
|
|
1914
|
+
|
|
1915
|
+
All net-by-net rules of the current PCB
|
|
1916
|
+
|
|
1917
|
+
### getnetrules
|
|
1918
|
+
|
|
1919
|
+
# PCB\_Drc.getNetRules() method
|
|
1920
|
+
|
|
1921
|
+
> 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.
|
|
1922
|
+
|
|
1923
|
+
Get Net rules
|
|
1924
|
+
|
|
1925
|
+
## Signature
|
|
1926
|
+
|
|
1927
|
+
```typescript
|
|
1928
|
+
function getNetRules(): Promise<Array<Record<string, any>>>;
|
|
1929
|
+
```
|
|
1930
|
+
|
|
1931
|
+
## Returns
|
|
1932
|
+
|
|
1933
|
+
Promise<Array<Record<string, any>>>
|
|
1934
|
+
|
|
1935
|
+
All net rules of the current PCB
|
|
1936
|
+
|
|
1937
|
+
### getpadpairgroupminwirelength
|
|
1938
|
+
|
|
1939
|
+
# PCB\_Drc.getPadPairGroupMinWireLength() method
|
|
1940
|
+
|
|
1941
|
+
> 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.
|
|
1942
|
+
|
|
1943
|
+
Get the minimum wire length of a pad pair group
|
|
1944
|
+
|
|
1945
|
+
## Signature
|
|
1946
|
+
|
|
1947
|
+
```typescript
|
|
1948
|
+
function getPadPairGroupMinWireLength(
|
|
1949
|
+
padPairGroupName: string,
|
|
1950
|
+
): Promise<Array<IPCB_PadPairMinWireLengthItem>>;
|
|
1951
|
+
```
|
|
1952
|
+
|
|
1953
|
+
## Parameters
|
|
1954
|
+
|
|
1955
|
+
<table><thead><tr><th>
|
|
1956
|
+
|
|
1957
|
+
Parameter
|
|
1958
|
+
|
|
1959
|
+
</th><th>
|
|
1960
|
+
|
|
1961
|
+
Type
|
|
1962
|
+
|
|
1963
|
+
</th><th>
|
|
1964
|
+
|
|
1965
|
+
Description
|
|
1966
|
+
|
|
1967
|
+
</th></tr></thead>
|
|
1968
|
+
<tbody><tr><td>
|
|
1969
|
+
|
|
1970
|
+
padPairGroupName
|
|
1971
|
+
|
|
1972
|
+
</td><td>
|
|
1973
|
+
|
|
1974
|
+
string
|
|
1975
|
+
|
|
1976
|
+
</td><td>
|
|
1977
|
+
|
|
1978
|
+
Pad pair group name
|
|
1979
|
+
|
|
1980
|
+
</td></tr>
|
|
1981
|
+
</tbody></table>
|
|
1982
|
+
|
|
1983
|
+
## Returns
|
|
1984
|
+
|
|
1985
|
+
Promise<Array<[IPCB\_PadPairMinWireLengthItem](../interfaces/IPCB_PadPairMinWireLengthItem.md)<!-- -->>>
|
|
1986
|
+
|
|
1987
|
+
The minimum wire lengths of all pad pairs
|
|
1988
|
+
|
|
1989
|
+
### getrealtimedrcstatus
|
|
1990
|
+
|
|
1991
|
+
# PCB\_Drc.getRealTimeDrcStatus() method
|
|
1992
|
+
|
|
1993
|
+
> 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.
|
|
1994
|
+
|
|
1995
|
+
Get Real-time DRC check state
|
|
1996
|
+
|
|
1997
|
+
## Signature
|
|
1998
|
+
|
|
1999
|
+
```typescript
|
|
2000
|
+
function getRealTimeDrcStatus(): Promise<boolean>;
|
|
2001
|
+
```
|
|
2002
|
+
|
|
2003
|
+
## Returns
|
|
2004
|
+
|
|
2005
|
+
Promise<boolean>
|
|
2006
|
+
|
|
2007
|
+
Real-time DRC check status. If real-time DRC is stopped, not in a PCB, or the retrieval fails, `false` is returned
|
|
2008
|
+
|
|
2009
|
+
## Remarks
|
|
2010
|
+
|
|
2011
|
+
ADD since EDA v4.2
|
|
2012
|
+
|
|
2013
|
+
### getregionrules
|
|
2014
|
+
|
|
2015
|
+
# PCB\_Drc.getRegionRules() method
|
|
2016
|
+
|
|
2017
|
+
> 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.
|
|
2018
|
+
|
|
2019
|
+
Get region rules
|
|
2020
|
+
|
|
2021
|
+
## Signature
|
|
2022
|
+
|
|
2023
|
+
```typescript
|
|
2024
|
+
function getRegionRules(): Promise<Array<Record<string, any>>>;
|
|
2025
|
+
```
|
|
2026
|
+
|
|
2027
|
+
## Returns
|
|
2028
|
+
|
|
2029
|
+
Promise<Array<Record<string, any>>>
|
|
2030
|
+
|
|
2031
|
+
- All region rules of the current PCB
|
|
2032
|
+
|
|
2033
|
+
### getruleconfiguration
|
|
2034
|
+
|
|
2035
|
+
# PCB\_Drc.getRuleConfiguration() method
|
|
2036
|
+
|
|
2037
|
+
Get Specify design rule configuration
|
|
2038
|
+
|
|
2039
|
+
## Signature
|
|
2040
|
+
|
|
2041
|
+
```typescript
|
|
2042
|
+
function getRuleConfiguration(configurationName: string): Promise<Record<string, any> | undefined>;
|
|
2043
|
+
```
|
|
2044
|
+
|
|
2045
|
+
## Parameters
|
|
2046
|
+
|
|
2047
|
+
<table><thead><tr><th>
|
|
2048
|
+
|
|
2049
|
+
Parameter
|
|
2050
|
+
|
|
2051
|
+
</th><th>
|
|
2052
|
+
|
|
2053
|
+
Type
|
|
2054
|
+
|
|
2055
|
+
</th><th>
|
|
2056
|
+
|
|
2057
|
+
Description
|
|
2058
|
+
|
|
2059
|
+
</th></tr></thead>
|
|
2060
|
+
<tbody><tr><td>
|
|
2061
|
+
|
|
2062
|
+
configurationName
|
|
2063
|
+
|
|
2064
|
+
</td><td>
|
|
2065
|
+
|
|
2066
|
+
string
|
|
2067
|
+
|
|
2068
|
+
</td><td>
|
|
2069
|
+
|
|
2070
|
+
Configuration name
|
|
2071
|
+
|
|
2072
|
+
</td></tr>
|
|
2073
|
+
</tbody></table>
|
|
2074
|
+
|
|
2075
|
+
## Returns
|
|
2076
|
+
|
|
2077
|
+
Promise<Record<string, any> \| undefined>
|
|
2078
|
+
|
|
2079
|
+
Design rule configuration, `undefined` is does not exist this design rules
|
|
2080
|
+
|
|
2081
|
+
### modifydifferentialpairname
|
|
2082
|
+
|
|
2083
|
+
# PCB\_Drc.modifyDifferentialPairName() method
|
|
2084
|
+
|
|
2085
|
+
> 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.
|
|
2086
|
+
|
|
2087
|
+
Modify the name of the differential pair
|
|
2088
|
+
|
|
2089
|
+
## Signature
|
|
2090
|
+
|
|
2091
|
+
```typescript
|
|
2092
|
+
function modifyDifferentialPairName(
|
|
2093
|
+
originalDifferentialPairName: string,
|
|
2094
|
+
differentialPairName: string,
|
|
2095
|
+
): Promise<boolean>;
|
|
2096
|
+
```
|
|
2097
|
+
|
|
2098
|
+
## Parameters
|
|
2099
|
+
|
|
2100
|
+
<table><thead><tr><th>
|
|
2101
|
+
|
|
2102
|
+
Parameter
|
|
2103
|
+
|
|
2104
|
+
</th><th>
|
|
2105
|
+
|
|
2106
|
+
Type
|
|
2107
|
+
|
|
2108
|
+
</th><th>
|
|
2109
|
+
|
|
2110
|
+
Description
|
|
2111
|
+
|
|
2112
|
+
</th></tr></thead>
|
|
2113
|
+
<tbody><tr><td>
|
|
2114
|
+
|
|
2115
|
+
originalDifferentialPairName
|
|
2116
|
+
|
|
2117
|
+
</td><td>
|
|
2118
|
+
|
|
2119
|
+
string
|
|
2120
|
+
|
|
2121
|
+
</td><td>
|
|
2122
|
+
|
|
2123
|
+
Original differential pair name
|
|
2124
|
+
|
|
2125
|
+
</td></tr>
|
|
2126
|
+
<tr><td>
|
|
2127
|
+
|
|
2128
|
+
differentialPairName
|
|
2129
|
+
|
|
2130
|
+
</td><td>
|
|
2131
|
+
|
|
2132
|
+
string
|
|
2133
|
+
|
|
2134
|
+
</td><td>
|
|
2135
|
+
|
|
2136
|
+
New differential pair name
|
|
2137
|
+
|
|
2138
|
+
</td></tr>
|
|
2139
|
+
</tbody></table>
|
|
2140
|
+
|
|
2141
|
+
## Returns
|
|
2142
|
+
|
|
2143
|
+
Promise<boolean>
|
|
2144
|
+
|
|
2145
|
+
Whether the operation is successful
|
|
2146
|
+
|
|
2147
|
+
## Example
|
|
2148
|
+
|
|
2149
|
+
```javascript
|
|
2150
|
+
// 1. 生成本次运行专用的网络名和差分对名(网络不能属于其他差分对)
|
|
2151
|
+
const ts = Date.now();
|
|
2152
|
+
const netP = `JLC_DEMO_DP_P_${ts}`;
|
|
2153
|
+
const netN = `JLC_DEMO_DP_N_${ts}`;
|
|
2154
|
+
|
|
2155
|
+
// 2. 放带差分网络的焊盘并创建差分对
|
|
2156
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
2157
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], netP, null, 0, 0, 0, false, 0);
|
|
2158
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], netN, null, 0, 0, 0, false, 0);
|
|
2159
|
+
const pairName = `嘉立创示例_差分对_${ts}`;
|
|
2160
|
+
await eda.pcb_Drc.createDifferentialPair(pairName, netP, netN);
|
|
2161
|
+
|
|
2162
|
+
// 3. 改名(保留现场供观察)
|
|
2163
|
+
const newName = `嘉立创示例_差分对_改_${ts}`;
|
|
2164
|
+
const result = await eda.pcb_Drc.modifyDifferentialPairName(pairName, newName);
|
|
2165
|
+
|
|
2166
|
+
console.log('newName:', newName);
|
|
2167
|
+
console.log('result:', result);
|
|
2168
|
+
```
|
|
2169
|
+
|
|
2170
|
+
### modifydifferentialpairnegativenet
|
|
2171
|
+
|
|
2172
|
+
# PCB\_Drc.modifyDifferentialPairNegativeNet() method
|
|
2173
|
+
|
|
2174
|
+
> 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.
|
|
2175
|
+
|
|
2176
|
+
Modify the negative net of the differential pair
|
|
2177
|
+
|
|
2178
|
+
## Signature
|
|
2179
|
+
|
|
2180
|
+
```typescript
|
|
2181
|
+
function modifyDifferentialPairNegativeNet(
|
|
2182
|
+
differentialPairName: string,
|
|
2183
|
+
negativeNet: string,
|
|
2184
|
+
): Promise<boolean>;
|
|
2185
|
+
```
|
|
2186
|
+
|
|
2187
|
+
## Parameters
|
|
2188
|
+
|
|
2189
|
+
<table><thead><tr><th>
|
|
2190
|
+
|
|
2191
|
+
Parameter
|
|
2192
|
+
|
|
2193
|
+
</th><th>
|
|
2194
|
+
|
|
2195
|
+
Type
|
|
2196
|
+
|
|
2197
|
+
</th><th>
|
|
2198
|
+
|
|
2199
|
+
Description
|
|
2200
|
+
|
|
2201
|
+
</th></tr></thead>
|
|
2202
|
+
<tbody><tr><td>
|
|
2203
|
+
|
|
2204
|
+
differentialPairName
|
|
2205
|
+
|
|
2206
|
+
</td><td>
|
|
2207
|
+
|
|
2208
|
+
string
|
|
2209
|
+
|
|
2210
|
+
</td><td>
|
|
2211
|
+
|
|
2212
|
+
Differential pair name
|
|
2213
|
+
|
|
2214
|
+
</td></tr>
|
|
2215
|
+
<tr><td>
|
|
2216
|
+
|
|
2217
|
+
negativeNet
|
|
2218
|
+
|
|
2219
|
+
</td><td>
|
|
2220
|
+
|
|
2221
|
+
string
|
|
2222
|
+
|
|
2223
|
+
</td><td>
|
|
2224
|
+
|
|
2225
|
+
Negative net name
|
|
2226
|
+
|
|
2227
|
+
</td></tr>
|
|
2228
|
+
</tbody></table>
|
|
2229
|
+
|
|
2230
|
+
## Returns
|
|
2231
|
+
|
|
2232
|
+
Promise<boolean>
|
|
2233
|
+
|
|
2234
|
+
Whether the operation is successful
|
|
2235
|
+
|
|
2236
|
+
## Example
|
|
2237
|
+
|
|
2238
|
+
```javascript
|
|
2239
|
+
// 1. 生成本次运行专用的网络名(避免与其他差分对冲突)
|
|
2240
|
+
const ts = Date.now();
|
|
2241
|
+
const netP = `JLC_DEMO_DP_P_${ts}`;
|
|
2242
|
+
const netN = `JLC_DEMO_DP_N_${ts}`;
|
|
2243
|
+
const newNetN = `JLC_DEMO_DP_N2_${ts}`;
|
|
2244
|
+
|
|
2245
|
+
// 2. 放三个带网络的焊盘并创建差分对
|
|
2246
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
2247
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], netP, null, 0, 0, 0, false, 0);
|
|
2248
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], netN, null, 0, 0, 0, false, 0);
|
|
2249
|
+
await eda.pcb_PrimitivePad.create(1, '3', x + 1000, 3000, 0, ['ELLIPSE', 60, 60], newNetN, null, 0, 0, 0, false, 0);
|
|
2250
|
+
const pairName = `嘉立创示例_差分对_${ts}`;
|
|
2251
|
+
await eda.pcb_Drc.createDifferentialPair(pairName, netP, netN);
|
|
2252
|
+
|
|
2253
|
+
// 3. 把负网络替换为 newNetN(保留现场供观察)
|
|
2254
|
+
const result = await eda.pcb_Drc.modifyDifferentialPairNegativeNet(pairName, newNetN);
|
|
2255
|
+
|
|
2256
|
+
console.log('newNegativeNet:', newNetN);
|
|
2257
|
+
console.log('result:', result);
|
|
2258
|
+
```
|
|
2259
|
+
|
|
2260
|
+
### modifydifferentialpairpositivenet
|
|
2261
|
+
|
|
2262
|
+
# PCB\_Drc.modifyDifferentialPairPositiveNet() method
|
|
2263
|
+
|
|
2264
|
+
> 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.
|
|
2265
|
+
|
|
2266
|
+
Modify the positive net of the differential pair
|
|
2267
|
+
|
|
2268
|
+
## Signature
|
|
2269
|
+
|
|
2270
|
+
```typescript
|
|
2271
|
+
function modifyDifferentialPairPositiveNet(
|
|
2272
|
+
differentialPairName: string,
|
|
2273
|
+
positiveNet: string,
|
|
2274
|
+
): Promise<boolean>;
|
|
2275
|
+
```
|
|
2276
|
+
|
|
2277
|
+
## Parameters
|
|
2278
|
+
|
|
2279
|
+
<table><thead><tr><th>
|
|
2280
|
+
|
|
2281
|
+
Parameter
|
|
2282
|
+
|
|
2283
|
+
</th><th>
|
|
2284
|
+
|
|
2285
|
+
Type
|
|
2286
|
+
|
|
2287
|
+
</th><th>
|
|
2288
|
+
|
|
2289
|
+
Description
|
|
2290
|
+
|
|
2291
|
+
</th></tr></thead>
|
|
2292
|
+
<tbody><tr><td>
|
|
2293
|
+
|
|
2294
|
+
differentialPairName
|
|
2295
|
+
|
|
2296
|
+
</td><td>
|
|
2297
|
+
|
|
2298
|
+
string
|
|
2299
|
+
|
|
2300
|
+
</td><td>
|
|
2301
|
+
|
|
2302
|
+
Differential pair name
|
|
2303
|
+
|
|
2304
|
+
</td></tr>
|
|
2305
|
+
<tr><td>
|
|
2306
|
+
|
|
2307
|
+
positiveNet
|
|
2308
|
+
|
|
2309
|
+
</td><td>
|
|
2310
|
+
|
|
2311
|
+
string
|
|
2312
|
+
|
|
2313
|
+
</td><td>
|
|
2314
|
+
|
|
2315
|
+
Positive net name
|
|
2316
|
+
|
|
2317
|
+
</td></tr>
|
|
2318
|
+
</tbody></table>
|
|
2319
|
+
|
|
2320
|
+
## Returns
|
|
2321
|
+
|
|
2322
|
+
Promise<boolean>
|
|
2323
|
+
|
|
2324
|
+
Whether the operation is successful
|
|
2325
|
+
|
|
2326
|
+
## Example
|
|
2327
|
+
|
|
2328
|
+
```javascript
|
|
2329
|
+
// 1. 生成本次运行专用的网络名(避免与其他差分对冲突)
|
|
2330
|
+
const ts = Date.now();
|
|
2331
|
+
const netP = `JLC_DEMO_DP_P_${ts}`;
|
|
2332
|
+
const netN = `JLC_DEMO_DP_N_${ts}`;
|
|
2333
|
+
const newNetP = `JLC_DEMO_DP_P2_${ts}`;
|
|
2334
|
+
|
|
2335
|
+
// 2. 放三个带网络的焊盘并创建差分对
|
|
2336
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
2337
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], netP, null, 0, 0, 0, false, 0);
|
|
2338
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], netN, null, 0, 0, 0, false, 0);
|
|
2339
|
+
await eda.pcb_PrimitivePad.create(1, '3', x + 1000, 3000, 0, ['ELLIPSE', 60, 60], newNetP, null, 0, 0, 0, false, 0);
|
|
2340
|
+
const pairName = `嘉立创示例_差分对_${ts}`;
|
|
2341
|
+
await eda.pcb_Drc.createDifferentialPair(pairName, netP, netN);
|
|
2342
|
+
|
|
2343
|
+
// 3. 把正网络替换为 newNetP(保留现场供观察)
|
|
2344
|
+
const result = await eda.pcb_Drc.modifyDifferentialPairPositiveNet(pairName, newNetP);
|
|
2345
|
+
|
|
2346
|
+
console.log('newPositiveNet:', newNetP);
|
|
2347
|
+
console.log('result:', result);
|
|
2348
|
+
```
|
|
2349
|
+
|
|
2350
|
+
### modifyequallengthnetgroupname
|
|
2351
|
+
|
|
2352
|
+
# PCB\_Drc.modifyEqualLengthNetGroupName() method
|
|
2353
|
+
|
|
2354
|
+
> 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.
|
|
2355
|
+
|
|
2356
|
+
Modify the name of the equal-length net group
|
|
2357
|
+
|
|
2358
|
+
## Signature
|
|
2359
|
+
|
|
2360
|
+
```typescript
|
|
2361
|
+
function modifyEqualLengthNetGroupName(
|
|
2362
|
+
originalEqualLengthNetGroupName: string,
|
|
2363
|
+
equalLengthNetGroupName: string,
|
|
2364
|
+
): Promise<boolean>;
|
|
2365
|
+
```
|
|
2366
|
+
|
|
2367
|
+
## Parameters
|
|
2368
|
+
|
|
2369
|
+
<table><thead><tr><th>
|
|
2370
|
+
|
|
2371
|
+
Parameter
|
|
2372
|
+
|
|
2373
|
+
</th><th>
|
|
2374
|
+
|
|
2375
|
+
Type
|
|
2376
|
+
|
|
2377
|
+
</th><th>
|
|
2378
|
+
|
|
2379
|
+
Description
|
|
2380
|
+
|
|
2381
|
+
</th></tr></thead>
|
|
2382
|
+
<tbody><tr><td>
|
|
2383
|
+
|
|
2384
|
+
originalEqualLengthNetGroupName
|
|
2385
|
+
|
|
2386
|
+
</td><td>
|
|
2387
|
+
|
|
2388
|
+
string
|
|
2389
|
+
|
|
2390
|
+
</td><td>
|
|
2391
|
+
|
|
2392
|
+
Original equal-length net group name
|
|
2393
|
+
|
|
2394
|
+
</td></tr>
|
|
2395
|
+
<tr><td>
|
|
2396
|
+
|
|
2397
|
+
equalLengthNetGroupName
|
|
2398
|
+
|
|
2399
|
+
</td><td>
|
|
2400
|
+
|
|
2401
|
+
string
|
|
2402
|
+
|
|
2403
|
+
</td><td>
|
|
2404
|
+
|
|
2405
|
+
New equal-length net group name
|
|
2406
|
+
|
|
2407
|
+
</td></tr>
|
|
2408
|
+
</tbody></table>
|
|
2409
|
+
|
|
2410
|
+
## Returns
|
|
2411
|
+
|
|
2412
|
+
Promise<boolean>
|
|
2413
|
+
|
|
2414
|
+
Whether the operation is successful
|
|
2415
|
+
|
|
2416
|
+
## Example
|
|
2417
|
+
|
|
2418
|
+
```javascript
|
|
2419
|
+
// 1. 建一个待改名的等长网络组
|
|
2420
|
+
await eda.pcb_Drc.createEqualLengthNetGroup('嘉立创示例_等长网络组', [], { r: 0, g: 255, b: 0, alpha: 1 });
|
|
2421
|
+
|
|
2422
|
+
// 2. 改名(用时间戳后缀避免与之前保留的现场重名,保留现场供观察)
|
|
2423
|
+
const newName = `嘉立创示例_等长网络组_改_${Date.now()}`;
|
|
2424
|
+
const result = await eda.pcb_Drc.modifyEqualLengthNetGroupName('嘉立创示例_等长网络组', newName);
|
|
2425
|
+
|
|
2426
|
+
console.log('newName:', newName);
|
|
2427
|
+
console.log('result:', result);
|
|
2428
|
+
```
|
|
2429
|
+
|
|
2430
|
+
### modifynetclassname
|
|
2431
|
+
|
|
2432
|
+
# PCB\_Drc.modifyNetClassName() method
|
|
2433
|
+
|
|
2434
|
+
> 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.
|
|
2435
|
+
|
|
2436
|
+
Modify Net class name of
|
|
2437
|
+
|
|
2438
|
+
## Signature
|
|
2439
|
+
|
|
2440
|
+
```typescript
|
|
2441
|
+
function modifyNetClassName(originalNetClassName: string, netClassName: string): Promise<boolean>;
|
|
2442
|
+
```
|
|
2443
|
+
|
|
2444
|
+
## Parameters
|
|
2445
|
+
|
|
2446
|
+
<table><thead><tr><th>
|
|
2447
|
+
|
|
2448
|
+
Parameter
|
|
2449
|
+
|
|
2450
|
+
</th><th>
|
|
2451
|
+
|
|
2452
|
+
Type
|
|
2453
|
+
|
|
2454
|
+
</th><th>
|
|
2455
|
+
|
|
2456
|
+
Description
|
|
2457
|
+
|
|
2458
|
+
</th></tr></thead>
|
|
2459
|
+
<tbody><tr><td>
|
|
2460
|
+
|
|
2461
|
+
originalNetClassName
|
|
2462
|
+
|
|
2463
|
+
</td><td>
|
|
2464
|
+
|
|
2465
|
+
string
|
|
2466
|
+
|
|
2467
|
+
</td><td>
|
|
2468
|
+
|
|
2469
|
+
Original net class name
|
|
2470
|
+
|
|
2471
|
+
</td></tr>
|
|
2472
|
+
<tr><td>
|
|
2473
|
+
|
|
2474
|
+
netClassName
|
|
2475
|
+
|
|
2476
|
+
</td><td>
|
|
2477
|
+
|
|
2478
|
+
string
|
|
2479
|
+
|
|
2480
|
+
</td><td>
|
|
2481
|
+
|
|
2482
|
+
New net class name
|
|
2483
|
+
|
|
2484
|
+
</td></tr>
|
|
2485
|
+
</tbody></table>
|
|
2486
|
+
|
|
2487
|
+
## Returns
|
|
2488
|
+
|
|
2489
|
+
Promise<boolean>
|
|
2490
|
+
|
|
2491
|
+
Whether the operation is successful
|
|
2492
|
+
|
|
2493
|
+
## Example
|
|
2494
|
+
|
|
2495
|
+
```javascript
|
|
2496
|
+
// 1. 建一个待改名的网络类
|
|
2497
|
+
await eda.pcb_Drc.createNetClass('嘉立创示例_网络类', [], { r: 255, g: 0, b: 0, alpha: 1 });
|
|
2498
|
+
|
|
2499
|
+
// 2. 改名(用时间戳后缀避免与之前保留的现场重名,保留现场供观察)
|
|
2500
|
+
const newName = `嘉立创示例_网络类_改_${Date.now()}`;
|
|
2501
|
+
const result = await eda.pcb_Drc.modifyNetClassName('嘉立创示例_网络类', newName);
|
|
2502
|
+
|
|
2503
|
+
console.log('newName:', newName);
|
|
2504
|
+
console.log('result:', result);
|
|
2505
|
+
```
|
|
2506
|
+
|
|
2507
|
+
### modifypadpairgroupname
|
|
2508
|
+
|
|
2509
|
+
# PCB\_Drc.modifyPadPairGroupName() method
|
|
2510
|
+
|
|
2511
|
+
> 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.
|
|
2512
|
+
|
|
2513
|
+
Modify the name of the pad pair group
|
|
2514
|
+
|
|
2515
|
+
## Signature
|
|
2516
|
+
|
|
2517
|
+
```typescript
|
|
2518
|
+
function modifyPadPairGroupName(
|
|
2519
|
+
originalPadPairGroupName: string,
|
|
2520
|
+
padPairGroupName: string,
|
|
2521
|
+
): Promise<boolean>;
|
|
2522
|
+
```
|
|
2523
|
+
|
|
2524
|
+
## Parameters
|
|
2525
|
+
|
|
2526
|
+
<table><thead><tr><th>
|
|
2527
|
+
|
|
2528
|
+
Parameter
|
|
2529
|
+
|
|
2530
|
+
</th><th>
|
|
2531
|
+
|
|
2532
|
+
Type
|
|
2533
|
+
|
|
2534
|
+
</th><th>
|
|
2535
|
+
|
|
2536
|
+
Description
|
|
2537
|
+
|
|
2538
|
+
</th></tr></thead>
|
|
2539
|
+
<tbody><tr><td>
|
|
2540
|
+
|
|
2541
|
+
originalPadPairGroupName
|
|
2542
|
+
|
|
2543
|
+
</td><td>
|
|
2544
|
+
|
|
2545
|
+
string
|
|
2546
|
+
|
|
2547
|
+
</td><td>
|
|
2548
|
+
|
|
2549
|
+
Original pad pair group name
|
|
2550
|
+
|
|
2551
|
+
</td></tr>
|
|
2552
|
+
<tr><td>
|
|
2553
|
+
|
|
2554
|
+
padPairGroupName
|
|
2555
|
+
|
|
2556
|
+
</td><td>
|
|
2557
|
+
|
|
2558
|
+
string
|
|
2559
|
+
|
|
2560
|
+
</td><td>
|
|
2561
|
+
|
|
2562
|
+
New pad pair group name
|
|
2563
|
+
|
|
2564
|
+
</td></tr>
|
|
2565
|
+
</tbody></table>
|
|
2566
|
+
|
|
2567
|
+
## Returns
|
|
2568
|
+
|
|
2569
|
+
Promise<boolean>
|
|
2570
|
+
|
|
2571
|
+
Whether the operation is successful
|
|
2572
|
+
|
|
2573
|
+
### overwritecurrentruleconfiguration
|
|
2574
|
+
|
|
2575
|
+
# PCB\_Drc.overwriteCurrentRuleConfiguration() method
|
|
2576
|
+
|
|
2577
|
+
> 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.
|
|
2578
|
+
|
|
2579
|
+
Overwrite current design rule configuration
|
|
2580
|
+
|
|
2581
|
+
## Signature
|
|
2582
|
+
|
|
2583
|
+
```typescript
|
|
2584
|
+
function overwriteCurrentRuleConfiguration(
|
|
2585
|
+
ruleConfiguration: Record<string, any>,
|
|
2586
|
+
): Promise<boolean>;
|
|
2587
|
+
```
|
|
2588
|
+
|
|
2589
|
+
## Parameters
|
|
2590
|
+
|
|
2591
|
+
<table><thead><tr><th>
|
|
2592
|
+
|
|
2593
|
+
Parameter
|
|
2594
|
+
|
|
2595
|
+
</th><th>
|
|
2596
|
+
|
|
2597
|
+
Type
|
|
2598
|
+
|
|
2599
|
+
</th><th>
|
|
2600
|
+
|
|
2601
|
+
Description
|
|
2602
|
+
|
|
2603
|
+
</th></tr></thead>
|
|
2604
|
+
<tbody><tr><td>
|
|
2605
|
+
|
|
2606
|
+
ruleConfiguration
|
|
2607
|
+
|
|
2608
|
+
</td><td>
|
|
2609
|
+
|
|
2610
|
+
Record<string, any>
|
|
2611
|
+
|
|
2612
|
+
</td><td>
|
|
2613
|
+
|
|
2614
|
+
Design rule configuration
|
|
2615
|
+
|
|
2616
|
+
</td></tr>
|
|
2617
|
+
</tbody></table>
|
|
2618
|
+
|
|
2619
|
+
## Returns
|
|
2620
|
+
|
|
2621
|
+
Promise<boolean>
|
|
2622
|
+
|
|
2623
|
+
Overwrite whether it is successful
|
|
2624
|
+
|
|
2625
|
+
## Remarks
|
|
2626
|
+
|
|
2627
|
+
It will overwrite the current design rule configuration of the PCB. Please note the risk of data loss
|
|
2628
|
+
|
|
2629
|
+
## Example
|
|
2630
|
+
|
|
2631
|
+
```javascript
|
|
2632
|
+
// 1. 读取当前设计规则配置(返回 { config, name },规则数据在 config 里)
|
|
2633
|
+
const current = await eda.pcb_Drc.getCurrentRuleConfiguration();
|
|
2634
|
+
|
|
2635
|
+
// 2. 整体写回当前配置(原样写回演示覆写成功,实际使用时可先修改 config 中的字段)
|
|
2636
|
+
const result = await eda.pcb_Drc.overwriteCurrentRuleConfiguration(current.config);
|
|
2637
|
+
|
|
2638
|
+
console.log('configName:', current.name);
|
|
2639
|
+
console.log('result:', result);
|
|
2640
|
+
```
|
|
2641
|
+
|
|
2642
|
+
### overwritenetbynetrules
|
|
2643
|
+
|
|
2644
|
+
# PCB\_Drc.overwriteNetByNetRules() method
|
|
2645
|
+
|
|
2646
|
+
> 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.
|
|
2647
|
+
|
|
2648
|
+
Overwrite net - net rules
|
|
2649
|
+
|
|
2650
|
+
## Signature
|
|
2651
|
+
|
|
2652
|
+
```typescript
|
|
2653
|
+
function overwriteNetByNetRules(netByNetRules: Record<string, any>): Promise<boolean>;
|
|
2654
|
+
```
|
|
2655
|
+
|
|
2656
|
+
## Parameters
|
|
2657
|
+
|
|
2658
|
+
<table><thead><tr><th>
|
|
2659
|
+
|
|
2660
|
+
Parameter
|
|
2661
|
+
|
|
2662
|
+
</th><th>
|
|
2663
|
+
|
|
2664
|
+
Type
|
|
2665
|
+
|
|
2666
|
+
</th><th>
|
|
2667
|
+
|
|
2668
|
+
Description
|
|
2669
|
+
|
|
2670
|
+
</th></tr></thead>
|
|
2671
|
+
<tbody><tr><td>
|
|
2672
|
+
|
|
2673
|
+
netByNetRules
|
|
2674
|
+
|
|
2675
|
+
</td><td>
|
|
2676
|
+
|
|
2677
|
+
Record<string, any>
|
|
2678
|
+
|
|
2679
|
+
</td><td>
|
|
2680
|
+
|
|
2681
|
+
Net - net rules
|
|
2682
|
+
|
|
2683
|
+
</td></tr>
|
|
2684
|
+
</tbody></table>
|
|
2685
|
+
|
|
2686
|
+
## Returns
|
|
2687
|
+
|
|
2688
|
+
Promise<boolean>
|
|
2689
|
+
|
|
2690
|
+
Overwrite whether it is successful
|
|
2691
|
+
|
|
2692
|
+
## Remarks
|
|
2693
|
+
|
|
2694
|
+
It will overwrite all net-by-net rules of the current PCB. Please note the risk of data loss
|
|
2695
|
+
|
|
2696
|
+
## Example
|
|
2697
|
+
|
|
2698
|
+
```javascript
|
|
2699
|
+
// 1. 读取当前所有网络-网络规则(对象,键是规则类别名)
|
|
2700
|
+
const netByNetRules = await eda.pcb_Drc.getNetByNetRules();
|
|
2701
|
+
|
|
2702
|
+
// 2. 整体写回(原样写回演示覆写成功,实际使用时可先修改对象字段)
|
|
2703
|
+
const result = await eda.pcb_Drc.overwriteNetByNetRules(netByNetRules);
|
|
2704
|
+
|
|
2705
|
+
console.log('ruleKeys:', Object.keys(netByNetRules).join(', '));
|
|
2706
|
+
console.log('result:', result);
|
|
2707
|
+
```
|
|
2708
|
+
|
|
2709
|
+
### overwritenetrules
|
|
2710
|
+
|
|
2711
|
+
# PCB\_Drc.overwriteNetRules() method
|
|
2712
|
+
|
|
2713
|
+
> 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.
|
|
2714
|
+
|
|
2715
|
+
Overwrite net rules
|
|
2716
|
+
|
|
2717
|
+
## Signature
|
|
2718
|
+
|
|
2719
|
+
```typescript
|
|
2720
|
+
function overwriteNetRules(netRules: Array<Record<string, any>>): Promise<boolean>;
|
|
2721
|
+
```
|
|
2722
|
+
|
|
2723
|
+
## Parameters
|
|
2724
|
+
|
|
2725
|
+
<table><thead><tr><th>
|
|
2726
|
+
|
|
2727
|
+
Parameter
|
|
2728
|
+
|
|
2729
|
+
</th><th>
|
|
2730
|
+
|
|
2731
|
+
Type
|
|
2732
|
+
|
|
2733
|
+
</th><th>
|
|
2734
|
+
|
|
2735
|
+
Description
|
|
2736
|
+
|
|
2737
|
+
</th></tr></thead>
|
|
2738
|
+
<tbody><tr><td>
|
|
2739
|
+
|
|
2740
|
+
netRules
|
|
2741
|
+
|
|
2742
|
+
</td><td>
|
|
2743
|
+
|
|
2744
|
+
Array<Record<string, any>>
|
|
2745
|
+
|
|
2746
|
+
</td><td>
|
|
2747
|
+
|
|
2748
|
+
Net rules
|
|
2749
|
+
|
|
2750
|
+
</td></tr>
|
|
2751
|
+
</tbody></table>
|
|
2752
|
+
|
|
2753
|
+
## Returns
|
|
2754
|
+
|
|
2755
|
+
Promise<boolean>
|
|
2756
|
+
|
|
2757
|
+
Overwrite whether it is successful
|
|
2758
|
+
|
|
2759
|
+
## Remarks
|
|
2760
|
+
|
|
2761
|
+
It will overwrite all net rules of the current PCB. Please note the risk of data loss
|
|
2762
|
+
|
|
2763
|
+
## Example
|
|
2764
|
+
|
|
2765
|
+
```javascript
|
|
2766
|
+
// 1. 读取当前所有网络规则(数组)
|
|
2767
|
+
const netRules = await eda.pcb_Drc.getNetRules();
|
|
2768
|
+
|
|
2769
|
+
// 2. 整体写回(原样写回演示覆写成功,实际使用时可先增删改数组元素)
|
|
2770
|
+
const result = await eda.pcb_Drc.overwriteNetRules(netRules);
|
|
2771
|
+
|
|
2772
|
+
console.log('ruleCount:', netRules.length);
|
|
2773
|
+
console.log('result:', result);
|
|
2774
|
+
```
|
|
2775
|
+
|
|
2776
|
+
### overwriteregionrules
|
|
2777
|
+
|
|
2778
|
+
# PCB\_Drc.overwriteRegionRules() method
|
|
2779
|
+
|
|
2780
|
+
> 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.
|
|
2781
|
+
|
|
2782
|
+
Overwrite region rules
|
|
2783
|
+
|
|
2784
|
+
## Signature
|
|
2785
|
+
|
|
2786
|
+
```typescript
|
|
2787
|
+
function overwriteRegionRules(regionRules: Array<Record<string, any>>): Promise<boolean>;
|
|
2788
|
+
```
|
|
2789
|
+
|
|
2790
|
+
## Parameters
|
|
2791
|
+
|
|
2792
|
+
<table><thead><tr><th>
|
|
2793
|
+
|
|
2794
|
+
Parameter
|
|
2795
|
+
|
|
2796
|
+
</th><th>
|
|
2797
|
+
|
|
2798
|
+
Type
|
|
2799
|
+
|
|
2800
|
+
</th><th>
|
|
2801
|
+
|
|
2802
|
+
Description
|
|
2803
|
+
|
|
2804
|
+
</th></tr></thead>
|
|
2805
|
+
<tbody><tr><td>
|
|
2806
|
+
|
|
2807
|
+
regionRules
|
|
2808
|
+
|
|
2809
|
+
</td><td>
|
|
2810
|
+
|
|
2811
|
+
Array<Record<string, any>>
|
|
2812
|
+
|
|
2813
|
+
</td><td>
|
|
2814
|
+
|
|
2815
|
+
Region rules
|
|
2816
|
+
|
|
2817
|
+
</td></tr>
|
|
2818
|
+
</tbody></table>
|
|
2819
|
+
|
|
2820
|
+
## Returns
|
|
2821
|
+
|
|
2822
|
+
Promise<boolean>
|
|
2823
|
+
|
|
2824
|
+
Overwrite whether it is successful
|
|
2825
|
+
|
|
2826
|
+
## Remarks
|
|
2827
|
+
|
|
2828
|
+
It will overwrite all region rules of the current PCB. Please note the risk of data loss
|
|
2829
|
+
|
|
2830
|
+
## Example
|
|
2831
|
+
|
|
2832
|
+
```javascript
|
|
2833
|
+
// 1. 读取当前所有区域规则(数组)
|
|
2834
|
+
const regionRules = await eda.pcb_Drc.getRegionRules();
|
|
2835
|
+
|
|
2836
|
+
// 2. 整体写回(原样写回演示覆写成功,实际使用时可先增删改数组元素)
|
|
2837
|
+
const result = await eda.pcb_Drc.overwriteRegionRules(regionRules);
|
|
2838
|
+
|
|
2839
|
+
console.log('ruleCount:', regionRules.length);
|
|
2840
|
+
console.log('result:', result);
|
|
2841
|
+
```
|
|
2842
|
+
|
|
2843
|
+
### removenetfromequallengthnetgroup
|
|
2844
|
+
|
|
2845
|
+
# PCB\_Drc.removeNetFromEqualLengthNetGroup() method
|
|
2846
|
+
|
|
2847
|
+
> 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.
|
|
2848
|
+
|
|
2849
|
+
Remove a net from an equal-length net group
|
|
2850
|
+
|
|
2851
|
+
## Signature
|
|
2852
|
+
|
|
2853
|
+
```typescript
|
|
2854
|
+
function removeNetFromEqualLengthNetGroup(
|
|
2855
|
+
equalLengthNetGroupName: string,
|
|
2856
|
+
net: string | Array<string>,
|
|
2857
|
+
): Promise<boolean>;
|
|
2858
|
+
```
|
|
2859
|
+
|
|
2860
|
+
## Parameters
|
|
2861
|
+
|
|
2862
|
+
<table><thead><tr><th>
|
|
2863
|
+
|
|
2864
|
+
Parameter
|
|
2865
|
+
|
|
2866
|
+
</th><th>
|
|
2867
|
+
|
|
2868
|
+
Type
|
|
2869
|
+
|
|
2870
|
+
</th><th>
|
|
2871
|
+
|
|
2872
|
+
Description
|
|
2873
|
+
|
|
2874
|
+
</th></tr></thead>
|
|
2875
|
+
<tbody><tr><td>
|
|
2876
|
+
|
|
2877
|
+
equalLengthNetGroupName
|
|
2878
|
+
|
|
2879
|
+
</td><td>
|
|
2880
|
+
|
|
2881
|
+
string
|
|
2882
|
+
|
|
2883
|
+
</td><td>
|
|
2884
|
+
|
|
2885
|
+
Equal-length net group name
|
|
2886
|
+
|
|
2887
|
+
</td></tr>
|
|
2888
|
+
<tr><td>
|
|
2889
|
+
|
|
2890
|
+
net
|
|
2891
|
+
|
|
2892
|
+
</td><td>
|
|
2893
|
+
|
|
2894
|
+
string \| Array<string>
|
|
2895
|
+
|
|
2896
|
+
</td><td>
|
|
2897
|
+
|
|
2898
|
+
Net name
|
|
2899
|
+
|
|
2900
|
+
</td></tr>
|
|
2901
|
+
</tbody></table>
|
|
2902
|
+
|
|
2903
|
+
## Returns
|
|
2904
|
+
|
|
2905
|
+
Promise<boolean>
|
|
2906
|
+
|
|
2907
|
+
Whether the operation is successful
|
|
2908
|
+
|
|
2909
|
+
## Example
|
|
2910
|
+
|
|
2911
|
+
```javascript
|
|
2912
|
+
// 1. 准备两个真实网络(放带网络的测试焊盘)
|
|
2913
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
2914
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_D0', null, 0, 0, 0, false, 0);
|
|
2915
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_D1', null, 0, 0, 0, false, 0);
|
|
2916
|
+
|
|
2917
|
+
// 2. 建等长组并纳入网络
|
|
2918
|
+
await eda.pcb_Drc.createEqualLengthNetGroup('嘉立创示例_等长网络组', ['JLC_DEMO_D0', 'JLC_DEMO_D1'], { r: 0, g: 255, b: 0, alpha: 1 });
|
|
2919
|
+
|
|
2920
|
+
// 3. 先单个移除,再批量移除
|
|
2921
|
+
const removedOne = await eda.pcb_Drc.removeNetFromEqualLengthNetGroup('嘉立创示例_等长网络组', 'JLC_DEMO_D0');
|
|
2922
|
+
const removedBatch = await eda.pcb_Drc.removeNetFromEqualLengthNetGroup('嘉立创示例_等长网络组', ['JLC_DEMO_D1']);
|
|
2923
|
+
|
|
2924
|
+
console.log('removedOne:', removedOne);
|
|
2925
|
+
console.log('removedBatch:', removedBatch);
|
|
2926
|
+
```
|
|
2927
|
+
|
|
2928
|
+
### removenetfromnetclass
|
|
2929
|
+
|
|
2930
|
+
# PCB\_Drc.removeNetFromNetClass() method
|
|
2931
|
+
|
|
2932
|
+
> 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.
|
|
2933
|
+
|
|
2934
|
+
From net class in remove net
|
|
2935
|
+
|
|
2936
|
+
## Signature
|
|
2937
|
+
|
|
2938
|
+
```typescript
|
|
2939
|
+
function removeNetFromNetClass(netClassName: string, net: string | Array<string>): Promise<boolean>;
|
|
2940
|
+
```
|
|
2941
|
+
|
|
2942
|
+
## Parameters
|
|
2943
|
+
|
|
2944
|
+
<table><thead><tr><th>
|
|
2945
|
+
|
|
2946
|
+
Parameter
|
|
2947
|
+
|
|
2948
|
+
</th><th>
|
|
2949
|
+
|
|
2950
|
+
Type
|
|
2951
|
+
|
|
2952
|
+
</th><th>
|
|
2953
|
+
|
|
2954
|
+
Description
|
|
2955
|
+
|
|
2956
|
+
</th></tr></thead>
|
|
2957
|
+
<tbody><tr><td>
|
|
2958
|
+
|
|
2959
|
+
netClassName
|
|
2960
|
+
|
|
2961
|
+
</td><td>
|
|
2962
|
+
|
|
2963
|
+
string
|
|
2964
|
+
|
|
2965
|
+
</td><td>
|
|
2966
|
+
|
|
2967
|
+
Net class name
|
|
2968
|
+
|
|
2969
|
+
</td></tr>
|
|
2970
|
+
<tr><td>
|
|
2971
|
+
|
|
2972
|
+
net
|
|
2973
|
+
|
|
2974
|
+
</td><td>
|
|
2975
|
+
|
|
2976
|
+
string \| Array<string>
|
|
2977
|
+
|
|
2978
|
+
</td><td>
|
|
2979
|
+
|
|
2980
|
+
Net name
|
|
2981
|
+
|
|
2982
|
+
</td></tr>
|
|
2983
|
+
</tbody></table>
|
|
2984
|
+
|
|
2985
|
+
## Returns
|
|
2986
|
+
|
|
2987
|
+
Promise<boolean>
|
|
2988
|
+
|
|
2989
|
+
Whether the operation is successful
|
|
2990
|
+
|
|
2991
|
+
## Example
|
|
2992
|
+
|
|
2993
|
+
```javascript
|
|
2994
|
+
// 1. 准备两个真实网络(放带网络的测试焊盘)
|
|
2995
|
+
const x = 3000 + Math.floor(Math.random() * 20000);
|
|
2996
|
+
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_P', null, 0, 0, 0, false, 0);
|
|
2997
|
+
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_N', null, 0, 0, 0, false, 0);
|
|
2998
|
+
|
|
2999
|
+
// 2. 建网络类并纳入网络
|
|
3000
|
+
await eda.pcb_Drc.createNetClass('嘉立创示例_网络类', ['JLC_DEMO_P', 'JLC_DEMO_N'], { r: 255, g: 0, b: 0, alpha: 1 });
|
|
3001
|
+
|
|
3002
|
+
// 3. 先单个移除,再批量移除
|
|
3003
|
+
const removedOne = await eda.pcb_Drc.removeNetFromNetClass('嘉立创示例_网络类', 'JLC_DEMO_P');
|
|
3004
|
+
const removedBatch = await eda.pcb_Drc.removeNetFromNetClass('嘉立创示例_网络类', ['JLC_DEMO_N']);
|
|
3005
|
+
|
|
3006
|
+
console.log('removedOne:', removedOne);
|
|
3007
|
+
console.log('removedBatch:', removedBatch);
|
|
3008
|
+
```
|
|
3009
|
+
|
|
3010
|
+
### removepadpairfrompadpairgroup
|
|
3011
|
+
|
|
3012
|
+
# PCB\_Drc.removePadPairFromPadPairGroup() method
|
|
3013
|
+
|
|
3014
|
+
> 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.
|
|
3015
|
+
|
|
3016
|
+
Remove a pad pair from a pad pair group
|
|
3017
|
+
|
|
3018
|
+
## Signature
|
|
3019
|
+
|
|
3020
|
+
```typescript
|
|
3021
|
+
function removePadPairFromPadPairGroup(
|
|
3022
|
+
padPairGroupName: string,
|
|
3023
|
+
padPair: [string, string] | Array<[string, string]>,
|
|
3024
|
+
): Promise<boolean>;
|
|
3025
|
+
```
|
|
3026
|
+
|
|
3027
|
+
## Parameters
|
|
3028
|
+
|
|
3029
|
+
<table><thead><tr><th>
|
|
3030
|
+
|
|
3031
|
+
Parameter
|
|
3032
|
+
|
|
3033
|
+
</th><th>
|
|
3034
|
+
|
|
3035
|
+
Type
|
|
3036
|
+
|
|
3037
|
+
</th><th>
|
|
3038
|
+
|
|
3039
|
+
Description
|
|
3040
|
+
|
|
3041
|
+
</th></tr></thead>
|
|
3042
|
+
<tbody><tr><td>
|
|
3043
|
+
|
|
3044
|
+
padPairGroupName
|
|
3045
|
+
|
|
3046
|
+
</td><td>
|
|
3047
|
+
|
|
3048
|
+
string
|
|
3049
|
+
|
|
3050
|
+
</td><td>
|
|
3051
|
+
|
|
3052
|
+
Pad pair group name
|
|
3053
|
+
|
|
3054
|
+
</td></tr>
|
|
3055
|
+
<tr><td>
|
|
3056
|
+
|
|
3057
|
+
padPair
|
|
3058
|
+
|
|
3059
|
+
</td><td>
|
|
3060
|
+
|
|
3061
|
+
\[string, string\] \| Array<\[string, string\]>
|
|
3062
|
+
|
|
3063
|
+
</td><td>
|
|
3064
|
+
|
|
3065
|
+
Pad for
|
|
3066
|
+
|
|
3067
|
+
</td></tr>
|
|
3068
|
+
</tbody></table>
|
|
3069
|
+
|
|
3070
|
+
## Returns
|
|
3071
|
+
|
|
3072
|
+
Promise<boolean>
|
|
3073
|
+
|
|
3074
|
+
Whether the operation is successful
|
|
3075
|
+
|
|
3076
|
+
## Example
|
|
3077
|
+
|
|
3078
|
+
There are three different usages, and make sure the corresponding pads already exist on the canvas. They are: 1. Free pad - free pad; 2. Device pad - device pad; 3. Device pad - free pad await eda.pcb\_Drc.removePadPairFromPadPairGroup('test',\['e0','e1'\]) // 游离焊盘-游离焊盘 await eda.pcb\_Drc.removePadPairFromPadPairGroup('test',\['R1:1','R1:2'\]) // 器件焊盘 - 器件焊盘 await eda.pcb\_Drc.removePadPairFromPadPairGroup('test',\['R1:2','e1'\]) // 器件焊盘 - 游离焊盘
|
|
3079
|
+
|
|
3080
|
+
### renameruleconfiguration
|
|
3081
|
+
|
|
3082
|
+
# PCB\_Drc.renameRuleConfiguration() method
|
|
3083
|
+
|
|
3084
|
+
> 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.
|
|
3085
|
+
|
|
3086
|
+
Rename the design rule configuration
|
|
3087
|
+
|
|
3088
|
+
## Signature
|
|
3089
|
+
|
|
3090
|
+
```typescript
|
|
3091
|
+
function renameRuleConfiguration(
|
|
3092
|
+
originalConfigurationName: string,
|
|
3093
|
+
configurationName: string,
|
|
3094
|
+
): Promise<boolean>;
|
|
3095
|
+
```
|
|
3096
|
+
|
|
3097
|
+
## Parameters
|
|
3098
|
+
|
|
3099
|
+
<table><thead><tr><th>
|
|
3100
|
+
|
|
3101
|
+
Parameter
|
|
3102
|
+
|
|
3103
|
+
</th><th>
|
|
3104
|
+
|
|
3105
|
+
Type
|
|
3106
|
+
|
|
3107
|
+
</th><th>
|
|
3108
|
+
|
|
3109
|
+
Description
|
|
3110
|
+
|
|
3111
|
+
</th></tr></thead>
|
|
3112
|
+
<tbody><tr><td>
|
|
3113
|
+
|
|
3114
|
+
originalConfigurationName
|
|
3115
|
+
|
|
3116
|
+
</td><td>
|
|
3117
|
+
|
|
3118
|
+
string
|
|
3119
|
+
|
|
3120
|
+
</td><td>
|
|
3121
|
+
|
|
3122
|
+
Original design rule configuration name
|
|
3123
|
+
|
|
3124
|
+
</td></tr>
|
|
3125
|
+
<tr><td>
|
|
3126
|
+
|
|
3127
|
+
configurationName
|
|
3128
|
+
|
|
3129
|
+
</td><td>
|
|
3130
|
+
|
|
3131
|
+
string
|
|
3132
|
+
|
|
3133
|
+
</td><td>
|
|
3134
|
+
|
|
3135
|
+
New design rule configuration name
|
|
3136
|
+
|
|
3137
|
+
</td></tr>
|
|
3138
|
+
</tbody></table>
|
|
3139
|
+
|
|
3140
|
+
## Returns
|
|
3141
|
+
|
|
3142
|
+
Promise<boolean>
|
|
3143
|
+
|
|
3144
|
+
Whether the rename was successful
|
|
3145
|
+
|
|
3146
|
+
## Remarks
|
|
3147
|
+
|
|
3148
|
+
Only custom configurations can be renamed. System configurations cannot be renamed
|
|
3149
|
+
|
|
3150
|
+
## Example
|
|
3151
|
+
|
|
3152
|
+
```javascript
|
|
3153
|
+
// 1. 读取当前配置并保存为待改名的自定义配置(allowOverwrite=true 重复运行安全)
|
|
3154
|
+
const current = await eda.pcb_Drc.getCurrentRuleConfiguration();
|
|
3155
|
+
await eda.pcb_Drc.saveRuleConfiguration(current.config, '嘉立创示例_待改配置', true);
|
|
3156
|
+
|
|
3157
|
+
// 2. 静默清掉上次运行保留的目标名(首次运行时目标不存在,删除返回 false 属正常)
|
|
3158
|
+
await eda.pcb_Drc.deleteRuleConfiguration('嘉立创示例_改名后配置');
|
|
3159
|
+
|
|
3160
|
+
// 3. 重命名(保留现场供观察)
|
|
3161
|
+
const result = await eda.pcb_Drc.renameRuleConfiguration('嘉立创示例_待改配置', '嘉立创示例_改名后配置');
|
|
3162
|
+
|
|
3163
|
+
console.log('result:', result);
|
|
3164
|
+
```
|
|
3165
|
+
|
|
3166
|
+
### saveruleconfiguration
|
|
3167
|
+
|
|
3168
|
+
# PCB\_Drc.saveRuleConfiguration() method
|
|
3169
|
+
|
|
3170
|
+
> 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.
|
|
3171
|
+
|
|
3172
|
+
Save Design rule configuration
|
|
3173
|
+
|
|
3174
|
+
## Signature
|
|
3175
|
+
|
|
3176
|
+
```typescript
|
|
3177
|
+
function saveRuleConfiguration(
|
|
3178
|
+
ruleConfiguration: Record<string, any>,
|
|
3179
|
+
configurationName: string,
|
|
3180
|
+
allowOverwrite?: boolean,
|
|
3181
|
+
): Promise<boolean>;
|
|
3182
|
+
```
|
|
3183
|
+
|
|
3184
|
+
## Parameters
|
|
3185
|
+
|
|
3186
|
+
<table><thead><tr><th>
|
|
3187
|
+
|
|
3188
|
+
Parameter
|
|
3189
|
+
|
|
3190
|
+
</th><th>
|
|
3191
|
+
|
|
3192
|
+
Type
|
|
3193
|
+
|
|
3194
|
+
</th><th>
|
|
3195
|
+
|
|
3196
|
+
Description
|
|
3197
|
+
|
|
3198
|
+
</th></tr></thead>
|
|
3199
|
+
<tbody><tr><td>
|
|
3200
|
+
|
|
3201
|
+
ruleConfiguration
|
|
3202
|
+
|
|
3203
|
+
</td><td>
|
|
3204
|
+
|
|
3205
|
+
Record<string, any>
|
|
3206
|
+
|
|
3207
|
+
</td><td>
|
|
3208
|
+
|
|
3209
|
+
Design rule configuration
|
|
3210
|
+
|
|
3211
|
+
</td></tr>
|
|
3212
|
+
<tr><td>
|
|
3213
|
+
|
|
3214
|
+
configurationName
|
|
3215
|
+
|
|
3216
|
+
</td><td>
|
|
3217
|
+
|
|
3218
|
+
string
|
|
3219
|
+
|
|
3220
|
+
</td><td>
|
|
3221
|
+
|
|
3222
|
+
Configuration name
|
|
3223
|
+
|
|
3224
|
+
</td></tr>
|
|
3225
|
+
<tr><td>
|
|
3226
|
+
|
|
3227
|
+
allowOverwrite
|
|
3228
|
+
|
|
3229
|
+
</td><td>
|
|
3230
|
+
|
|
3231
|
+
boolean
|
|
3232
|
+
|
|
3233
|
+
</td><td>
|
|
3234
|
+
|
|
3235
|
+
_(Optional)_ Whether to allow overwriting a design rule configuration with the same name. If `false`<!-- -->, `false` will be returned when a configuration with the same name is encountered. Please note the possible risk of data loss
|
|
3236
|
+
|
|
3237
|
+
</td></tr>
|
|
3238
|
+
</tbody></table>
|
|
3239
|
+
|
|
3240
|
+
## Returns
|
|
3241
|
+
|
|
3242
|
+
Promise<boolean>
|
|
3243
|
+
|
|
3244
|
+
Save Whether Successful
|
|
3245
|
+
|
|
3246
|
+
## Remarks
|
|
3247
|
+
|
|
3248
|
+
Only custom configurations can be overwritten and saved. System configurations cannot be modified or overwritten
|
|
3249
|
+
|
|
3250
|
+
## Example
|
|
3251
|
+
|
|
3252
|
+
```javascript
|
|
3253
|
+
// 1. 读取当前设计规则配置作为数据源(规则数据在 config 字段里)
|
|
3254
|
+
const current = await eda.pcb_Drc.getCurrentRuleConfiguration();
|
|
3255
|
+
|
|
3256
|
+
// 2. 另存为自定义配置,允许同名覆盖(保留现场供观察)
|
|
3257
|
+
const saved = await eda.pcb_Drc.saveRuleConfiguration(current.config, '嘉立创示例_规则配置', true);
|
|
3258
|
+
|
|
3259
|
+
console.log('saved:', saved);
|
|
3260
|
+
```
|
|
3261
|
+
|
|
3262
|
+
### setasdefaultruleconfiguration
|
|
3263
|
+
|
|
3264
|
+
# PCB\_Drc.setAsDefaultRuleConfiguration() method
|
|
3265
|
+
|
|
3266
|
+
> 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.
|
|
3267
|
+
|
|
3268
|
+
Set as the default design rule configuration for new PCBs
|
|
3269
|
+
|
|
3270
|
+
## Signature
|
|
3271
|
+
|
|
3272
|
+
```typescript
|
|
3273
|
+
function setAsDefaultRuleConfiguration(configurationName: string): Promise<boolean>;
|
|
3274
|
+
```
|
|
3275
|
+
|
|
3276
|
+
## Parameters
|
|
3277
|
+
|
|
3278
|
+
<table><thead><tr><th>
|
|
3279
|
+
|
|
3280
|
+
Parameter
|
|
3281
|
+
|
|
3282
|
+
</th><th>
|
|
3283
|
+
|
|
3284
|
+
Type
|
|
3285
|
+
|
|
3286
|
+
</th><th>
|
|
3287
|
+
|
|
3288
|
+
Description
|
|
3289
|
+
|
|
3290
|
+
</th></tr></thead>
|
|
3291
|
+
<tbody><tr><td>
|
|
3292
|
+
|
|
3293
|
+
configurationName
|
|
3294
|
+
|
|
3295
|
+
</td><td>
|
|
3296
|
+
|
|
3297
|
+
string
|
|
3298
|
+
|
|
3299
|
+
</td><td>
|
|
3300
|
+
|
|
3301
|
+
Configuration name
|
|
3302
|
+
|
|
3303
|
+
</td></tr>
|
|
3304
|
+
</tbody></table>
|
|
3305
|
+
|
|
3306
|
+
## Returns
|
|
3307
|
+
|
|
3308
|
+
Promise<boolean>
|
|
3309
|
+
|
|
3310
|
+
Set Whether Successful
|
|
3311
|
+
|
|
3312
|
+
## Remarks
|
|
3313
|
+
|
|
3314
|
+
The return value is result-oriented. Repeatedly setting the same design rule as the default will also return `true`
|
|
3315
|
+
|
|
3316
|
+
## Example
|
|
3317
|
+
|
|
3318
|
+
```javascript
|
|
3319
|
+
// 1. 读取当前配置并保存为自定义配置(作为待指定的默认配置)
|
|
3320
|
+
const current = await eda.pcb_Drc.getCurrentRuleConfiguration();
|
|
3321
|
+
await eda.pcb_Drc.saveRuleConfiguration(current.config, '嘉立创示例_默认规则配置', true);
|
|
3322
|
+
|
|
3323
|
+
// 2. 把它设置为新建 PCB 的默认设计规则配置
|
|
3324
|
+
const result = await eda.pcb_Drc.setAsDefaultRuleConfiguration('嘉立创示例_默认规则配置');
|
|
3325
|
+
|
|
3326
|
+
console.log('result:', result);
|
|
3327
|
+
```
|
|
3328
|
+
|
|
3329
|
+
### startrealtimedrc
|
|
3330
|
+
|
|
3331
|
+
# PCB\_Drc.startRealTimeDrc() method
|
|
3332
|
+
|
|
3333
|
+
> 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.
|
|
3334
|
+
|
|
3335
|
+
Start real-time DRC check
|
|
3336
|
+
|
|
3337
|
+
## Signature
|
|
3338
|
+
|
|
3339
|
+
```typescript
|
|
3340
|
+
function startRealTimeDrc(): Promise<boolean>;
|
|
3341
|
+
```
|
|
3342
|
+
|
|
3343
|
+
## Returns
|
|
3344
|
+
|
|
3345
|
+
Promise<boolean>
|
|
3346
|
+
|
|
3347
|
+
Whether Successful enable real-time DRC check
|
|
3348
|
+
|
|
3349
|
+
## Remarks
|
|
3350
|
+
|
|
3351
|
+
The return value of this API is result-oriented. If real-time DRC check was already enabled before calling this API, `true` will also be returned ADD since EDA v4.2
|
|
3352
|
+
|
|
3353
|
+
### stoprealtimedrc
|
|
3354
|
+
|
|
3355
|
+
# PCB\_Drc.stopRealTimeDrc() method
|
|
3356
|
+
|
|
3357
|
+
> 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.
|
|
3358
|
+
|
|
3359
|
+
Stop real-time DRC check
|
|
3360
|
+
|
|
3361
|
+
## Signature
|
|
3362
|
+
|
|
3363
|
+
```typescript
|
|
3364
|
+
function stopRealTimeDrc(): Promise<boolean>;
|
|
3365
|
+
```
|
|
3366
|
+
|
|
3367
|
+
## Returns
|
|
3368
|
+
|
|
3369
|
+
Promise<boolean>
|
|
3370
|
+
|
|
3371
|
+
Whether real-time DRC check was successfully disabled
|
|
3372
|
+
|
|
3373
|
+
## Remarks
|
|
3374
|
+
|
|
3375
|
+
The return value of this API is result-oriented. If real-time DRC check was already disabled before calling this API, `true` will also be returned ADD since EDA v4.2
|