pyedb 0.59.0__py3-none-any.whl → 0.61.0__py3-none-any.whl
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.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- pyedb/__init__.py +23 -1
- pyedb/common/__init__.py +21 -0
- pyedb/common/nets.py +22 -0
- pyedb/component_libraries/ansys_components.py +22 -0
- pyedb/configuration/__init__.py +21 -0
- pyedb/configuration/cfg_boundaries.py +1 -1
- pyedb/configuration/cfg_common.py +1 -1
- pyedb/configuration/cfg_components.py +36 -8
- pyedb/configuration/cfg_data.py +1 -1
- pyedb/configuration/cfg_general.py +1 -1
- pyedb/configuration/cfg_modeler.py +1 -1
- pyedb/configuration/cfg_nets.py +1 -1
- pyedb/configuration/cfg_operations.py +1 -1
- pyedb/configuration/cfg_package_definition.py +1 -1
- pyedb/configuration/cfg_padstacks.py +1 -1
- pyedb/configuration/cfg_pin_groups.py +1 -1
- pyedb/configuration/cfg_ports_sources.py +3 -2
- pyedb/configuration/cfg_s_parameter_models.py +1 -1
- pyedb/configuration/cfg_setup.py +5 -1
- pyedb/configuration/cfg_spice_models.py +1 -1
- pyedb/configuration/cfg_stackup.py +1 -1
- pyedb/configuration/cfg_terminals.py +22 -0
- pyedb/configuration/configuration.py +6 -5
- pyedb/dotnet/__init__.py +21 -0
- pyedb/dotnet/clr_module.py +22 -0
- pyedb/dotnet/database/Variables.py +1 -1
- pyedb/dotnet/database/__init__.py +22 -0
- pyedb/dotnet/database/cell/__init__.py +21 -0
- pyedb/dotnet/database/cell/connectable.py +1 -1
- pyedb/dotnet/database/cell/hierarchy/__init__.py +21 -0
- pyedb/dotnet/database/cell/hierarchy/component.py +9 -7
- pyedb/dotnet/database/cell/hierarchy/hierarchy_obj.py +1 -1
- pyedb/dotnet/database/cell/hierarchy/model.py +2 -29
- pyedb/dotnet/database/cell/hierarchy/netlist_model.py +1 -1
- pyedb/dotnet/database/cell/hierarchy/pin_pair_model.py +1 -1
- pyedb/dotnet/database/cell/hierarchy/s_parameter_model.py +11 -15
- pyedb/dotnet/database/cell/hierarchy/spice_model.py +14 -8
- pyedb/dotnet/database/cell/layout.py +5 -4
- pyedb/dotnet/database/cell/layout_obj.py +1 -1
- pyedb/dotnet/database/cell/primitive/__init__.py +22 -0
- pyedb/dotnet/database/cell/primitive/bondwire.py +1 -1
- pyedb/dotnet/database/cell/primitive/path.py +1 -1
- pyedb/dotnet/database/cell/primitive/primitive.py +1 -1
- pyedb/dotnet/database/cell/terminal/__init__.py +21 -0
- pyedb/dotnet/database/cell/terminal/bundle_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/edge_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/terminal.py +7 -2
- pyedb/dotnet/database/cell/voltage_regulator.py +1 -1
- pyedb/dotnet/database/components.py +6 -2
- pyedb/dotnet/database/definition/__init__.py +21 -0
- pyedb/dotnet/database/definition/component_def.py +1 -1
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/definition_obj.py +1 -1
- pyedb/dotnet/database/definition/definitions.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +1 -1
- pyedb/dotnet/database/dotnet/__init__.py +21 -0
- pyedb/dotnet/database/dotnet/database.py +1 -1
- pyedb/dotnet/database/dotnet/primitive.py +1 -1
- pyedb/dotnet/database/edb_data/__init__.py +21 -0
- pyedb/dotnet/database/edb_data/control_file.py +1 -1
- pyedb/dotnet/database/edb_data/design_options.py +1 -1
- pyedb/dotnet/database/edb_data/edbvalue.py +1 -1
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +1 -1
- pyedb/dotnet/database/edb_data/layer_data.py +1 -1
- pyedb/dotnet/database/edb_data/nets_data.py +1 -1
- pyedb/dotnet/database/edb_data/padstacks_data.py +6 -4
- pyedb/dotnet/database/edb_data/ports.py +1 -1
- pyedb/dotnet/database/edb_data/primitives_data.py +1 -1
- pyedb/dotnet/database/edb_data/raptor_x_simulation_setup_data.py +1 -1
- pyedb/dotnet/database/edb_data/simulation_configuration.py +1 -1
- pyedb/dotnet/database/edb_data/sources.py +1 -1
- pyedb/dotnet/database/edb_data/utilities.py +1 -1
- pyedb/dotnet/database/edb_data/variables.py +1 -1
- pyedb/dotnet/database/general.py +1 -1
- pyedb/dotnet/database/geometry/__init__.py +21 -0
- pyedb/dotnet/database/geometry/point_data.py +1 -1
- pyedb/dotnet/database/geometry/polygon_data.py +1 -1
- pyedb/dotnet/database/hfss.py +1 -1
- pyedb/dotnet/database/layout_obj_instance.py +1 -1
- pyedb/dotnet/database/layout_validation.py +1 -1
- pyedb/dotnet/database/materials.py +1 -1
- pyedb/dotnet/database/modeler.py +3 -2
- pyedb/dotnet/database/net_class.py +1 -1
- pyedb/dotnet/database/nets.py +1 -1
- pyedb/dotnet/database/padstack.py +188 -2
- pyedb/dotnet/database/sim_setup_data/__init__.py +22 -0
- pyedb/dotnet/database/sim_setup_data/data/__init__.py +22 -0
- pyedb/dotnet/database/sim_setup_data/data/adaptive_frequency_data.py +1 -1
- pyedb/dotnet/database/sim_setup_data/data/mesh_operation.py +1 -1
- pyedb/dotnet/database/sim_setup_data/data/settings.py +1 -1
- pyedb/dotnet/database/sim_setup_data/data/sim_setup_info.py +1 -1
- pyedb/dotnet/database/sim_setup_data/data/simulation_settings.py +1 -1
- pyedb/dotnet/database/sim_setup_data/data/siw_dc_ir_settings.py +1 -1
- pyedb/dotnet/database/sim_setup_data/data/sweep_data.py +1 -1
- pyedb/dotnet/database/sim_setup_data/io/__init__.py +21 -0
- pyedb/dotnet/database/sim_setup_data/io/siwave.py +1 -1
- pyedb/dotnet/database/siwave.py +1 -1
- pyedb/dotnet/database/stackup.py +1 -1
- pyedb/dotnet/database/utilities/__init__.py +22 -0
- pyedb/dotnet/database/utilities/heatsink.py +23 -0
- pyedb/dotnet/database/utilities/hfss_simulation_setup.py +1 -1
- pyedb/dotnet/database/utilities/obj_base.py +1 -1
- pyedb/dotnet/database/utilities/simulation_setup.py +1 -1
- pyedb/dotnet/database/utilities/siwave_cpa_simulation_setup.py +22 -0
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +22 -0
- pyedb/dotnet/database/utilities/value.py +1 -1
- pyedb/dotnet/edb.py +119 -123
- pyedb/edb_logger.py +1 -1
- pyedb/exceptions.py +22 -0
- pyedb/extensions/__init__.py +21 -0
- pyedb/extensions/create_cell_array.py +1 -1
- pyedb/extensions/via_design_backend.py +22 -0
- pyedb/generic/__init__.py +21 -0
- pyedb/generic/constants.py +1 -1
- pyedb/generic/data_handlers.py +22 -0
- pyedb/generic/design_types.py +1 -1
- pyedb/generic/filesystem.py +22 -0
- pyedb/generic/general_methods.py +22 -1
- pyedb/generic/grpc_warnings.py +22 -0
- pyedb/generic/plot.py +22 -0
- pyedb/generic/process.py +29 -2
- pyedb/generic/settings.py +1 -1
- pyedb/grpc/__init__.py +21 -0
- pyedb/grpc/database/__init__.py +21 -0
- pyedb/grpc/database/_typing.py +21 -0
- pyedb/grpc/database/components.py +9 -8
- pyedb/grpc/database/control_file.py +1 -1
- pyedb/grpc/database/definition/__init__.py +21 -0
- pyedb/grpc/database/definition/component_def.py +1 -1
- pyedb/grpc/database/definition/component_model.py +1 -1
- pyedb/grpc/database/definition/component_pin.py +1 -1
- pyedb/grpc/database/definition/materials.py +2 -2
- pyedb/grpc/database/definition/n_port_component_model.py +1 -1
- pyedb/grpc/database/definition/package_def.py +1 -1
- pyedb/grpc/database/definition/padstack_def.py +17 -10
- pyedb/grpc/database/definitions.py +1 -1
- pyedb/grpc/database/general.py +1 -1
- pyedb/grpc/database/geometry/__init__.py +21 -0
- pyedb/grpc/database/geometry/arc_data.py +1 -1
- pyedb/grpc/database/geometry/point_3d_data.py +1 -1
- pyedb/grpc/database/geometry/point_data.py +1 -1
- pyedb/grpc/database/geometry/polygon_data.py +1 -1
- pyedb/grpc/database/hfss.py +1 -1
- pyedb/grpc/database/hierarchy/__init__.py +21 -0
- pyedb/grpc/database/hierarchy/component.py +1 -1
- pyedb/grpc/database/hierarchy/model.py +1 -1
- pyedb/grpc/database/hierarchy/netlist_model.py +1 -1
- pyedb/grpc/database/hierarchy/pin_pair_model.py +1 -1
- pyedb/grpc/database/hierarchy/pingroup.py +1 -1
- pyedb/grpc/database/hierarchy/s_parameter_model.py +1 -1
- pyedb/grpc/database/hierarchy/spice_model.py +1 -1
- pyedb/grpc/database/layers/__init__.py +21 -0
- pyedb/grpc/database/layers/layer.py +22 -0
- pyedb/grpc/database/layers/stackup_layer.py +1 -1
- pyedb/grpc/database/layout/__init__.py +21 -0
- pyedb/grpc/database/layout/cell.py +1 -1
- pyedb/grpc/database/layout/layout.py +1 -1
- pyedb/grpc/database/layout/voltage_regulator.py +1 -1
- pyedb/grpc/database/layout_validation.py +1 -1
- pyedb/grpc/database/modeler.py +31 -9
- pyedb/grpc/database/net/__init__.py +21 -0
- pyedb/grpc/database/net/differential_pair.py +1 -1
- pyedb/grpc/database/net/extended_net.py +1 -1
- pyedb/grpc/database/net/net.py +1 -1
- pyedb/grpc/database/net/net_class.py +1 -1
- pyedb/grpc/database/nets.py +1 -1
- pyedb/grpc/database/padstacks.py +209 -9
- pyedb/grpc/database/ports/__init__.py +21 -0
- pyedb/grpc/database/ports/ports.py +1 -1
- pyedb/grpc/database/primitive/__init__.py +22 -0
- pyedb/grpc/database/primitive/bondwire.py +1 -1
- pyedb/grpc/database/primitive/circle.py +1 -1
- pyedb/grpc/database/primitive/padstack_instance.py +111 -16
- pyedb/grpc/database/primitive/path.py +1 -1
- pyedb/grpc/database/primitive/polygon.py +6 -4
- pyedb/grpc/database/primitive/primitive.py +1 -6
- pyedb/grpc/database/primitive/rectangle.py +1 -1
- pyedb/grpc/database/simulation_setup/__init__.py +21 -0
- pyedb/grpc/database/simulation_setup/adaptive_frequency.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_advanced_meshing_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_dcr_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_settings_options.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_solver_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/mesh_operation.py +1 -1
- pyedb/grpc/database/simulation_setup/raptor_x_advanced_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/raptor_x_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +1 -1
- pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +22 -0
- pyedb/grpc/database/simulation_setup/siwave_dcir_simulation_setup.py +1 -1
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +1 -1
- pyedb/grpc/database/simulation_setup/sweep_data.py +1 -1
- pyedb/grpc/database/siwave.py +1 -1
- pyedb/grpc/database/source_excitations.py +1 -1
- pyedb/grpc/database/stackup.py +1 -1
- pyedb/grpc/database/terminal/__init__.py +21 -0
- pyedb/grpc/database/terminal/bundle_terminal.py +1 -1
- pyedb/grpc/database/terminal/edge_terminal.py +1 -1
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +1 -1
- pyedb/grpc/database/terminal/pingroup_terminal.py +1 -1
- pyedb/grpc/database/terminal/point_terminal.py +1 -1
- pyedb/grpc/database/terminal/terminal.py +1 -1
- pyedb/grpc/database/utility/__init__.py +22 -0
- pyedb/grpc/database/utility/constants.py +1 -1
- pyedb/grpc/database/utility/heat_sink.py +1 -1
- pyedb/grpc/database/utility/hfss_extent_info.py +1 -1
- pyedb/grpc/database/utility/layout_statistics.py +1 -1
- pyedb/grpc/database/utility/rlc.py +1 -1
- pyedb/grpc/database/utility/sources.py +1 -1
- pyedb/grpc/database/utility/sweep_data_distribution.py +1 -1
- pyedb/grpc/database/utility/value.py +1 -1
- pyedb/grpc/database/utility/xml_control_file.py +1 -1
- pyedb/grpc/edb.py +230 -990
- pyedb/grpc/edb_init.py +1 -1
- pyedb/grpc/rpc_session.py +17 -4
- pyedb/ipc2581/__init__.py +21 -0
- pyedb/ipc2581/bom/__init__.py +21 -0
- pyedb/ipc2581/bom/bom.py +1 -1
- pyedb/ipc2581/bom/bom_item.py +1 -1
- pyedb/ipc2581/bom/characteristics.py +1 -1
- pyedb/ipc2581/bom/refdes.py +1 -1
- pyedb/ipc2581/content/__init__.py +21 -0
- pyedb/ipc2581/content/color.py +1 -1
- pyedb/ipc2581/content/content.py +1 -1
- pyedb/ipc2581/content/dictionary_color.py +1 -1
- pyedb/ipc2581/content/dictionary_fill.py +1 -1
- pyedb/ipc2581/content/dictionary_line.py +1 -1
- pyedb/ipc2581/content/entry_color.py +1 -1
- pyedb/ipc2581/content/entry_line.py +1 -1
- pyedb/ipc2581/content/fill.py +1 -1
- pyedb/ipc2581/content/layer_ref.py +1 -1
- pyedb/ipc2581/content/standard_geometries_dictionary.py +1 -1
- pyedb/ipc2581/ecad/__init__.py +21 -0
- pyedb/ipc2581/ecad/cad_data/__init__.py +21 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +1 -1
- pyedb/ipc2581/ecad/cad_data/cad_data.py +1 -1
- pyedb/ipc2581/ecad/cad_data/component.py +1 -1
- pyedb/ipc2581/ecad/cad_data/drill.py +1 -1
- pyedb/ipc2581/ecad/cad_data/feature.py +1 -1
- pyedb/ipc2581/ecad/cad_data/layer.py +1 -1
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -1
- pyedb/ipc2581/ecad/cad_data/logical_net.py +1 -1
- pyedb/ipc2581/ecad/cad_data/outline.py +1 -1
- pyedb/ipc2581/ecad/cad_data/package.py +1 -1
- pyedb/ipc2581/ecad/cad_data/padstack_def.py +1 -1
- pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +1 -1
- pyedb/ipc2581/ecad/cad_data/padstack_instance.py +1 -1
- pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +1 -1
- pyedb/ipc2581/ecad/cad_data/path.py +1 -1
- pyedb/ipc2581/ecad/cad_data/phy_net.py +1 -1
- pyedb/ipc2581/ecad/cad_data/pin.py +1 -1
- pyedb/ipc2581/ecad/cad_data/polygon.py +1 -1
- pyedb/ipc2581/ecad/cad_data/profile.py +1 -1
- pyedb/ipc2581/ecad/cad_data/stackup.py +1 -1
- pyedb/ipc2581/ecad/cad_data/stackup_group.py +1 -1
- pyedb/ipc2581/ecad/cad_data/stackup_layer.py +1 -1
- pyedb/ipc2581/ecad/cad_data/step.py +1 -1
- pyedb/ipc2581/ecad/cad_header.py +1 -1
- pyedb/ipc2581/ecad/ecad.py +1 -1
- pyedb/ipc2581/ecad/spec.py +1 -1
- pyedb/ipc2581/history_record.py +1 -1
- pyedb/ipc2581/ipc2581.py +1 -1
- pyedb/ipc2581/logistic_header.py +1 -1
- pyedb/libraries/common.py +1 -1
- pyedb/libraries/rf_libraries/base_functions.py +1 -1
- pyedb/libraries/rf_libraries/planar_antennas.py +1 -1
- pyedb/misc/__init__.py +21 -0
- pyedb/misc/aedtlib_personalib_install.py +1 -1
- pyedb/misc/decorators.py +22 -0
- pyedb/misc/downloads.py +1 -1
- pyedb/misc/misc.py +1 -1
- pyedb/misc/siw_feature_config/__init__.py +21 -0
- pyedb/misc/siw_feature_config/emc/__init__.py +21 -0
- pyedb/misc/siw_feature_config/emc/component_tags.py +22 -0
- pyedb/misc/siw_feature_config/emc/net_tags.py +22 -0
- pyedb/misc/siw_feature_config/emc/tag_library.py +22 -0
- pyedb/misc/siw_feature_config/emc/xml_generic.py +22 -0
- pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +1 -1
- pyedb/misc/siw_feature_config/xtalk_scan/fd_xtalk_scan_config.py +1 -1
- pyedb/misc/siw_feature_config/xtalk_scan/impedance_scan_config.py +1 -1
- pyedb/misc/siw_feature_config/xtalk_scan/net.py +1 -1
- pyedb/misc/siw_feature_config/xtalk_scan/pins.py +1 -1
- pyedb/misc/siw_feature_config/xtalk_scan/scan_config.py +1 -1
- pyedb/misc/siw_feature_config/xtalk_scan/td_xtalk_config.py +1 -1
- pyedb/misc/utilities.py +1 -1
- pyedb/modeler/geometry_operators.py +22 -0
- pyedb/siwave.py +22 -0
- pyedb/siwave_core/__init__.py +21 -0
- pyedb/siwave_core/cpa/__init__.py +21 -0
- pyedb/siwave_core/cpa/simulation_setup_data_model.py +22 -0
- pyedb/siwave_core/icepak.py +1 -1
- pyedb/siwave_core/product_properties.py +23 -0
- pyedb/workflow.py +22 -0
- pyedb/workflows/__init__.py +21 -0
- pyedb/workflows/job_manager/__init__.py +21 -0
- pyedb/workflows/job_manager/backend/__init__.py +21 -0
- pyedb/workflows/job_manager/backend/job_manager_handler.py +910 -0
- pyedb/workflows/job_manager/backend/job_submission.py +1169 -0
- pyedb/workflows/job_manager/backend/service.py +1663 -0
- pyedb/workflows/job_manager/backend/start_service.py +86 -0
- pyedb/workflows/job_manager/backend/submit_job_on_scheduler.py +168 -0
- pyedb/workflows/job_manager/backend/submit_local_job.py +166 -0
- pyedb/workflows/sipi/hfss_auto_configuration.py +1 -1
- pyedb/workflows/utilities/__init__.py +21 -0
- pyedb/workflows/utilities/cutout.py +1428 -0
- pyedb/workflows/utilities/hfss_log_parser.py +446 -0
- {pyedb-0.59.0.dist-info → pyedb-0.61.0.dist-info}/METADATA +7 -4
- pyedb-0.61.0.dist-info/RECORD +318 -0
- {pyedb-0.59.0.dist-info → pyedb-0.61.0.dist-info}/licenses/LICENSE +7 -7
- pyedb-0.59.0.dist-info/RECORD +0 -306
- {pyedb-0.59.0.dist-info → pyedb-0.61.0.dist-info}/WHEEL +0 -0
pyedb/dotnet/edb.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2023 -
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
#
|
|
4
4
|
#
|
|
@@ -98,10 +98,12 @@ from pyedb.generic.general_methods import generate_unique_name, is_linux, is_win
|
|
|
98
98
|
from pyedb.generic.process import SiwaveSolve
|
|
99
99
|
from pyedb.generic.settings import settings
|
|
100
100
|
from pyedb.ipc2581.ipc2581 import Ipc2581
|
|
101
|
-
from pyedb.misc.decorators import execution_timer
|
|
101
|
+
from pyedb.misc.decorators import deprecate_argument_name, execution_timer
|
|
102
102
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
103
103
|
from pyedb.siwave_core.product_properties import SIwaveProperties
|
|
104
104
|
from pyedb.workflow import Workflow
|
|
105
|
+
from pyedb.workflows.job_manager.backend.job_manager_handler import JobManagerHandler
|
|
106
|
+
from pyedb.workflows.utilities.cutout import Cutout
|
|
105
107
|
|
|
106
108
|
|
|
107
109
|
class Edb:
|
|
@@ -428,11 +430,23 @@ class Edb:
|
|
|
428
430
|
self._core_primitives = Modeler(self)
|
|
429
431
|
self._stackup2 = self._stackup
|
|
430
432
|
self._materials = Materials(self)
|
|
433
|
+
self._job_manager = JobManagerHandler(self)
|
|
431
434
|
|
|
432
435
|
@property
|
|
433
436
|
def pedb_class(self):
|
|
434
437
|
return pyedb.dotnet
|
|
435
438
|
|
|
439
|
+
@property
|
|
440
|
+
def job_manager(self):
|
|
441
|
+
"""Job manager for handling simulation tasks.
|
|
442
|
+
|
|
443
|
+
Returns
|
|
444
|
+
-------
|
|
445
|
+
:class:`JobManagerHandler <pyedb.workflows.job_manager.job_manager_handler.JobManagerHandler>`
|
|
446
|
+
Job manager instance for submitting and managing simulation jobs.
|
|
447
|
+
"""
|
|
448
|
+
return self._job_manager
|
|
449
|
+
|
|
436
450
|
def value(self, val):
|
|
437
451
|
"""Convert a value into a pyedb value."""
|
|
438
452
|
val_ = val if isinstance(val, self._edb.Utility.Value) else self.edb_value(val)
|
|
@@ -667,7 +681,8 @@ class Edb:
|
|
|
667
681
|
# self.standalone = False
|
|
668
682
|
|
|
669
683
|
self.core.Database.SetRunAsStandAlone(self.standalone)
|
|
670
|
-
|
|
684
|
+
if self._db: # pragma no cover
|
|
685
|
+
self._db.Close()
|
|
671
686
|
self._db = self.core.Database.Create(self.edbpath)
|
|
672
687
|
|
|
673
688
|
if not self._db:
|
|
@@ -833,6 +848,61 @@ class Edb:
|
|
|
833
848
|
self.edbpath = os.path.join(working_dir, aedb_name)
|
|
834
849
|
return self.open_edb()
|
|
835
850
|
|
|
851
|
+
def import_vlctech_stackup(
|
|
852
|
+
self,
|
|
853
|
+
vlctech_file,
|
|
854
|
+
working_dir="",
|
|
855
|
+
export_xml=None,
|
|
856
|
+
):
|
|
857
|
+
"""Import a vlc.tech file and generate an ``edb.def`` file in the working directory containing only the stackup.
|
|
858
|
+
|
|
859
|
+
Parameters
|
|
860
|
+
----------
|
|
861
|
+
vlctech_file : str
|
|
862
|
+
Full path to the technology stackup file. It must be vlc.tech.
|
|
863
|
+
working_dir : str, optional
|
|
864
|
+
Directory in which to create the ``aedb`` folder. The name given to the AEDB file
|
|
865
|
+
is the same as the name of the board file.
|
|
866
|
+
export_xml : str, optional
|
|
867
|
+
Export technology file in XML control file format.
|
|
868
|
+
|
|
869
|
+
Returns
|
|
870
|
+
-------
|
|
871
|
+
Full path to the AEDB file : str
|
|
872
|
+
|
|
873
|
+
"""
|
|
874
|
+
if not working_dir:
|
|
875
|
+
working_dir = os.path.dirname(vlctech_file)
|
|
876
|
+
command = os.path.join(self.base_path, "helic", "tools", "raptorh", "bin", "make-edb")
|
|
877
|
+
if is_windows:
|
|
878
|
+
command += ".exe"
|
|
879
|
+
else:
|
|
880
|
+
os.environ["HELIC_ROOT"] = os.path.join(self.base_path, "helic")
|
|
881
|
+
cmd_make_edb = [
|
|
882
|
+
command,
|
|
883
|
+
"-t",
|
|
884
|
+
"{}".format(vlctech_file),
|
|
885
|
+
"-o",
|
|
886
|
+
"{}".format(os.path.join(working_dir, "vlctech")),
|
|
887
|
+
]
|
|
888
|
+
if export_xml:
|
|
889
|
+
cmd_make_edb.extend(["-x", "{}".format(export_xml)])
|
|
890
|
+
try:
|
|
891
|
+
subprocess.run(cmd_make_edb, check=True) # nosec
|
|
892
|
+
except subprocess.CalledProcessError as e: # nosec
|
|
893
|
+
raise RuntimeError(
|
|
894
|
+
"Failed to create edb. Please check if the executable is present in the base path."
|
|
895
|
+
) from e
|
|
896
|
+
|
|
897
|
+
if not os.path.exists(os.path.join(working_dir, "vlctech.aedb")):
|
|
898
|
+
self.logger.error("Failed to create edb. Please check if the executable is present in the base path.")
|
|
899
|
+
return False
|
|
900
|
+
else:
|
|
901
|
+
self.logger.info("edb successfully created.")
|
|
902
|
+
self.edbpath = os.path.join(working_dir, "vlctech.aedb")
|
|
903
|
+
self.open_edb()
|
|
904
|
+
return self.edbpath
|
|
905
|
+
|
|
836
906
|
def export_to_ipc2581(self, ipc_path=None, units="MILLIMETER"):
|
|
837
907
|
"""Create an XML IPC2581 file from the active EDB.
|
|
838
908
|
|
|
@@ -1943,10 +2013,11 @@ class Edb:
|
|
|
1943
2013
|
_poly = _poly.Expand(expansion_size, tolerance, round_corner, round_extension)[0]
|
|
1944
2014
|
return _poly
|
|
1945
2015
|
|
|
2016
|
+
@deprecate_argument_name({"signal_list": "signal_nets", "reference_list": "reference_nets"})
|
|
1946
2017
|
def cutout(
|
|
1947
2018
|
self,
|
|
1948
|
-
|
|
1949
|
-
|
|
2019
|
+
signal_nets=None,
|
|
2020
|
+
reference_nets=None,
|
|
1950
2021
|
extent_type="ConvexHull",
|
|
1951
2022
|
expansion_size=0.002,
|
|
1952
2023
|
use_round_corner=False,
|
|
@@ -1981,9 +2052,9 @@ class Edb:
|
|
|
1981
2052
|
|
|
1982
2053
|
Parameters
|
|
1983
2054
|
----------
|
|
1984
|
-
|
|
2055
|
+
signal_nets : list
|
|
1985
2056
|
List of signal strings.
|
|
1986
|
-
|
|
2057
|
+
reference_nets : list, optional
|
|
1987
2058
|
List of references to add. The default is ``["GND"]``.
|
|
1988
2059
|
extent_type : str, optional
|
|
1989
2060
|
Type of the extension. Options are ``"Conforming"``, ``"ConvexHull"``, and
|
|
@@ -2069,7 +2140,7 @@ class Edb:
|
|
|
2069
2140
|
>>> if "3V3" in net:
|
|
2070
2141
|
>>> signal_list.append(net)
|
|
2071
2142
|
>>> power_list = ["PGND"]
|
|
2072
|
-
>>> edb.cutout(
|
|
2143
|
+
>>> edb.cutout(signal_nets=signal_list, reference_nets=power_list, extent_type="Conforming")
|
|
2073
2144
|
>>> end_time = str((time.time() - start) / 60)
|
|
2074
2145
|
>>> edb.logger.info("Total legacy cutout time in min %s", end_time)
|
|
2075
2146
|
>>> edb.nets.plot(signal_list, None, color_by_net=True)
|
|
@@ -2079,119 +2150,33 @@ class Edb:
|
|
|
2079
2150
|
|
|
2080
2151
|
|
|
2081
2152
|
"""
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
use_pyaedt_extent_computing=use_pyaedt_extent_computing,
|
|
2110
|
-
check_terminals=check_terminals,
|
|
2111
|
-
include_pingroups=include_pingroups,
|
|
2112
|
-
inlcude_voids_in_extents=include_voids_in_extents,
|
|
2113
|
-
)
|
|
2114
|
-
else:
|
|
2115
|
-
legacy_path = self.edbpath
|
|
2116
|
-
if expansion_factor > 0 and not custom_extent:
|
|
2117
|
-
start = time.time()
|
|
2118
|
-
self.save()
|
|
2119
|
-
dummy_path = self.edbpath.replace(".aedb", "_smart_cutout_temp.aedb")
|
|
2120
|
-
working_cutout = False
|
|
2121
|
-
i = 1
|
|
2122
|
-
expansion = expansion_size
|
|
2123
|
-
while i <= maximum_iterations:
|
|
2124
|
-
self.logger.info("-----------------------------------------")
|
|
2125
|
-
self.logger.info("Trying cutout with {}mm expansion size".format(expansion * 1e3))
|
|
2126
|
-
self.logger.info("-----------------------------------------")
|
|
2127
|
-
result = self._create_cutout_multithread(
|
|
2128
|
-
signal_list=signal_list,
|
|
2129
|
-
reference_list=reference_list,
|
|
2130
|
-
extent_type=extent_type,
|
|
2131
|
-
expansion_size=expansion,
|
|
2132
|
-
use_round_corner=use_round_corner,
|
|
2133
|
-
number_of_threads=number_of_threads,
|
|
2134
|
-
custom_extent=custom_extent,
|
|
2135
|
-
output_aedb_path=dummy_path,
|
|
2136
|
-
remove_single_pin_components=remove_single_pin_components,
|
|
2137
|
-
use_pyaedt_extent_computing=use_pyaedt_extent_computing,
|
|
2138
|
-
extent_defeature=extent_defeature,
|
|
2139
|
-
custom_extent_units=custom_extent_units,
|
|
2140
|
-
check_terminals=check_terminals,
|
|
2141
|
-
include_pingroups=include_pingroups,
|
|
2142
|
-
preserve_components_with_model=preserve_components_with_model,
|
|
2143
|
-
include_partial=include_partial_instances,
|
|
2144
|
-
simple_pad_check=simple_pad_check,
|
|
2145
|
-
keep_lines_as_path=keep_lines_as_path,
|
|
2146
|
-
inlcude_voids_in_extents=include_voids_in_extents,
|
|
2147
|
-
)
|
|
2148
|
-
if self.are_port_reference_terminals_connected():
|
|
2149
|
-
if output_aedb_path:
|
|
2150
|
-
self.save_as(output_aedb_path)
|
|
2151
|
-
else:
|
|
2152
|
-
self.save_as(legacy_path)
|
|
2153
|
-
working_cutout = True
|
|
2154
|
-
break
|
|
2155
|
-
self.close()
|
|
2156
|
-
self.edbpath = legacy_path
|
|
2157
|
-
self.open_edb()
|
|
2158
|
-
i += 1
|
|
2159
|
-
expansion = expansion_size * i
|
|
2160
|
-
if working_cutout:
|
|
2161
|
-
msg = "Cutout completed in {} iterations with expansion size of {}mm".format(i, expansion * 1e3)
|
|
2162
|
-
self.logger.info_timer(msg, start)
|
|
2163
|
-
else:
|
|
2164
|
-
msg = "Cutout failed after {} iterations and expansion size of {}mm".format(i, expansion * 1e3)
|
|
2165
|
-
self.logger.info_timer(msg, start)
|
|
2166
|
-
return False
|
|
2167
|
-
else:
|
|
2168
|
-
result = self._create_cutout_multithread(
|
|
2169
|
-
signal_list=signal_list,
|
|
2170
|
-
reference_list=reference_list,
|
|
2171
|
-
extent_type=extent_type,
|
|
2172
|
-
expansion_size=expansion_size,
|
|
2173
|
-
use_round_corner=use_round_corner,
|
|
2174
|
-
number_of_threads=number_of_threads,
|
|
2175
|
-
custom_extent=custom_extent,
|
|
2176
|
-
output_aedb_path=output_aedb_path,
|
|
2177
|
-
remove_single_pin_components=remove_single_pin_components,
|
|
2178
|
-
use_pyaedt_extent_computing=use_pyaedt_extent_computing,
|
|
2179
|
-
extent_defeature=extent_defeature,
|
|
2180
|
-
custom_extent_units=custom_extent_units,
|
|
2181
|
-
check_terminals=check_terminals,
|
|
2182
|
-
include_pingroups=include_pingroups,
|
|
2183
|
-
preserve_components_with_model=preserve_components_with_model,
|
|
2184
|
-
include_partial=include_partial_instances,
|
|
2185
|
-
simple_pad_check=simple_pad_check,
|
|
2186
|
-
keep_lines_as_path=keep_lines_as_path,
|
|
2187
|
-
inlcude_voids_in_extents=include_voids_in_extents,
|
|
2188
|
-
)
|
|
2189
|
-
if result and not open_cutout_at_end and self.edbpath != legacy_path:
|
|
2190
|
-
self.save()
|
|
2191
|
-
self.close()
|
|
2192
|
-
self.edbpath = legacy_path
|
|
2193
|
-
self.open_edb()
|
|
2194
|
-
return result
|
|
2153
|
+
cutout = Cutout(self)
|
|
2154
|
+
cutout.expansion_size = expansion_size
|
|
2155
|
+
cutout.signals = signal_nets
|
|
2156
|
+
cutout.references = reference_nets
|
|
2157
|
+
cutout.extent_type = extent_type
|
|
2158
|
+
cutout.expansion_size = expansion_size
|
|
2159
|
+
cutout.use_round_corner = use_round_corner
|
|
2160
|
+
cutout.output_file = output_aedb_path
|
|
2161
|
+
cutout.open_cutout_at_end = open_cutout_at_end
|
|
2162
|
+
cutout.use_pyaedt_cutout = use_pyaedt_cutout
|
|
2163
|
+
cutout.number_of_threads = number_of_threads
|
|
2164
|
+
cutout.use_pyaedt_extent_computing = use_pyaedt_extent_computing
|
|
2165
|
+
cutout.extent_defeatured = extent_defeature
|
|
2166
|
+
cutout.remove_single_pin_components = remove_single_pin_components
|
|
2167
|
+
cutout.custom_extent = custom_extent
|
|
2168
|
+
cutout.custom_extent_units = custom_extent_units
|
|
2169
|
+
cutout.include_partial_instances = include_partial_instances
|
|
2170
|
+
cutout.keep_voids = keep_voids
|
|
2171
|
+
cutout.check_terminals = check_terminals
|
|
2172
|
+
cutout.include_pingroups = include_pingroups
|
|
2173
|
+
cutout.expansion_factor = expansion_factor
|
|
2174
|
+
cutout.maximum_iterations = maximum_iterations
|
|
2175
|
+
cutout.preserve_components_with_model = preserve_components_with_model
|
|
2176
|
+
cutout.simple_pad_check = simple_pad_check
|
|
2177
|
+
cutout.keep_lines_as_path = keep_lines_as_path
|
|
2178
|
+
cutout.include_voids_in_extents = include_voids_in_extents
|
|
2179
|
+
return cutout.run()
|
|
2195
2180
|
|
|
2196
2181
|
def _create_cutout_legacy(
|
|
2197
2182
|
self,
|
|
@@ -3711,7 +3696,7 @@ class Edb:
|
|
|
3711
3696
|
return True
|
|
3712
3697
|
self.logger.reset_timer()
|
|
3713
3698
|
if not common_reference:
|
|
3714
|
-
common_reference = list(set([i.reference_net_name for i in all_sources if i.
|
|
3699
|
+
common_reference = list(set([i.reference_net_name for i in all_sources if i.reference_terminal.net_name]))
|
|
3715
3700
|
if len(common_reference) > 1:
|
|
3716
3701
|
self.logger.error("More than 1 reference found.")
|
|
3717
3702
|
return False
|
|
@@ -4234,7 +4219,18 @@ class Edb:
|
|
|
4234
4219
|
terminal.ref_terminal = ref_terminal
|
|
4235
4220
|
if name:
|
|
4236
4221
|
terminal.name = name
|
|
4237
|
-
|
|
4222
|
+
|
|
4223
|
+
if terminal.is_circuit_port:
|
|
4224
|
+
port = CircuitPort(self, terminal._edb_object)
|
|
4225
|
+
elif terminal.terminal_type == "BundleTerminal":
|
|
4226
|
+
port = BundleWavePort(self, terminal._edb_object)
|
|
4227
|
+
elif terminal.hfss_type == "Wave":
|
|
4228
|
+
port = WavePort(self, terminal._edb_object)
|
|
4229
|
+
elif terminal.terminal_type == "PadstackInstanceTerminal":
|
|
4230
|
+
port = CoaxPort(self, terminal._edb_object)
|
|
4231
|
+
else:
|
|
4232
|
+
port = GapPort(self, terminal._edb_object)
|
|
4233
|
+
return port
|
|
4238
4234
|
|
|
4239
4235
|
def create_voltage_probe(self, terminal, ref_terminal):
|
|
4240
4236
|
"""Create a voltage probe.
|
pyedb/edb_logger.py
CHANGED
pyedb/exceptions.py
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
1
23
|
""" """
|
|
2
24
|
|
|
3
25
|
|
pyedb/extensions/__init__.py
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
1
23
|
from copy import deepcopy as copy
|
|
2
24
|
import json
|
|
3
25
|
from pathlib import Path
|
pyedb/generic/__init__.py
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
pyedb/generic/constants.py
CHANGED
pyedb/generic/data_handlers.py
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
1
23
|
# -*- coding: utf-8 -*-
|
|
2
24
|
from decimal import Decimal
|
|
3
25
|
import json
|
pyedb/generic/design_types.py
CHANGED
pyedb/generic/filesystem.py
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
1
23
|
import os
|
|
2
24
|
import secrets
|
|
3
25
|
import shutil
|
pyedb/generic/general_methods.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2023 -
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
#
|
|
4
4
|
#
|
|
@@ -42,6 +42,7 @@ import sys
|
|
|
42
42
|
import tempfile
|
|
43
43
|
import time
|
|
44
44
|
import traceback
|
|
45
|
+
from typing import Dict
|
|
45
46
|
|
|
46
47
|
from pyedb.generic.constants import CSS4_COLORS
|
|
47
48
|
from pyedb.generic.settings import settings
|
|
@@ -135,6 +136,26 @@ def _exception(ex_info, func, args, kwargs, message="Type Error"):
|
|
|
135
136
|
)
|
|
136
137
|
|
|
137
138
|
|
|
139
|
+
def installed_ansys_em_versions() -> Dict[str, str]:
|
|
140
|
+
"""
|
|
141
|
+
Scan environment variables and return a dict
|
|
142
|
+
{version: installation_path} for every ANSYS EM release found.
|
|
143
|
+
Versions are ordered from oldest → latest (latest appears last).
|
|
144
|
+
"""
|
|
145
|
+
pattern = re.compile(r"^ANSYSEM_ROOT(\d{3})$", re.IGNORECASE)
|
|
146
|
+
|
|
147
|
+
# collect everything
|
|
148
|
+
versions = {}
|
|
149
|
+
for key, value in os.environ.items():
|
|
150
|
+
m = pattern.match(key)
|
|
151
|
+
if m:
|
|
152
|
+
version = m.group(1)
|
|
153
|
+
versions[version] = value.rstrip(os.sep)
|
|
154
|
+
|
|
155
|
+
# sort ascending so the latest is last
|
|
156
|
+
return dict(sorted(versions.items(), key=lambda kv: int(kv[0])))
|
|
157
|
+
|
|
158
|
+
|
|
138
159
|
def get_filename_without_extension(path):
|
|
139
160
|
"""Get the filename without its extension.
|
|
140
161
|
|
pyedb/generic/grpc_warnings.py
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
1
23
|
GRPC_GENERAL_WARNING = (
|
|
2
24
|
"Your ANSYS AEDT version is eligible to gRPC version."
|
|
3
25
|
"You might consider switching to that version for better user experience."
|
pyedb/generic/plot.py
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
1
23
|
import os
|
|
2
24
|
|
|
3
25
|
from matplotlib.patches import PathPatch
|
pyedb/generic/process.py
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
1
23
|
import os.path
|
|
2
24
|
from pathlib import Path
|
|
3
25
|
import subprocess # nosec B404
|
|
@@ -48,6 +70,11 @@ class SiwaveSolve(object):
|
|
|
48
70
|
def solve_siwave(self, edbpath, analysis_type):
|
|
49
71
|
"""Solve an SIWave setup. Only non-graphical batch mode is supported.
|
|
50
72
|
|
|
73
|
+
.. warning::
|
|
74
|
+
Do not execute this function with untrusted function argument, environment
|
|
75
|
+
variables or pyedb global settings.
|
|
76
|
+
See the :ref:`security guide<ref_security_consideration>` for details.
|
|
77
|
+
|
|
51
78
|
Parameters
|
|
52
79
|
----------
|
|
53
80
|
analysis_type: str
|
|
@@ -67,8 +94,8 @@ class SiwaveSolve(object):
|
|
|
67
94
|
"-useSubdir",
|
|
68
95
|
]
|
|
69
96
|
try:
|
|
70
|
-
subprocess.run(command, check=True)
|
|
71
|
-
except subprocess.CalledProcessError as e:
|
|
97
|
+
subprocess.run(command, check=True) # nosec
|
|
98
|
+
except subprocess.CalledProcessError as e: # nosec
|
|
72
99
|
raise RuntimeError(f"An error occurred when launching the solver. Please check input paths") from e
|
|
73
100
|
|
|
74
101
|
def solve(self, num_of_cores=4):
|
pyedb/generic/settings.py
CHANGED