All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

MechanicalModeler Class CATMmrImportComparator

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATMmrImportComparator
 

Usage: you must use this class as is. You should never derive it.


public class CATMmrImportComparator

Class to analyse differences between two mechanical Import.

Role: This class offers services for retrieving the missing or differently Named Elements between two Inter Part Import Features. One of this import feature is called “Main Feature” and the other “Feature to Compare”.

A Named Element (see Generic Naming Overview for more details ) is a Face for volumes, a Face or Border Edge for surfaces, an Edge or a Border Vertex for wires. Some Elements may have a geometry which look the same but not have the same naming because they are constructed differently. The naming of an element may be kept even when there is a change of connectivity. Elements on an import feature have their own naming, but to be able to synchronize them ( and keep the stability ) Imports also keep the naming of Elements referenced in the import.

So when you compare two import features :
Usage:
Notes:


Constructor and Destructor Index


o CATMmrImportComparator()
Constructor.
o ~CATMmrImportComparator()
Destructor.

Method Index


o GetMissingElements(CATLISTV(CATIBRepAccess_var)&)
This method gets the Elements from the "Main Feature" Missing in the "Feature to Compare".
o GetModifiedConnectivityElementsInMain(CATLISTV(CATIBRepAccess_var)&)
This method gets the Elements of the "Main Feature" with same naming but a change of connectivity.
o GetModifiedConnectivityElementsInToCompare(CATLISTV(CATIBRepAccess_var)&)
This method gets the Elements of the "Feature to Compare" with same naming but a change of connectivity.
o GetModifiedReferenceNamingElementsInMain(CATLISTV(CATIBRepAccess_var)&)
This method gets the Elements of the "Main Feature" with same naming in the Import but different naming in the Reference.
o GetModifiedReferenceNamingElementsInToCompare(CATLISTV(CATIBRepAccess_var)&)
This method gets the Elements of the "Feature to Compare" with same naming in the Import but different naming in the Reference.
o Run()
This method performs the comparison.
o SetFeatureToCompare(CATIMechanicalFeature_var&)
This method initializes the Class with the "Feature to Compare".
o SetMainFeature(CATIMechanicalFeature_var&)
This method initializes the Class with the "Main Feature".
o SetMode(CATMmrImportComparator::CATMmrComparatorMode)
This method sets the comparison mode.

Enumerated Type Index


o CATMmrComparatorMode
The comparison mode between two features.

Constructor and Destructor


o CATMmrImportComparator
public CATMmrImportComparator()
Constructor.
Role: Construct the class of comparison.
o ~CATMmrImportComparator
public virtual ~CATMmrImportComparator()
Destructor.
Role: Destruct the class of comparison.

Methods


o GetMissingElements
public HRESULT GetMissingElements(CATLISTV(CATIBRepAccess_var)& oLMissingElements)
This method gets the Elements from the "Main Feature" Missing in the "Feature to Compare".
Role: This method gets the Elements from the "Main Feature" Missing in the "Feature to Compare".
Precondition: method Run need to be called first.
Parameters:
oLMissingElements
List of Elements from the "Main Feature" Missing in the "Feature to Compare", this output list is emptied at each start of the method.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_INVALIDARG: the method Run had not been called,
  • E_FAIL: Error occured.
o GetModifiedConnectivityElementsInMain
public HRESULT GetModifiedConnectivityElementsInMain(CATLISTV(CATIBRepAccess_var)& oLModifiedElementsInMain)
This method gets the Elements of the "Main Feature" with same naming but a change of connectivity.
Role: This method gets the Elements of the "Main Feature" with same naming but a change of connectivity.
Precondition: method SetMode with ModifiedConnectivity.
Parameters:
oLModifiedElementsInMain
List of Elements from the Main Feature modified in the Compared Features, this output list is emptied at each start of the method.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_INVALIDARG: the method Run had not been called or the CATMmrComparatorMode is not set to ModifiedConnectivity,
  • E_FAIL: Error occured.
o GetModifiedConnectivityElementsInToCompare
public HRESULT GetModifiedConnectivityElementsInToCompare(CATLISTV(CATIBRepAccess_var)& oLModifiedElementsInToCompare)
This method gets the Elements of the "Feature to Compare" with same naming but a change of connectivity.
Role: This method gets the Elements of the "Feature to Compare" with same naming but a change of connectivity.
Precondition: method Set_Mode with MmrModifiedConnectivity.
Parameters:
oLModifiedElementsInToCompare
List of Elements from the To Compared Feature modified in the Compared Features, this output list is emptied at each start of the method.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_INVALIDARG: the method Run had not been called or the CATMmrComparatorMode is not set to ModifiedConnectivity,
  • E_FAIL: Error occured.
