create_cone#

Modeler3D.create_cone(cs_axis, position, bottom_radius, top_radius, height, name=None, matname=None, **kwargs)[source]#

Create a cone.

Parameters:
cs_axisstr

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

positionlist, 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.

matnamestr, optional

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

Returns:
bool, pyaedt.modeler.cad.object3d.Object3d

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 pyaedt import Hfss
>>> aedtapp = Hfss()
>>> cone_object = aedtapp.modeler.create_cone(cs_axis='Z', position=[0, 0, 0],
...                                           bottom_radius=2, top_radius=3, height=4,
...                                           name="mybox", matname="copper")