pyedb 0.53.0__py3-none-any.whl → 0.55.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 -8
- pyedb/configuration/cfg_boundaries.py +69 -151
- pyedb/configuration/cfg_components.py +201 -460
- pyedb/configuration/cfg_data.py +4 -2
- pyedb/configuration/cfg_general.py +13 -36
- pyedb/configuration/cfg_modeler.py +2 -1
- pyedb/configuration/cfg_nets.py +21 -35
- pyedb/configuration/cfg_operations.py +22 -151
- pyedb/configuration/cfg_package_definition.py +56 -112
- pyedb/configuration/cfg_padstacks.py +292 -688
- pyedb/configuration/cfg_pin_groups.py +32 -79
- pyedb/configuration/cfg_ports_sources.py +20 -9
- pyedb/configuration/cfg_s_parameter_models.py +67 -172
- pyedb/configuration/cfg_setup.py +102 -295
- pyedb/configuration/configuration.py +66 -6
- pyedb/dotnet/database/cell/connectable.py +38 -9
- pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +64 -3
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +6 -8
- pyedb/dotnet/database/cell/primitive/primitive.py +10 -31
- pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
- 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 +26 -28
- pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
- pyedb/dotnet/database/components.py +99 -91
- pyedb/dotnet/database/definition/component_def.py +4 -4
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +2 -3
- pyedb/dotnet/database/dotnet/database.py +27 -218
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/control_file.py +5 -5
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +35 -35
- pyedb/dotnet/database/edb_data/padstacks_data.py +65 -90
- pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +8 -4
- pyedb/dotnet/database/geometry/point_data.py +14 -10
- pyedb/dotnet/database/geometry/polygon_data.py +3 -5
- pyedb/dotnet/database/hfss.py +50 -52
- pyedb/dotnet/database/layout_validation.py +14 -11
- pyedb/dotnet/database/materials.py +10 -11
- pyedb/dotnet/database/modeler.py +104 -101
- pyedb/dotnet/database/nets.py +20 -23
- pyedb/dotnet/database/padstack.py +156 -84
- pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
- pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
- pyedb/dotnet/database/siwave.py +47 -47
- pyedb/dotnet/database/stackup.py +152 -87
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +3 -3
- pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +248 -170
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/design_types.py +68 -21
- pyedb/generic/general_methods.py +0 -120
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +75 -19
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +55 -17
- pyedb/grpc/database/control_file.py +5 -5
- pyedb/grpc/database/definition/materials.py +24 -31
- pyedb/grpc/database/definition/package_def.py +18 -18
- pyedb/grpc/database/definition/padstack_def.py +104 -51
- pyedb/grpc/database/geometry/arc_data.py +7 -5
- pyedb/grpc/database/geometry/point_3d_data.py +8 -7
- pyedb/grpc/database/geometry/polygon_data.py +4 -3
- pyedb/grpc/database/hierarchy/component.py +43 -38
- pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
- pyedb/grpc/database/hierarchy/pingroup.py +9 -9
- pyedb/grpc/database/layers/stackup_layer.py +45 -44
- pyedb/grpc/database/layout/layout.py +17 -13
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +16 -15
- pyedb/grpc/database/modeler.py +60 -58
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +112 -31
- pyedb/grpc/database/padstacks.py +303 -190
- pyedb/grpc/database/ports/ports.py +5 -6
- pyedb/grpc/database/primitive/bondwire.py +8 -7
- pyedb/grpc/database/primitive/circle.py +4 -4
- pyedb/grpc/database/primitive/padstack_instance.py +191 -23
- pyedb/grpc/database/primitive/path.py +7 -7
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +13 -17
- pyedb/grpc/database/primitive/rectangle.py +13 -13
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +31 -25
- pyedb/grpc/database/source_excitations.py +335 -233
- pyedb/grpc/database/stackup.py +165 -148
- pyedb/grpc/database/terminal/bundle_terminal.py +18 -8
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +16 -5
- pyedb/grpc/database/terminal/pingroup_terminal.py +12 -11
- pyedb/grpc/database/terminal/point_terminal.py +4 -3
- pyedb/grpc/database/terminal/terminal.py +9 -9
- pyedb/grpc/database/utility/value.py +109 -0
- pyedb/grpc/database/utility/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +130 -63
- pyedb/grpc/edb_init.py +3 -10
- pyedb/grpc/rpc_session.py +10 -10
- pyedb/libraries/common.py +366 -0
- pyedb/libraries/rf_libraries/base_functions.py +1358 -0
- pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
- pyedb/misc/decorators.py +61 -0
- pyedb/misc/misc.py +0 -13
- pyedb/siwave.py +2 -2
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +2 -3
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +119 -112
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -21,22 +21,9 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
"""Database."""
|
|
24
|
-
import os
|
|
25
24
|
import re
|
|
26
|
-
import sys
|
|
27
|
-
import warnings
|
|
28
25
|
|
|
29
|
-
from pyedb import __version__
|
|
30
26
|
from pyedb.dotnet.database.general import convert_py_list_to_net_list
|
|
31
|
-
from pyedb.generic.general_methods import (
|
|
32
|
-
env_path,
|
|
33
|
-
env_path_student,
|
|
34
|
-
env_value,
|
|
35
|
-
is_linux,
|
|
36
|
-
settings,
|
|
37
|
-
)
|
|
38
|
-
from pyedb.generic.grpc_warnings import GRPC_GENERAL_WARNING
|
|
39
|
-
from pyedb.misc.misc import list_installed_ansysem
|
|
40
27
|
|
|
41
28
|
|
|
42
29
|
class HierarchyDotNet:
|
|
@@ -53,8 +40,8 @@ class HierarchyDotNet:
|
|
|
53
40
|
|
|
54
41
|
def __init__(self, app):
|
|
55
42
|
self._app = app
|
|
56
|
-
self.
|
|
57
|
-
self._hierarchy = self.
|
|
43
|
+
self.core = self._app._edb
|
|
44
|
+
self._hierarchy = self.core.Cell.Hierarchy
|
|
58
45
|
|
|
59
46
|
@property
|
|
60
47
|
def api_class(self): # pragma: no cover
|
|
@@ -91,8 +78,8 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
91
78
|
|
|
92
79
|
def __init__(self, pedb, api_object=None):
|
|
93
80
|
self._pedb = pedb
|
|
94
|
-
self.dotnetobj = pedb.
|
|
95
|
-
self.
|
|
81
|
+
self.dotnetobj = pedb.core.Geometry.PolygonData
|
|
82
|
+
self.core = api_object
|
|
96
83
|
self._edb_object = api_object
|
|
97
84
|
|
|
98
85
|
@property
|
|
@@ -103,7 +90,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
103
90
|
@property
|
|
104
91
|
def arcs(self): # pragma: no cover
|
|
105
92
|
"""List of Edb.Geometry.ArcData."""
|
|
106
|
-
return list(self.
|
|
93
|
+
return list(self.core.GetArcData())
|
|
107
94
|
|
|
108
95
|
def add_point(self, x, y, incremental=False):
|
|
109
96
|
"""Add a point at the end of the point list of the polygon.
|
|
@@ -129,7 +116,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
129
116
|
last_point = self.get_points()[-1]
|
|
130
117
|
x = "({})+({})".format(x, last_point[0].ToString())
|
|
131
118
|
y = "({})+({})".format(y, last_point[1].ToString())
|
|
132
|
-
return self.
|
|
119
|
+
return self.core.AddPoint(GeometryDotNet(self._pedb).point_data(x, y))
|
|
133
120
|
|
|
134
121
|
def get_bbox_of_boxes(self, points):
|
|
135
122
|
"""Get the EDB .NET API ``Edb.Geometry.GetBBoxOfBoxes`` database.
|
|
@@ -162,9 +149,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
162
149
|
from pyedb.dotnet.clr_module import Tuple
|
|
163
150
|
|
|
164
151
|
if isinstance(points, (tuple, list)):
|
|
165
|
-
points = Tuple[self._pedb.
|
|
166
|
-
points[0], points[1]
|
|
167
|
-
)
|
|
152
|
+
points = Tuple[self._pedb.core.Geometry.PointData, self._pedb.core.Geometry.PointData](points[0], points[1])
|
|
168
153
|
return self.dotnetobj.CreateFromBBox(points)
|
|
169
154
|
|
|
170
155
|
def create_from_arcs(self, arcs, flag):
|
|
@@ -212,7 +197,7 @@ class NetDotNet:
|
|
|
212
197
|
def __init__(self, app, net_obj=None):
|
|
213
198
|
self.net = app._edb.Cell.Net
|
|
214
199
|
|
|
215
|
-
self.
|
|
200
|
+
self.core = app._edb
|
|
216
201
|
self._app = app
|
|
217
202
|
self.net_obj = net_obj
|
|
218
203
|
|
|
@@ -283,7 +268,7 @@ class NetClassDotNet:
|
|
|
283
268
|
def __init__(self, app, api_object=None):
|
|
284
269
|
self.cell_net_class = app._edb.Cell.NetClass
|
|
285
270
|
self.api_object = api_object
|
|
286
|
-
self.
|
|
271
|
+
self.core = app._edb
|
|
287
272
|
self._app = app
|
|
288
273
|
|
|
289
274
|
@property
|
|
@@ -319,7 +304,7 @@ class NetClassDotNet:
|
|
|
319
304
|
object
|
|
320
305
|
"""
|
|
321
306
|
if self.api_object:
|
|
322
|
-
edb_api_net = self.
|
|
307
|
+
edb_api_net = self.core.Cell.Net.FindByName(self._app.active_layout, name)
|
|
323
308
|
return self.api_object.AddNet(edb_api_net)
|
|
324
309
|
|
|
325
310
|
def delete(self): # pragma: no cover
|
|
@@ -379,8 +364,8 @@ class DifferentialPairDotNet(NetClassDotNet):
|
|
|
379
364
|
return DifferentialPairDotNet(self._app, self.cell_diff_pair.Create(self._app.active_layout, name))
|
|
380
365
|
|
|
381
366
|
def _api_set_differential_pair(self, net_name_p, net_name_n):
|
|
382
|
-
edb_api_net_p = self.
|
|
383
|
-
edb_api_net_n = self.
|
|
367
|
+
edb_api_net_p = self.core.Cell.Net.FindByName(self._app.active_layout, net_name_p)
|
|
368
|
+
edb_api_net_n = self.core.Cell.Net.FindByName(self._app.active_layout, net_name_n)
|
|
384
369
|
self.api_object.SetDifferentialPair(edb_api_net_p, edb_api_net_n)
|
|
385
370
|
|
|
386
371
|
@property
|
|
@@ -416,8 +401,8 @@ class CellClassDotNet:
|
|
|
416
401
|
|
|
417
402
|
def __init__(self, app, active_cell=None):
|
|
418
403
|
self._app = app
|
|
419
|
-
self.
|
|
420
|
-
self._cell = self.
|
|
404
|
+
self.core = app._edb
|
|
405
|
+
self._cell = self.core.Cell
|
|
421
406
|
self._active_cell = active_cell
|
|
422
407
|
|
|
423
408
|
@property
|
|
@@ -519,7 +504,7 @@ class UtilityDotNet:
|
|
|
519
504
|
def __init__(self, app):
|
|
520
505
|
self._app = app
|
|
521
506
|
self.utility = app._edb.Utility
|
|
522
|
-
self.
|
|
507
|
+
self.core = app._edb
|
|
523
508
|
self.active_db = app._db
|
|
524
509
|
self.active_cell = app._active_cell
|
|
525
510
|
|
|
@@ -567,7 +552,7 @@ class GeometryDotNet:
|
|
|
567
552
|
def __init__(self, app):
|
|
568
553
|
self._app = app
|
|
569
554
|
self.geometry = self._app._edb.Geometry
|
|
570
|
-
self.
|
|
555
|
+
self.core = self._app._edb
|
|
571
556
|
|
|
572
557
|
@property
|
|
573
558
|
def api_class(self):
|
|
@@ -648,29 +633,24 @@ class CellDotNet:
|
|
|
648
633
|
return super().__getattribute__(key)
|
|
649
634
|
except AttributeError:
|
|
650
635
|
try:
|
|
651
|
-
return getattr(self.
|
|
636
|
+
return getattr(self.core, key)
|
|
652
637
|
except AttributeError:
|
|
653
638
|
raise AttributeError("Attribute not present")
|
|
654
639
|
|
|
655
640
|
def __init__(self, app):
|
|
656
641
|
self._app = app
|
|
657
|
-
self.
|
|
658
|
-
|
|
659
|
-
@property
|
|
660
|
-
def api_class(self):
|
|
661
|
-
"""Return Ansys.Ansoft.Edb class object."""
|
|
662
|
-
return self.edb_api
|
|
642
|
+
self.core = app._edb
|
|
663
643
|
|
|
664
644
|
@property
|
|
665
645
|
def definition(self):
|
|
666
646
|
"""Edb Dotnet Api Definition."""
|
|
667
647
|
|
|
668
|
-
return self.
|
|
648
|
+
return self.core.Definition
|
|
669
649
|
|
|
670
650
|
@property
|
|
671
651
|
def database(self):
|
|
672
652
|
"""Edb Dotnet Api Database."""
|
|
673
|
-
return self.
|
|
653
|
+
return self.core.Database
|
|
674
654
|
|
|
675
655
|
@property
|
|
676
656
|
def cell(self):
|
|
@@ -701,189 +681,18 @@ class CellDotNet:
|
|
|
701
681
|
return GeometryDotNet(self._app)
|
|
702
682
|
|
|
703
683
|
|
|
704
|
-
class
|
|
705
|
-
"""
|
|
706
|
-
|
|
707
|
-
def __init__(self, edbversion, student_version=False):
|
|
708
|
-
if not edbversion: # pragma: no cover
|
|
709
|
-
try:
|
|
710
|
-
edbversion = "20{}.{}".format(list_installed_ansysem()[0][-3:-1], list_installed_ansysem()[0][-1:])
|
|
711
|
-
self._logger.info("Edb version " + edbversion)
|
|
712
|
-
except IndexError:
|
|
713
|
-
raise Exception("No ANSYSEM_ROOTxxx is found.")
|
|
714
|
-
self.edbversion = edbversion
|
|
715
|
-
if float(self.edbversion) >= 2025.2:
|
|
716
|
-
warnings.warn(GRPC_GENERAL_WARNING, UserWarning)
|
|
717
|
-
self.student_version = student_version
|
|
718
|
-
"""Initialize DLLs."""
|
|
719
|
-
from pyedb.dotnet.clr_module import _clr, edb_initialized
|
|
720
|
-
|
|
721
|
-
if not settings.use_pyaedt_log:
|
|
722
|
-
if settings.enable_screen_logs:
|
|
723
|
-
self._logger.enable_stdout_log()
|
|
724
|
-
else: # pragma: no cover
|
|
725
|
-
self._logger.disable_stdout_log()
|
|
726
|
-
if not edb_initialized: # pragma: no cover
|
|
727
|
-
self._logger.error("Failed to initialize Dlls.")
|
|
728
|
-
return
|
|
729
|
-
self._logger.info("Logger is initialized in EDB.")
|
|
730
|
-
self._logger.info("legacy v%s", __version__)
|
|
731
|
-
self._logger.info("Python version %s", sys.version)
|
|
732
|
-
if is_linux: # pragma: no cover
|
|
733
|
-
if env_value(self.edbversion) in os.environ or settings.edb_dll_path:
|
|
734
|
-
if settings.edb_dll_path:
|
|
735
|
-
self.base_path = settings.edb_dll_path
|
|
736
|
-
else:
|
|
737
|
-
self.base_path = env_path(self.edbversion)
|
|
738
|
-
sys.path.append(self.base_path)
|
|
739
|
-
else:
|
|
740
|
-
main = sys.modules["__main__"]
|
|
741
|
-
if "oDesktop" in dir(main):
|
|
742
|
-
self.base_path = main.oDesktop.GetExeDir()
|
|
743
|
-
sys.path.append(main.oDesktop.GetExeDir())
|
|
744
|
-
os.environ[env_value(self.edbversion)] = self.base_path
|
|
745
|
-
else:
|
|
746
|
-
edb_path = os.getenv("PYAEDT_SERVER_AEDT_PATH")
|
|
747
|
-
if edb_path:
|
|
748
|
-
self.base_path = edb_path
|
|
749
|
-
sys.path.append(edb_path)
|
|
750
|
-
os.environ[env_value(self.edbversion)] = self.base_path
|
|
751
|
-
|
|
752
|
-
_clr.AddReference("Ansys.Ansoft.Edb")
|
|
753
|
-
_clr.AddReference("Ansys.Ansoft.EdbBuilderUtils")
|
|
754
|
-
_clr.AddReference("Ansys.Ansoft.SimSetupData")
|
|
755
|
-
else:
|
|
756
|
-
if settings.edb_dll_path:
|
|
757
|
-
self.base_path = settings.edb_dll_path
|
|
758
|
-
elif self.student_version:
|
|
759
|
-
self.base_path = env_path_student(self.edbversion)
|
|
760
|
-
else:
|
|
761
|
-
self.base_path = env_path(self.edbversion)
|
|
762
|
-
sys.path.append(self.base_path)
|
|
763
|
-
_clr.AddReference("Ansys.Ansoft.Edb")
|
|
764
|
-
_clr.AddReference("Ansys.Ansoft.EdbBuilderUtils")
|
|
765
|
-
_clr.AddReference("Ansys.Ansoft.SimSetupData")
|
|
766
|
-
os.environ["ECAD_TRANSLATORS_INSTALL_DIR"] = self.base_path
|
|
767
|
-
oaDirectory = os.path.join(self.base_path, "common", "oa")
|
|
768
|
-
os.environ["ANSYS_OADIR"] = oaDirectory
|
|
769
|
-
os.environ["PATH"] = "{};{}".format(os.environ["PATH"], self.base_path)
|
|
770
|
-
edb = __import__("Ansys.Ansoft.Edb")
|
|
771
|
-
self._edb = edb.Ansoft.Edb
|
|
772
|
-
edbbuilder = __import__("Ansys.Ansoft.EdbBuilderUtils")
|
|
773
|
-
self.edbutils = edbbuilder.Ansoft.EdbBuilderUtils
|
|
774
|
-
self.simSetup = __import__("Ansys.Ansoft.SimSetupData")
|
|
775
|
-
self.simsetupdata = self.simSetup.Ansoft.SimSetupData.Data
|
|
776
|
-
|
|
777
|
-
@property
|
|
778
|
-
def student_version(self):
|
|
779
|
-
"""Set the student version flag."""
|
|
780
|
-
return self._student_version
|
|
781
|
-
|
|
782
|
-
@student_version.setter
|
|
783
|
-
def student_version(self, value):
|
|
784
|
-
self._student_version = value
|
|
785
|
-
|
|
786
|
-
@property
|
|
787
|
-
def logger(self):
|
|
788
|
-
"""Logger for EDB.
|
|
789
|
-
|
|
790
|
-
Returns
|
|
791
|
-
-------
|
|
792
|
-
:class:`pyedb.edb_logger.EDBLogger`
|
|
793
|
-
"""
|
|
794
|
-
return self._logger
|
|
795
|
-
|
|
796
|
-
@property
|
|
797
|
-
def edb_api(self):
|
|
798
|
-
"""Edb Dotnet Api class.
|
|
799
|
-
|
|
800
|
-
Returns
|
|
801
|
-
-------
|
|
802
|
-
:class:`pyedb.dotnet.database.dotnet.database.CellDotNet`
|
|
803
|
-
"""
|
|
804
|
-
return CellDotNet(self)
|
|
684
|
+
class Database:
|
|
685
|
+
"""Class representing a database object."""
|
|
805
686
|
|
|
806
687
|
@property
|
|
807
688
|
def database(self):
|
|
808
689
|
"""Edb Dotnet Api Database."""
|
|
809
|
-
return self.
|
|
690
|
+
return self.core.database
|
|
810
691
|
|
|
811
692
|
@property
|
|
812
693
|
def definition(self):
|
|
813
694
|
"""Edb Dotnet Api Database `Edb.Definition`."""
|
|
814
|
-
return self.
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
class Database(EdbDotNet):
|
|
818
|
-
"""Class representing a database object."""
|
|
819
|
-
|
|
820
|
-
def __init__(self, edbversion, student_version=False):
|
|
821
|
-
"""Initialize a new Database."""
|
|
822
|
-
EdbDotNet.__init__(self, edbversion=edbversion, student_version=student_version)
|
|
823
|
-
self._db = None
|
|
824
|
-
|
|
825
|
-
@property
|
|
826
|
-
def api_class(self):
|
|
827
|
-
"""Return Ansys.Ansoft.Edb class object."""
|
|
828
|
-
return self._edb
|
|
829
|
-
|
|
830
|
-
@property
|
|
831
|
-
def api_object(self):
|
|
832
|
-
"""Return Ansys.Ansoft.Edb object."""
|
|
833
|
-
return self._db
|
|
834
|
-
|
|
835
|
-
@property
|
|
836
|
-
def db(self):
|
|
837
|
-
"""Active database object."""
|
|
838
|
-
return self._db
|
|
839
|
-
|
|
840
|
-
def run_as_standalone(self, flag):
|
|
841
|
-
"""Set if Edb is run as standalone or embedded in AEDT.
|
|
842
|
-
|
|
843
|
-
Parameters
|
|
844
|
-
----------
|
|
845
|
-
flag : bool
|
|
846
|
-
Whether if Edb is run as standalone or embedded in AEDT.
|
|
847
|
-
"""
|
|
848
|
-
self.edb_api.database.SetRunAsStandAlone(flag)
|
|
849
|
-
|
|
850
|
-
def create(self, db_path):
|
|
851
|
-
"""Create a Database at the specified file location.
|
|
852
|
-
|
|
853
|
-
Parameters
|
|
854
|
-
----------
|
|
855
|
-
db_path : str
|
|
856
|
-
Path to top-level database folder
|
|
857
|
-
|
|
858
|
-
Returns
|
|
859
|
-
-------
|
|
860
|
-
Database
|
|
861
|
-
"""
|
|
862
|
-
self._db = self.edb_api.database.Create(db_path)
|
|
863
|
-
return self._db
|
|
864
|
-
|
|
865
|
-
def open(self, db_path, read_only):
|
|
866
|
-
"""Open an existing Database at the specified file location.
|
|
867
|
-
|
|
868
|
-
Parameters
|
|
869
|
-
----------
|
|
870
|
-
db_path : str
|
|
871
|
-
Path to top-level Database folder.
|
|
872
|
-
read_only : bool
|
|
873
|
-
Obtain read-only access.
|
|
874
|
-
|
|
875
|
-
Returns
|
|
876
|
-
-------
|
|
877
|
-
Database or None
|
|
878
|
-
The opened Database object, or None if not found.
|
|
879
|
-
"""
|
|
880
|
-
self._db = self.edb_api.database.Open(
|
|
881
|
-
db_path,
|
|
882
|
-
read_only,
|
|
883
|
-
)
|
|
884
|
-
if self._db.IsNull():
|
|
885
|
-
raise AttributeError(f"Failed to open edb file {db_path}")
|
|
886
|
-
return self._db
|
|
695
|
+
return self.core.Definition
|
|
887
696
|
|
|
888
697
|
def delete(self, db_path):
|
|
889
698
|
"""Delete a database at the specified file location.
|
|
@@ -893,7 +702,7 @@ class Database(EdbDotNet):
|
|
|
893
702
|
db_path : str
|
|
894
703
|
Path to top-level database folder.
|
|
895
704
|
"""
|
|
896
|
-
return self.
|
|
705
|
+
return self.core.database.Delete(db_path)
|
|
897
706
|
|
|
898
707
|
def save(self):
|
|
899
708
|
"""Save any changes into a file."""
|
|
@@ -972,7 +781,7 @@ class Database(EdbDotNet):
|
|
|
972
781
|
Database
|
|
973
782
|
The Database or Null on failure.
|
|
974
783
|
"""
|
|
975
|
-
self.
|
|
784
|
+
self.core.database.FindById(db_id)
|
|
976
785
|
|
|
977
786
|
def save_as(self, path, version=""):
|
|
978
787
|
"""Save this Database to a new location and older EDB version.
|
|
@@ -1232,5 +1041,5 @@ class Database(EdbDotNet):
|
|
|
1232
1041
|
from pyedb.dotnet.clr_module import Convert
|
|
1233
1042
|
|
|
1234
1043
|
hdl = Convert.ToUInt64(hdb)
|
|
1235
|
-
self._db = self.
|
|
1044
|
+
self._db = self.core.database.Attach(hdl)
|
|
1236
1045
|
return self._db
|
|
@@ -56,7 +56,7 @@ class PrimitiveDotNet:
|
|
|
56
56
|
def __init__(self, api, prim_object=None):
|
|
57
57
|
self._app = api
|
|
58
58
|
self.api = api._edb.Cell.Primitive
|
|
59
|
-
self.
|
|
59
|
+
self.core = api._edb
|
|
60
60
|
self.prim_obj = prim_object
|
|
61
61
|
self._edb_object = prim_object
|
|
62
62
|
|
|
@@ -133,7 +133,7 @@ class PrimitiveDotNet:
|
|
|
133
133
|
if _poly is None or _poly.IsNull() or _poly is False:
|
|
134
134
|
self._logger.error("Failed to create void polygon data")
|
|
135
135
|
return False
|
|
136
|
-
point_list = self._app.
|
|
136
|
+
point_list = self._app.core.Cell.primitive.polygon.create(
|
|
137
137
|
self._app.active_layout, self.layer_name, self.prim_obj.GetNet(), _poly
|
|
138
138
|
).prim_obj
|
|
139
139
|
elif "prim_obj" in dir(point_list):
|
|
@@ -340,7 +340,7 @@ class PrimitiveDotNet:
|
|
|
340
340
|
maximum_corner_extension : float, optional
|
|
341
341
|
The maximum corner extension (when round corners are not used) at which point the corner is clipped.
|
|
342
342
|
"""
|
|
343
|
-
new_poly = self.polygon_data.
|
|
343
|
+
new_poly = self.polygon_data.core.Expand(offset, tolerance, round_corners, maximum_corner_extension)
|
|
344
344
|
self.polygon_data = new_poly[0]
|
|
345
345
|
return True
|
|
346
346
|
|
|
@@ -361,9 +361,9 @@ class PrimitiveDotNet:
|
|
|
361
361
|
"""
|
|
362
362
|
if not isinstance(factor, str):
|
|
363
363
|
factor = float(factor)
|
|
364
|
-
polygon_data = self.polygon_data.create_from_arcs(self.polygon_data.
|
|
364
|
+
polygon_data = self.polygon_data.create_from_arcs(self.polygon_data.core.GetArcData(), True)
|
|
365
365
|
if not center:
|
|
366
|
-
center = self.polygon_data.
|
|
366
|
+
center = self.polygon_data.core.GetBoundingCircleCenter()
|
|
367
367
|
if center:
|
|
368
368
|
polygon_data.Scale(factor, center)
|
|
369
369
|
self.polygon_data = polygon_data
|
|
@@ -422,15 +422,15 @@ class RectangleDotNet(PrimitiveDotNet):
|
|
|
422
422
|
net = net.api_object
|
|
423
423
|
if isinstance(rep_type, int):
|
|
424
424
|
if rep_type == 1:
|
|
425
|
-
rep_type = self.
|
|
425
|
+
rep_type = self.core.Cell.primitive.RectangleRepresentationType.CenterWidthHeight
|
|
426
426
|
else:
|
|
427
|
-
rep_type = self.
|
|
428
|
-
param1 = self._app.
|
|
429
|
-
param2 = self._app.
|
|
430
|
-
param3 = self._app.
|
|
431
|
-
param4 = self._app.
|
|
432
|
-
corner_rad = self._app.
|
|
433
|
-
rotation = self._app.
|
|
427
|
+
rep_type = self.core.Cell.primitive.RectangleRepresentationType.LowerLeftUpperRight
|
|
428
|
+
param1 = self._app.core.utility.value(param1)
|
|
429
|
+
param2 = self._app.core.utility.value(param2)
|
|
430
|
+
param3 = self._app.core.utility.value(param3)
|
|
431
|
+
param4 = self._app.core.utility.value(param4)
|
|
432
|
+
corner_rad = self._app.core.utility.value(corner_rad)
|
|
433
|
+
rotation = self._app.core.utility.value(rotation)
|
|
434
434
|
return RectangleDotNet(
|
|
435
435
|
self._app,
|
|
436
436
|
self.api.Rectangle.Create(
|
|
@@ -742,10 +742,10 @@ class PathDotNet(PrimitiveDotNet):
|
|
|
742
742
|
"""
|
|
743
743
|
if isinstance(net, NetDotNet):
|
|
744
744
|
net = net.api_object
|
|
745
|
-
width = self._app.
|
|
745
|
+
width = self._app.core.utility.value(width)
|
|
746
746
|
if isinstance(points, list):
|
|
747
747
|
points = convert_py_list_to_net_list([self._app.point_data(i[0], i[1]) for i in points])
|
|
748
|
-
points = self._app.
|
|
748
|
+
points = self._app.core.geometry.polygon_data.dotnetobj(points)
|
|
749
749
|
return PathDotNet(
|
|
750
750
|
self._app, self.api.Path.Create(layout, layer, net, width, end_cap1, end_cap2, corner_style, points)
|
|
751
751
|
)
|
|
@@ -1501,7 +1501,7 @@ class BoardBendDef(PrimitiveDotNet):
|
|
|
1501
1501
|
|
|
1502
1502
|
Read-Only.
|
|
1503
1503
|
"""
|
|
1504
|
-
return cast(self.
|
|
1504
|
+
return cast(self.core, self.prim_obj.GetBoundaryPrim())
|
|
1505
1505
|
|
|
1506
1506
|
@property
|
|
1507
1507
|
def bend_middle(self):
|
|
@@ -27,8 +27,8 @@ import subprocess
|
|
|
27
27
|
import sys
|
|
28
28
|
import xml
|
|
29
29
|
|
|
30
|
-
from pyedb.edb_logger import pyedb_logger
|
|
31
30
|
from pyedb.generic.general_methods import ET, env_path, env_value, is_linux
|
|
31
|
+
from pyedb.generic.settings import settings
|
|
32
32
|
from pyedb.misc.aedtlib_personalib_install import write_pretty_xml
|
|
33
33
|
from pyedb.misc.misc import list_installed_ansysem
|
|
34
34
|
|
|
@@ -57,7 +57,7 @@ def convert_technology_file(tech_file, edbversion=None, control_file=None):
|
|
|
57
57
|
base_path = env_path(edbversion)
|
|
58
58
|
sys.path.append(base_path)
|
|
59
59
|
else:
|
|
60
|
-
|
|
60
|
+
settings.logger.error("No Edb installation found. Check environment variables")
|
|
61
61
|
return False
|
|
62
62
|
os.environ["HELIC_ROOT"] = os.path.join(base_path, "helic")
|
|
63
63
|
if os.getenv("ANSYSLMD_LICENCE_FILE", None) is None:
|
|
@@ -70,7 +70,7 @@ def convert_technology_file(tech_file, edbversion=None, control_file=None):
|
|
|
70
70
|
os.environ["ANSYSLMD_LICENSE_FILE"] = line.split("=")[1]
|
|
71
71
|
break
|
|
72
72
|
else:
|
|
73
|
-
|
|
73
|
+
settings.logger.error("ANSYSLMD_LICENSE_FILE is not defined.")
|
|
74
74
|
vlc_file_name = os.path.splitext(tech_file)[0]
|
|
75
75
|
if not control_file:
|
|
76
76
|
control_file = vlc_file_name + ".xml"
|
|
@@ -104,9 +104,9 @@ def convert_technology_file(tech_file, edbversion=None, control_file=None):
|
|
|
104
104
|
p = subprocess.Popen(command, env=my_env)
|
|
105
105
|
p.wait()
|
|
106
106
|
if os.path.exists(control_file):
|
|
107
|
-
|
|
107
|
+
settings.logger.info("Xml file created.")
|
|
108
108
|
return control_file
|
|
109
|
-
|
|
109
|
+
settings.logger.error("Technology files are supported only in Linux. Use control file instead.")
|
|
110
110
|
return False
|
|
111
111
|
|
|
112
112
|
|
|
@@ -38,14 +38,14 @@ class HfssExtentInfo:
|
|
|
38
38
|
self._pedb = pedb
|
|
39
39
|
|
|
40
40
|
self._hfss_extent_info_type = {
|
|
41
|
-
"bounding_box": self._pedb.
|
|
42
|
-
"conforming": self._pedb.
|
|
43
|
-
"convexHull": self._pedb.
|
|
44
|
-
"polygon": self._pedb.
|
|
41
|
+
"bounding_box": self._pedb.core.Utility.HFSSExtentInfoType.BoundingBox,
|
|
42
|
+
"conforming": self._pedb.core.Utility.HFSSExtentInfoType.Conforming,
|
|
43
|
+
"convexHull": self._pedb.core.Utility.HFSSExtentInfoType.ConvexHull,
|
|
44
|
+
"polygon": self._pedb.core.Utility.HFSSExtentInfoType.Polygon,
|
|
45
45
|
}
|
|
46
46
|
self._open_region_type = {
|
|
47
|
-
"radiation": self._pedb.
|
|
48
|
-
"pml": self._pedb.
|
|
47
|
+
"radiation": self._pedb.core.Utility.OpenRegionType.Radiation,
|
|
48
|
+
"pml": self._pedb.core.Utility.OpenRegionType.PML,
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
def _get_edb_value(self, value):
|