Shape Design& Styling |
Generative Shape Design |
Updating Shape Design FeaturesUpdate and check linearity for Shape Design features |
Technical Article |
AbstractThis article discusses the CAAGsiObjectUpdate service. |
Shape Design features can now be inserted in Body, OGS and GS.
Body and OGS are new set of features in which shape design features can be inserted
They proposed enhanced mechanisms for feature (Absorbed main input,
Current feature for Shapes ) that required additional actions at
update for feature in Body and OGS context (GS is the former "Ooen Body")
CAAGsiServices encapsulates generic sequences of code.
CAAGsiObjectUpdate is an update method available for Shape Design features, Part
Design features to be used when features are inserted in Body, OGS and GS
[Top]
The CAAGsiServices header export a list of self-contain tools , is located in PublicInterfaces of CAAGSMInterfaces.edu and is implements in the CAAGsiServices.m module of the CAAGSMInterfaces.edu framework:
Windows | InstallRootDirectory\CAAGSMInterfaces.edu\CAAGsiServices.m\ |
Unix | InstallRootDirectory/CAAGSMInterfaces.edu/CAAGsiServices.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
CAAGsiServices , CAAGsiObjectUpdate Step by Step
[Top]
Mechanical Modeler update standard mechanism
// Update // --------------------------------------------------------------------------- ExportedByCAAGsiServices HRESULT CAAGsiObjectUpdate(const CATISpecObject_var & ispSpec) { ... HRESULT rc = S_OK ; CATTry { iStat = ispSpec -> Update(); ... } // This block is specific for Update Errors CATCatch(CATMfErrUpdate,error) { cerr << " Update Error: " << (error-> GetDiagnostic()).ConvertToChar() << endl; return E_FAIL; } // This block treats every other exception CATCatch(CATError,error) { cerr << " Error: " << (error->GetMessageText()).ConvertToChar() << endl; return E_FAIL; } CATEndTry; return rc ; } |
To be done after feature update
... // check Linearity / useful for absorbent feature inserted in OGS CATISpecObject_var spFather = ispSpec->GetFather(); if ( NULL_var != spFather ) { spFather -> Release(); CATIGSMTool *piGSMToolFather = NULL; rc =spFather->QueryInterface ( IID_CATIGSMTool, (void**)&piGSMToolFather); if ( SUCCEEDED(rc) ) { int IsAnAbsorbantSet = -1 ; piGSMToolFather->GetType(IsAnbsorbantSet) ; if ( 1 == IsAnAbsorbantSet ) { CATBaseUnknown_var spUnkwnSpec = ispSpec; rc = CATMmrLinearBodyServices::Insert(spUnkwnSpec) ; } piGSMToolFather->Release() ; piGSMToolFather=NULL; } ... |
Most of the case, it is recommended in applicative code to call afterwards SetCurrentFeature method of CATIPrtPart Interface on the just updated object : in CATIAV5 interactive function : Object just created or just edited are set as current (Body and OGS)
[Top]
[1] | About Generative Shape Design Features |
[2] | Building and Launching a CAA V5 Use Case |
[3] | Creating an Open Body |
[4] | CAAGsiNozzle Use case |
[Top] |
Version: 1 [May 2004] | Document created |
[Top] |
Copyright © 2004, Dassault Systèmes. All rights reserved.