Skip to content

CenterHole

The CenterHole model records a center hole that the drawing specifies by a standard (for example DIN 332-A 2,5x5,3 or ISO 6411-A 2/4.25). It stores the standard and the form as written, the pilot and outer diameters where the drawing states them, whether the hole must, may or must not remain on the finished part, the quantity, the label as it appears on the drawing, and a confidence score.

requirement follows ISO 6411. A center hole marked "optional" on the drawing is PERMITTED: it may remain on the finished part but is not required.

Bases: Feature

Represents a center hole specified by a standard (e.g. DIN 332-A 2,5x5,3, ISO 6411-A 2/4.25).

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

TYPE: int

standard

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

TYPE: str

form

The form defined by the standard (e.g. A, B, R), if stated.

TYPE: str | None DEFAULT: None

pilot_diameter

The diameter of the pilot hole (e.g. 2.5 in A 2,5x5,3), if stated.

TYPE: Size | None DEFAULT: None

outer_diameter

The outer diameter of the countersink (e.g. 5.3 in A 2,5x5,3), if stated.

TYPE: Size | None DEFAULT: None

requirement

Whether the center hole must, may or must not remain on the finished part, if stated.

TYPE: CenterHoleRequirement | None DEFAULT: None

Source code in werk24/models/v2/models.py
class CenterHole(Feature):
    """
    Represents a center hole specified by a standard (e.g.
    `DIN 332-A 2,5x5,3`, `ISO 6411-A 2/4.25`).
    """

    quantity: int = Field(
        ...,
        ge=1,
        description="The number of center holes or instances. Must be at least 1.",
        examples=[2],
    )
    standard: str = Field(
        ...,
        description="The standard the center hole is specified by, as written on the drawing.",
        examples=["DIN 332"],
    )
    form: Optional[str] = Field(
        None,
        description="The form defined by the standard (e.g. `A`, `B`, `R`), if stated.",
        examples=["A"],
    )
    pilot_diameter: Optional[Size] = Field(
        None,
        description="The diameter of the pilot hole (e.g. `2.5` in `A 2,5x5,3`), if stated.",
        examples=[
            Size(
                size_type=SizeType.DIAMETER,
                value=Decimal("2.5"),
                tolerance=None,
                unit="millimeter",
            )
        ],
    )
    outer_diameter: Optional[Size] = Field(
        None,
        description="The outer diameter of the countersink (e.g. `5.3` in `A 2,5x5,3`), if stated.",
    )
    requirement: Optional[CenterHoleRequirement] = Field(
        None,
        description="Whether the center hole must, may or must not remain on the finished part, if stated.",
    )

Bases: str, Enum

Whether a center hole must remain on the finished part (ISO 6411).

  • REQUIRED: the center hole is required on the finished part.
  • PERMITTED: the center hole may remain, but is not required (often written as "optional").
  • NOT_PERMITTED: the center hole must not remain on the finished part.
Source code in werk24/models/v2/enums.py
class CenterHoleRequirement(str, Enum):
    """Whether a center hole must remain on the finished part (ISO 6411).

    - REQUIRED: the center hole is required on the finished part.
    - PERMITTED: the center hole may remain, but is not required (often
      written as "optional").
    - NOT_PERMITTED: the center hole must not remain on the finished part.
    """

    REQUIRED = "REQUIRED"
    PERMITTED = "PERMITTED"
    NOT_PERMITTED = "NOT_PERMITTED"