Creating Tools
 
Functions Introduced:
In Creo+, and therefore in Creo TOOLKIT, tools are not features, and must be created in a slightly different manner for solid and manufacturing features.
Tool creation involves initializing an input structure using a call to ProToolinputAlloc().
You set the tool type (for example, center drill or ream) directly in the input structure using the function ProToolinputTypeSet().
You can then add tool elements to this input structure using a three-step process. First, initialize each element using the function ProElementAlloc(). Next, add data to this element using an element-specific function. Finally, add the element to the tool input structure using ProToolinputElemAdd().
As in Creo+, tools can be defined by parameter or by model. To add a parameter to a tool, first allocate the space for a parameter element using a call such as this:
status = ProElementAlloc (PRO_E_PARAM, &element);
Next, add the parameter to the element using the function ProToolElemParamAdd(), then add the element itself to the input structure using the function ProToolinputElemAdd().
The following table lists the parameters required to be defined for each turning tool.
Parameter
Turn
Turn Groove
NOSE_RADIUS
TOOL_WIDTH
SIDE_WIDTH
LENGTH
SIDE_ANGLE
END_ANGLE
GAUGE_X_LENGTH
GAUGE_Z_LENGTH
TOOL_MATERIAL
HOLDER_TYPE
The following table lists the parameters required to be defined for milling tools.
Parameter
Mill
Side Mill
Thread Mill
Groove
CUTTER_DIAM
CORNER_RADIUS
CUTTER_WIDTH
SHANK_DIAM
LENGTH
INSERT_LENGTH
END_OFFSET
SIDE_ANGLE
GAUGE_X_LENGTH
GAUGE_Z_LENGTH
NUM_OF_TEETH
TOOL_MATERIAL
The following table lists the parameters required to be defined for auxiliary and contouring tools.
Parameter
Auxiliary
Contouring
CUTTER_DIAM
LENGTH
The following table lists the parameters required to be defined for holemaking tools.
Parameter
Drill
Csink
Tap
Ream
Center Drill
Bore
BackSpot
CUTTER_DIAM
POINT_DIAMETER
DRILL_DIAMETER
BODY_DIAMETER
LENGTH
CHAMFER_LENGTH
DRILL_LENGTH
INSERT_LENGTH
TIP_OFFSET
GAUGE_OFFSET
CUTTING_OFFSET
SIDE_ANGLE
POINT_ANGLE
CSINK_ANGLE
GAUGE_X_LENGTH
GAUGE_Z_LENGTH
TOOL_MATERIAL
Refer to the Creo+ NC Manufacturing Help for more information.
Creating a tool using a tool model is similar to the previous process. First, allocate space for an element of type PRO_E_TOOL_MODEL. Set the model in the element using the function ProToolElemModelSet(), then add it to the input structure using ProToolinputElemAdd(). As in Creo NC, you must specify the required number of dimensions within the tool model.
Creating the tool requires two steps. First, initialize a tool handle using ProToolInit(). This creates a tool identifier that uniquely defines the tool and is used to reference that tool within the manufacturing model. You pass this identifier, together with the completed input structure, to the function ProToolCreate(), which actually creates the tool.
Once the tool has been created, release the memory used by the tool input structure and its associated elements using the function ProToolinputFree().
The following table shows the elements required for tool creation. In this table, the Value column specifies whether the element is required (R) or optional (O).
Element
Description
Value
Name
The name used to identify the tool
R
Type
Mill, drill, and so on
R
Parameters (for parameter-driven tools only)
Tool parameters
R
Model (for solid tools only)
Model that represents the tool
R
The function ProToolFileRead() creates a new tool or redefines an existing tool. The input arguments for this function are as follows:
tool_handle—Specify the handle to the tool to be created or redefined.
input_file—Specify the full path and name of the input file that contains all the parameter information about the tool to be created or redefined.
The function ProToolFileWrite() writes all information about the tool into a file. Pass the following as input arguments to this function:
tool_handle—Specify the handle to the tool whose information is to be saved.
output_file—Specify the full path and name of the output file where the tool information is to be saved.
¿Fue esto útil?