pyboxbuilder.project.manifest.GameComponent¶
-
class pyboxbuilder.project.manifest.GameComponent(name: str, count: int, category: str =
'', notes: str ='', location: str ='', kind: str ='piece', size: tuple[float, float] | tuple[float, float, float] | None =None, diameter: float | None =None, thickness: float | None =None, svg: str | None =None, bulk: bool =False)[source]¶ Bases:
objectOne declared physical component type in the board game’s inventory.
Carries both the piece count and optional physical description (card/piece dimensions, thickness, and SVG silhouette path) so boxes can derive their wells directly from the game catalog and
verify_inventory()can verify count conservation, SVG shape coverage, and physical fit.- stack_height(qty: int) float | None[source]¶
Return stacked height in mm for
qtypieces, or None if thickness is unknown.
-
bulk : bool =
False¶ If True, pieces are stored loose in a tray/compartment rather than individual shaped wells.
- property footprint : tuple[float, float] | None¶
Return
(W, L)footprint in mm derived fromsizeordiameter.
-
location : str =
''¶ Optional loose storage location (e.g.
"Inside spacer_1") for items without their own box.