Defines a root topological shape that can be owned by B-Rep representation. More...
#include <cadex/ModelData_Body.hxx>
Public Member Functions | |
ModelData_BodyType | BodyType () const |
Returns a body type. | |
bool | Append (const ModelData_Shape &theShape) |
Adds a shape to the body. | |
![]() | |
ModelData_Shape () | |
Constructor. | |
ModelData_Shape (const ModelData_Shape &theOther) | |
Constructor. | |
ModelData_Shape (ModelData_Shape &&theOther) | |
Move constructor. | |
~ModelData_Shape () | |
Destructor. | |
ModelData_Shape & | operator= (const ModelData_Shape &theOther) |
Assignment operator. | |
ModelData_Shape & | operator= (ModelData_Shape &&theOther) |
Move assignment operator. | |
operator const TopoDS_Shape & () const | |
Casts this object to TopoDS_Shape. | |
ModelData_ShapeType | Type () const |
Returns a shape type. | |
ModelData_ShapeOrientation | Orientation () const |
Returns orientation flag. | |
ModelData_Shape | Reversed () const |
Returns a shape that shares the same geometry and subshape graph but has opposite orientation. | |
ModelData_Shape | Oriented (ModelData_ShapeOrientation theOrientation) const |
Returns a shape that shares the same geometry and subshape graph and has specified orientation. | |
void | Nullify () |
Nullifies the object. | |
bool | IsNull () const |
Returns true if the object has not been initialized yet. | |
operator bool () const | |
Returns true if the object is not null. | |
bool | IsEqual (const ModelData_Shape &theOther) const |
Returns true if the shape shares the same geometry and subshape graph, and has equal orientation. | |
bool | IsSame (const ModelData_Shape &theOther) const |
Returns true if the shape shares the same geometry and subshape graph. | |
internal::ModelData_ShapeImpl * | Impl () const |
Returns internal implementation object. | |
Static Public Member Functions | |
static ModelData_Body | Create (const ModelData_Shape &theShape) |
Creates a body from an arbitrary shape. | |
static const ModelData_Body & | Cast (const ModelData_Shape &theShape) |
static ModelData_Body & | Cast (ModelData_Shape &theShape) |
Additional Inherited Members | |
![]() | |
ModelData_Shape (const TopoDS_Shape &theOther, bool) | |
Constructor. | |
ModelData_Shape (internal::ModelData_ShapeImpl *theImpl) | |
Constructor. | |
![]() | |
internal::Base_Handle | myImpl |
Internal implementation object. | |
Defines a root topological shape that can be owned by B-Rep representation.
CAD Exchanger supports body types (defined by the ModelData_BodyType enumeration) defined in the following table:
![]()
Solid body | solid - contains a single solid |
![]()
Sheet body | sheet - contains a single face or a single shell or a flat group of face(s) and/or shell(s) |
![]()
Wireframe body | wireframe - contains a single edge or a single wire or a flat group of edge(s) and/or wire(s) |
![]()
Acorn body | acorn - contains a single vertex |
The body type is returned by BodyType().
Depending on its type, a body can hold either:
Thus, this definition is close to Parasolid definition, except that Parasolid allows to have multiple solids in a solid body. CAD Exchanger does not allow this.
A body can is created with the help of the static Create() method from any arbitrary topological shape (ModelData_Shape). A solid that allows multiple shapes (e.g. sheet body can contain several faces and/or shells) can be expanded with the Append() method.
Children can be retrived using ModelData_Shape::Iterator.
bool cadex::ModelData_Body::Append | ( | const ModelData_Shape & | theShape | ) |
Adds a shape to the body.
Returns true if the shape has been successfully added and false otherwise. Result depends upon the existing body contents and the shape being added. The check are applied in the following order:
ModelData_BodyType cadex::ModelData_Body::BodyType | ( | ) | const |
Returns a body type.
|
static |
Creates a body from an arbitrary shape.
If theShape is already a body then just returns it. If theShape is a body list then returns its first body or empty, if the list is empty. Otherwise creates a body wrapping theShape.