pub struct RegionBoundary {
pub level: f64,
pub boundary: Vec<NodeId>,
pub edges: Vec<ElemId>,
}Expand description
主架構が囲む閉領域(床領域の境界)1 つ。
Fields§
§level: f64面のレベル Z [mm](構成する節点の Z の平均)。
boundary: Vec<NodeId>境界の節点列(反時計回り。始点は繰り返さない)。
edges: Vec<ElemId>境界をなす梁要素(boundary の辺と同順。辺 i は boundary[i]→boundary[i+1])。
Implementations§
Source§impl RegionBoundary
impl RegionBoundary
Sourcepub fn contains(&self, model: &Model, p: [f64; 2]) -> bool
pub fn contains(&self, model: &Model, p: [f64; 2]) -> bool
点 p(XY)がこの境界の内部にあるか。辺上(crate::geom::polygon::BOUNDARY_TOL_MM 以内)は含めない。
版や二次部材をこの境界へ割り当てる用途を想定する。辺上の点は隣接する境界の双方に 該当してしまうため含めない(所属を一意に決められるようにする)。
レイキャストは辺上の点の扱いが定まらない(辺の向きしだいで内側にも外側にもなる)ため、 辺までの距離による判定を先に行う。
Sourcepub fn is_same_level(&self, z: f64) -> bool
pub fn is_same_level(&self, z: f64) -> bool
この境界と同じレベルか(crate::geom::LEVEL_TOL_MM 以内)。
Trait Implementations§
Source§impl Clone for RegionBoundary
impl Clone for RegionBoundary
Source§fn clone(&self) -> RegionBoundary
fn clone(&self) -> RegionBoundary
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 RegionBoundary
impl Debug for RegionBoundary
Source§impl PartialEq for RegionBoundary
impl PartialEq for RegionBoundary
Source§fn eq(&self, other: &RegionBoundary) -> bool
fn eq(&self, other: &RegionBoundary) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RegionBoundary
Auto Trait Implementations§
impl Freeze for RegionBoundary
impl RefUnwindSafe for RegionBoundary
impl Send for RegionBoundary
impl Sync for RegionBoundary
impl Unpin for RegionBoundary
impl UnsafeUnpin for RegionBoundary
impl UnwindSafe for RegionBoundary
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