IFC 4.3.2.20251031 (IFC4X3_ADD2) under development

8.3.3.1 IfcConstraint(约束)

抽象 该定义可能不会被直接实例化。

8.3.3.1.1 语义定义(Semantic definition)

IfcConstraint 用于定义可应用于对象或属性值的约束、限值或边界条件。

约束可分为用户定义约束和系统定义约束。用户定义约束由用户应用,仅限于高级定义(如对象属性)。系统定义约束可应用于任何对象属性,通常由应用程序定义以强制执行数据验证或参数化行为,旨在由应用程序强制执行但不允许最终用户直接编辑。

IfcConstraint 可通过 IfcRelAssociatesConstraint 关系与 IfcObjectDefinitionIfcPropertyDefinition 的任何子类型关联以指示系统定义约束,或通过 IfcResourceConstraintRelationshipIfcResourceObjectSelect(如 IfcPropertySingleValue)关联以指示用户定义约束。

约束必须通过 IfcConstraint.Name 属性设置名称,并可选择通过 IfcConstraint.Description 设置描述。约束等级(强制、建议、咨询)必须通过 IfcConstraint.ConstraintGradeIfcConstraint.UserDefinedGrade 指定,而约束来源、创建者和创建时间可选择通过 IfcConstraint.ConstraintSourceIfcConstraint.CreatingActorIfcConstraint.CreationTime 声明。

约束还可通过 IfcExternalReferenceRelationship 关联其他外部信息(如分类或文档信息),可通过逆向属性 IfcConstraint.HasExternalReferences 访问。

8.3.3.1.2 实体继承(Entity inheritance)

8.3.3.1.3 特性(Attributes)

# 特性(Attributes) 类型 描述
IfcConstraint (9)
1 Name IfcLabel

约束的可读名称。

2 Description OPTIONAL IfcText

约束的可读描述,可提供关于约束的附加信息。

3 ConstraintGrade IfcConstraintEnum

限定约束类型的枚举。

4 ConstraintSource OPTIONAL IfcLabel

约束来源的任何原始材料,如规范或标准。

5 CreatingActor OPTIONAL IfcActorSelect

创建约束的个人和/或组织。

6 CreationTime OPTIONAL IfcDateTime

指定约束实例的信息创建时间。

7 UserDefinedGrade OPTIONAL IfcLabel

允许在 IfcConstraintEnum 类型的 ConstraintGrade 属性提供的枚举值(强制、建议、咨询)之外指定用户定义的约束等级。 当为 UserDefinedGrade 属性提供值时,ConstraintGrade 属性应同时设置为 USERDEFINED 枚举值。

HasExternalReferences SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects

引用与约束关联的外部参考,如库、分类或文档信息。

PropertiesForConstraint SET [0:?] OF IfcResourceConstraintRelationship FOR RelatingConstraint

引用应用约束的属性。

表 8.3.3.1.A

8.3.3.1.4 形式化命题(Formal propositions)

名称 描述
WR11

当 ConstraintGrade 的值设置为 USERDEFINED 时,必须声明 UserDefinedGrade 属性。

(ConstraintGrade <> IfcConstraintEnum.USERDEFINED) OR
((ConstraintGrade = IfcConstraintEnum.USERDEFINED) AND EXISTS(SELF\IfcConstraint.UserDefinedGrade))
表 8.3.3.1.B

8.3.3.1.5 形式化表示(Formal representation)

ENTITY IfcConstraint
 ABSTRACT SUPERTYPE OF (ONEOF
	(IfcMetric
	,IfcObjective));
	Name : IfcLabel;
	Description : OPTIONAL IfcText;
	ConstraintGrade : IfcConstraintEnum;
	ConstraintSource : OPTIONAL IfcLabel;
	CreatingActor : OPTIONAL IfcActorSelect;
	CreationTime : OPTIONAL IfcDateTime;
	UserDefinedGrade : OPTIONAL IfcLabel;
 INVERSE
	HasExternalReferences : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects;
	PropertiesForConstraint : SET [0:?] OF IfcResourceConstraintRelationship FOR RelatingConstraint;
 WHERE
	WR11 : (ConstraintGrade <> IfcConstraintEnum.USERDEFINED) OR
((ConstraintGrade = IfcConstraintEnum.USERDEFINED) AND EXISTS(SELF\IfcConstraint.UserDefinedGrade));
END_ENTITY;

8.3.3.1.6 参考文献