Skip to content

GDnT

GDnT represents a single geometric dimensioning and tolerancing callout extracted from a drawing. The model bundles the controlled characteristic, the tolerance zone, feature modifiers, the reference element, material condition, state, and the datums referenced by the frame, giving you a holistic view of how form, fit, and function are controlled. It serves as the root structure that connects the individual GD&T components so downstream software can analyze them together, determine compliance with standards, or simulate permissible variation. The object also stores the raw label and a detection confidence, supporting auditability. Use this object when you need to extract the complete GD&T schema for digital twin analysis, inspection planning, process capability studies, or change management across drawing revisions.

Bases: Feature

Represents a GD&T (Geometric Dimensioning and Tolerancing) cue in a technical drawing.

PARAMETER DESCRIPTION
reference_id

Reference ID to identify the object.

TYPE: int

label

A short description of the feature in a human-readable format.

TYPE: str

confidence

Confidence in the feature extraction or interpretation.

TYPE: Confidence | None

characteristic

The GD&T characteristic being controlled (e.g., flatness, circularity).

TYPE: GDnTCharacteristic

zone

The tolerance zone defined for the characteristic.

TYPE: GDnTZone | None

feature

The feature being controlled by the GD&T characteristic.

TYPE: GDnTFeature | None

reference

The reference for the GD&T characteristic.

TYPE: GDnTReference | None

material_condition

Material condition (e.g., maximum material condition).

TYPE: GDnTMaterialCondition | None DEFAULT: None

state

State of the feature (e.g., free state).

TYPE: GDnTState | None DEFAULT: None

datums

List of datums used as references for the GD&T characteristic.

TYPE: list[GDnTDatum] DEFAULT: <dynamic>

Source code in werk24/models/v2/models.py
class GDnT(Feature):
    """
    Represents a GD&T (Geometric Dimensioning and Tolerancing) cue in a technical drawing.
    """

    characteristic: GDnTCharacteristic = Field(
        ...,
        description="The GD&T characteristic being controlled (e.g., flatness, circularity).",
    )
    zone: Optional[GDnTZone] = Field(
        ..., description="The tolerance zone defined for the characteristic."
    )
    feature: Optional[GDnTFeature] = Field(
        ..., description="The feature being controlled by the GD&T characteristic."
    )
    reference: Optional[GDnTReference] = Field(
        ..., description="The reference for the GD&T characteristic."
    )
    material_condition: Optional[GDnTMaterialCondition] = Field(
        None, description="Material condition (e.g., maximum material condition)."
    )
    state: Optional[GDnTState] = Field(
        None, description="State of the feature (e.g., free state)."
    )
    datums: list[GDnTDatum] = Field(
        default_factory=list,
        description="List of datums used as references for the GD&T characteristic.",
    )