Skip to main content

Module volume

Module volume 

Source
Expand description

The volume chunk (SPEC.md, section 14): meshes that belong to a model and act on it without being printed. Support enforcers and blockers, modifiers, and negative volumes, which the model’s leaf shows already cut, with the model as it was before the cut beside them.

A volume’s mesh is shown by no leaf, so a reader that skips the chunk never prints it. Reserved kinds are carried as they are: a program treats them as absent. How volumes agree with the supports, hollows and roles is checked where the whole file is read and written.

entries   u32 count, then per entry:
          u32 the model's leaf, as a node index in the scene chunk
          u8  the kind: 1 support enforcer, 2 support blocker,
              3 modifier, 4 negative volume, 5 the model before the cut
          u32 the entry's mesh, as a mesh index
          optional string, the entry's name
          u8  has transform; then twelve f64 when it is 1
          byte string, the name of the program the entry belongs to
          u32 the program's version of the document
          byte string, the document

Structs§

VolumeEntry
One entry of the volume chunk.

Enums§

DecodeVolumesError
Why a volume payload could not be decoded.
EncodeVolumesError
Why a list of volumes could not be encoded.

Constants§

VOLUME_MODIFIER
Inside the volume, the model prints with the settings of the document.
VOLUME_NEGATIVE
The volume was cut away from the model, whose leaf shows it already cut.
VOLUME_SUPPORT_BLOCKER
No support touches the model’s surface inside the volume.
VOLUME_SUPPORT_ENFORCER
Supports go where the model’s surface inside the volume needs them.
VOLUME_TAG
The tag of the volume chunk.
VOLUME_UNCUT
The model’s mesh before its negative volumes were cut away.
VOLUME_VERSION
The volume payload layout this build writes and reads.

Functions§

decode_volumes
Decodes a volume payload, checking it against scene, the scene of the same file.
encode_volumes
Encodes entries as a volume payload, in their order, checking them against scene.