Skip to main content

write_slice_stack

Function write_slice_stack 

Source
pub fn write_slice_stack<W: Write>(
    writer: &mut XmlWriter<W>,
    stack: &SliceStack,
    opts: &SliceWriteOptions,
) -> Result<()>
Expand description

Writes a <slicestack> element with its child slices and slicerefs.

Element names are unqualified (no namespace prefix) because the slice namespace URI is declared on the root model element as xmlns:s.

ยงDegenerate handling

  • Empty slice stacks (zero slices AND zero refs): emits a warning and writes an empty <slicestack> element. If opts.strict is true, returns an error.
  • Orphan vertices (vertices present but no polygons in a slice): skips the entire slice with a warning.
  • Degenerate polygons (zero segments): emits a warning but writes faithfully.