Skip to main content

BezierArrangementGraph2

Struct BezierArrangementGraph2 

Source
pub struct BezierArrangementGraph2 { /* private fields */ }
Expand description

Branch-free retained Bezier arrangement graph.

Implementations§

Source§

impl BezierArrangementGraph2

Source

pub fn from_split_materializations( materializations: &[BezierSplitMaterialization2], ) -> CurveResult<Self>

Constructs a retained graph from split materializations in source order.

Source

pub fn new(fragments: Vec<BezierArrangementFragment2>) -> CurveResult<Self>

Constructs a graph from already-retained fragments.

Source

pub fn fragments(&self) -> &[BezierArrangementFragment2]

Returns retained fragments.

Source

pub fn is_empty(&self) -> bool

Returns true when no fragments are retained.

Source

pub fn len(&self) -> usize

Returns the number of retained fragments.

Source

pub fn traverse_branch_free( &self, policy: &CurvePolicy, ) -> Classification<BezierArrangementTraversal2>

Traverses branch-free materialized fragments into endpoint-connected chains.

Source

pub fn traverse_with_tangent_order( &self, policy: &CurvePolicy, ) -> Classification<BezierArrangementTraversal2>

Traverses materialized fragments and resolves simple branches by tangent order.

At a branch vertex, the outgoing fragment with the smallest certified counter-clockwise turn from the incoming endpoint tangent is selected. The comparison is exact: it uses signs of cross and dot products, not finite angles. This is the local-order step needed before full higher-order arrangement traversal can emit regions. Ties, zero tangents, unresolved split boundaries, and uncertain signs remain explicit uncertainty in Yap’s sense.

Source

pub fn traverse_retained_with_tangent_order( &self, policy: &CurvePolicy, ) -> Classification<BezierArrangementTraversal2>

Traverses retained fragments using native and algebraic endpoint evidence.

This is the first traversal consumer for BezierSplitFragment2::AlgebraicEndpointImages. It connects endpoints only when the retained point evidence is exact and structurally equal (or when a represented coordinate has an exact rational witness matching a native point). At a branch vertex it compares outgoing tangents with either the native exact cross/dot predicate or compare_algebraic_tangent_turn_from_base.

The method deliberately does not materialize concrete Bezier regions from algebraic fragments. It only proves traversal order over retained evidence, preserving Yap’s construction/decision boundary from “Towards Exact Geometric Computation,” Computational Geometry 7(1-2), 3-23 (1997), and matching the arrangement local-order discipline in de Berg et al., Computational Geometry (3rd ed., 2008).

Source§

impl BezierArrangementGraph2

Source

pub fn traverse_retained_deduplicating_materialized_overlaps( &self, policy: &CurvePolicy, ) -> Classification<BezierRetainedOverlapTraversal2>

Traverses retained fragments after deduplicating exact duplicate overlaps.

This is the first overlap-consuming traversal stage. It accepts only overlaps whose fragment images and oriented endpoints are certified equal, shadows the duplicate fragment, and then replays retained tangent traversal on the remaining graph. Partial line overlaps and reversed same-image overlaps are still boundary uncertainty because consuming them requires ownership and splitting rules not represented by this slice.

Source

pub fn split_retained_linear_overlaps( &self, policy: &CurvePolicy, ) -> Classification<BezierRetainedLinearOverlapSplitGraph2>

Splits retained materialized fragments at certified linear-overlap endpoints.

The method is deliberately narrower than a full overlap walker: it requires all line-image overlaps in the report to have exact Bezier parameter ranges from BezierRetainedOverlapReport2::linear_bezier_overlap_splits. It then inserts the range endpoints into the affected fragments and materializes exact subcurves with de Casteljau subdivision. Same-image duplicate overlaps are reported but do not add boundaries; nonlinear line images, unresolved endpoint carriers, or uncertain ordering remain explicit uncertainty.

Source

pub fn traverse_retained_splitting_linear_overlaps( &self, policy: &CurvePolicy, ) -> Classification<BezierRetainedLinearOverlapTraversal2>

Traverses after resolving certified linearly-parameterized overlaps.

This method handles the conservative case where overlap endpoints split the graph into ordinary subfragments. Same-oriented overlap spans shadow one duplicate copy; opposite-oriented spans cancel both copies because they represent the same positive-dimensional boundary traversed in opposite directions. The cancellation is applied only to BezierRetainedResolvedLinearOverlap2 records produced by exact refinement, preserving Yap’s object/predicate separation and the overlap-degeneracy discipline of Foster, Hormann, and Popa (2019). Nonlinear line images, algebraic endpoint-image fragments without native subcurves, and remaining branch ambiguities still return explicit uncertainty.

Trait Implementations§

Source§

impl Clone for BezierArrangementGraph2

Source§

fn clone(&self) -> BezierArrangementGraph2

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 BezierArrangementGraph2

Source§

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

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

impl Default for BezierArrangementGraph2

Source§

fn default() -> BezierArrangementGraph2

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

impl PartialEq for BezierArrangementGraph2

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for BezierArrangementGraph2

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.