Skip to main content

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

FieldValue
DisplayConstruct Curved Wall
Categorybuilding
AccessScriptCheat
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
xfloatyes—Cursor X in cm from the site min corner (snapped to the cell centre)
yfloatyes—Cursor Y in cm from the site min corner (snapped to the cell centre)
sizeintyes—Curved wall size in grid cells, as listed in the in-game catalog (2, 8 or 16)
rotationintno0Tool rotation in degrees: 0, 45, ..., 315
floor_levelintno0Floor level (0 = ground). Above 0 the wall stands on the top of the floor below.
wall_deconamenoNoneWall decoration row id

Returns

Returns a JSON object with the following fields:

FieldTypeRequiredDescription
committedboolyesWhether the command entered the undo history
undoableboolyesWhether building.undo can revert it
has_undoboolyesUndo available after execution
has_redoboolyesRedo available after execution
wall_createdboolyesWhether the curved edge exists in the wall graph afterwards
edge_keyintyesEdge key of the curved wall (same as build.scan_walls edge_key). May exceed 2^53 - prefer edge_key_str.
edge_key_strstringyesedge_key as a decimal string
floor_levelintyesFloor level it was built on
sizeintyesRequested curved wall size
rotationintyesRequested tool rotation
arc_grid_sizeintyesArcGridSize read back from the wall graph
radiusfloatyesCentre-line radius in cm
lengthfloatyesCentre-line arc length in cm
sweep_degfloatyesSigned sweep angle from arc_start to arc_end (counter-clockwise positive)
cursorobjectyesSnapped cursor cell
cursor.xfloatyesX cm
cursor.yfloatyesY cm
centerobjectyesArc centre
center.xfloatyesX cm
center.yfloatyesY cm
arc_startobjectyesCentre-line point at s = 0
arc_start.xfloatyesX cm
arc_start.yfloatyesY cm
arc_endobjectyesCentre-line point at s = length
arc_end.xfloatyesX cm
arc_end.yfloatyesY cm
midobjectyesCentre-line point at s = length/2
mid.xfloatyesX cm
mid.yfloatyesY cm
mid_normalobjectyesUnit normal at the mid point, pointing away from the centre
mid_normal.xfloatyesX
mid_normal.yfloatyesY
mid_tangent_yawfloatyesSite-relative yaw of the arc tangent at the mid point (s increasing)
applied_base_heightfloatyesbase_height used
applied_floor_heightfloatyesfloor_height used (storey elevation)
applied_wall_heightfloatyeswall_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
});