Skip to content

default_carton_size

Python reference for nagasim.appearance.default_carton_size. Provisional: it may change between minor versions, see Appearance.

The size of a carton whose type declares none, in metres (length, width, height).

0.40 x 0.30 x 0.25 m, scaled uniformly by min(1, max(shortest, 0.10) / 0.40) in a model with a conveyor, so a carton fits the shortest belt. shortest is the least part length a belt gives an unsized part: its part_length, else its type's zone length, else its spacing, in metres. A belt of an unknown type or unit is skipped.

Parameters:

Name Type Description Default
document ModelDocument

The model, ModelDocument.load(path).

required

Returns:

Type Description
tuple of float

(length, width, height) in metres.

See Also

nagasim.appearance.forms_of : Uses this size for a carton that declares none.

Examples:

>>> from nagasim.appearance import default_carton_size
>>> from nagasim.appearance import ModelDocument
>>> default_carton_size(ModelDocument())
(0.4, 0.3, 0.25)