Skip to content

KeySlot

The KeySlot model records a slot (keyway) for a parallel key, also called a feather key, that the drawing specifies by the key it takes (for example DIN 6885 A 8x7x56). It stores the standard and the form of the key as written, the key's width, height and length, the quantity, the label as it appears on the drawing, and a confidence score.

The key width is the slot width, and the key length is the slot length, so the values are enough to plan the milling operation. The slot depth follows from the standard for the key's size and is not repeated here.

Bases: Feature

Represents a slot (keyway) for a parallel key, also called a feather key, specified by a standard (e.g. DIN 6885 A 8x7x56).

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 key slots or instances. Must be at least 1.

TYPE: int

standard

The standard the key is specified by, as written on the drawing.

TYPE: str

form

The form of the key defined by the standard (e.g. A for round ends), if stated.

TYPE: str | None DEFAULT: None

key_width

The width of the key, and so of the slot (e.g. 8 in 8x7x56).

TYPE: Size

key_height

The height of the key (e.g. 7 in 8x7x56), if stated.

TYPE: Size | None DEFAULT: None

key_length

The length of the key, and so of the slot (e.g. 56 in 8x7x56), if stated.

TYPE: Size | None DEFAULT: None

Source code in werk24/models/v2/models.py
class KeySlot(Feature):
    """
    Represents a slot (keyway) for a parallel key, also called a feather key,
    specified by a standard (e.g. `DIN 6885 A 8x7x56`).
    """

    quantity: int = Field(
        ...,
        ge=1,
        description="The number of key slots or instances. Must be at least 1.",
        examples=[1],
    )
    standard: str = Field(
        ...,
        description="The standard the key is specified by, as written on the drawing.",
        examples=["DIN 6885"],
    )
    form: Optional[str] = Field(
        None,
        description="The form of the key defined by the standard (e.g. `A` for round ends), if stated.",
        examples=["A"],
    )
    key_width: Size = Field(
        ...,
        description="The width of the key, and so of the slot (e.g. `8` in `8x7x56`).",
        examples=[
            Size(
                size_type=SizeType.LINEAR,
                value=Decimal("8"),
                tolerance=None,
                unit="millimeter",
            )
        ],
    )
    key_height: Optional[Size] = Field(
        None,
        description="The height of the key (e.g. `7` in `8x7x56`), if stated.",
    )
    key_length: Optional[Size] = Field(
        None,
        description="The length of the key, and so of the slot (e.g. `56` in `8x7x56`), if stated.",
    )