Xyxel Module
Xyxel (XY Plane Layout Engine) Orchestrates collections of Coxels to resolve spatial distribution and boundary logic. Handles the horizontal "weaving" as the third stage in the hierarchy: Hexel-Coxel-Xyxel-Zaxel.
Types
| Type | Description |
|
Fully resolved layout context, ready for spatial execution. |
|
|
Contextual parameters and overrides for layout generation. |
|
|
Represents the raw architectural tree with pre-calculated metrics to avoid redundant processing. |
Functions and values
| Function or value |
Description
|
Full Usage:
applyReproportioning boundaryArea tree ratioOverride
Parameters:
int64
-
Total available area of the boundary polygon in grid units.
tree : LayoutTree
-
Raw architectural room tree.
ratioOverride : float option
-
Optional scaling ratio override.
Returns: (Prp * Prp * Prp) array array * float
Tuple of the scaled room tree (Refid, Count, Label)[][] and the final applied ratio.
|
Proportionally scales architectural room areas to fit within a bounded boundary polygon, preserving relative sizing.
Example
val raw: (string * int * string) array array
val tree: obj
val scaledTree: obj
val ratio: obj
union case Option.None: Option<'T>
|
Full Usage:
calculateTargetRatio attrs tree opts
Parameters:
Map<string, string>
-
Map of attribute key-value pairs.
tree : LayoutTree
-
Architectural layout tree.
opts : LayoutOptions
-
Contextual options and overrides.
Returns: float
Computed area scaling ratio float.
|
Calculates the ideal room area scaling ratio for a given layout configuration without preparing the full LayoutContext.
Example
val attrs: Map<string,string>
Multiple items
module Map from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = interface IReadOnlyDictionary<'Key,'Value> interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> interface IEnumerable interface IStructuralEquatable interface IComparable interface IEnumerable<KeyValuePair<'Key,'Value>> interface ICollection<KeyValuePair<'Key,'Value>> interface IDictionary<'Key,'Value> new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> val ofList: elements: ('Key * 'T) list -> Map<'Key,'T> (requires comparison)
val tree: obj
val opts: 'a
module Seq
from Microsoft.FSharp.Collections
union case Option.None: Option<'T>
union case Option.Some: Value: 'T -> Option<'T>
val ratio: obj
|
Full Usage:
generateBaseCxl ctx
Parameters:
LayoutContext
-
Resolved layout context.
Returns: (Cxl * Hxl array) option
Option containing a tuple of the root Coxel and the updated occupied hexels.
|
Extracts the root node from the LayoutContext, establishes boundary obstacle hexels, and generates the initial base Coxel.
Example
union case Option.Some: Value: 'T -> Option<'T>
val rootCxl: obj
val occ: obj
union case Option.None: Option<'T>
|
Full Usage:
generateCxlLayout ctx rootCxl nextOcc
Parameters:
LayoutContext
-
Resolved layout context.
rootCxl : Cxl
-
Root base Coxel.
nextOcc : Hxl[]
-
Occupied hexel coordinates including boundaries and previous rooms.
Returns: Cxl[] * (int * int)[][] * float
Tuple of generated Coxel array, boundary polygon vertex arrays, and applied scaling ratio.
|
Executes spatial construction for a single level, growing child Coxels recursively from the root Coxel according to the architectural tree.
Example
union case Option.Some: Value: 'T -> Option<'T>
val rootCxl: obj
val occ: obj
val rooms: obj
val bounds: obj
val ratio: obj
union case Option.None: Option<'T>
|
Full Usage:
prepareLayoutContext attrs tree opts
Parameters:
Map<string, string>
-
Map of attribute key-value pairs (e.g. "Q", "L", "W", "H", "O", "I").
tree : LayoutTree
-
Architectural layout tree.
opts : LayoutOptions
-
Contextual options and overrides.
Returns: LayoutContext
A fully resolved LayoutContext ready for generation.
|
Resolves all attributes, parses boundary geometries, and calculates scaling ratios into a LayoutContext ready for layout execution.
Example
val attrs: Map<string,string>
Multiple items
module Map from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = interface IReadOnlyDictionary<'Key,'Value> interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> interface IEnumerable interface IStructuralEquatable interface IComparable interface IEnumerable<KeyValuePair<'Key,'Value>> interface ICollection<KeyValuePair<'Key,'Value>> interface IDictionary<'Key,'Value> new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> val ofList: elements: ('Key * 'T) list -> Map<'Key,'T> (requires comparison)
val raw: (string * int * string) array array
val tree: obj
val opts: 'a
module Seq
from Microsoft.FSharp.Collections
union case Option.None: Option<'T>
union case Option.Some: Value: 'T -> Option<'T>
val ctx: obj
|
Full Usage:
tryParseUnion s
Parameters:
string
-
String representation of the case name.
Returns: 'T option
Some case value if matched; otherwise None.
Type parameters: 'T |
Attempts to parse a string value into an F# discriminated union case value by name (case-insensitive).
Example
val sqnOpt: obj
|
Hywe