Torus
#
- class ansys.geometry.core.shapes.surfaces.torus.Torus(origin: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.point.Point3D, major_radius: pint.Quantity | ansys.geometry.core.misc.measurements.Distance | ansys.geometry.core.typing.Real, minor_radius: pint.Quantity | ansys.geometry.core.misc.measurements.Distance | ansys.geometry.core.typing.Real, reference: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.vector.UnitVector3D | ansys.geometry.core.math.vector.Vector3D = UNITVECTOR3D_X, axis: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.vector.UnitVector3D | ansys.geometry.core.math.vector.Vector3D = UNITVECTOR3D_Z)#
Bases:
ansys.geometry.core.shapes.surfaces.surface.Surface
Provides 3D torus representation.
- Parameters:
- origin
ndarray
|RealSequence
|Point3D
Centered origin of the torus.
- major_radius
Quantity
|Distance
|Real
Major radius of the torus.
- minor_radius
Quantity
|Distance
|Real
Minor radius of the torus.
- reference
ndarray
|RealSequence
|UnitVector3D
|Vector3D
X-axis direction.
- axis
ndarray
|RealSequence
|UnitVector3D
|Vector3D
Z-axis direction.
- origin
Overview#
Check a parameter is within the parametric range of the surface. |
|
Check a point is contained by the surface. |
Create a transformed copy of the torus from a transformation matrix. |
|
Create a mirrored copy of the torus along the y-axis. |
|
Evaluate the torus at the given parameters. |
|
Parameterize the torus surface as a tuple (U and V respectively). |
|
Project a point onto the torus and evaluate the torus. |
Origin of the torus. |
|
Semi-major radius of the torus. |
|
Semi-minor radius of the torus. |
|
X-direction of the torus. |
|
Y-direction of the torus. |
|
Z-direction of the torus. |
|
Volume of the torus. |
|
Surface_area of the torus. |
Equals operator for the |
Import detail#
from ansys.geometry.core.shapes.surfaces.torus import Torus
Property detail#
- property Torus.origin: ansys.geometry.core.math.point.Point3D#
Origin of the torus.
- property Torus.major_radius: pint.Quantity#
Semi-major radius of the torus.
- property Torus.minor_radius: pint.Quantity#
Semi-minor radius of the torus.
- property Torus.dir_x: ansys.geometry.core.math.vector.UnitVector3D#
X-direction of the torus.
- property Torus.dir_y: ansys.geometry.core.math.vector.UnitVector3D#
Y-direction of the torus.
- property Torus.dir_z: ansys.geometry.core.math.vector.UnitVector3D#
Z-direction of the torus.
- property Torus.volume: pint.Quantity#
Volume of the torus.
- property Torus.surface_area: pint.Quantity#
Surface_area of the torus.
Method detail#
- Torus.transformed_copy(matrix: ansys.geometry.core.math.matrix.Matrix44) Torus #
Create a transformed copy of the torus from a transformation matrix.
- Parameters:
- matrix
Matrix44
4x4 transformation matrix to apply to the torus.
- matrix
- Returns:
Torus
New torus that is the transformed copy of the original torus.
- Torus.mirrored_copy() Torus #
Create a mirrored copy of the torus along the y-axis.
- Returns:
Torus
New torus that is a mirrored copy of the original torus.
- Torus.evaluate(parameter: ansys.geometry.core.shapes.parameterization.ParamUV) TorusEvaluation #
Evaluate the torus at the given parameters.
- Parameters:
- parameter
ParamUV
Parameters (u,v) to evaluate the torus at.
- parameter
- Returns:
TorusEvaluation
Resulting evaluation.
- Torus.parameterization() tuple[ansys.geometry.core.shapes.parameterization.Parameterization, ansys.geometry.core.shapes.parameterization.Parameterization] #
Parameterize the torus surface as a tuple (U and V respectively).
The U parameter specifies the longitude angle, increasing clockwise (east) about the axis (right-hand corkscrew law). It has a zero parameter at
Geometry.Frame.DirX
and a period of2*pi
.The V parameter specifies the latitude, increasing north, with a zero parameter at the equator. For the donut, where the major radius is greater than the minor radius, the range is [-pi, pi] and the parameterization is periodic. For a degenerate torus, the range is restricted accordingly and the parameterization is non-periodic.
- Returns:
tuple
[Parameterization
,Parameterization
]Information about how a torus’s u and v parameters are parameterized, respectively.
- Torus.project_point(point: ansys.geometry.core.math.point.Point3D) TorusEvaluation #
Project a point onto the torus and evaluate the torus.
- Parameters:
- point
Point3D
Point to project onto the torus.
- point
- Returns:
TorusEvaluation
Resulting evaluation.
- abstractmethod Torus.contains_param(param_uv: ansys.geometry.core.shapes.parameterization.ParamUV) bool #
Check a parameter is within the parametric range of the surface.
- abstractmethod Torus.contains_point(point: ansys.geometry.core.math.point.Point3D) bool #
Check a point is contained by the surface.
The point can either lie within the surface or on its boundary.