Skip to main content

HalfSpaceSolid

Struct HalfSpaceSolid 

Source
pub struct HalfSpaceSolid<'m> { /* private fields */ }
Expand description

IfcHalfSpaceSolid: an infinite solid on one side of a surface.

See the module documentation. This type is not tessellatable and callers must route it through a boolean; Self::is_infinite exists so that a pipeline can assert the invariant rather than discovering it at render time.

Implementations§

Source§

impl<'m> HalfSpaceSolid<'m>

Source

pub fn new(id: EntityId, entity: &'m Entity) -> Self

Wrap an entity assumed to be an IfcHalfSpaceSolid or a subtype.

Source

pub fn id(&self) -> EntityId

The entity id.

Source

pub fn type_name(&self) -> &'m str

The IFC type name, naming the concrete subtype.

Source

pub fn base_surface(&self) -> GeometryResult<EntityId>

The IfcSurface reference dividing space. Normally an IfcPlane.

Returned as a reference on purpose. BaseSurface is typed as the abstract IfcSurface, so there is no single view to resolve into: lower::halfspace dispatches on the concrete surface type (refusing non-planar ones by name) and the typed views live in crate::surface.

Source

pub fn agreement_flag(&self) -> GeometryResult<bool>

Which side of BaseSurface is material.

true means the solid lies on the side the surface normal points away from. Inverting this silently cuts the wrong half away.

Source

pub fn is_infinite(&self) -> bool

Is the solid unbounded in every direction?

true for a plain IfcHalfSpaceSolid. false for the two bounded subtypes, whose extra attributes give a finite region to work in.

Note that even a false here does not make the entity meaningful on its own: it is still only valid as a boolean operand. What changes is that a consumer can build a finite body for it.

Source

pub fn is_bounded(&self) -> bool

Does the concrete type carry a bounding attribute?

Source

pub fn reject_standalone_use(&self) -> GeometryError

Reject use of this half space anywhere other than a boolean operand.

Exists so the “cannot be tessellated” rule is a single call rather than a comment every consumer is expected to have read. The error is crate::GeometryError::Unsupported, because the file is perfectly valid – it is the requested operation that is not.

Trait Implementations§

Source§

impl<'m> Clone for HalfSpaceSolid<'m>

Source§

fn clone(&self) -> Self

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<'m> Copy for HalfSpaceSolid<'m>

Source§

impl<'m> Debug for HalfSpaceSolid<'m>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'m> Freeze for HalfSpaceSolid<'m>

§

impl<'m> RefUnwindSafe for HalfSpaceSolid<'m>

§

impl<'m> Send for HalfSpaceSolid<'m>

§

impl<'m> Sync for HalfSpaceSolid<'m>

§

impl<'m> Unpin for HalfSpaceSolid<'m>

§

impl<'m> UnsafeUnpin for HalfSpaceSolid<'m>

§

impl<'m> UnwindSafe for HalfSpaceSolid<'m>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.