Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Readibility improvements #5544

Merged
merged 8 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/application/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def materials(self):
return self._materials

@property
def setups(self):
def setups(self) -> list[Setup]:
maxcapodi78 marked this conversation as resolved.
Show resolved Hide resolved
"""Setups in the project.

Returns
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/aedt/core/application/analysis_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ def post(self):

Returns
-------
:class:`ansys.aedt.core.visualization.post.post_common_3d.PostProcessor3D` or
:class:`ansys.aedt.core.visualization.post.post_icepak.PostProcessorIcepak`
:class:`ansys.aedt.core.visualization.post.post_common_3d.PostProcessor3D`
PostProcessor object.
"""
if self._post is None and self._odesign:
Expand Down
7 changes: 6 additions & 1 deletion src/ansys/aedt/core/application/analysis_nexxim.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,12 @@ def nominal_sweep(self):

@property
def modeler(self):
"""Modeler object."""
"""Modeler object.

Returns
-------
:class:`ansys.aedt.core.modeler.schematic.ModelerNexxim`
"""
if self._modeler is None and self._odesign:
self.logger.reset_timer()
from ansys.aedt.core.modeler.schematic import ModelerNexxim
Expand Down
7 changes: 4 additions & 3 deletions src/ansys/aedt/core/application/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ def boundaries(self):

Returns
-------
List of :class:`ansys.aedt.core.modules.boundary.BoundaryObject`
List[:class:`ansys.aedt.core.modules.boundary.BoundaryObject`]

"""
bb = []
if self.oboundary and "GetBoundaries" in self.oboundary.__dir__():
Expand Down Expand Up @@ -458,7 +459,7 @@ def boundaries_by_type(self):

Returns
-------
Dictionary of boundaries.
Dict[str, :class:`ansys.aedt.core.modules.boundary.BoundaryObject`]
"""
_dict_out = {}
for bound in self.boundaries:
Expand Down Expand Up @@ -2350,7 +2351,7 @@ def _get_boundaries_data(self):

Returns
-------
[:class:`ansys.aedt.core.modules.boundary.BoundaryObject`]
List[:class:`ansys.aedt.core.modules.boundary.BoundaryObject`]
"""
boundaries = []
if self.design_properties and "BoundarySetup" in self.design_properties:
Expand Down
4 changes: 3 additions & 1 deletion src/ansys/aedt/core/application/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,12 @@ def variables(self):

Returns
-------
dict

dict[str, :class:`ansys.aedt.core.application.variables.Variable`]
Dictionary of the `Variable` objects for each project variable and each
design property in the active design.


References
----------

Expand Down
4 changes: 2 additions & 2 deletions src/ansys/aedt/core/emit.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ def modeler(self):
Returns
-------
ansys.aedt.core.modeler.schematic.ModelerEmit
Design oModeler
:class:`ansys.aedt.core.modeler.schematic.ModelerEmit`
Design oModeler.
"""
return self._modeler

