Hide menu
Loading...
Searching...
No Matches

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

#include <cadex/ModelData_Part.hxx>

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

Classes

class  CombinedRepresentationVisitor
 Provides combined method Visit() to visit all representations. More...
 
class  RepresentationIterator
 Iterates over model representations. More...
 
class  RepresentationVisitor
 Defines a visitor for model represenations. More...
 
class  VoidRepresentationVisitor
 Element visitor with empty implementation. More...
 

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.
 
void RemoveRepresentations ()
 Remove all representations.
 
ModelData_BRepRepresentation BRepRepresentation () const
 
ModelData_PolyRepresentation PolyRepresentation (ModelData_RepresentationMask theRepresentationMask) const
 
void Accept (RepresentationVisitor &theVisitor) const
 Accepts a visitor of the associated representations.
 
void Accept (RepresentationVisitor &theVisitor, int theRepresentationMask) const
 Accepts a visitor of the associated representations.
 
void Accept (ModelData_Model::ElementVisitor &theVisitor) const
 Accepts an element visitor.
 
- Public Member Functions inherited from cadex::ModelData_SceneGraphElement
 ModelData_SceneGraphElement ()
 Constructor.
 
void SetAppearance (const ModelData_Appearance &theAppearance)
 Sets appearance of the scene graph element.
 
ModelData_Appearance Appearance () const
 Returns the scene graph element's own appearance.
 
void AddProperties (const ModelData_PropertyTable &theProperties)
 Adds a property table to the element.
 
ModelData_PropertyTable Properties () const
 Returns a property table.
 
void AddPMI (const ModelData_PMITable &thePMI)
 Adds a PMI table to the element.
 
ModelData_PMITable PMI () const
 Returns a PMI table.
 
void AddConfigurations (const ModelData_ConfigurationManager &theConfigurations)
 Adds a configuration manager to the element.
 
ModelData_ConfigurationManager Configurations () const
 Returns a configuration manager.
 
void AddToLayer (const ModelData_Layer &theLayer)
 Adds element to layer.
 
void Accept (ModelData_Model::ElementVisitor &theVisitor) const
 Accepts an element visitor.
 
- Public Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject ()
 Constructor.
 
IdType TypeId () const
 Returns an object type id.
 
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T.
 
void SetName (const Base_UTF16String &theName)
 Sets an object name.
 
Base_UTF16String Name () const
 
void SetUuid (const Base_Uuid &theUuid)
 
Base_Uuid Uuid () const
 
void Nullify ()
 Resets reference to implementation object.
 
bool IsNull () const
 Returns true if the object is nullified.
 
 operator bool () const
 Casts the object to the bool type.
 
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
MTKConverter/Program.cs, MTKConverter/main.cxx, advgeom/brepsimplify/Program.cs, advgeom/brepsimplify/main.cxx, advgeom/meshsimplify/Program.cs, advgeom/meshsimplify/main.cxx, exploring/appearance/Program.cs, exploring/appearance/main.cxx, exploring/bom/Program.cs, exploring/bom/main.cxx, exploring/brepgeometry/Program.cs, exploring/brepgeometry/main.cxx, exploring/breprepresentation/Program.cs, exploring/breprepresentation/main.cxx, exploring/configurations/Program.cs, exploring/configurations/main.cxx, exploring/layers/Program.cs, exploring/layers/main.cxx, exploring/pmi/Program.cs, exploring/pmi/main.cxx, exploring/polyrepresentation/Program.cs, exploring/polyrepresentation/main.cxx, exploring/propertytable/Program.cs, exploring/propertytable/main.cxx, helpers/shape_processor.cs, helpers/shape_processor.hxx, machining/dfm_analyzer/Program.cs, machining/dfm_analyzer/main.cxx, machining/feature_recognizer/Program.cs, machining/feature_recognizer/main.cxx, meshing/lods/Program.cs, meshing/lods/main.cxx, meshing/remeshing/Program.cs, meshing/remeshing/main.cxx, meshing/visualizationmesher/Program.cs, meshing/visualizationmesher/main.cxx, modeling/assembly/Program.cs, modeling/assembly/main.cxx, modeling/brep/Program.cs, modeling/brep/main.cxx, modeling/brepfeatures/Program.cs, modeling/brepfeatures/main.cxx, modeling/brepprimitives/Program.cs, modeling/brepprimitives/main.cxx, modeling/metadata/Program.cs, modeling/metadata/main.cxx, modeling/poly/Program.cs, modeling/poly/main.cxx, modification/coloring/Program.cs, modification/coloring/main.cxx, modification/renaming/Program.cs, modification/renaming/main.cxx, sheet_metal/dfm_analyzer/Program.cs, sheet_metal/dfm_analyzer/main.cxx, sheet_metal/feature_recognizer/Program.cs, sheet_metal/feature_recognizer/main.cxx, sheet_metal/unfolder/Program.cs, sheet_metal/unfolder/main.cxx, visualization/qtquick_qml/pmiviewer/main.cxx, visualization/qtquick_qml/selectionhandling/main.cxx, visualization/wpf/pmiviewer/App.xaml.cs, visualization/wpf/selectionhandling/App.xaml.cs, wall_thickness/visualization/Program.cs, and wall_thickness/visualization/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/3]

void cadex::ModelData_SceneGraphElement::Accept ( ModelData_Model::ElementVisitor theVisitor) const

Accepts an element visitor.

The order of visiting depends on the type of this object:

  • for a part invokes a visitor for the part (ModelData_Model::ElementVisitor::operator());
  • for an instance first enters the instance by calling ModelData_Model::ElementVisitor::VisitEnter()). If it returns true then visits the referred element. Then leaves the instance calling ModelData_Model::ElementVisitor::VisitLeave().
  • for an assembly first enters the assembly by calling ModelData_Model::ElementVisitor::VisitEnter()). If it returns true then visits all the assembly children. Then leaves the assembly calling ModelData_Model::ElementVisitor::VisitLeave().

◆ Accept() [2/3]

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().

Examples
advgeom/meshsimplify/Program.cs, advgeom/meshsimplify/main.cxx, exploring/appearance/Program.cs, exploring/appearance/main.cxx, modification/coloring/Program.cs, modification/coloring/main.cxx, modification/renaming/Program.cs, and modification/renaming/main.cxx.

◆ Accept() [3/3]

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()

◆ PolyRepresentation()