Skip to content

Fastener

The Fastener model records a fastener that a callout on the drawing specifies: hardware pressed into a sheet (for example 3x PEM CLS-M4-2 or Einpressmutter M5), welded onto the part (4x DIN 929 M12, 6x weld stud M6x15), set into a hole (a threaded insert or a rivet nut), or a screw, nut or washer named by its standard (ISO 4762 M6x20). It stores the kind of fastener, the designation, standard and manufacturer as written, the thread and the length where the drawing states them, the quantity, any placement note such as nach innen zeigend, the label as it appears on the drawing, and a confidence score.

fastener_type groups fasteners by how they are joined, which is what decides the manufacturing or assembly step: pressing, welding, inserting or screwing. The thread is the thread of one piece of the fastener, using the same ThreadISOMetric model as the threads list; it is not repeated in threads, because it is not a thread cut into the part. A pitch the drawing does not write is the standard coarse pitch.

length is reported only when the drawing states a length. The number at the end of a PEM nut's part number (the 2 in CLS-M4-2) is a shank code for the sheet thickness, not a length, and is kept in designation only.

A fastener that the bill of material lists carries the same description in BillOfMaterialRow.fastener, so a callout and the BOM row for the same part can be matched field by field.

Bases: FastenerSpecification, Feature

Represents a fastener as a callout on the drawing specifies it (e.g. 3x PEM CLS-M4-2, 4x DIN 929 M12, 6x weld stud M6x15).

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

fastener_type

The kind of fastener, by how it is joined.

TYPE: FastenerType

designation

The designation of the fastener as written on the drawing, with spacing normalized (e.g. PEM CLS-M4-2, DIN 929 M12, ISO 4762 M6x20). None when the drawing names only the kind of fastener and its thread (e.g. Einpressmutter M5).

TYPE: str | None DEFAULT: None

standard

The standard the fastener is specified by, if one is named.

TYPE: str | None DEFAULT: None

manufacturer

The manufacturer, if the designation names one.

TYPE: str | None DEFAULT: None

thread

The thread of one piece of the fastener (e.g. M4 for PEM CLS-M4-2), if it has one. A pitch that is not written is the standard coarse pitch.

TYPE: ThreadISOMetric | ThreadSM | ThreadUTS | ThreadACME | ThreadWhitworth | ThreadKnuckle | ThreadNPT | None DEFAULT: None

length

The length of the fastener, if stated (e.g. 15 in a weld stud M6x15, 20 in ISO 4762 M6x20). A manufacturer's code that is not a length, such as the shank code 2 in PEM CLS-M4-2, is not reported here.

TYPE: Size | None DEFAULT: None

quantity

The number of pieces. Must be at least 1.

TYPE: int

note

Placement text the callout adds, as written (e.g. pointing inward), if any. It says on which side or in which direction the fastener is fitted, which matters to the manufacturing step.

TYPE: str | None DEFAULT: None

Source code in werk24/models/v2/models.py
class Fastener(FastenerSpecification, Feature):
    """
    Represents a fastener as a callout on the drawing specifies it (e.g.
    `3x PEM CLS-M4-2`, `4x DIN 929 M12`, `6x weld stud M6x15`).
    """

    quantity: int = Field(
        ...,
        ge=1,
        description="The number of pieces. Must be at least 1.",
        examples=[3],
    )
    note: Optional[str] = Field(
        None,
        description=(
            "Placement text the callout adds, as written (e.g. `pointing "
            "inward`), if any. It says on which side or in which direction the "
            "fastener is fitted, which matters to the manufacturing step."
        ),
        examples=["pointing inward"],
    )

Bases: BaseModel

Describes a fastener: a press-in nut (e.g. PEM CLS-M4-2), a weld nut (e.g. DIN 929 M12), a weld stud (e.g. M6x15), a screw (e.g. ISO 4762 M6x20) and the like.

