MTK allows to compute some key properties of a 3D model:
- bounding box;
- surface area;
- volume;
- centroid (center of mass).
Each property can be computed either for an entire ModelData::Model or for any ModelData::Assembly , ModelData::Part , and ModelData::Instance .
Bounding Box
Bounding box is the smallest axis-aligned box that fully contains a 3D model (or its component).
The following example demonstrates computation of a shape bounding box:
Measurements::BoundingBox::Compute (aShape, aTrsf, aBox);
Defines a 3D axis-aligned bounding box.
Definition Box.hxx:30
Base class of topological shapes.
Definition Shape.hxx:38
Contains classes, namespaces, enums, types, and global functions related to Manufacturing Toolkit.
Definition LicenseManager_LicenseError.hxx:30
In addition to traditional bounding boxes, Manufacturing Toolkit also allows to compute minimum bounding box which is not necessarily axis-aligned:
static void ComputeMin(const ModelData::Shape &theShape, ModelData::Box &theBox, Geom::Transformation &theOutTransformation)
Definition BoundingBox.cxx:486
Surface Area
The following example demonstrates computation of a shape surface area:
static double Compute(const ModelData::Model &theModel)
Computes the surface area of the model.
Definition SurfaceArea.cxx:57
Volume
The following example demonstrates computation of a shape volume:
static double Compute(const ModelData::Model &theModel)
Computes the volume of the model.
Definition Volume.cxx:691
Centroid
The following example demonstrates computation of a shape centroid (center of mass) :
Defines a 3D point.
Definition Point.hxx:35
static Geom::Point ComputeCentroid(const ModelData::Model &theModel)
Computes the center of mass of the model.
Definition ValidationProperties.cxx:50
Distance
The following example demonstrates the computation of the distance between two shapes:
static double Compute(const ModelData::Shape &theFirstShape, const ModelData::Shape &theSecondShape)
Computes the distance between theFirstShape and theSecondShape.
Definition Distance.cxx:39
Angle
The following example demonstrates the computation of the angle between two planar faces:
static double Compute(const ModelData::Face &theFirstFace, const ModelData::Face &theSecondFace)
Computes the angle between two faces.
Definition Angle.cxx:55
Defines a topological face.
Definition Face.hxx:33