TW201814560A - Method for using IFC information in game engine, computer program product with stored programs, computer readable medium with stored programs, and electronic apparatuses - Google Patents

Method for using IFC information in game engine, computer program product with stored programs, computer readable medium with stored programs, and electronic apparatuses Download PDF

Info

Publication number
TW201814560A
TW201814560A TW105132758A TW105132758A TW201814560A TW 201814560 A TW201814560 A TW 201814560A TW 105132758 A TW105132758 A TW 105132758A TW 105132758 A TW105132758 A TW 105132758A TW 201814560 A TW201814560 A TW 201814560A
Authority
TW
Taiwan
Prior art keywords
ifc
format
game engine
computer system
computer
Prior art date
Application number
TW105132758A
Other languages
Chinese (zh)
Inventor
吳翌禎
許睿叡
吳中期
Original Assignee
國立高雄應用科技大學
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 國立高雄應用科技大學 filed Critical 國立高雄應用科技大學
Priority to TW105132758A priority Critical patent/TW201814560A/en
Publication of TW201814560A publication Critical patent/TW201814560A/en

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

This invention mainly discloses a method for using IFC information in game engine which is used to solve the IFC information unsuitable using for game engine. The method is used for a computer system for translating IFC information, and comprises steps of setting a game engine to get data input format thereof, reading an IFC source file to set a sub-class inherited from an elemental class based on IFC characterization format from the IFC source file into a beginning to get a plurality of correlated objects, each object having an appearance characteristic defined according to a plurality of IFC coordinators, translating the format of the appearance characteristic into a display format compatible with the data input format, translating the IFC coordinators into a coordination format, and integrating the coordination format and the display format to a middle-file used for applying the game engine to display the objects by the computer system. Thus, it can actually resolve said problem.

Description

IFC工程資訊用於遊戲引擎的方法、內儲程式之電腦程式產品、內儲程 式之電腦可讀取記錄媒體及電子裝置  IFC engineering information for game engine methods, computer program products for internal storage programs, computer readable recording media and electronic devices for internal storage  

本發明係關於一種應用IFC工程資訊的方法;特別是關於一種IFC工程資訊用於遊戲引擎的方法。 The present invention relates to a method of applying IFC engineering information; and more particularly to a method for IFC engineering information for a game engine.

建築生命週期各階段中,可利用BIM(Building Information Modeling)技術進行資訊整合及資料交換,為此,buildingSMART組織提出IFC(Industry Foundation Classes)工程資訊作為資料交換檔案格式,使各種工程軟體間的模型可以相互轉換與交流,以利實現Open BIM概念。 In the various stages of the construction life cycle, BIM (Building Information Modeling) technology can be used for information integration and data exchange. To this end, the buildingSMART organization proposes IFC (Industry Foundation Classes) engineering information as a data exchange file format to make models between various engineering software. It is possible to convert and communicate with each other to realize the Open BIM concept.

IFC工程資訊本身具有物件導向的特性,可透過參照及繼承方式運用各階層的資源,以滿足建築工程生命週期各階段與領域的使用需求。其中,IFC資料架構分為:資源層(Resource Layer)、核心層(Core Layer)、互通介面層(Interoperability Layer)及領域層(Domain Layer),IFC資料格式所描述的物件可分為Defined Types、Enumerations、Select Types及Entities等,IFC資料檔案為一文字檔,並運用ISO 10303-11 EXPRESS描述語言來定義IFC物件之屬性;以ISO 10303-21實作方法建立編碼及交換格式;以及ISO 10303-28描述XML表示方法,其格式可參酌http://www.buildingsmart-tech.org/specifications等網站。 IFC engineering information itself has object-oriented characteristics, and can use various levels of resources through reference and inheritance to meet the needs of various stages and fields of the construction engineering life cycle. Among them, the IFC data structure is divided into: Resource Layer, Core Layer, Interoperability Layer and Domain Layer. The objects described in the IFC data format can be divided into Defined Types. Enumerations, Select Types and Entities, etc., IFC data files are in a text file, and ISO 10303-11 EXPRESS description language is used to define the attributes of IFC objects; ISO 10303-21 implementation methods are used to establish encoding and exchange formats; and ISO 10303-28 Describe the XML representation method in the format of http://www.buildingsmart-tech.org/specifications and other websites.

惟,為了符合不同領域的需求,使得IFC資料架構日益繁雜,且IFC資料格式係用純文字格式描述幾何及非幾何工程物件,並用基於IFC格式之物件導向描述物件間的關係,導致其他應用軟體(如遊戲引擎)無法讀取IFC資料。 However, in order to meet the needs of different fields, the IFC data structure is increasingly complicated, and the IFC data format describes geometric and non-geometric engineering objects in plain text format, and uses IFC-based object-oriented to describe the relationship between objects, resulting in other application software. (such as the game engine) can not read IFC data.

有鑑於此,有必要改善上述先前技術的缺點,以符合實際需求,提升其實用性。 In view of this, it is necessary to improve the shortcomings of the prior art described above to meet practical needs and improve its practicability.

本發明係提供一種IFC工程資訊用於遊戲引擎的方法,可供遊戲引擎依據IFC工程資訊顯示物件特徵。 The present invention provides a method for IFC engineering information for a game engine, which allows the game engine to display object features based on IFC engineering information.

本發明再提供一種內儲程式之電腦程式產品、內儲程式之電腦可讀取記錄媒體及電子裝置,用以執行上述方法。 The present invention further provides a computer program product for storing a program, a computer readable recording medium and an electronic device for storing the program for performing the above method.

本發明揭示一種IFC工程資訊用於遊戲引擎的方法,係供轉換IFC工程資訊之一電腦系統執行,其步驟可包含:設定一遊戲引擎,擷取該遊戲引擎的資料輸入格式;以該IFC來源檔案中基於IFC描述格式定義且繼承自一基礎類別之一子類別為起點,擷取數個相關聯的物件,各物件具有依據數個IFC座標定義的一外觀特徵,將該外觀特徵之格式轉換為相容於該資料輸入格式之一展示格式,將該IFC座標轉換為一座標格式;及匯集該座標格式及該展示格式成為一中介檔案,供該電腦系統運用該遊戲引擎顯示上述物件。 The invention discloses a method for using IFC engineering information for a game engine, which is implemented by a computer system for converting IFC engineering information, and the steps thereof may include: setting a game engine to retrieve a data input format of the game engine; and using the IFC source The file is defined based on the IFC description format and inherits from a sub-category of a basic category as a starting point, and several associated objects are retrieved, and each object has an appearance feature defined according to several IFC coordinates, and the format of the appearance feature is converted. To match the display format of one of the data input formats, the IFC coordinate is converted into a standard format; and the coordinate format and the display format are assembled into an intermediary file for the computer system to display the object using the game engine.

所述基礎類別可為符合該IFC描述格式定義的IfcElement類別;所述展示格式可為Mesh格式。 The base category may be an IfcElement category that conforms to the IFC description format definition; the presentation format may be a Mesh format.

所述外觀資料可用B-Rep、掃掠或CSG方式定義該物件。 The appearance data may be defined by a B-Rep, sweep or CSG method.

所述IFC座標可依據一轉換矩陣轉換為該展示座標。 The IFC coordinates can be converted to the display coordinates according to a conversion matrix.

本發明揭示之內儲程式之電腦程式產品、內儲程式之電腦可讀取記錄媒體及電子裝置,當電腦系統載入該電腦程式並執行後,可完 成上述方法。藉此,可便於使用、交換或執行上揭方法,有利於廣泛運用上述IFC工程資訊於其他應用軟體,便於各種應用軟體間的模型相互轉換與交流。 The computer program product and the computer readable recording medium and the electronic device of the internal storage program disclosed in the present invention can complete the above method after the computer system loads the computer program and executes it. In this way, it is convenient to use, exchange or execute the above-mentioned method, which is beneficial to widely use the above IFC engineering information to other application software, and facilitates the mutual conversion and exchange of models between various application software.

上揭方法、內儲程式之電腦程式產品、內儲程式之電腦可讀取紀錄媒體及電子裝置可在無損IFC工程資訊的情況下,有效的廣泛運用上述IFC工程資訊於其他應用軟體(如遊戲引擎),便於展示基於IFC工程資訊描述的物件,可供各種應用軟體間的模型相互轉換與交流,因此,本發明可以達成「降低工程資訊轉用難度」及「有利於應用不同軟體的優點」等功效。 The above-mentioned IFC engineering information can be effectively used in other application software (such as games) in the case of non-destructive IFC engineering information, such as the computer program products of the internal storage program and the computer program products of the internal storage program. The engine is convenient for displaying objects described based on IFC engineering information, and can be used for mutual conversion and communication between models of various application softwares. Therefore, the present invention can achieve the advantages of "reducing the difficulty of converting engineering information" and "favoring the advantages of applying different software". And other effects.

S1‧‧‧設定步驟 S1‧‧‧Setting steps

S2‧‧‧解析步驟 S2‧‧‧ analytical steps

S3‧‧‧匯檔步驟 S3‧‧‧ file steps

第1圖:係本發明之實施例之運作流程圖。 Figure 1 is a flow chart showing the operation of an embodiment of the present invention.

為讓本發明之上述及其他目的、特徵及優點能更明顯易懂,下文特舉本發明之較佳實施例,並配合所附圖式,作詳細說明如下: The above and other objects, features and advantages of the present invention will become more <RTIgt;

本發明全文所述之「耦接」,係指二電子裝置間藉由耦合技術(如:電磁或光電耦合等)相互傳遞訊號,惟不以此為限,係本發明所屬技術領域中具有通常知識者可以理解。 The term "coupling" as used throughout the present invention refers to the mutual transmission of signals between two electronic devices by coupling techniques (eg, electromagnetic or opto-electronic coupling, etc.), but not limited thereto, which is generally within the technical field to which the present invention pertains. Knowledge people can understand.

