create_circle#
- Modeler3D.create_circle(cs_plane, position, radius, numSides=0, is_covered=True, name=None, matname=None, non_model=False)[source]#
Create a circle.
- Parameters:
- cs_plane
str
orint
Coordinate system plane for orienting the circle.
pyaedt.constants.PLANE
Enumerator can be used as input.- position
list
List of
[x, y, z]
coordinates for the center point of the circle.- radius
float
Radius of the circle.
- numSides
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.- matname
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
.
- cs_plane
- Returns:
pyaedt.modeler.cad.object3d.Object3d
3D object.
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 pyaedt import Hfss >>> aedtapp = Hfss() >>> circle_object = aedtapp.modeler.create_circle(cs_plane='Z', position=[0,0,0], ... radius=2, num_sides=8, name="mycyl", ... matname="vacuum")