
04-18-2007, 04:35 PM
|
 | Power User | | Join Date: Mar 2005 Location: USA
Posts: 461
| |
What is a C-Hook ? C-Hooks and NET-Hooks are add-in applications or utilities that customize, enhance, or extend Mastercam's functionality. They can be created by individual users, resellers, third-party application developers, or by CNC Software itself. C-Hooks are written in C/C++, while NET-Hooks can be written in major .NET languages such as Visual Basic.NET, C#, or J#. Both are compiled into standalone DLLs and installed in the \Chooks folder in your Mastercam program directory.
Your Mastercam installation CD includes the necessary resources for you to create your own C-Hooks or NET-Hooks.
The C-Hook development kit includes all the necessary SDKs and documentation. You can install it separately anywhere on your workstation.
The NETHook.dll is installed in your Mastercam program directory when you install Mastercam. It contains all the NET-Hook programming resources that your .NET development tool needs.
The included APIs expose a significant amount of Mastercam's functionality and feature set. In addition, a number of useful C-Hooks are already supplied with Mastercam. Mastercam also provides a number of ways for you to integrate C-Hooks or NET-Hooks into the Mastercam workspace to further customize the interface.
To run a C-Hook or NET-Hook that hasn't been added to the interface, select Settings, Run User Application from the menu, or press [Alt+C]. Mastercam displays a list of all the C-Hooks and NET-Hooks available on your workstation. Select the desired DLL and click Open.
Notes:
You must have the necessary C/C++/.NET programming skills and the proper development tools to compile and link your program. These include Microsoft® Visual Studio®.NET 2003 (version 7.1) or later. These topics are outside the scope of Mastercam and this documentation.
You can also create scripts using Visual Basic. Mastercam supplies a number of classes and objects for your use, as well as an editor and run-time environment (Settings, VBScript). Unlike NET-Hook DLLs, scripts do not need to be compiled, so their development is simpler.
|
What is the Rolldie C-Hook ? The Rolldie C-Hook creates toolpaths around a rotary axis. The toolpath can be rounded or squared on outside sharp corners. When a tapered tool is used, the tool can run up and down the crease formed at the intersection of two walls at an inside sharp corner.
The chained entities selected to create the toolpath can be in the flat or already rolled. Typically this toolpath is used to generate 5-axis tool vectors around a rotary axis, but there is an option to produce a 3-axis toolpath from flat input. This is typically selected for tapered tools.
In addition to calculating the toolpath, Mastercam also creates the rolled geometry. If you wish, set the geometry color and level before running the C-Hook to organize it.
Follow these steps to run the C-Hook:
Open your part file and select the Rolldie C-Hook.
Chain the contours from which the toolpath is to be generated. They may be either flat or pre-rolled condition.
Mastercam displays the Toolpath parameters tab, where you can select a tool.
If you are creating a 5-axis rolled toolpath and the part is not already rolled, select Rotary axis. In the Rotary axis dialog box, select Axis substitution. Set the diameter, rotation direction, and which axis is to be replaced.
Select the Contour parameters tab and enter your cutting parameters.
Set Depth to a negative amount and choose Incremental. This sets the depth of the tool tip. If you use a tapered tool, the toolpath will be offset so that the edge of the tapered tool runs on the wrapped or flat chain, resulting in the depth that you have entered.
Select OK when done.
Mastercam displays the Rolldie dialog box. Set your RollDie options and click OK to generate the toolpath.
|
Hope this helps.
I copied this from Mastercam's help documents. |