TessellationQuality

Enum TessellationQuality 

Source
pub enum TessellationQuality {
    Lowest,
    Low,
    Medium,
    High,
    Highest,
}
Expand description

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

Source

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.

Source

pub fn parse_label(s: &str) -> Option<TessellationQuality>

Parse a consumer-facing label (case-insensitive). Inverse of label; None for unknown spellings.

Source

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.

Source

pub fn from_index(idx: u8) -> TessellationQuality

Inverse of to_index; unknown values map to Medium.

Source

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.

Source

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).

Source

pub fn profile_fillet_radius(self, radius: f64) -> f64

Fillet / edge radius for a parametric steel-section corner, given the model’s declared radius.

Callers today are IfcI/L/U/TShapeProfileDef — the profiles whose builders actually read a radius attribute. IfcC/ZShapeProfileDef build plain sharp point lists and ignore their radius attributes entirely, so they never reach here; route them through this helper if that ever changes.

Below Medium the radius collapses to 0.0, so the corner is emitted sharp instead of as an arc: an I-section drops from ~28 outline vertices to its 12 sharp ones, halving the cross-section triangles on slender members where the fillet is a sub-pixel detail anyway (issue #1809). Medium and above return the radius untouched, keeping default output byte-identical — the same identity invariant as profile_arc_segments.

This only applies to parametric profiles swept by IfcExtrudedAreaSolid; faceted / tessellated exports have their fillets baked into the mesh.

Source

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

Source§

fn clone(&self) -> TessellationQuality

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for TessellationQuality

Source§

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

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

impl Default for TessellationQuality

Source§

fn default() -> TessellationQuality

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

impl Hash for TessellationQuality

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for TessellationQuality

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for TessellationQuality

Source§

impl Eq for TessellationQuality

Source§

impl StructuralPartialEq for TessellationQuality

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
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. 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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,