BoundingBox2D Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Transient object that represents a 2D bounding box. A 2D bounding box is a rectangle box that is parallel to the x and y axes. The box is defined by a minimum point (smallest x-y values) and maximum point (largest x-y values). This object is a wrapper for these points and serves as a way to pass bounding box information in and out of functions. It also provides some convenience function when working with the bounding box data. They are created statically using the create method of the BoundingBox2D class.

Methods

Name Description
classType Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
combine Combines this bounding box with the input bounding box. If the input bounding box extends outside this bounding box then this bounding box will be extended to encompass both of the original bounding boxes.
contains Determines if the specified point lies within the bounding box.
copy Create a copy of this bounding box.
create Creates a transient bounding box object.
expand Expand this bounding box to contain the specified point.
intersects Test if this bounding box intersects with the specified bounding box.

Properties

Name Description
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxPoint Gets and sets the maximum point of the box.
minPoint Gets and sets the minimum point of the box.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BoundingBox2D.copy, BoundingBox2D.create, ConstructionPlane.displayBounds, SurfaceEvaluator.parametricRange

Version

Introduced in version August 2014