Open CASCADE Technology 7.8.2.dev
IFGraph_Compare Class Reference

this class evaluates effect of two compared sub-parts : cumulation (union), common part (intersection-overlapping) part specific to first sub-part or to the second one Results are kept in a Graph, several question can be set Basic Iteration gives Cumulation (union) More...

#include <IFGraph_Compare.hxx>

Inheritance diagram for IFGraph_Compare:

Public Member Functions

 IFGraph_Compare (const Interface_Graph &agraph)
 creates empty Compare, ready to work
 
void GetFromEntity (const Handle< Standard_Transient > &ent, const Standard_Boolean first)
 adds an entity and its shared ones to the list : first True means adds to the first sub-list, else to the 2nd
 
void GetFromIter (const Interface_EntityIterator &iter, const Standard_Boolean first)
 adds a list of entities (as an iterator) as such, that is, their shared entities are not considered (use AllShared to have them) first True means adds to the first sub-list, else to the 2nd
 
void Merge ()
 merges the second list into the first one, hence the second list is empty
 
void RemoveSecond ()
 Removes the contents of second list.
 
void KeepCommon ()
 Keeps only Common part, sets it as First list and clears second list.
 
void ResetData ()
 Allows to restart on a new data set.
 
virtual void Evaluate () override
 Recomputes result of comparing to sub-parts.
 
Interface_EntityIterator Common () const
 returns entities common to the both parts
 
Interface_EntityIterator FirstOnly () const
 returns entities which are exclusively in the first list
 
Interface_EntityIterator SecondOnly () const
 returns entities which are exclusively in the second part
 
- Public Member Functions inherited from Interface_GraphContent
 Interface_GraphContent ()
 Creates an empty GraphContent, ready to be filled.
 
 Interface_GraphContent (const Interface_Graph &agraph)
 Creates with all entities designated by a Graph.
 
 Interface_GraphContent (const Interface_Graph &agraph, const Standard_Integer stat)
 Creates with entities having specific Status value in a Graph.
 
 Interface_GraphContent (const Interface_Graph &agraph, const Handle< Standard_Transient > &ent)
 Creates an Iterator with Shared entities of an entity (equivalente to EntityIterator but with a Graph)
 
void GetFromGraph (const Interface_Graph &agraph)
 Gets all Entities designated by a Graph (once created), adds them to those already recorded.
 
void GetFromGraph (const Interface_Graph &agraph, const Standard_Integer stat)
 Gets entities from a graph which have a specific Status value (one created), adds them to those already recorded.
 
Interface_EntityIterator Result ()
 Returns Result under the exact form of an EntityIterator : Can be used when EntityIterator itself is required (as a returned value for instance), without way for a sub-class.
 
void Begin ()
 Does the Evaluation before starting the iteration itself (in out)
 
- Public Member Functions inherited from Interface_EntityIterator
 Interface_EntityIterator ()
 Defines an empty iterator (see AddList & AddItem)
 
 Interface_EntityIterator (const Handle< TColStd_HSequenceOfTransient > &list)
 Defines an iterator on a list, directly i.e. without copying it.
 
void AddList (const Handle< TColStd_HSequenceOfTransient > &list)
 Gets a list of entities and adds its to the iteration list.
 
void AddItem (const Handle< Standard_Transient > &anentity)
 Adds to the iteration list a defined entity.
 
void GetOneItem (const Handle< Standard_Transient > &anentity)
 same as AddItem (kept for compatibility)
 
void SelectType (const Handle< Standard_Type > &atype, const Standard_Boolean keep)
 Selects entities with are Kind of a given type, keep only them (is keep is True) or reject only them (if keep is False)
 
Standard_Integer NbEntities () const
 Returns count of entities which will be iterated on Calls Start if not yet done.
 
Standard_Integer NbTyped (const Handle< Standard_Type > &type) const
 Returns count of entities of a given type (kind of)
 
Interface_EntityIterator Typed (const Handle< Standard_Type > &type) const
 Returns the list of entities of a given type (kind of)
 
virtual void Start () const
 Allows re-iteration (useless for the first iteration)
 
Standard_Boolean More () const
 Says if there are other entities (vertices) to iterate the first time, calls Start.
 
void Next () const
 Sets iteration to the next entity (vertex) to give.
 
const Handle< Standard_Transient > & Value () const
 Returns the current Entity iterated, to be used by Interface tools.
 
Handle< TColStd_HSequenceOfTransient > Content () const
 Returns the content of the Iterator, accessed through a Handle to be used by a frontal-engine logic Returns an empty Sequence if the Iterator is empty Calls Start if not yet done.
 
void Destroy ()
 Clears data of iteration.
 
virtual ~Interface_EntityIterator ()
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from Interface_EntityIterator
void Reset ()
 Allows subclasses of EntityIterator to reevaluate an iteration.
 

Detailed Description

this class evaluates effect of two compared sub-parts : cumulation (union), common part (intersection-overlapping) part specific to first sub-part or to the second one Results are kept in a Graph, several question can be set Basic Iteration gives Cumulation (union)

Constructor & Destructor Documentation

◆ IFGraph_Compare()

IFGraph_Compare::IFGraph_Compare ( const Interface_Graph & agraph)

creates empty Compare, ready to work

Member Function Documentation

◆ Common()

Interface_EntityIterator IFGraph_Compare::Common ( ) const

returns entities common to the both parts

◆ Evaluate()

virtual void IFGraph_Compare::Evaluate ( )
overridevirtual

Recomputes result of comparing to sub-parts.

Reimplemented from Interface_GraphContent.

◆ FirstOnly()

Interface_EntityIterator IFGraph_Compare::FirstOnly ( ) const

returns entities which are exclusively in the first list

◆ GetFromEntity()

void IFGraph_Compare::GetFromEntity ( const Handle< Standard_Transient > & ent,
const Standard_Boolean first )

adds an entity and its shared ones to the list : first True means adds to the first sub-list, else to the 2nd

◆ GetFromIter()

void IFGraph_Compare::GetFromIter ( const Interface_EntityIterator & iter,
const Standard_Boolean first )

adds a list of entities (as an iterator) as such, that is, their shared entities are not considered (use AllShared to have them) first True means adds to the first sub-list, else to the 2nd

◆ KeepCommon()

void IFGraph_Compare::KeepCommon ( )

Keeps only Common part, sets it as First list and clears second list.

◆ Merge()

void IFGraph_Compare::Merge ( )

merges the second list into the first one, hence the second list is empty

◆ RemoveSecond()

void IFGraph_Compare::RemoveSecond ( )

Removes the contents of second list.

◆ ResetData()

void IFGraph_Compare::ResetData ( )

Allows to restart on a new data set.

◆ SecondOnly()

Interface_EntityIterator IFGraph_Compare::SecondOnly ( ) const

returns entities which are exclusively in the second part


The documentation for this class was generated from the following file: