Mechanical Modeler

Integrating Combined Curves inside Ordered Sets

Implementing CATIInputDescription
Use Case

Abstract

The main goal of this use case is to describe how to implement the CATIInputDescription interface in order to correctly insert a Combined Curve within an ordered set. 


What You Will Learn With This Use Case

The main goal of this use case is to describe how to implement the CATIInputDescription interface on the Combined Curve StartUp. This interface is taken into account when the feature is aggregated into an ordered set [1]. It enables you to:

You can you refer to the "Creation versus Modification Feature" section of the referenced technical article [2] to find more details behind each concept and each method of this interface. Moreover, the "Integrating a New Mechanical Feature in V5" article [3] explains for which type of StartUp, this interface should be implemented. 

Additionally, you will learn how to implement this interface by the BOA mechanism [4]. 

[Top]

The CAACombinedCurveInputDescription Use Case

CAACombinedCurveInputDescription is a use case of the CAAMechanicalModeler.edu framework that illustrates MechanicalModeler framework capabilities.

[Top]

What Does CAACombinedCurveInputDescription Do

The use case is an implementation of CATIInputDescription for a feature of creation. 

[Top]

How to Launch CAACombinedCurveInputDescription

See the section entitled "How to Launch the Combined Curve Use Case" in the "Creating a New Geometrical Feature: The Combined Curve" use case for a detailed description of how this use case should be launched.

[Top]

Where to Find the CAACombinedCurveInputDescription Code

The CAACombinedCurveInputDescription use case is made one class,CAAEMmrCombCrvInputDescription, located in the CAAMmrCombinedCurve.m module of the CAAMechanicalModeler.edu framework:

Windows InstallRootDirectory\CAAMechanicalModeler.edu\CAAMmrCombinedCurve.m\
Unix InstallRootDirectory/CAAMechanicalModeler.edu/CAAMmrCombinedCurve.m/

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

[Top]

Step-by-Step

This use case is divided into two steps:

 

Defining the CAAEMmrCombCrvInputDescription Class

#ifndef CAAEMmrCombCrvInputDescription_H
#define CAAEMmrCombCrvInputDescription_H

#include "CATIniInputDescriptionAdaptor.h" 

class CAAEMmrCombCrvInputDescription: public CATIniInputDescriptionAdaptor
{
    CATDeclareClass;
    
public:
     
    CAAEMmrCombCrvInputDescription ();
    virtual ~CAAEMmrCombCrvInputDescription ();
    
    virtual HRESULT GetListOfModifiedFeatures(CATListValCATBaseUnknown_var& oListOfModifiedFeatures );

    virtual HRESULT GetMainInput(CATBaseUnknown_var& oMainInput);

    virtual HRESULT GetFeatureType(CATIInputDescription::FeatureType& oFeature_type);

private:

    CAAEMmrCombCrvInputDescription (CAAEMmrCombCrvInputDescription &);
    CAAEMmrCombCrvInputDescription& operator=(CAAEMmrCombCrvInputDescription&);
    
};

#endif

The CAAEMmrCombCrvInputDescription C++ class derives from CATIniInputDescriptionAdaptor. This class is the adapter class of the CATIInputDescription interface. The CATDeclareClass macro declares that the CAAEMmrCombCrvInputDescription class belongs to a component. The copy constructor and the "=" operator are set as private to prevent the compiler from automatically creating as public.

The CATIInputDescription interface contains three methods to override:

[Top]

Implementing the CAAEMmrCombCrvInputDescription Class

The CATIniInputDescriptionAdaptor adaptor class deriving from the interface, CATIInputDescription can be implemented by the BOA mechanism [4], to improve the performances. 

...
CATImplementClass (CAAEMmrCombCrvInputDescription ,
                   DataExtension       ,    
                   CATIInputDescription      ,
                   CombinedCurve        );


CATImplementBOA(CATIInputDescription, CAAEMmrCombCrvInputDescription);
...
The CATImplementClass macro is used in conjunction with the CATDeclareClass macro in the class header file to express that the class is part of a CAA V5 Object Modeler component. Its argument read as follows:
  1. CAAEMmrCombCrvInputDescription: the class name
  2. DataExtension: the CAA V5 Object Modeler class type. 
  3. CATIInputDescription: The name of implemented interface
  4. CombinedCurve: the name of the extended component
The CATImplementBOA macro replaces the TIE_CATIInputDescription macro. Its arguments are the BOA-implemented interface and the extension class name respectively.
GetFeatureType Method

The Combined Curve feature is a feature of creation.  

HRESULT CAAEMmrCombCrvInputDescription::GetFeatureType
                         (CATIInputDescription::FeatureType& oFeature_type)
{
    oFeature_type = CATIInputDescription::FeatureType_Creation ;
    return S_OK ;
}

GetListOfModifiedFeatures Method

HRESULT CAAEMmrCombCrvInputDescription::GetListOfModifiedFeatures
                             (CATListValCATBaseUnknown_var& ListOfModifiedFeatures ) 
{    
    return E_FAIL ;
}

Since the Combined Curve is a feature of creation, this method must answer E_FAIL.

GetMainInput Method

HRESULT CAAEMmrCombCrvInputDescription::GetMainInput(CATBaseUnknown_var& oMainInput) 
{
    return E_FAIL ;
}

Since the Combined Curve is a feature of creation, this method must answer E_FAIL.

[Top]


In Short

This use case explains how to implement CATIInputDescription for a feature of creation.

[Top]


References

[1] Order and Absorption Concepts
[2] The Contents of the Specification Container - Geometrical Features
[3] Integrating a New Mechanical Feature in V5
[4] Creating Components
[Top]

History

Version: 1 [Nov 2003] Document created
[Top]

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