Mechanical Modeler |
Extending a Mechanical Feature using Extension Feature and ProvidersA full example to create and integrate in the V5 your own extension features |
|
Use Case |
AbstractThis use case explains how to create and integrate an Extension
Feature, used to add data and behaviors, into CAA V5: the CAAMmrCCDataExtension. |
This use case illustrates the sub-section entitled "Adding Applicative
Data" you can find in the "Technical Articles"
section of the Mechanical Modeler home page.
Its main intent is to show you
Extension Features specifities [2] and to explain
how to use Providers[3]
in order to add data and behaviors to Mechanical Features.
In this use case, you will learn to:
How to create a new StartUp of Extension Feature, how to store it in a feature's catalog and how to instantiate it.
How to define and create new Providers to extend CATPrtCont's behaviors to Applicative Container.
As Extension Features are features, they are completely described by a set of behaviors, in other words interfaces, which have to be implemented in order to integrate cleanly your new features in the V5.
The "Extending Combined Curve" use case constitutes a set of articles, each describing the creation or the integration.
[Top]
The CAAMmrCCDataExtension is an extension feature designed to add a computed data to Combined Curves instantiated in your MechanicalPart. Its aim is to add a parameter - the computed length - to instantiated CombinedCurve.
Consequently, a CAAMmrCCDataExtension has only one Input (the base feature it extends) and an Output (The aggregated Parameter representing the computed length)
[Top]
The "Extending Combined Curve" is an use case of the CAAMechanicalModeler.edu framework that illustrates MechanicalModeler, MecModInterfaces and MechanicalModelerUI framework capabilities in Extension Feature Domain.
[Top]
The final intent of this use case is to add a computed data to instantiated Combined Curves and to extend some behaviors (Update, NavigateObject, 3DVisualisation...) on this extension feature. It can be divided into several steps:
The CATfct file has been generated using CATfctEditorAssistant tool. The client authentication is "CAAMmrUseCase" .
This command enables the end user to select a combined curve, and then uses a global method, CAAMmrAddCCExtension,
to create its extension. This method creates a new instance of Extension Feature
using the AddExtension
API. This specs modeler API creates
the extension on the Combined curve, and creates the Extension Container "CAAMmrDataExtensionCont"
if it doesn't exists. It is possible thanks to a provided CATRsc file
associated with the applicative container.
In the CATIBuild implementation, or in the edition
command, it is mandatory to have an access to the input specifications of the
new feature. It is the role of the CAAIMmrCCDataExtension
interface.
|
With this interface you can retrieve or modify the value of
CAAMmrCCDataExtension's Attributes.
As an Extension Feature is like a traditional feature, we have to take into
account several interfaces to integrate clearly our CAAMmrCCDataExtension in the V5.
As our extension is designed to
compute something, we have to implement CATIBuild Interface. This
interface enables you to build the result of the feature. Reading this
technical article [5] is strongly recommended before getting
to the use
case.
We decide to implement
CATI3DGeoVisu in order to display a
3D Representation associated with mathematical result of
CAAMmrCCDataExtension. This consists in displaying the value computed
sticking it on the Extended Combined Curve 3DRepresentation.
We decided to implement
CATINavigateObject on CAAMmrCCDataExtension in order to make
visible it's valuated parameter under its node in the SpecTree.
Nevertheless this implementation is not mandatory, since there is a
default implementation of this interface on the feature extension
(implemented on the feature whose derives the feature extension).
This interface enables an application to display or not a child
beneath its parent. This method contains one method IsShown
.
You must implement this interface, otherwise the behavior is not
guarantee. This interface is valid for Mechanical Modeler context, for
other context refer you to the modeler's documentation.
In the use
case we have decided that the extension will be not displayed beneath
the combined curve. Nevertheless we have implemented
CATINavigateFilter (IsShown= FALSE)
. The
extension will be visible beneath the Part's node thanks the
CATINavigateProvider implementation.
![]() |
If you only want see the extension beneath the combined curve,
implement
CATINavigateFilter with IsShown= TRUE
, and do
not implement CATINavigateProvider .
In Addition, Extension Features are instantiated in a specific
Applicative Container (CAAMmrDataExtensionCont) defined during
the CAAIMmrCCDataExtensionFactory implementation. Consequently, we
have to define Provider Mechanism to extend CATPrtCont's Behavior to
this Applicative Container.
This is done in two times:
On this articles we show how to implement Providers. This implementation is done on components (in Object Modeler meaning) keeping in mind the specific context of Mechanical Part.
To create interactively new instances of the CAAMmrCCDataExtension , you will create an add-in of the Shape Design workbench into which you will add the CAAMmrCCDataExtension Creation command. Creating an Add-in in the Shape Design Workbench
[Top]
The documentation of the Extending Combined Curve Use Case contains the following articles:
[Top]
To launch the Extending Combined Curve use case, you will need to set up the build time environment, then compile the following modules of the CAAMechanicalModeler.edu framework along with their prerequisites:
Next, let's execute interactively the use case. Several steps must be followed in order to completely execute the use case:
Launch CATIA. When the application is ready, follow scenarios described below:
The Creation scenario:
![]() |
The Edition scenario
The Open scenario:
(*) The files "CAACombinedCurve.CATPart" and "CAAExtendedCombinedCurve.CATPart" are located in the directory
CAAMechanicalModeler.edu/InputData
- Unix :
InstallRootDirectory/CAAMechanicalModeler.edu/InputData
- Windows :
InstallRootDirectory\CAAMechanicalModeler.edu\InputData
where
InstallRootDirectory
is the directory where the CAA CD-ROM is installed.
[Top]
The "Extending Combined Curve" use case is made of a several modules of the CAAMechanicalModeler.edu framework:
Windows | InstallRootDirectory\CAAMechanicalModeler.edu\ |
Unix | InstallRootDirectory/CAAMechanicalModeler.edu/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
These modules are:
[Top]
You can now successively get to:
Creating Extension Feature 's Catalog
Creating CAAMmrCCDataExtension's creation method
Creating CAAMmrCCDataExtension 's Interface of Type
Building CAAMmrCCDataExtension's Result
Displaying CAAMmrCCDataExtension's Result
Implementing CAAMmrDataExtensionCont's Providers
Implementing CAAMmrDataExtensionCont's Initialization
Creating an Add-in in the Shape Design Workbench
[Top]
The CAAMechanicalModeler.edu "Extending Combined Curve" sample shows how to create your own Extension Feature to add parameters and behaviors to Mechanical Features.
[Top]
Version: 1 [Mar 2007] | Document created |
[Top] |
Copyright © 2007, Dassault Systèmes. All rights reserved.