#[non_exhaustive]pub enum PropertyAnomaly {
Show 19 variants
TypedTwice {
object: EntityId,
kept: EntityId,
rejected: EntityId,
relation: EntityId,
},
DuplicateSetName {
owner: EntityId,
kept: EntityId,
rejected: EntityId,
},
DuplicatePropertyName {
set: EntityId,
kept: EntityId,
rejected: EntityId,
},
TypeAttachedByRelationship {
relationship: EntityId,
type_object: EntityId,
},
MissingDefinition {
relationship: EntityId,
definition: EntityId,
},
MissingObject {
relationship: EntityId,
object: EntityId,
},
QuantityUnitMismatch {
quantity: EntityId,
unit: EntityId,
expected: &'static str,
found: String,
},
NegativeQuantity {
quantity: EntityId,
value: f64,
},
QuantityValueMissing {
quantity: EntityId,
},
QuantityValueNotNumeric {
quantity: EntityId,
found: String,
},
MissingMember {
container: EntityId,
member: EntityId,
},
MemberNotReference {
container: EntityId,
attribute: &'static str,
found: String,
},
DuplicateMember {
container: EntityId,
attribute: &'static str,
member: EntityId,
},
ComplexCycle {
complex: EntityId,
member: EntityId,
},
ComplexTooDeep {
complex: EntityId,
limit: usize,
},
ComplexBudgetExceeded {
complex: EntityId,
limit: usize,
},
NotATemplate {
container: EntityId,
member: EntityId,
type_name: String,
},
SlotCountMismatch {
entity: EntityId,
type_name: String,
expected: usize,
actual: usize,
},
MalformedAttribute {
entity: EntityId,
attribute: &'static str,
found: String,
},
}Expand description
A structural problem found while reading properties.
#[non_exhaustive]: new structural checks add variants without breaking
callers that match on this type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TypedTwice
An object assigned two different types by IfcRelDefinesByType.
IFC4 IfcObject.IsTypedBy is SET [0:1]; IFC2X3 IfcObject WR1
allows at most one. The first relationship by id is kept, and only
its type’s sets are inherited.
Fields
DuplicateSetName
Two property sets of the same name on one owner.
IFC4 forbids it on both occurrences (IfcObject.UniquePropertySetNames)
and types (IfcTypeObject.UniquePropertySetNames); IFC2X3 states no
such rule. Either way the resolved view is keyed by name, so the set
with the lower id is kept and the other is reported here rather than
silently overwriting it.
Fields
DuplicatePropertyName
Two properties of the same name in one property set, or two property templates of the same name in one set or complex template.
Forbidden in IFC4 (IfcPropertySet.UniquePropertyNames) and IFC2X3
(WR32). PropertySet::property
answers with the first in HasProperties order. For templates,
IfcPropertySetTemplate and IfcComplexPropertyTemplate both carry
UniquePropertyNames; set is then the template, and the first
template in HasPropertyTemplates order is the one a check uses.
Fields
TypeAttachedByRelationship
An IfcTypeObject attached by IfcRelDefinesByProperties.
Forbidden by the NoRelatedTypeObject WHERE rule: a type carries its
sets in HasPropertySets. The set is still reported, because refusing
to read a common exporter bug helps nobody.
Fields
MissingDefinition
A relationship names a property definition absent from the file.
MissingObject
A relationship names an object absent from the file.
QuantityUnitMismatch
A quantity states a unit whose type contradicts the quantity kind.
IfcQuantityLength.WR21 requires a LENGTHUNIT, and the sibling
quantities carry the same rule. A file breaking it has stated two
different things about the same number.
Fields
NegativeQuantity
A simple quantity states a negative value.
Every IfcQuantity* carries WR22 : Value >= 0. (count included). A
negative area is not a small error; it is a value no consumer should
use for takeoff.
QuantityValueMissing
A simple quantity states no value.
The value attribute (LengthValue, AreaValue, …) is not
OPTIONAL on any IfcQuantity*. The quantity stays in its set’s
quantities as Quantity::Unresolved with
UnresolvedValue::Missing, and is named here.
QuantityValueNotNumeric
A simple quantity’s value attribute holds something other than a number, such as text or a reference.
The quantity stays in its set’s quantities as
Quantity::Unresolved with UnresolvedValue::NotNumeric, and is
named here.
Fields
MissingMember
A property set, quantity set, complex property or complex quantity, or a property set or complex template, lists a member id that is not in the file.
The member cannot be read, so it is absent from the resolved value.
Fields
MemberNotReference
A member list holds an item that is not an entity reference.
IfcPropertySet.HasProperties, IfcComplexProperty.HasProperties,
IfcElementQuantity.Quantities and
IfcPhysicalComplexQuantity.HasQuantities are sets of entity
references. An item such as a string or number names no member, so
nothing is read for it.
Fields
DuplicateMember
A member list names the same entity more than once.
Each of those lists is an EXPRESS SET, which cannot hold one
instance twice. The member is read once, at its first position.
Fields
ComplexCycle
A complex property, complex quantity or complex property template reaches itself again through its members.
The schema forbids only a DIRECT self-member (IfcComplexProperty
WR21, IfcPhysicalComplexQuantity.NoSelfReference,
IfcComplexPropertyTemplate.NoSelfReference); a longer cycle is just
as unresolvable. member is already being read higher
up the same path, so it is left out of complex’s resolved members.
Fields
ComplexTooDeep
Complex nesting deeper than the reader follows.
complex is resolved with its name and usage, but its members are
not read.
Fields
ComplexBudgetExceeded
One read followed more nested member references than its budget.
Members may legally be shared between complex properties, so a
small file can expand into an enormous tree. Once the budget is
spent, the remaining members of complex are not read.
Fields
NotATemplate
A template’s member list, or an IfcRelDefinesByTemplate, names an
entity that is not a template of the required kind.
HasPropertyTemplates is a SET [1:?] OF IfcPropertyTemplate and
RelatingTemplate an IfcPropertySetTemplate. The entity is not
read as a template.
Fields
SlotCountMismatch
A record’s attribute count differs from what the bound release declares for its entity.
Attributes are read by name from that release’s table, so a short record would otherwise read its missing trailing attributes as unset. The attributes present are still read.
Fields
MalformedAttribute
An attribute holds a value its declared type does not admit: a number where a label is declared, an enumeration constant that is not a member of the release’s enumeration, or a reference to an entity outside the declared type.
The value is still reported as written where the view has a place for it (an enumeration constant, a reference id), and left unset otherwise.