請參閱第1圖所示,其係本發明IFC工程資訊用於遊戲引擎的方法實施例之運作流程圖。其中,該IFC工程資訊處理方法實施例可供在一轉換IFC工程資訊之電腦系統(Computer System)執行,該電腦系統可為具有資料儲存、運算及通訊能力之可攜式運算裝置或雲端處理系統等,如:具有無線通訊功能之行動運算裝置(Mobile Computing Apparatus)或伺服器(Server)等,該電腦系統可耦接至少一終端設備(如:智慧型手機或電腦等),作為使用者與該電腦系統相互溝通的介面。在此實施例 中,由於IFC工程資訊具有物件導向特性,該電腦系統可將IFC模型資料寫入一文件導向式資料庫,如:MongoDB等,用以快速處理資料,惟不採用資料庫儲存資料亦可,其資料儲存架構從上到下可包含一伺服器(MongoDB Server)、數個資料庫(Database)、數個資料集(Collection)、數個文件(Document)及數個欄位(Field),其中,每一IFC檔案可視為一資料集,該IFC檔案中的每一筆資料可視為一文件,各文件可有多個欄位描述資料特徵,惟不以此為限。 Please refer to FIG. 1 , which is a flowchart of an operation of an embodiment of a method for using the IFC project information of the present invention for a game engine. The IFC engineering information processing method embodiment can be implemented in a computer system (Computer System) that converts IFC engineering information, and the computer system can be a portable computing device or a cloud processing system with data storage, computing and communication capabilities. For example, a mobile computing device (Mobile Computing Apparatus) or a server (Server) having a wireless communication function, the computer system can be coupled to at least one terminal device (eg, a smart phone or a computer) as a user and The computer system communicates with each other. In this embodiment, because the IFC engineering information has object-oriented characteristics, the computer system can write the IFC model data into a file-oriented database, such as MongoDB, for processing data quickly, but not using the database to store data. Alternatively, the data storage architecture can include a server (MongoDB Server), several databases (Database), several data sets (Collections), several files (Document) and several fields (Field) from top to bottom. Each of the IFC files can be regarded as a data set. Each data in the IFC file can be regarded as a file, and each file can have multiple fields to describe the data features, but not limited thereto.

請再參閱第1圖所示,本發明IFC工程資訊用於遊戲引擎的方法實施例可包含一設定步驟S1、一解析步驟S2及一匯檔步驟S3,用以在保留必要資料及關聯性的基礎下,減少資料中重複的內容,以降低資料量,詳細說明如後。 Referring to FIG. 1 again, the method embodiment of the present invention for using the IFC project information for the game engine may include a setting step S1, an analyzing step S2, and a step S3 for retaining necessary information and relevance. Under the basis of the reduction of the content in the data to reduce the amount of data, as detailed below.

該設定步驟S1,可設定一遊戲引擎,擷取該遊戲引擎的資料輸入格式。在此實施例中,該電腦系統可預存數個遊戲引擎種類及其資料輸入格式,並可預設該遊戲引擎之種類圍其中一種遊戲引擎,如Unity等,作為後續進行資料轉換之依據,惟該遊戲引擎亦可經由使用者輸入資料而設定,其設定方式在此並不設限。 In the setting step S1, a game engine can be set to retrieve the data input format of the game engine. In this embodiment, the computer system can pre-store a plurality of game engine types and data input formats thereof, and can preset a type of the game engine to surround one of the game engines, such as Unity, as a basis for subsequent data conversion. The game engine can also be set by the user to input data, and the setting manner is not limited herein.

該解析步驟S2,可讀取一IFC來源檔案,以該IFC來源檔案中基於IFC描述格式定義且繼承自一基礎類別之一子類別為起點,擷取數個相關聯的物件,各物件具有依據數個IFC座標定義的一外觀特徵,將該外觀特徵之格式轉換為相容於該資料輸入格式之一展示格式,將該IFC座標轉換為一座標格式。其中,該基礎類別可為符合該IFC描述格式定義的IfcElement類別。 In the parsing step S2, an IFC source file may be read, and the IFC source file is defined based on the IFC description format and inherits from a subcategory of a basic category as a starting point, and several related objects are retrieved, and each object has a basis. An appearance feature defined by a plurality of IFC coordinates, the format of the appearance feature is converted into a display format compatible with the data input format, and the IFC coordinate is converted into a standard format. Wherein, the base category may be an IfcElement category that conforms to the definition of the IFC description format.

在此實施例中,由於IFC工程資訊具有特定的IFC描述格式,該IFC描述格式可描述數種物件類別,如:IfcElement類別等,各物件類別可供其子類別繼承,使該子類別具有其繼承之物件類別的特性,由 於IfcElement類別為一底層基礎類別,因此,取得IFC工程資訊的方式,可於該IFC來源檔案中,基於IFC描述格式且繼承自IfcElement類別之子類別為起點,擷取數個相關聯的物件,各物件可具有依據數個IFC座標定義的外觀特徵,如:以B-Rep、掃掠(SweptSolid)或CSG方式定義該物件之形狀,並可將該外觀特徵之格式轉換為相容於該遊戲引擎的資料輸入格式之展示格式(如Mesh格式),將該IFC座標轉換為一座標格式,如該IFC座標可依據一轉換矩陣轉換為該展示座標,如下式(1)所示,惟不以此為限。 In this embodiment, since the IFC engineering information has a specific IFC description format, the IFC description format can describe several object categories, such as: IfcElement category, etc., and each object category can be inherited by its subcategory, so that the subcategory has its The characteristics of the inherited object category, because the IfcElement category is an underlying base category, the way to obtain IFC project information can be based on the IFC source file, based on the IFC description format and inheriting from the subcategory of the IfcElement category. An associated object, each object may have an appearance characteristic defined according to a plurality of IFC coordinates, such as: defining the shape of the object in a B-Rep, SweptSolid or CSG manner, and converting the format of the appearance feature In order to be compatible with the display format of the data input format of the game engine (such as the Mesh format), the IFC coordinate is converted into a standard format, and the IFC coordinate can be converted into the display coordinate according to a conversion matrix, as shown in the following formula (1). As shown, it is not limited to this.

其中,X x X y X z 為一待轉換的構件之三維直角座標系的X軸之x、y、z方向分量;Z x Z y Z z 為該構件之三維直角座標系的Z軸之x、y、z方向分量;Y x Y y Y z 為該構件之三維直角座標系的Y軸之x、y、z方向分量,可由[X x ,X y ,X z ]與[Z x ,Z y ,Z z ]進行向量相乘(vector cross)計算而得;P x P y P z 為該構件之位移量於三維直角座標系的x、y、z方向分量;IP x IP y IP z 為該構件於轉換前的三維座標;OP x OP y OP z 為該構件轉換後的三維座標。 Where X x , X y , X z are the x, y, and z directions components of the X-axis of the three-dimensional orthogonal coordinate system of the member to be converted; Z x , Z y , Z z are the three-dimensional orthogonal coordinate system of the member The x, y, and z direction components of the Z axis; Y x , Y y , and Y z are the x, y, and z direction components of the Y-axis of the three-dimensional orthogonal coordinate system of the member, which can be [ X x , X y , X z ] Calculated by vector multiplication with [ Z x , Z y , Z z ]; P x , P y , P z are the x, y, and z directions components of the displacement of the member in the three-dimensional orthogonal coordinate system ; IP x , IP y , IP z are the three-dimensional coordinates of the component before conversion; OP x , OP y , OP z are the three-dimensional coordinates of the component after conversion.

該匯檔步驟S3,可匯集該座標格式及該展示格式成為一中介檔案,供該電腦系統運用該遊戲引擎顯示上述物件。在此實施例中,該展示格式中的物件形狀需轉為Mesh格式,各物件所有的資訊可經由該資料輸入格式指定至特定的Mesh,用以做為可匯入該遊戲引擎的中介檔案,惟不以此為限。以下舉例說明將IFC工程資訊用於遊戲引擎的實施態樣,其中IFC工程資訊的相關術語係其所屬技術領域中具有通常知識者可以理解,在此容不贅述,惟不以此為限。 In the step S3, the coordinate format and the display format can be collected into an intermediary file for the computer system to display the object by using the game engine. In this embodiment, the shape of the object in the display format needs to be converted into a Mesh format, and all information of each object can be specified to a specific Mesh through the data input format, as an intermediate file that can be imported into the game engine. However, it is not limited to this. The following is an example of the implementation of the IFC project information for the game engine. The terminology of the IFC project information is understood by those of ordinary skill in the art, and is not limited herein.

舉例而言,該電腦系統可先設定遊戲引擎為Unity,接著,讀取該IFC來源檔案,其內容節錄如下: 首先,該電腦系統可依據IFC物件關聯性,找出IfcElement之底層物件(即繼承自IfcElement之物件),如下所示: 用以作為後續擷取數個相關聯物件的起點。 For example, the computer system can first set the game engine to Unity, and then read the IFC source file, and its contents are as follows: First, the computer system can find the underlying object of IfcElement (that is, the object inherited from IfcElement) according to the IFC object association, as shown below: Used as a starting point for subsequent retrieval of several associated objects.

接著,該電腦系統可依據如下所示之IFC物件關聯性,進行〝座標轉換〞過程: 其中,依據「;」(對應上式(1)之Px、Py、Pz)、「;」(對應上式(1)之Zx、Zy、Zz)、「;」(對應上式(1)之Xx、Xy、Xz), 上式(1)之Yx、Yy、Yz可依據IFC採用之卡氏座標右手定則,利用[0,0,1]與[0,-1,0]進行vector cross運算而設定為[1,0,0],故可如上式(1)產生座標轉換矩陣M1如下: 另,依據「;」(對應上式(1)之Px、Py、Pz)、「;」(對應上式(1)之Zx、Zy、Zz)、「;」(對應上式(1)之Xx、Xy、Xz),上式(1)之Yx、Yy、Yz可依上述vector cross運算方式而設定為[0,1,0],故可如上式(1)產生座標轉換矩陣M2如下: Then, the computer system can perform the 〝 coordinate conversion process according to the IFC object association as shown below: Among them, based on ;" (corresponding to P x , P y , P z of the above formula (1)," ;" (corresponding to Z x , Z y , Z z of the above formula (1)," ;" (corresponding to X x , X y , X z of the above formula (1)), Y x , Y y , Y z of the above formula (1) can be based on the right-hand rule of the Kasman coordinates used by the IFC, using [0, 0 , 1] and [0, -1, 0] are vector cross-operated and set to [1, 0, 0], so the coordinate transformation matrix M 1 can be generated as in the above equation (1) as follows: In addition, based on ;" (corresponding to P x , P y , P z of the above formula (1)," ;" (corresponding to Z x , Z y , Z z of the above formula (1)," ; (corresponding to X x , X y , X z of the above formula (1)), Y x , Y y , Y z of the above formula (1) can be set to [0, 1, 0 according to the above vector cross operation method; Therefore, the coordinate conversion matrix M 2 can be generated as in the above formula (1) as follows:

接著,該電腦系統可依據IFC物件關聯性,進行〝幾何轉換〞過程,以物件形狀係柱子為例,如下所示: 其中,「;」中的「300」可表示物件深度(Depth);「#105=;」中的「90、90」可表示物件面積的長度、寬度;「;」中的「0、0」可表示物件面積的中心位置座標;「#100=;」中的「0、1」可表示物件面積的X軸方向定義;「#35=IFCCARTESIANPOINT((-350.,250.,0.));」、「#32=IFCDIRECTION((0.,0.,1.));」、「#28=IFCDIRECTION((0.,-1.,0.));」可表示物件座標;「;」中的「0、0、1」可表示物件的突出(或延伸)方向。 Then, the computer system can perform the 〝 geometry conversion process according to the IFC object correlation, taking the object shape column as an example, as follows: among them," "300" in ";" can indicate the depth of the object (Depth); "#105= "90, 90" in ";" can indicate the length and width of the object area; "0, 0" in ";" can indicate the coordinate of the center of the object area; "#100= "0, 1" in ";" can indicate the X-axis direction definition of the object area; "#35=IFCCARTESIANPOINT((-350.,250.,0.));","#32=IFCDIRECTION((0., 0.,1.));","#28=IFCDIRECTION((0.,-1.,0.));"" can represent the object coordinates; "0, 0, 1"in;" can indicate the protruding (or extending) direction of the object.

接著,該電腦系統可整理元件屬性關聯,如:找出所有引用該物件之物件編號( #83 ,P21id)之IFCREL…開頭之物件及其關聯物件,如下所示: 其中,引用物件編號#83之IFCREL…開頭之物件有「#211=」及「#239=」,物件編號#211關聯之物件編號有#206,物件編號#206關聯之物件編號有#201,物件編號#239關聯之物件編號有#234,物件編號#234關聯之物件編號有#213、#229,接著,該電腦系統可將上述屬性資料以階層化方式載入並儲存,如:依據物件出現順序及 其物件關聯,依序記載物件編號等,惟不以此為限。 Next, the computer system may arrange elements associated attributes, such as: to find all references to the object of IFCREL object ID (# 83, P21id) ... at the beginning of the object and its associated object, as follows: Among them, the object starting with the IFCREL... of the object number #83 has "#211= And "#239= The object number associated with the object number #211 is #206, the object number associated with the object number #206 has #201, the object number associated with the object number #239 has #234, and the object number associated with the object number #234 has #213, #229, Next, the computer system can load and store the above attribute data in a hierarchical manner, for example, according to the order in which the objects appear and their object associations, the item numbers are sequentially recorded, but not limited thereto.

接著,該電腦系統可儲存有關該物件編號#83的相關資料,作為該中介檔案之文字檔內容,如下所示:#83=IFCCOLUMN PlacementRelTo[0,-1,0,0,1,0,0,0,0,0,1,0,-350,250,0,1] RelativePlacement[1,0,0,0,0,1,0,0,0,0,1,0,500,500,0,1] Shape=SweptSolid values=300,90,90,(0,0),(0,1),[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1] Graphisoft AC90 COLUMN=COLUMN:#201 PSet_Draughting=Layername:Columns,Color:#229其中,「#83=IFCCOLUMN」可表示基於IfcElement物件之物件編號、物件類別分別為「#83」、「IFCCOLUMN」;「PlacementRelTo[0,-1,0,0,1,0,0,0,0,0,1,0,-350,250,0,1]」、「RelativePlacement[1,0,0,0,0,1,0,0,0,0,1,0,500,500,0,1]」可表示上述M1、M2等二座標轉換矩陣之元素值;「Shape=SweptSolid」可表示物件形狀為掃掠(SweptSolid);「values=300,90,90,(0,0),(0,1),[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]」可表示物件深度為300、物件面積之長度、寬度為90、90、物件面積中心座標為(0,0)、物件的X軸方向定義為(0,1)、[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]為將轉換矩陣中的元素改以一維陣列表示;「Graphisoft AC90 COLUMN=COLUMN:#201」可表示一種屬性表示方法,如:該物件包含一個名為「Craphisoft AC90 COLUMN」的屬性,而該屬性底下有一個名為COLUMN的值,該值連接至P21id為#201的物件;「PSet_Draughting=Layername:Columns,Color:#229」可表示該物件有另一個屬性為「PSet_Draughting」,該屬性有兩個值,一個為Layername(圖層名稱):Columns(此值為純量,不需用P21id連結),另一個為Color(顏色):#229,其中,IFC格式可以定義各種屬性,例如:建材防火係數、體積、持有者、上次維修時間、重量等,並不以此為限。上述內容僅以IFCCOLUMN物件為例作為實施態樣說明,其餘物件的表示方式可依此類推,依其外觀特徵不同,所需紀錄的資訊會稍有差異,若屬性 資料遇到IfcComplexProperty物件,則可先直接紀錄其物件編號,有需要得知其底層物件時,再逐一向下展開即可。特別注意的是,上述轉換後的格式仍可依其對應方式轉回原本的IFC來源檔案,供其他軟體交換使用,以下說明後續僅可使用於遊戲引擎之格式轉換方式。 Then, the computer system can store related information about the object number #83 as the text file content of the intermediary file, as follows: #83=IFCCOLUMN PlacementRelTo[0,-1,0,0,1,0,0 ,0,0,0,1,0,-350,250,0,1] RelativePlacement[1,0,0,0,0,1,0,0,0,0,1,0,500,500,0,1] Shape= SweptSolid values=300,90,90,(0,0),(0,1),[1,0,0,0,0,1,0,0,0,0,1,0,0,0, 0,1] Graphisoft AC90 COLUMN=COLUMN:#201 PSet_Draughting=Layername:Columns,Color:#229 where "#83=IFCCOLUMN" indicates that the object number based on the IfcElement object and the object type are "#83" and "IFCCOLUMN" respectively. "PlacementRelTo[0,-1,0,0,1,0,0,0,0,0,1,0,-350,250,0,1]", "RelativePlacement[1,0,0,0, 0,1,0,0,0,0,1,0,500,500,0,1]" can represent the element values of the two coordinate transformation matrices such as M 1 and M 2 ; "Shape=SweptSolid" can indicate that the object shape is swept. (SweptSolid); "values=300,90,90,(0,0),(0,1),[1,0,0,0,0,1,0,0,0,0,1,0, 0,0,0,1]" can indicate that the object depth is 300, the length of the object area, the width is 90, 90, the center coordinate of the object area is (0,0), and the X-axis direction of the object is fixed. For (0,1), [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1] to change the elements in the transformation matrix to one Dimension array representation; "Graphisoft AC90 COLUMN=COLUMN:#201" can represent an attribute representation method, such as: the object contains an attribute named "Craphisoft AC90 COLUMN", and the attribute has a value named COLUMN under it. The value is connected to the object with P21id #201; "PSet_Draughting=Layername:Columns,Color:#229" indicates that the object has another attribute of "PSet_Draughting", the attribute has two values, and one is Layername (layer name): Columns (this value is scalar, no need to use P21id link), the other is Color (color): #229, where IFC format can define various attributes, such as: building material fire resistance coefficient, volume, holder, last maintenance Time, weight, etc. are not limited to this. The above content only uses the IFCCOLUMN object as an example to illustrate the implementation. The rest of the objects can be expressed in the same way. According to their different appearance characteristics, the required information will be slightly different. If the attribute data encounters an IfcComplexProperty object, First record the item number directly. If you need to know the underlying object, you can expand it one by one. It is important to note that the above converted format can still be transferred back to the original IFC source file for other software exchanges. The following description can only be used for the format conversion mode of the game engine.

以下舉例說明該中介檔案匯入該遊戲引擎之實施態樣,惟不以此為限。首先,所有的外觀特徵之形狀定義皆需轉為Mesh格式,如:採用to Mesh演算法,將圖形轉換為數個三角形連接而成,用以呈現該物件之形狀於該遊戲引擎中,在此例中,由於採用掃掠(SweptSolid)表示形狀,故其頂面與底面皆為一致,可先找出邊界點,再以順時鐘或逆時鐘方向指定角點連線順序形成三角形即可,其係所屬技術領域中具有通常知識者可以理解,在此容不贅述。另,物件的所有資訊(Information)可依遊戲引擎的物件說明文字處理方式予以附加,在Unity遊戲引擎中,可將物件資訊直接指定屬於某一特定Mesh即可,用以提供相關說明文字。 The following example illustrates the implementation of the intermediary file into the game engine, but not limited to this. First of all, all the shape definitions of the appearance features need to be converted to Mesh format, such as: using the to Mesh algorithm, the graphics are converted into a number of triangles connected to represent the shape of the object in the game engine, in this case In the case of SweptSolid, the top surface and the bottom surface are identical, and the boundary points can be found first, and then the triangles can be formed in the order of the clock points in the clockwise or counterclockwise direction. Those skilled in the art can understand that it is not described here. In addition, all the information of the object can be added according to the object processing method of the game engine. In the Unity game engine, the object information can be directly assigned to a specific Mesh to provide relevant explanatory text.

其中,該基於IFC格式定義的中介檔案在其餘遊戲引擎中的完整描述方式,可如下通式所示:#P21id=EntityName:vector:[P1,P2,P3], //vectorP=(x,y,z),表示各個關鍵點triangle:[0,1,2], //表示連線順序uv:[P1,P2,P3], //uvP=(u,v),表示表面貼圖連線Information:{soData1,soData2}; //soData1,2,…=type1[key1:value1,key2:value2],type2…,表示關聯之資訊物件 The complete description of the intermediate file defined by the IFC format in the remaining game engines can be expressed as follows: #P21id=EntityName:vector:[P1,P2,P3], //vectorP=(x,y , z), indicating each key point triangle: [0, 1, 2], / / indicates the connection order uv: [P1, P2, P3], / / uvP = (u, v), indicating surface map connection Information :{soData1,soData2}; //soData1,2,...=type1[key1:value1,key2:value2], type2..., indicating the associated information object

此外,本發明上述方法實施例還可利用程式語言(Program Language,如:C++、Java等)撰成電腦程式(如:IFC資料減量程式、IFC資料還原程式),其程式碼(Program Code)的撰寫方式係熟知該項技藝 者可以理解,可用以產生一種內儲程式之電腦程式產品,當電腦載入該程式並執行後,可完成本發明上述方法實施例。 In addition, the foregoing method embodiment of the present invention can also be written into a computer program (such as an IFC data reduction program, an IFC data restoration program) by using a programming language (such as C++, Java, etc.), and a program code thereof. The writing method is well understood by those skilled in the art, and can be used to generate a computer program product of a built-in program. When the computer loads the program and executes it, the method embodiment of the present invention can be completed.

另,上述電腦程式產品還可儲存於一種內儲程式之電腦可讀取紀錄媒體,如:各式記憶卡、硬碟、光碟或USB隨身碟等,當電腦載入上述程式並執行後,可完成本發明上述方法實施例,作為本發明之電腦系統軟硬體協同運作的依據。 The computer program product can also be stored in a computer-readable recording medium such as a memory card, a hard disk, a compact disc or a USB flash drive. When the computer loads the above program and executes it, The embodiment of the above method of the present invention is completed as a basis for the cooperative operation of the software and hardware of the computer system of the present invention.

又,本發明另揭示一種電子裝置,該電子裝置可為具備資料儲存(storing)及處理(processing)功能之裝置,如:個人電腦(personal computer)、伺服器(server)、平板電腦(tablet computer)或智慧型手機(smart phone)等,用以執行一應用程式(如:App等),以便完成上述方法實施例。 Furthermore, the present invention further discloses an electronic device, which can be a device having a data storage and processing function, such as a personal computer, a server, or a tablet computer. Or a smart phone or the like for executing an application (such as an App, etc.) to complete the above method embodiment.

藉由上述實施例之方法、內儲程式之電腦程式產品、內儲程式之電腦可讀取紀錄媒體及電子裝置可在無損IFC工程資訊的情況下,有效的廣泛運用上述IFC工程資訊於其他應用軟體(如遊戲引擎),便於展示基於IFC工程資訊描述的物件,可供各種應用軟體間的模型相互轉換與交流,因此,本發明可以達成「降低工程資訊轉用難度」及「有利於應用不同軟體的優點」等功效。 By using the method of the above embodiments, the computer program product of the internal storage program, and the computer-readable recording medium and the electronic device of the internal storage program, the IFC engineering information can be effectively and widely used in other applications without loss of IFC engineering information. The software (such as the game engine) is convenient for displaying objects described based on IFC engineering information, and can be used for mutual conversion and communication between various application software models. Therefore, the present invention can achieve "reducing the difficulty of converting engineering information" and "favoring application differences". The advantages of software" and other effects.

雖然本發明已利用上述較佳實施例揭示,然其並非用以限定本發明,任何熟習此技藝者在不脫離本發明之精神和範圍之內,相對上述實施例進行各種更動與修改仍屬本發明所保護之技術範疇,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the invention has been described in connection with the preferred embodiments described above, it is not intended to limit the scope of the invention. The technical scope of the invention is protected, and therefore the scope of the invention is defined by the scope of the appended claims.

Claims (8)

一種IFC工程資訊用於遊戲引擎的方法,係供轉換IFC工程資訊之一電腦系統執行,其步驟係包含:設定一遊戲引擎,擷取該遊戲引擎的資料輸入格式;讀取一IFC來源檔案,以該IFC來源檔案中基於IFC描述格式定義且繼承自一基礎類別之一子類別為起點,擷取數個相關聯的物件,各物件具有依據數個IFC座標定義的一外觀特徵,將該外觀特徵之格式轉換為相容於該資料輸入格式之一展示格式,將該IFC座標轉換為一座標格式;及匯集該座標格式及該展示格式成為一中介檔案,供該電腦系統運用該遊戲引擎顯示上述物件。  An IFC engineering information method for a game engine is implemented by a computer system for converting IFC engineering information, and the steps include: setting a game engine, extracting a data input format of the game engine; reading an IFC source file, Taking the IFC source file definition based on the IFC description format and inheriting from one of the subcategories of a basic category as the starting point, several associated objects are retrieved, and each object has an appearance feature defined according to several IFC coordinates, and the appearance is Converting the format of the feature into a display format compatible with the data input format, converting the IFC coordinate into a standard format; and assembling the coordinate format and the display format into an intermediary file for the computer system to display using the game engine The above objects.   根據申請專利範圍第1項所述的IFC工程資訊用於遊戲引擎的方法,其中該基礎類別為符合該IFC描述格式定義的IfcElement類別。  The method of using the IFC project information according to claim 1 of the patent application for a game engine, wherein the base category is an IfcElement category that conforms to the definition of the IFC description format.   根據申請專利範圍第1項所述的IFC工程資訊用於遊戲引擎的方法,其中該展示格式為Mesh格式。  The method for using the IFC project information according to claim 1 of the patent application for a game engine, wherein the display format is a Mesh format.   根據申請專利範圍第1項所述的IFC工程資訊用於遊戲引擎的方法,其中該外觀資料係以B-Rep、掃掠或CSG方式定義該物件。  The method of using the IFC engineering information according to claim 1 of the patent application for a game engine, wherein the appearance data defines the object in a B-Rep, sweep or CSG manner.   根據申請專利範圍第1項所述的IFC工程資訊用於遊戲引擎的方法,其中該IFC座標依據一轉換矩陣轉換為該展示座標。  The method for using the IFC project information described in claim 1 of the patent application for a game engine, wherein the IFC coordinate is converted into the display coordinates according to a conversion matrix.   一種內儲程式之電腦程式產品,當電腦系統載入該電腦程式並執行後,可完成如請求項1至5項中任一項所述的方法。  A computer program product for storing a program, the method of any one of claims 1 to 5 being completed after the computer system loads the computer program and executes it.   一種內儲程式之電腦可讀取記錄媒體,當電腦系統載入該程式並執行後,可完成如請求項1至5項中任一項所述的方法。  A computer-readable recording medium for storing a program, the method of any one of claims 1 to 5 being completed after the computer system loads the program and executes it.   一種電子裝置,係能載入電腦可讀取紀錄媒體內儲之程式,用以執行如請求項第1至5項中任一項所述的方法。  An electronic device capable of loading a program readable by a computer readable recording medium for performing the method of any one of claims 1 to 5.  
TW105132758A 2016-10-11 2016-10-11 Method for using IFC information in game engine, computer program product with stored programs, computer readable medium with stored programs, and electronic apparatuses TW201814560A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105132758A TW201814560A (en) 2016-10-11 2016-10-11 Method for using IFC information in game engine, computer program product with stored programs, computer readable medium with stored programs, and electronic apparatuses

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105132758A TW201814560A (en) 2016-10-11 2016-10-11 Method for using IFC information in game engine, computer program product with stored programs, computer readable medium with stored programs, and electronic apparatuses

Publications (1)

Publication Number Publication Date
TW201814560A true TW201814560A (en) 2018-04-16

Family

ID=62639353

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105132758A TW201814560A (en) 2016-10-11 2016-10-11 Method for using IFC information in game engine, computer program product with stored programs, computer readable medium with stored programs, and electronic apparatuses

Country Status (1)

Country Link
TW (1) TW201814560A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553001A (en) * 2020-03-23 2020-08-18 广州地铁设计研究院股份有限公司 Method for extracting or deleting component from IFC file

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553001A (en) * 2020-03-23 2020-08-18 广州地铁设计研究院股份有限公司 Method for extracting or deleting component from IFC file

Similar Documents

Publication Publication Date Title
US20230084389A1 (en) System and method for providing bottom-up aggregation in a multidimensional database environment
US9519701B2 (en) Generating information models in an in-memory database system
CN101968800B (en) Metadata driving based method for realizing dynamic form
US8938720B2 (en) Trace visualization for object oriented programs
KR20150143473A (en) Signal capture controls in recalculation user interface
CN111061475B (en) Software code generating method, device, computer equipment and storage medium
US9015608B2 (en) Regenerating a user interface area
CN106648569B (en) Target serialization realization method and device
CN111611304A (en) Knowledge-driven joint big data query and analysis platform
US20240004896A1 (en) Extensible data platform with database domain extensions
WO2017036348A1 (en) Method and device for compressing and decompressing extensible markup language document
US7013468B2 (en) Method and apparatus for design and manufacturing application associative interoperability
Ledur et al. Towards a domain-specific language for geospatial data visualization maps with big data sets
CN111611448A (en) Knowledge-driven joint big data query and analysis platform
Parmar et al. MongoDB as an efficient graph database: An application of document oriented NOSQL database
US20150379084A1 (en) Grid queries
EP1383064A2 (en) System and method for analytically modeling data organized according to related attributes
CN101388018A (en) Computer aided design document management method
CN107533544A (en) Component identifier generates
TW201814560A (en) Method for using IFC information in game engine, computer program product with stored programs, computer readable medium with stored programs, and electronic apparatuses
CN115168657A (en) Data storage method, device and storage medium
US20180130240A1 (en) Displaying visualization images on portable electronic device
US20080306994A1 (en) Method and System for Processing User-Defined Object Based on Object Storage
US20150149897A1 (en) Apparatus and method for editing document
CN112764763B (en) Code conversion method, system, equipment and computer readable storage medium