create_ellipse#
- Modeler3D.create_ellipse(orientation, origin, major_radius, ratio, is_covered=True, name=None, material=None, segments=0, **kwargs)[source]#
Create an ellipse.
- Parameters:
- orientation
str
orint
Coordinate system plane for orienting the ellipse.
ansys.aedt.core.constants.PLANE
Enumerator can be used as input.- origin
list
List of
[x, y, z]
coordinates for the center point of the ellipse.- major_radius
float
Base radius of the ellipse.
- ratio
float
Aspect ratio of the secondary radius to the base radius.
- is_coveredbool,
optional
Whether the ellipse is covered. The default is
True
, in which case the result is a 2D sheet object. IfFalse,
the result is a closed 1D polyline object.- name
str
,optional
Name of the ellipse. 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.- segments
int
,optional
Number of segments to apply to create the segmented geometry. The default is
0
.- **kwargs
optional
Additional keyword arguments may be passed when creating the primitive to set properties. See
ansys.aedt.core.modeler.cad.object_3d.Object3d
for more details.
- orientation
- Returns:
References
>>> oEditor.CreateEllipse
Examples
The following example shows how to create an ellipse in HFSS. The required parameters are
cs_plane
,position
,major_radius
,ratio
, andis_covered
. Thecs_plane
parameter provides the plane that the ellipse is designed on. Theposition
parameter provides the origin of the ellipse. Themajor_radius
parameter provides the radius of the ellipse. Theratio
parameter is a ratio between the major radius and minor radius of the ellipse. Theis_covered
parameter is a flag indicating if the ellipse is covered.The optional parameter
matname
allows you to set the material name of the ellipse. The optional parametername
allows you to assign a name to the ellipse.This method applies to all 3D applications: HFSS, Q3D, Icepak, Maxwell 3D, and Mechanical.
>>> from ansys.aedt.core import Hfss >>> aedtapp = Hfss() >>> ellipse = aedtapp.modeler.create_ellipse(orientation='Z', origin=[0,0,0], ... major_radius=2, ratio=2, is_covered=True, name="myell", ... material="vacuum")