pyboxbuilder.preview.PreviewPiece

class pyboxbuilder.preview.PreviewPiece(label: str, solid: Bosl2Solid, color: Color, kind: str)[source]

Bases: object

One solid in a preview, with the colour it should be drawn in.

Each box, lid and spacer is a separate piece — the preview never unions them, since a union collapses these colours into one.

color : Color

The colour to draw this piece in.

kind : str

One of "body", "lid" or "spacer".

label : str

The piece’s box label; lids and spacers keep their box’s label.

solid : Bosl2Solid

The built geometry, already translated to its packed position.