create_cylinder#
- Modeler3D.create_cylinder(cs_axis, position, radius, height, numSides=0, name=None, matname=None)[source]#
Create a cylinder.
- Parameters:
- cs_axis
int
orstr
Axis of rotation of the starting point around the center point.
pyaedt.constants.AXIS
Enumerator can be used as input.- position
list
Center point of the cylinder in a list of
(x, y, z)
coordinates.- radius
float
Radius of the cylinder.
- height
float
Height of the cylinder.
- numSides
int
,optional
Number of sides. The default is
0
, which is correct for a cylinder.- name
str
,optional
Name of the cylinder. 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.
- cs_axis
- Returns:
pyaedt.modeler.cad.object3d.Object3d
3D object.
References
>>> oEditor.CreateCylinder
Examples
>>> from pyaedt import Hfss >>> aedtapp = Hfss() >>> cylinder_object = aedtapp.modeler..create_cylinder(cs_axis='Z', position=[0,0,0], ... radius=2, height=3, name="mycyl", ... matname="vacuum")