Skip to content

ThreadSpacing

ThreadSpacing captures the spacing of a threaded feature in both common conventions: the pitch in millimetres and the equivalent number of threads per inch. Having both values in a dedicated object means downstream tools can work in metric or imperial units without conversion errors, correctly model the thread geometry, and select the right tooling or inspection strategies. The explicit spacing is also helpful when coordinating with suppliers and when detecting anomalies between nominal and measured thread advance.

Bases: BaseModel

Represents the spacing of a thread, defining the distance between thread crests.

PARAMETER DESCRIPTION
pitch_in_mm

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

TYPE: Decimal

threads_per_inch

The number of threads per inch (TPI) for imperial threads. Must be non-negative.

TYPE: Decimal

Source code in werk24/models/v2/models.py
class ThreadSpacing(BaseModel):
    """
    Represents the spacing of a thread, defining the distance between thread crests.
    """

    pitch_in_mm: Decimal = Field(
        ...,
        description="The pitch of the thread, defining the distance between thread crests.",
    )

    threads_per_inch: Decimal = Field(
        ...,
        ge=0,
        description="The number of threads per inch (TPI) for imperial threads. Must be non-negative.",
        examples=[Decimal("20")],
    )