Skip to content

RoughnessCondition

RoughnessCondition represents a single requirement line inside a roughness symbol. It records whether the condition is an upper, lower, or average limit, the roughness parameter being controlled (such as Ra or Rz), the limit value, and any roughness grade (e.g., N7) stated instead of a numeric value. It also captures the measurement details written alongside the requirement: the filter type, the lambda-s and lambda-c cutoff wavelengths, the evaluation length, and the acceptance criterion (16%, max, or mean). Having these details structured helps inspection programs configure instruments correctly, avoids misapplying finish criteria, and clarifies for suppliers exactly how each roughness limit is to be verified.

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"],
    )