Read-only 3D placement validity policy seam. Runtime placement and development proof tooling consume this evaluator through one shared policy implementation. Everything here is static and side-effect free: callers supply explicit read-only state and receive typed reasons, per-cell evidence, and the resolved support facts used by preview/commit.
Source: addons/grid_placement/systems/building/3d/placement_validation_3d.gd
Syntax
class PlacementValidation3D extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
GRID_BOUND | Field | Typed rejection reasons for one placement attempt. GridMap components are only addressable inside +/-2^20; cells at or past the bound (including the INT_MAX MISS sentinel) fail closed here so no GridMap call ever sees them. |
SPAN_OVERLAP_EPSILON | Field | Minimum span penetration (meters) that counts as an EDGE overlap. Touching end-to-end (zero-area contact) stays legal; true overlaps penetrate by decimeters, so a millimeter guard only absorbs float dust. |
reasons | Property | Structured result of one validation attempt. Bitmask of [enum Reason] flags. |
issues | Property | Human-readable aggregate issue strings, layered on [member reasons]. |
evidence | Property | Read-only evidence for preview/commit/diagnostic consumers. |
cell_issues | Property | CELL-only projection: footprint cell -> blocking issue strings. |
is_valid | Method | |
has_reason | Method | |
reject | Method | |
reject_at | Method | |
add_cell_issue | Method | |
cell_issue_map | Method | |
grid | Property | Read-only context for one validation attempt. |
settings | Property | |
world_3d | Property | Physics world used only when surface support mode opts into physics. |
occupied | Property | Occupied cells: column key (Vector3i) -> bool/node. |
families | Property | Column key -> family name for adjacent-snap checks. |
overlay_nodes | Property | Column key -> Array[Node3D] of the non-occupying CELL overlays (floors, roofs) stacked on the column. Attachment reads consult BOTH channels via _overlay_union_for: an overlay shares its column with an occupant, and either may be the partner. Raw stacks ride the context so unions derive lazily per queried column, never eagerly per attempt. |
world_registry | Property | |
preview_yaw_steps | Property | |
faces | Property | |
face_occupancy | Property | |
face_families | Property | |
edges | Property | |
edge_families | Property | |
tops | Property | |
top_families | Property | |
corners | Property | |
placement_records | Property | Placed root -> PlacementMount, for same-type EDGE replacement checks. |
validate_cell | Method | |
result | Property | |
cells | Property | |
profile | Property | |
occupy_columns | Property | |
survey | Property | |
min_surface | Property | GridMap surface range of one CELL footprint, read by the support stage. |
max_surface | Property | |
missing_ground | Property | |
survey | Property | |
floating_columns | Property | |
surface | Property | |
top_row | Property | |
support_mode | Property | |
use_grid_authority | Property | |
required | Property | |
samples | Property | |
support | Property | |
settings | Property | |
requires_ground | Property | |
surface | Property | |
conflict_cells | Property | |
first_conflict | Property | |
conflict | Property | |
snap_issue | Property | |
lacking | Property | |
partner_dirs | Property | |
lacking_support | Property | |
lacking_span | Property | |
validate_cell_map | Method | |
validate_edge | Method | |
result | Property | |
edge_key | Property | |
span_issue | Property | |
profile | Property | |
cell_key | Property | |
out | Property | |
mount | Property | |
fam | Property | |
overlay_columns_for_family | Method | |
out | Property | |
is_same_type_edge_replace | Method | |
occupying_family | Property | |
profile | Property | |
occupant | Property | |
mount | Property | |
occupant_group | Property | |
candidate | Property | |
node | Property | |
mount | Property | |
other | Property | |
empty | Property | |
size | Property | |
measured | Property | |
center | Property | |
local | Property | |
yaw | Property | |
validate_face | Method | |
result | Property | |
face_key | Property | |
height_band | Property | |
occupancy_key | Property | |
profile | Property | |
family | Property | |
validate_top | Method | |
result | Property | |
top_key | Property | |
profile | Property | |
existing_family | Property | |
can_stack | Property | |
deck | Property | |
walls | Property | |
pair | Property | |
edge_key | Property | |
family | Property | |
validate_corner | Method | |
result | Property | |
key | Property | |
profile | Property | |
validate_move_drop | Method | |
profile | Property | |
edge_key | Property | |
edge_issues | Property | |
face_key | Property | |
cell_issues | Property | |
cells | Property | |
key | Property | |
east | Property | |
west | Property | |
east_west | Property | |
north | Property | |
south | Property | |
north_south | Property | |
empty | Property | |
east | Property | |
west | Property | |
east_west | Property | |
north | Property | |
south | Property | |
north_south | Property | |
empty | Property | |
settings | Property | |
settings | Property | |
topology | Property | |
candidates | Property | |
cell_size | Property | |
center | Property | |
point | Property | |
TOUCH_EPSILON | Field | |
node | Property | |
box | Property | |
host | Property | |
x_neighbor | Property | |
z_neighbor | Property | |
x_cells | Property | |
z_cells | Property | |
x_yaw | Property | |
z_yaw | Property | |
node | Property | |
components | Property | |
instance | Property | |
mount | Property | |
has_compatible_neighbor | Method | |
compatible_neighbor_dirs | Method | |
dirs | Property | |
WALL_SUPPORT_RADIUS | Field | Chebyshev radius (cells) of the wall-support zone for CELL pieces with [member PlacementSnapProfile3D.require_wall_support]. The house roof slopes span ~7.6 m from a 2x2 anchor, so the walls under the eaves sit up to 2 cells from the anchor cells; radius 2 keeps the canonical deck + wall ring green while a bare deck reads red. |
footprint_cells_without_wall_support | Method | |
lacking | Property | |
ROOF_SPAN_RADIUS | Field | Chebyshev radius (cells) of the roof-span zone for CELL pieces with [member PlacementSnapProfile3D.require_roof_span]. Roof slope meshes span ~7.6 m from a 2x2 anchor, so a gable capping the span end sits up to 3 cells from the nearest roof column; radius 4 keeps the canonical house green while a gable in a roofless ring reads red. |
footprint_cells_without_roof_span | Method | |
lacking | Property | |
zone | Property | |
unions | Property | |
anchor_key | Property | |
yaw | Property | |
mount | Property | |
seen | Property | |
zone | Property | |
key | Property | |
footprint_cells_without_support | Method | |
lacking | Property | |
offsets | Property | |
neighbor | Property | |
neighbor_key | Property | |
reason | Property | |
issue | Property | |
lifecycle_reason_for | Method |