Skip to main content

TurnAxis

Enum TurnAxis 

Source
pub enum TurnAxis {
    Edge(ElementReference<NamedModel, Line>),
    Round(ElementReference<NamedModel, Round>),
    Datum(ElementReference<Datums, Line>),
    Sketch(ElementReference<PlacedSketch, Line>),
    SketchRound(ElementReference<PlacedSketch, Round>),
}
Expand description

An axis to turn about: a line — a straight edge, a datum axis or a frame’s, a sketch’s line — or what a round element turns around: a circular edge, a cylindrical or conical face, a sketch’s circle or arc.

Variants§

Implementations§

Source§

impl TurnAxis

Source

pub fn instance(&self) -> &str

The path of the instance it is of: empty for the part itself.

Source

pub fn local(&self) -> TurnAxis

The same, as its instance’s own part names it.

Source

pub fn behind(&self, instance: &str) -> TurnAxis

The same, of the instance instance of the part.

Source§

impl TurnAxis

Source

pub fn resolve(&self, reader: &Reader<'_>) -> Result<Axis, GeopError>

What it refers to, read through reader, of the part itself (see geop_core_program::reader::Reader::retrieve_element).

Source

pub fn resolve_placed( &self, reader: &Reader<'_>, ) -> Result<InInstance<Axis>, GeopError>

What it refers to, of the part itself or of an instance placed in it, as it is in its own part (see geop_core_program::reader::Reader::retrieve_placed).

Source§

impl TurnAxis

Source

pub fn placed(&self, reader: &Reader<'_>) -> Result<Axis, GeopError>

The axis, where the part reader reads has it: of the part itself, or of a part placed in it, moved where that is.

Trait Implementations§

Source§

impl Clone for TurnAxis

Source§

fn clone(&self) -> TurnAxis

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 TurnAxis

Source§

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

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

impl<'de> Deserialize<'de> for TurnAxis

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<TurnAxis, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TurnAxis

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Selectable for TurnAxis

Source§

fn picked_from() -> Vec<&'static str>

The kinds of what an editor draws that a click picks one from.
Source§

fn from_picked(picked: &PickedElement) -> Option<TurnAxis>

The value picked names as Selectable::picked does: what a field sent back held already.
Source§

fn picked(&self) -> PickedElement

The value as a pick names it: what the front end shows held.
Source§

fn select(reader: &Reader<'_>, hit: &PickedElement) -> Option<TurnAxis>

The value a click on hit selects, read through reader: none, for a hit that selects none.
Source§

fn drawn(&self, reader: &Reader<'_>) -> Vec<PickedElement>

What an editor draws of it, to light while it is held.
Source§

fn visuals(&self, reader: &Reader<'_>) -> Vec<Visual>

What an editor draws of it besides lighting what it is picked from (Selectable::drawn), while it is held or a click would pick it: nothing, for an element drawn as itself; a frame, as a triad along its axes. In the world, as the part is drawn; styled by the editor as held or as hovered.
Source§

impl Serialize for TurnAxis

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TurnAxis

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.