Expand Down
6 changes: 3 additions & 3 deletions src/ansys/aedt/core/generic/ibis_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def insert(self, x, y, angle=0.0):
Returns
-------
:class:`ansys.aedt.core.modeler.Object3d.CircuitComponent`
:class:`ansys.aedt.core.modeler.circuits.object_3d_circuit.CircuitComponent`
Circuit Component Object.
"""
Expand Down Expand Up @@ -455,7 +455,7 @@ def insert(self, x, y, angle=0.0):
Returns
-------
:class:`ansys.aedt.core.modeler.Object3d.CircuitComponent`
:class:`ansys.aedt.core.modeler.circuits.object_3d_circuit.CircuitComponent`
Circuit Component Object.
"""
Expand Down Expand Up @@ -516,7 +516,7 @@ def insert(self, x, y, angle=0.0):
Returns
-------
:class:`ansys.aedt.core.modeler.Object3d.CircuitComponent`
:class:`ansys.aedt.core.modeler.circuits.object_3d_circuit.CircuitComponent`
Circuit Component Object.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/hfss.py
Original file line number Diff line number Diff line change
Expand Up @@ -6071,7 +6071,7 @@ def assign_symmetry(self, assignment, name=None, is_perfect_e=True):
Parameters
----------
assignment : list
List of IDs or :class:`ansys.aedt.core.modeler.Object3d.FacePrimitive`.
List of IDs or :class:`ansys.aedt.core.modeler.cad.elements_3d.FacePrimitive`.
name : str, optional
Name of the boundary.
If a name is not provided, one is automatically generated.
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/hfss3dlayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def create_ports_on_component_by_nets(

Returns
-------
list of :class:`ansys.aedt.core.modules.boundary.BoundaryObject3dLayout`
List[:class:`ansys.aedt.core.modules.boundary.BoundaryObject3dLayout`]
Port Objects when successful.

References
Expand Down
19 changes: 17 additions & 2 deletions src/ansys/aedt/core/icepak.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@ def __init__(
def _init_from_design(self, *args, **kwargs):
self.__init__(*args, **kwargs)

@property
def post(self):
"""PostProcessor.

Returns
-------
:class:`ansys.aedt.core.visualization.post.post_icepak.PostProcessorIcepak`
PostProcessor object.
"""
if self._post is None and self._odesign:
from ansys.aedt.core.visualization.post import post_processor

self._post = post_processor(self)
return self._post

@property
def problem_type(self):
"""Problem type of the Icepak design. Options are ``"TemperatureAndFlow"``, ``"TemperatureOnly"``,
Expand Down Expand Up @@ -444,7 +459,7 @@ def create_source_blocks_from_list(self, list_powers, assign_material=True, defa

Returns
-------
list of :class:`ansys.aedt.core.modules.boundary.BoundaryObject`
List[:class:`ansys.aedt.core.modules.boundary.BoundaryObject`]
List of boundaries inserted.

References
Expand Down Expand Up @@ -895,7 +910,7 @@ def create_network_blocks(

Returns
-------
list of :class:`ansys.aedt.core.modules.boundary.BoundaryObject`
List[:class:`ansys.aedt.core.modules.boundary.BoundaryObject`]
List of boundary objects created.

References
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/aedt/core/modeler/cad/components_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,7 @@ def parts(self):

Returns
-------
dict
:class:`ansys.aedt.core.modeler.Object3d`
Dict[str, :class:`ansys.aedt.core.modeler.cad.object_3d.Object3d`]

"""
if self.is3dcomponent:
Expand Down
22 changes: 11 additions & 11 deletions src/ansys/aedt/core/modeler/cad/elements_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def vertices(self):

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.object_3d.VertexPrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.VertexPrimitive`]
List of vertices.

References
Expand Down Expand Up @@ -516,7 +516,7 @@ def edges(self):

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.object_3d.EdgePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`]
List of Edges.

References
Expand All @@ -536,7 +536,7 @@ def vertices(self):

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.object_3d.VertexPrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.VertexPrimitive`]
List of Vertices.

References
Expand Down Expand Up @@ -680,7 +680,7 @@ def top_edge_z(self):

Returns
-------
:class:`ansys.aedt.core.modeler.cad.object_3d.EdgePrimitive`
:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`

References
----------
Expand All @@ -701,7 +701,7 @@ def bottom_edge_z(self):

Returns
-------
:class:`ansys.aedt.core.modeler.cad.object_3d.EdgePrimitive`
:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`

"""
try:
Expand All @@ -717,7 +717,7 @@ def top_edge_x(self):

Returns
-------
:class:`ansys.aedt.core.modeler.cad.object_3d.EdgePrimitive`
:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`

"""
try:
Expand All @@ -733,7 +733,7 @@ def bottom_edge_x(self):

Returns
-------
:class:`ansys.aedt.core.modeler.cad.object_3d.EdgePrimitive`
:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`

"""
try:
Expand All @@ -749,7 +749,7 @@ def top_edge_y(self):

Returns
-------
:class:`ansys.aedt.core.modeler.cad.object_3d.EdgePrimitive`
:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`

"""
try:
Expand All @@ -765,7 +765,7 @@ def bottom_edge_y(self):

Returns
-------
:class:`ansys.aedt.core.modeler.cad.object_3d.EdgePrimitive`
:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`

"""
try:
Expand Down Expand Up @@ -985,7 +985,7 @@ class Point(object):
>>> aedtapp = Hfss()
>>> primitives = aedtapp.modeler

Create a point, to return an :class:`ansys.aedt.core.modeler.Object3d.Point`.
Create a point, to return an :class:`ansys.aedt.core.modeler.cad.elements_3d.Point`.

>>> point = primitives.create_point([30, 30, 0], "my_point", (0, 195, 255))
>>> my_point = primitives.points[point.name]
Expand Down Expand Up @@ -1184,7 +1184,7 @@ class Plane(object):
>>> aedtapp = Hfss()
>>> primitives = aedtapp.modeler

Create a plane, to return an :class:`ansys.aedt.core.modeler.Object3d.Plane`.
Create a plane, to return an :class:`ansys.aedt.core.modeler.cad.elements_3d.Plane`.

>>> plane = primitives.create_plane("my_plane", "-0.7mm", "0.3mm", "0mm", "0.7mm", "-0.3mm", "0mm", "(0, 195, 255)")
>>> my_plane = primitives.planes[plane.name]
Expand Down
26 changes: 13 additions & 13 deletions src/ansys/aedt/core/modeler/cad/object_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Object3d(object):
>>> aedtapp = Hfss()
>>> prim = aedtapp.modeler

Create a part, such as box, to return an :class:`ansys.aedt.core.modeler.Object3d.Object3d`.
Create a part, such as box, to return an :class:`ansys.aedt.core.modeler.cad.object_3d.Object3d`.

>>> id = prim.create_box([0, 0, 0],[10, 10, 5],"Mybox","Copper")
>>> part = prim[id]
Expand Down Expand Up @@ -378,7 +378,7 @@ def faces(self):

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.elements_3d.FacePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.FacePrimitive`]

References
----------
Expand All @@ -404,7 +404,7 @@ def faces_on_bounding_box(self):

Returns
-------
List of :class:`ansys.aedt.core.modeler.Object3d.FacePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.FacePrimitive`]
"""
f_list = []
for face in self.faces:
Expand Down Expand Up @@ -447,7 +447,7 @@ def largest_face(self, n=1):

Returns
-------
List of :class:`ansys.aedt.core.modeler.Object3d.FacePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.FacePrimitive`]
"""
f = []
for face in self.faces:
Expand All @@ -462,7 +462,7 @@ def longest_edge(self, n=1):

Returns
-------
List of :class:`ansys.aedt.core.modeler.Object3d.EdgePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`]
"""
e = []
for edge in self.edges:
Expand All @@ -477,7 +477,7 @@ def smallest_face(self, n=1):

