Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cyclic containment hierarchy found in metamodel - will flatten the hierarchy and insert fake 'Model' root #94

Open
p4535992 opened this issue Oct 7, 2021 · 4 comments

Comments

@p4535992
Copy link

p4535992 commented Oct 7, 2021

Hi I have converted an IFC to XKT and I get this errors when loading:

[ERROR] [Scene 1]: Cyclic containment hierarchy found in metamodel - will flatten the hierarchy and insert fake 'Model' root

HTTP GET TO XKT

xeokit-bim-viewer.es.js:1 [xeokit plugin TreeViewPlugin]: Failed to build storeys hierarchy for model 'design' - perhaps this model is not an IFC model?

here a screenshot on the browser:

img

I can't understand the error I am attaching the original ifc file and a zip file containing the project structure "index.json of the project" + "Models Folder" + "XKT Model".

Maybe is the XKT not converted in the right way ?

To overcome the limitation of github with the upload, the files have been renamed with the extension ".txt".

project.zip.txt
AC20-FZK-Haus.ifc.txt

@pierluigi-iezzi
Copy link

Did you find a fix for that problem? I have the same issue with the XKT file

@p4535992
Copy link
Author

p4535992 commented Feb 1, 2022

sadly no

@ptorrent
Copy link

same issue there, any news ?

@p4535992
Copy link
Author

after a while i choose to use the docker image, here the shell you can use for test your ifc

#!/bin/bash

dockerimagename="bimspot/xeokit-converter"
# This is the ifc file
src_file="$1"
# This is the xkt file
target_file="$2"
target_file_name=$(basename $target_file)

echo "Starting $dockerimagename docker image"

containername=$(docker run --entrypoint /bin/sh -itd $dockerimagename)

echo "Started container with id $containername"
echo "Copying ifc file to container"

docker exec $containername bash -c 'cd /tmp ; mkdir working_dir'
docker cp $src_file $containername:/tmp/working_dir

echo "Updating tools if outdated"

docker exec $containername bash -c 'gltfoutput=$(gltf2xkt) ; if [[ ${gltfoutput} != *"-m"* ]];then
	echo "Gltf library requires an update, Updating";
	npm update -g @xeokit/xeokit-gltf-to-xkt;
fi'

echo "Starting ifc to xkt conversion"

docker exec $containername bash -c 'cd /tmp/working_dir; ls ; IfcConvert -v -y --use-element-guids '${src_file##*/}' file.dae --exclude=entities IfcOpeningElement ; ls ; COLLADA2GLTF -v --materialsCommon -i file.dae -o file.gltf ; ls; xeokit-metadata '${src_file##*/}' file.json ;  gltf2xkt -s file.gltf -m file.json -o '$target_file_name''

echo "Conversion complete. Copying container file to local dir"

docker cp $containername:/tmp/working_dir/$target_file_name $target_file

echo "Stopping and removing docker container"

docker stop $containername
docker rm $containername

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants