Skip to main content

Module placement

Module placement 

Source
Expand description

IfcPlacement and its three subtypes: where a local coordinate system is.

§What the schema actually says

IfcPlacement contributes Location (an IfcCartesianPoint) and nothing else. Its subtypes add axes:

EntityAddsMeaning
IfcAxis1PlacementAxisone direction: a rotation/extrusion axis
IfcAxis2Placement2DRefDirectionlocal X in the plane
IfcAxis2Placement3DAxis, RefDirectionlocal Z and approximate local X

Because Location is inherited, it is slot 0 in every subtype and the subtype’s own attributes start at 1. Using local indices puts Axis where Location is, which produces geometry that is placed plausibly but wrongly – the worst failure mode there is.

§RefDirection is only approximate

IfcAxis2Placement3D explicitly permits Axis and RefDirection to be non-perpendicular; the derived P runs IfcFirstProjAxis, which projects RefDirection onto the plane normal to Axis. That projection lives in crate::transform::Transform::from_axes and is not repeated here.

§Both axes are optional, and so is neither

AxisAndRefDirProvision says NOT (EXISTS(Axis) XOR EXISTS(RefDirection)) – give both or give neither. Files break this rule, so this module accepts one alone and lets from_axes supply the schema default for the other (global Z for Axis, projected global X for RefDirection) rather than rejecting a file over a WHERE rule that costs nothing to tolerate.

Structs§

Axis1Placement
A borrowed view of an IfcAxis1Placement: a point and one axis.
Axis2Placement2D
A borrowed view of an IfcAxis2Placement2D: origin plus local X.
Axis2Placement3D
A borrowed view of an IfcAxis2Placement3D: origin, local Z, local X.
Placement
The part of a placement every subtype shares: its Location.

Enums§

Axis2Placement
A member of the IfcAxis2Placement SELECT, dispatched once.

Functions§

axis_placement_transform
Resolve any IfcAxis2Placement reference to a transform.