create_cone#
- Modeler3D.create_cone(orientation, origin, bottom_radius, top_radius, height, name=None, material=None, **kwargs)#
Create a cone.
- Parameters:
- orientation
str
Axis of rotation of the starting point around the center point. The default is
None
, in which case the Z axis is used.- origin
list
,optional
List of
[x, y, z]
coordinates for the center position of the bottom of the cone.- bottom_radius
float
Bottom radius of the cone.
- top_radius
float
Top radius of the cone.
- height
float
Height of the cone.
- name
str
,optional
Name of the cone. The default is
None
, in which case the default name is assigned.- material
str
,optional
Name of the material. The default is
None
, in which case the default material is assigned.
- orientation
- Returns:
ansys.aedt.core.modeler.cad.object_3d.Object3d
or bool3D 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
, andtop_radius
. Thecs_axis
parameter provides the direction axis of the cone. Theposition
parameter provides the starting point of the cone. Thebottom_radius
andtop_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 parametername
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")