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

How to get organized tree of ifc and gltf model files using layers data? #840

Closed
dishesh opened this Issue Oct 8, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@dishesh

dishesh commented Oct 8, 2018

Hi there. Its me again. I am trying to implement a tabular view some like bimviews have "layers" tab. for that I need to dig info of elements organized as layer wise structure or as per children of each layers. I know I can find for each element by using low level interface but it will be a tedious job ( I have done for accessing properties of an element, there are multiple calls to get few property values!).

So can anyone help me with this it will really be helpful.
Thanks in advance!

@rubendel

This comment has been minimized.

Show comment
Hide comment
@rubendel

rubendel Oct 8, 2018

Member

Have a look at how BIMvie.ws does this, it does so without too many calls to the BIMserver. Basically a "preload" query is used to prepopulate the JavaScript BIM Model with the objects/references that you are going to use later on. All objects/references that have been loaded this way will not have to be resolved in subsequent calls.

For example:

	// object here has been retrieved via the BimServer JavaScript API
	object.getContainedInStructure(function(struc){
		struc.getRelatingStructure(function(relatingStructure){
			console.log(relatingStructure);
		});
	});

Without preloading the model, each call to getContainedInStructure and getRelatingStructure as well would result in an HTTP call to BIMserver (and with that the latency and asynchronicity), with the right preload query this can be avoided.

glTF is not meant for this anything other than assets without semantic meaning.

Member

rubendel commented Oct 8, 2018

Have a look at how BIMvie.ws does this, it does so without too many calls to the BIMserver. Basically a "preload" query is used to prepopulate the JavaScript BIM Model with the objects/references that you are going to use later on. All objects/references that have been loaded this way will not have to be resolved in subsequent calls.

For example:

	// object here has been retrieved via the BimServer JavaScript API
	object.getContainedInStructure(function(struc){
		struc.getRelatingStructure(function(relatingStructure){
			console.log(relatingStructure);
		});
	});

Without preloading the model, each call to getContainedInStructure and getRelatingStructure as well would result in an HTTP call to BIMserver (and with that the latency and asynchronicity), with the right preload query this can be avoided.

glTF is not meant for this anything other than assets without semantic meaning.

@rubendel rubendel closed this Oct 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment