# Source code for tabletree.src.api.view_util.polygon

    from .point import Vector3

    class Polygon:
        def __init__(
            self,
            vertices: list[Vector3],
            facets: list[tuple[int, int, int]],
        ):
            """Create a Polygon.

            Args:
                vertices:
                    The list of vertices.
                facets:
                    The list of triangles.
                    A triangle consists of three indices of vertices.
            """
            self.vertices = [list(vtx) for vtx in vertices]
            self.facets = facets