IFC4.3.x-development icon indicating copy to clipboard operation
IFC4.3.x-development copied to clipboard

IfcCivilElement doesn't have CorrectTypeAssigned = IfcCivilElementType

Open Andrej730 opened this issue 2 years ago • 6 comments

Noticed that in latest .exp schemas (as it was in ifc4 too) IfcCivilElement doesnt have WHERE block with CorrectTypeAssigned = IfcCivilElementType. Seems like a bug.

Current code for IfcCivilElement:

ENTITY IfcCivilElement
 SUBTYPE OF (IfcElement);
END_ENTITY;

ENTITY IfcCivilElementType
 SUBTYPE OF (IfcElementType);
END_ENTITY;

Example for IfcWindow with CorrectTypeAssigned:

ENTITY IfcWindow
 SUBTYPE OF (IfcBuiltElement);
	OverallHeight : OPTIONAL IfcPositiveLengthMeasure;
	OverallWidth : OPTIONAL IfcPositiveLengthMeasure;
	PredefinedType : OPTIONAL IfcWindowTypeEnum;
	PartitioningType : OPTIONAL IfcWindowTypePartitioningEnum;
	UserDefinedPartitioningType : OPTIONAL IfcLabel;
 WHERE
	CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR
 (PredefinedType <> IfcWindowTypeEnum.USERDEFINED) OR
 ((PredefinedType = IfcWindowTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
	CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR
  ('IFC4X3_TC1.IFCWINDOWTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));
END_ENTITY;

Andrej730 avatar Feb 17 '23 12:02 Andrej730

These rules are automatically generated, but somehow it seems that the CorrectTypeAssigned rule is only generated for entities having a predefined types (https://github.com/buildingSMART/IFC4.3.x-development/blob/master/code/xmi_document.py#L877) not sure what the reasoning was behind that, maybe none?

aothms avatar Feb 17 '23 19:02 aothms

@aothms at a guess maybe it was coded alongside the "CorrectPredefinedType" rule so just an oversight? I don't see any reason for the two to be correlated.

Moult avatar Feb 17 '23 20:02 Moult

I agree, marking this as decided.

aothms avatar Feb 18 '23 11:02 aothms

Does it make sense to fix since IfcCivilElement and IfcCivilElementType are deprecated?

SergejMuhic avatar Feb 19 '23 18:02 SergejMuhic

Does it make sense to fix since IfcCivilElement and IfcCivilElementType are deprecated?

Could it be that if it's a problem with WHERE block in general then it also affects some other entities?

Andrej730 avatar Feb 20 '23 20:02 Andrej730

Same thing for 'IfcDistributionElementType', 'IfcFurnishingElementType' and 'IfcBuiltElementType'

image image image

Andrej730 avatar Jul 22 '23 09:07 Andrej730