Open kushal154 opened 2 months ago
Can someone please help here?
Hi, if you represent one of our enterprise users, please log this issue with our Jira issue tracker and we'll prioirtise.
To reproduce this issue on our end, we'll also need to borrow the IFC file you're trying to convert (which we'll not share and will discard afterwards of course).
How do I share the IFC file privately with your team to take this forward?
Please get in contact here: https://creoox.com/en/contact/
@xeolabs I have sent you details via contact form. Kindly check.
@kushal154 try the latest ifc2gltf release - there's an update there that may resolve this issue.
@xeolabs As per your and Wlod's input, I used the split option with “-s 100” to generate GLB files and then used the convert2xkt to create the XKT files. However, I now have the 3 XKT files with a combined size of approx. 750 MB and the original IFC file size is 466 MB. So instead of compression, file size has increased by 60% after conversion. I have shared the link to the IFC file with Wlod in case you want to look at it. Please note I used the latest version 3.2 of ifc2gltf.
@kushal154 while most IFC files we convert will reduce in size once converted with ifc2gltf and convert2xkt, it is still possible for the IFC to contain geometry that is defined in such a way that once triangulated by ifc2gltf the file size actually ends up larger.
An example is an IfcShapeRepresentation
, which can define a geometry using a list of 2D coordinates representing a profile that is to be swept or rotated, to generate a triangle mesh. For this geometry, the IFC contains a compact list of 2D points. Then, when converted to glTF/glb by ifc2gltf
, the profile is swept, to generate a triangle mesh for the geometry, which can require much more storage in the glTF/glb file, and in the XKT file once that's converted by convert2xkt
.
So, when an IFC contains these sort of geometries, there will often be an increase in file size when converting IFC->glTF/glb->XKT.
Fortunately, most IFC building models we encounter do not have large numbers of IfcShapeRepresentation
elements and so we do get good compression.
I will look at this file though and see what we can recommend.
@xeolabs Thank you. I shall await your thoughts and guidance as it has become a hurdle for us to move ahead.
@xeolabs Please let me know if there is any update.
@kushal154 I haven't received any Jira issue yet.
In the meantime, perhaps try a larger value for '-s', eg.
ifc2gltfcxconverter -i model.ifc -o myGLBFiles/model.glb -m myGLBFiles/model.json -s 100
@xeolabs I have raised the Jira issue XCD-73.
When I use -s as 200, it leads to "RangeError: Invalid array length" during conversion. Thus I tried with a lower value of 100.
@kushal154 OK I found the issue now, will take a look
I have a IFC with size of 650MB which I want to convert and use in XKT format.
Here is what I have done:
Step 1: Used ifc2gltfcxconverter (version 3.1) to create glb files.
Command (used default configuration json): linux/bin/ifc2gltfcxconverter -i model.ifc -o model.glb -m metadata.json -s 250 -c linux/bin/ifc2gltfcxconverter.json
Following files are created: model.glb - 220M metadata.json - 22M model.glb.manifest.json
Step 2: Used xeokit-convert (version v1.1.15-beta-8) to create the xkt file
Command: node xeokit-convert-1.1.15-beta-8/convert2xkt.js -a model.glb.manifest.json -o model.xkt.manifest.json -l
Is there a way to get the model as a single XKT file?