default¶
Python reference for nagasim.appearance.default. Provisional: it may change between minor versions, see Appearance.
The value of a look field that a piece does not set.
Lengths are metres. Only a pallet's leg_spacing depends on the rest of the look: legs every
1.5 m when its height is above RAISED_PALLET_M, else 0 (no legs). Where the legs and
the drive go is in look_of.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kind
|
str
|
A conveyor type that has field (see |
required |
field
|
str
|
A look field name. |
required |
look
|
mapping
|
The piece's stored look (its |
None
|
Returns:
| Type | Description |
|---|---|
(float, int or str)
|
The default value. |
Raises:
| Type | Description |
|---|---|
KeyError
|
When kind or field is unknown. |
See Also
nagasim.appearance.look_of : Every field of a piece, and where legs and drive go. nagasim.appearance.fields_of : The fields a type takes.
Examples:
>>> from nagasim.appearance import default
>>> default("pallet", "leg_spacing"), default("pallet", "leg_spacing", {"height": 0.5})
(0, 1.5)