Skip to main content

PlaneSectionEvidence

Struct PlaneSectionEvidence 

Source
#[non_exhaustive]
pub struct PlaneSectionEvidence {
Show 16 fields pub source: SectionSource, pub source_triangles: usize, pub role: SectionRole, pub boundary_edges: usize, pub in_plane_triangles: usize, pub touching_edges: usize, pub in_plane_pairs: usize, pub in_plane_crossings: usize, pub closed_chains: usize, pub open_chains: usize, pub chain_vertices: usize, pub regions: usize, pub region_vertices: usize, pub cut_regions: usize, pub cut_region_vertices: usize, pub cut_pairs: usize,
}
Expand description

Auditable counts for one request-based section.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§source: SectionSource

Approximation source.

§source_triangles: usize

Source triangles inspected.

§role: SectionRole

What the mesh was sectioned as.

§boundary_edges: usize

Mesh edges used by one triangle only; zero for a solid.

§in_plane_triangles: usize

Source triangles lying in the plane.

§touching_edges: usize

Plane edges that only touch the plane: nothing is emitted for them.

§in_plane_pairs: usize

Candidate pairs examined for the in-plane faces: overlap tests, or the segment, piece-triangle and hole containment pairs of a merge.

§in_plane_crossings: usize

Distinct points, other than source vertices, where in-plane source edges cross.

§closed_chains: usize

Output closed chains.

§open_chains: usize

Output open chains.

§chain_vertices: usize

Points across all output chains.

§regions: usize

Output regions.

§region_vertices: usize

Points across all output region rings.

§cut_regions: usize

Output cut regions.

§cut_region_vertices: usize

Points across all output cut region rings.

§cut_pairs: usize

Candidate pairs compared while nesting the cut rings.

Implementations§

Source§

impl PlaneSectionEvidence

Source

pub const fn input_mesh(source_triangles: usize) -> Self

Record evidence for a section derived from the input mesh; every other count starts at zero.

Source

pub const fn with_source_counts( self, in_plane_triangles: usize, touching_edges: usize, in_plane_pairs: usize, ) -> Self

Record the counts taken from the source mesh.

Source

pub const fn with_in_plane_crossings(self, in_plane_crossings: usize) -> Self

Record the distinct points, other than source vertices, where in-plane source edges cross.

Source

pub const fn with_role(self, role: SectionRole, boundary_edges: usize) -> Self

Record the role and the number of boundary edges of the source.

Source

pub fn with_output( self, chains: &[SectionChain], regions: &[InPlaneRegion], ) -> Self

Record the counts of the output.

Source

pub const fn with_cut_pairs(self, cut_pairs: usize) -> Self

Record the candidate pairs compared while nesting the cut rings.

Source

pub fn with_cut_output(self, cut_regions: &[CutRegion]) -> Self

Record the counts of the output cut regions.

Source

pub const fn is_derived_from_input_mesh(self) -> bool

Whether this result came from the discrete input mesh.

Trait Implementations§

Source§

impl Clone for PlaneSectionEvidence

Source§

fn clone(&self) -> PlaneSectionEvidence

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 Copy for PlaneSectionEvidence

Source§

impl Debug for PlaneSectionEvidence

Source§

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

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

impl Eq for PlaneSectionEvidence

Source§

impl PartialEq for PlaneSectionEvidence

Source§

fn eq(&self, other: &PlaneSectionEvidence) -> 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 PlaneSectionEvidence

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.