o GetModifiedReferenceNamingElementsInMain
public HRESULT GetModifiedReferenceNamingElementsInMain(CATLISTV(CATIBRepAccess_var)& oLModifiedElementsInMain)
This method gets the Elements of the "Main Feature" with same naming in the Import but different naming in the Reference.
Role: This method gets the Elements off the "Main Feature" with same naming in the Import but different naming in the Reference.
Precondition: method Run need to be called first and the method SetMode with ModifiedReferenceNaming or ModifiedConnectivity.
Parameters:
oLModifiedElementsInMain
List of Elements from the "Main Feature" modified in the "Feature to Compare", this output list is emptied at each start of the method.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_INVALIDARG: the method Run had not been called or the CATMmrComparatorMode is set to Missing,
  • E_FAIL: Error occured.
o GetModifiedReferenceNamingElementsInToCompare
public HRESULT GetModifiedReferenceNamingElementsInToCompare(CATLISTV(CATIBRepAccess_var)& oLModifiedElementsInToCompare)
This method gets the Elements of the "Feature to Compare" with same naming in the Import but different naming in the Reference.
Role: This method gets the Elements of the "Feature to Compare" with same naming in the Import but different naming in the Reference.
Precondition: method SetMode with ModifiedReferenceNaming or ModifiedConnectivity.
Parameters:
oLModifiedElementsInCompared
List of Elements from the "Feature to Compare" modified in the "Main Feature", this output list is emptied at each start of the method.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_INVALIDARG: the method Run had not been called or the CATMmrComparatorMode is set to Missing,
  • E_FAIL: Error occured.
o Run
public HRESULT Run()
This method performs the comparison.
Role: This method performs the Comparison between the Features Main and To Compare.
Precondition: methods Set_MainFeature and SetFeatureToCompare need to be called first. Evrery time a Set methods is used you need to run this method.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_FAIL: the methods SetMainFeature or SetFeatureToCompare have not been called, or the features are not import features,
  • E_FAIL: Error occured.
o SetFeatureToCompare
public HRESULT SetFeatureToCompare( const CATIMechanicalFeature_var& iFeatureToCompare)
This method initializes the Class with the "Feature to Compare".
Role: This method initializes the Class with the "Feature to Compare". You can change the "Feature to Compare" anytime you want but the #Run method must be called after.
Parameters:
iFeatureToCompare
Feature to Compare.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_INVALIDARG: the feature is not an import feature,
  • E_FAIL: Error occured.
o SetMainFeature
public HRESULT SetMainFeature( const CATIMechanicalFeature_var& iMainFeature)
This method initializes the Class with the "Main Feature".
Role: This method initializes the Class with the "Main Feature". You can change the "Main Feature" anytime you want but the #Run method must be called after.
Parameters:
iMainFeature
Main Feature Import.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_INVALIDARG: the feature is not an import feature,
  • E_FAIL: Error occured.
o SetMode
public HRESULT SetMode(CATMmrImportComparator::CATMmrComparatorMode iMode)
This method sets the comparison mode.
Role: This method sets the comparison mode between the Main Feature and the Feature To Compare. If not used the mode is set to Missing. You can change the mode anytime you want but the #Run method must be called after. With some value of the mode some Get methods are invalid.
Parameters:
iMode
This mode allow the computation of more or less complex Comparison see
CATMmrComparatorMode. By default this mode is set to Missing.
Returns:
The error code.
Legal values:
  • S_OK: all is correct,
  • E_FAIL: Error occured.

Enumerated Types


o CATMmrComparatorMode
enum CATMmrComparatorMode {
  Missing,
  ModifiedReferenceNaming,
  ModifiedConnectivity
}
The comparison mode between two features.
Role: The comparison mode between the "Main Feature" and "Feature to Compare".
Parameters:
Missing
Allows the computation of only the Named Elements of the "Main Feature" which are missing in the "Feature to Compare".
ModifiedReferenceNaming
Allows the computation off the Missing Elements and off the Modified by Reference Naming Element ( the Naming of the Import is the same but the Naming of the reference are different).
ModifiedConnectivity
Allows the computation off the Missing Elements, Modified by Reference Naming Element and of Elements with the same naming but a diferent connectivity.

This object is included in the file: CATMmrImportComparator.h
If needed, your Imakefile.mk should include the module: CATMechanicalModeler

Copyright © 2003, Dassault Systèmes. All rights reserved.