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: Point3Where the boundary’s (0, 0) lies.
x: Vec3The image of the boundary’s +u.
y: Vec3The image of the boundary’s +v.
axis: Vec3The direction of the prism’s lines.
Implementations§
Source§impl BoundaryPrism
impl BoundaryPrism
Sourcepub fn along_normal(
frame: PlaneFrame,
plane: Plane3,
tolerance: Tolerance,
) -> GeomResult<Self>
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.
Sourcepub fn along_plane_normal(
placement: Transform3,
plane: Plane3,
tolerance: Tolerance,
) -> GeomResult<Self>
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.
Sourcepub fn along_placement_z(
placement: Transform3,
tolerance: Tolerance,
) -> GeomResult<Self>
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.
Sourcepub fn crossing(
&self,
plane: Plane3,
tolerance: Tolerance,
) -> GeomResult<Scalar>
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.