pub enum TessellationQuality {
Lowest,
Low,
Medium,
High,
Highest,
}Expand description
Re-exported so the server can name the quality level without a direct
ifc-lite-geometry dependency edge for one enum.
Detail level for geometry tessellation, selectable by consumers.
Levels map to a density multiplier (“angular deflection coefficient”) via
density_factor. Medium reproduces
the engine’s historical hardcoded behavior exactly and is the default.
Variants§
Lowest
Coarsest — quarter density. Throughput / preview oriented.
Low
Half density.
Medium
Engine default. Byte-for-byte identical to pre-enum behavior.
High
Double density.
Highest
Finest — quadruple density. Minimizes faceting on curved models.
Implementations§
Source§impl TessellationQuality
impl TessellationQuality
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
Stable lowercase label — the single string surface shared by the wasm
setTessellationQuality setter and the server’s tessellation_quality
query parameter, so the two consumer-facing spellings cannot drift.
Sourcepub fn parse_label(s: &str) -> Option<TessellationQuality>
pub fn parse_label(s: &str) -> Option<TessellationQuality>
Parse a consumer-facing label (case-insensitive). Inverse of
label; None for unknown spellings.
Sourcepub fn to_index(self) -> u8
pub fn to_index(self) -> u8
Dense 0-4 index (Lowest..Highest). Used by the wasm bindings to store
the level in an atomic; total inverse of from_index.
Sourcepub fn from_index(idx: u8) -> TessellationQuality
pub fn from_index(idx: u8) -> TessellationQuality
Inverse of to_index; unknown values map to Medium.
Sourcepub fn density_factor(self) -> f64
pub fn density_factor(self) -> f64
Density multiplier applied to segment counts.
Medium == 1.0 is load-bearing: it guarantees scale_segments is the
identity at the default level, so existing golden output never moves.
Sourcepub fn profile_arc_segments(self, base: usize, min: usize) -> usize
pub fn profile_arc_segments(self, base: usize, min: usize) -> usize
Segment count for a profile-plane arc / fillet (steel-section root
fillets, rounded-rectangle corners, trimmed conics and polycurve arcs in
arbitrary profiles), where base is the historical (often chord-adaptive)
count and min is the floor.
Like circle_profile_segments these never
get finer above Medium (denser caps only add earcut bridge slivers),
but they coarsen proportionally below Medium so large channel/angle
fillets stop dominating the triangle budget on preview levels (issue #976).
Sourcepub fn circle_profile_segments(self, base: usize) -> usize
pub fn circle_profile_segments(self, base: usize) -> usize
Segment count for a circular profile outline (opening cutter / cap),
where base is the historical fixed count (e.g. 36 for
IfcCircleProfileDef).
Profile circles deliberately do not get finer above Medium:
denser opening circles only multiply the earcut cap-bridge slivers that
show up as scar lines on plates with bolt holes (issue #976). They do get
coarser below Medium for preview / throughput. The .min(base)
guards tiny circles whose base is already below the coarse targets.
Trait Implementations§
Source§impl Clone for TessellationQuality
impl Clone for TessellationQuality
Source§fn clone(&self) -> TessellationQuality
fn clone(&self) -> TessellationQuality
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TessellationQuality
Source§impl Debug for TessellationQuality
impl Debug for TessellationQuality
Source§impl Default for TessellationQuality
impl Default for TessellationQuality
Source§fn default() -> TessellationQuality
fn default() -> TessellationQuality
impl Eq for TessellationQuality
Source§impl Hash for TessellationQuality
impl Hash for TessellationQuality
Source§impl PartialEq for TessellationQuality
impl PartialEq for TessellationQuality
Source§fn eq(&self, other: &TessellationQuality) -> bool
fn eq(&self, other: &TessellationQuality) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TessellationQuality
Auto Trait Implementations§
impl Freeze for TessellationQuality
impl RefUnwindSafe for TessellationQuality
impl Send for TessellationQuality
impl Sync for TessellationQuality
impl Unpin for TessellationQuality
impl UnsafeUnpin for TessellationQuality
impl UnwindSafe for TessellationQuality
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.