Hide menu
Loading...
Searching...
No Matches
cadex::Measurements::BoundingBox Class Reference

Computes bounding boxes of objects. More...

Static Public Member Functions

static void Compute (const ModelData::Model &theModel, ModelData::Box &theBox)
 
static void Compute (const ModelData::ModelElement &theElement, ModelData::Box &theBox)
 
static void Compute (const ModelData::Body &theBody, ModelData::Box &theBox)
 
static void Compute (const ModelData::Shape &theShape, const Geom::Transformation &theTransformation, ModelData::Box &theBox)
 
static void ComputeMin (const ModelData::Shape &theShape, ModelData::Box &theBox, Geom::Transformation &theOutTransformation)
 
static void ComputeMin (const ModelData::Shape &theShape, const Geom::Transformation &theTransformation, ModelData::Box &theBox, Geom::Transformation &theOutTransformation)
 
static void ComputeOptimal (const ModelData::Model &theModel, ModelData::Box &theBox, Geom::Transformation &theOutTransformation)
 Returns an optimal bounding box.
 
static void ComputeOptimal (const ModelData::Part &thePart, ModelData::Box &theBox, Geom::Transformation &theOutTransformation)
 Returns an optimal bounding box.
 
static void ComputeOptimal (const ModelData::Body &theBody, ModelData::Box &theBox, Geom::Transformation &theOutTransformation)
 Returns an optimal bounding box.
 
static void ComputeOptimal (const ModelData::Shape &theShape, ModelData::Box &theBox, Geom::Transformation &theOutTransformation)
 Returns an optimal bounding box.
 

Detailed Description

Computes bounding boxes of objects.

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

  • entire model;
  • graph element (and its subtree) - assembly, part or instance;
  • part representation;
  • B-Rep shape (ModelData::Shape);

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.

Member Function Documentation

◆ Compute() [1/3]

void cadex::Measurements::BoundingBox::Compute ( const ModelData::Body & theBody,
ModelData::Box & theBox )
static

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

◆ Compute() [2/3]

void cadex::Measurements::BoundingBox::Compute ( const ModelData::ModelElement & theElement,
ModelData::Box & theBox )
static

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

◆ Compute() [3/3]

void cadex::Measurements::BoundingBox::Compute ( const ModelData::Shape & theShape,
const Geom::Transformation & theTransformation,
ModelData::Box & theBox )
static

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

◆ ComputeMin() [1/2]

void cadex::Measurements::BoundingBox::ComputeMin ( const ModelData::Shape & theShape,
const Geom::Transformation & theTransformation,
ModelData::Box & theBox,
Geom::Transformation & theOutTransformation )
static

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() [2/2]

void cadex::Measurements::BoundingBox::ComputeMin ( const ModelData::Shape & theShape,
ModelData::Box & theBox,
Geom::Transformation & theOutTransformation )
static

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

theOutTransformation specifies the output transformation that was 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.

◆ ComputeOptimal() [1/4]

void cadex::Measurements::BoundingBox::ComputeOptimal ( const ModelData::Body & theBody,
ModelData::Box & theBox,
Geom::Transformation & theOutTransformation )
static

Returns an optimal bounding box.

theOutTransformation specifies the output transformation that was applied to theBody before computing its bounding box.

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

◆ ComputeOptimal() [2/4]

void cadex::Measurements::BoundingBox::ComputeOptimal ( const ModelData::Model & theModel,
ModelData::Box & theBox,
Geom::Transformation & theOutTransformation )
static

Returns an optimal bounding box.

theOutTransformation specifies the output transformation that was applied to theModel roots before computing its bounding box.

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

◆ ComputeOptimal() [3/4]

void cadex::Measurements::BoundingBox::ComputeOptimal ( const ModelData::Part & thePart,
ModelData::Box & theBox,
Geom::Transformation & theOutTransformation )
static

Returns an optimal bounding box.

theOutTransformation specifies the output transformation that was applied to thePart before computing its bounding box.

◆ ComputeOptimal() [4/4]

void cadex::Measurements::BoundingBox::ComputeOptimal ( const ModelData::Shape & theShape,
ModelData::Box & theBox,
Geom::Transformation & theOutTransformation )
static

Returns an optimal bounding box.

theOutTransformation specifies the output transformation that was applied to theShape before computing its bounding box.

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