Skip to main content

FillOptions

Struct FillOptions 

Source
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: bool

Also fill loops that are not clean. Open chains are never filled.

§fair: bool

Fair 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: usize

Loops 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

Source

pub fn builder() -> FillOptionsBuilder

A builder for FillOptions: every option unset, as Default, until set.

Trait Implementations§

Source§

impl Clone for FillOptions

Source§

fn clone(&self) -> FillOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FillOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FillOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FillOptions

Source§

fn eq(&self, other: &FillOptions) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FillOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.