xeokit / xeokit-convert

Convert various AEC model formats for efficient viewing in the browser with xeokit.
https://xeokit.github.io/xeokit-convert/docs/
Other
49 stars 52 forks source link

Unsupported value for params.primitiveType #142

Closed kushal154 closed 4 months ago

kushal154 commented 5 months ago

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 100 -c linux/bin/ifc2gltfcxconverter.json

  __ IFC to GLTF converter __ version: 3.1 ____________
  Loading input config file: linux/bin/ifc2gltfcxconverter.json
  Loading file "model.ifc": 100%
  Converting IFC geometry: 100%
  Exporting to gltf: 100%
  Accessors: 44356, reused: 201541, compression: 81%
  Exporting to gltf: 100%
  Accessors: 40264, reused: 193040, compression: 82%
  Exporting to gltf: 100%
  Accessors: 14076, reused: 52795, compression: 78%
  Exporting metadata: 100%done in 60 minutes, 17 seconds

Following files are created: model.glb - 105M model_1.glb - 104M model_2.glb - 34M metadata.json - 22M model.glb.manifest.json

Step 2: Used xeokit-convert (version v1.1.15-beta-8) to create split xkt files

Command: node xeokit-convert-1.1.15-beta-8/convert2xkt.js -n -a model.glb.manifest.json -o model.xkt.manifest.json -l

[convert2xkt] Running convert2xkt v1.1.15-beta-8...
[convert2xkt] Using configs in ./convert2xkt.conf.js
[convert2xkt] Converting glTF files in manifest model.glb.manifest.json...
[convert2xkt] Reading input file: model.glb
[convert2xkt] Input file size: 109189.61 kB
[convert2xkt] Not embedding metadata in XKT
TextEncoder constructor called with encoding label, which is ignored.
[convert2xkt] Using parser: parseGLTFIntoXKTModel
[convert2xkt] Parsing normals: disabled
[convert2xkt] Parsing textures: enabled
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Unsupported value for params.primitiveType: line-loop' - supported values are 'triangles', 'points', 'lines', 'line-strip', 'triangle-strip' and 'triangle-fan".] {
  code: 'ERR_UNHANDLED_REJECTION'
}
Node.js v20.12.2

Questions:

  1. Is there a way to reduce the size of glb file?
  2. What is this issue in step 2 and how do I resolve it?
reno184 commented 4 months ago

I have exactly the same problem with different .glb Unsupported value for params.primitiveType: line-loop

xeolabs commented 4 months ago

Fixed in https://github.com/xeokit/xeokit-convert/releases/tag/v1.1.15-beta-12