前两期的内容 : 《工业基础类IFC—总体架构和空间结构》 和 《工业基础类IFC—EXPRESS语言》 偏重理论,大部分内容也摘自笔者的硕士论文,这一期聊一聊接地气的东西,比如我们在拿到一个
IFC
文件之后如何去阅读。
01 确定IFC标准
首先我们需要判别IFC
文件的版本。IFC
文件的后缀统一为“.ifc
”,因为无法通过后缀来获悉,需要利用文本编辑器(包括Windows
自带的NotePad
以及免费软件Notepad++
、付费软件UltraEditor
等等)打开物理文件,并在头段内容中进行确认,正如图1
所示,案例文件为 IFC4.1
版本。
图1 头段中的版本标识
在确认好文件版本之后,第二步就是去buildingSmart
官网找到对应版本的标准,具体链接位置已在图2
中标明,这样我们就能进入图3
的界面,查询各个IFC
版本的内容。如果是想做一些应用型的工作,应该尽量使用稳定的版本,例如目前最为普及的 IFC 2✖3
。
图2 IFC版本数据库链接位置
图3 IFC版本数据库
02 IFC实体快速定位
IFC
官方文档目前还未提供中文版本,因此要常备翻译软件,在搜索特定的IFC
实体时,笔者通常是定位在Alphabetical listings
下,然后按字母顺序进行查找,这样查找起来会比较快捷。
图4 按字母次序进行实体查询
03 属性查询
(1) IFC4
之前的属性查询方式
IFC4
标准之前(包含IFC4
),我们并不能直观地获取到属性序列,但可以通过“ 继承结构图(Inheritance Graph
)”间接得到。如图5
所示,找到ENTITY
下方的属性即可(INVERSE反向属性不计入在内),这几个属性就是构成 IfcPropertyListValue
实体的属性,且次序与物理文件中的属性次序一致。
图5 属性查询方式(一)
(2)IFC4
之后的属性查询方式
在IFC4
之后的版本中,buildingSmart
好像意识到了这一点,因此优化了文档排版,查询对应关系变得相当简单,直接给一个属性继承表,对应的属性已经给你标明了。
图6 属性查询方式(二)
04 关于物理文件中 $ 的解释
**A:**The $ character encodes the indefinite value, i.e. it appears if an optional attribute has not been filled in.
**B:**The ‘ ′ s i g n s t a n d s f o r a v a l u e t h a t i s i n f i n i t e . F o r e x a m p l e w i t h i n t h e e n t i t y , I f c T r a n s i t i o n C u r v e S e g m e n t 2 D , i f i t i s a n e n t e r i n g t r a n s i t i o n t h e r a d i u s i s u s u a l l y i n f i n i t e . I f y o u l o o k a t t h e S T E P f i l e i t w i l l h a v e a ′ ' sign stands for a value that is infinite. For example within the entity, IfcTransitionCurveSegment2D, if it is an entering transition the radius is usually infinite. If you look at the STEP file it will have a ' ′signstandsforavaluethatisinfinite.Forexamplewithintheentity,IfcTransitionCurveSegment2D,ifitisanenteringtransitiontheradiusisusuallyinfinite.IfyoulookattheSTEPfileitwillhavea′’ sign instead of an infinite sign or similar.
Further some properties within the ifc entities are optional, meaning you don’t have to define them in order to create a valid ifc object. Whenever an object has an optional property, which is not defined by the user, the program aso, it will show as a ‘$’ sign too within the STEP.
All this is documented in the ISO 10303 -21 if you wanna look into this any further. I hope I could help.
在IFC物理文件中,$代表不明确值,当且仅当 IFC Atrribute Cardinality为 **?**时可使用,即该属性为可选属性,无需为其赋值仍然可获得有效的
IFC
对象。
05 总结
上述内容的加持下,读者基本可以按照流程一步一步地去阅读和理解IFC
物理文件了,但由于属性中实体引用的存在,往往会使得纯人工阅读的方式进度十分缓慢,建议大家结合一些IFC
浏览或者可视化的软件,可大大提高阅读效率。
以下是我的创建的IFC交流群,有兴趣的可以扫码加入!
抱歉,图片被CSDN认为是违规的,群号为:788206534,麻烦大家手动输入了。