Skip to content

Size

Size is the basic measurement object used throughout the extracted models, from dimensions and chamfers to bores and threads. It stores the numeric value, the unit, and a size type classifying the measurement as linear, angular, diameter, spherical diameter, width across flats, or square. An optional Tolerance records the permitted deviations, fit designation, or tolerance grade attached to the value. Having size information consistently structured simplifies quoting, stock planning, tooling selection, and change detection when a drawing’s proportions evolve, and it supports analytics that look for systemic shifts across product families.

Bases: Quantity

Represents a size definition for a part or feature in an engineering context.

PARAMETER DESCRIPTION
value

The value of the quantity.

TYPE: Decimal

unit

The unit of the quantity.

TYPE: str

size_type

The type of size (e.g., diameter, linear, angular).

TYPE: SizeType

tolerance

The tolerance specifications associated with the size.

TYPE: Tolerance | None DEFAULT: None

Source code in werk24/models/v2/models.py
class Size(Quantity):
    """
    Represents a size definition for a part or feature in an engineering context.
    """

    size_type: SizeType = Field(
        ...,
        description="The type of size (e.g., diameter, linear, angular).",
        examples=[SizeType.DIAMETER],
    )

    tolerance: Optional[Tolerance] = Field(
        None,
        description="The tolerance specifications associated with the size.",
        examples=[
            Tolerance(
                fit="H7",
                deviation_lower=Decimal("-0.05"),
                deviation_upper=Decimal("0.05"),
                tolerance_grade="IT7",
            )
        ],
    )