Machining

Prismatic Machining

Managing User Defined Features in Axial Operations

Implementing the CATIMfgDesignHoleParameters interface
Use Case

Abstract

This article discusses the CAAPmiUdfForMfgHole use case and explains how to implement the CATIMfgDesignHoleParameters manufacturing interface.


What You Will Learn With This Use Case

This use case is intended to help you apply an axial operation from a User Defined Feature, by implementing the CATIMfgDesignHoleParameters manufacturing interface. This involves the following:

[Top]

The CAAPmiUdfForMfgHole Use Case

CAAPmiUdfForMfgHole is a use case of the CAAPrismaticMachiningItf.edu framework in the CAAPmiUserDefFeatureMappedWithMfgFeature.m module that illustrates ManufacturingInterfaces framework capabilities.

[Top]

What Does CAAPmiUdfForMfgHole Do

CAAPmiUdfForMfgHole illustrates an implementation of CATIMfgDesignHoleParameters interface for the User Defined Features identified by the UdfFeature type. This implementation enables to use all axial features functionalities, but it cannot answer to the all industrial cases. It corresponds to a default mapping of a User Defined Feature into an axial machining feature.

[Top]

How to Use CAAPmiUdfForMfgHole

To use CAAPmiUdfForMfgHole, you will need to:

[Top]

Where to Find the CAAPmiUdfForMfgHole Code

The CAAPmiUdfForMfgHole use case is made of a class named CAAPmiUdfForMfgHole located in the CAAPmiUserDefFeatureMappedWithMfgFeature.m module of the CAAPrismaticMachiningItf.edu framework:

Windows InstallRootDirectory\CAADoc\CAAPrismaticMachiningItf.edu\CAAPmiUserDefFeatureMappedWithMfgFeature.m
Unix InstallRootDirectory/CAADoc/CAAPrismaticMachiningItf.edu/CAAPmiUserDefFeatureMappedWithMfgFeature.m

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

[Top]

Step-by-Step

There are three logical steps in CAAPmiUdfForMfgHole:

  1. Implementing the CATIMfgDesignHoleParamaters Interface for UdfFeature Types
  2. Creating a User Defined Feature Template and Generating Instances
  3. Applying the "Standard Drilling" Machining Process on a User Defined Feature Instance

We now comment each of those sections by looking at the code.

[Top]

Implementing the CATIMfgDesignHoleParameters Interface for UdfFeature Types

  1. The CAAPmiUdfForMfgHole.cpp file uses the "CATIUdfFeatureInstance.h" interface to to access to the User Defined Feature information. Then, the right data is accessed by its right role name. For example, to define the drilling coordinates by the GetOrigin method of the CATIMfgDesignHoleParameters interface, you scan all the User Defined feature inputs to find the right one named "Drilling_Point" [2]. See below a part of the implementation

    ...
          // Read the Inputs number: this is the geometrical inputs of your Udf
          //                         defined when creating the Udf template
          //----------------------------------------------------------------------
          int InputNb = 0;
        RC = piUdfFeatureInstance->GetInputsNumber(InputNb);
          //----------------------------------------------------------------------
          // Scan all the Udf Inputs to find the right input, identified by its
          // role name in our case: the right role name is "Drilling_Point"
          // defined at the Udf definition. This is a means to easily access to
          // the right input
          //----------------------------------------------------------------------
          for (int i =1; i <= InputNb && role != "Drilling_Point"; i++)
    	{
    	  RC = piUdfFeatureInstance->GetInputRole(i, role);
    	  if (role == "Drilling_Point")
    	    {
    	      RC = piUdfFeatureInstance->GetInput(i,spInputGeom);
    	    }
    	}
          //----------------------------------------------------------------------
          // The right Input is found
          //----------------------------------------------------------------------
          if (role == "Drilling_Point")
    	{
    	  //------------------------------------------------------------------
    	  // Extract the drilling point coordinates
    	  //------------------------------------------------------------------
    	  CATPoint *pPoint = NULL;
    	  RC = spInputGeom->QueryInterface(IID_CATPoint,(void **)&pPoint);
    	  if (SUCCEEDED(RC))
    	    {
    	      oX = pPoint->GetX();
    	      oY = pPoint->GetY();
    	      oZ = pPoint->GetZ();
    	      RC = S_OK;
    	    }
    	  if (NULL != pPoint) pPoint->Release();
    	}
        ...
  2. Update the interface dictionary, that is a file named, for example in this case, CAAPrismaticMachiningItf.edu.dico, whose directory's pathname is concatenated at run time in the CATDictionaryPath environment variable, and containing the following declaration to state that the UdfFeature feature implements the CATIMfgDesignHoleParameters interface, and whose code is located in the libCAAPmiUserDefFeatureMappedWithMfgFeature shared library or DLL. Pay attention to remove the comment (#) in the supplied dictionary.

    UdfFeature CATIMfgDesignHoleParameters libCAAPmiUserDefFeatureMappedWithMfgFeature

    The CAAPrismaticMachiningItf.edu.dico file is located in:

    Windows InstallRootDirectory\CAADoc\CAAPrismaticMachiningItf.edu\CNext\code\dictionary\
    Unix InstallRootDirectory/CAADoc/CAAPrismaticMachiningItf.edu/Cnext/code/dictionary/

[Top]

Creating a User Defined Feature Template and Generating Instances

Here, you will find specific informations according to the implementation of the CATIMfgDesignHoleParameters interface. You can access to the User Defined Feature Workbench under the Shape Design Workshop, then edit the UserFeature1 under the UserFeatures tree, and display the different tab-pages, specially Inputs, Outputs and Parameters one:

Note that the User Feature template is defined in the CAAPmiUdfForMfgHoleTemplate.CATPart file, and you can instantiate it in any Part document containing 1 point on a planar surface.

[Top]

Applying the "Standard drilling" Machining Process

[Top]


In Short

This article provides an example on how to use the manufacturing interface classes, to machine User Defined Features. It shows how to implement the CATIMfgDesignHoleParameters interface to be authorized to drill any geometry. This is an elementary step to do this.

[Top]


References

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

History

Version: 1 [April 2001] Document created
[Top]

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