BoundingBox
All  1  2-3

Previous
Next
 From:  Michael Gibson
7881.2 In reply to 7881.1 
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Barry-H
7881.3 In reply to 7881.2 
Hi Michael.
thanks for answering so quickly. It's the first option
I want which is to work with a tight bounding box.
I will try the code you gave me.
Many thanks
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-3