Skip to main content

stage_action

Function stage_action 

Source
pub fn stage_action(
    tx: &mut Transaction,
    model: &Model,
    schema: &Schema,
    draft: ActionDraft,
) -> StructuralResult<EntityId>
Expand description

Stage an IfcStructuralAction create edit on tx.

Fails with StructuralError::WrongReferenceType if draft.applied_load is not one of the load types kind permits, StructuralError::SemanticViolation if ProjectedOrTrue is PROJECTED_LENGTH while coordinate_system is not Global, and StructuralError::MissingRequired if destabilizing_load is unset while the target schema requires it.

With ActionDraft::varying set, a linear kind stages IfcStructuralLinearActionVarying and a planar kind IfcStructuralPlanarActionVarying. That fails with StructuralError::EntityNotInSchema outside IFC2X3, with StructuralError::InvalidDraftValue for any other kind or a SubsequentAppliedLoads list below its minimum (1 linear, 2 planar), and with the reference errors when the location is not an IfcShapeAspect or a subsequent load not an IfcStructuralLoad. Every refusal stages nothing. Returns the id staged for the new entity.