Skip to content

Roughness

Roughness captures surface texture requirements extracted from the drawing. It records the applicable roughness standard, whether material removal is required, prohibited, or optional, the direction of lay, any machining allowance, and whether the symbol applies all around the contour. The individual requirements (such as Ra or Rz limits) are stored as a list of RoughnessCondition objects, and an optional RoughnessWaviness carries waviness controls. The raw label and a confidence score are preserved as well, together with any manufacturing process noted on the symbol, so CAM or quality teams can plan finishing operations, support quoting, and highlight surfaces that require grinding or polishing to meet specifications.

Bases: Feature

Represents the roughness specifications on a 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

standard

The standard used for defining the roughness specifications (e.g., ISO 1302:1992, ASME Y14.36M-1996).

TYPE: RoughnessStandard

machining_allowance

Additional material allowance for machining, if specified.

TYPE: Size | None DEFAULT: None

material_removal_type

Indicates whether material removal is required, prohibited, or unspecified.

TYPE: RoughnessMaterialRemovalType

applies_all_around

Indicates whether the roughness applies uniformly to the entire surface.

TYPE: bool

direction_of_lay

Specifies the lay direction of the surface texture, if defined (e.g., parallel, perpendicular).

TYPE: RoughnessDirectionOfLay | None DEFAULT: None

manufacturing_process

A description of the manufacturing process that affects surface roughness, if provided.

TYPE: str | None DEFAULT: None

conditions

A list of roughness conditions specifying upper, lower, or average limits for different parameters.

TYPE: list[RoughnessCondition]

waviness

Waviness specifications for the surface, if applicable.

TYPE: RoughnessWaviness | None DEFAULT: None

Source code in werk24/models/v2/models.py
class Roughness(Feature):
    """
    Represents the roughness specifications on a technical drawing.
    """

    standard: RoughnessStandard = Field(
        ...,
        description="The standard used for defining the roughness specifications (e.g., ISO 1302:1992, ASME Y14.36M-1996).",
    )
    machining_allowance: Optional[Size] = Field(
        None,
        description="Additional material allowance for machining, if specified.",
    )
    material_removal_type: RoughnessMaterialRemovalType = Field(
        ...,
        description="Indicates whether material removal is required, prohibited, or unspecified.",
    )
    applies_all_around: bool = Field(
        ...,
        description="Indicates whether the roughness applies uniformly to the entire surface.",
    )
    direction_of_lay: Optional[RoughnessDirectionOfLay] = Field(
        None,
        description="Specifies the lay direction of the surface texture, if defined (e.g., parallel, perpendicular).",
    )
    manufacturing_process: Optional[str] = Field(
        None,
        description="A description of the manufacturing process that affects surface roughness, if provided.",
    )
    conditions: list[RoughnessCondition] = Field(
        ...,
        description="A list of roughness conditions specifying upper, lower, or average limits for different parameters.",
    )
    waviness: Optional[RoughnessWaviness] = Field(
        None,
        description="Waviness specifications for the surface, if applicable.",
    )