Skip to main content

Section

Struct Section 

Source
pub struct Section {
Show 18 fields pub id: SectionId, pub name: String, pub floor: Option<String>, pub area: f64, pub iy: f64, pub iz: f64, pub j: f64, pub depth: f64, pub width: f64, pub as_y: f64, pub as_z: f64, pub panel_thickness: Option<f64>, pub thickness: Option<f64>, pub shape: Option<SectionShape>, pub material: Option<MaterialId>, pub rebar_material: Option<MaterialId>, pub shear_rebar_material: Option<MaterialId>, pub steel_material: Option<MaterialId>,
}

Fields§

§id: SectionId§name: String

断面符号(例 C1GY2)。単独では断面を一意に定めない。

§floor: Option<String>

階(例 1PH1)。ST-Bridge の floor 属性をそのまま保持する自由文字列で、 Story への参照ではない(断面の階名と階の名称は 一致しないことがあり、対応する階が存在しない階名もあるため)。

断面の同一性は 符号+階 で決まる。同じ符号でも階が違えば別断面として扱い、 逆に符号+階が同じ断面がモデル内に複数存在してはならない。階を持たない断面 (アプリ内で作成した断面・階の指定がない ST-Bridge 断面)は None とし、 このときは符号だけが同一性キーになる。

§area: f64§iy: f64§iz: f64§j: f64§depth: f64§width: f64§as_y: f64§as_z: f64§panel_thickness: Option<f64>§thickness: Option<f64>§shape: Option<SectionShape>

パラメトリック形状定義(UI設計 §4.2: Section は SectionShape の派生)。 形状から生成されなかった断面(カタログ数値直入力・ST-Bridge 読込等)は None。

§material: Option<MaterialId>

主材料(この断面の弾性剛性 E・ν と自重の密度を決める材料)。

S 断面は鋼材、RC・SRC・CFT 断面はコンクリートを指す。材料は断面の属性で あり、部材は持たない(材料が違えばそれは別の断面である)。要素から引くときは Model::element_material を用いる。

None は未割当。もっともらしい既定値で埋めず、解析へ進む時点で 解析前チェックが止める。

§rebar_material: Option<MaterialId>

主筋の材料(RC・SRC 断面のみ意味を持つ)。降伏点は Material::fy

§shear_rebar_material: Option<MaterialId>

せん断補強筋の材料(RC・SRC 断面のみ意味を持つ)。

None は未設定。呼び出し側は普通強度せん断補強筋の SD295 相当 (crate::material_grade::SHEAR_REBAR_DEFAULT_FY)を既定とする (規格上の最小グレードであり、実際がより高強度でも耐力を過小評価する 側=安全側に外れる)。

§steel_material: Option<MaterialId>

SRC 断面の内蔵鉄骨の材料(SRC 断面のみ意味を持つ)。

Implementations§

Source§

impl Section

Source

pub fn zero(id: SectionId, name: String) -> Self

物性がすべてゼロ・形状も材料も持たない断面。

用途は 2 つある。1 つは断面を解決できなかったときのフォールバックで、断面 ID が 範囲外・世代違い・未割当だった要素の構築(squid-n-elementsection_lookup)と、 形鋼名を解決できなかった ST-Bridge 断面の取り込み(squid-n-io)が使う。 もう 1 つは、線材の断面性能を本当に持たない版の断面(壁・スラブ)の土台で、 ..Section::zero(id, name) に板厚だけを与える形で使う。

もっともらしい既定値で埋めてはならない。 架空の断面性能を与えると、 解析前チェック(precheck_modelensure_nonlinear_input)を通らない経路から 来たモデルが無音のまま解析され、根拠のない結果が返る。物性ゼロにしておけば チェックが検出でき、検出漏れがあっても結果が明らかに異常になる。

Source

pub fn key(&self) -> SectionKey<'_>

同一性キー(符号+階)を借用で返す。

Source

pub fn display_name(&self) -> String

表示用のラベル。階を持つ断面は C1 (2)、持たない断面は符号のみ。

Source

pub fn properties_eq(&self, other: &Section) -> bool

断面性能・形状・材料が一致するか(同一性キーは見ない)。 取り込み時に符号+階が衝突した断面を統合してよいかの判定に使う。

材料も比較の対象に含める。 材料は断面が持ち、違う材料を割り当てるなら それは別の断面であるため、材料だけが違う定義を統合すると片方の材料が 無言で捨てられる。

Trait Implementations§

Source§

impl Clone for Section

Source§

fn clone(&self) -> Section

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 Section

Source§

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

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

impl<'de> Deserialize<'de> for Section

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 Section

Source§

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

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 Section

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.