pyboxbuilder.compartments.hex_grid

Hex-grid compartment layout — hexagonal tile cutouts with push block and finger hole.

Ports the HexGridWithCutouts behaviour from the original toolkit. Layout math is pure Python; geometry generation delegates to pybosl2.

Classes

HexCell

Position of a single hex cell within a grid.

HexGridSpec

Configuration for a hex-grid compartment (FR-040).

Functions

build_hex_grid

Build the hexagonal cutout solid for a hex-grid compartment.

compute_hex_layout

Compute the (x, y) center of every hex cell in a rows×cols grid.

hex_grid_bounds

Compute the bounding (width, length) of a hex grid.