Skip to content

Tolerance

Bases: BaseModel

Represents a tolerance specification for a part or feature.

PARAMETER DESCRIPTION
tolerance_grade

The grade of tolerance, such as 'IT7' for an 'H7' fit. Calcuated if not specified.

TYPE: str | None DEFAULT: None

deviation_lower

The lower deviation limit in the specified unit. Use None if unspecified.

TYPE: Decimal | None DEFAULT: None

deviation_upper

The upper deviation limit in the specified unit. Use None if unspecified.

TYPE: Decimal | None DEFAULT: None

fit

The fit specification, such as 'H7'. Optional if not applicable.

TYPE: str | None DEFAULT: None

is_theoretically_exact

Whether the tolerance is theoretically exact (e.g., basic dimensions).

TYPE: bool DEFAULT: False

is_reference

Whether the tolerance serves as a reference dimension.

TYPE: bool DEFAULT: False

is_general_tolerance

Whether the general tolerance was applied to this dimension.

TYPE: bool DEFAULT: False

is_approximation

Whether the tolerance is an approximation (e.g., 'approx. 5').

TYPE: bool DEFAULT: False

Source code in werk24/models/v2/models.py
class Tolerance(BaseModel):
    """
    Represents a tolerance specification for a part or feature.
    """

    tolerance_grade: Optional[str] = Field(
        None,
        description="The grade of tolerance, such as 'IT7' for an 'H7' fit. Calcuated if not specified.",
        examples=["IT7"],
    )

    deviation_lower: Optional[Decimal] = Field(
        None,
        description="The lower deviation limit in the specified unit. Use None if unspecified.",
        examples=[Decimal("-0.05")],
    )

    deviation_upper: Optional[Decimal] = Field(
        None,
        description="The upper deviation limit in the specified unit. Use None if unspecified.",
        examples=[Decimal("0.05")],
    )

    fit: Optional[str] = Field(
        None,
        description="The fit specification, such as 'H7'. Optional if not applicable.",
        examples=["H7"],
    )

    is_theoretically_exact: bool = Field(
        False,
        description="Whether the tolerance is theoretically exact (e.g., basic dimensions).",
    )

    is_reference: bool = Field(
        False,
        description="Whether the tolerance serves as a reference dimension.",
    )

    is_general_tolerance: bool = Field(
        False,
        description="Whether the general tolerance was applied to this dimension.",
    )

    is_approximation: bool = Field(
        False,
        description="Whether the tolerance is an approximation (e.g., 'approx. 5').",
    )