Skip to content

General Surface Roughnesses

General surface roughness is used to avoid the nessesity of repeating a complicated indication multiple times, or when there is a space constraint on the drawing, or when the same surface roughness is required on a large number of surfaces of the workpiece.

  • When majority of surfaces require the same surface roughness

  • When a special deviating surface roughness is required on some of the surfaces

Models

The data models are defined in the following two models:

Through Title Block

Extracted information can be accessed from the following Model.

W24GeneralRoughness

General Roughness object

Attributes:

blurb: String for human consumption

general_roughnesses: Surface Roughness Specification required for all surfaces of a workpiece. Unless any deviation is specified.

deviating_roughnesses: Indicates deviations from the general surface roughness requirements.

Properties

  • position: Default: None.

  • blurb (string)

  • general_roughnesses (array)

  • Items: Refer to #/$defs/W24RoughnessLabel.

  • deviating_roughnesses (array)

  • Items: Refer to #/$defs/W24RoughnessLabel.

Requesting the General Roughnesses

from werk24 import Hook, W24AskTitleBlock
from werk24.models.techread import W24TechreadMessage
from werk24.utils import w24_read_sync

# define a function to read a file and return it as bytes
from . import get_drawing_bytes


def recv_title_block(message: W24TechreadMessage) -> None:
    """ Print the Weight when we received it
    """
    if message.is_successful:
        print(message.payload_dict.get('weight'))
    else:
        print("Exceptions occurred: {message.exceptions}")


if __name__ == "__main__":

    # get your drawing bytes from a file or buffer
    drawing_bytes = get_drawing_bytes()

    # define what information you want to receive from the API
    # and what shall be done when the info is available.
    hooks = [Hook(ask=W24AskTitleBlock(), function=recv_title_block)]

    # submit the request to the Werk24 API
    w24_read_sync(drawing_bytes, hooks)