pyedb 0.38.0__py3-none-any.whl → 0.39.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 +1 -1
- pyedb/common/nets.py +53 -139
- pyedb/configuration/cfg_components.py +1 -1
- pyedb/configuration/cfg_general.py +4 -2
- pyedb/configuration/cfg_modeler.py +1 -1
- pyedb/configuration/cfg_package_definition.py +1 -1
- pyedb/configuration/cfg_padstacks.py +1 -1
- pyedb/configuration/cfg_ports_sources.py +56 -23
- pyedb/configuration/configuration.py +18 -1
- pyedb/dotnet/{application → database}/Variables.py +21 -21
- pyedb/dotnet/{edb_core → database}/cell/connectable.py +5 -5
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/component.py +11 -11
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/hierarchy_obj.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/layout.py +17 -17
- pyedb/dotnet/{edb_core → database}/cell/layout_obj.py +3 -3
- pyedb/dotnet/{edb_core → database}/cell/primitive/bondwire.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/primitive/path.py +4 -4
- pyedb/dotnet/{edb_core → database}/cell/primitive/primitive.py +14 -14
- pyedb/dotnet/{edb_core → database}/cell/terminal/bundle_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/edge_terminal.py +4 -4
- pyedb/dotnet/{edb_core → database}/cell/terminal/padstack_instance_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/pingroup_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/point_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/terminal.py +11 -11
- pyedb/dotnet/{edb_core → database}/cell/voltage_regulator.py +2 -2
- pyedb/dotnet/{edb_core → database}/components.py +101 -124
- pyedb/dotnet/{edb_core → database}/definition/component_def.py +5 -5
- pyedb/dotnet/{edb_core → database}/definition/component_model.py +1 -1
- pyedb/dotnet/{edb_core → database}/definition/definition_obj.py +1 -1
- pyedb/dotnet/{edb_core → database}/definition/definitions.py +2 -2
- pyedb/dotnet/{edb_core → database}/definition/package_def.py +4 -4
- pyedb/dotnet/{edb_core → database}/dotnet/database.py +8 -8
- pyedb/dotnet/{edb_core → database}/dotnet/primitive.py +9 -9
- pyedb/dotnet/{edb_core → database}/edb_data/control_file.py +12 -12
- pyedb/dotnet/{edb_core → database}/edb_data/hfss_extent_info.py +7 -7
- pyedb/dotnet/{edb_core → database}/edb_data/nets_data.py +10 -13
- pyedb/dotnet/{edb_core → database}/edb_data/padstacks_data.py +16 -16
- pyedb/dotnet/{edb_core → database}/edb_data/ports.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/{edb_core → database}/edb_data/raptor_x_simulation_setup_data.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/simulation_configuration.py +10 -10
- pyedb/dotnet/{edb_core → database}/edb_data/sources.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/variables.py +1 -1
- pyedb/dotnet/{edb_core → database}/geometry/polygon_data.py +4 -4
- pyedb/dotnet/{edb_core → database}/hfss.py +8 -8
- pyedb/dotnet/{edb_core → database}/layout_obj_instance.py +1 -1
- pyedb/dotnet/{edb_core → database}/layout_validation.py +2 -2
- pyedb/dotnet/{edb_core → database}/materials.py +23 -8
- pyedb/dotnet/{edb_core → database}/modeler.py +27 -27
- pyedb/dotnet/{edb_core → database}/net_class.py +8 -8
- pyedb/dotnet/{edb_core → database}/nets.py +12 -12
- pyedb/dotnet/{edb_core → database}/padstack.py +15 -15
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/mesh_operation.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/settings.py +3 -3
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/sim_setup_info.py +2 -2
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/simulation_settings.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/siw_dc_ir_settings.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/sweep_data.py +1 -1
- pyedb/dotnet/{edb_core → database}/siwave.py +10 -10
- pyedb/dotnet/{edb_core → database}/stackup.py +12 -12
- pyedb/dotnet/{edb_core → database}/utilities/hfss_simulation_setup.py +15 -15
- pyedb/dotnet/{edb_core → database}/utilities/obj_base.py +1 -1
- pyedb/dotnet/{edb_core → database}/utilities/simulation_setup.py +3 -3
- pyedb/dotnet/{edb_core → database}/utilities/siwave_simulation_setup.py +6 -6
- pyedb/dotnet/edb.py +117 -112
- pyedb/generic/design_types.py +26 -19
- pyedb/generic/general_methods.py +1 -1
- pyedb/generic/plot.py +0 -2
- pyedb/grpc/database/__init__.py +1 -0
- pyedb/grpc/database/components.py +2354 -0
- pyedb/grpc/database/control_file.py +1277 -0
- pyedb/grpc/database/definition/component_def.py +218 -0
- pyedb/grpc/database/definition/component_model.py +39 -0
- pyedb/grpc/database/definition/component_pin.py +32 -0
- pyedb/grpc/database/definition/materials.py +1207 -0
- pyedb/grpc/database/definition/n_port_component_model.py +34 -0
- pyedb/grpc/database/definition/package_def.py +227 -0
- pyedb/grpc/database/definition/padstack_def.py +842 -0
- pyedb/grpc/database/definitions.py +70 -0
- pyedb/grpc/database/general.py +43 -0
- pyedb/grpc/database/geometry/__init__.py +0 -0
- pyedb/grpc/database/geometry/arc_data.py +93 -0
- pyedb/grpc/database/geometry/point_3d_data.py +79 -0
- pyedb/grpc/database/geometry/point_data.py +30 -0
- pyedb/grpc/database/geometry/polygon_data.py +133 -0
- pyedb/grpc/database/hfss.py +1279 -0
- pyedb/grpc/database/hierarchy/__init__.py +0 -0
- pyedb/grpc/database/hierarchy/component.py +1301 -0
- pyedb/grpc/database/hierarchy/model.py +31 -0
- pyedb/grpc/database/hierarchy/netlist_model.py +30 -0
- pyedb/grpc/database/hierarchy/pin_pair_model.py +128 -0
- pyedb/grpc/database/hierarchy/pingroup.py +245 -0
- pyedb/grpc/database/hierarchy/s_parameter_model.py +33 -0
- pyedb/grpc/database/hierarchy/spice_model.py +48 -0
- pyedb/grpc/database/layers/__init__.py +0 -0
- pyedb/grpc/database/layers/layer.py +57 -0
- pyedb/grpc/database/layers/stackup_layer.py +410 -0
- pyedb/grpc/database/layout/__init__.py +0 -0
- pyedb/grpc/database/layout/cell.py +30 -0
- pyedb/grpc/database/layout/layout.py +196 -0
- pyedb/grpc/database/layout/voltage_regulator.py +149 -0
- pyedb/grpc/database/layout_validation.py +319 -0
- pyedb/grpc/database/modeler.py +1468 -0
- pyedb/grpc/database/net/__init__.py +0 -0
- pyedb/grpc/database/net/differential_pair.py +138 -0
- pyedb/grpc/database/net/extended_net.py +340 -0
- pyedb/grpc/database/net/net.py +198 -0
- pyedb/grpc/database/net/net_class.py +93 -0
- pyedb/grpc/database/nets.py +633 -0
- pyedb/grpc/database/padstacks.py +1500 -0
- pyedb/grpc/database/ports/__init__.py +0 -0
- pyedb/grpc/database/ports/ports.py +396 -0
- pyedb/grpc/database/primitive/__init__.py +3 -0
- pyedb/grpc/database/primitive/bondwire.py +181 -0
- pyedb/grpc/database/primitive/circle.py +75 -0
- pyedb/grpc/database/primitive/padstack_instance.py +1116 -0
- pyedb/grpc/database/primitive/path.py +346 -0
- pyedb/grpc/database/primitive/polygon.py +276 -0
- pyedb/grpc/database/primitive/primitive.py +739 -0
- pyedb/grpc/database/primitive/rectangle.py +146 -0
- pyedb/grpc/database/simulation_setup/__init__.py +0 -0
- pyedb/grpc/database/simulation_setup/adaptive_frequency.py +33 -0
- pyedb/grpc/database/simulation_setup/hfss_advanced_meshing_settings.py +32 -0
- pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +59 -0
- pyedb/grpc/database/simulation_setup/hfss_dcr_settings.py +35 -0
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +61 -0
- pyedb/grpc/database/simulation_setup/hfss_settings_options.py +78 -0
- pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +118 -0
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +355 -0
- pyedb/grpc/database/simulation_setup/hfss_solver_settings.py +34 -0
- pyedb/grpc/database/simulation_setup/mesh_operation.py +34 -0
- pyedb/grpc/database/simulation_setup/raptor_x_advanced_settings.py +34 -0
- pyedb/grpc/database/simulation_setup/raptor_x_general_settings.py +33 -0
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +64 -0
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +125 -0
- pyedb/grpc/database/simulation_setup/siwave_dcir_simulation_setup.py +34 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +119 -0
- pyedb/grpc/database/simulation_setup/sweep_data.py +32 -0
- pyedb/grpc/database/siwave.py +1023 -0
- pyedb/grpc/database/source_excitations.py +2572 -0
- pyedb/grpc/database/stackup.py +2574 -0
- pyedb/grpc/database/terminal/__init__.py +0 -0
- pyedb/grpc/database/terminal/bundle_terminal.py +218 -0
- pyedb/grpc/database/terminal/edge_terminal.py +51 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +171 -0
- pyedb/grpc/database/terminal/pingroup_terminal.py +162 -0
- pyedb/grpc/database/terminal/point_terminal.py +99 -0
- pyedb/grpc/database/terminal/terminal.py +470 -0
- pyedb/grpc/database/utility/__init__.py +3 -0
- pyedb/grpc/database/utility/constants.py +25 -0
- pyedb/grpc/database/utility/heat_sink.py +124 -0
- pyedb/grpc/database/utility/hfss_extent_info.py +448 -0
- pyedb/grpc/database/utility/layout_statistics.py +277 -0
- pyedb/grpc/database/utility/rlc.py +80 -0
- pyedb/grpc/database/utility/simulation_configuration.py +3305 -0
- pyedb/grpc/database/utility/sources.py +388 -0
- pyedb/grpc/database/utility/sweep_data_distribution.py +83 -0
- pyedb/grpc/database/utility/xml_control_file.py +1277 -0
- pyedb/grpc/edb.py +4151 -0
- pyedb/grpc/edb_init.py +481 -0
- pyedb/grpc/rpc_session.py +177 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +3 -2
- pyedb/ipc2581/ecad/cad_data/feature.py +4 -3
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +32 -20
- pyedb/ipc2581/ecad/cad_data/outline.py +3 -2
- pyedb/ipc2581/ecad/cad_data/package.py +4 -3
- pyedb/ipc2581/ecad/cad_data/path.py +82 -31
- pyedb/ipc2581/ecad/cad_data/polygon.py +122 -60
- pyedb/ipc2581/ecad/cad_data/profile.py +13 -12
- pyedb/ipc2581/ecad/cad_data/step.py +53 -21
- pyedb/ipc2581/ipc2581.py +47 -49
- pyedb/modeler/geometry_operators.py +1 -1
- {pyedb-0.38.0.dist-info → pyedb-0.39.0.dist-info}/METADATA +5 -2
- pyedb-0.39.0.dist-info/RECORD +288 -0
- pyedb-0.38.0.dist-info/RECORD +0 -195
- /pyedb/dotnet/{edb_core → database}/__init__.py +0 -0
- /pyedb/dotnet/{application → database/cell}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell → database/cell/hierarchy}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/netlist_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/pin_pair_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/s_parameter_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/spice_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/primitive/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell/hierarchy → database/cell/terminal}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell/terminal → database/definition}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/definition → database/dotnet}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/dotnet → database/edb_data}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/design_options.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/edbvalue.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/layer_data.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/utilities.py +0 -0
- /pyedb/dotnet/{edb_core → database}/general.py +0 -0
- /pyedb/dotnet/{edb_core/edb_data → database/geometry}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/geometry/point_data.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/data/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/data/adaptive_frequency_data.py +0 -0
- /pyedb/dotnet/{edb_core/geometry → database/sim_setup_data/io}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/io/siwave.py +0 -0
- /pyedb/dotnet/{edb_core → database}/utilities/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/utilities/heatsink.py +0 -0
- /pyedb/{dotnet/edb_core/sim_setup_data/io → grpc/database/definition}/__init__.py +0 -0
- {pyedb-0.38.0.dist-info → pyedb-0.39.0.dist-info}/LICENSE +0 -0
- {pyedb-0.38.0.dist-info → pyedb-0.39.0.dist-info}/WHEEL +0 -0
|
File without changes
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 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
|
+
|
|
23
|
+
from ansys.edb.core.terminal.terminals import (
|
|
24
|
+
SourceTermToGroundType as GrpcSourceTermToGroundType,
|
|
25
|
+
)
|
|
26
|
+
from ansys.edb.core.terminal.terminals import BundleTerminal as GrpcBundleTerminal
|
|
27
|
+
from ansys.edb.core.terminal.terminals import HfssPIType as GrpcHfssPIType
|
|
28
|
+
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
|
+
|
|
30
|
+
from pyedb.grpc.database.hierarchy.component import Component
|
|
31
|
+
from pyedb.grpc.database.layers.layer import Layer
|
|
32
|
+
from pyedb.grpc.database.net.net import Net
|
|
33
|
+
from pyedb.grpc.database.terminal.terminal import Terminal
|
|
34
|
+
from pyedb.grpc.database.utility.rlc import Rlc
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class BundleTerminal(GrpcBundleTerminal):
|
|
38
|
+
"""Manages bundle terminal properties.
|
|
39
|
+
|
|
40
|
+
Parameters
|
|
41
|
+
----------
|
|
42
|
+
pedb : :class:`Edb <pyedb.grpc.edb.Edb>`
|
|
43
|
+
EDB object.
|
|
44
|
+
edb_object : :class:`BundleTerminal <ansys.edb.core.terminal.terminals.BundleTerminal>`
|
|
45
|
+
BundleTerminal instance from EDB.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
def __init__(self, pedb, edb_object):
|
|
49
|
+
super().__init__(edb_object)
|
|
50
|
+
self._pedb = pedb
|
|
51
|
+
self._edb_object = edb_object
|
|
52
|
+
|
|
53
|
+
def decouple(self):
|
|
54
|
+
"""Ungroup a bundle of terminals.
|
|
55
|
+
|
|
56
|
+
Returns
|
|
57
|
+
-------
|
|
58
|
+
bool
|
|
59
|
+
"""
|
|
60
|
+
return self.ungroup()
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def component(self):
|
|
64
|
+
"""Component.
|
|
65
|
+
|
|
66
|
+
Returns
|
|
67
|
+
-------
|
|
68
|
+
:class:`Component <pyedb.grpc.database.hierarchy.component.Component`
|
|
69
|
+
"""
|
|
70
|
+
return Component(self._pedb, self.component)
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def impedance(self):
|
|
74
|
+
"""Impedance value.
|
|
75
|
+
|
|
76
|
+
Returns
|
|
77
|
+
-------
|
|
78
|
+
float
|
|
79
|
+
Impedance value.
|
|
80
|
+
"""
|
|
81
|
+
return self.impedance.value
|
|
82
|
+
|
|
83
|
+
@impedance.setter
|
|
84
|
+
def impedance(self, value):
|
|
85
|
+
self.impedance = GrpcValue(value)
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def net(self):
|
|
89
|
+
"""Returns Net object.
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
-------
|
|
93
|
+
:class:`Net <pyedb.grpc.database.net.net.Net>`
|
|
94
|
+
"""
|
|
95
|
+
return Net(self._pedb, self.net)
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def hfss_pi_type(self):
|
|
99
|
+
"""Returns HFSS PI type.
|
|
100
|
+
|
|
101
|
+
Returns
|
|
102
|
+
-------
|
|
103
|
+
str
|
|
104
|
+
"""
|
|
105
|
+
return self.hfss_pi_type.name
|
|
106
|
+
|
|
107
|
+
@hfss_pi_type.setter
|
|
108
|
+
def hfss_pi_type(self, value):
|
|
109
|
+
if value.upper() == "DEFAULT":
|
|
110
|
+
self.hfss_pi_type = GrpcHfssPIType.DEFAULT
|
|
111
|
+
elif value.upper() == "COAXIAL_OPEN":
|
|
112
|
+
self.hfss_pi_type = GrpcHfssPIType.COAXIAL_OPEN
|
|
113
|
+
elif value.upper() == "COAXIAL_SHORTENED":
|
|
114
|
+
self.hfss_pi_type = GrpcHfssPIType.COAXIAL_SHORTENED
|
|
115
|
+
elif value.upper() == "GAP":
|
|
116
|
+
self.hfss_pi_type = GrpcHfssPIType.GAP
|
|
117
|
+
elif value.upper() == "LUMPED":
|
|
118
|
+
self.hfss_pi_type = GrpcHfssPIType.LUMPED
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def reference_layer(self):
|
|
122
|
+
"""Returns reference layer.
|
|
123
|
+
|
|
124
|
+
Returns
|
|
125
|
+
-------
|
|
126
|
+
:class:`Layer <pyedb.grpc.database.layer.layer.Layer>`
|
|
127
|
+
"""
|
|
128
|
+
return Layer(self._pedb, self.reference_layer)
|
|
129
|
+
|
|
130
|
+
@reference_layer.setter
|
|
131
|
+
def reference_layer(self, value):
|
|
132
|
+
if isinstance(value, Layer):
|
|
133
|
+
self.reference_layer = value._edb_object
|
|
134
|
+
elif isinstance(value, str):
|
|
135
|
+
self.reference_layer = self._pedb.stackup.signal_layer[value]._edb_object
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def reference_terminal(self):
|
|
139
|
+
"""Returns reference terminal.
|
|
140
|
+
|
|
141
|
+
Returns
|
|
142
|
+
-------
|
|
143
|
+
:class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`
|
|
144
|
+
"""
|
|
145
|
+
return Terminal(self._pedb, self.reference_terminal)
|
|
146
|
+
|
|
147
|
+
@reference_terminal.setter
|
|
148
|
+
def reference_terminal(self, value):
|
|
149
|
+
if isinstance(value, Terminal):
|
|
150
|
+
self.reference_terminal = value._edb_object
|
|
151
|
+
|
|
152
|
+
@property
|
|
153
|
+
def rlc_boundary_parameters(self):
|
|
154
|
+
"""Returns Rlc parameters
|
|
155
|
+
|
|
156
|
+
Returns
|
|
157
|
+
-------
|
|
158
|
+
:class:`Rlc <pyedb.grpc.database.utility.rlc.Rlc>`
|
|
159
|
+
"""
|
|
160
|
+
return Rlc(self._pedb, self.rlc)
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def source_amplitude(self):
|
|
164
|
+
"""Returns source amplitude.
|
|
165
|
+
|
|
166
|
+
Returns
|
|
167
|
+
-------
|
|
168
|
+
float
|
|
169
|
+
"""
|
|
170
|
+
return self.source_amplitude.value
|
|
171
|
+
|
|
172
|
+
@source_amplitude.setter
|
|
173
|
+
def source_amplitude(self, value):
|
|
174
|
+
self.source_amplitude = GrpcValue(value)
|
|
175
|
+
|
|
176
|
+
@property
|
|
177
|
+
def source_phase(self):
|
|
178
|
+
"""Returns source phase.
|
|
179
|
+
|
|
180
|
+
Returns
|
|
181
|
+
-------
|
|
182
|
+
float
|
|
183
|
+
"""
|
|
184
|
+
return self.source_phase.value
|
|
185
|
+
|
|
186
|
+
@source_phase.setter
|
|
187
|
+
def source_phase(self, value):
|
|
188
|
+
self.source_phase = GrpcValue(value)
|
|
189
|
+
|
|
190
|
+
@property
|
|
191
|
+
def term_to_ground(self):
|
|
192
|
+
"""Returns terminal to ground.
|
|
193
|
+
|
|
194
|
+
Returns
|
|
195
|
+
-------
|
|
196
|
+
str
|
|
197
|
+
Terminal name.
|
|
198
|
+
"""
|
|
199
|
+
return self.term_to_ground.name
|
|
200
|
+
|
|
201
|
+
@term_to_ground.setter
|
|
202
|
+
def term_to_ground(self, value):
|
|
203
|
+
if value.upper() == "NO_GROUND":
|
|
204
|
+
self.term_to_ground = GrpcSourceTermToGroundType.NO_GROUND
|
|
205
|
+
elif value.upper() == "NEGATIVE":
|
|
206
|
+
self.term_to_ground = GrpcSourceTermToGroundType.NEGATIVE
|
|
207
|
+
elif value.upper() == "POSITIVE":
|
|
208
|
+
self.term_to_ground = GrpcSourceTermToGroundType.POSITIVE
|
|
209
|
+
|
|
210
|
+
@property
|
|
211
|
+
def terminals(self):
|
|
212
|
+
"""Returns terminals list.
|
|
213
|
+
|
|
214
|
+
Returns
|
|
215
|
+
-------
|
|
216
|
+
List[:class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`]
|
|
217
|
+
"""
|
|
218
|
+
return [Terminal(self._pedb, terminal) for terminal in self.terminals]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 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
|
+
|
|
23
|
+
from ansys.edb.core.terminal.terminals import BundleTerminal as GrpcBundleTerminal
|
|
24
|
+
from ansys.edb.core.terminal.terminals import EdgeTerminal as GrpcEdgeTerminal
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class EdgeTerminal(GrpcEdgeTerminal):
|
|
28
|
+
def __init__(self, pedb, edb_object):
|
|
29
|
+
super().__init__(edb_object.msg)
|
|
30
|
+
self._pedb = pedb
|
|
31
|
+
self._edb_object = edb_object
|
|
32
|
+
|
|
33
|
+
def couple_ports(self, port):
|
|
34
|
+
"""Create a bundle wave port.
|
|
35
|
+
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
port : :class:`Waveport <pyedb.grpc.database.ports.ports.WavePort>`,
|
|
39
|
+
:class:`GapPOrt <pyedb.grpc.database.ports.ports.GapPort>`, list, optional
|
|
40
|
+
Ports to be added.
|
|
41
|
+
|
|
42
|
+
Returns
|
|
43
|
+
-------
|
|
44
|
+
:class:`BundleWavePort <pyedb.grpc.database.ports.ports.BundleWavePort>`
|
|
45
|
+
"""
|
|
46
|
+
if not isinstance(port, (list, tuple)):
|
|
47
|
+
port = [port]
|
|
48
|
+
temp = [self]
|
|
49
|
+
temp.extend([i for i in port])
|
|
50
|
+
bundle_terminal = GrpcBundleTerminal.create(temp)
|
|
51
|
+
return self._pedb.ports[bundle_terminal.name]
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 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
|
+
|
|
23
|
+
from ansys.edb.core.terminal.terminals import (
|
|
24
|
+
PadstackInstanceTerminal as GrpcPadstackInstanceTerminal,
|
|
25
|
+
)
|
|
26
|
+
from ansys.edb.core.terminal.terminals import BoundaryType as GrpcBoundaryType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
30
|
+
"""Manages bundle terminal properties."""
|
|
31
|
+
|
|
32
|
+
def __init__(self, pedb, edb_object=None):
|
|
33
|
+
if edb_object:
|
|
34
|
+
super().__init__(edb_object.msg)
|
|
35
|
+
self._pedb = pedb
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def position(self):
|
|
39
|
+
"""Terminal position.
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
Position [x,y] : [float, float]
|
|
44
|
+
"""
|
|
45
|
+
pos_x, pos_y, rotation = self.padstack_instance.get_position_and_rotation()
|
|
46
|
+
return [pos_x.value, pos_y.value]
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def location(self):
|
|
50
|
+
"""Terminal position.
|
|
51
|
+
|
|
52
|
+
Returns
|
|
53
|
+
-------
|
|
54
|
+
Position [x,y] : [float, float]
|
|
55
|
+
"""
|
|
56
|
+
p_inst, _ = self.params
|
|
57
|
+
pos_x, pos_y, _ = p_inst.get_position_and_rotation()
|
|
58
|
+
return [pos_x.value, pos_y.value]
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def net_name(self):
|
|
62
|
+
"""Net name.
|
|
63
|
+
|
|
64
|
+
Returns
|
|
65
|
+
-------
|
|
66
|
+
str : name of the net.
|
|
67
|
+
"""
|
|
68
|
+
if self.is_null:
|
|
69
|
+
return ""
|
|
70
|
+
elif self.net.is_null:
|
|
71
|
+
return ""
|
|
72
|
+
else:
|
|
73
|
+
return self.net.name
|
|
74
|
+
|
|
75
|
+
@net_name.setter
|
|
76
|
+
def net_name(self, val):
|
|
77
|
+
if not self.is_null and self.net.is_null:
|
|
78
|
+
self.net.name = val
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def magnitude(self):
|
|
82
|
+
"""Source amplitude.
|
|
83
|
+
|
|
84
|
+
Returns
|
|
85
|
+
-------
|
|
86
|
+
float : amplitude value.
|
|
87
|
+
"""
|
|
88
|
+
return self.source_amplitude
|
|
89
|
+
|
|
90
|
+
@magnitude.setter
|
|
91
|
+
def magnitude(self, value):
|
|
92
|
+
self.source_amplitude = value
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def phase(self):
|
|
96
|
+
"""Source phase.
|
|
97
|
+
|
|
98
|
+
Returns
|
|
99
|
+
-------
|
|
100
|
+
float : phase value.
|
|
101
|
+
"""
|
|
102
|
+
return self.source_phase
|
|
103
|
+
|
|
104
|
+
@phase.setter
|
|
105
|
+
def phase(self, value):
|
|
106
|
+
self.source_phase = value
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def source_amplitude(self):
|
|
110
|
+
"""Source amplitude.
|
|
111
|
+
|
|
112
|
+
Returns
|
|
113
|
+
-------
|
|
114
|
+
float : amplitude value.
|
|
115
|
+
"""
|
|
116
|
+
return super().source_amplitude
|
|
117
|
+
|
|
118
|
+
@source_amplitude.setter
|
|
119
|
+
def source_amplitude(self, value):
|
|
120
|
+
super(PadstackInstanceTerminal, self.__class__).source_amplitude.__set__(self, value)
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def source_phase(self):
|
|
124
|
+
"""Source phase.
|
|
125
|
+
|
|
126
|
+
Returns
|
|
127
|
+
-------
|
|
128
|
+
float : phase value.
|
|
129
|
+
"""
|
|
130
|
+
return super().source_phase.value
|
|
131
|
+
|
|
132
|
+
@source_phase.setter
|
|
133
|
+
def source_phase(self, value):
|
|
134
|
+
super(PadstackInstanceTerminal, self.__class__).source_phase.__set__(self, value)
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def impedance(self):
|
|
138
|
+
"""Impdeance value.
|
|
139
|
+
|
|
140
|
+
Returns
|
|
141
|
+
-------
|
|
142
|
+
float : impedance value.
|
|
143
|
+
"""
|
|
144
|
+
return super().impedance.value
|
|
145
|
+
|
|
146
|
+
@impedance.setter
|
|
147
|
+
def impedance(self, value):
|
|
148
|
+
super(PadstackInstanceTerminal, self.__class__).impedance.__set__(self, value)
|
|
149
|
+
|
|
150
|
+
@property
|
|
151
|
+
def boundary_type(self):
|
|
152
|
+
"""Boundary type.
|
|
153
|
+
|
|
154
|
+
Returns
|
|
155
|
+
-------
|
|
156
|
+
str : Boundary type.
|
|
157
|
+
"""
|
|
158
|
+
return super().boundary_type.name.lower()
|
|
159
|
+
|
|
160
|
+
@boundary_type.setter
|
|
161
|
+
def boundary_type(self, value):
|
|
162
|
+
mapping = {
|
|
163
|
+
"port": GrpcBoundaryType.PORT,
|
|
164
|
+
"dc_terminal": GrpcBoundaryType.DC_TERMINAL,
|
|
165
|
+
"voltage_probe": GrpcBoundaryType.VOLTAGE_PROBE,
|
|
166
|
+
"voltage_source": GrpcBoundaryType.VOLTAGE_SOURCE,
|
|
167
|
+
"current_source": GrpcBoundaryType.CURRENT_SOURCE,
|
|
168
|
+
"rlc": GrpcBoundaryType.RLC,
|
|
169
|
+
"pec": GrpcBoundaryType.PEC,
|
|
170
|
+
}
|
|
171
|
+
super(PadstackInstanceTerminal, self.__class__).boundary_type.__set__(self, mapping[value.name.lower()])
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 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
|
+
|
|
23
|
+
from ansys.edb.core.terminal.terminals import BoundaryType as GrpcBoundaryType
|
|
24
|
+
from ansys.edb.core.terminal.terminals import PinGroupTerminal as GrpcPinGroupTerminal
|
|
25
|
+
|
|
26
|
+
from pyedb.grpc.database.net.net import Net
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
30
|
+
"""Manages pin group terminal properties."""
|
|
31
|
+
|
|
32
|
+
def __init__(self, pedb, edb_object):
|
|
33
|
+
super().__init__(edb_object.msg)
|
|
34
|
+
self._edb_object = edb_object
|
|
35
|
+
self._pedb = pedb
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def boundary_type(self):
|
|
39
|
+
"""Boundary type.
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
str : boundary type.
|
|
44
|
+
"""
|
|
45
|
+
return super().boundary_type.name.lower()
|
|
46
|
+
|
|
47
|
+
@boundary_type.setter
|
|
48
|
+
def boundary_type(self, value):
|
|
49
|
+
if value == "voltage_source":
|
|
50
|
+
value = GrpcBoundaryType.VOLTAGE_SOURCE
|
|
51
|
+
if value == "current_source":
|
|
52
|
+
value = GrpcBoundaryType.CURRENT_SOURCE
|
|
53
|
+
if value == "port":
|
|
54
|
+
value = GrpcBoundaryType.PORT
|
|
55
|
+
if value == "voltage_probe":
|
|
56
|
+
value = GrpcBoundaryType.VOLTAGE_PROBE
|
|
57
|
+
super(PinGroupTerminal, self.__class__).boundary_type.__set__(self, value)
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def magnitude(self):
|
|
61
|
+
"""Source magnitude.
|
|
62
|
+
|
|
63
|
+
Returns
|
|
64
|
+
-------
|
|
65
|
+
float : magnitude value.
|
|
66
|
+
|
|
67
|
+
"""
|
|
68
|
+
return self.source_amplitude
|
|
69
|
+
|
|
70
|
+
@magnitude.setter
|
|
71
|
+
def magnitude(self, value):
|
|
72
|
+
self.source_amplitude = value
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def phase(self):
|
|
76
|
+
"""Source phase.
|
|
77
|
+
|
|
78
|
+
Returns
|
|
79
|
+
-------
|
|
80
|
+
float : phase value.
|
|
81
|
+
|
|
82
|
+
"""
|
|
83
|
+
return self.source_phase
|
|
84
|
+
|
|
85
|
+
@phase.setter
|
|
86
|
+
def phase(self, value):
|
|
87
|
+
self.source_phase = value
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def source_amplitude(self):
|
|
91
|
+
"""Source amplitude.
|
|
92
|
+
|
|
93
|
+
Returns
|
|
94
|
+
-------
|
|
95
|
+
float : source magnitude.
|
|
96
|
+
|
|
97
|
+
"""
|
|
98
|
+
return super().source_amplitude
|
|
99
|
+
|
|
100
|
+
@source_amplitude.setter
|
|
101
|
+
def source_amplitude(self, value):
|
|
102
|
+
super(PinGroupTerminal, self.__class__).source_amplitude.__set__(self, value)
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def source_phase(self):
|
|
106
|
+
"""Source phase.
|
|
107
|
+
|
|
108
|
+
Returns
|
|
109
|
+
-------
|
|
110
|
+
foat : source phase.
|
|
111
|
+
|
|
112
|
+
"""
|
|
113
|
+
return super().source_amplitude.value
|
|
114
|
+
|
|
115
|
+
@source_phase.setter
|
|
116
|
+
def source_phase(self, value):
|
|
117
|
+
super(PinGroupTerminal, self.__class__).source_phase.__set__(self, value)
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def impedance(self):
|
|
121
|
+
"""Terminal impedance.
|
|
122
|
+
|
|
123
|
+
Returns
|
|
124
|
+
-------
|
|
125
|
+
float : terminal impedance.
|
|
126
|
+
|
|
127
|
+
"""
|
|
128
|
+
return super().impedance.value
|
|
129
|
+
|
|
130
|
+
@impedance.setter
|
|
131
|
+
def impedance(self, value):
|
|
132
|
+
super(PinGroupTerminal, self.__class__).impedance.__set__(self, value)
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def net(self):
|
|
136
|
+
"""Terminal net.
|
|
137
|
+
|
|
138
|
+
Returns
|
|
139
|
+
-------
|
|
140
|
+
:class:`Net <pyedb.grpc.database.net.net.Net>`
|
|
141
|
+
Terminal Net object.
|
|
142
|
+
|
|
143
|
+
"""
|
|
144
|
+
return Net(self._pedb, super().net)
|
|
145
|
+
|
|
146
|
+
@net.setter
|
|
147
|
+
def net(self, value):
|
|
148
|
+
super(PinGroupTerminal, self.__class__).net.__set__(self, value)
|
|
149
|
+
|
|
150
|
+
@property
|
|
151
|
+
def pin_group(self):
|
|
152
|
+
"""Pingroup.
|
|
153
|
+
|
|
154
|
+
Returns
|
|
155
|
+
-------
|
|
156
|
+
:class:`PinGroup <pyedb.grpc.database.hierarchy.pingroup.PinGroup>`
|
|
157
|
+
Terminal pingroup.
|
|
158
|
+
|
|
159
|
+
"""
|
|
160
|
+
from pyedb.grpc.database.hierarchy.pingroup import PinGroup
|
|
161
|
+
|
|
162
|
+
return PinGroup(self._pedb, super().pin_group)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 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
|
+
|
|
23
|
+
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
24
|
+
from ansys.edb.core.terminal.terminals import PointTerminal as GrpcPointTerminal
|
|
25
|
+
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class PointTerminal(GrpcPointTerminal):
|
|
29
|
+
"""Manages point terminal properties."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, pedb, edb_object):
|
|
32
|
+
super().__init__(edb_object.msg)
|
|
33
|
+
self._pedb = pedb
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def location(self):
|
|
37
|
+
"""Terminal position.
|
|
38
|
+
|
|
39
|
+
Returns
|
|
40
|
+
-------
|
|
41
|
+
[float, float] : [x,y]
|
|
42
|
+
|
|
43
|
+
"""
|
|
44
|
+
return [self.point.x.value, self.point.y.value]
|
|
45
|
+
|
|
46
|
+
@location.setter
|
|
47
|
+
def location(self, value):
|
|
48
|
+
if not isinstance(value, list):
|
|
49
|
+
return
|
|
50
|
+
value = [GrpcValue(i) for i in value]
|
|
51
|
+
self.point = GrpcPointData(value)
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def layer(self):
|
|
55
|
+
"""Terminal layer.
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
:class:`StackupLayer <pyedb.grpc.database.layers.stackup_layer.StackupLayer>`
|
|
60
|
+
|
|
61
|
+
"""
|
|
62
|
+
from pyedb.grpc.database.layers.stackup_layer import StackupLayer
|
|
63
|
+
|
|
64
|
+
return StackupLayer(self._pedb, super().layer)
|
|
65
|
+
|
|
66
|
+
@layer.setter
|
|
67
|
+
def layer(self, value):
|
|
68
|
+
if value in self._pedb.stackup.layers:
|
|
69
|
+
super(PointTerminal, self.__class__).layer.__set__(self, value)
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def ref_terminal(self):
|
|
73
|
+
"""Reference terminal.
|
|
74
|
+
|
|
75
|
+
Returns
|
|
76
|
+
-------
|
|
77
|
+
:class:`PointTerminal <pyedb.grpc.database.terminal.point_terminal.PointTerminal>`
|
|
78
|
+
|
|
79
|
+
"""
|
|
80
|
+
return PointTerminal(self._pedb, self.reference_terminal)
|
|
81
|
+
|
|
82
|
+
@ref_terminal.setter
|
|
83
|
+
def ref_terminal(self, value):
|
|
84
|
+
super().reference_terminal = value
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def reference_terminal(self):
|
|
88
|
+
"""Reference terminal.
|
|
89
|
+
|
|
90
|
+
Returns
|
|
91
|
+
-------
|
|
92
|
+
:class:`PointTerminal <pyedb.grpc.database.terminal.point_terminal.PointTerminal>`
|
|
93
|
+
|
|
94
|
+
"""
|
|
95
|
+
return PointTerminal(self._pedb, super().reference_terminal)
|
|
96
|
+
|
|
97
|
+
@reference_terminal.setter
|
|
98
|
+
def reference_terminal(self, value):
|
|
99
|
+
super(PointTerminal, self.__class__).reference_terminal.__set__(self, value)
|