xeokit / xeokit-convert

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

Create -r option for convert2xkt to rotate LAS & CityJSON about X #8

Open xeolabs opened 2 years ago

xeolabs commented 2 years ago

Create new convert2xkt option r, to rotate LAS and CityJSON models 90 degrees about the X-axis as they are converted.

Usage

node convert2xkt -h

Usage: convert2xkt [options]

Options:

    -v, --version           output the version number
    -s, --source [file]     path to source file
    -f, --format [string]   source file format (optional); supported formats are gltf, ifc, laz, las, stl and cityjson
    -m, --metamodel [file]  path to source metamodel JSON file (optional)
    -i, --include [types]   only convert these types (optional)
    -x, --exclude [types]   never convert these types (optional)
    -r, --rotatex           rotate model 90 degrees about X axis (for las and cityjson)
    -o, --output [file]     path to target .xkt file; creates directories on path automatically if not existing
    -l, --log               enable logging
    -h, --help              output usage information

XKT version: 9

To rotate a sample model:

node convert2xkt -s assets/models/laz/indoor.0.1.laz -o indoor.0.1.laz.xkt -r -l
DB-EC-Hamburg-BIM commented 2 years ago

Why was this option removed for CityJSON? In the actual release beta8 in the function parseCityJSONIntoXKTModel is missing the parameter rotateX in file convert2xkt.cjs.js. function parseCityJSONIntoXKTModel({data, xktModel, stats = {}, log}) should be function parseCityJSONIntoXKTModel({data, xktModel, stats = {}, rotateX, log})