Skip to content

DOCS: Add docstring to some classes in constants.py #6099

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

Merged
merged 6 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions doc/changelog.d/6099.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add docstring to some classes in constants.py
86 changes: 82 additions & 4 deletions src/ansys/aedt/core/generic/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,25 +596,103 @@ class FILLET(object):


class AXIS(object):
"""CoordinateSystemAxis Enumerator class."""
"""CoordinateSystemAxis Enumerator class.

This static class defines integer constants corresponding to the
Cartesian axes: X, Y, and Z. Attributes can be
assigned to the `orientation` keyword argument for
geometry creation methods of
the :class:`ansys.aedt.core.modeler.modeler_3d.Modeler3D` and
:class:`ansys.aedt.core.modeler.modeler_2d.Modeler2D` classes.

Attributes
----------
X : int
Axis index corresponding to the X axis (typically 0).
Y : int
Axis index corresponding to the Y axis (typically 1).
Z : int
Axis index corresponding to the Z axis (typically 2).

Examples
--------
>>> from ansys.aedt.core.generic import constants
>>> from ansys.aedt.core import Hfss
>>> hfss = Hfss()
>>> cylinder1 = hfss.modeler.create_cylinder(orientation=constants.AXIS.Z,
... origin=[0, 0, 0],
... radius="0.5mm",
... height="3cm",
... )

"""

(X, Y, Z) = range(0, 3)


class PLANE(object):
"""CoordinateSystemPlane Enumerator class."""
"""CoordinateSystemPlane Enumerator class.

This static class defines integer constants corresponding to the
Y-Z, Z-X, and X-Y planes of the current coordinate system.

Attributes
----------
YZ : int
Y-Z plane (typically 0).
ZX : int
Z-X plane (typically 1).
XY : int
X-Y plane (typically 2).

"""

(YZ, ZX, XY) = range(0, 3)


class GRAVITY(object):
"""GravityDirection Enumerator class."""
"""GravityDirection Enumerator class.

This static class defines integer constants corresponding to the
positive direction of gravity force.

Attributes
----------
XNeg : int
Positive gravity force is in the -X direction.
YNeg : int
Positive gravity force is in the -Y direction.
ZNeg : int
Positive gravity force is in the -Z direction.
XPos : int
Positive gravity force is in the +X direction.
YPos : int
Positive gravity force is in the +Y direction.
ZPos : int
Positive gravity force is in the +Z direction.

"""

(XNeg, YNeg, ZNeg, XPos, YPos, ZPos) = range(0, 6)


class VIEW(object):
"""View Enumerator class."""
"""View Enumerator class.

This static class defines integer constants corresponding to the
Y-Z, Z-X, and X-Y planes of the current coordinate system.

Attributes
----------
XY : int
Set the view along the Z-Axis (view of the XY plane).
YZ : int
Set the view along the X-Axis (view of the YZ plane).
ZX : int
Set the view along the Y-Axis (view of the ZX plane).
ISO : int
Isometric view from the (x=1, y=1, z=1) direction.
"""

(XY, YZ, ZX, ISO) = ("XY", "YZ", "ZX", "iso")

Expand Down