create_ellipse#
- Modeler3D.create_ellipse(orientation, origin, major_radius, ratio, is_covered=True, name=None, material=None, segments=0, **kwargs)#
Create an ellipse.
- Parameters:
- orientation
strorint Coordinate system plane for orienting the ellipse.
ansys.aedt.core.constants.PlaneEnumerator 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.Object3dfor 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_planeparameter provides the plane that the ellipse is designed on. Thepositionparameter provides the origin of the ellipse. Themajor_radiusparameter provides the radius of the ellipse. Theratioparameter is a ratio between the major radius and minor radius of the ellipse. Theis_coveredparameter is a flag indicating if the ellipse is covered.The optional parameter
matnameallows you to set the material name of the ellipse. The optional parameternameallows 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")