IFCLoader.js 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430
  1. import {
  2. IFCRELAGGREGATES,
  3. IFCRELCONTAINEDINSPATIALSTRUCTURE,
  4. IFCRELDEFINESBYPROPERTIES,
  5. IFCRELASSOCIATESMATERIAL,
  6. IFCRELDEFINESBYTYPE,
  7. IFCPROJECT,
  8. IfcAPI
  9. } from './ifc/web-ifc-api.js';
  10. import {
  11. BufferAttribute,
  12. Mesh,
  13. Matrix4,
  14. BufferGeometry,
  15. Color,
  16. MeshLambertMaterial,
  17. DoubleSide,
  18. Loader,
  19. FileLoader
  20. } from 'three';
  21. import { mergeBufferGeometries } from '../utils/BufferGeometryUtils.js';
  22. const IdAttrName = 'expressID';
  23. const merge = ( geoms, createGroups = false ) => {
  24. return mergeBufferGeometries( geoms, createGroups );
  25. };
  26. const newFloatAttr = ( data, size ) => {
  27. return new BufferAttribute( new Float32Array( data ), size );
  28. };
  29. const newIntAttr = ( data, size ) => {
  30. return new BufferAttribute( new Uint32Array( data ), size );
  31. };
  32. const DEFAULT = 'default';
  33. const PropsNames = {
  34. aggregates: {
  35. name: IFCRELAGGREGATES,
  36. relating: 'RelatingObject',
  37. related: 'RelatedObjects',
  38. key: 'children'
  39. },
  40. spatial: {
  41. name: IFCRELCONTAINEDINSPATIALSTRUCTURE,
  42. relating: 'RelatingStructure',
  43. related: 'RelatedElements',
  44. key: 'children'
  45. },
  46. psets: {
  47. name: IFCRELDEFINESBYPROPERTIES,
  48. relating: 'RelatingPropertyDefinition',
  49. related: 'RelatedObjects',
  50. key: 'hasPsets'
  51. },
  52. materials: {
  53. name: IFCRELASSOCIATESMATERIAL,
  54. relating: 'RelatingMaterial',
  55. related: 'RelatedObjects',
  56. key: 'hasMaterial'
  57. },
  58. type: {
  59. name: IFCRELDEFINESBYTYPE,
  60. relating: 'RelatingType',
  61. related: 'RelatedObjects',
  62. key: 'hasType'
  63. }
  64. };
  65. class IFCParser {
  66. constructor( state, BVH ) {
  67. this.state = state;
  68. this.BVH = BVH;
  69. this.loadedModels = 0;
  70. this.currentWebIfcID = - 1;
  71. this.currentModelID = - 1;
  72. }
  73. async parse( buffer ) {
  74. if ( this.state.api.wasmModule === undefined )
  75. await this.state.api.Init();
  76. this.newIfcModel( buffer );
  77. this.loadedModels ++;
  78. return this.loadAllGeometry();
  79. }
  80. newIfcModel( buffer ) {
  81. const data = new Uint8Array( buffer );
  82. this.currentWebIfcID = this.state.api.OpenModel( data, this.state.webIfcSettings );
  83. this.currentModelID = this.state.useJSON ? this.loadedModels : this.currentWebIfcID;
  84. this.state.models[ this.currentModelID ] = {
  85. modelID: this.currentModelID,
  86. mesh: {},
  87. items: {},
  88. types: {},
  89. jsonData: {}
  90. };
  91. }
  92. loadAllGeometry() {
  93. this.saveAllPlacedGeometriesByMaterial();
  94. return this.generateAllGeometriesByMaterial();
  95. }
  96. generateAllGeometriesByMaterial() {
  97. const { geometry, materials } = this.getGeometryAndMaterials();
  98. this.BVH.applyThreeMeshBVH( geometry );
  99. const mesh = new Mesh( geometry, materials );
  100. mesh.modelID = this.currentModelID;
  101. this.state.models[ this.currentModelID ].mesh = mesh;
  102. return mesh;
  103. }
  104. getGeometryAndMaterials() {
  105. const items = this.state.models[ this.currentModelID ].items;
  106. const mergedByMaterial = [];
  107. const materials = [];
  108. for ( const materialID in items ) {
  109. materials.push( items[ materialID ].material );
  110. const geometries = Object.values( items[ materialID ].geometries );
  111. mergedByMaterial.push( merge( geometries ) );
  112. }
  113. const geometry = merge( mergedByMaterial, true );
  114. return {
  115. geometry,
  116. materials
  117. };
  118. }
  119. saveAllPlacedGeometriesByMaterial() {
  120. const flatMeshes = this.state.api.LoadAllGeometry( this.currentWebIfcID );
  121. for ( let i = 0; i < flatMeshes.size(); i ++ ) {
  122. const flatMesh = flatMeshes.get( i );
  123. const placedGeom = flatMesh.geometries;
  124. for ( let j = 0; j < placedGeom.size(); j ++ ) {
  125. this.savePlacedGeometry( placedGeom.get( j ), flatMesh.expressID );
  126. }
  127. }
  128. }
  129. savePlacedGeometry( placedGeometry, id ) {
  130. const geometry = this.getBufferGeometry( placedGeometry );
  131. geometry.computeVertexNormals();
  132. const matrix = this.getMeshMatrix( placedGeometry.flatTransformation );
  133. geometry.applyMatrix4( matrix );
  134. this.saveGeometryByMaterial( geometry, placedGeometry, id );
  135. }
  136. getBufferGeometry( placed ) {
  137. const geometry = this.state.api.GetGeometry( this.currentWebIfcID, placed.geometryExpressID );
  138. const vertexData = this.getVertices( geometry );
  139. const indices = this.getIndices( geometry );
  140. const { vertices, normals } = this.extractVertexData( vertexData );
  141. return this.ifcGeomToBufferGeom( vertices, normals, indices );
  142. }
  143. getVertices( geometry ) {
  144. const vData = geometry.GetVertexData();
  145. const vDataSize = geometry.GetVertexDataSize();
  146. return this.state.api.GetVertexArray( vData, vDataSize );
  147. }
  148. getIndices( geometry ) {
  149. const iData = geometry.GetIndexData();
  150. const iDataSize = geometry.GetIndexDataSize();
  151. return this.state.api.GetIndexArray( iData, iDataSize );
  152. }
  153. getMeshMatrix( matrix ) {
  154. const mat = new Matrix4();
  155. mat.fromArray( matrix );
  156. return mat;
  157. }
  158. ifcGeomToBufferGeom( vertices, normals, indexData ) {
  159. const geometry = new BufferGeometry();
  160. geometry.setAttribute( 'position', newFloatAttr( vertices, 3 ) );
  161. geometry.setAttribute( 'normal', newFloatAttr( normals, 3 ) );
  162. geometry.setIndex( new BufferAttribute( indexData, 1 ) );
  163. return geometry;
  164. }
  165. extractVertexData( vertexData ) {
  166. const vertices = [];
  167. const normals = [];
  168. let isNormalData = false;
  169. for ( let i = 0; i < vertexData.length; i ++ ) {
  170. isNormalData ? normals.push( vertexData[ i ] ) : vertices.push( vertexData[ i ] );
  171. if ( ( i + 1 ) % 3 == 0 )
  172. isNormalData = ! isNormalData;
  173. }
  174. return {
  175. vertices,
  176. normals
  177. };
  178. }
  179. saveGeometryByMaterial( geom, placedGeom, id ) {
  180. const color = placedGeom.color;
  181. const colorID = `${color.x}${color.y}${color.z}${color.w}`;
  182. this.storeGeometryAttribute( id, geom );
  183. this.createMaterial( colorID, color );
  184. const item = this.state.models[ this.currentModelID ].items[ colorID ];
  185. const currentGeom = item.geometries[ id ];
  186. if ( ! currentGeom )
  187. return ( item.geometries[ id ] = geom );
  188. const merged = merge( [ currentGeom, geom ] );
  189. item.geometries[ id ] = merged;
  190. }
  191. storeGeometryAttribute( id, geometry ) {
  192. const size = geometry.attributes.position.count;
  193. const idAttribute = new Array( size ).fill( id );
  194. geometry.setAttribute( IdAttrName, newIntAttr( idAttribute, 1 ) );
  195. }
  196. createMaterial( colorID, color ) {
  197. const items = this.state.models[ this.currentModelID ].items;
  198. if ( items[ colorID ] )
  199. return;
  200. const col = new Color( color.x, color.y, color.z );
  201. const newMaterial = new MeshLambertMaterial( {
  202. color: col,
  203. side: DoubleSide
  204. } );
  205. newMaterial.transparent = color.w !== 1;
  206. if ( newMaterial.transparent )
  207. newMaterial.opacity = color.w;
  208. items[ colorID ] = {
  209. material: newMaterial,
  210. geometries: {}
  211. };
  212. }
  213. }
  214. class SubsetManager {
  215. constructor( state, BVH ) {
  216. this.selected = {};
  217. this.state = state;
  218. this.BVH = BVH;
  219. }
  220. getSubset( modelID, material ) {
  221. const currentMat = this.matIDNoConfig( modelID, material );
  222. if ( ! this.selected[ currentMat ] )
  223. return null;
  224. return this.selected[ currentMat ].mesh;
  225. }
  226. removeSubset( modelID, parent, material ) {
  227. const currentMat = this.matIDNoConfig( modelID, material );
  228. if ( ! this.selected[ currentMat ] )
  229. return;
  230. if ( parent )
  231. parent.remove( this.selected[ currentMat ].mesh );
  232. delete this.selected[ currentMat ];
  233. }
  234. createSubset( config ) {
  235. if ( ! this.isConfigValid( config ) )
  236. return;
  237. if ( this.isPreviousSelection( config ) )
  238. return;
  239. if ( this.isEasySelection( config ) )
  240. return this.addToPreviousSelection( config );
  241. this.updatePreviousSelection( config.scene, config );
  242. return this.createSelectionInScene( config );
  243. }
  244. createSelectionInScene( config ) {
  245. const filtered = this.filter( config );
  246. const { geomsByMaterial, materials } = this.getGeomAndMat( filtered );
  247. const isDefMaterial = this.isDefaultMat( config );
  248. const geometry = this.getMergedGeometry( geomsByMaterial, isDefMaterial );
  249. const mats = isDefMaterial ? materials : config.material;
  250. this.BVH.applyThreeMeshBVH( geometry );
  251. const mesh = new Mesh( geometry, mats );
  252. this.selected[ this.matID( config ) ].mesh = mesh;
  253. mesh.modelID = config.modelID;
  254. config.scene.add( mesh );
  255. return mesh;
  256. }
  257. getMergedGeometry( geomsByMaterial, hasDefaultMaterial ) {
  258. return geomsByMaterial.length > 0
  259. ? merge( geomsByMaterial, hasDefaultMaterial )
  260. : new BufferGeometry();
  261. }
  262. isConfigValid( config ) {
  263. return ( this.isValid( config.scene ) &&
  264. this.isValid( config.modelID ) &&
  265. this.isValid( config.ids ) &&
  266. this.isValid( config.removePrevious ) );
  267. }
  268. isValid( item ) {
  269. return item !== undefined && item !== null;
  270. }
  271. getGeomAndMat( filtered ) {
  272. const geomsByMaterial = [];
  273. const materials = [];
  274. for ( const matID in filtered ) {
  275. const geoms = Object.values( filtered[ matID ].geometries );
  276. if ( ! geoms.length )
  277. continue;
  278. materials.push( filtered[ matID ].material );
  279. if ( geoms.length > 1 )
  280. geomsByMaterial.push( merge( geoms ) );
  281. else
  282. geomsByMaterial.push( ...geoms );
  283. }
  284. return {
  285. geomsByMaterial,
  286. materials
  287. };
  288. }
  289. updatePreviousSelection( parent, config ) {
  290. const previous = this.selected[ this.matID( config ) ];
  291. if ( ! previous )
  292. return this.newSelectionGroup( config );
  293. parent.remove( previous.mesh );
  294. config.removePrevious
  295. ? ( previous.ids = new Set( config.ids ) )
  296. : config.ids.forEach( ( id ) => previous.ids.add( id ) );
  297. }
  298. newSelectionGroup( config ) {
  299. this.selected[ this.matID( config ) ] = {
  300. ids: new Set( config.ids ),
  301. mesh: {}
  302. };
  303. }
  304. isPreviousSelection( config ) {
  305. if ( ! this.selected[ this.matID( config ) ] )
  306. return false;
  307. if ( this.containsIds( config ) )
  308. return true;
  309. const previousIds = this.selected[ this.matID( config ) ].ids;
  310. return JSON.stringify( config.ids ) === JSON.stringify( previousIds );
  311. }
  312. containsIds( config ) {
  313. const newIds = config.ids;
  314. const previous = Array.from( this.selected[ this.matID( config ) ].ids );
  315. return newIds.every( ( i => v => ( i = previous.indexOf( v, i ) + 1 ) )( 0 ) );
  316. }
  317. addToPreviousSelection( config ) {
  318. const previous = this.selected[ this.matID( config ) ];
  319. const filtered = this.filter( config );
  320. const geometries = Object.values( filtered ).map( ( i ) => Object.values( i.geometries ) ).flat();
  321. const previousGeom = previous.mesh.geometry;
  322. previous.mesh.geometry = merge( [ previousGeom, ...geometries ] );
  323. config.ids.forEach( ( id ) => previous.ids.add( id ) );
  324. }
  325. filter( config ) {
  326. const ids = this.selected[ this.matID( config ) ].ids;
  327. const items = this.state.models[ config.modelID ].items;
  328. const filtered = {};
  329. for ( const matID in items ) {
  330. filtered[ matID ] = {
  331. material: items[ matID ].material,
  332. geometries: this.filterGeometries( ids, items[ matID ].geometries )
  333. };
  334. }
  335. return filtered;
  336. }
  337. filterGeometries( selectedIDs, geometries ) {
  338. const ids = Array.from( selectedIDs );
  339. return Object.keys( geometries )
  340. .filter( ( key ) => ids.includes( parseInt( key, 10 ) ) )
  341. .reduce( ( obj, key ) => {
  342. return {
  343. ...obj,
  344. [ key ]: geometries[ key ]
  345. };
  346. }, {} );
  347. }
  348. isEasySelection( config ) {
  349. const matID = this.matID( config );
  350. if ( ! config.removePrevious && ! this.isDefaultMat( config ) && this.selected[ matID ] )
  351. return true;
  352. }
  353. isDefaultMat( config ) {
  354. return this.matIDNoConfig( config.modelID ) === this.matID( config );
  355. }
  356. matID( config ) {
  357. let name;
  358. if ( ! config.material )
  359. name = DEFAULT;
  360. else
  361. name = config.material.uuid || DEFAULT;
  362. return name.concat( ' - ' ).concat( config.modelID.toString() );
  363. }
  364. matIDNoConfig( modelID, material ) {
  365. let name = DEFAULT;
  366. if ( material )
  367. name = material.uuid;
  368. return name.concat( ' - ' ).concat( modelID.toString() );
  369. }
  370. }
  371. const IfcElements = {
  372. 103090709: 'IFCPROJECT',
  373. 4097777520: 'IFCSITE',
  374. 4031249490: 'IFCBUILDING',
  375. 3124254112: 'IFCBUILDINGSTOREY',
  376. 3856911033: 'IFCSPACE',
  377. 1674181508: 'IFCANNOTATION',
  378. 25142252: 'IFCCONTROLLER',
  379. 32344328: 'IFCBOILER',
  380. 76236018: 'IFCLAMP',
  381. 90941305: 'IFCPUMP',
  382. 177149247: 'IFCAIRTERMINALBOX',
  383. 182646315: 'IFCFLOWINSTRUMENT',
  384. 263784265: 'IFCFURNISHINGELEMENT',
  385. 264262732: 'IFCELECTRICGENERATOR',
  386. 277319702: 'IFCAUDIOVISUALAPPLIANCE',
  387. 310824031: 'IFCPIPEFITTING',
  388. 331165859: 'IFCSTAIR',
  389. 342316401: 'IFCDUCTFITTING',
  390. 377706215: 'IFCMECHANICALFASTENER',
  391. 395920057: 'IFCDOOR',
  392. 402227799: 'IFCELECTRICMOTOR',
  393. 413509423: 'IFCSYSTEMFURNITUREELEMENT',
  394. 484807127: 'IFCEVAPORATOR',
  395. 486154966: 'IFCWINDOWSTANDARDCASE',
  396. 629592764: 'IFCLIGHTFIXTURE',
  397. 630975310: 'IFCUNITARYCONTROLELEMENT',
  398. 635142910: 'IFCCABLECARRIERFITTING',
  399. 639361253: 'IFCCOIL',
  400. 647756555: 'IFCFASTENER',
  401. 707683696: 'IFCFLOWSTORAGEDEVICE',
  402. 738039164: 'IFCPROTECTIVEDEVICE',
  403. 753842376: 'IFCBEAM',
  404. 812556717: 'IFCTANK',
  405. 819412036: 'IFCFILTER',
  406. 843113511: 'IFCCOLUMN',
  407. 862014818: 'IFCELECTRICDISTRIBUTIONBOARD',
  408. 900683007: 'IFCFOOTING',
  409. 905975707: 'IFCCOLUMNSTANDARDCASE',
  410. 926996030: 'IFCVOIDINGFEATURE',
  411. 979691226: 'IFCREINFORCINGBAR',
  412. 987401354: 'IFCFLOWSEGMENT',
  413. 1003880860: 'IFCELECTRICTIMECONTROL',
  414. 1051757585: 'IFCCABLEFITTING',
  415. 1052013943: 'IFCDISTRIBUTIONCHAMBERELEMENT',
  416. 1062813311: 'IFCDISTRIBUTIONCONTROLELEMENT',
  417. 1073191201: 'IFCMEMBER',
  418. 1095909175: 'IFCBUILDINGELEMENTPROXY',
  419. 1156407060: 'IFCPLATESTANDARDCASE',
  420. 1162798199: 'IFCSWITCHINGDEVICE',
  421. 1329646415: 'IFCSHADINGDEVICE',
  422. 1335981549: 'IFCDISCRETEACCESSORY',
  423. 1360408905: 'IFCDUCTSILENCER',
  424. 1404847402: 'IFCSTACKTERMINAL',
  425. 1426591983: 'IFCFIRESUPPRESSIONTERMINAL',
  426. 1437502449: 'IFCMEDICALDEVICE',
  427. 1509553395: 'IFCFURNITURE',
  428. 1529196076: 'IFCSLAB',
  429. 1620046519: 'IFCTRANSPORTELEMENT',
  430. 1634111441: 'IFCAIRTERMINAL',
  431. 1658829314: 'IFCENERGYCONVERSIONDEVICE',
  432. 1677625105: 'IFCCIVILELEMENT',
  433. 1687234759: 'IFCPILE',
  434. 1904799276: 'IFCELECTRICAPPLIANCE',
  435. 1911478936: 'IFCMEMBERSTANDARDCASE',
  436. 1945004755: 'IFCDISTRIBUTIONELEMENT',
  437. 1973544240: 'IFCCOVERING',
  438. 1999602285: 'IFCSPACEHEATER',
  439. 2016517767: 'IFCROOF',
  440. 2056796094: 'IFCAIRTOAIRHEATRECOVERY',
  441. 2058353004: 'IFCFLOWCONTROLLER',
  442. 2068733104: 'IFCHUMIDIFIER',
  443. 2176052936: 'IFCJUNCTIONBOX',
  444. 2188021234: 'IFCFLOWMETER',
  445. 2223149337: 'IFCFLOWTERMINAL',
  446. 2262370178: 'IFCRAILING',
  447. 2272882330: 'IFCCONDENSER',
  448. 2295281155: 'IFCPROTECTIVEDEVICETRIPPINGUNIT',
  449. 2320036040: 'IFCREINFORCINGMESH',
  450. 2347447852: 'IFCTENDONANCHOR',
  451. 2391383451: 'IFCVIBRATIONISOLATOR',
  452. 2391406946: 'IFCWALL',
  453. 2474470126: 'IFCMOTORCONNECTION',
  454. 2769231204: 'IFCVIRTUALELEMENT',
  455. 2814081492: 'IFCENGINE',
  456. 2906023776: 'IFCBEAMSTANDARDCASE',
  457. 2938176219: 'IFCBURNER',
  458. 2979338954: 'IFCBUILDINGELEMENTPART',
  459. 3024970846: 'IFCRAMP',
  460. 3026737570: 'IFCTUBEBUNDLE',
  461. 3027962421: 'IFCSLABSTANDARDCASE',
  462. 3040386961: 'IFCDISTRIBUTIONFLOWELEMENT',
  463. 3053780830: 'IFCSANITARYTERMINAL',
  464. 3079942009: 'IFCOPENINGSTANDARDCASE',
  465. 3087945054: 'IFCALARM',
  466. 3101698114: 'IFCSURFACEFEATURE',
  467. 3127900445: 'IFCSLABELEMENTEDCASE',
  468. 3132237377: 'IFCFLOWMOVINGDEVICE',
  469. 3171933400: 'IFCPLATE',
  470. 3221913625: 'IFCCOMMUNICATIONSAPPLIANCE',
  471. 3242481149: 'IFCDOORSTANDARDCASE',
  472. 3283111854: 'IFCRAMPFLIGHT',
  473. 3296154744: 'IFCCHIMNEY',
  474. 3304561284: 'IFCWINDOW',
  475. 3310460725: 'IFCELECTRICFLOWSTORAGEDEVICE',
  476. 3319311131: 'IFCHEATEXCHANGER',
  477. 3415622556: 'IFCFAN',
  478. 3420628829: 'IFCSOLARDEVICE',
  479. 3493046030: 'IFCGEOGRAPHICELEMENT',
  480. 3495092785: 'IFCCURTAINWALL',
  481. 3508470533: 'IFCFLOWTREATMENTDEVICE',
  482. 3512223829: 'IFCWALLSTANDARDCASE',
  483. 3518393246: 'IFCDUCTSEGMENT',
  484. 3571504051: 'IFCCOMPRESSOR',
  485. 3588315303: 'IFCOPENINGELEMENT',
  486. 3612865200: 'IFCPIPESEGMENT',
  487. 3640358203: 'IFCCOOLINGTOWER',
  488. 3651124850: 'IFCPROJECTIONELEMENT',
  489. 3694346114: 'IFCOUTLET',
  490. 3747195512: 'IFCEVAPORATIVECOOLER',
  491. 3758799889: 'IFCCABLECARRIERSEGMENT',
  492. 3824725483: 'IFCTENDON',
  493. 3825984169: 'IFCTRANSFORMER',
  494. 3902619387: 'IFCCHILLER',
  495. 4074379575: 'IFCDAMPER',
  496. 4086658281: 'IFCSENSOR',
  497. 4123344466: 'IFCELEMENTASSEMBLY',
  498. 4136498852: 'IFCCOOLEDBEAM',
  499. 4156078855: 'IFCWALLELEMENTEDCASE',
  500. 4175244083: 'IFCINTERCEPTOR',
  501. 4207607924: 'IFCVALVE',
  502. 4217484030: 'IFCCABLESEGMENT',
  503. 4237592921: 'IFCWASTETERMINAL',
  504. 4252922144: 'IFCSTAIRFLIGHT',
  505. 4278956645: 'IFCFLOWFITTING',
  506. 4288193352: 'IFCACTUATOR',
  507. 4292641817: 'IFCUNITARYEQUIPMENT',
  508. 3009204131: 'IFCGRID'
  509. };
  510. const IfcTypesMap = {
  511. 3821786052: 'IFCACTIONREQUEST',
  512. 2296667514: 'IFCACTOR',
  513. 3630933823: 'IFCACTORROLE',
  514. 4288193352: 'IFCACTUATOR',
  515. 2874132201: 'IFCACTUATORTYPE',
  516. 618182010: 'IFCADDRESS',
  517. 1635779807: 'IFCADVANCEDBREP',
  518. 2603310189: 'IFCADVANCEDBREPWITHVOIDS',
  519. 3406155212: 'IFCADVANCEDFACE',
  520. 1634111441: 'IFCAIRTERMINAL',
  521. 177149247: 'IFCAIRTERMINALBOX',
  522. 1411407467: 'IFCAIRTERMINALBOXTYPE',
  523. 3352864051: 'IFCAIRTERMINALTYPE',
  524. 2056796094: 'IFCAIRTOAIRHEATRECOVERY',
  525. 1871374353: 'IFCAIRTOAIRHEATRECOVERYTYPE',
  526. 3087945054: 'IFCALARM',
  527. 3001207471: 'IFCALARMTYPE',
  528. 325726236: 'IFCALIGNMENT',
  529. 749761778: 'IFCALIGNMENT2DHORIZONTAL',
  530. 3199563722: 'IFCALIGNMENT2DHORIZONTALSEGMENT',
  531. 2483840362: 'IFCALIGNMENT2DSEGMENT',
  532. 3379348081: 'IFCALIGNMENT2DVERSEGCIRCULARARC',
  533. 3239324667: 'IFCALIGNMENT2DVERSEGLINE',
  534. 4263986512: 'IFCALIGNMENT2DVERSEGPARABOLICARC',
  535. 53199957: 'IFCALIGNMENT2DVERTICAL',
  536. 2029264950: 'IFCALIGNMENT2DVERTICALSEGMENT',
  537. 3512275521: 'IFCALIGNMENTCURVE',
  538. 1674181508: 'IFCANNOTATION',
  539. 669184980: 'IFCANNOTATIONFILLAREA',
  540. 639542469: 'IFCAPPLICATION',
  541. 411424972: 'IFCAPPLIEDVALUE',
  542. 130549933: 'IFCAPPROVAL',
  543. 3869604511: 'IFCAPPROVALRELATIONSHIP',
  544. 3798115385: 'IFCARBITRARYCLOSEDPROFILEDEF',
  545. 1310608509: 'IFCARBITRARYOPENPROFILEDEF',
  546. 2705031697: 'IFCARBITRARYPROFILEDEFWITHVOIDS',
  547. 3460190687: 'IFCASSET',
  548. 3207858831: 'IFCASYMMETRICISHAPEPROFILEDEF',
  549. 277319702: 'IFCAUDIOVISUALAPPLIANCE',
  550. 1532957894: 'IFCAUDIOVISUALAPPLIANCETYPE',
  551. 4261334040: 'IFCAXIS1PLACEMENT',
  552. 3125803723: 'IFCAXIS2PLACEMENT2D',
  553. 2740243338: 'IFCAXIS2PLACEMENT3D',
  554. 1967976161: 'IFCBSPLINECURVE',
  555. 2461110595: 'IFCBSPLINECURVEWITHKNOTS',
  556. 2887950389: 'IFCBSPLINESURFACE',
  557. 167062518: 'IFCBSPLINESURFACEWITHKNOTS',
  558. 753842376: 'IFCBEAM',
  559. 2906023776: 'IFCBEAMSTANDARDCASE',
  560. 819618141: 'IFCBEAMTYPE',
  561. 4196446775: 'IFCBEARING',
  562. 3649138523: 'IFCBEARINGTYPE',
  563. 616511568: 'IFCBLOBTEXTURE',
  564. 1334484129: 'IFCBLOCK',
  565. 32344328: 'IFCBOILER',
  566. 231477066: 'IFCBOILERTYPE',
  567. 3649129432: 'IFCBOOLEANCLIPPINGRESULT',
  568. 2736907675: 'IFCBOOLEANRESULT',
  569. 4037036970: 'IFCBOUNDARYCONDITION',
  570. 1136057603: 'IFCBOUNDARYCURVE',
  571. 1560379544: 'IFCBOUNDARYEDGECONDITION',
  572. 3367102660: 'IFCBOUNDARYFACECONDITION',
  573. 1387855156: 'IFCBOUNDARYNODECONDITION',
  574. 2069777674: 'IFCBOUNDARYNODECONDITIONWARPING',
  575. 1260505505: 'IFCBOUNDEDCURVE',
  576. 4182860854: 'IFCBOUNDEDSURFACE',
  577. 2581212453: 'IFCBOUNDINGBOX',
  578. 2713105998: 'IFCBOXEDHALFSPACE',
  579. 644574406: 'IFCBRIDGE',
  580. 963979645: 'IFCBRIDGEPART',
  581. 4031249490: 'IFCBUILDING',
  582. 3299480353: 'IFCBUILDINGELEMENT',
  583. 2979338954: 'IFCBUILDINGELEMENTPART',
  584. 39481116: 'IFCBUILDINGELEMENTPARTTYPE',
  585. 1095909175: 'IFCBUILDINGELEMENTPROXY',
  586. 1909888760: 'IFCBUILDINGELEMENTPROXYTYPE',
  587. 1950629157: 'IFCBUILDINGELEMENTTYPE',
  588. 3124254112: 'IFCBUILDINGSTOREY',
  589. 1177604601: 'IFCBUILDINGSYSTEM',
  590. 2938176219: 'IFCBURNER',
  591. 2188180465: 'IFCBURNERTYPE',
  592. 2898889636: 'IFCCSHAPEPROFILEDEF',
  593. 635142910: 'IFCCABLECARRIERFITTING',
  594. 395041908: 'IFCCABLECARRIERFITTINGTYPE',
  595. 3758799889: 'IFCCABLECARRIERSEGMENT',
  596. 3293546465: 'IFCCABLECARRIERSEGMENTTYPE',
  597. 1051757585: 'IFCCABLEFITTING',
  598. 2674252688: 'IFCCABLEFITTINGTYPE',
  599. 4217484030: 'IFCCABLESEGMENT',
  600. 1285652485: 'IFCCABLESEGMENTTYPE',
  601. 3999819293: 'IFCCAISSONFOUNDATION',
  602. 3203706013: 'IFCCAISSONFOUNDATIONTYPE',
  603. 1123145078: 'IFCCARTESIANPOINT',
  604. 574549367: 'IFCCARTESIANPOINTLIST',
  605. 1675464909: 'IFCCARTESIANPOINTLIST2D',
  606. 2059837836: 'IFCCARTESIANPOINTLIST3D',
  607. 59481748: 'IFCCARTESIANTRANSFORMATIONOPERATOR',
  608. 3749851601: 'IFCCARTESIANTRANSFORMATIONOPERATOR2D',
  609. 3486308946: 'IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM',
  610. 3331915920: 'IFCCARTESIANTRANSFORMATIONOPERATOR3D',
  611. 1416205885: 'IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM',
  612. 3150382593: 'IFCCENTERLINEPROFILEDEF',
  613. 3902619387: 'IFCCHILLER',
  614. 2951183804: 'IFCCHILLERTYPE',
  615. 3296154744: 'IFCCHIMNEY',
  616. 2197970202: 'IFCCHIMNEYTYPE',
  617. 2611217952: 'IFCCIRCLE',
  618. 2937912522: 'IFCCIRCLEHOLLOWPROFILEDEF',
  619. 1383045692: 'IFCCIRCLEPROFILEDEF',
  620. 1062206242: 'IFCCIRCULARARCSEGMENT2D',
  621. 1677625105: 'IFCCIVILELEMENT',
  622. 3893394355: 'IFCCIVILELEMENTTYPE',
  623. 747523909: 'IFCCLASSIFICATION',
  624. 647927063: 'IFCCLASSIFICATIONREFERENCE',
  625. 2205249479: 'IFCCLOSEDSHELL',
  626. 639361253: 'IFCCOIL',
  627. 2301859152: 'IFCCOILTYPE',
  628. 776857604: 'IFCCOLOURRGB',
  629. 3285139300: 'IFCCOLOURRGBLIST',
  630. 3264961684: 'IFCCOLOURSPECIFICATION',
  631. 843113511: 'IFCCOLUMN',
  632. 905975707: 'IFCCOLUMNSTANDARDCASE',
  633. 300633059: 'IFCCOLUMNTYPE',
  634. 3221913625: 'IFCCOMMUNICATIONSAPPLIANCE',
  635. 400855858: 'IFCCOMMUNICATIONSAPPLIANCETYPE',
  636. 2542286263: 'IFCCOMPLEXPROPERTY',
  637. 3875453745: 'IFCCOMPLEXPROPERTYTEMPLATE',
  638. 3732776249: 'IFCCOMPOSITECURVE',
  639. 15328376: 'IFCCOMPOSITECURVEONSURFACE',
  640. 2485617015: 'IFCCOMPOSITECURVESEGMENT',
  641. 1485152156: 'IFCCOMPOSITEPROFILEDEF',
  642. 3571504051: 'IFCCOMPRESSOR',
  643. 3850581409: 'IFCCOMPRESSORTYPE',
  644. 2272882330: 'IFCCONDENSER',
  645. 2816379211: 'IFCCONDENSERTYPE',
  646. 2510884976: 'IFCCONIC',
  647. 370225590: 'IFCCONNECTEDFACESET',
  648. 1981873012: 'IFCCONNECTIONCURVEGEOMETRY',
  649. 2859738748: 'IFCCONNECTIONGEOMETRY',
  650. 45288368: 'IFCCONNECTIONPOINTECCENTRICITY',
  651. 2614616156: 'IFCCONNECTIONPOINTGEOMETRY',
  652. 2732653382: 'IFCCONNECTIONSURFACEGEOMETRY',
  653. 775493141: 'IFCCONNECTIONVOLUMEGEOMETRY',
  654. 1959218052: 'IFCCONSTRAINT',
  655. 3898045240: 'IFCCONSTRUCTIONEQUIPMENTRESOURCE',
  656. 2185764099: 'IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE',
  657. 1060000209: 'IFCCONSTRUCTIONMATERIALRESOURCE',
  658. 4105962743: 'IFCCONSTRUCTIONMATERIALRESOURCETYPE',
  659. 488727124: 'IFCCONSTRUCTIONPRODUCTRESOURCE',
  660. 1525564444: 'IFCCONSTRUCTIONPRODUCTRESOURCETYPE',
  661. 2559216714: 'IFCCONSTRUCTIONRESOURCE',
  662. 2574617495: 'IFCCONSTRUCTIONRESOURCETYPE',
  663. 3419103109: 'IFCCONTEXT',
  664. 3050246964: 'IFCCONTEXTDEPENDENTUNIT',
  665. 3293443760: 'IFCCONTROL',
  666. 25142252: 'IFCCONTROLLER',
  667. 578613899: 'IFCCONTROLLERTYPE',
  668. 2889183280: 'IFCCONVERSIONBASEDUNIT',
  669. 2713554722: 'IFCCONVERSIONBASEDUNITWITHOFFSET',
  670. 4136498852: 'IFCCOOLEDBEAM',
  671. 335055490: 'IFCCOOLEDBEAMTYPE',
  672. 3640358203: 'IFCCOOLINGTOWER',
  673. 2954562838: 'IFCCOOLINGTOWERTYPE',
  674. 1785450214: 'IFCCOORDINATEOPERATION',
  675. 1466758467: 'IFCCOORDINATEREFERENCESYSTEM',
  676. 3895139033: 'IFCCOSTITEM',
  677. 1419761937: 'IFCCOSTSCHEDULE',
  678. 602808272: 'IFCCOSTVALUE',
  679. 1973544240: 'IFCCOVERING',
  680. 1916426348: 'IFCCOVERINGTYPE',
  681. 3295246426: 'IFCCREWRESOURCE',
  682. 1815067380: 'IFCCREWRESOURCETYPE',
  683. 2506170314: 'IFCCSGPRIMITIVE3D',
  684. 2147822146: 'IFCCSGSOLID',
  685. 539742890: 'IFCCURRENCYRELATIONSHIP',
  686. 3495092785: 'IFCCURTAINWALL',
  687. 1457835157: 'IFCCURTAINWALLTYPE',
  688. 2601014836: 'IFCCURVE',
  689. 2827736869: 'IFCCURVEBOUNDEDPLANE',
  690. 2629017746: 'IFCCURVEBOUNDEDSURFACE',
  691. 1186437898: 'IFCCURVESEGMENT2D',
  692. 3800577675: 'IFCCURVESTYLE',
  693. 1105321065: 'IFCCURVESTYLEFONT',
  694. 2367409068: 'IFCCURVESTYLEFONTANDSCALING',
  695. 3510044353: 'IFCCURVESTYLEFONTPATTERN',
  696. 1213902940: 'IFCCYLINDRICALSURFACE',
  697. 4074379575: 'IFCDAMPER',
  698. 3961806047: 'IFCDAMPERTYPE',
  699. 3426335179: 'IFCDEEPFOUNDATION',
  700. 1306400036: 'IFCDEEPFOUNDATIONTYPE',
  701. 3632507154: 'IFCDERIVEDPROFILEDEF',
  702. 1765591967: 'IFCDERIVEDUNIT',
  703. 1045800335: 'IFCDERIVEDUNITELEMENT',
  704. 2949456006: 'IFCDIMENSIONALEXPONENTS',
  705. 32440307: 'IFCDIRECTION',
  706. 1335981549: 'IFCDISCRETEACCESSORY',
  707. 2635815018: 'IFCDISCRETEACCESSORYTYPE',
  708. 1945343521: 'IFCDISTANCEEXPRESSION',
  709. 1052013943: 'IFCDISTRIBUTIONCHAMBERELEMENT',
  710. 1599208980: 'IFCDISTRIBUTIONCHAMBERELEMENTTYPE',
  711. 562808652: 'IFCDISTRIBUTIONCIRCUIT',
  712. 1062813311: 'IFCDISTRIBUTIONCONTROLELEMENT',
  713. 2063403501: 'IFCDISTRIBUTIONCONTROLELEMENTTYPE',
  714. 1945004755: 'IFCDISTRIBUTIONELEMENT',
  715. 3256556792: 'IFCDISTRIBUTIONELEMENTTYPE',
  716. 3040386961: 'IFCDISTRIBUTIONFLOWELEMENT',
  717. 3849074793: 'IFCDISTRIBUTIONFLOWELEMENTTYPE',
  718. 3041715199: 'IFCDISTRIBUTIONPORT',
  719. 3205830791: 'IFCDISTRIBUTIONSYSTEM',
  720. 1154170062: 'IFCDOCUMENTINFORMATION',
  721. 770865208: 'IFCDOCUMENTINFORMATIONRELATIONSHIP',
  722. 3732053477: 'IFCDOCUMENTREFERENCE',
  723. 395920057: 'IFCDOOR',
  724. 2963535650: 'IFCDOORLININGPROPERTIES',
  725. 1714330368: 'IFCDOORPANELPROPERTIES',
  726. 3242481149: 'IFCDOORSTANDARDCASE',
  727. 526551008: 'IFCDOORSTYLE',
  728. 2323601079: 'IFCDOORTYPE',
  729. 445594917: 'IFCDRAUGHTINGPREDEFINEDCOLOUR',
  730. 4006246654: 'IFCDRAUGHTINGPREDEFINEDCURVEFONT',
  731. 342316401: 'IFCDUCTFITTING',
  732. 869906466: 'IFCDUCTFITTINGTYPE',
  733. 3518393246: 'IFCDUCTSEGMENT',
  734. 3760055223: 'IFCDUCTSEGMENTTYPE',
  735. 1360408905: 'IFCDUCTSILENCER',
  736. 2030761528: 'IFCDUCTSILENCERTYPE',
  737. 3900360178: 'IFCEDGE',
  738. 476780140: 'IFCEDGECURVE',
  739. 1472233963: 'IFCEDGELOOP',
  740. 1904799276: 'IFCELECTRICAPPLIANCE',
  741. 663422040: 'IFCELECTRICAPPLIANCETYPE',
  742. 862014818: 'IFCELECTRICDISTRIBUTIONBOARD',
  743. 2417008758: 'IFCELECTRICDISTRIBUTIONBOARDTYPE',
  744. 3310460725: 'IFCELECTRICFLOWSTORAGEDEVICE',
  745. 3277789161: 'IFCELECTRICFLOWSTORAGEDEVICETYPE',
  746. 264262732: 'IFCELECTRICGENERATOR',
  747. 1534661035: 'IFCELECTRICGENERATORTYPE',
  748. 402227799: 'IFCELECTRICMOTOR',
  749. 1217240411: 'IFCELECTRICMOTORTYPE',
  750. 1003880860: 'IFCELECTRICTIMECONTROL',
  751. 712377611: 'IFCELECTRICTIMECONTROLTYPE',
  752. 1758889154: 'IFCELEMENT',
  753. 4123344466: 'IFCELEMENTASSEMBLY',
  754. 2397081782: 'IFCELEMENTASSEMBLYTYPE',
  755. 1623761950: 'IFCELEMENTCOMPONENT',
  756. 2590856083: 'IFCELEMENTCOMPONENTTYPE',
  757. 1883228015: 'IFCELEMENTQUANTITY',
  758. 339256511: 'IFCELEMENTTYPE',
  759. 2777663545: 'IFCELEMENTARYSURFACE',
  760. 1704287377: 'IFCELLIPSE',
  761. 2835456948: 'IFCELLIPSEPROFILEDEF',
  762. 1658829314: 'IFCENERGYCONVERSIONDEVICE',
  763. 2107101300: 'IFCENERGYCONVERSIONDEVICETYPE',
  764. 2814081492: 'IFCENGINE',
  765. 132023988: 'IFCENGINETYPE',
  766. 3747195512: 'IFCEVAPORATIVECOOLER',
  767. 3174744832: 'IFCEVAPORATIVECOOLERTYPE',
  768. 484807127: 'IFCEVAPORATOR',
  769. 3390157468: 'IFCEVAPORATORTYPE',
  770. 4148101412: 'IFCEVENT',
  771. 211053100: 'IFCEVENTTIME',
  772. 4024345920: 'IFCEVENTTYPE',
  773. 297599258: 'IFCEXTENDEDPROPERTIES',
  774. 4294318154: 'IFCEXTERNALINFORMATION',
  775. 3200245327: 'IFCEXTERNALREFERENCE',
  776. 1437805879: 'IFCEXTERNALREFERENCERELATIONSHIP',
  777. 1209101575: 'IFCEXTERNALSPATIALELEMENT',
  778. 2853485674: 'IFCEXTERNALSPATIALSTRUCTUREELEMENT',
  779. 2242383968: 'IFCEXTERNALLYDEFINEDHATCHSTYLE',
  780. 1040185647: 'IFCEXTERNALLYDEFINEDSURFACESTYLE',
  781. 3548104201: 'IFCEXTERNALLYDEFINEDTEXTFONT',
  782. 477187591: 'IFCEXTRUDEDAREASOLID',
  783. 2804161546: 'IFCEXTRUDEDAREASOLIDTAPERED',
  784. 2556980723: 'IFCFACE',
  785. 2047409740: 'IFCFACEBASEDSURFACEMODEL',
  786. 1809719519: 'IFCFACEBOUND',
  787. 803316827: 'IFCFACEOUTERBOUND',
  788. 3008276851: 'IFCFACESURFACE',
  789. 807026263: 'IFCFACETEDBREP',
  790. 3737207727: 'IFCFACETEDBREPWITHVOIDS',
  791. 24185140: 'IFCFACILITY',
  792. 1310830890: 'IFCFACILITYPART',
  793. 4219587988: 'IFCFAILURECONNECTIONCONDITION',
  794. 3415622556: 'IFCFAN',
  795. 346874300: 'IFCFANTYPE',
  796. 647756555: 'IFCFASTENER',
  797. 2489546625: 'IFCFASTENERTYPE',
  798. 2827207264: 'IFCFEATUREELEMENT',
  799. 2143335405: 'IFCFEATUREELEMENTADDITION',
  800. 1287392070: 'IFCFEATUREELEMENTSUBTRACTION',
  801. 738692330: 'IFCFILLAREASTYLE',
  802. 374418227: 'IFCFILLAREASTYLEHATCHING',
  803. 315944413: 'IFCFILLAREASTYLETILES',
  804. 819412036: 'IFCFILTER',
  805. 1810631287: 'IFCFILTERTYPE',
  806. 1426591983: 'IFCFIRESUPPRESSIONTERMINAL',
  807. 4222183408: 'IFCFIRESUPPRESSIONTERMINALTYPE',
  808. 2652556860: 'IFCFIXEDREFERENCESWEPTAREASOLID',
  809. 2058353004: 'IFCFLOWCONTROLLER',
  810. 3907093117: 'IFCFLOWCONTROLLERTYPE',
  811. 4278956645: 'IFCFLOWFITTING',
  812. 3198132628: 'IFCFLOWFITTINGTYPE',
  813. 182646315: 'IFCFLOWINSTRUMENT',
  814. 4037862832: 'IFCFLOWINSTRUMENTTYPE',
  815. 2188021234: 'IFCFLOWMETER',
  816. 3815607619: 'IFCFLOWMETERTYPE',
  817. 3132237377: 'IFCFLOWMOVINGDEVICE',
  818. 1482959167: 'IFCFLOWMOVINGDEVICETYPE',
  819. 987401354: 'IFCFLOWSEGMENT',
  820. 1834744321: 'IFCFLOWSEGMENTTYPE',
  821. 707683696: 'IFCFLOWSTORAGEDEVICE',
  822. 1339347760: 'IFCFLOWSTORAGEDEVICETYPE',
  823. 2223149337: 'IFCFLOWTERMINAL',
  824. 2297155007: 'IFCFLOWTERMINALTYPE',
  825. 3508470533: 'IFCFLOWTREATMENTDEVICE',
  826. 3009222698: 'IFCFLOWTREATMENTDEVICETYPE',
  827. 900683007: 'IFCFOOTING',
  828. 1893162501: 'IFCFOOTINGTYPE',
  829. 263784265: 'IFCFURNISHINGELEMENT',
  830. 4238390223: 'IFCFURNISHINGELEMENTTYPE',
  831. 1509553395: 'IFCFURNITURE',
  832. 1268542332: 'IFCFURNITURETYPE',
  833. 3493046030: 'IFCGEOGRAPHICELEMENT',
  834. 4095422895: 'IFCGEOGRAPHICELEMENTTYPE',
  835. 987898635: 'IFCGEOMETRICCURVESET',
  836. 3448662350: 'IFCGEOMETRICREPRESENTATIONCONTEXT',
  837. 2453401579: 'IFCGEOMETRICREPRESENTATIONITEM',
  838. 4142052618: 'IFCGEOMETRICREPRESENTATIONSUBCONTEXT',
  839. 3590301190: 'IFCGEOMETRICSET',
  840. 3009204131: 'IFCGRID',
  841. 852622518: 'IFCGRIDAXIS',
  842. 178086475: 'IFCGRIDPLACEMENT',
  843. 2706460486: 'IFCGROUP',
  844. 812098782: 'IFCHALFSPACESOLID',
  845. 3319311131: 'IFCHEATEXCHANGER',
  846. 1251058090: 'IFCHEATEXCHANGERTYPE',
  847. 2068733104: 'IFCHUMIDIFIER',
  848. 1806887404: 'IFCHUMIDIFIERTYPE',
  849. 1484403080: 'IFCISHAPEPROFILEDEF',
  850. 3905492369: 'IFCIMAGETEXTURE',
  851. 3570813810: 'IFCINDEXEDCOLOURMAP',
  852. 2571569899: 'IFCINDEXEDPOLYCURVE',
  853. 178912537: 'IFCINDEXEDPOLYGONALFACE',
  854. 2294589976: 'IFCINDEXEDPOLYGONALFACEWITHVOIDS',
  855. 1437953363: 'IFCINDEXEDTEXTUREMAP',
  856. 2133299955: 'IFCINDEXEDTRIANGLETEXTUREMAP',
  857. 4175244083: 'IFCINTERCEPTOR',
  858. 3946677679: 'IFCINTERCEPTORTYPE',
  859. 3113134337: 'IFCINTERSECTIONCURVE',
  860. 2391368822: 'IFCINVENTORY',
  861. 3741457305: 'IFCIRREGULARTIMESERIES',
  862. 3020489413: 'IFCIRREGULARTIMESERIESVALUE',
  863. 2176052936: 'IFCJUNCTIONBOX',
  864. 4288270099: 'IFCJUNCTIONBOXTYPE',
  865. 572779678: 'IFCLSHAPEPROFILEDEF',
  866. 3827777499: 'IFCLABORRESOURCE',
  867. 428585644: 'IFCLABORRESOURCETYPE',
  868. 1585845231: 'IFCLAGTIME',
  869. 76236018: 'IFCLAMP',
  870. 1051575348: 'IFCLAMPTYPE',
  871. 2655187982: 'IFCLIBRARYINFORMATION',
  872. 3452421091: 'IFCLIBRARYREFERENCE',
  873. 4162380809: 'IFCLIGHTDISTRIBUTIONDATA',
  874. 629592764: 'IFCLIGHTFIXTURE',
  875. 1161773419: 'IFCLIGHTFIXTURETYPE',
  876. 1566485204: 'IFCLIGHTINTENSITYDISTRIBUTION',
  877. 1402838566: 'IFCLIGHTSOURCE',
  878. 125510826: 'IFCLIGHTSOURCEAMBIENT',
  879. 2604431987: 'IFCLIGHTSOURCEDIRECTIONAL',
  880. 4266656042: 'IFCLIGHTSOURCEGONIOMETRIC',
  881. 1520743889: 'IFCLIGHTSOURCEPOSITIONAL',
  882. 3422422726: 'IFCLIGHTSOURCESPOT',
  883. 1281925730: 'IFCLINE',
  884. 3092502836: 'IFCLINESEGMENT2D',
  885. 388784114: 'IFCLINEARPLACEMENT',
  886. 1154579445: 'IFCLINEARPOSITIONINGELEMENT',
  887. 2624227202: 'IFCLOCALPLACEMENT',
  888. 1008929658: 'IFCLOOP',
  889. 1425443689: 'IFCMANIFOLDSOLIDBREP',
  890. 3057273783: 'IFCMAPCONVERSION',
  891. 2347385850: 'IFCMAPPEDITEM',
  892. 1838606355: 'IFCMATERIAL',
  893. 1847130766: 'IFCMATERIALCLASSIFICATIONRELATIONSHIP',
  894. 3708119000: 'IFCMATERIALCONSTITUENT',
  895. 2852063980: 'IFCMATERIALCONSTITUENTSET',
  896. 760658860: 'IFCMATERIALDEFINITION',
  897. 2022407955: 'IFCMATERIALDEFINITIONREPRESENTATION',
  898. 248100487: 'IFCMATERIALLAYER',
  899. 3303938423: 'IFCMATERIALLAYERSET',
  900. 1303795690: 'IFCMATERIALLAYERSETUSAGE',
  901. 1847252529: 'IFCMATERIALLAYERWITHOFFSETS',
  902. 2199411900: 'IFCMATERIALLIST',
  903. 2235152071: 'IFCMATERIALPROFILE',
  904. 164193824: 'IFCMATERIALPROFILESET',
  905. 3079605661: 'IFCMATERIALPROFILESETUSAGE',
  906. 3404854881: 'IFCMATERIALPROFILESETUSAGETAPERING',
  907. 552965576: 'IFCMATERIALPROFILEWITHOFFSETS',
  908. 3265635763: 'IFCMATERIALPROPERTIES',
  909. 853536259: 'IFCMATERIALRELATIONSHIP',
  910. 1507914824: 'IFCMATERIALUSAGEDEFINITION',
  911. 2597039031: 'IFCMEASUREWITHUNIT',
  912. 377706215: 'IFCMECHANICALFASTENER',
  913. 2108223431: 'IFCMECHANICALFASTENERTYPE',
  914. 1437502449: 'IFCMEDICALDEVICE',
  915. 1114901282: 'IFCMEDICALDEVICETYPE',
  916. 1073191201: 'IFCMEMBER',
  917. 1911478936: 'IFCMEMBERSTANDARDCASE',
  918. 3181161470: 'IFCMEMBERTYPE',
  919. 3368373690: 'IFCMETRIC',
  920. 2998442950: 'IFCMIRROREDPROFILEDEF',
  921. 2706619895: 'IFCMONETARYUNIT',
  922. 2474470126: 'IFCMOTORCONNECTION',
  923. 977012517: 'IFCMOTORCONNECTIONTYPE',
  924. 1918398963: 'IFCNAMEDUNIT',
  925. 3888040117: 'IFCOBJECT',
  926. 219451334: 'IFCOBJECTDEFINITION',
  927. 3701648758: 'IFCOBJECTPLACEMENT',
  928. 2251480897: 'IFCOBJECTIVE',
  929. 4143007308: 'IFCOCCUPANT',
  930. 590820931: 'IFCOFFSETCURVE',
  931. 3388369263: 'IFCOFFSETCURVE2D',
  932. 3505215534: 'IFCOFFSETCURVE3D',
  933. 2485787929: 'IFCOFFSETCURVEBYDISTANCES',
  934. 2665983363: 'IFCOPENSHELL',
  935. 3588315303: 'IFCOPENINGELEMENT',
  936. 3079942009: 'IFCOPENINGSTANDARDCASE',
  937. 4251960020: 'IFCORGANIZATION',
  938. 1411181986: 'IFCORGANIZATIONRELATIONSHIP',
  939. 643959842: 'IFCORIENTATIONEXPRESSION',
  940. 1029017970: 'IFCORIENTEDEDGE',
  941. 144952367: 'IFCOUTERBOUNDARYCURVE',
  942. 3694346114: 'IFCOUTLET',
  943. 2837617999: 'IFCOUTLETTYPE',
  944. 1207048766: 'IFCOWNERHISTORY',
  945. 2529465313: 'IFCPARAMETERIZEDPROFILEDEF',
  946. 2519244187: 'IFCPATH',
  947. 1682466193: 'IFCPCURVE',
  948. 2382730787: 'IFCPERFORMANCEHISTORY',
  949. 3566463478: 'IFCPERMEABLECOVERINGPROPERTIES',
  950. 3327091369: 'IFCPERMIT',
  951. 2077209135: 'IFCPERSON',
  952. 101040310: 'IFCPERSONANDORGANIZATION',
  953. 3021840470: 'IFCPHYSICALCOMPLEXQUANTITY',
  954. 2483315170: 'IFCPHYSICALQUANTITY',
  955. 2226359599: 'IFCPHYSICALSIMPLEQUANTITY',
  956. 1687234759: 'IFCPILE',
  957. 1158309216: 'IFCPILETYPE',
  958. 310824031: 'IFCPIPEFITTING',
  959. 804291784: 'IFCPIPEFITTINGTYPE',
  960. 3612865200: 'IFCPIPESEGMENT',
  961. 4231323485: 'IFCPIPESEGMENTTYPE',
  962. 597895409: 'IFCPIXELTEXTURE',
  963. 2004835150: 'IFCPLACEMENT',
  964. 603570806: 'IFCPLANARBOX',
  965. 1663979128: 'IFCPLANAREXTENT',
  966. 220341763: 'IFCPLANE',
  967. 3171933400: 'IFCPLATE',
  968. 1156407060: 'IFCPLATESTANDARDCASE',
  969. 4017108033: 'IFCPLATETYPE',
  970. 2067069095: 'IFCPOINT',
  971. 4022376103: 'IFCPOINTONCURVE',
  972. 1423911732: 'IFCPOINTONSURFACE',
  973. 2924175390: 'IFCPOLYLOOP',
  974. 2775532180: 'IFCPOLYGONALBOUNDEDHALFSPACE',
  975. 2839578677: 'IFCPOLYGONALFACESET',
  976. 3724593414: 'IFCPOLYLINE',
  977. 3740093272: 'IFCPORT',
  978. 1946335990: 'IFCPOSITIONINGELEMENT',
  979. 3355820592: 'IFCPOSTALADDRESS',
  980. 759155922: 'IFCPREDEFINEDCOLOUR',
  981. 2559016684: 'IFCPREDEFINEDCURVEFONT',
  982. 3727388367: 'IFCPREDEFINEDITEM',
  983. 3778827333: 'IFCPREDEFINEDPROPERTIES',
  984. 3967405729: 'IFCPREDEFINEDPROPERTYSET',
  985. 1775413392: 'IFCPREDEFINEDTEXTFONT',
  986. 677532197: 'IFCPRESENTATIONITEM',
  987. 2022622350: 'IFCPRESENTATIONLAYERASSIGNMENT',
  988. 1304840413: 'IFCPRESENTATIONLAYERWITHSTYLE',
  989. 3119450353: 'IFCPRESENTATIONSTYLE',
  990. 2417041796: 'IFCPRESENTATIONSTYLEASSIGNMENT',
  991. 2744685151: 'IFCPROCEDURE',
  992. 569719735: 'IFCPROCEDURETYPE',
  993. 2945172077: 'IFCPROCESS',
  994. 4208778838: 'IFCPRODUCT',
  995. 673634403: 'IFCPRODUCTDEFINITIONSHAPE',
  996. 2095639259: 'IFCPRODUCTREPRESENTATION',
  997. 3958567839: 'IFCPROFILEDEF',
  998. 2802850158: 'IFCPROFILEPROPERTIES',
  999. 103090709: 'IFCPROJECT',
  1000. 653396225: 'IFCPROJECTLIBRARY',
  1001. 2904328755: 'IFCPROJECTORDER',
  1002. 3843373140: 'IFCPROJECTEDCRS',
  1003. 3651124850: 'IFCPROJECTIONELEMENT',
  1004. 2598011224: 'IFCPROPERTY',
  1005. 986844984: 'IFCPROPERTYABSTRACTION',
  1006. 871118103: 'IFCPROPERTYBOUNDEDVALUE',
  1007. 1680319473: 'IFCPROPERTYDEFINITION',
  1008. 148025276: 'IFCPROPERTYDEPENDENCYRELATIONSHIP',
  1009. 4166981789: 'IFCPROPERTYENUMERATEDVALUE',
  1010. 3710013099: 'IFCPROPERTYENUMERATION',
  1011. 2752243245: 'IFCPROPERTYLISTVALUE',
  1012. 941946838: 'IFCPROPERTYREFERENCEVALUE',
  1013. 1451395588: 'IFCPROPERTYSET',
  1014. 3357820518: 'IFCPROPERTYSETDEFINITION',
  1015. 492091185: 'IFCPROPERTYSETTEMPLATE',
  1016. 3650150729: 'IFCPROPERTYSINGLEVALUE',
  1017. 110355661: 'IFCPROPERTYTABLEVALUE',
  1018. 3521284610: 'IFCPROPERTYTEMPLATE',
  1019. 1482703590: 'IFCPROPERTYTEMPLATEDEFINITION',
  1020. 738039164: 'IFCPROTECTIVEDEVICE',
  1021. 2295281155: 'IFCPROTECTIVEDEVICETRIPPINGUNIT',
  1022. 655969474: 'IFCPROTECTIVEDEVICETRIPPINGUNITTYPE',
  1023. 1842657554: 'IFCPROTECTIVEDEVICETYPE',
  1024. 3219374653: 'IFCPROXY',
  1025. 90941305: 'IFCPUMP',
  1026. 2250791053: 'IFCPUMPTYPE',
  1027. 2044713172: 'IFCQUANTITYAREA',
  1028. 2093928680: 'IFCQUANTITYCOUNT',
  1029. 931644368: 'IFCQUANTITYLENGTH',
  1030. 2090586900: 'IFCQUANTITYSET',
  1031. 3252649465: 'IFCQUANTITYTIME',
  1032. 2405470396: 'IFCQUANTITYVOLUME',
  1033. 825690147: 'IFCQUANTITYWEIGHT',
  1034. 2262370178: 'IFCRAILING',
  1035. 2893384427: 'IFCRAILINGTYPE',
  1036. 3024970846: 'IFCRAMP',
  1037. 3283111854: 'IFCRAMPFLIGHT',
  1038. 2324767716: 'IFCRAMPFLIGHTTYPE',
  1039. 1469900589: 'IFCRAMPTYPE',
  1040. 1232101972: 'IFCRATIONALBSPLINECURVEWITHKNOTS',
  1041. 683857671: 'IFCRATIONALBSPLINESURFACEWITHKNOTS',
  1042. 2770003689: 'IFCRECTANGLEHOLLOWPROFILEDEF',
  1043. 3615266464: 'IFCRECTANGLEPROFILEDEF',
  1044. 2798486643: 'IFCRECTANGULARPYRAMID',
  1045. 3454111270: 'IFCRECTANGULARTRIMMEDSURFACE',
  1046. 3915482550: 'IFCRECURRENCEPATTERN',
  1047. 2433181523: 'IFCREFERENCE',
  1048. 4021432810: 'IFCREFERENT',
  1049. 3413951693: 'IFCREGULARTIMESERIES',
  1050. 1580146022: 'IFCREINFORCEMENTBARPROPERTIES',
  1051. 3765753017: 'IFCREINFORCEMENTDEFINITIONPROPERTIES',
  1052. 979691226: 'IFCREINFORCINGBAR',
  1053. 2572171363: 'IFCREINFORCINGBARTYPE',
  1054. 3027567501: 'IFCREINFORCINGELEMENT',
  1055. 964333572: 'IFCREINFORCINGELEMENTTYPE',
  1056. 2320036040: 'IFCREINFORCINGMESH',
  1057. 2310774935: 'IFCREINFORCINGMESHTYPE',
  1058. 160246688: 'IFCRELAGGREGATES',
  1059. 3939117080: 'IFCRELASSIGNS',
  1060. 1683148259: 'IFCRELASSIGNSTOACTOR',
  1061. 2495723537: 'IFCRELASSIGNSTOCONTROL',
  1062. 1307041759: 'IFCRELASSIGNSTOGROUP',
  1063. 1027710054: 'IFCRELASSIGNSTOGROUPBYFACTOR',
  1064. 4278684876: 'IFCRELASSIGNSTOPROCESS',
  1065. 2857406711: 'IFCRELASSIGNSTOPRODUCT',
  1066. 205026976: 'IFCRELASSIGNSTORESOURCE',
  1067. 1865459582: 'IFCRELASSOCIATES',
  1068. 4095574036: 'IFCRELASSOCIATESAPPROVAL',
  1069. 919958153: 'IFCRELASSOCIATESCLASSIFICATION',
  1070. 2728634034: 'IFCRELASSOCIATESCONSTRAINT',
  1071. 982818633: 'IFCRELASSOCIATESDOCUMENT',
  1072. 3840914261: 'IFCRELASSOCIATESLIBRARY',
  1073. 2655215786: 'IFCRELASSOCIATESMATERIAL',
  1074. 826625072: 'IFCRELCONNECTS',
  1075. 1204542856: 'IFCRELCONNECTSELEMENTS',
  1076. 3945020480: 'IFCRELCONNECTSPATHELEMENTS',
  1077. 4201705270: 'IFCRELCONNECTSPORTTOELEMENT',
  1078. 3190031847: 'IFCRELCONNECTSPORTS',
  1079. 2127690289: 'IFCRELCONNECTSSTRUCTURALACTIVITY',
  1080. 1638771189: 'IFCRELCONNECTSSTRUCTURALMEMBER',
  1081. 504942748: 'IFCRELCONNECTSWITHECCENTRICITY',
  1082. 3678494232: 'IFCRELCONNECTSWITHREALIZINGELEMENTS',
  1083. 3242617779: 'IFCRELCONTAINEDINSPATIALSTRUCTURE',
  1084. 886880790: 'IFCRELCOVERSBLDGELEMENTS',
  1085. 2802773753: 'IFCRELCOVERSSPACES',
  1086. 2565941209: 'IFCRELDECLARES',
  1087. 2551354335: 'IFCRELDECOMPOSES',
  1088. 693640335: 'IFCRELDEFINES',
  1089. 1462361463: 'IFCRELDEFINESBYOBJECT',
  1090. 4186316022: 'IFCRELDEFINESBYPROPERTIES',
  1091. 307848117: 'IFCRELDEFINESBYTEMPLATE',
  1092. 781010003: 'IFCRELDEFINESBYTYPE',
  1093. 3940055652: 'IFCRELFILLSELEMENT',
  1094. 279856033: 'IFCRELFLOWCONTROLELEMENTS',
  1095. 427948657: 'IFCRELINTERFERESELEMENTS',
  1096. 3268803585: 'IFCRELNESTS',
  1097. 1441486842: 'IFCRELPOSITIONS',
  1098. 750771296: 'IFCRELPROJECTSELEMENT',
  1099. 1245217292: 'IFCRELREFERENCEDINSPATIALSTRUCTURE',
  1100. 4122056220: 'IFCRELSEQUENCE',
  1101. 366585022: 'IFCRELSERVICESBUILDINGS',
  1102. 3451746338: 'IFCRELSPACEBOUNDARY',
  1103. 3523091289: 'IFCRELSPACEBOUNDARY1STLEVEL',
  1104. 1521410863: 'IFCRELSPACEBOUNDARY2NDLEVEL',
  1105. 1401173127: 'IFCRELVOIDSELEMENT',
  1106. 478536968: 'IFCRELATIONSHIP',
  1107. 816062949: 'IFCREPARAMETRISEDCOMPOSITECURVESEGMENT',
  1108. 1076942058: 'IFCREPRESENTATION',
  1109. 3377609919: 'IFCREPRESENTATIONCONTEXT',
  1110. 3008791417: 'IFCREPRESENTATIONITEM',
  1111. 1660063152: 'IFCREPRESENTATIONMAP',
  1112. 2914609552: 'IFCRESOURCE',
  1113. 2943643501: 'IFCRESOURCEAPPROVALRELATIONSHIP',
  1114. 1608871552: 'IFCRESOURCECONSTRAINTRELATIONSHIP',
  1115. 2439245199: 'IFCRESOURCELEVELRELATIONSHIP',
  1116. 1042787934: 'IFCRESOURCETIME',
  1117. 1856042241: 'IFCREVOLVEDAREASOLID',
  1118. 3243963512: 'IFCREVOLVEDAREASOLIDTAPERED',
  1119. 4158566097: 'IFCRIGHTCIRCULARCONE',
  1120. 3626867408: 'IFCRIGHTCIRCULARCYLINDER',
  1121. 2016517767: 'IFCROOF',
  1122. 2781568857: 'IFCROOFTYPE',
  1123. 2341007311: 'IFCROOT',
  1124. 2778083089: 'IFCROUNDEDRECTANGLEPROFILEDEF',
  1125. 448429030: 'IFCSIUNIT',
  1126. 3053780830: 'IFCSANITARYTERMINAL',
  1127. 1768891740: 'IFCSANITARYTERMINALTYPE',
  1128. 1054537805: 'IFCSCHEDULINGTIME',
  1129. 2157484638: 'IFCSEAMCURVE',
  1130. 2042790032: 'IFCSECTIONPROPERTIES',
  1131. 4165799628: 'IFCSECTIONREINFORCEMENTPROPERTIES',
  1132. 1862484736: 'IFCSECTIONEDSOLID',
  1133. 1290935644: 'IFCSECTIONEDSOLIDHORIZONTAL',
  1134. 1509187699: 'IFCSECTIONEDSPINE',
  1135. 4086658281: 'IFCSENSOR',
  1136. 1783015770: 'IFCSENSORTYPE',
  1137. 1329646415: 'IFCSHADINGDEVICE',
  1138. 4074543187: 'IFCSHADINGDEVICETYPE',
  1139. 867548509: 'IFCSHAPEASPECT',
  1140. 3982875396: 'IFCSHAPEMODEL',
  1141. 4240577450: 'IFCSHAPEREPRESENTATION',
  1142. 4124623270: 'IFCSHELLBASEDSURFACEMODEL',
  1143. 3692461612: 'IFCSIMPLEPROPERTY',
  1144. 3663146110: 'IFCSIMPLEPROPERTYTEMPLATE',
  1145. 4097777520: 'IFCSITE',
  1146. 1529196076: 'IFCSLAB',
  1147. 3127900445: 'IFCSLABELEMENTEDCASE',
  1148. 3027962421: 'IFCSLABSTANDARDCASE',
  1149. 2533589738: 'IFCSLABTYPE',
  1150. 2609359061: 'IFCSLIPPAGECONNECTIONCONDITION',
  1151. 3420628829: 'IFCSOLARDEVICE',
  1152. 1072016465: 'IFCSOLARDEVICETYPE',
  1153. 723233188: 'IFCSOLIDMODEL',
  1154. 3856911033: 'IFCSPACE',
  1155. 1999602285: 'IFCSPACEHEATER',
  1156. 1305183839: 'IFCSPACEHEATERTYPE',
  1157. 3812236995: 'IFCSPACETYPE',
  1158. 1412071761: 'IFCSPATIALELEMENT',
  1159. 710998568: 'IFCSPATIALELEMENTTYPE',
  1160. 2706606064: 'IFCSPATIALSTRUCTUREELEMENT',
  1161. 3893378262: 'IFCSPATIALSTRUCTUREELEMENTTYPE',
  1162. 463610769: 'IFCSPATIALZONE',
  1163. 2481509218: 'IFCSPATIALZONETYPE',
  1164. 451544542: 'IFCSPHERE',
  1165. 4015995234: 'IFCSPHERICALSURFACE',
  1166. 1404847402: 'IFCSTACKTERMINAL',
  1167. 3112655638: 'IFCSTACKTERMINALTYPE',
  1168. 331165859: 'IFCSTAIR',
  1169. 4252922144: 'IFCSTAIRFLIGHT',
  1170. 1039846685: 'IFCSTAIRFLIGHTTYPE',
  1171. 338393293: 'IFCSTAIRTYPE',
  1172. 682877961: 'IFCSTRUCTURALACTION',
  1173. 3544373492: 'IFCSTRUCTURALACTIVITY',
  1174. 2515109513: 'IFCSTRUCTURALANALYSISMODEL',
  1175. 1179482911: 'IFCSTRUCTURALCONNECTION',
  1176. 2273995522: 'IFCSTRUCTURALCONNECTIONCONDITION',
  1177. 1004757350: 'IFCSTRUCTURALCURVEACTION',
  1178. 4243806635: 'IFCSTRUCTURALCURVECONNECTION',
  1179. 214636428: 'IFCSTRUCTURALCURVEMEMBER',
  1180. 2445595289: 'IFCSTRUCTURALCURVEMEMBERVARYING',
  1181. 2757150158: 'IFCSTRUCTURALCURVEREACTION',
  1182. 3136571912: 'IFCSTRUCTURALITEM',
  1183. 1807405624: 'IFCSTRUCTURALLINEARACTION',
  1184. 2162789131: 'IFCSTRUCTURALLOAD',
  1185. 385403989: 'IFCSTRUCTURALLOADCASE',
  1186. 3478079324: 'IFCSTRUCTURALLOADCONFIGURATION',
  1187. 1252848954: 'IFCSTRUCTURALLOADGROUP',
  1188. 1595516126: 'IFCSTRUCTURALLOADLINEARFORCE',
  1189. 609421318: 'IFCSTRUCTURALLOADORRESULT',
  1190. 2668620305: 'IFCSTRUCTURALLOADPLANARFORCE',
  1191. 2473145415: 'IFCSTRUCTURALLOADSINGLEDISPLACEMENT',
  1192. 1973038258: 'IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION',
  1193. 1597423693: 'IFCSTRUCTURALLOADSINGLEFORCE',
  1194. 1190533807: 'IFCSTRUCTURALLOADSINGLEFORCEWARPING',
  1195. 2525727697: 'IFCSTRUCTURALLOADSTATIC',
  1196. 3408363356: 'IFCSTRUCTURALLOADTEMPERATURE',
  1197. 530289379: 'IFCSTRUCTURALMEMBER',
  1198. 1621171031: 'IFCSTRUCTURALPLANARACTION',
  1199. 2082059205: 'IFCSTRUCTURALPOINTACTION',
  1200. 734778138: 'IFCSTRUCTURALPOINTCONNECTION',
  1201. 1235345126: 'IFCSTRUCTURALPOINTREACTION',
  1202. 3689010777: 'IFCSTRUCTURALREACTION',
  1203. 2986769608: 'IFCSTRUCTURALRESULTGROUP',
  1204. 3657597509: 'IFCSTRUCTURALSURFACEACTION',
  1205. 1975003073: 'IFCSTRUCTURALSURFACECONNECTION',
  1206. 3979015343: 'IFCSTRUCTURALSURFACEMEMBER',
  1207. 2218152070: 'IFCSTRUCTURALSURFACEMEMBERVARYING',
  1208. 603775116: 'IFCSTRUCTURALSURFACEREACTION',
  1209. 2830218821: 'IFCSTYLEMODEL',
  1210. 3958052878: 'IFCSTYLEDITEM',
  1211. 3049322572: 'IFCSTYLEDREPRESENTATION',
  1212. 148013059: 'IFCSUBCONTRACTRESOURCE',
  1213. 4095615324: 'IFCSUBCONTRACTRESOURCETYPE',
  1214. 2233826070: 'IFCSUBEDGE',
  1215. 2513912981: 'IFCSURFACE',
  1216. 699246055: 'IFCSURFACECURVE',
  1217. 2028607225: 'IFCSURFACECURVESWEPTAREASOLID',
  1218. 3101698114: 'IFCSURFACEFEATURE',
  1219. 2809605785: 'IFCSURFACEOFLINEAREXTRUSION',
  1220. 4124788165: 'IFCSURFACEOFREVOLUTION',
  1221. 2934153892: 'IFCSURFACEREINFORCEMENTAREA',
  1222. 1300840506: 'IFCSURFACESTYLE',
  1223. 3303107099: 'IFCSURFACESTYLELIGHTING',
  1224. 1607154358: 'IFCSURFACESTYLEREFRACTION',
  1225. 1878645084: 'IFCSURFACESTYLERENDERING',
  1226. 846575682: 'IFCSURFACESTYLESHADING',
  1227. 1351298697: 'IFCSURFACESTYLEWITHTEXTURES',
  1228. 626085974: 'IFCSURFACETEXTURE',
  1229. 2247615214: 'IFCSWEPTAREASOLID',
  1230. 1260650574: 'IFCSWEPTDISKSOLID',
  1231. 1096409881: 'IFCSWEPTDISKSOLIDPOLYGONAL',
  1232. 230924584: 'IFCSWEPTSURFACE',
  1233. 1162798199: 'IFCSWITCHINGDEVICE',
  1234. 2315554128: 'IFCSWITCHINGDEVICETYPE',
  1235. 2254336722: 'IFCSYSTEM',
  1236. 413509423: 'IFCSYSTEMFURNITUREELEMENT',
  1237. 1580310250: 'IFCSYSTEMFURNITUREELEMENTTYPE',
  1238. 3071757647: 'IFCTSHAPEPROFILEDEF',
  1239. 985171141: 'IFCTABLE',
  1240. 2043862942: 'IFCTABLECOLUMN',
  1241. 531007025: 'IFCTABLEROW',
  1242. 812556717: 'IFCTANK',
  1243. 5716631: 'IFCTANKTYPE',
  1244. 3473067441: 'IFCTASK',
  1245. 1549132990: 'IFCTASKTIME',
  1246. 2771591690: 'IFCTASKTIMERECURRING',
  1247. 3206491090: 'IFCTASKTYPE',
  1248. 912023232: 'IFCTELECOMADDRESS',
  1249. 3824725483: 'IFCTENDON',
  1250. 2347447852: 'IFCTENDONANCHOR',
  1251. 3081323446: 'IFCTENDONANCHORTYPE',
  1252. 3663046924: 'IFCTENDONCONDUIT',
  1253. 2281632017: 'IFCTENDONCONDUITTYPE',
  1254. 2415094496: 'IFCTENDONTYPE',
  1255. 2387106220: 'IFCTESSELLATEDFACESET',
  1256. 901063453: 'IFCTESSELLATEDITEM',
  1257. 4282788508: 'IFCTEXTLITERAL',
  1258. 3124975700: 'IFCTEXTLITERALWITHEXTENT',
  1259. 1447204868: 'IFCTEXTSTYLE',
  1260. 1983826977: 'IFCTEXTSTYLEFONTMODEL',
  1261. 2636378356: 'IFCTEXTSTYLEFORDEFINEDFONT',
  1262. 1640371178: 'IFCTEXTSTYLETEXTMODEL',
  1263. 280115917: 'IFCTEXTURECOORDINATE',
  1264. 1742049831: 'IFCTEXTURECOORDINATEGENERATOR',
  1265. 2552916305: 'IFCTEXTUREMAP',
  1266. 1210645708: 'IFCTEXTUREVERTEX',
  1267. 3611470254: 'IFCTEXTUREVERTEXLIST',
  1268. 1199560280: 'IFCTIMEPERIOD',
  1269. 3101149627: 'IFCTIMESERIES',
  1270. 581633288: 'IFCTIMESERIESVALUE',
  1271. 1377556343: 'IFCTOPOLOGICALREPRESENTATIONITEM',
  1272. 1735638870: 'IFCTOPOLOGYREPRESENTATION',
  1273. 1935646853: 'IFCTOROIDALSURFACE',
  1274. 3825984169: 'IFCTRANSFORMER',
  1275. 1692211062: 'IFCTRANSFORMERTYPE',
  1276. 2595432518: 'IFCTRANSITIONCURVESEGMENT2D',
  1277. 1620046519: 'IFCTRANSPORTELEMENT',
  1278. 2097647324: 'IFCTRANSPORTELEMENTTYPE',
  1279. 2715220739: 'IFCTRAPEZIUMPROFILEDEF',
  1280. 2916149573: 'IFCTRIANGULATEDFACESET',
  1281. 1229763772: 'IFCTRIANGULATEDIRREGULARNETWORK',
  1282. 3593883385: 'IFCTRIMMEDCURVE',
  1283. 3026737570: 'IFCTUBEBUNDLE',
  1284. 1600972822: 'IFCTUBEBUNDLETYPE',
  1285. 1628702193: 'IFCTYPEOBJECT',
  1286. 3736923433: 'IFCTYPEPROCESS',
  1287. 2347495698: 'IFCTYPEPRODUCT',
  1288. 3698973494: 'IFCTYPERESOURCE',
  1289. 427810014: 'IFCUSHAPEPROFILEDEF',
  1290. 180925521: 'IFCUNITASSIGNMENT',
  1291. 630975310: 'IFCUNITARYCONTROLELEMENT',
  1292. 3179687236: 'IFCUNITARYCONTROLELEMENTTYPE',
  1293. 4292641817: 'IFCUNITARYEQUIPMENT',
  1294. 1911125066: 'IFCUNITARYEQUIPMENTTYPE',
  1295. 4207607924: 'IFCVALVE',
  1296. 728799441: 'IFCVALVETYPE',
  1297. 1417489154: 'IFCVECTOR',
  1298. 2799835756: 'IFCVERTEX',
  1299. 2759199220: 'IFCVERTEXLOOP',
  1300. 1907098498: 'IFCVERTEXPOINT',
  1301. 1530820697: 'IFCVIBRATIONDAMPER',
  1302. 3956297820: 'IFCVIBRATIONDAMPERTYPE',
  1303. 2391383451: 'IFCVIBRATIONISOLATOR',
  1304. 3313531582: 'IFCVIBRATIONISOLATORTYPE',
  1305. 2769231204: 'IFCVIRTUALELEMENT',
  1306. 891718957: 'IFCVIRTUALGRIDINTERSECTION',
  1307. 926996030: 'IFCVOIDINGFEATURE',
  1308. 2391406946: 'IFCWALL',
  1309. 4156078855: 'IFCWALLELEMENTEDCASE',
  1310. 3512223829: 'IFCWALLSTANDARDCASE',
  1311. 1898987631: 'IFCWALLTYPE',
  1312. 4237592921: 'IFCWASTETERMINAL',
  1313. 1133259667: 'IFCWASTETERMINALTYPE',
  1314. 3304561284: 'IFCWINDOW',
  1315. 336235671: 'IFCWINDOWLININGPROPERTIES',
  1316. 512836454: 'IFCWINDOWPANELPROPERTIES',
  1317. 486154966: 'IFCWINDOWSTANDARDCASE',
  1318. 1299126871: 'IFCWINDOWSTYLE',
  1319. 4009809668: 'IFCWINDOWTYPE',
  1320. 4088093105: 'IFCWORKCALENDAR',
  1321. 1028945134: 'IFCWORKCONTROL',
  1322. 4218914973: 'IFCWORKPLAN',
  1323. 3342526732: 'IFCWORKSCHEDULE',
  1324. 1236880293: 'IFCWORKTIME',
  1325. 2543172580: 'IFCZSHAPEPROFILEDEF',
  1326. 1033361043: 'IFCZONE',
  1327. };
  1328. class PropertyManager {
  1329. constructor( state ) {
  1330. this.state = state;
  1331. }
  1332. getExpressId( geometry, faceIndex ) {
  1333. if ( ! geometry.index )
  1334. return;
  1335. const geoIndex = geometry.index.array;
  1336. return geometry.attributes[ IdAttrName ].getX( geoIndex[ 3 * faceIndex ] );
  1337. }
  1338. getItemProperties( modelID, id, recursive = false ) {
  1339. return this.state.useJSON ?
  1340. {
  1341. ...this.state.models[ modelID ].jsonData[ id ]
  1342. } :
  1343. this.state.api.GetLine( modelID, id, recursive );
  1344. }
  1345. getAllItemsOfType( modelID, type, verbose ) {
  1346. return this.state.useJSON ?
  1347. this.getAllItemsOfTypeJSON( modelID, type, verbose ) :
  1348. this.getAllItemsOfTypeWebIfcAPI( modelID, type, verbose );
  1349. }
  1350. getPropertySets( modelID, elementID, recursive = false ) {
  1351. return this.state.useJSON ?
  1352. this.getPropertyJSON( modelID, elementID, recursive, PropsNames.psets ) :
  1353. this.getPropertyWebIfcAPI( modelID, elementID, recursive, PropsNames.psets );
  1354. }
  1355. getTypeProperties( modelID, elementID, recursive = false ) {
  1356. return this.state.useJSON ?
  1357. this.getPropertyJSON( modelID, elementID, recursive, PropsNames.type ) :
  1358. this.getPropertyWebIfcAPI( modelID, elementID, recursive, PropsNames.type );
  1359. }
  1360. getMaterialsProperties( modelID, elementID, recursive = false ) {
  1361. return this.state.useJSON ?
  1362. this.getPropertyJSON( modelID, elementID, recursive, PropsNames.materials ) :
  1363. this.getPropertyWebIfcAPI( modelID, elementID, recursive, PropsNames.materials );
  1364. }
  1365. getSpatialStructure( modelID ) {
  1366. return this.state.useJSON ?
  1367. this.getSpatialStructureJSON( modelID ) :
  1368. this.getSpatialStructureWebIfcAPI( modelID );
  1369. }
  1370. getSpatialStructureJSON( modelID ) {
  1371. const chunks = this.getSpatialTreeChunks( modelID );
  1372. const projectID = this.getAllItemsOfTypeJSON( modelID, IFCPROJECT, false )[ 0 ];
  1373. const project = this.newIfcProject( projectID );
  1374. this.getSpatialNode( modelID, project, chunks );
  1375. return {
  1376. ...project
  1377. };
  1378. }
  1379. getSpatialStructureWebIfcAPI( modelID ) {
  1380. const chunks = this.getSpatialTreeChunks( modelID );
  1381. const projectID = this.state.api.GetLineIDsWithType( modelID, IFCPROJECT ).get( 0 );
  1382. const project = this.newIfcProject( projectID );
  1383. this.getSpatialNode( modelID, project, chunks );
  1384. return project;
  1385. }
  1386. getAllItemsOfTypeJSON( modelID, type, verbose ) {
  1387. const data = this.state.models[ modelID ].jsonData;
  1388. const typeName = IfcTypesMap[ type ];
  1389. if ( ! typeName ) {
  1390. throw new Error( `Type not found: ${type}` );
  1391. }
  1392. return this.filterJSONItemsByType( data, typeName, verbose );
  1393. }
  1394. filterJSONItemsByType( data, typeName, verbose ) {
  1395. const result = [];
  1396. Object.keys( data ).forEach( key => {
  1397. const numKey = parseInt( key );
  1398. if ( data[ numKey ].type.toUpperCase() === typeName ) {
  1399. result.push( verbose ? {
  1400. ...data[ numKey ]
  1401. } : numKey );
  1402. }
  1403. } );
  1404. return result;
  1405. }
  1406. getItemsByIDJSON( modelID, ids ) {
  1407. const data = this.state.models[ modelID ].jsonData;
  1408. const result = [];
  1409. ids.forEach( id => result.push( {
  1410. ...data[ id ]
  1411. } ) );
  1412. return result;
  1413. }
  1414. getPropertyJSON( modelID, elementID, recursive = false, propName ) {
  1415. const resultIDs = this.getAllRelatedItemsOfTypeJSON( modelID, elementID, propName );
  1416. const result = this.getItemsByIDJSON( modelID, resultIDs );
  1417. if ( recursive ) {
  1418. result.forEach( result => this.getJSONReferencesRecursively( modelID, result ) );
  1419. }
  1420. return result;
  1421. }
  1422. getJSONReferencesRecursively( modelID, jsonObject ) {
  1423. if ( jsonObject == undefined )
  1424. return;
  1425. const keys = Object.keys( jsonObject );
  1426. for ( let i = 0; i < keys.length; i ++ ) {
  1427. const key = keys[ i ];
  1428. this.getJSONItem( modelID, jsonObject, key );
  1429. }
  1430. }
  1431. getJSONItem( modelID, jsonObject, key ) {
  1432. if ( Array.isArray( jsonObject[ key ] ) ) {
  1433. return this.getMultipleJSONItems( modelID, jsonObject, key );
  1434. }
  1435. if ( jsonObject[ key ] && jsonObject[ key ].type === 5 ) {
  1436. jsonObject[ key ] = this.getItemsByIDJSON( modelID, [ jsonObject[ key ].value ] )[ 0 ];
  1437. this.getJSONReferencesRecursively( modelID, jsonObject[ key ] );
  1438. }
  1439. }
  1440. getMultipleJSONItems( modelID, jsonObject, key ) {
  1441. jsonObject[ key ] = jsonObject[ key ].map( ( item ) => {
  1442. if ( item.type === 5 ) {
  1443. item = this.getItemsByIDJSON( modelID, [ item.value ] )[ 0 ];
  1444. this.getJSONReferencesRecursively( modelID, item );
  1445. }
  1446. return item;
  1447. } );
  1448. }
  1449. getPropertyWebIfcAPI( modelID, elementID, recursive = false, propName ) {
  1450. const propSetIds = this.getAllRelatedItemsOfTypeWebIfcAPI( modelID, elementID, propName );
  1451. return propSetIds.map( ( id ) => this.state.api.GetLine( modelID, id, recursive ) );
  1452. }
  1453. getAllItemsOfTypeWebIfcAPI( modelID, type, verbose ) {
  1454. const items = [];
  1455. const lines = this.state.api.GetLineIDsWithType( modelID, type );
  1456. for ( let i = 0; i < lines.size(); i ++ )
  1457. items.push( lines.get( i ) );
  1458. if ( verbose )
  1459. return items.map( ( id ) => this.state.api.GetLine( modelID, id ) );
  1460. return items;
  1461. }
  1462. newIfcProject( id ) {
  1463. return {
  1464. expressID: id,
  1465. type: 'IFCPROJECT',
  1466. children: []
  1467. };
  1468. }
  1469. getSpatialTreeChunks( modelID ) {
  1470. const treeChunks = {};
  1471. const json = this.state.useJSON;
  1472. if ( json ) {
  1473. this.getChunksJSON( modelID, treeChunks, PropsNames.aggregates );
  1474. this.getChunksJSON( modelID, treeChunks, PropsNames.spatial );
  1475. } else {
  1476. this.getChunksWebIfcAPI( modelID, treeChunks, PropsNames.aggregates );
  1477. this.getChunksWebIfcAPI( modelID, treeChunks, PropsNames.spatial );
  1478. }
  1479. return treeChunks;
  1480. }
  1481. getChunksJSON( modelID, chunks, propNames ) {
  1482. const relation = this.getAllItemsOfTypeJSON( modelID, propNames.name, true );
  1483. relation.forEach( rel => {
  1484. this.saveChunk( chunks, propNames, rel );
  1485. } );
  1486. }
  1487. getChunksWebIfcAPI( modelID, chunks, propNames ) {
  1488. const relation = this.state.api.GetLineIDsWithType( modelID, propNames.name );
  1489. for ( let i = 0; i < relation.size(); i ++ ) {
  1490. const rel = this.state.api.GetLine( modelID, relation.get( i ), false );
  1491. this.saveChunk( chunks, propNames, rel );
  1492. }
  1493. }
  1494. saveChunk( chunks, propNames, rel ) {
  1495. const relating = rel[ propNames.relating ].value;
  1496. const related = rel[ propNames.related ].map( ( r ) => r.value );
  1497. if ( chunks[ relating ] == undefined ) {
  1498. chunks[ relating ] = related;
  1499. } else {
  1500. chunks[ relating ] = chunks[ relating ].concat( related );
  1501. }
  1502. }
  1503. getSpatialNode( modelID, node, treeChunks ) {
  1504. this.getChildren( modelID, node, treeChunks, PropsNames.aggregates );
  1505. this.getChildren( modelID, node, treeChunks, PropsNames.spatial );
  1506. }
  1507. getChildren( modelID, node, treeChunks, propNames ) {
  1508. const children = treeChunks[ node.expressID ];
  1509. if ( children == undefined )
  1510. return;
  1511. const prop = propNames.key;
  1512. node[ prop ] = children.map( ( child ) => {
  1513. const node = this.newNode( modelID, child );
  1514. this.getSpatialNode( modelID, node, treeChunks );
  1515. return node;
  1516. } );
  1517. }
  1518. newNode( modelID, id ) {
  1519. const typeName = this.getNodeType( modelID, id );
  1520. return {
  1521. expressID: id,
  1522. type: typeName,
  1523. children: []
  1524. };
  1525. }
  1526. getNodeType( modelID, id ) {
  1527. if ( this.state.useJSON )
  1528. return this.state.models[ modelID ].jsonData[ id ].type;
  1529. const typeID = this.state.models[ modelID ].types[ id ];
  1530. return IfcElements[ typeID ];
  1531. }
  1532. getAllRelatedItemsOfTypeJSON( modelID, id, propNames ) {
  1533. const lines = this.getAllItemsOfTypeJSON( modelID, propNames.name, true );
  1534. const IDs = [];
  1535. lines.forEach( line => {
  1536. const isRelated = this.isRelated( id, line, propNames );
  1537. if ( isRelated )
  1538. this.getRelated( line, propNames, IDs );
  1539. } );
  1540. return IDs;
  1541. }
  1542. getAllRelatedItemsOfTypeWebIfcAPI( modelID, id, propNames ) {
  1543. const lines = this.state.api.GetLineIDsWithType( modelID, propNames.name );
  1544. const IDs = [];
  1545. for ( let i = 0; i < lines.size(); i ++ ) {
  1546. const rel = this.state.api.GetLine( modelID, lines.get( i ) );
  1547. const isRelated = this.isRelated( id, rel, propNames );
  1548. if ( isRelated )
  1549. this.getRelated( rel, propNames, IDs );
  1550. }
  1551. return IDs;
  1552. }
  1553. getRelated( rel, propNames, IDs ) {
  1554. const element = rel[ propNames.relating ];
  1555. if ( ! Array.isArray( element ) )
  1556. IDs.push( element.value );
  1557. else
  1558. element.forEach( ( ele ) => IDs.push( ele.value ) );
  1559. }
  1560. isRelated( id, rel, propNames ) {
  1561. const relatedItems = rel[ propNames.related ];
  1562. if ( Array.isArray( relatedItems ) ) {
  1563. const values = relatedItems.map( ( item ) => item.value );
  1564. return values.includes( id );
  1565. }
  1566. return relatedItems.value === id;
  1567. }
  1568. }
  1569. class TypeManager {
  1570. constructor( state ) {
  1571. this.state = state;
  1572. }
  1573. getAllTypes() {
  1574. for ( const modelID in this.state.models ) {
  1575. const types = this.state.models[ modelID ].types;
  1576. if ( Object.keys( types ).length == 0 )
  1577. this.getAllTypesOfModel( parseInt( modelID ) );
  1578. }
  1579. }
  1580. getAllTypesOfModel( modelID ) {
  1581. const elements = Object.keys( IfcElements ).map( ( e ) => parseInt( e ) );
  1582. const types = this.state.models[ modelID ].types;
  1583. elements.forEach( ( type ) => {
  1584. const lines = this.state.api.GetLineIDsWithType( modelID, type );
  1585. for ( let i = 0; i < lines.size(); i ++ )
  1586. types[ lines.get( i ) ] = type;
  1587. } );
  1588. }
  1589. }
  1590. let modelIdCounter = 0;
  1591. const nullIfcManagerErrorMessage = 'IfcManager is null!';
  1592. class IFCModel extends Mesh {
  1593. constructor() {
  1594. super( ...arguments );
  1595. this.modelID = modelIdCounter ++;
  1596. this.ifcManager = null;
  1597. this.mesh = this;
  1598. }
  1599. setIFCManager( manager ) {
  1600. this.ifcManager = manager;
  1601. }
  1602. setWasmPath( path ) {
  1603. if ( this.ifcManager === null )
  1604. throw new Error( nullIfcManagerErrorMessage );
  1605. this.ifcManager.setWasmPath( path );
  1606. }
  1607. close( scene ) {
  1608. if ( this.ifcManager === null )
  1609. throw new Error( nullIfcManagerErrorMessage );
  1610. this.ifcManager.close( this.modelID, scene );
  1611. }
  1612. getExpressId( geometry, faceIndex ) {
  1613. if ( this.ifcManager === null )
  1614. throw new Error( nullIfcManagerErrorMessage );
  1615. return this.ifcManager.getExpressId( geometry, faceIndex );
  1616. }
  1617. getAllItemsOfType( type, verbose ) {
  1618. if ( this.ifcManager === null )
  1619. throw new Error( nullIfcManagerErrorMessage );
  1620. return this.ifcManager.getAllItemsOfType( this.modelID, type, verbose );
  1621. }
  1622. getItemProperties( id, recursive = false ) {
  1623. if ( this.ifcManager === null )
  1624. throw new Error( nullIfcManagerErrorMessage );
  1625. return this.ifcManager.getItemProperties( this.modelID, id, recursive );
  1626. }
  1627. getPropertySets( id, recursive = false ) {
  1628. if ( this.ifcManager === null )
  1629. throw new Error( nullIfcManagerErrorMessage );
  1630. return this.ifcManager.getPropertySets( this.modelID, id, recursive );
  1631. }
  1632. getTypeProperties( id, recursive = false ) {
  1633. if ( this.ifcManager === null )
  1634. throw new Error( nullIfcManagerErrorMessage );
  1635. return this.ifcManager.getTypeProperties( this.modelID, id, recursive );
  1636. }
  1637. getIfcType( id ) {
  1638. if ( this.ifcManager === null )
  1639. throw new Error( nullIfcManagerErrorMessage );
  1640. return this.ifcManager.getIfcType( this.modelID, id );
  1641. }
  1642. getSpatialStructure() {
  1643. if ( this.ifcManager === null )
  1644. throw new Error( nullIfcManagerErrorMessage );
  1645. return this.ifcManager.getSpatialStructure( this.modelID );
  1646. }
  1647. getSubset( material ) {
  1648. if ( this.ifcManager === null )
  1649. throw new Error( nullIfcManagerErrorMessage );
  1650. return this.ifcManager.getSubset( this.modelID, material );
  1651. }
  1652. removeSubset( parent, material ) {
  1653. if ( this.ifcManager === null )
  1654. throw new Error( nullIfcManagerErrorMessage );
  1655. this.ifcManager.removeSubset( this.modelID, parent, material );
  1656. }
  1657. createSubset( config ) {
  1658. if ( this.ifcManager === null )
  1659. throw new Error( nullIfcManagerErrorMessage );
  1660. const modelConfig = {
  1661. ...config,
  1662. modelID: this.modelID
  1663. };
  1664. return this.ifcManager.createSubset( modelConfig );
  1665. }
  1666. hideItems( ids ) {
  1667. if ( this.ifcManager === null )
  1668. throw new Error( nullIfcManagerErrorMessage );
  1669. this.ifcManager.hideItems( this.modelID, ids );
  1670. }
  1671. hideAllItems() {
  1672. if ( this.ifcManager === null )
  1673. throw new Error( nullIfcManagerErrorMessage );
  1674. this.ifcManager.hideAllItems( this.modelID );
  1675. }
  1676. showItems( ids ) {
  1677. if ( this.ifcManager === null )
  1678. throw new Error( nullIfcManagerErrorMessage );
  1679. this.ifcManager.showItems( this.modelID, ids );
  1680. }
  1681. showAllItems() {
  1682. if ( this.ifcManager === null )
  1683. throw new Error( nullIfcManagerErrorMessage );
  1684. this.ifcManager.showAllItems( this.modelID );
  1685. }
  1686. }
  1687. class BvhManager {
  1688. initializeMeshBVH( computeBoundsTree, disposeBoundsTree, acceleratedRaycast ) {
  1689. this.computeBoundsTree = computeBoundsTree;
  1690. this.disposeBoundsTree = disposeBoundsTree;
  1691. this.acceleratedRaycast = acceleratedRaycast;
  1692. this.setupThreeMeshBVH();
  1693. }
  1694. applyThreeMeshBVH( geometry ) {
  1695. if ( this.computeBoundsTree )
  1696. geometry.computeBoundsTree();
  1697. }
  1698. setupThreeMeshBVH() {
  1699. if ( ! this.computeBoundsTree || ! this.disposeBoundsTree || ! this.acceleratedRaycast )
  1700. return;
  1701. BufferGeometry.prototype.computeBoundsTree = this.computeBoundsTree;
  1702. BufferGeometry.prototype.disposeBoundsTree = this.disposeBoundsTree;
  1703. Mesh.prototype.raycast = this.acceleratedRaycast;
  1704. }
  1705. }
  1706. class ItemsHider {
  1707. constructor( state ) {
  1708. this.modelCoordinates = {};
  1709. this.expressIDCoordinatesMap = {};
  1710. this.state = state;
  1711. }
  1712. processCoordinates( modelID ) {
  1713. const attributes = this.getAttributes( modelID );
  1714. const ids = Array.from( attributes.expressID.array );
  1715. this.expressIDCoordinatesMap[ modelID ] = {};
  1716. for ( let i = 0; i < ids.length; i ++ ) {
  1717. if ( ! this.expressIDCoordinatesMap[ modelID ][ ids[ i ] ] ) {
  1718. this.expressIDCoordinatesMap[ modelID ][ ids[ i ] ] = [];
  1719. }
  1720. const current = this.expressIDCoordinatesMap[ modelID ];
  1721. current[ ids[ i ] ].push( 3 * i );
  1722. }
  1723. this.initializeCoordinates( modelID );
  1724. }
  1725. hideItems( modelID, ids ) {
  1726. this.editCoordinates( modelID, ids, true );
  1727. }
  1728. showItems( modelID, ids ) {
  1729. this.editCoordinates( modelID, ids, false );
  1730. }
  1731. editCoordinates( modelID, ids, hide ) {
  1732. const current = this.expressIDCoordinatesMap[ modelID ];
  1733. const indices = [];
  1734. ids.forEach( ( id ) => {
  1735. if ( current[ id ] )
  1736. indices.push( ...current[ id ] );
  1737. } );
  1738. const coords = this.getCoordinates( modelID );
  1739. const initial = this.modelCoordinates[ modelID ];
  1740. if ( hide )
  1741. indices.forEach( i => coords.set( [ 0, 0, 0 ], i ) );
  1742. else
  1743. indices.forEach( i => coords.set( [ initial[ i ], initial[ i + 1 ], initial[ i + 2 ] ], i ) );
  1744. this.getAttributes( modelID ).position.needsUpdate = true;
  1745. }
  1746. showAllItems( modelID ) {
  1747. if ( this.modelCoordinates[ modelID ] ) {
  1748. this.resetCoordinates( modelID );
  1749. this.getAttributes( modelID ).position.needsUpdate = true;
  1750. }
  1751. }
  1752. hideAllItems( modelID ) {
  1753. this.getCoordinates( modelID ).fill( 0 );
  1754. this.getAttributes( modelID ).position.needsUpdate = true;
  1755. }
  1756. initializeCoordinates( modelID ) {
  1757. const coordinates = this.getCoordinates( modelID );
  1758. if ( ! this.modelCoordinates[ modelID ] ) {
  1759. this.modelCoordinates[ modelID ] = new Float32Array( coordinates );
  1760. }
  1761. }
  1762. resetCoordinates( modelID ) {
  1763. const initial = this.modelCoordinates[ modelID ];
  1764. this.getCoordinates( modelID ).set( initial );
  1765. }
  1766. getCoordinates( modelID ) {
  1767. return this.getAttributes( modelID ).position.array;
  1768. }
  1769. getAttributes( modelID ) {
  1770. return this.state.models[ modelID ].mesh.geometry.attributes;
  1771. }
  1772. }
  1773. class IFCManager {
  1774. constructor() {
  1775. this.state = {
  1776. models: [],
  1777. api: new IfcAPI(),
  1778. useJSON: false
  1779. };
  1780. this.BVH = new BvhManager();
  1781. this.parser = new IFCParser( this.state, this.BVH );
  1782. this.subsets = new SubsetManager( this.state, this.BVH );
  1783. this.properties = new PropertyManager( this.state );
  1784. this.types = new TypeManager( this.state );
  1785. this.hider = new ItemsHider( this.state );
  1786. }
  1787. async parse( buffer ) {
  1788. const mesh = await this.parser.parse( buffer );
  1789. this.state.useJSON ? this.disposeMemory() : this.types.getAllTypes();
  1790. this.hider.processCoordinates( mesh.modelID );
  1791. const model = new IFCModel( mesh.geometry, mesh.material );
  1792. model.setIFCManager( this );
  1793. return model;
  1794. }
  1795. setWasmPath( path ) {
  1796. this.state.api.SetWasmPath( path );
  1797. }
  1798. applyWebIfcConfig( settings ) {
  1799. this.state.webIfcSettings = settings;
  1800. }
  1801. useJSONData( useJSON = true ) {
  1802. this.state.useJSON = useJSON;
  1803. this.disposeMemory();
  1804. }
  1805. addModelJSONData( modelID, data ) {
  1806. const model = this.state.models[ modelID ];
  1807. if ( model ) {
  1808. model.jsonData = data;
  1809. }
  1810. }
  1811. disposeMemory() {
  1812. this.state.api = null;
  1813. this.state.api = new IfcAPI();
  1814. }
  1815. setupThreeMeshBVH( computeBoundsTree, disposeBoundsTree, acceleratedRaycast ) {
  1816. this.BVH.initializeMeshBVH( computeBoundsTree, disposeBoundsTree, acceleratedRaycast );
  1817. }
  1818. close( modelID, scene ) {
  1819. this.state.api.CloseModel( modelID );
  1820. if ( scene ) {
  1821. scene.remove( this.state.models[ modelID ].mesh );
  1822. }
  1823. delete this.state.models[ modelID ];
  1824. }
  1825. getExpressId( geometry, faceIndex ) {
  1826. return this.properties.getExpressId( geometry, faceIndex );
  1827. }
  1828. getAllItemsOfType( modelID, type, verbose ) {
  1829. return this.properties.getAllItemsOfType( modelID, type, verbose );
  1830. }
  1831. getItemProperties( modelID, id, recursive = false ) {
  1832. return this.properties.getItemProperties( modelID, id, recursive );
  1833. }
  1834. getPropertySets( modelID, id, recursive = false ) {
  1835. return this.properties.getPropertySets( modelID, id, recursive );
  1836. }
  1837. getTypeProperties( modelID, id, recursive = false ) {
  1838. return this.properties.getTypeProperties( modelID, id, recursive );
  1839. }
  1840. getMaterialsProperties( modelID, id, recursive = false ) {
  1841. return this.properties.getMaterialsProperties( modelID, id, recursive );
  1842. }
  1843. getIfcType( modelID, id ) {
  1844. const typeID = this.state.models[ modelID ].types[ id ];
  1845. return IfcElements[ typeID ];
  1846. }
  1847. getSpatialStructure( modelID ) {
  1848. return this.properties.getSpatialStructure( modelID );
  1849. }
  1850. getSubset( modelID, material ) {
  1851. return this.subsets.getSubset( modelID, material );
  1852. }
  1853. removeSubset( modelID, parent, material ) {
  1854. this.subsets.removeSubset( modelID, parent, material );
  1855. }
  1856. createSubset( config ) {
  1857. return this.subsets.createSubset( config );
  1858. }
  1859. hideItems( modelID, ids ) {
  1860. this.hider.hideItems( modelID, ids );
  1861. }
  1862. hideAllItems( modelID ) {
  1863. this.hider.hideAllItems( modelID );
  1864. }
  1865. showItems( modelID, ids ) {
  1866. this.hider.showItems( modelID, ids );
  1867. }
  1868. showAllItems( modelID ) {
  1869. this.hider.showAllItems( modelID );
  1870. }
  1871. }
  1872. class IFCLoader extends Loader {
  1873. constructor( manager ) {
  1874. super( manager );
  1875. this.ifcManager = new IFCManager();
  1876. }
  1877. load( url, onLoad, onProgress, onError ) {
  1878. const scope = this;
  1879. const loader = new FileLoader( scope.manager );
  1880. loader.setPath( scope.path );
  1881. loader.setResponseType( 'arraybuffer' );
  1882. loader.setRequestHeader( scope.requestHeader );
  1883. loader.setWithCredentials( scope.withCredentials );
  1884. loader.load( url, async function ( buffer ) {
  1885. try {
  1886. if ( typeof buffer == 'string' ) {
  1887. throw new Error( 'IFC files must be given as a buffer!' );
  1888. }
  1889. onLoad( await scope.parse( buffer ) );
  1890. } catch ( e ) {
  1891. if ( onError ) {
  1892. onError( e );
  1893. } else {
  1894. console.error( e );
  1895. }
  1896. scope.manager.itemError( url );
  1897. }
  1898. }, onProgress, onError );
  1899. }
  1900. parse( buffer ) {
  1901. return this.ifcManager.parse( buffer );
  1902. }
  1903. }
  1904. export { IFCLoader };
  1905. //# sourceMappingURL=IFCLoader.js.map