pub struct Frame {
pub origin: Vec3,
pub x_axis: Vec3,
pub y_axis: Vec3,
pub z_axis: Vec3,
}Expand description
An orthonormal placement frame — a named plane (DATUM/PLANE feature) or a
resolved sketch plane. z_axis is the plane normal.
Fields§
§origin: Vec3§x_axis: Vec3§y_axis: Vec3§z_axis: Vec3Implementations§
Source§impl Frame
impl Frame
Sourcepub fn from_origin_normal(origin: Vec3, normal: Vec3) -> Result<Self, String>
pub fn from_origin_normal(origin: Vec3, normal: Vec3) -> Result<Self, String>
Derive an orthonormal frame from an origin + plane normal via the worldUp
convention, the
SINGLE source of truth for how a sketch/plane reference becomes in-plane
axes: refUp = |n·(0,1,0)| > 0.9 ? (1,0,0) : (0,1,0);
x = norm(refUp × n); y = norm(n × x); z = n. The referenced object’s
own x/y are intentionally ignored — only its (origin, normal) matter.
Trait Implementations§
impl Copy for Frame
Source§impl<'de> Deserialize<'de> for Frame
impl<'de> Deserialize<'de> for Frame
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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
Mutably borrows from an owned value. Read more