Skip to main content

BoundaryPrism

Struct BoundaryPrism 

Source
pub struct BoundaryPrism {
    pub origin: Point3,
    pub x: Vec3,
    pub y: Vec3,
    pub axis: Vec3,
}
Expand description

Where a bounded half-space’s boundary stands and which way its prism runs (#321).

The boundary point (u, v) lies at origin + u x + v y, and the prism is the set of lines through the boundary’s region parallel to axis, infinite both ways. x and y are used as given: their lengths scale the boundary, the angle between them shears it, and their handedness mirrors it. Only the direction of axis counts, not its length or sign.

Fields§

§origin: Point3

Where the boundary’s (0, 0) lies.

§x: Vec3

The image of the boundary’s +u.

§y: Vec3

The image of the boundary’s +v.

§axis: Vec3

The direction of the prism’s lines.

Implementations§

Source§

impl BoundaryPrism

Source

pub fn along_normal( frame: PlaneFrame, plane: Plane3, tolerance: Tolerance, ) -> GeomResult<Self>

The prism along plane’s normal of a boundary authored in frame (bounded_half_space_in_frame): frame’s x projected into the plane fixes the boundary’s rotation about the normal, its y is the normal cross that x – or its opposite for a frame mirrored about the normal, whose x cross y points against it (#322) – and its origin is projected onto the plane.

§Errors

InvalidInput, by name, for a plane without a normal, a frame whose x is parallel to it, and a frame standing perpendicular to the plane (within the angular tolerance), which has no handedness there.

Source

pub fn along_plane_normal( placement: Transform3, plane: Plane3, tolerance: Tolerance, ) -> GeomResult<Self>

The prism along plane’s normal of a boundary authored in placement’s xy plane, the whole frame honoured (#322): the boundary keeps the shape the placement gives it – the length of its x, the length and lean of its y against that x – and the placement’s handedness, laid into the plane with its x along the placement’s x projected there and its y to the side the normal cross that x points, or the other side for a left-handed placement, whose x, y and z are mirrored. The origin is projected onto the plane. For a right-handed placement with unit, perpendicular x and y this is BoundaryPrism::along_normal.

§Errors

InvalidInput, by name, for a plane without a normal, a non-finite placement, a degenerate one, whose x, y and z columns do not span space within the angular tolerance (parallel or zero axes), and one whose x is parallel to the normal.

Source

pub fn along_placement_z( placement: Transform3, tolerance: Tolerance, ) -> GeomResult<Self>

The prism of a boundary authored in placement’s xy plane and running along its z (#321): the point (u, v) at placement * (u, v, 0), the axis placement’s z column. This is how IFC bounds an IfcPolygonalBoundedHalfSpace, by its Position.

§Errors

InvalidInput, by name, for a non-finite placement and for a degenerate one, whose x, y and z columns do not span space within the angular tolerance (parallel or zero axes): its boundary has no area, or its prism no direction off the boundary’s plane.

Source

pub fn crossing( &self, plane: Plane3, tolerance: Tolerance, ) -> GeomResult<Scalar>

The cosine of the prism’s axis against plane’s unit normal, signed: how steeply, and from which side, the prism crosses the plane.

§Errors

InvalidInput, by name, for a plane without a normal, an axis that is zero or not finite, and an axis within the angular tolerance of the plane: its prism never crosses it.

Trait Implementations§

Source§

impl Clone for BoundaryPrism

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 Copy for BoundaryPrism

Source§

impl Debug for BoundaryPrism

Source§

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

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

impl PartialEq for BoundaryPrism

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BoundaryPrism

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

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.