Coxel Module
Coxel (Collection of Hexels) Defines the primary building blocks of the Hygrid Woven Ensemble. Orchestrates spatial configurations as the second stage in the hierarchy: Hexel-Coxel-Xyxel-Zaxel.
Types
| Type | Description |
|
Coxel type consists of hexels and properties. |
|
|
Coxels are primarily a collections of unique hexels Coxel type properties |
Functions and values
| Function or value |
Description
|
The primary deterministic spatial clustering engine. Concurrently grows multiple room clusters from their respective seed bases up to their target capacities while avoiding collisions and obstacles.
Example
val livingBase: obj
val program: (obj * obj * obj * obj) array
val rooms: obj
|
|
Full Usage:
coxelChildren sqn elv bsCx tre occ
Parameters:
Sqn
-
Traversal sequence.
elv : int
-
Elevation layer.
bsCx : Cxl
-
Parent host Coxel.
tre : (Prp * Prp * Prp)[]
-
Array of (RefId, Count, Label) specifications for the branch.
occ : Hxl[]
-
Already occupied hexels.
Returns: Cxl * Cxl array * Hxl array
Updated parent Coxel, generated child Coxels, and updated occupied hexels.
|
Generates child Coxels hierarchically grown around a parent Coxel host according to a branch specification.
Example
val branch: (obj * obj * obj) array
val updatedParent: obj
val children: obj
val newOcc: obj
|
Full Usage:
createBaseCoxel sqn elv bsAtr entryFallback id ct lb occ bsHxSetOverride
Parameters:
Sqn
-
Traversal sequence.
elv : int
-
Elevation layer.
bsAtr : string
-
Base coordinate string (e.g. "0" or "10,20").
entryFallback : Hxl
-
Fallback coordinate hexel if bsAtr is "0".
id : Prp
-
Property identifier for the root.
ct : Prp
-
Property count / cell capacity.
lb : Prp
-
Property label.
occ : Hxl[]
-
Already occupied hexels.
bsHxSetOverride : Cxl option
-
Optional parent Coxel to inherit footprint from.
Returns: Cxl * Hxl array
Tuple of the constructed root Coxel and the updated occupied hexel array.
|
Creates the base/root Coxel for a layout, either initialized from entry point coordinates or inherited from a parent Coxel.
Example
val rootCxl: obj
val occ: obj
union case Option.None: Option<'T>
|
|
Computes the topological spatial adjacency matrix across all room clusters, determining which spaces share common boundary walls.
Example
val names: obj
val adjacencyMatrix: obj
|
|
Computes the geometric centroid cell coordinate (x, y) of a room cluster, finding the nearest member hexel to the true mathematical center.
Example
val cx: obj
val cy: obj
|
|
|
|
Categorizes and extracts all constituent cells of a Coxel into structural zones (Core, Periphery, Border, Available).
Example
val breakdown: obj
|
|
Computes the continuous 2D perimeter boundary coordinates along the outer edge of a room cluster.
Example
val perimeterCoords: obj
|
|
Serializes only the anchor base coordinate of a Coxel into a single Base34 coordinate pair (e.g. "0.0").
Example
val baseStr: obj
|
|
Serializes all cell coordinates of a Coxel into space-separated Base34 coordinate pairs (e.g. "0.0 2.0 1.-2").
Example
val coordsStr: obj
|
|
Extracts the string value from any Coxel property (Prp) tag (Label, Refid, or Count).
Example
val label: obj
val count: obj
|
Hywe