fit_viewport
Fits a drawing into a sheet region by measuring content, selecting the largest standard scale, and resizing the viewport to the drawing. Returns the scale and explanation.
Instructions
Fit the model into a region of a sheet: measures what is drawn, picks the largest STANDARD scale that fits, then sizes the viewport to the drawing instead of to the region. Returns the scale it chose and why.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sheet": "<sheet>",
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>"
},
"name": "fit_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | ||
| x2 | Yes | ||
| y1 | Yes | ||
| y2 | Yes | ||
| layer | No | ||
| sheet | Yes | ||
| locked | No | ||
| margin | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |