Machining |
Prismatic Machining |
Managing User Features in Pocketing Operations through Machining Process InstantiationImplementing the CATIMfgMappingForPocketing interface |
Use Case |
AbstractThis article discusses the CAAPmiUdfForPocketing use case and explains how to implement the CATIMfgMappingForPocketing manufacturing interface. |
This use case is intended to help you to execute the geometrical mapping of a User Defined Feature to a Pocketing operation through the Machining Process instantiation functionality, by implementing the CATIMfgMappingForPocketing manufacturing interface. This involves the following:
[Top]
CAAPmiUdfForPocketing is a use case of the CAAPrismaticMachiningItf.edu framework in the CAAPmiUserDefFeatureMappedWithMfgFeature.m module that illustrates ManufacturingInterfaces framework capabilities.
[Top]
CAAPmiUdfForPocketing illustrates an implementation of CATIMfgMappingForPocketing interface for the User Defined Features identified by the UdfFeature type. This implementation enables to machine any design feature by using a pocketing operation, but it cannot answer to the all industrial cases.
[Top]
To use CAAPmiUdfForPocketing, 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 CATIMfgMappingForPocketing libCAAPmiUserDefFeatureMappedWithMfgFeature
Windows | InstallRootDirectory\CAADoc\CAAPrismaticMachiningItf.edu\CNext\resources\graphic\ |
Unix | InstallRootDirectory/CAADoc/CAAPrismaticMachiningItf.edu/CNext/resources/graphic/ |
[Top]
The CAAPmiUdfForPocketing use case is made of a class named CAAPmiUdfForPocketing 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 CAAPmiUdfForPocketing:
Note that the the coding step and the build time step are linked (see below).
We now comment each of those sections by looking at the code.
[Top]
The CAAPmiUdfForPocketing.cpp file uses the
"CATIUdfFeatureInstance.h" interface to access to the User Feature
information. Then, the right data is accessed by its right role name. Refer
also to the CATIMfgDesignHoleParameters
documentation for detailed documentation on this interface.
The CAAPmiUdfForPocketing.cpp file uses the "CATIMfgMappingRuleName.h" interface to find the right input defining the driving curve for a given pocketing operation: This interface enables to access to the Mapping Rule name associated to the pocketing operation.
... CATUnicodeString role = ""; CATBaseUnknown_var spInputGeom; //---------------------------------------------------------------------- // 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); //---------------------------------------------------------------------- // Read the mapping rule name associated to the Pocketing operation //---------------------------------------------------------------------- CATUnicodeString MappingRuleName = ""; CATIMfgMappingRuleName *piMappRuleName = NULL; RC = this->QueryInterface(IID_CATIMfgMappingRuleName,(void **)&piMappRuleName); if (SUCCEEDED(RC) && NULL != piMappRuleName) { MappingRuleName = piMappRuleName->GetMappingRuleName(); piMappRuleName->Release(); piMappRuleName = NULL; } //---------------------------------------------------------------------- // Scan all the Udf Inputs to find the right input // identified by their role names are well defined. This right role // name is "Drive" or "Upper_Drive" if either the mapping rule name is "Upper_Drive" or // not defined //---------------------------------------------------------------------- int i =1; if (MappingRuleName == "Upper_Drive_Rule" || MappingRuleName == "") { while (SUCCEEDED(RC) && i <= InputNb && (role != "Drive" && role != "Upper_Drive")) { RC = piUdfFeatureInstance->GetInputRole(i, role); if (role == "Drive" || role == "Upper_Drive") { RC = piUdfFeatureInstance->GetInput(i,spInputGeom); } i++; } //---------------------------------------------------------------------- // The right Input is found //---------------------------------------------------------------------- if (SUCCEEDED(RC) && (role == "Drive" || role == "Upper_Drive")) { oGuidingCurves.Append(spInputGeom); RetCode = S_OK; } } //---------------------------------------------------------------------- // The right role name is "Lower_Drive" in case of "Lower_Drive_Rule" mapping rule name //---------------------------------------------------------------------- else if (MappingRuleName == "Lower_Drive_Rule") { while (SUCCEEDED(RC) && i <= InputNb && role != "Lower_Drive") { RC = piUdfFeatureInstance->GetInputRole(i, role); if (SUCCEEDED(RC) && role == "Lower_Drive") { RC = piUdfFeatureInstance->GetInput(i,spInputGeom); } i++; } //---------------------------------------------------------------------- // The right Input is found //---------------------------------------------------------------------- if (SUCCEEDED(RC) && role == "Lower_Drive") { oGuidingCurves.Append(spInputGeom); RetCode = S_OK; } } ... |
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 CATIMfgMappingForPocketing interface, and whose code is located in the libCAAPmiUserDefFeatureMappedWithMfgFeature shared library or DLL. Pay attention to remove the comment (#) in the supplied dictionary.
UdfFeature CATIMfgMappingForCOntouring 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 CATIMfgMappingForPocketing interface. You can access to the User Feature functionalities under the Part Design or Shape Design Workbench, then create a DoublePocket under the UserFeatures tree, and display the different tab-pages, specially Inputs, Outputs and Parameters one:
[Top]
[Top]
This article provides an example on how to use the manufacturing interface classes, to machine User Features. It shows how to implement the CATIMfgMappingForPocketing interface to be authorized to machine any geometry by using a pocketing operation. 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.