AskViewImages
Request
AskViewImages
represents a request to extract view images from a technical drawing. Unlike full-sheet images, view images focus on individual views within the drawing, capturing specific projections, sectional views, and detail views. These extracted images are useful for automated processing, visualization, and further analysis of technical components.
This feature is particularly beneficial for:
- Detailed inspections of specific drawing sections.
- Entertaining users while waiting for the extraction to complete.
Example Usage
from werk24 import AskViewImages, read_example_drawing
# Load a sample drawing
test_drawing = read_example_drawing()
# Create the request
request = AskViewImages()
# Send the request
results = read_example_drawing(test_drawing, [request])
# Save extracted view images to the file system
for i, view_response in enumerate(results.get("ASK_VIEW_IMAGES", [])):
path = f"view_image_{i+1}.png"
with open(path, "wb+") as fid:
fid.write(view_response.payload_bytes)
print(f"View image saved: {path}")