Skip to main content

build.scan_walls

Overview

  • List walls in the current site with edge keys and positions. Works in both play mode (character must be inside a building) and build mode. Use the edge_key with build.set_wall_color, build.set_wall_material or building.set_storey_wall_height. When you send it back, use 'edge_key_str' (the same value as a string): edge keys are int64 and large integers get mangled when passed as JSON numbers. building.set_storey_wall_height also accepts x/y, which is simpler still. left/right are the wall segment's endpoints in SITE-RELATIVE CENTIMETRES - the same coordinate space as building.place_object and building.construct_wall - so a point on the segment between them is exactly on the wall centre line. Those centre lines always land on 25*k+12.5cm, which is why hand-picked round coordinates never sit on a wall; building.place_object snaps doors and windows onto them for you. Returns at most 'limit' walls (200 by default) - page with 'offset', and compare 'count' against 'total' to detect truncation.

Metadata

FieldValue
DisplayScan Walls
Categorybuild
AccessPublic
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
floor_levelintno—Filter by floor level (default: all floors)
limitintno200Maximum number of walls to return in the JSON array. 0 means no limit. 'total' always reflects the true match count.
offsetintno0Skip this many matching walls before filling the array (for paging)

Returns

  • Freeform result (shape is not fixed).

{ walls: [ { edge_key: int, edge_key_str: string, floor_level: int, left: {x,y}, right: {x,y}, is_curved: bool, arc_grid_size?: int, arc_radius?: float, arc_length?: float, arc_center?: {x,y}, arc_mid?: {x,y} } ], count: int, offset: int, total: int } — wall elements contain nested left/right position objects, in site-relative centimetres. For a curved wall (is_curved=true) left/right are the arc ends and the arc_* fields describe the centre line; arc_mid is the point at half the arc length. edge_key_str is the same value as a string; send that one back rather than edge_key, because large integers can be mangled in transit.

Usage

await inzoi.cli.execute('build.scan_walls', {
floor_level: 0, // optional
limit: 200, // optional
offset: 0, // optional
});