CATGSMUseItf Interface CATIGSMUseMultipleSolutionsManager

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIGSMUseMultipleSolutionsManager

Interface to manage multiple solutions for GSD features.
Role: Implemented on GSD features that can manage multiple solutions such as

Allow to compute all the solutions, get number of solutions, get solution topological result and set feature attributes corresponding to chosen solution. Interface is implemented as transient extension, data computed by ComputeAllSolutions method are cleaned when interface pointer is released. Build pSpecCorner first solution
 
  CATIGSMUseMultipleSolutionsManager * pMultiSolMng=NULL;
  if(SUCCEEDED(pSpecCorner->QueryInterface(IID_CATIGSMUseMultipleSolutionsManager,(void**)&pMultiSolMng))){
    if(SUCCEEDED(pMultiSolMng->ComputeAllSolutions())){
      if(SUCCEEDED(pMultiSolMng->SetCurrentSolution(1))){
        CATTry{
          pSpecCorner->Update();
        }
        CATCatch(CATError,pErr){
          Flush(pErr);
        }
        CATEndTry
      }
    }
    pMultiSolMng->Release(); pMultiSolMng=NULL;
  }
  


Method Index


o ComputeAllSolutions()
Compute all solutions according to feature inputs.
o GetCurrentSolution(int&)
Gets feature current solution index according to its stabilization attributes (orientations, indexes.
o GetNumberOfSolutions(int&)
Gets the number of solutions.
o GetPreviewTopology(int,CATBaseUnknown_var&)
Gets the topology representing the solution iSolIndex.
o SetCurrentSolution(int)
Sets feature stabilization attributes (orientations, indexes.

Methods


o ComputeAllSolutions
public virtual ComputeAllSolutions()
Compute all solutions according to feature inputs. return E_FAIL in case of computation error error can be retrieved by using CATError::CATGetLastError(hr)
See also:
o GetCurrentSolution
public virtual GetCurrentSolution( oSolIndex)
Gets feature current solution index according to its stabilization attributes (orientations, indexes...). (ComputeAllSolutions must have been called before)
Parameters:
oSolIndex
solution index from 1 to 'number of solutions'
o GetNumberOfSolutions
public virtual GetNumberOfSolutions( oNbSols)
Gets the number of solutions. (ComputeAllSolutions must have been called before)
Parameters:
oNbSols
Number of Solutions
o GetPreviewTopology
public virtual GetPreviewTopology( iSolIndex,
ospTopo)
Gets the topology representing the solution iSolIndex. (ComputeAllSolutions must have been called before)
Parameters:
iSolIndex
solution index from 1 to 'number of solutions'
ospTopo
solution topology returned topology lifecycle is linked to extension lifecycle i.e topology will be removed from CGM container when the interface pointer will be released or when the feature will be removed
o SetCurrentSolution
public virtual SetCurrentSolution( iSolIndex)
Sets feature stabilization attributes (orientations, indexes...) in order to build the solution corresponding to iSolIndex. (ComputeAllSolutions must have been called before) This method does not update the feature
Parameters:
iSolIndex
solution index from 1 to 'number of solutions'

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

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.