Skip to main content

BooleanNaming

Struct BooleanNaming 

Source
pub struct BooleanNaming<S: Scalar> { /* private fields */ }
Expand description

The naming bookkeeping of one boolean, see the module docs.

Implementations§

Source§

impl<S: Scalar> BooleanNaming<S>

Source

pub fn new( part: &Part<S>, namer: &Namer, solids: &[SolidId], ) -> GeopResult<Self>

Starts naming a boolean of solids, remembering the names their edges and faces have now as those entities’ origins.

Source

pub fn provisional(&self) -> String

The name for the next entity, until BooleanNaming::finish replaces it. ~ never appears in a final name.

Source

pub fn edge_origin(&self, edge: EdgeId) -> GeopResult<&str>

Source

pub fn face_origin(&self, face: FaceId) -> GeopResult<&str>

Source

pub fn edge_crossing( &mut self, vertex: VertexId, (edge_a, t_a): (EdgeId, S), (edge_b, t_b): (EdgeId, S), ) -> GeopResult<()>

Records that vertex was created where edge edge_a (at parameter t_a) crosses edge edge_b (at t_b).

Source

pub fn piercing( &mut self, vertex: VertexId, edge: EdgeId, t: S, face: FaceId, ) -> GeopResult<()>

Records that vertex was created where edge (at parameter t) pierces face.

Source

pub fn edge_split( &mut self, edge: EdgeId, new_edge: EdgeId, start: VertexId, ) -> GeopResult<()>

Records that new_edge was split off edge at start; it inherits edge’s origin.

Source

pub fn trace( &mut self, edge: EdgeId, face_a: FaceId, face_b: FaceId, ends: [VertexId; 2], ) -> GeopResult<()>

Records that edge was traced along face_a and face_b between ends.

Source

pub fn face_split( &mut self, face: FaceId, edge: EdgeId, new_face: Option<FaceId>, ) -> GeopResult<()>

Records that splicing edge into face split off new_face, if it did; new_face inherits face’s origin.

Source

pub fn finish(self, part: &mut Part<S>) -> GeopResult<()>

Gives every entity created so far its final name, see the module docs. Entities that were created and have since been deleted again (an edge piece merged into a coincident edge, say) are skipped.

Auto Trait Implementations§

§

impl<S> Freeze for BooleanNaming<S>

§

impl<S> RefUnwindSafe for BooleanNaming<S>
where S: RefUnwindSafe,

§

impl<S> Send for BooleanNaming<S>

§

impl<S> Sync for BooleanNaming<S>

§

impl<S> Unpin for BooleanNaming<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for BooleanNaming<S>

§

impl<S> UnwindSafe for BooleanNaming<S>
where S: UnwindSafe,

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