CAD Exchanger SDK
cadex::ModelData_BodyList Class Reference

Defines a list of bodies. More...

Inheritance diagram for cadex::ModelData_BodyList:
cadex::ModelData_Shape

Public Types

typedef size_t SizeType
 

Public Member Functions

 ModelData_BodyList ()
 Constructor. More...
 
void Append (const ModelData_Body &theChild)
 
const TopoDS_Shape & ToOCC () const
 
 operator const TopoDS_Compound & () const
 
SizeType Size () const
 
const ModelData_BodyFirst () const
 
const ModelData_BodyElement (SizeType theIndex) const
 
const ModelData_Bodyoperator[] (SizeType theIndex) const
 
- Public Member Functions inherited from cadex::ModelData_Shape
 ModelData_Shape ()
 Constructor.
 
 ModelData_Shape (const ModelData_Shape &theOther)
 Constructor.
 
 ModelData_Shape (ModelData_Shape &&theOther)
 Move constructor.
 
 ~ModelData_Shape ()
 Destructor.
 
ModelData_Shapeoperator= (const ModelData_Shape &theOther)
 Assignment operator.
 
ModelData_Shapeoperator= (ModelData_Shape &&theOther)
 Move assignment operator.
 
 operator const TopoDS_Shape & () const
 Casts this object to TopoDS_Shape. More...
 
ModelData_ShapeType Type () const
 Returns a shape type. More...
 
ModelData_ShapeOrientation Orientation () const
 Returns orientation flag. More...
 
ModelData_Shape Reversed () const
 Returns a shape that shares the same geometry and subshape graph but has opposite orientation. More...
 
ModelData_Shape Oriented (ModelData_ShapeOrientation theOrientation) const
 Returns a shape that shares the same geometry and subshape graph and has specified orientation. More...
 
void Nullify ()
 Nullifies the object. More...
 
bool IsNull () const
 Returns true if the object has not been initialized yet.
 
 operator bool () const
 Returns true if the object is not null. More...
 
bool IsEqual (const ModelData_Shape &theOther) const
 Returns true if the shape shares the same geometry and subshape graph, and has equal orientation. More...
 
bool IsSame (const ModelData_Shape &theOther) const
 Returns true if the shape shares the same geometry and subshape graph. More...
 
internal::ModelData_ShapeImpl * Impl () const
 Returns internal implementation object.
 

Static Public Member Functions

static const ModelData_BodyListCast (const ModelData_Shape &theShape)
 
static ModelData_BodyListCast (ModelData_Shape &theShape)
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_Shape
 ModelData_Shape (const TopoDS_Shape &theOther, bool)
 Constructor.
 
 ModelData_Shape (internal::ModelData_ShapeImpl *theImpl)
 Constructor.
 
- Protected Attributes inherited from cadex::ModelData_Shape
internal::Base_Handle myImpl
 Internal implementation object.
 

Detailed Description

Defines a list of bodies.

The bodies can be added using Append() and retrieved using Element() or operator[]. The number of added bodies can be retrieved by Size().

Body list is used by ModelData_BRepRepresentation to hold root bodies.

Examples:
meshing/main.cxx, and modelexplorer/main.cxx.

Constructor & Destructor Documentation

◆ ModelData_BodyList()

cadex::ModelData_BodyList::ModelData_BodyList ( )

Constructor.

Creates an empty list.

Member Function Documentation

◆ Element()

const ModelData_Body & cadex::ModelData_BodyList::Element ( SizeType  theIndex) const

theIndex must be in the range [0, Size()-1]. Otherwise the result is undefined.