preview_model
Render a model as PrusaSlicer will transform it to verify shape and orientation before slicing; returns a PNG with size caption.
Instructions
Draw a picture of a model, to check its shape and which way up it is before slicing.
With rotate_*, scale or scale_to_fit it draws the model as PrusaSlicer will transform it, by asking PrusaSlicer itself, so an orientation can be checked before spending a slice on it. Returns a PNG and a caption with its size. PrusaSlicer prints with z up too, so a model that looks to be lying on its side will be printed that way (scans are often Y-up).
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": {
"model_path": "<model_path>"
},
"name": "preview_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Picture width and height in pixels | |
| view | No | iso (default), front, side or top; sheet puts all four in one picture. Z is up, and the model is drawn centred, as stored unless you give transforms. | iso |
| scale | No | Scale factor: 0.5 is half size, 2 is double. Not a percentage. Not with scale_to_fit. | |
| rotate_x | No | Degrees to rotate about the X axis. PrusaSlicer applies rotations in the fixed order X, then Y, then Z, whatever order you think of them. 90 or -90 stands a model that lies along Y upright, e.g. a Y-up scan (check with preview_model first). Exactly +-90 about Y combined with a Z rotation can come out differently from that order: preview_model shows what PrusaSlicer really does. | |
| rotate_y | No | Degrees to rotate about the Y axis (applied after rotate_x). | |
| rotate_z | No | Degrees to rotate about the vertical Z axis (applied last). | |
| model_path | Yes | Absolute path to an STL/3MF/OBJ/STEP file | |
| close_holes | No | Draw the model with its flat holes capped, as slice_model(close_holes=true) would slice it: see what the base of a scan looks like once closed. Not for PrusaSlicer projects. | |
| scale_to_fit | No | [x, y, z] in mm: scale the model uniformly to fit inside this box, e.g. the bed size. Not with scale. |