Skip to content

Geometry

Geometry is the base model for the simplified geometric descriptions the API derives from a drawing. Its single field, the geometry type, indicates which shape family applies—currently cuboid or cylinder—and acts as the discriminator for the concrete subclasses GeometryCuboid and GeometryCylinder, which add the actual dimensions. Because higher-level objects such as bounding-dimension estimates build on these primitives, the class provides a consistent entry point for stock size estimation and enclosing-shape calculations. Use the geometry type to branch your processing logic before reading the shape-specific fields of the concrete models.

Bases: BaseModel, ABC

Base class for representing geometric shapes.

PARAMETER DESCRIPTION
geometry_type

TYPE: GeometryType

Source code in werk24/models/v2/models.py
class Geometry(BaseModel, abc.ABC):
    """
    Base class for representing geometric shapes.
    """

    geometry_type: GeometryType