Machining |
Prismatic Machining |
Managing User Defined Features in Axial OperationsImplementing the CATIMfgDesignHoleParameters interface |
Use Case |
AbstractThis article discusses the CAAPmiUdfForMfgHole use case and explains how to implement the CATIMfgDesignHoleParameters manufacturing interface. |
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]
CAAPmiUdfForMfgHole is a use case of the CAAPrismaticMachiningItf.edu framework in the CAAPmiUserDefFeatureMappedWithMfgFeature.m module that illustrates ManufacturingInterfaces framework capabilities.
[Top]
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]
To use CAAPmiUdfForMfgHole, you will need to:
Windows | InstallRootDirectory\CAADoc\CAAPrismaticMachiningItf.edu\CNext\code\dictionary\ |
Unix | InstallRootDirectory/CAADoc/CAAPrismaticMachiningItf.edu/CNext/code/dictionary/ |
where InstallRootDirectory
is the directory where the CAA
CD-ROM is installed, and decomment the following line by removing the '#CAA#'
character:
UdfFeature CATIMfgDesignHoleParameters libCAAPmiUserDefFeatureMappedWithMfgFeature
Windows | InstallRootDirectory\CAADoc\CAAPrismaticMachiningItf.edu\CNext\resources\graphic\ |
Unix | InstallRootDirectory/CAADoc/CAAPrismaticMachiningItf.edu/CNext/resources/graphic/ |
[Top]
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]
There are three logical steps in CAAPmiUdfForMfgHole:
We now comment each of those sections by looking at the code.
[Top]
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(); } ... |
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]
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]
Note that a drilling operation is created in the Machining Program
[Top]
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]
[1] | Building and Launching a CAA V5 Use Case |
[Top] |
Version: 1 [April 2001] | Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.