pyboxbuilder.project.manifest.ProjectManifest

class pyboxbuilder.project.manifest.ProjectManifest(name: str, game_box_size: tuple[float, float, float] | None = None, wall_thickness: float = 2.0, floor_thickness: float = 1.6, lid_thickness: float = 2.0, rounding: float | None = None, inner_rounding: float | None = None, gap_threshold: float = 10.0, min_spacer_dim: float = 15.0, min_spacer_height: float = 10.0, max_height_absorb: float = 10.0, clearance_slack: float | None = None, board_thickness: float = 0.0, board_on_bottom: bool = False, ribbon_channels: bool = False, generate_spacers: bool = True, box_defaults: dict[str, Any] | None = None, boxes: list[BoxBuilder] = <factory>, boards: list[GameBoard] = <factory>, components: list[GameComponent] = <factory>, shared_groups: list[tuple[list[str], list[tuple[str, float, float, float]]]] = <factory>, stack_groups: list[tuple[str, ...]] = <factory>, piece_bounds: tuple[PieceBounds, ...] = <factory>)[source]

Bases: object

Catalog of registered boxes, metadata, and configuration options (FR-093).

add_board(board: GameBoard) → GameBoard[source]

Register a non-printed game board region into the manifest.

add_box(builder: BoxBuilder) → BoxBuilder[source]

Register a box builder into the manifest.

add_component(component: GameComponent) → GameComponent[source]

Register a declared game component into the manifest inventory.

by_label(label: str) → BoxBuilder[source]

Find a sub-box builder by label.

Parameters:
label: str

The label of the box to find.

Returns:

The matching BoxBuilder.

Raises:

ValueError – If no box with that label exists.

get_by_label(label: str) → BoxBuilder | None[source]

Find a sub-box builder by label, or None if not found.

board_on_bottom : bool = False

Whether reserved board space sits at the bottom (z = 0..board_thickness).

board_thickness : float = 0.0

Thickness of the game board (mm) reserved at the top (or bottom if board_on_bottom).

property board_z_offset : float

Starting Z height (mm) of usable insert space above bottom-stored boards.

boards : list[GameBoard]

Registered non-printed game boards / screens / playmats occupying partial box space.

box_defaults : dict[str, Any] | None = None

Defaults applied to every box that does not say otherwise.

boxes : list[BoxBuilder]

Registered sub-box builders in definition order.

clearance_slack : float | None = None

Clearance slack on each side of the game box in the X/Y directions (mm).

components : list[GameComponent]

Declared physical game component inventory that boxes and boards must account for.

property effective_game_box_size : tuple[float, float, float] | None

Dimensions available for sub-boxes, accounting for board thickness.

floor_thickness : float = 1.6

Default floor thickness.

game_box_size : tuple[float, float, float] | None = None

Outer game box dimensions [W, L, H] in mm. None = standalone boxes (no game box).

gap_threshold : float = 10.0

Gaps <= this are absorbed by adjacent boxes.

generate_spacers : bool = True

Whether to automatically generate spacer boxes/trays to fill layout gaps.

inner_rounding : float | None = None

Edge radius where a partial lid grips the body (FR-044b).

lid_thickness : float = 2.0

Default lid thickness.

max_height_absorb : float = 10.0

Maximum vertical gap (mm) absorbed by growing a top-exposed box instead of adding a small spacer.

min_spacer_dim : float = 15.0

Minimum spacer width/length before absorption.

min_spacer_height : float = 10.0

A spacer tray shorter than this in Z is dropped rather than printed as a thin wafer (FR-014).

name : str

Game name; becomes the output subdirectory.

piece_bounds : tuple[PieceBounds, ...]

Bounding box of every exported piece, populated by export.

property resolved_clearance_slack : float

Return the resolved clearance slack, scaling with game box size if None.

ribbon_channels : bool = False

Cut bottom groove for lifting ribbon on all sub-boxes by default.

rounding : float | None = None

Edge radius for every box’s exposed edges (FR-043/FR-044).

stack_groups : list[tuple[str, ...]]

Ordered bottom-to-top box label chains registered via Project.stack_order().

wall_thickness : float = 2.0

Default wall thickness for all sub-boxes.