pub struct SurfaceSides { /* private fields */ }Expand description
Which parametric side of a surface curve a p-curve belongs to.
A surface curve is the intersection of two surfaces, so each side owns one surface and the p-curve that is that curve’s image in the surface’s own parameter domain. Pairing them here is what stops a consumer from having to guess which p-curve to trim with – a guess that would otherwise require re-inverting the surface, the exact operation the p-curve exists to avoid.
A single side is legitimate: not every edge has two parametric images.
Implementations§
Source§impl SurfaceSides
impl SurfaceSides
Sourcepub const fn one(surface: NodeId, pcurve: NodeId) -> SurfaceSides
pub const fn one(surface: NodeId, pcurve: NodeId) -> SurfaceSides
One parametric side: a surface and this curve’s image in it.
Sourcepub const fn two(
first_surface: NodeId,
first_pcurve: NodeId,
second_surface: NodeId,
second_pcurve: NodeId,
) -> SurfaceSides
pub const fn two( first_surface: NodeId, first_pcurve: NodeId, second_surface: NodeId, second_pcurve: NodeId, ) -> SurfaceSides
Both parametric sides, in the order the authoring format states them.
The order is load-bearing: it is what ParameterCurveS1 and
ParameterCurveS2 name.
Sourcepub const fn second(&self) -> Option<(NodeId, NodeId)>
pub const fn second(&self) -> Option<(NodeId, NodeId)>
The second side as (surface, pcurve), if this curve has one.
Sourcepub const fn is_two_sided(&self) -> bool
pub const fn is_two_sided(&self) -> bool
Whether both parametric sides are present.
Sourcepub fn references(&self) -> Vec<NodeId>
pub fn references(&self) -> Vec<NodeId>
Every node this pairing references, surfaces and p-curves alike.
Trait Implementations§
Source§impl Clone for SurfaceSides
impl Clone for SurfaceSides
Source§fn clone(&self) -> SurfaceSides
fn clone(&self) -> SurfaceSides
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SurfaceSides
impl Debug for SurfaceSides
Source§impl Hash for SurfaceSides
impl Hash for SurfaceSides
Source§impl PartialEq for SurfaceSides
impl PartialEq for SurfaceSides
impl Eq for SurfaceSides
impl StructuralPartialEq for SurfaceSides
Auto Trait Implementations§
impl Freeze for SurfaceSides
impl RefUnwindSafe for SurfaceSides
impl Send for SurfaceSides
impl Sync for SurfaceSides
impl Unpin for SurfaceSides
impl UnwindSafe for SurfaceSides
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> 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 more