pub struct CartesianTransformationOperator<'m> { /* private fields */ }Expand description
The attributes every operator shares, from the abstract supertype.
A view in its own right so a caller holding an operator of unknown subtype can still read the origin and scale without dispatching, and so the four concrete views do not each re-derive the default chain.
Implementations§
Source§impl<'m> CartesianTransformationOperator<'m>
impl<'m> CartesianTransformationOperator<'m>
Sourcepub fn new(id: EntityId, entity: &'m Entity) -> Self
pub fn new(id: EntityId, entity: &'m Entity) -> Self
Wrap an entity assumed to be an IfcCartesianTransformationOperator
subtype.
Sourcepub fn local_origin_ref(&self) -> GeometryResult<EntityId>
pub fn local_origin_ref(&self) -> GeometryResult<EntityId>
The LocalOrigin reference. Required by the schema.
Sourcepub fn local_origin(&self, model: &'m Model) -> GeometryResult<[f64; 3]>
pub fn local_origin(&self, model: &'m Model) -> GeometryResult<[f64; 3]>
The translation part, promoted to 3D.
Sourcepub fn scale_attribute(&self) -> Option<f64>
pub fn scale_attribute(&self) -> Option<f64>
The raw Scale, None when the file omitted it.
Prefer Self::scale unless you specifically need to know whether the
value was written, e.g. to decide what Scale2 defaults to.
Sourcepub fn scale(&self) -> GeometryResult<f64>
pub fn scale(&self) -> GeometryResult<f64>
The effective uniform scale: the derived Scl := NVL(Scale, 1.0).
A non-positive scale is crate::GeometryError::Degenerate: the schema’s
ScaleGreaterZero rule forbids it, zero collapses the mapped geometry
to a point, and a negative value mirrors it while leaving the winding
order inverted, which shows up much later as inside-out normals.
Sourcepub fn axis1(&self, model: &'m Model) -> GeometryResult<Option<[f64; 3]>>
pub fn axis1(&self, model: &'m Model) -> GeometryResult<Option<[f64; 3]>>
The local X direction (Axis1), normalized; None when absent.
Sourcepub fn axis2(&self, model: &'m Model) -> GeometryResult<Option<[f64; 3]>>
pub fn axis2(&self, model: &'m Model) -> GeometryResult<Option<[f64; 3]>>
The local Y direction (Axis2), normalized; None when absent.
Only its sign relative to Axis3 x Axis1 survives: the derived U
re-orthogonalizes it, so a slightly-off Axis2 is corrected while an
opposing one flips the handedness of the frame.