Hi,
I have come across a problem with the boundingbox info node.
The model selected Z dimension is showing twice its actual size.
However Moi shows the correct sizes in the top right display.
this discrepancy only happens with this particular model so far.
Can someone check the code below for possible answers.
Unfortunately I cannot post the model.
The photo shows the issue.
Thanks
Barry
function bBox()
{
this.addInput("In", "objectlist");
this.addOutput("x-length", "numarray");
this.addOutput("y-length", "numarray");
this.addOutput("z-length", "numarray");
this.addOutput("center", "pointarray");
this.bbox = moi.VectorMath.createBoundingBox();
}
bBox.title = "BoundingBox-Infos";
bBox.desc = "BoundingBox-Infos";
bBox.prototype.onExecute = function ()
{
var inObj = this.getInputData(0, moi.geometryDatabase.createObjectList());
// this.bbox.add[i]BoundingBox(inObj.getBoundingBox());
this.bbox = inObj.getHighAccuracyBoundingBox();
var x=[this.bbox.xLength],y=[this.bbox.yLength],z=[this.bbox.zLength];
this.outputs[0].label = x[0].toFixed(2);
this.setOutputData(0, x);
this.outputs[1].label = y[0].toFixed(2);
this.setOutputData(1, y);
this.outputs[2].label = z[0].toFixed(2);
this.setOutputData(2, z);
var center = new pointArray();
center.pushPoint(this.bbox.center);
this.setOutputData(3, center);
}
bBox.prototype.onPropertyChange = function ()
.png)