Computes bounding box of the objects. More...

## Static Public Member Functions

static void Compute (const ModelData_Model &theSG, ModelData_Box &theBox, bool theForcedFlush=true)
Returns a bounding box of a scene graph.

static void Compute (const ModelData_SceneGraphElement &theElement, ModelData_Box &theBox, bool theForcedFlush=true)
Returns a bounding box of a scene graph element. More...

static void Compute (const ModelData_Representation &theRep, ModelData_Box &theBox)
Returns a bounding box of a representation. More...

static void Compute (const ModelData_Representation &theRep, const ModelData_Transformation &theTransformation, ModelData_Box &theBox)
Returns a bounding box of a representation. More...

static void Compute (const ModelData_Shape &theShape, const ModelData_Transformation &theTransformation, ModelData_Box &theBox)
Returns a bounding box of a shape. More...

static void Compute (const ModelData_Face &theFace, ModelData_Box2d &theBox)
Returns a bounding box of a face in 2D parametric space of a face surface. More...

static void ComputeMin (const ModelData_Part &thePart, ModelData_Box &theBox, ModelData_Transformation &theOutTransformation, bool theForcedFlush=true)
Returns a minimum bounding box of a representation.

static void ComputeMin (const ModelData_Representation &theRep, ModelData_Box &theBox, ModelData_Transformation &theOutTransformation)
Returns a minimum bounding box of a representation. More...

static void ComputeMin (const ModelData_Shape &theShape, ModelData_Box &theBox, ModelData_Transformation &theOutTransformation)
Returns a minimum bounding box of a shape. More...

static void ComputeMin (const ModelData_Shape &theShape, const ModelData_Transformation &theTransformation, ModelData_Box &theBox, ModelData_Transformation &theOutTransformation)
Returns a minimum bounding box of a shape. More...

## Detailed Description

Computes bounding box of the objects.

Bounding box can be computed for the following types of objects:

A bounding box of a model is accumulation of bounding boxes of its roots.

A bounding box of an assembly is a cumulative bounding box of its children taking into account their transformation matrices.

A part's bounding box is accumulation of bounding boxes of available part's representations. If any representation is constructed with the provider(s) which has not been flushed yet then bounding box of such representation will be computed only if theForcedFlush is set to true. If theForcedFlush is set to false and the representation has not been constructed yet, the representation is ignored and its bounding box is not computed.

A bounding box of a B-Rep representation's or a B-Rep shape's can be different depending on whether the shape contains internal trianglation, which appears when invoking visualization mesher. If such triangulation is available then the bounding box is more accurate and close to exact geometry. Otherwise the bounding box can be larger than real geometry. Thus, it might be helpful to compute bounding box after invoking the visualization mesher. Mesh granularity also impacts on bounding box computations, so depending on the mesher parameters results can be slightly different.

Note
In CAD Exchanger GUI, bounding boxes for B-Reps are computed only after displaying these B-Reps, so visualization mesher has already been applied to them by that moment.
ModelData_BoundingBoxProvider.

## ◆ Compute() [1/5]

 void cadex::ModelAlgo_BoundingBox::Compute ( const ModelData_Face & theFace, ModelData_Box2d & theBox )
static

Returns a bounding box of a face in 2D parametric space of a face surface.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Populates theBox using p-curves of face edges.

## ◆ Compute() [2/5]

 void cadex::ModelAlgo_BoundingBox::Compute ( const ModelData_Representation & theRep, const ModelData_Transformation & theTransformation, ModelData_Box & theBox )
static

Returns a bounding box of a representation.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Computes bounding box of the representation theRep taking into account transformation theTransformation which is an accumulated transformation of an owning part.

## ◆ Compute() [3/5]

 void cadex::ModelAlgo_BoundingBox::Compute ( const ModelData_Representation & theRep, ModelData_Box & theBox )
static

Returns a bounding box of a representation.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## ◆ Compute() [4/5]

 void cadex::ModelAlgo_BoundingBox::Compute ( const ModelData_SceneGraphElement & theElement, ModelData_Box & theBox, bool theForcedFlush = true )
static

Returns a bounding box of a scene graph element.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## ◆ Compute() [5/5]

 void cadex::ModelAlgo_BoundingBox::Compute ( const ModelData_Shape & theShape, const ModelData_Transformation & theTransformation, ModelData_Box & theBox )
static

Returns a bounding box of a shape.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## ◆ ComputeMin() [1/3]

 void cadex::ModelAlgo_BoundingBox::ComputeMin ( const ModelData_Representation & theRep, ModelData_Box & theBox, ModelData_Transformation & theOutTransformation )
static

Returns a minimum bounding box of a representation.

Note
The computation of minimum boxes is currently in feature preview state. Its API may change, so binary compatibility can be broken.

## ◆ ComputeMin() [2/3]

 void cadex::ModelAlgo_BoundingBox::ComputeMin ( const ModelData_Shape & theShape, const ModelData_Transformation & theTransformation, ModelData_Box & theBox, ModelData_Transformation & theOutTransformation )
static

Returns a minimum bounding box of a shape.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

theTransformation specifies the input transformation that must be applied to theShape before computing its bounding box.

Note
The computation of minimum boxes is currently in feature preview state. Its API may change, so binary compatibility can be broken.

## ◆ ComputeMin() [3/3]

 void cadex::ModelAlgo_BoundingBox::ComputeMin ( const ModelData_Shape & theShape, ModelData_Box & theBox, ModelData_Transformation & theOutTransformation )
static

Returns a minimum bounding box of a shape.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

theTransformation specifies the input transformation that must be applied to theShape before computing its bounding box.

Note
The computation of minimum boxes is currently in feature preview state. Its API may change, so binary compatibility can be broken.