pub struct FillOptions {
pub max_edges: Option<usize>,
pub max_perimeter: Option<f64>,
pub max_area: Option<f64>,
pub loops: Option<Vec<LoopId>>,
pub allow_unclean: bool,
pub fair: bool,
pub dp_limit: usize,
pub max_dihedral: Option<f64>,
pub max_refine_vertices: Option<usize>,
}Expand description
Options for fill_holes.
Fields§
§max_edges: Option<usize>Fill only loops with at most this many edges.
max_perimeter: Option<f64>Fill only loops whose perimeter (BoundaryLoop::perimeter) is at
most this, in local units.
max_area: Option<f64>Fill only loops whose vector area (BoundaryLoop::area) is at most
this, in local units squared.
loops: Option<Vec<LoopId>>Fill only these loops, as boundary_loops
identified them. Every id must still match a loop of the mesh.
allow_unclean: boolAlso fill loops that are not clean. Open
chains are never filled.
fair: boolFair the patch so that it continues the surrounding curvature; otherwise the refined patch keeps its new vertices at the centroids they were split at.
On by default. Fairing is a sparse direct solve of the bi-Laplacian:
tens of milliseconds for thousands of new vertices, about 0.3 s at
19,000; set fair: false for speed when a closed surface is enough.
At a pinch vertex shared with another hole filled in the same call,
the one-ring used for fairing does not include the other hole’s
patch, which slightly distorts the patches near that vertex on a
curved surface.
dp_limit: usizeLoops with more edges than this are triangulated by projection onto
their best-fit plane instead of the O(n³) minimum-weight search.
Below 3, every loop goes to the projection.
max_dihedral: Option<f64>Reject a minimum-weight triangulation whose worst dihedral angle to
its neighbours exceeds this, in radians: caps that fold nearly back
on themselves fail with FailReason::NoValidTriangulation. None,
the default, keeps whatever the search finds. Applies to the search
only, not the projection past dp_limit.
max_refine_vertices: Option<usize>Stop refining a patch once it has this many new vertices; the loop
still fills, and FilledLoop::refine_capped reports it. None,
the default, refines to the surrounding density without a cap.
Implementations§
Source§impl FillOptions
impl FillOptions
Sourcepub fn builder() -> FillOptionsBuilder
pub fn builder() -> FillOptionsBuilder
A builder for FillOptions: every option unset, as Default,
until set.
Trait Implementations§
Source§impl Clone for FillOptions
impl Clone for FillOptions
Source§fn clone(&self) -> FillOptions
fn clone(&self) -> FillOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more