Skip to main content

offset

Function offset 

Source
pub fn offset(
    tx: &mut Transaction<'_>,
    options: &OffsetOptions,
) -> Result<OffsetReport>
Expand description

Moves every live vertex along its smooth normal by distance.

  • Region: every live vertex, displaced by distance * normal where normal is its smooth normal. Vertices with a zero normal (used by no non-degenerate triangle) or a non-finite displacement stay put.
  • The move is written once, in a single set_positions call over the vertices whose displacement is above 0; an empty move writes nothing.
  • Cleanup: remove_degenerate with the default options runs over the result and drops the triangles the offset pinched down to nothing (and the vertices left unused), reported as degenerate_removed and vertices_removed. History is untouched.

ยงErrors

Nothing is written in any of these cases.