Mechanical Modeler |
Configuration and VersioningAscendant Stability in Build Process and Mechanical Behaviours |
|
Technical Article |
AbstractMechanical Modeler and Geometrical Modeler have several internal
algorithms to manage generic naming,topological operator etc... The aim of this article is to make an overview of versioning in
Mechanical Modeler and to describe the steps needed to version correctly
a Mechanical Feature. |
Mechanical Modeler and Geometrical Modeler have different internal
algorithms, which differ from software releases.
Consequently, Mechanical Feature instantiated, inserted in MechanicalPart, and built on a specific
date, should -potentially- have different behaviours when it is used on new
software level.
For instance, between "CATIA Rxx" and "CATIA Ryy", BRep behaviors could have changed, which could impact visualization or Colorization.
Example of Colour Behaviors between "CATIA Rxx" & "CATIA Ryy" | |
"In CATIA Rxx" |
"In CATIA Ryy" |
To keep the same behaviours on your mechanical features, release after release and build after build, it is necessary to version them when they are instantiated and built.
This is done setting and storing the CATSoftwareConfiguration on
the feature.
This Class defines the software (Algorithm) configuration which is a set of code
modifications and a level on which the code must be run.
With this data stored on the instance, feature's update and mechanical
behaviours will be the same as at the first time it was instantiated and built !
In deed, for example during the build step, retrieving the CATSoftwareConfiguration stored
on the feature, you will determine the CATTopData to use on TopologicalOperator
and the level of Mechanical Modeler
(and CGM ) algorithms to execute in order to retrieve the same behaviours as the
first time you build the feature.
Þ In Consequence, versioning your Mechanical Feature guarantees ascendant stability and continuity in your parts: there will always be the same build for your feature as at the first time whenever you call it!
[Top]
With provided services "CATMmrAlgoConfigServices", you just take care about internal algorithms.
This means that those services are just used to keep the level of internal Algorithms (in Mechanical and Geometric Modelers)
[Top]
Versioning a Mechanical feature is done in two steps.
... rc = CATMmrAlgoConfigServices::CreateConfigurationData(*pISpecObjectOnInstance); if( FAILED(rc) ) return rc; ... |
This step prepare instance to store the CATSoftwareConfiguration. It is a
primordial step in Versioning MechanicalFeature process.
... rc = QueryInterface(IID_CATISpecObject,(void **) & pSOCombinedCurve); if(SUCCEEDED(rc)&&pSOCombinedCurve != NULL) { rc = CATMmrAlgoConfigServices::GetConfiguration(pSOCombinedCurve ,pSoftConfig ,IsConfigToStore); if(SUCCEEDED(rc)) { // SetSoftwareConfig TopData.SetSoftwareConfiguration(pSoftConfig) ; // release pSoftConfig after the procedural report ending } } ... |
With this CATSoftwareConfiguration, you could define the good
CATTopData
to use to build feature's result.
Then, at the end of the first build time, this Algorithm Configuration need
to be stored on the instance, to keep it for following builds.
This is done calling
CATMmrAlgoConfigServices::StoreConfiguration
method.[3]
... if ( SUCCEEDED(rc) ) { if ( NULL != pResultBody ) { int BoolOper = 0 ; piProcReport->StoreProcReport(pResultBody,NoCopy,BoolOper); if(IsConfigToStore == 1) { CATMmrAlgoConfigServices::StoreConfiguration(pSOCombinedCurve ,pSoftConfig); } } else { CATMfErrUpdate *pErrorNoIntersection = new CATMfErrUpdate(); CATUnicodeString Diagnostic("The two extruded curves do not intersect."); pErrorNoIntersection->SetDiagnostic(1,Diagnostic); CATThrow(pErrorNoIntersection); } } ... |
Please, note that after this storage, the configuration can not be
modified anymore. It is impossible to by-pass this restriction. It's the
only way to assure that the configuration used during the following builds
will be the same that during the first one.
Other build times:
On following build times, the stored Algorithm Configuration is retrieved
using CATMmrAlgoConfigServices::GetConfiguration method and this data
is used to define the only corresponding CATTopData used in
Topological et geometrical operator.
With this unique CATTopData, Build result is guaranteed equal to the first built result. And your feature will not be impacted by enhancement or maintenance side effect.
In order to protect your feature from Algorithm changes in MechanicalModeler
or in GeometricalModeler code, it is necessary to version your mechanical
feature.
The way to do this is to use CATMmrAlgoConfigServices services on
instantiate and build steps.
Using correctly those services, your feature will not be "release dependant on internal algorithms". This means that its behaviours (in particular for Build and update operation) will not depend on Mechanical or Geometrical Modeler internal algorithm changes.
[Top]
[1] | The Versioning of the Topological Operators |
[2] | Creating a New StartUp Deriving from a Mechanical StartUp |
[3] | Integrating a New Geometrical Feature in the Update Mechanism |
[Top] |
Version: 1 [Jan 2007] | Document created |
[Top] |
Copyright © 1999-2007, Dassault Systèmes. All rights reserved.