Skip to content

Polygon

Bases: BaseModel

Represents a polygon area in the drawing.

PARAMETER DESCRIPTION
coordinate_space

The coordinate space used to define the polygon, such as absolute or relative.

TYPE: CoordinateSpace

coordinates

A list of x,y tuples representing the vertices of the polygon.

TYPE: list[tuple[int, int]]

Source code in werk24/models/v2/models.py
class Polygon(BaseModel):
    """
    Represents a polygon area in the drawing.
    """

    coordinate_space: CoordinateSpace = Field(
        ...,
        description="The coordinate space used to define the polygon, such as absolute or relative.",
    )
    coordinates: list[tuple[int, int]] = Field(
        ...,
        description="A list of x,y tuples representing the vertices of the polygon.",
    )