Machining

NC Review

Adding Commands in the Toolbar of the Cut Areas Command

Implementing CATIMfgTPECutAreasUserHeader
Use Case

Abstract

This article discusses the CAAMfgTPECutAreasUserHeader use case.

What You Will Learn With This Use Case

This use case is intended to help you insert your own command in the cut areas tool bar of the tool path editor.
[Top]

The CAAMfgTPECutAreasUserHeader Use Case

CAAMfgTPECutAreasUserHeader is a use case of the CAAToolPathEditorItf.edu framework that illustrates ToolPathEditor framework capabilities.
[Top]

What Does CAAMfgTPECutAreasUserHeader Do

CAAMfgTPECutAreasUserHeader help you to insert your own command in the cut areas tool bar as shown on Fig.1.
 
Fig. 1: The cut area tool bar
[Top]

How to Launch CAAMfgTPECutAreasUserHeader

To launch CAAMfgTPECutAreasUserHeader, you will need to:
[Top]

Where to Find the CAAMfgTPECutAreasUserHeader Code

The CAAMfgTPECutAreasUserHeader use case is made of a class named CAAMfgTPECutAreasUserHeader located in the CAAMfgTPEAddCmdInCutAreaToolBar.m module of the CAAToolPathEditorItf.edu framework:
 
Windows InstallRootDirectory\CAADoc\CAAToolPathEditorItf.edu\CAAMfgTPEAddCmdInCutAreaToolBar.m
Unix InstallRootDirectory/CAADoc/CAAToolPathEditorItf.edu/CAAMfgTPEAddCmdInCutAreaToolBar.m

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

[Top]

Step-by-Step

There is one logical step in CAAMfgTPECutAreasUserHeader: We now comment these section by looking at the code.
[Top]

Implementing CATIMfgTPECutAreasUserHeader

The class that will implement the command is named CAAMfgTPECutAreasUserHeader.
Create the CAAMfgTPECutAreasUserHeader header file:
 
class CAAMfgTPECutAreasUserHeader: public CATBaseUnknown
{
  CATDeclareClass;
  public:
    // Standard constructors and destructors for an implementation class
    // -----------------------------------------------------------------
    CAAMfgTPECutAreasUserHeader ();
    virtual ~CAAMfgTPECutAreasUserHeader ();
    /**
     * Implements a function from an interface.
     * @see ToolPathEditorInterfaces.CATIMfgTPECutAreasUserHeader#GetHeaders
     */
    HRESULT GetHeaders (CATListValCATString & ioHeadersList ) ;
  private:
    // The copy constructor and the assignment operator must not be implemented
    // ------------------------------------------------------------------------
    CAAMfgTPECutAreasUserHeader (CAAMfgTPECutAreasUserHeader &);
    CAAMfgTPECutAreasUserHeader&
    operator=(CAAMfgTPECutAreasUserHeader&);
};

The CAAMfgTPECutAreasUserHeaderclass C++-derives from CATBaseUnknown. The class has a constructor, a destructor, and the method of the interface CATIMfgTPECutAreasUserHeader.

First you have to implement the method GetHeaders, which will provide you with getting the standard headers and to give the application yours own headers of command.
 
HRESULT CAAMfgTPECutAreasUserHeader::GetHeaders (CATListValCATString & ioHeadersList)
{
  HRESULT hRes= S_OK;
  // User's list of Headers of command.
  ioHeadersList.Append(CATString("TPEPolylineSelectionUser"));
  ioHeadersList.Append(CATString("TPEOnePointSelectionUser"));
  return hRes;
}

You have to fill the list which the name of yours owns headers of command. As a result, these commands are added in the cut area tool bar of the tool path editor. These commands are always activated.

[Top]

In Short

This article provides an example on how to customize the cut area tool bar of the tool path editor.
[Top]

References

[1] Building and Launching a CAA V5 Use Case
[Top]

History

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

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