create_circle#
- Modeler3D.create_circle(orientation, origin, radius, num_sides=0, is_covered=True, name=None, material=None, non_model=False, **kwargs)#
Create a circle.
- Parameters:
- orientation
str
orint
Coordinate system plane for orienting the circle.
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 circle.- radius
float
Radius of the circle.
- num_sides
int
,optional
Number of sides. The default is
0
, which is correct for a circle.- name
str
,optional
Name of the circle. 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.- non_modelbool,
optional
Either if create the new object as model or non-model. The default is
False
.- **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.CreateCircle
Examples
The following example shows how to create a circle in HFSS. The required parameters are
cs_plane
,position
,radius
, andnum_sides
. Thecs_plane
parameter provides the plane that the circle is designed on. Theposition
parameter provides the origin of the circle. Theradius
andnum_sides
parameters provide the radius and number of discrete sides of the circle,The optional parameter
matname
allows you to set the material name of the circle. The optional parametername
allows you to assign a name to the circle.This method applies to all 3D applications: HFSS, Q3D, Icepak, Maxwell 3D, and Mechanical.
>>> from ansys.aedt.core import Hfss >>> aedtapp = Hfss() >>> circle_object = aedtapp.modeler.create_circle(orientation='Z', origin=[0,0,0], ... radius=2, num_sides=8, name="mycyl", ... material="vacuum")