pub struct MechSpec {
pub bores: Vec<BoreSpec>,
pub length: f64,
pub outer_diameter: f64,
pub thread: String,
pub rod_spacing: f64,
pub holds: Option<HoldSpec>,
pub front_thread: Option<ThreadEnd>,
pub back_thread: Option<ThreadEnd>,
pub outline: MechOutline,
}Expand description
機構部品の寸法。z は部品の基準面(チューブの入口の端など)から光の進む向き
Fields§
§bores: Vec<BoreSpec>光の通る穴(チューブの内径、ケージ板・マウントのクリア開口)
length: f64長さ [mm](外形の z の範囲 0〜length。0 なら穴の範囲)
outer_diameter: f64外径 [mm](ケージ板は外形の一辺)
thread: Stringねじ(“SM1” など)
rod_spacing: f64ケージのロッドの間隔 [mm]
holds: Option<HoldSpec>保持する素子の径 [mm] と座の z [mm](マウント・チューブ)
front_thread: Option<ThreadEnd>z 0 の端(光の入る側)のねじ。機構部品をつなぐ(MechPlacement::after)とき、合うかを確かめる
back_thread: Option<ThreadEnd>z の大きい端のねじ
outline: MechOutline外形の形: 丸(既定、outer_diameter は外径)か角(outer_diameter は正方形の一辺。ケージ板など)。
配置図・3D・書き出しはこの簡易外形で描く
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MechSpec
impl<'de> Deserialize<'de> for MechSpec
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
Source§impl JsonSchema for MechSpec
impl JsonSchema for MechSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for MechSpec
Auto Trait Implementations§
impl Freeze for MechSpec
impl RefUnwindSafe for MechSpec
impl Send for MechSpec
impl Sync for MechSpec
impl Unpin for MechSpec
impl UnsafeUnpin for MechSpec
impl UnwindSafe for MechSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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