Returns
-------
List of :class:`ansys.aedt.core.modeler.Object3d.FacePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.FacePrimitive`]
"""
f = []
for face in self.faces:
Expand All @@ -492,7 +492,7 @@ def shortest_edge(self, n=1):

Returns
-------
List of :class:`ansys.aedt.core.modeler.Object3d.EdgePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`]
"""
e = []
for edge in self.edges:
Expand Down Expand Up @@ -736,7 +736,7 @@ def edges(self):

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`]

References
----------
Expand All @@ -758,7 +758,7 @@ def vertices(self):

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.elements_3d.VertexPrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.VertexPrimitive`]

References
----------
Expand Down Expand Up @@ -1608,7 +1608,7 @@ def duplicate_around_axis(self, axis, angle=90, clones=2, create_new_objects=Tru

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.object_3d.Object3d`
List[:class:`ansys.aedt.core.modeler.cad.object_3d.Object3d`]
List of names of the newly added objects.

References
Expand Down Expand Up @@ -1843,7 +1843,7 @@ def wrap_sheet(self, object_name, imprinted=False):

Parameters
----------
object_name : str, :class:`ansys.aedt.core.modeler.Object3d.Object3d`
object_name : str, :class:`ansys.aedt.core.modeler.cad.object_3d.Object3d`
Object name or solid object or sheet name.
imprinted : bool, optional
Either if imprint or not over the sheet. Default is `False`.
Expand Down Expand Up @@ -1894,7 +1894,7 @@ def faces_by_area(self, area, area_filter="==", tolerance=1e-12):

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.elements_3d.FacePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.FacePrimitive`]
List of face primitives.
"""

Expand Down Expand Up @@ -1938,7 +1938,7 @@ def edges_by_length(self, length, length_filter="==", tolerance=1e-12):

Returns
-------
list of :class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`
List[:class:`ansys.aedt.core.modeler.cad.elements_3d.EdgePrimitive`]
List of edge primitives.
"""
filters = ["==", "<=", ">=", "<", ">"]
Expand Down
Loading
Loading