create_cylinder

Modeler3D.create_cylinder(cs_axis, position, radius, height, numSides=0, name=None, matname=None)

Create a cylinder.

Parameters
cs_axisint or str

Axis of rotation of the starting point around the center point. pyaedt.constants.AXIS Enumerator can be used as input.

positionlist

Center point of the cylinder in a list of (x, y, z) coordinates.

radiusfloat

Radius of the cylinder.

heightfloat

Height of the cylinder.

numSidesint, optional

Number of sides. The default is 0, which is correct for a cylinder.

namestr, optional

Name of the cylinder. The default is None, in which case the default name is assigned.

matnamestr, optional

Name of the material. The default is ‘’None``, in which case the default material is assigned.

Returns
pyaedt.modeler.Object3d.Object3d

3D object.

References

>>> oEditor.CreateCylinder

Examples

>>> from pyaedt import Hfss
>>> aedtapp = Hfss()
>>> cylinder_object = aedtapp.modeler.primitives.create_cylinder(cs_axis='Z', position=[0,0,0],
...                                                              radius=2, height=3, name="mycyl",
...                                                              matname="vacuum")