Skip to content

Chamfer

The Chamfer model records beveled edges that the drawing specifies for corners or hole entrances. It stores the size and angle defining the chamfer geometry, each with tolerances where specified, along with the quantity, the label as it appears on the drawing, and a confidence score. By normalizing the annotation, the API enables you to automatically program deburring operations, verify compliance with machining standards, or compare revisions that tweak edge break dimensions. Whether the drawing calls out a 45° x 1 mm chamfer or another size-angle combination, this model captures the extracted values so downstream tools can ensure sharp edges are relieved as intended.

Bases: Feature

Represents a chamfer feature in an engineering or technical drawing.

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

TYPE: int

size

The linear size of the chamfer, such as the width or depth.

TYPE: Size

angle

The angle of the chamfer, typically specified in degrees.

TYPE: Size

Source code in werk24/models/v2/models.py
class Chamfer(Feature):
    """
    Represents a chamfer feature in an engineering or technical drawing.
    """

    quantity: int = Field(
        ...,
        ge=1,
        description="The number of chamfers or instances. Must be at least 1.",
    )

    size: Size = Field(
        ...,
        description="The linear size of the chamfer, such as the width or depth.",
        examples=[
            Size(
                size_type=SizeType.LINEAR,
                value=Decimal("2"),
                tolerance=Tolerance(
                    tolerance_grade="IT7",
                    deviation_lower=Decimal("-0.1"),
                    deviation_upper=Decimal("0.1"),
                    fit=None,
                    is_theoretically_exact=False,
                    is_reference=False,
                    is_approximation=False,
                ),
                unit="millimeter",
            )
        ],
    )

    angle: Size = Field(
        ...,
        description="The angle of the chamfer, typically specified in degrees.",
        examples=[
            Size(
                size_type=SizeType.ANGULAR,
                value=Decimal("45"),
                tolerance=Tolerance(
                    tolerance_grade="IT8",
                    deviation_lower=Decimal("-0.5"),
                    deviation_upper=Decimal("0.5"),
                    fit=None,
                    is_theoretically_exact=False,
                    is_reference=False,
                    is_approximation=False,
                ),
                unit="degree",
            )
        ],
    )