:class:`Cone` ============= .. py:class:: ansys.geometry.core.shapes.surfaces.cone.Cone(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, half_angle: pint.Quantity | ansys.geometry.core.misc.measurements.Angle | 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: :py:obj:`ansys.geometry.core.shapes.surfaces.surface.Surface` Provides 3D cone representation. :Parameters: **origin** : :obj:`~numpy.ndarray` | :obj:`RealSequence` | :obj:`Point3D` Origin of the cone. **radius** : :obj:`~pint.Quantity` | :obj:`Distance` | :obj:`Real` Radius of the cone. **half_angle** : :obj:`~pint.Quantity` | :obj:`Angle` | :obj:`Real` Half angle of the apex, determining the upward angle. **reference** : :obj:`~numpy.ndarray` | :obj:`RealSequence` | :obj:`UnitVector3D` | :obj:`Vector3D` X-axis direction. **axis** : :obj:`~numpy.ndarray` | :obj:`RealSequence` | :obj:`UnitVector3D` | :obj:`Vector3D` Z-axis direction. .. !! processed by numpydoc !! .. py:currentmodule:: Cone Overview -------- .. tab-set:: .. tab-item:: Abstract methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~contains_param` - Check a parameter is within the parametric range of the surface. * - :py:attr:`~contains_point` - Check a point is contained by the surface. .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~transformed_copy` - Create a transformed copy of the cone from a transformation matrix. * - :py:attr:`~mirrored_copy` - Create a mirrored copy of the cone along the y-axis. * - :py:attr:`~evaluate` - Evaluate the cone at given parameters. * - :py:attr:`~project_point` - Project a point onto the cone and evaluate the cone. * - :py:attr:`~parameterization` - Parameterize the cone surface as a tuple (U and V respectively). .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~origin` - Origin of the cone. * - :py:attr:`~radius` - Radius of the cone. * - :py:attr:`~half_angle` - Half angle of the apex. * - :py:attr:`~dir_x` - X-direction of the cone. * - :py:attr:`~dir_y` - Y-direction of the cone. * - :py:attr:`~dir_z` - Z-direction of the cone. * - :py:attr:`~height` - Height of the cone. * - :py:attr:`~surface_area` - Surface area of the cone. * - :py:attr:`~volume` - Volume of the cone. * - :py:attr:`~apex` - Apex point of the cone. * - :py:attr:`~apex_param` - Apex parameter of the cone. .. tab-item:: Special methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~__eq__` - Equals operator for the ``Cone`` class. Import detail ------------- .. code-block:: python from ansys.geometry.core.shapes.surfaces.cone import Cone Property detail --------------- .. py:property:: origin :type: ansys.geometry.core.math.point.Point3D Origin of the cone. .. !! processed by numpydoc !! .. py:property:: radius :type: pint.Quantity Radius of the cone. .. !! processed by numpydoc !! .. py:property:: half_angle :type: pint.Quantity Half angle of the apex. .. !! processed by numpydoc !! .. py:property:: dir_x :type: ansys.geometry.core.math.vector.UnitVector3D X-direction of the cone. .. !! processed by numpydoc !! .. py:property:: dir_y :type: ansys.geometry.core.math.vector.UnitVector3D Y-direction of the cone. .. !! processed by numpydoc !! .. py:property:: dir_z :type: ansys.geometry.core.math.vector.UnitVector3D Z-direction of the cone. .. !! processed by numpydoc !! .. py:property:: height :type: pint.Quantity Height of the cone. .. !! processed by numpydoc !! .. py:property:: surface_area :type: pint.Quantity Surface area of the cone. .. !! processed by numpydoc !! .. py:property:: volume :type: pint.Quantity Volume of the cone. .. !! processed by numpydoc !! .. py:property:: apex :type: ansys.geometry.core.math.point.Point3D Apex point of the cone. .. !! processed by numpydoc !! .. py:property:: apex_param :type: ansys.geometry.core.typing.Real Apex parameter of the cone. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: transformed_copy(matrix: ansys.geometry.core.math.matrix.Matrix44) -> Cone Create a transformed copy of the cone from a transformation matrix. :Parameters: **matrix** : :obj:`Matrix44` 4x4 transformation matrix to apply to the cone. :Returns: :obj:`Cone` New cone that is the transformed copy of the original cone. .. !! processed by numpydoc !! .. py:method:: mirrored_copy() -> Cone Create a mirrored copy of the cone along the y-axis. :Returns: :obj:`Cone` New cone that is a mirrored copy of the original cone. .. !! processed by numpydoc !! .. py:method:: __eq__(other: Cone) -> bool Equals operator for the ``Cone`` class. .. !! processed by numpydoc !! .. py:method:: evaluate(parameter: ansys.geometry.core.shapes.parameterization.ParamUV) -> ConeEvaluation Evaluate the cone at given parameters. :Parameters: **parameter** : :obj:`ParamUV` Parameters (u,v) to evaluate the cone at. :Returns: :obj:`ConeEvaluation` Resulting evaluation. .. !! processed by numpydoc !! .. py:method:: project_point(point: ansys.geometry.core.math.point.Point3D) -> ConeEvaluation Project a point onto the cone and evaluate the cone. :Parameters: **point** : :obj:`Point3D` Point to project onto the cone. :Returns: :obj:`ConeEvaluation` Resulting evaluation. .. !! processed by numpydoc !! .. py:method:: parameterization() -> tuple[ansys.geometry.core.shapes.parameterization.Parameterization, ansys.geometry.core.shapes.parameterization.Parameterization] Parameterize the cone 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 cone. :Returns: :class:`python:tuple`\[:obj:`Parameterization`, :obj:`Parameterization`] Information about how a cone's u and v parameters are parameterized, respectively. .. !! processed by numpydoc !! .. py:method:: contains_param(param_uv: ansys.geometry.core.shapes.parameterization.ParamUV) -> bool :abstractmethod: Check a parameter is within the parametric range of the surface. .. !! processed by numpydoc !! .. py:method:: contains_point(point: ansys.geometry.core.math.point.Point3D) -> bool :abstractmethod: Check a point is contained by the surface. The point can either lie within the surface or on its boundary. .. !! processed by numpydoc !!