Skip to main content

SmoothCornerGeometry

Struct SmoothCornerGeometry 

Source
pub struct SmoothCornerGeometry {
Show 16 fields pub origin: Point, pub incoming_axis: Vector, pub outgoing_axis: Vector, pub radius: f64, pub smoothing: f64, pub incoming_limit: f64, pub outgoing_limit: f64, pub angle: f64, pub base_tangent: f64, pub incoming_influence: f64, pub outgoing_influence: f64, pub alpha0: f64, pub alpha1: f64, pub middle_arc_angle: f64, pub start: Point, pub end: Point,
}
Expand description

单个 smooth corner 解析后的参数,便于测试或调试 Sketch 对齐。

Fields§

§origin: Point

原始角点。

§incoming_axis: Vector

从角点指向上一条边的单位方向。

§outgoing_axis: Vector

从角点指向下一条边的单位方向。

§radius: f64

clamp 后实际使用的核心圆半径。

§smoothing: f64

clamp 到 [0, 1] 后的平滑系数。

§incoming_limit: f64

incoming 方向的最大影响范围。

§outgoing_limit: f64

outgoing 方向的最大影响范围。

§angle: f64

incoming 与 outgoing 方向之间的夹角,单位为弧度。

§base_tangent: f64

核心圆在未平滑时的切点距离。

§incoming_influence: f64

incoming 方向最终影响范围。

§outgoing_influence: f64

outgoing 方向最终影响范围。

§alpha0: f64

incoming 侧过渡角,单位为弧度。

§alpha1: f64

outgoing 侧过渡角,单位为弧度。

§middle_arc_angle: f64

中间圆弧段角度,单位为弧度。

§start: Point

角点 smooth cubic 的起点。

§end: Point

角点 smooth cubic 的终点。

Trait Implementations§

Source§

impl Clone for SmoothCornerGeometry

Source§

fn clone(&self) -> SmoothCornerGeometry

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 SmoothCornerGeometry

Source§

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

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

impl PartialEq for SmoothCornerGeometry

Source§

fn eq(&self, other: &SmoothCornerGeometry) -> 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 Copy for SmoothCornerGeometry

Source§

impl StructuralPartialEq for SmoothCornerGeometry

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.