Cylinder#

class ansys.geometry.core.shapes.surfaces.cylinder.Cylinder(origin: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.point.Point3D, 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 cylinder representation.

Parameters:
originndarray | RealSequence | Point3D

Origin of the cylinder.

radiusQuantity | Distance | Real

Radius of the cylinder.

referencendarray | RealSequence | UnitVector3D | Vector3D

X-axis direction.

axisndarray | RealSequence | UnitVector3D | Vector3D

Z-axis direction.

Overview#

contains_param

Check a parameter is within the parametric range of the surface.

contains_point

Check a point is contained by the surface.

surface_area

Get the surface area of the cylinder.

volume

Get the volume of the cylinder.

transformed_copy

Create a transformed copy of the cylinder from a transformation matrix.

mirrored_copy

Create a mirrored copy of the cylinder along the y-axis.

evaluate

Evaluate the cylinder at the given parameters.

project_point

Project a point onto the cylinder and evaluate the cylinder.

parameterization

Parameterize the cylinder surface as a tuple (U and V respectively).

origin

Origin of the cylinder.

radius

Radius of the cylinder.

dir_x

X-direction of the cylinder.

dir_y

Y-direction of the cylinder.

dir_z

Z-direction of the cylinder.

__eq__

Equals operator for the Cylinder class.

Import detail#

from ansys.geometry.core.shapes.surfaces.cylinder import Cylinder

Property detail#

property Cylinder.origin: ansys.geometry.core.math.point.Point3D#

Origin of the cylinder.

property Cylinder.radius: pint.Quantity#

Radius of the cylinder.

property Cylinder.dir_x: ansys.geometry.core.math.vector.UnitVector3D#

X-direction of the cylinder.

property Cylinder.dir_y: ansys.geometry.core.math.vector.UnitVector3D#

Y-direction of the cylinder.

property Cylinder.dir_z: ansys.geometry.core.math.vector.UnitVector3D#

Z-direction of the cylinder.

Method detail#

Cylinder.surface_area(height: pint.Quantity | ansys.geometry.core.misc.measurements.Distance | ansys.geometry.core.typing.Real) pint.Quantity#

Get the surface area of the cylinder.

Parameters:
heightQuantity | Distance | Real

Height to bound the cylinder at.

Returns:
Quantity

Surface area of the temporarily bounded cylinder.

Notes

By nature, a cylinder is infinite. If you want to get the surface area, you must bound it by a height. Normally a cylinder surface is not closed (does not have “caps” on the ends). This method assumes that the cylinder is closed for the purpose of getting the surface area.

Cylinder.volume(height: pint.Quantity | ansys.geometry.core.misc.measurements.Distance | ansys.geometry.core.typing.Real) pint.Quantity#

Get the volume of the cylinder.

Parameters:
heightQuantity | Distance | Real

Height to bound the cylinder at.

Returns:
Quantity

Volume of the temporarily bounded cylinder.

Notes

By nature, a cylinder is infinite. If you want to get the surface area, you must bound it by a height. Normally a cylinder surface is not closed (does not have “caps” on the ends). This method assumes that the cylinder is closed for the purpose of getting the surface area.

Cylinder.transformed_copy(matrix: ansys.geometry.core.math.matrix.Matrix44) Cylinder#

Create a transformed copy of the cylinder from a transformation matrix.

Parameters:
matrixMatrix44

4X4 transformation matrix to apply to the cylinder.

Returns:
Cylinder

New cylinder that is the transformed copy of the original cylinder.

Cylinder.mirrored_copy() Cylinder#

Create a mirrored copy of the cylinder along the y-axis.

Returns:
Cylinder

New cylinder that is a mirrored copy of the original cylinder.

Cylinder.__eq__(other: Cylinder) bool#

Equals operator for the Cylinder class.

Cylinder.evaluate(parameter: ansys.geometry.core.shapes.parameterization.ParamUV) CylinderEvaluation#

Evaluate the cylinder at the given parameters.

Parameters:
parameterParamUV

Parameters (u,v) to evaluate the cylinder at.

Returns:
CylinderEvaluation

Resulting evaluation.

Cylinder.project_point(point: ansys.geometry.core.math.point.Point3D) CylinderEvaluation#

Project a point onto the cylinder and evaluate the cylinder.

Parameters:
pointPoint3D

Point to project onto the cylinder.

Returns:
CylinderEvaluation

Resulting evaluation.

Cylinder.parameterization() tuple[ansys.geometry.core.shapes.parameterization.Parameterization, ansys.geometry.core.shapes.parameterization.Parameterization]#

Parameterize the cylinder surface as a tuple (U and V respectively).

The U parameter specifies the clockwise angle around the axis (right-hand corkscrew law), with a zero parameter at dir_x and a period of 2*pi.

The V parameter specifies the distance along the axis, with a zero parameter at the XY plane of the cylinder.

Returns:
tuple[Parameterization, Parameterization]

Information about how a cylinder’s u and v parameters are parameterized, respectively.

abstract Cylinder.contains_param(param_uv: ansys.geometry.core.shapes.parameterization.ParamUV) bool#

Check a parameter is within the parametric range of the surface.

abstract Cylinder.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.