@classmethod
def from_shape(cls, shape, **kwargs):
    """Construct a mesh from a primitive shape.

        Parameters
        ----------
        shape : :class: `compas.geometry.shape`
            The input shape to generate a mesh from.
        kwargs:
            Optional keyword arguments ``u`` and ``v`` for the resolution in u (Torus, Sphere, Cylinder, Cone) and v direction (Torus and Sphere).

        Returns
        -------
        Mesh
            A mesh object.

        Examples
        --------
        >>>
        """
    vertices, faces = shape.to_vertices_and_faces(**kwargs)
    mesh = cls.from_vertices_and_faces(vertices, faces)
    return mesh
