create_torus#
- Modeler3D.create_torus(center, major_radius, minor_radius, axis=None, name=None, material_name=None)[source]#
Create a torus.
- Parameters:
- center
list
Center point for the torus in a list of
[x, y, z]
coordinates.- major_radius
float
Major radius of the torus.
- minor_radius
float
Minor radius of the torus.
- axis
str
,optional
Axis of revolution. The default is
None
, in which case the Z axis is used.- name
str
,optional
Name of the torus. The default is
None
, in which case the default name is assigned.- material_name
str
,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.
- center
- 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”)