All Frameworks Class Hierarchy This Framework Indexes
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIGSMProceduralView
Insertion of current feature in document.
Role: Allows you to append Shape Design features in a Geometrical Set.
Note : Once appended , the feature should be updated
What does InsertInProceduralView method ?
This method aggregates the feature on a GSMTool in a following way
Checks that the feature in not already aggregated , if yes does nothing
Checks if Input father argument is a GSMTool in which features can be aggregated (not external, not private,..)
If InputFather is not specify or if not acceptable GSMTool
Retrieve Current GSMTool in Part
If no current GSMTool, create a GSMTool type of "standard" Geometrical Set and set it as Current
Insert the feature in the current GSMTool (Geometrical Sets or Ordered Geometrical Set)
Different Types of Geometrical Sets
Geometrical Sets can be :
The Geometrical Set (GS) and the Ordered Geometrical Set (OGS) are both GSMTool features. This means that both of them are surfacic bodies, and contain surfacic or volumic geometrical features .
#include "CAAIMyFeature.h"
#include "CATISpecObject.h"
#include "CATIGSMTool.h"
#include "CATIGSProceduralView.h"
#include "CATMmrLinearBodyServices.h"
......
HRESULT rc = S_OK ;
CAAIMyFeature * piMyFeature =....
....
CATISpecObject * pSpecObject = NULL ;
rc = piMyFeature->QueryInterface(IID_CATISpecObject,
(void**) &pSpecObject);
if ( SUCCEEDED(rc)) {
// 1/ Aggregate
CATIGSMProceduralView_var curobj = pSpecObject;
if (NULL_var != curobj ) {
rc = curobj->InsertInProceduralView();
}
// 2/ Update
CATTry {
ispSpec -> Update();
}
CATCatch(CATError,error) {
rc = CATReturnError(error);
}
CATEndTry;
// Test update / GetLastError
...
// 3 / OGS
CATBoolean IsInsideOGS = FALSE ;
CATISpecObject * pFatherCC = NULL ;
pFatherCC = pSpecObject->GetFather();
if ( NULL != pFatherCC ) {
CATIGSMTool *piGSMToolFatherCC = NULL;
rc = pFatherCC->QueryInterface ( IID_CATIGSMTool, (void**) &piGSMToolFather);
if ( SUCCEEDED(rc) ) {
int IsAnOGS = -1 ;
piGSMToolFatherCC->GetType(IsAnOGS) ;
if ( 1 == IsAnOGS ) {
oIsInsideOGS = TRUE ;
}
piGSMToolFather->Release(); piGSMToolFather = NULL ;
}
pFatherCC->Release(); pFatherCC = NULL ;
}
else
rc = E_FAIL ;
pSpecObject->Release(); pSpecObject = NULL ;
}
if ( IsInsideOGS ) {
CATBaseUnknown_var spBUOn = pSpecObject;
rc = CATMmrLinearBodyServices::Insert(spBUOnCC);
}
pSpecObject->Release(); pSpecObject = NULL ;
}
....
| public virtual InsertInProceduralView( | const | father | =NULL_var, |
| const | bSetAsCurrent | =TRUE, | |
| const | BeforeFeature | =NULL_var) |
Copyright © 2003, Dassault Systèmes. All rights reserved.