pub struct WallRegion {
pub id: WallRegionId,
pub name: String,
pub boundary: Vec<NodeId>,
pub wall_plate_ids: Vec<WallPlateId>,
pub posts: Vec<SecondaryMember>,
}Expand description
壁領域。柱・梁が囲む鉛直構面内の閉領域(D1)。版の仕様は持たない
(WallPlate が持つ)。
Fields§
§id: WallRegionId壁領域 ID(Model::wall_regions の配列インデックスと一致すること)。
name: String表示名(ナビゲータ・診断で領域を指し示すために用いる)。空文字は名前なし。
boundary: Vec<NodeId>境界の節点列(柱・梁の閉路。反時計回り、始点は繰り返さない)。
wall_plate_ids: Vec<WallPlateId>この壁領域に属する壁版(WallPlate)の ID リスト。壁領域内が間柱で複数の
壁パネルに分かれている場合、複数持ちうる(E5)。順序は任意。重複・他領域との
共有は許さない(Model::validate が確認)。版なし壁領域(間柱のみの
雑壁領域等)は空のままでよい。
posts: Vec<SecondaryMember>この壁領域に属する間柱(SecondaryMember::Post)の実体。
Implementations§
Source§impl WallRegion
impl WallRegion
Sourcepub fn new(id: WallRegionId, boundary: Vec<NodeId>) -> Self
pub fn new(id: WallRegionId, boundary: Vec<NodeId>) -> Self
壁領域を作る(版なし・間柱なし)。
Sourcepub fn boundary_coords(&self, model: &Model) -> Option<Vec<[f64; 3]>>
pub fn boundary_coords(&self, model: &Model) -> Option<Vec<[f64; 3]>>
境界多角形の座標列 [mm]。節点が引けない(陳腐化した参照)場合は None。
Sourcepub fn reference_node(&self) -> Option<NodeId>
pub fn reference_node(&self) -> Option<NodeId>
領域を代表する節点(境界の先頭)。
Sourcepub fn area(&self, model: &Model) -> f64
pub fn area(&self, model: &Model) -> f64
境界の面積 [mm²](crate::geom::polygon::area_3d。ニューエルの公式による
3 次元面積。理想平面への投影を経由しない。§3.2 E3)。座標が引けない場合は 0。
Trait Implementations§
Source§impl Clone for WallRegion
impl Clone for WallRegion
Source§fn clone(&self) -> WallRegion
fn clone(&self) -> WallRegion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WallRegion
impl Debug for WallRegion
Source§impl<'de> Deserialize<'de> for WallRegion
impl<'de> Deserialize<'de> for WallRegion
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 PartialEq for WallRegion
impl PartialEq for WallRegion
Source§fn eq(&self, other: &WallRegion) -> bool
fn eq(&self, other: &WallRegion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WallRegion
impl Serialize for WallRegion
impl StructuralPartialEq for WallRegion
Auto Trait Implementations§
impl Freeze for WallRegion
impl RefUnwindSafe for WallRegion
impl Send for WallRegion
impl Sync for WallRegion
impl Unpin for WallRegion
impl UnsafeUnpin for WallRegion
impl UnwindSafe for WallRegion
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