MillSim: A Cutter Path Simulation and Product Visualization Tool
MillSim reads a NC program line by line, detect any errors, and transforms the NC program into an AutoLISP program, which once loaded in AutoCAD allows the user to visualize the virtual machining operations and generates a 3D model of the final part. MillSim utilizes a commercial computer-aided design (CAD) software tool, AutoCAD, to perform virtual NC verification. Incorporating NC verification capability into CAD software tools not only reduces software cost but also shortens user training time. Unlike commercial NC verification software tool that generates a 3D image, MillSim generates a 3D model of the machined part that allows more detailed analysis. Students in the Computer-Aided Manufacturing class are currently using this tool in their class projects. Click here to download the installation package.
Instructions for
Using MillSim
Verify
NC Program
Add Block Number
Check Syntax
Generate AutoLISP File
Save AutoLISP file
Open AutoCAD to Simulate the Cutting Result
MillSim will attempt to load the tool database after it is run. If MillSim is properly installed, the message box in Figure 1 will appear. Just click OK to load the default tool database. Otherwise, you need to either load a valid tool database from another directory, or create a new tool database using the interface shown in Figure 2.

Figure 1

Figure 2
After tool data is loaded, click "Open" under "File" menu. Then chose your NC program as the file to be opened. See Figure 3 for opening your program. The opened file is shown in Figure 4.

Figure 3

Figure 4
1. Add Block Number:
· Go to menu "Verify" and
click "Add Block Number"
· In the window "Block Number
Format" click OK.
· Click YES when system prompts “Do
you want to replace the existing NC program?” (shown in Figure 5, the result is
shown in Figure 6.)

Figure 5

Figure 6
2. Check Syntax:
· Go to menu "Verify" and
click "Check syntax"
· If the syntax of your program is
correct, the system will prompt "Syntax checking passed!" (shown in
Figure 7.)
· If the syntax of your program is
not correct, the system will prompt an error message. You can correct your code
and try again (shown in Figure 8.)

Figure 7

Figure 8
3. Generate AutoLISP code to simulate cutting
· Go to menu "Verify" and
click "Simulate"
· In window "Stok
Specification" click GO! to accept the default setting (Figure 9.)
· The AutoLISP file will be
generated automatically and then you can click OK (shown in Figure 10.)
· Go to Menu "File" and
click "Save as"
· Give a name to your AutoLISP file
and save it (Figure 11).

Figure 9

Figure 10

Figure 11
Open AutoCAD to Simulate the Cutting Result
Start AutoCAD 14
· Go to Menu "Tools" and click "Load
Application…"
· From the pop up window, click on File.
· Select the AutoLISP file from the new pop up window, click on Open (Figure
12).
· Now the new pop up window closes, click on Load in the first pop up window.
· In command line type "(millsim)" (Figure 13)
· Hit the Enter key, AutoCAD will setup 4 view ports for simulation. You are
then prompted to enter the simulation speed (Figure 14).
· Enter the simulation speed by typing a number from 1 to 10
(1 is the slowest and 10 is the fastest). AutoCAD will simulate all the
cutting movements. The result of the simulation is shown in Figure 15.

Figure 12

Figure 13

Figure 14

Figure 15