How do i get bounding box of a surface
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found this "PowerMill Parameter Reference" but i cant get to work.
"$lims = limits(entity('model', 'my model').hierarchy.components)"
I have a list of selected surface names that I like the XYZ limits of.
*******************************************************************************************
array limits( entity ref )
array limits( string type, string name )
array limits( object object )
array limits( data data )
The entity parameter must be either an nc program, toolpath, boundary, pattern, featureset or model.
The object parameter must be a block map.
The data parameter must contain a ModelCompList or ModelCompSet. Otherwise an error will be returned.
The Toolpaths must be calculated before calling this function. Otherwise, the Toolpath / NC Program limits will be invalid / will not be accounted.
Returns an array of 6 real values that hold the XYZ limits of the entity. The returned array can be used to initialize or assign to another array or list.
The limits are computed with regards to the active workplane. If it's required to be computed with regards to a specific workplane, use the limits_workplane_rel() function.
Example:
REAL ARRAY lims[] = limits(Boundary)
$lims = limits('model','my model')
$lims = limits(Toolpath.block)
$lims = limits(entity('model', 'my model').hierarchy.components)
*what do i add here, to get values for one surface ?
NOTE that the returned values in the array are as follows
array[0] = Minimum X value.
array[1] = Maximum X value.
array[2] = Minimum Y value.
array[3] = Maximum Y value.
array[4] = Minimum Z value.
array[5] = Maximum Z value.