Create rectangular Torus in 3D Scene
Contents
[
Hide
]
Using Aspose.3D for Python via .NET API, developers can create 3D objects, and then save 3D scene in any supported 3D format.
Rectangular Torus
We have added RectangularTorus
class, it allows developers to place a parameterized rectangular torus into the scene, this can be converted to ordinal mesh/triangle mesh during saving the scene into different supported file formats.
Python
import math
from aspose.threed.entities import RectangularTorus
rt = RectangularTorus()
rt.inner_radius = 17
rt.outer_radius = 22
rt.height = 30
rt.arc = math.pi * 0.5
scene = Scene()
scene.root_node.create_child_node(rt)
scene.save("rtorus.obj", FileFormat.WAVEFRONT_OBJ)
The generated rectangular torus looks as follows: