Skip to content

Thread

Thread captures generic thread specifications from the drawing. It stores the label as written on the drawing, the quantity called out, the nominal diameter, the thread spacing (as pitch in millimetres and threads per inch), the handedness (left- or right-handed), and the thread depth when specified. A confidence score flags detections that may deserve manual review. With this information, manufacturing software can select tooling, verify compatibility with fasteners, or estimate machining time. The structured representation also aids inspection and procurement by highlighting critical threaded features across the document. Standard-specific variants such as ThreadISOMetric or ThreadUTS extend this base with additional attributes.

Bases: Feature

Represents a generic threaded feature in an engineering or 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

quantity

The number of threads or instances. Must be non-negative.

TYPE: Decimal

diameter

The diameter of the thread, including nominal size and tolerances.

TYPE: Size

spacing

The spacing of the thread, defining the distance between thread crests.

TYPE: ThreadSpacing | None

handedness

The direction of the thread, such as LEFT or RIGHT.

TYPE: ThreadHandedness

depth

The length of the threaded feature, including nominal size and tolerances.

TYPE: Depth | None DEFAULT: None

Source code in werk24/models/v2/models.py
class Thread(Feature):
    """
    Represents a generic threaded feature in an engineering or technical drawing.
    """

    quantity: Decimal = Field(
        ...,
        ge=0,
        description="The number of threads or instances. Must be non-negative.",
        examples=[Decimal("1")],
    )

    diameter: Size = Field(
        ...,
        description="The diameter of the thread, including nominal size and tolerances.",
    )

    spacing: Optional[ThreadSpacing] = Field(
        ...,
        description="The spacing of the thread, defining the distance between thread crests.",
    )

    handedness: ThreadHandedness = Field(
        ..., description="The direction of the thread, such as LEFT or RIGHT."
    )

    depth: Optional[Depth] = Field(
        default=None,
        description="The length of the threaded feature, including nominal size and tolerances.",
    )