Torus.to_polyhedron
- Torus.to_polyhedron(triangulated=False, u=None, v=None)[source]
Convert the shape to a polyhedron.
- Parameters:
- triangulatedbool, optional
If True, triangulate the faces.
- uint, optional
Number of faces in the “u” direction. If no value is provided, the value of self.resolution_u will be used.
- vint, optional
Number of faces in the “v” direction. If no value is provided, the value of self.resolution_v will be used.
- Returns:
compas.geometry.Polyhedron
The polyhedron representation of the shape.
Notes
Parameters
u
andv
define the resolution of the discretisation of curved geometry. If the geometry is not curved in a particular direction, the corresponding parameter will be ignored. For example, a cylinder has a resolution in the “u” direction, but not in the “v” direction. A sphere has a resolution in both the “u” and the “v” direction. A box has no resolution in either direction.