Skip to content

RoughnessCondition

RoughnessCondition defines conditional statements that modify how surface roughness should be interpreted. Drawings often include instructions like “after heat treatment,” “unless otherwise specified,” or “machined surfaces only,” and this model captures those qualifiers. It stores the triggering condition, affected surfaces, links to the base Roughness requirement, and any process steps that must occur beforehand. Having these conditions structured helps you plan process sequences, ensure inspection occurs at the correct stage, and avoid misapplying finish criteria. The additional context also aids communication with suppliers by clarifying exactly when a roughness callout is applicable and by highlighting conditions that might require special tooling or masking.

Bases: BaseModel

Represents a condition for surface roughness specified on a technical drawing.

PARAMETER DESCRIPTION
condition_type

Specifies whether the condition applies to the upper limit, lower limit, or average of the roughness.

TYPE: RoughnessConditionType | None

filter_type

The filter used during roughness measurement (e.g., Gaussian, Spline).

TYPE: RoughnessFilterType | None

lambda_s

The short wavelength cutoff for filtering, if specified.

TYPE: Size | None DEFAULT: None

lambda_c

The long wavelength cutoff for filtering, if specified.

TYPE: Size | None DEFAULT: None

parameter

The roughness parameter being evaluated (e.g., Ra, Rz, Rt).

TYPE: RoughnessParameter | None

evaluation_length

Details of the evaluation length used for roughness measurement.

TYPE: Quantity | None DEFAULT: None

acceptance_criterion

Specifies the acceptance rule for the roughness condition (e.g., 16%-rule, maximum, mean).

TYPE: RoughnessAcceptanceCriterion | None

value

The target roughness value specified in the condition.

TYPE: Size | None

roughness_grade

An optional roughness grade (e.g., N6, N7) associated with the condition.

TYPE: str | None DEFAULT: None

Source code in werk24/models/v2/models.py
class RoughnessCondition(BaseModel):
    """
    Represents a condition for surface roughness specified on a technical drawing.
    """

    model_config = ConfigDict(arbitrary_types_allowed=True)

    condition_type: Optional[RoughnessConditionType] = Field(
        ...,
        description="Specifies whether the condition applies to the upper limit, lower limit, or average of the roughness.",
    )
    filter_type: Optional[RoughnessFilterType] = Field(
        ...,
        description="The filter used during roughness measurement (e.g., Gaussian, Spline).",
    )
    lambda_s: Optional[Size] = Field(
        None,
        description="The short wavelength cutoff for filtering, if specified.",
    )
    lambda_c: Optional[Size] = Field(
        None,
        description="The long wavelength cutoff for filtering, if specified.",
    )
    parameter: Optional[RoughnessParameter] = Field(
        ...,
        description="The roughness parameter being evaluated (e.g., Ra, Rz, Rt).",
    )
    evaluation_length: Optional[Quantity] = Field(
        None,
        description="Details of the evaluation length used for roughness measurement.",
    )
    acceptance_criterion: Optional[RoughnessAcceptanceCriterion] = Field(
        ...,
        description="Specifies the acceptance rule for the roughness condition (e.g., 16%-rule, maximum, mean).",
    )
    value: Optional[Size] = Field(
        ...,
        description="The target roughness value specified in the condition.",
    )
    roughness_grade: Optional[str] = Field(
        None,
        description="An optional roughness grade (e.g., N6, N7) associated with the condition.",
        examples=["N6"],
    )