pub struct AxisGroup {
pub name: String,
pub kind: AxisGroupKind,
pub axes: Vec<Axis>,
}Expand description
同じ幾何規則を共有する通り芯のまとまり(X 通り・Y 通りなど)。
Fields§
§name: Stringグループ名(X・Y など)。自動生成の通り名の接頭辞にもなる。
kind: AxisGroupKind§axes: Vec<Axis>このグループの通り。AxisGroupKind::Parallel のグループでは
Axis::distance の昇順に保つ(AxisGroup::sort_axes)。
Implementations§
Source§impl AxisGroup
impl AxisGroup
Sourcepub fn sort_axes(&mut self)
pub fn sort_axes(&mut self)
平行芯グループの通りを Axis::distance の昇順へ整える
(AxisGroupKind::Other のグループは並びに意味がないため何もしない)。
通りを追加・取り込みしたあとに呼び、一覧表示と ST-Bridge の書き出しが そのまま座標順になるようにする。この不変条件を保つ場所を 1 つにするため、 並べ替えは常にこのメソッドを使う。
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AxisGroup
impl<'de> Deserialize<'de> for AxisGroup
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
impl StructuralPartialEq for AxisGroup
Auto Trait Implementations§
impl Freeze for AxisGroup
impl RefUnwindSafe for AxisGroup
impl Send for AxisGroup
impl Sync for AxisGroup
impl Unpin for AxisGroup
impl UnsafeUnpin for AxisGroup
impl UnwindSafe for AxisGroup
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