apply_sdf_offset

Function apply_sdf_offset 

Source
pub fn apply_sdf_offset(
    mesh: &Mesh,
    params: &SdfOffsetParams,
) -> ShellResult<SdfOffsetResult>
Expand description

Apply SDF-based offset to create a new mesh with variable offsets.

This is the main entry point for SDF offset. It takes a mesh with offset values assigned to vertices and produces a new mesh offset by those values.

§Arguments

  • mesh - Input mesh with offset values assigned via vertex.offset
  • params - SDF offset parameters (voxel size, padding, etc.)

§Returns

A new mesh representing the offset surface, with vertex data transferred.

§Example

let params = SdfOffsetParams::default();
let result = apply_sdf_offset(&mesh, &params)?;
println!("Generated {} vertices", result.stats.output_vertices);