Skip to main content

create_quantity

Function create_quantity 

Source
pub fn create_quantity(
    tx: &mut Transaction,
    model: &Model,
    draft: QuantityDraft<'_>,
) -> CostAuthoringResult<EntityId>
Expand description

Stage one simple physical quantity, in the model’s declared release.

A count is a cardinality, so a fractional or negative count is refused; the remaining dimensions refuse negatives because no physical extent is negative, and a sign error here silently inverts a cost sum.

§Errors

Besides those refusals and a Unit that is not an IfcNamedUnit: CostAuthoringError::MultipleSchemas or CostAuthoringError::UnsupportedSchema when the model binds no single known release (a model without FILE_SCHEMA binds IFC4); CostAuthoringError::EntityNotInSchema for a kind the release does not declare (Number outside IFC4X3); and CostAuthoringError::AuthoringNotInSchema for a formula in IFC2X3. Nothing is staged on an error.