I want to obtain the mesh from the object I obtain from calling getRenderProxy
method in node.js. This is my implementation, where I pass an ObjectID from the model tree:
function getMeshByDbID(dbID) {
var instanceTree = getInstanceTree();
var mesh = undefined;
instanceTree.enumNodeFragments(
dbID,
function (fragId) {
mesh = window.NOP_VIEWER.impl.getRenderProxy(
window.NOP_VIEWER.model,
fragId
);
},
true
);
return mesh;
}
I get an object, as shown below.
But whenever I try to extract geometry(by calling mesh.geometry) from this object, I get undefined
. The structure of geometry object within the above object is as follows:
I want to get the mesh, specifically, the ib
and vb
arrays in the figure above for performing calculations. Any help is appreciated.
CodePudding user response:
Your approach looks good. You can take a look at this article where Philippe described how to do Boolean operations in the Forge Viewer.