File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 22
33The ` xeokit-metadata ` is a multi-platform command line tool for extracting
44the structural hierarchy of the building elements within an ` IFC ` into the
5- [ metadata format of the ` xeokit-sdk ` ] [ 0 ] . Currently only IFC 2x3 is supported.
5+ [ metadata format of the ` xeokit-sdk ` ] [ 0 ] .
66
77## Usage
88
99```
10- $ wget --quiet https://github.com/bimspot/xeokit-metadata/releases/download/0.0.3 /xeokit-metadata-linux-x64.tar.gz
10+ $ wget --quiet https://github.com/bimspot/xeokit-metadata/releases/download/0.0.4 /xeokit-metadata-linux-x64.tar.gz
1111$ tar -zxvf xeokit-metadata-linux-x64.tar.gz
1212$ chmod +x xeokit-metadata-linux-x64/xeokit-metadata
1313$ ln -s /absolute/path/to/xeokit-metadata-linux-x64/xeokit-metadata /usr/local/bin/xeokit-metadata
Original file line number Diff line number Diff line change @@ -96,13 +96,14 @@ public static MetaModel fromIfc(string ifcPath) {
9696 /// IIfcObjectDefinition.
9797 /// </returns>
9898 private static List < MetaObject > extractHierarchy ( IIfcObjectDefinition
99- objectDefinition ) {
99+ objectDefinition , string parentId = null ) {
100100 var metaObjects = new List < MetaObject > ( ) ;
101101
102102 var parentObject = new MetaObject {
103103 id = objectDefinition . GlobalId ,
104104 name = objectDefinition . Name ,
105- type = objectDefinition . GetType ( ) . Name
105+ type = objectDefinition . GetType ( ) . Name ,
106+ parent = parentId
106107 } ;
107108
108109 metaObjects . Add ( parentObject ) ;
@@ -130,7 +131,7 @@ private static List<MetaObject> extractHierarchy(IIfcObjectDefinition
130131 . SelectMany ( r => r . RelatedObjects ) ;
131132
132133 foreach ( var item in relatedObjects ) {
133- var children = extractHierarchy ( item ) ;
134+ var children = extractHierarchy ( item , parentObject . id ) ;
134135 metaObjects . AddRange ( children ) ;
135136 }
136137
You can’t perform that action at this time.
0 commit comments