Mechanical Modeler 

Extending a Mechanical Feature using Extension Feature and Providers

A full example to create and integrate in the V5 your own extension features
Use Case

Abstract

This use case explains how to create and integrate an Extension Feature, used to add data and behaviors, into CAA V5: the CAAMmrCCDataExtension.
It extends the combined Curve features defined and detailed on the CAA Use Cases article "Creating a New Geometrical Feature: the Combined Curve" [1]


What You Will Learn With This Use Case

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]

What Is a "CAAMmrCCDataExtension"

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" Use Case

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]

What Does the "Extending Combined Curve" Use Case Do

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:

  1. Creating the new Extension Feature StartUp(CAAMmrCCDataExtension) and storing it in the catalog "CAAMmrCCDataExtensionCatalog.CATfct" using "OSM Modelling Language".

    The CATfct file has been generated using CATfctEditorAssistant tool.  The client authentication is "CAAMmrUseCase" .

  2. Creating a command to instantiate the new Extension StartUp "CAAMmrCCDataExtension" into a specific applicative container -

    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.
     

  3. Creating an interface to modify or retrieve the input specifications of the CAAMmrCCDataExtension instances.- Creating CAAMmrCCDataExtension 's Interface of Type
  4. 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. 
     

    Fig.2: The CAAIMmrCCDataExtension Interface

    With this interface you can retrieve or modify the value of CAAMmrCCDataExtension's Attributes.
     

  5. Integrating the CAAMmrCCDataExtension in the V5  
  6. 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.
     

    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:

     

  7. Creating Interactively Instances
  8. 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]

Overview of the "Extending Combined Curve" Use Case Articles

The documentation of the Extending Combined Curve Use Case contains the following articles:

[Top]

How to Launch the Extending Combined Curve Use Case

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:

The Creation scenario:

The Edition scenario

The Open scenario:

(*) The files "CAACombinedCurve.CATPart" and "CAAExtendedCombinedCurve.CATPart" are located in the directory CAAMechanicalModeler.edu/InputData

where InstallRootDirectory is the directory where the CAA CD-ROM is installed.

[Top]

Where to Find the CAAMmrCCDataExtension Code

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]


Step-by-Step

You can now successively get to:

[Top]


In Short

The CAAMechanicalModeler.edu "Extending Combined Curve" sample shows how to create your own Extension Feature to add parameters and behaviors to Mechanical Features.

[Top]


References

[1] Creating a New Geometrical Feature: the Combined Curve
[2] Working With Extension Feature in Mechanical Modeler
[3] Working with Providers in Mechanical Part
[4] The Structure of a Part Document
[5] The Build/Update Mechanism
[Top]

History

Version: 1 [Mar 2007] Document created
[Top]

Copyright © 2007, Dassault Systèmes. All rights reserved.