Skip to content

AskBalloons (Auxiliary)

Requires a AskFeature request

This is an auxiliary request that must be accompanied by an AskFeature request. It associates a balloon with each detected feature. If no AskFeature request is provided, the response will return an empty list.

Description

AskBalloons is a request object used to extract balloon annotations from a technical drawing. Balloons are typically used in engineering drawings to highlight key elements and reference specific features.

Example Usage

from werk24 import AskBalloons, read_example_drawing

read_example_drawing([AskBalloons()])

ResponseBalloons

Bases: Response

ResponseBalloons is the corresponding response object for AskBalloons. It contains the extracted balloon details from the technical drawing.

PARAMETER DESCRIPTION
ask_version

TYPE: Literal[str] DEFAULT: 'v2'

ask_type

TYPE: Literal[AskType] DEFAULT: <AskType.BALLOONS: 'BALLOONS'>

balloons

The balloons in the technical drawing.

TYPE: List[Balloon]

Source code in werk24/models/v2/responses.py
class ResponseBalloons(Response):
    """
    `ResponseBalloons` is the corresponding response object for `AskBalloons`.
    It contains the extracted balloon details from the technical drawing.

    """

    ask_type: Literal[AskType.BALLOONS] = AskType.BALLOONS
    balloons: List[Balloon] = Field(
        ..., description="The balloons in the technical drawing."
    )

Example Response

{
    "balloons": [
        {
            "reference_id": 1,
            "center": [55, 30]
        },
        {
            "reference_id": 2,
            "center": [100, 75]
        }
    ]
}

This response provides structured data on the detected balloons, allowing further processing or cross-referencing with other extracted features.