Cylinder.to_mesh

Cylinder.to_mesh(triangulated=False, u=None, v=None)[source]

Returns a mesh representation of the box.

Parameters:
triangulated: bool, 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.datastructures.Mesh

Notes

Parameters u and v 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.