The same description is used for a fastener callout on the drawing (Fastener) and for a row of the bill of material that lists the fastener (BillOfMaterialRow.fastener), so the two can be matched.

PARAMETER DESCRIPTION
fastener_type

The kind of fastener, by how it is joined.

TYPE: FastenerType

designation

The designation of the fastener as written on the drawing, with spacing normalized (e.g. PEM CLS-M4-2, DIN 929 M12, ISO 4762 M6x20). None when the drawing names only the kind of fastener and its thread (e.g. Einpressmutter M5).

TYPE: str | None DEFAULT: None

standard

The standard the fastener is specified by, if one is named.

TYPE: str | None DEFAULT: None

manufacturer

The manufacturer, if the designation names one.

TYPE: str | None DEFAULT: None

thread

The thread of one piece of the fastener (e.g. M4 for PEM CLS-M4-2), if it has one. A pitch that is not written is the standard coarse pitch.

TYPE: ThreadISOMetric | ThreadSM | ThreadUTS | ThreadACME | ThreadWhitworth | ThreadKnuckle | ThreadNPT | None DEFAULT: None

length

The length of the fastener, if stated (e.g. 15 in a weld stud M6x15, 20 in ISO 4762 M6x20). A manufacturer's code that is not a length, such as the shank code 2 in PEM CLS-M4-2, is not reported here.

TYPE: Size | None DEFAULT: None

Source code in werk24/models/v2/models.py
class FastenerSpecification(BaseModel):
    """
    Describes a fastener: a press-in nut (e.g. `PEM CLS-M4-2`), a weld nut
    (e.g. `DIN 929 M12`), a weld stud (e.g. `M6x15`), a screw (e.g.
    `ISO 4762 M6x20`) and the like.

    The same description is used for a fastener callout on the drawing
    (`Fastener`) and for a row of the bill of material that lists the
    fastener (`BillOfMaterialRow.fastener`), so the two can be matched.
    """

    fastener_type: FastenerType = Field(
        ...,
        description="The kind of fastener, by how it is joined.",
        examples=[FastenerType.PRESS_IN_NUT],
    )
    designation: Optional[str] = Field(
        None,
        description=(
            "The designation of the fastener as written on the drawing, with "
            "spacing normalized (e.g. `PEM CLS-M4-2`, `DIN 929 M12`, "
            "`ISO 4762 M6x20`). None when the drawing names only the kind of "
            "fastener and its thread (e.g. `Einpressmutter M5`)."
        ),
        examples=["PEM CLS-M4-2"],
    )
    standard: Optional[str] = Field(
        None,
        description="The standard the fastener is specified by, if one is named.",
        examples=["DIN 929"],
    )
    manufacturer: Optional[str] = Field(
        None,
        description="The manufacturer, if the designation names one.",
        examples=["PEM"],
    )
    thread: Optional[ThreadUnion] = Field(
        None,
        description=(
            "The thread of one piece of the fastener (e.g. `M4` for "
            "`PEM CLS-M4-2`), if it has one. A pitch that is not written is "
            "the standard coarse pitch."
        ),
    )
    length: Optional[Size] = Field(
        None,
        description=(
            "The length of the fastener, if stated (e.g. `15` in a weld stud "
            "`M6x15`, `20` in `ISO 4762 M6x20`). A manufacturer's code that is "
            "not a length, such as the shank code `2` in `PEM CLS-M4-2`, is "
            "not reported here."
        ),
        examples=[
            Size(
                size_type=SizeType.LINEAR,
                value=Decimal("15"),
                tolerance=None,
                unit="millimeter",
            )
        ],
    )

Bases: str, Enum

Kinds of fastener a drawing or a bill of material names.

Fastener is meant as in ISO 1891 ("Fasteners - Terminology"): the parts that join other parts. The categories follow how the fastener is joined, because that decides the manufacturing or assembly step.

