Radii¶
Radii can define the inside and outside curved surfaced on the part. Its also used to show the fillets given to strengthen the edges at connecting faces.
The letter 'R' as shown is used widely in drawings and is short for the word Radius. Radius is the distance from the centre point of a circle to the circumference of a circle. It is always placed in front of the number. For Example, R50, means the circle has a radius of 50mm.
Quantity¶
Some Radii indicators describe several radii on the drawing. (e.g., 3xR5). This information is available in the quantity attribute.
Size¶
The size of the radius is available in the attribute size. It is a W24Size object.
Tolerance¶
Radii are tolerated the same way that measures are. Keep in mind that min./max. tolerances are a lot more frequent for Radii than for measures. When no special tolerances are defined, the general_tolerances apply. All this information is available in the size_tolerance attribute, a W24SizeTolerance
object.
Unit¶
Differentiation between Metric and Imperial measures. A W24UnitLength
enum is returned.
Model¶
Note
W24RadiusLabel
was updated with a typing error in the model. quantity
was earlier mis-typed as quality
. Kindly note this change, as we would remove quality
in the next release.
- Requesting the Radii:W24AskVariantGDTs
- Receiving the Radii: W24AskVariantGDTsResponse
Extracted information can be accessed with the W24Radius Model.
W24Radius¶
Radius Feature
Attributes: radius_id: Unique UUID4 identifier. This can be used to provide automated feedback about customer changes.
label: Label of the radius.
confidence: Werk24 calcualtes an internal confidence score for
reach radius. Depending on your use-case, you might want
to consider or discard low-confidence radii. This value
allows you to do so. The value ranges from 0.0 to 1.0
Properties¶
-
position
: Refer to #/definitions/W24BaseFeaturePosition. -
radius_id
(string) -
label
: Refer to #/definitions/W24RadiusLabel. -
confidence
(number)
Definitions¶
-
W24BaseFeatureCoordinate
(object): Coordinate point
Attributes: x: x position normalized by the thumbnail's width
y: y position normalized by the thumbnail's height. -
x
(number) -
y
(number) -
W24BaseFeaturePosition
(object): Position of the Feature on the individual thumbnails normalized by the width and height of each thumbnail.
Each features position is indicated as a list of coordinates. If the list only has two elements, you are dealing with a line. If it has four or more, you are looking at a polygon
Attributes: page: Position of the Feature on the Page thumbnail
sheet: Position of the Feature on the Sheet thumbnail
sectional: Position of the Feature on the Sectional thumbnail. -
sheet
(array)- Items: Refer to #/definitions/W24BaseFeatureCoordinate.
-
canvas
(array)- Items: Refer to #/definitions/W24BaseFeatureCoordinate.
-
sectional
(array)- Items: Refer to #/definitions/W24BaseFeatureCoordinate.
- W24SizeType
(string): Enumeration class for W24 size types.
Attributes:¶
NOMINAL (str): Nominal size type. DIAMETER (str): Diameter size type. WIDTH_ACROSS_FLATS (str): Width across flats size type. Must be one of: ['NOMINAL', 'DIAMETER', 'SPHERICAL_DIAMETER', 'WIDTHS_ACROSS_FLATS', 'SQUARE']
.
W24UnitLength
(string): Enum of the supported length units . Must be one of:['METER', 'DECIMETER', 'CENTIMETER', 'MILLIMETER', 'FOOT', 'INCH', 'MICRO_INCH']
.
- W24Size
(object): Abstract Base Class for the Sizes.
Attributes:¶
blurb: A blurb for human consumption.
size_type: The type of size for deserialization.
nominal_size: The unit-less nominal size. The unit is attached to the parent object, which also defines the toleration.
unit: Unit of the measure if known. This should typically be inch or millimeter. In some cases it might be possible that the units are unknown.
-
blurb
(string) -
size_type
: Refer to #/definitions/W24SizeType. -
nominal_size
(number) -
unit
: Refer to #/definitions/W24UnitLength. -
W24Tolerance
(object): Abstract Base Class to cover the Tolerances.
Attributes: blurb (str): String representation for human consumption
toleration_type (W24SizeToleranceType): Toleration Type for deserialization. -
blurb
(string) -
toleration_type
(string) -
W24RadiusLabel
(object): Radius Label
Attributes: blurb: String representation of the Radius for human consumption
quantity: Quantity of the annotated radius, e.g., 2 x R4 returns quantity=2
size: Size of the Radius as referred in the drawing.
size_tolerance: Tolerance details of the Radius. Please keep in mind that Radii can carry special tolerances. If none are mentioned on the drawing, the general tolerances apply.
unit: Length units of the size and size_tolerance. In most cases this will be be millimeter (METRIC) or inch (IMPERIAL) and be consistent for the complete drawing. Exceptions are very rare, but exist. -
blurb
(string) -
quality
(integer): Default:1
. -
size
: Refer to #/definitions/W24Size. -
size_tolerance
: Default:{'blurb': '', 'toleration_type': 'GENERAL_TOLERANCES', 'standard': None, 'standard_class': None, 'deviation_lower': None, 'deviation_upper': None, 'tolerance_grade': None}
. -
unit
: Refer to #/definitions/W24UnitLength.
Requesting the Radii¶
from werk24 import Hook, W24AskVariantRadii
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_radii(message: W24TechreadMessage) -> None:
""" Print the Radii when we received them
"""
if message.is_successful:
print(message.payload_dict)
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=W24AskVariantRadii(), function=recv_radii)]
# submit the request to the Werk24 API
w24_read_sync(drawing_bytes, hooks)