pub struct Solid {
pub kind: SolidKind,
pub front: Face,
pub back: Face,
pub rim: f64,
pub material: String,
pub name: String,
pub poly: Option<Poly>,
}Expand description
2 面で挟まれた立体(外径 rim の円柱の側面で閉じる)
Fields§
§kind: SolidKind§front: Face§back: Face§rim: f64§material: String材料(鏡は “MIRROR”)
name: String表示用の名前(例: “L1 S2-S3 N-BK7”)
poly: Option<Poly>四角い開口の平面 2 枚で挟む立体(ビームスプリッターのキューブの半分の直角プリズムなど)は、 2 つの長方形の角を囲む凸多面体で描く(外径まで延ばした円板では形が違う)
Implementations§
Source§impl Solid
impl Solid
Sourcepub fn back_basis(&self) -> (V3, V3)
pub fn back_basis(&self) -> (V3, V3)
後ろの面の周の向きの基準(大域の x・y の単位ベクトル)。軸を前の面の軸と同じ側へ向け、前の面の x を後ろの面に 投げたものと軸 × x(前の面の座標系が左手系=展開で鏡映したものなら −軸 × x)。前の面の局所 x・y の角度 t の縁の点と、後ろの面のこの基準の角度 t の縁の点を側面で結ぶ (面どうしが軸のまわりに回っていても側面がねじれない。STEP の側面・3D の網・2D の断面で同じ)
Sourcepub fn back_point(&self, c: f64, s: f64) -> V3
pub fn back_point(&self, c: f64, s: f64) -> V3
後ろの面の、Self::back_basis の向きの (c, s) の点(局所 x・y で c·bx + s·by)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Solid
impl !UnwindSafe for Solid
impl Freeze for Solid
impl Send for Solid
impl Sync for Solid
impl Unpin for Solid
impl UnsafeUnpin for Solid
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
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> ⓘ
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 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> ⓘ
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