Skip to main content

WallRegion

Struct WallRegion 

Source
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

Source

pub fn new(id: WallRegionId, boundary: Vec<NodeId>) -> Self

壁領域を作る(版なし・間柱なし)。

Source

pub fn boundary_coords(&self, model: &Model) -> Option<Vec<[f64; 3]>>

境界多角形の座標列 [mm]。節点が引けない(陳腐化した参照)場合は None

Source

pub fn edge_nodes(&self, k: usize) -> Option<[NodeId; 2]>

境界の辺 k の両端節点。

Source

pub fn reference_node(&self) -> Option<NodeId>

領域を代表する節点(境界の先頭)。

Source

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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for WallRegion

Source§

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

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

impl<'de> Deserialize<'de> for WallRegion

Source§

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

Source§

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

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for WallRegion

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.