Skip to content

Undercut

The Undercut model records a groove that the drawing specifies by a standard rather than by size: a thread undercut at the end of a thread (for example DIN 76-B) or a relief groove at a shoulder of a turned or ground part (for example DIN 509-E0,8x0,3). It stores the standard and the form as written, the radius and depth where the drawing states them, the quantity, the label as it appears on the drawing, and a confidence score.

A thread undercut usually states only its form, because the standard derives the groove from the thread pitch; radius and depth are then null. A relief groove states form, radius and depth, which lets you pick the grooving tool and check the transition radius without reading the standard yourself.

Bases: Feature

Represents an undercut specified by a standard: a thread undercut (e.g. DIN 76-B) or a relief groove at a shoulder (e.g. DIN 509-E0,8x0,3).

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

TYPE: int

undercut_type

Whether this is a thread undercut or a relief groove.

TYPE: UndercutType

standard

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

TYPE: str

form

The form defined by the standard (e.g. B for DIN 76, E for DIN 509), if stated.

TYPE: str | None DEFAULT: None

radius

The radius of the groove, if stated (e.g. 0.8 in E0,8x0,3).

TYPE: Size | None DEFAULT: None

depth

The depth of the groove, if stated (e.g. 0.3 in E0,8x0,3).

TYPE: Size | None DEFAULT: None

Source code in werk24/models/v2/models.py
class Undercut(Feature):
    """
    Represents an undercut specified by a standard: a thread undercut (e.g.
    `DIN 76-B`) or a relief groove at a shoulder (e.g. `DIN 509-E0,8x0,3`).
    """

    quantity: int = Field(
        ...,
        ge=1,
        description="The number of undercuts or instances. Must be at least 1.",
        examples=[1],
    )
    undercut_type: UndercutType = Field(
        ...,
        description="Whether this is a thread undercut or a relief groove.",
        examples=[UndercutType.RELIEF_GROOVE],
    )
    standard: str = Field(
        ...,
        description="The standard the undercut is specified by, as written on the drawing.",
        examples=["DIN 509"],
    )
    form: Optional[str] = Field(
        None,
        description="The form defined by the standard (e.g. `B` for DIN 76, `E` for DIN 509), if stated.",
        examples=["E"],
    )
    radius: Optional[Size] = Field(
        None,
        description="The radius of the groove, if stated (e.g. `0.8` in `E0,8x0,3`).",
        examples=[
            Size(
                size_type=SizeType.LINEAR,
                value=Decimal("0.8"),
                tolerance=None,
                unit="millimeter",
            )
        ],
    )
    depth: Optional[Size] = Field(
        None,
        description="The depth of the groove, if stated (e.g. `0.3` in `E0,8x0,3`).",
        examples=[
            Size(
                size_type=SizeType.LINEAR,
                value=Decimal("0.3"),
                tolerance=None,
                unit="millimeter",
            )
        ],
    )

Bases: str, Enum

Kinds of undercut a drawing specifies by standard.

  • THREAD_UNDERCUT: the run-out groove at the end of a thread, e.g. DIN 76 forms A to D. Its dimensions follow from the thread pitch.
  • RELIEF_GROOVE: the relief groove at a shoulder of a turned or ground part, e.g. DIN 509 forms E, F, G and H, given as E 0.8x0.3 (form, radius x depth).
Source code in werk24/models/v2/enums.py
class UndercutType(str, Enum):
    """Kinds of undercut a drawing specifies by standard.

    - THREAD_UNDERCUT: the run-out groove at the end of a thread, e.g.
      DIN 76 forms A to D. Its dimensions follow from the thread pitch.
    - RELIEF_GROOVE: the relief groove at a shoulder of a turned or ground
      part, e.g. DIN 509 forms E, F, G and H, given as ``E 0.8x0.3``
      (form, radius x depth).
    """

    THREAD_UNDERCUT = "THREAD_UNDERCUT"
    RELIEF_GROOVE = "RELIEF_GROOVE"