Joined to the component while it is made:

  • PRESS_IN_NUT: a self-clinching or broaching nut pressed into sheet metal, e.g. PEM types S, CLS or SP (PEM CLS-M4-2), often written "Einpressmutter".
  • PRESS_IN_STUD: a self-clinching stud pressed into sheet metal, e.g. PEM types FH or FHS (PEM FH-M4-10), often written "Einpressbolzen".
  • PRESS_IN_STANDOFF: a self-clinching spacer with a thread or a through hole, e.g. PEM types SO or BSO (PEM SO-M3-8).
  • WELD_NUT: a nut welded onto the part, e.g. a hexagon weld nut to DIN 929 or a square weld nut to DIN 928.
  • WELD_STUD: a threaded stud or pin welded onto the part, e.g. a stud for arc stud welding to ISO 13918.
  • THREADED_INSERT: a thread insert set into a hole, e.g. a wire thread insert to DIN 8140 or a threaded bushing.
  • RIVET_NUT: a blind rivet nut, set from one side of the part.

Separate parts of an assembly, as a bill of material lists them:

  • SCREW: a screw or bolt, e.g. ISO 4762 M6x20 or ISO 4017 M8x30.
  • NUT: a nut that is screwed on, e.g. ISO 4032 M8.
  • WASHER: a washer, e.g. ISO 7089 8 or DIN 125-A 6.4.

  • OTHER: a fastener that fits none of the above, such as a pin or a rivet. designation says what it is.

Source code in werk24/models/v2/enums.py
class FastenerType(str, Enum):
    """Kinds of fastener a drawing or a bill of material names.

    Fastener is meant as in ISO 1891 ("Fasteners - Terminology"): the parts
    that join other parts. The categories follow how the fastener is joined,
    because that decides the manufacturing or assembly step.

    Joined to the component while it is made:

    - PRESS_IN_NUT: a self-clinching or broaching nut pressed into sheet
      metal, e.g. PEM types S, CLS or SP (``PEM CLS-M4-2``), often written
      "Einpressmutter".
    - PRESS_IN_STUD: a self-clinching stud pressed into sheet metal, e.g.
      PEM types FH or FHS (``PEM FH-M4-10``), often written "Einpressbolzen".
    - PRESS_IN_STANDOFF: a self-clinching spacer with a thread or a through
      hole, e.g. PEM types SO or BSO (``PEM SO-M3-8``).
    - WELD_NUT: a nut welded onto the part, e.g. a hexagon weld nut to
      DIN 929 or a square weld nut to DIN 928.
    - WELD_STUD: a threaded stud or pin welded onto the part, e.g. a stud
      for arc stud welding to ISO 13918.
    - THREADED_INSERT: a thread insert set into a hole, e.g. a wire thread
      insert to DIN 8140 or a threaded bushing.
    - RIVET_NUT: a blind rivet nut, set from one side of the part.

    Separate parts of an assembly, as a bill of material lists them:

    - SCREW: a screw or bolt, e.g. ``ISO 4762 M6x20`` or ``ISO 4017 M8x30``.
    - NUT: a nut that is screwed on, e.g. ``ISO 4032 M8``.
    - WASHER: a washer, e.g. ``ISO 7089 8`` or ``DIN 125-A 6.4``.

    - OTHER: a fastener that fits none of the above, such as a pin or a
      rivet. ``designation`` says what it is.
    """

    PRESS_IN_NUT = "PRESS_IN_NUT"
    PRESS_IN_STUD = "PRESS_IN_STUD"
    PRESS_IN_STANDOFF = "PRESS_IN_STANDOFF"
    WELD_NUT = "WELD_NUT"
    WELD_STUD = "WELD_STUD"
    THREADED_INSERT = "THREADED_INSERT"
    RIVET_NUT = "RIVET_NUT"
    SCREW = "SCREW"
    NUT = "NUT"
    WASHER = "WASHER"
    OTHER = "OTHER"