Hi Barry, sorry it's not entirely clear to me what you're asking for there.
Do you want a way for a script to obtain the "tight bounding box" that hugs the curve rather than going around it's control points?
Or is it that you want to do the same kind of editing task as the "Edit size" menu does?
For the first one, you can get a tight bounding box on an object by calling something like this:
var bbox = obj.getBoundingBox( true /*Parameter for "Use high accuracy bounds" */ )
Then on the bounding box you can call methods like this:
var xsize = bbox.xLength;
var ysize = bbox.yLength;
var zsize = bbox.zLength;
For the edit size menu, that one interfaces through a PropertiesPanel object. If you take a look at the file EditSizeMenu.htm you can see the code that gets values from the PropertiesPanel object like this:
code:
function GetValues()
{
var pp = moi.ui.propertiesPanel;
g_hasLength = pp.hasLength;
g_hasRadius = pp.hasRadius;
g_useDiameter = pp.useDiameter;
g_length = pp.length;
g_radius = pp.radius;
g_box = pp.highAccuracyBoundingBox;
}
Hope this helps!
- Michael
|