create_cone#

Modeler3D.create_cone(orientation, origin, bottom_radius, top_radius, height, name=None, material=None, **kwargs)#

Create a cone.

Parameters:
orientationstr

Axis of rotation of the starting point around the center point. The default is None, in which case the Z axis is used.

originlist, optional

List of [x, y, z] coordinates for the center position of the bottom of the cone.

bottom_radiusfloat

Bottom radius of the cone.

top_radiusfloat

Top radius of the cone.

heightfloat

Height of the cone.

namestr, optional

Name of the cone. The default is None, in which case the default name is assigned.

materialstr, optional

Name of the material. The default is None, in which case the default material is assigned.

Returns:
ansys.aedt.core.modeler.cad.object_3d.Object3d or bool

3D object or False if it fails.

References

>>> oEditor.CreateCone

Examples

This example shows how to create a cone in HFSS. The required parameters are cs_axis, position, bottom_radius, and top_radius. The cs_axis parameter provides the direction axis of the cone. The position parameter provides the starting point of the cone. The bottom_radius and top_radius parameters provide the radius and `eight of the cone.

The optional parameter matname allows you to set the material name of the cone. The optional parameter name allows you to assign a name to the cone.

This method applies to all 3D applications: HFSS, Q3D, Icepak, Maxwell 3D, and Mechanical.

>>> from ansys.aedt.core import Hfss
>>> aedtapp = Hfss()
>>> cone_object = aedtapp.modeler.create_cone(orientation='Z', origin=[0, 0, 0],
...                                           bottom_radius=2, top_radius=3, height=4,
...                                           name="mybox", material="copper")