building.construct_curved_wall
Overview
- [Build Mode Only] Builds ONE quarter-circle curved wall exactly as the in-game curved wall tool does: the same arc computation, the same placement check and the same undoable wall command (revert with building.undo). x/y pick the tool's cursor cell in site-relative cm (origin at the site's MINIMUM CORNER, see build.get_site_info coord_space) and are snapped to the cell centre 25k+12.5, like the cursor. With rotation=0 the arc starts at that cell and bends toward +Y around a centre 25(size-1) cm in -X; 'rotation' turns it in 45 degree steps like the tool's rotate key (odd multiples of 45 shift the arc so its chord lands on the grid). 'size' is one of the in-game curved wall sizes (2/8/16). Wall height follows the tool: 300cm, or the height of a wall graph it joins. SUCCESS IS VERIFIED against the wall graph: the curved edge must exist afterwards. The response gives the edge key, the arc centre/radius/length and the arc MID POINT with its outward normal - give that mid point to building.place_object to mount a door or window on the arc. Walls are free. Requires phase == 'ready'.
Metadata
| Field | Value |
|---|---|
| Display | Construct Curved Wall |
| Category | building |
| Access | ScriptCheat |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| x | float | yes | — | Cursor X in cm from the site min corner (snapped to the cell centre) |
| y | float | yes | — | Cursor Y in cm from the site min corner (snapped to the cell centre) |
| size | int | yes | — | Curved wall size in grid cells, as listed in the in-game catalog (2, 8 or 16) |
| rotation | int | no | 0 | Tool rotation in degrees: 0, 45, ..., 315 |
| floor_level | int | no | 0 | Floor level (0 = ground). Above 0 the wall stands on the top of the floor below. |
| wall_deco | name | no | None | Wall decoration row id |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
committed | bool | yes | Whether the command entered the undo history |
undoable | bool | yes | Whether building.undo can revert it |
has_undo | bool | yes | Undo available after execution |
has_redo | bool | yes | Redo available after execution |
wall_created | bool | yes | Whether the curved edge exists in the wall graph afterwards |
edge_key | int | yes | Edge key of the curved wall (same as build.scan_walls edge_key). May exceed 2^53 - prefer edge_key_str. |
edge_key_str | string | yes | edge_key as a decimal string |
floor_level | int | yes | Floor level it was built on |
size | int | yes | Requested curved wall size |
rotation | int | yes | Requested tool rotation |
arc_grid_size | int | yes | ArcGridSize read back from the wall graph |
radius | float | yes | Centre-line radius in cm |
length | float | yes | Centre-line arc length in cm |
sweep_deg | float | yes | Signed sweep angle from arc_start to arc_end (counter-clockwise positive) |
cursor | object | yes | Snapped cursor cell |
cursor.x | float | yes | X cm |
cursor.y | float | yes | Y cm |
center | object | yes | Arc centre |
center.x | float | yes | X cm |
center.y | float | yes | Y cm |
arc_start | object | yes | Centre-line point at s = 0 |
arc_start.x | float | yes | X cm |
arc_start.y | float | yes | Y cm |
arc_end | object | yes | Centre-line point at s = length |
arc_end.x | float | yes | X cm |
arc_end.y | float | yes | Y cm |
mid | object | yes | Centre-line point at s = length/2 |
mid.x | float | yes | X cm |
mid.y | float | yes | Y cm |
mid_normal | object | yes | Unit normal at the mid point, pointing away from the centre |
mid_normal.x | float | yes | X |
mid_normal.y | float | yes | Y |
mid_tangent_yaw | float | yes | Site-relative yaw of the arc tangent at the mid point (s increasing) |
applied_base_height | float | yes | base_height used |
applied_floor_height | float | yes | floor_height used (storey elevation) |
applied_wall_height | float | yes | wall_height used |
Usage
await inzoi.cli.execute('building.construct_curved_wall', {
x: 0.0,
y: 0.0,
size: 0,
rotation: 0, // optional
floor_level: 0, // optional
wall_deco: 'None', // optional
});