pub struct RepresentationContext<'m> { /* private fields */ }Expand description
One IfcGeometricRepresentationContext or its sub-context.
Implementations§
Source§impl<'m> RepresentationContext<'m>
impl<'m> RepresentationContext<'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 a representation context.
Sourcepub fn is_sub_context(&self) -> bool
pub fn is_sub_context(&self) -> bool
Whether this is an IfcGeometricRepresentationSubContext.
Sourcepub fn identifier(&self) -> Option<String>
pub fn identifier(&self) -> Option<String>
ContextIdentifier, e.g. Body, Axis, Plan.
Sourcepub fn context_type(&self) -> Option<String>
pub fn context_type(&self) -> Option<String>
ContextType, e.g. Model, Plan, Design.
Sourcepub fn parent(&self) -> Option<EntityId>
pub fn parent(&self) -> Option<EntityId>
The parent context of a sub-context, if it declares one.
Sourcepub fn target_scale(&self) -> Option<f64>
pub fn target_scale(&self) -> Option<f64>
TargetScale, e.g. 0.01 for 1:100. Sub-contexts only.
Sourcepub fn target_view(&self) -> Option<TargetView>
pub fn target_view(&self) -> Option<TargetView>
TargetView. Sub-contexts only; None on a root context.
Sourcepub fn is_plan_view(&self) -> bool
pub fn is_plan_view(&self) -> bool
Whether this context is authored for plan drawing.
Source§impl RepresentationContext<'_>
impl RepresentationContext<'_>
Sourcepub fn precision(&self, model: &Model) -> Option<f64>
pub fn precision(&self, model: &Model) -> Option<f64>
Precision, resolved through ParentContext when written as *.
The value a tolerance-sensitive consumer needs; reading the slot directly on a sub-context yields the DERIVED marker instead.
Sourcepub fn coordinate_space_dimension(&self, model: &Model) -> Option<i64>
pub fn coordinate_space_dimension(&self, model: &Model) -> Option<i64>
CoordinateSpaceDimension, resolved through ParentContext.
Sourcepub fn world_coordinate_system(&self, model: &Model) -> Option<EntityId>
pub fn world_coordinate_system(&self, model: &Model) -> Option<EntityId>
WorldCoordinateSystem, resolved through ParentContext.
Without this a sub-context appears to have no placement and geometry authored into it lands at the wrong origin.
Sourcepub fn true_north(&self, model: &Model) -> Option<EntityId>
pub fn true_north(&self, model: &Model) -> Option<EntityId>
TrueNorth, resolved through ParentContext.