pyboxbuilder.preview

View-time helpers for pyboxbuilder.Project.show().

Nothing in this module affects exported geometry. Colours assigned here are a preview aid so a viewer can tell one box from another; the material a box prints in is decided by the exporter, not by this file.

Classes

PreviewPiece

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

Functions

layer_heights

Return the distinct Z levels boxes rest at, lowest first.

lid_color

Return the preview colour for a lid sitting on a box of box_color.

lighten

Lift a colour towards white, preserving its alpha.

remove_top_layers

Drop the top count vertical layers from a set of placements.

spacer_color

Return the preview colour for a spacer tray — always a variant of grey.

stable_color

Assign a distinct, stable preview colour to a box label.

with_alpha

Return color at a new alpha.