create_torus#

Modeler3D.create_torus(center, major_radius, minor_radius, axis=None, name=None, material_name=None)[source]#

Create a torus.

Parameters:
centerlist

Center point for the torus in a list of [x, y, z] coordinates.

major_radiusfloat

Major radius of the torus.

minor_radiusfloat

Minor radius of the torus.

axisstr, optional

Axis of revolution. The default is None, in which case the Z axis is used.

namestr, optional

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

material_namestr, optional

Name of the material. The default is None, in which case the default material is assigned. If the material name supplied is invalid, the default material is assigned.

Returns:
pyaedt.modeler.cad.object3d.Object3d

3D object.

References

>>> oEditor.CreateTorus

Examples

Create a torus named "mytorus" about the Z axis with a major radius of 1, minor radius of 0.5, and a material of "copper". >>> from pyaedt import Hfss >>> hfss = Hfss() >>> origin = [0, 0, 0] >>> torus = hfss.modeler.create_torus(origin, major_radius=1, … minor_radius=0.5, axis=”Z”, … name=”mytorus”, material_name=”copper”)