Skip to content

GeneralTolerances

GeneralTolerances captures the default tolerance regime declared in a drawing, such as ISO 2768 classes or DIN 7168 tables. The model records the tolerance standard referenced, the tolerance class, and the tolerancing principle (independence or envelope). This information governs dimensions that do not have explicit tolerances, so surfacing it programmatically is critical for downstream planning. Use the object to set baseline inspection limits, calculate fit scenarios, or flag when a drawing relies on outdated standards. When combined with individual dimensions, the model allows automated systems to derive complete tolerance bounds without manual lookup, and it supports quality audits by documenting which global assumptions applied to each revision.

Bases: Reference

Model representing general tolerances for a part or drawing.

General tolerances are applied to dimensions where specific tolerances are not explicitly defined. These tolerances are governed by recognized standards and principles.

PARAMETER DESCRIPTION
reference_id

Reference ID to identify the object.

TYPE: int

tolerance_standard

The standard used for general tolerance definitions, e.g., DIN 7168 or ISO 2768.

TYPE: GeneralTolerancesStandard

tolerance_class

The tolerance class or grade, defined as a short string such as 'm', 'f', or 'c'.

TYPE: str | None

principle

The principle governing the tolerance application, such as independence or envelope.

TYPE: GeneralTolerancesPrinciple | None

tolerance_note

Printed general tolerance note/table, including units, ranges and deviations. May contain rules that are not represented in tolerance_table.

TYPE: str | None DEFAULT: None

tolerance_table

Explicit linear tolerance rules extracted from the note. Empty when the note cannot be represented as a single linear scheme.

TYPE: List[GeneralToleranceTableRow] DEFAULT: <dynamic>

Source code in werk24/models/v2/models.py
class GeneralTolerances(Reference):
    """
    Model representing general tolerances for a part or drawing.

    General tolerances are applied to dimensions where specific tolerances are not explicitly defined.
    These tolerances are governed by recognized standards and principles.
    """

    tolerance_standard: GeneralTolerancesStandard = Field(
        ...,
        description="The standard used for general tolerance definitions, e.g., DIN 7168 or ISO 2768.",
        examples=[GeneralTolerancesStandard.ISO_2768],
    )

    tolerance_class: Optional[str] = Field(
        ...,
        description="The tolerance class or grade, defined as a short string such as 'm', 'f', or 'c'.",
        examples=["m"],
    )

    principle: Optional[GeneralTolerancesPrinciple] = Field(
        ...,
        description="The principle governing the tolerance application, such as independence or envelope.",
        examples=[GeneralTolerancesPrinciple.INDEPENDENCE],
    )

    tolerance_note: Optional[str] = Field(
        default=None,
        description="Printed general tolerance note/table, including units, ranges "
        "and deviations. May contain rules that are not represented in tolerance_table.",
    )
    tolerance_table: List[GeneralToleranceTableRow] = Field(
        default_factory=list,
        description="Explicit linear tolerance rules extracted from the note. "
        "Empty when the note cannot be represented as a single linear scheme.",
    )