NCSim was written due to a simple need. I needed such a simulator for resaons I might have the time to add to this page in the future, and further desired one I can explore as deeply as I had like. Hence NCSim. NCSim is free to use, in non commercial applications. Send me Email with interesting G-Code examples I could post and add here, or Email me examples that fail so I could fix NCSim at some point. Finally, let me know if you have ideas how to extent and make this program more useful.
BECAUSE NCSim AS DOCUMENTED HEREIN IS LICENSED FREE OF CHARGE, I PROVIDE ABSOLUTELY NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING, I GERSHON ELBER PROVIDE THE NCSim PROGRAM AND ITS SUPPORTING TOOLS "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THIS PROGRAM IS WITH YOU. SHOULD THE NCSim PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL GERSHON ELBER, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR A FAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY GERSHON ELBER) THE PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
NCSim is a fully capable 3-axis CNC simulator that can handle "reasonable" 3-axis G codes. It interprets G0,G1,G2,G3 geometric motions commands only, while allowing different tools (T commands), feedrates (F command) and spindle speeds (S commands) control. All other G-codes and M-codes are ignored. Since the simulation is based on a (software) Z-buffer, The output geometry of the simulation can be saved as a polygonal mesh as either an IRIT file, an STL file or an IGES file. Similarly, the toolpath itself, as a polyline, could be saved into an IRIT or an IGES file.
Usage is simple. Load a text G-code file, using "File -> Load NC File". A small widget will query the units (mm or inches) you expect to work in and if arc centers in this G-code G2/G3 commands have relative or absolute coordinates. The G-Code text and the tool path's geometry should appear in two separated windows. Alt-P will then open a Parameters widget for this specific simulation. Click on 'Save' or 'Ok' will save all the parameters of this widget in a file name identical to the G-code file but with the suffix "_ncsim.cfg". This config file will be automatically read in next time you upload the G-code file.
You probably want to try something immediately so make sure "NC Z-buffer" is checked in the Parameters widget and click on the "video-control" 'Forward' button in the main window to start your first simulation. All the provided examples have proper *_ncsim.cfg files with them so you can simply load them and press the 'Forward' button immediately.
You probably also want to know about Alt-R which opens another widget to control the way the graphics display is rendered. In the graphics display window, click-left mouse button allows you to rotate the scene while the click-right mouse mouse offers translation control. The middle mouse button scales the scene. Unfortunately there is no help for NCSim at this time, beyond tool-tip on pretty much everything.
The sources are available here for non commercial use only, built using VC++ 8/9.0. Beware that they depend on a couple of large packages: the Irit solid modeling system, http://www.cs.technion.ac.il/~irit, and wxWidgets, http://www.wxwidgets.org/ (a very nice multi-platform GUI environment). Both are free packages as well (Irit is free for non commercial use only) but are not trivial to work with. If you really want the sources and consider yourself an expert, make sure to successfully download and compile these two packages before trying to build NCSim. I do not expect to provide much support for NCSim at any level, users or developers, so please do not Email me with basic compilation question. Please contact me only if you find incompatibilities between the irit code and NCSim as both are undergoing a continuous update and might be out of sync. Interesting GCode contibution examples are always welcome as well.
For automatic installation for Windows XP/7, simply download this NCSimInstall.exe and execute it. This automatic installation also unpacks a few NC Gcode examples in a NCSimData subdirectory (relative to the selected root directory, "c:\util" by default).
To manually download the Windows XP/7 executable of the simulator click here. Unpack NCSimExe.zip into a new clean directory and edit NCSim.cfg. Unless you have VC++ 9.0 (.net) SP1 on your system you will also be required to install the run time env. of this compiler from Microsoft. The first non-comment line of NCSim.cfg lists another run-time-saved configuration file of all the GUI related state (like application size and position, sub-windows sizes, etc.). Change that to a diretory and name you desire. Other changes in NCSim.cfg are not mandatory.
To download a few G-code examples, some from the WEB (that were tested to work:-) click here.
There are other features to this simulator that I needed and are there for you to find. Below are a few spanshops for NCSim to provide you with some hints: