CAD Exchanger SDK
cadex::ModelData_Part Class Reference

Defines a leaf node in the scene graph hiearchy. More...

Inheritance diagram for cadex::ModelData_Part:
cadex::ModelData_SceneGraphElement cadex::ModelData_BaseObject

Public Types

typedef cadex::internal::ModelData_PartImpl ImplType
 
- Public Types inherited from cadex::ModelData_SceneGraphElement
typedef cadex::internal::ModelData_SceneGraphElementImpl ImplType
 
- Public Types inherited from cadex::ModelData_BaseObject
typedef int IdType
 Defines a type identifier.
 

Public Member Functions

 ModelData_Part ()
 
 ModelData_Part (initialized)
 
 ModelData_Part (ImplType *theImpl)
 
 ModelData_Part (const Base_UTF16String &theName)
 
 ModelData_Part (const ModelData_Representation &theRep, const Base_UTF16String &theName=Base_UTF16String())
 
 ModelData_Part (const ModelData_BRepRepresentation &theRep, const ModelData_PolyRepresentation &theLOD, const Base_UTF16String &theName=Base_UTF16String())
 
 ModelData_Part (const ModelData_BRepRepresentation &theRep, const ModelData_PolyRepresentation &theFineLOD, const ModelData_PolyRepresentation &theCoarseLOD, const Base_UTF16String &theName=Base_UTF16String())
 
 ModelData_Part (const ModelData_BRepRepresentation &theRep, const ModelData_PolyRepresentation &theFineLOD, const ModelData_PolyRepresentation &theMediumLOD, const ModelData_PolyRepresentation &theCoarseLOD, const Base_UTF16String &theName=Base_UTF16String())
 
void AddRepresentation (const ModelData_Representation &theRepresentation)
 Adds a representation.
 
ModelData_BRepRepresentation BRepRepresentation () const
 
ModelData_PolyRepresentation PolyRepresentation (ModelData_RepresentationMask theRepresentationMask) const
 
void Accept (RepresentationVisitor &theVisitor) const
 Accepts a visitor of the associated representations. More...
 
void Accept (RepresentationVisitor &theVisitor, int theRepresentationMask) const
 Accepts a visitor of the associated representations. More...
 
- Public Member Functions inherited from cadex::ModelData_SceneGraphElement
 ModelData_SceneGraphElement ()
 Constructor. More...
 
void SetAppearance (const ModelData_Appearance &theAppearance)
 
ModelData_Appearance Appearance () const
 
void AddProperties (const ModelData_PropertyTable &theProperties)
 Adds a property table to the element. More...
 
ModelData_PropertyTable Properties () const
 Returns a property table.
 
void AddPMI (const ModelData_PMITable &thePMI)
 Adds a PMI table to the element. More...
 
ModelData_PMITable PMI () const
 Returns a PMI table.
 
void AddToLayer (const ModelData_Layer &theLayer)
 Adds element to layer.
 
void Accept (ModelData_Model::ElementVisitor &theVisitor) const
 Accepts an element visitor. More...
 
- Public Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject ()
 Constructor. More...
 
IdType TypeId () const
 Returns an object type id. More...
 
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T. More...
 
void SetName (const Base_UTF16String &theName)
 Sets an object name. More...
 
Base_UTF16String Name () const
 Returns an object name. More...
 
void Nullify ()
 Resets reference to implementation object. More...
 
bool IsNull () const
 Returns true if the object is nullified. More...
 
 operator bool () const
 Casts the object to the bool type. More...
 
internal::ModelData_BaseObjectImpl * Impl () const
 Return a handle to backend (reserved for internal use).
 

Static Public Member Functions

static IdType GetTypeId ()
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_SceneGraphElement
 ModelData_SceneGraphElement (const internal::ModelData_BaseObjectImpl *theImpl)
 Constructor (reserved for internal use).
 
 ModelData_SceneGraphElement (const internal::ModelData_BaseObjectImpl *theImpl, const Base_UTF16String &theName)
 Constructor (reserved for internal use).
 
- Protected Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl)
 Constructor (reserved for internal use).
 
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl, const Base_UTF16String &theName)
 Constructor (reserved for internal use).
 
template<typename T >
T * GetOrCreateImpl ()
 Reserved for internal use.
 

Detailed Description

Defines a leaf node in the scene graph hiearchy.

A part corresponds to mechanical part or a product in the product structure hieararchy.

A part contains one or several representations: zero or one B-Rep representation, and/or zero, one or multiple polygonal representations.

See also
Product Structure, Part representations.
Examples:
assemblycreator/main.cxx, brepmodeling/main.cxx, meshing/main.cxx, and modelexplorer/main.cxx.

Constructor & Destructor Documentation

◆ ModelData_Part() [1/4]

cadex::ModelData_Part::ModelData_Part ( )

If theToInitialize is false then creates a null object (see IsNull()).

◆ ModelData_Part() [2/4]

cadex::ModelData_Part::ModelData_Part ( const ModelData_Representation theRep,
const Base_UTF16String theName = Base_UTF16String() 
)
explicit

Creates a part with a name and single representation.

◆ ModelData_Part() [3/4]

cadex::ModelData_Part::ModelData_Part ( const ModelData_BRepRepresentation theRep,
const ModelData_PolyRepresentation theLOD,
const Base_UTF16String theName = Base_UTF16String() 
)

Creates a part with a name, B-Rep and one polygonal representations.

◆ ModelData_Part() [4/4]

cadex::ModelData_Part::ModelData_Part ( const ModelData_BRepRepresentation theRep,
const ModelData_PolyRepresentation theFineLOD,
const ModelData_PolyRepresentation theCoarseLOD,
const Base_UTF16String theName = Base_UTF16String() 
)

Creates a part with a name, B-Rep and twp polygonal representations.

Member Function Documentation

◆ Accept() [1/2]

void cadex::ModelData_Part::Accept ( RepresentationVisitor &  theVisitor) const

Accepts a visitor of the associated representations.

Applies theVisitor to each added representation. The order of visiting representations matches the order in which the representations have been added with AddRepresentation().

◆ Accept() [2/2]

void cadex::ModelData_Part::Accept ( RepresentationVisitor &  theVisitor,
int  theRepMask 
) const

Accepts a visitor of the associated representations.

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

theRepMask is a bit-wise combination of flags defined in the ModelData_RepresentationMask enumeration.

◆ BRepRepresentation()

ModelData_BRepRepresentation cadex::ModelData_Part::BRepRepresentation ( ) const

Returns a B-Rep representation. Returns null if there is no B-Rep representation.

Examples:
meshing/main.cxx.

◆ PolyRepresentation()

ModelData_PolyRepresentation cadex::ModelData_Part::PolyRepresentation ( ModelData_RepresentationMask  theMask) const

Returns a polygonal representation that matches the specified mask. Returns null if there is no Poly representation.