Richard Irons April 10, 2003
91.548 Robotics I
Project I, Mill Work CAD
I chose Mill Work CAD as my project for a number of reasons. I had initially planned to work on a project that focused on creating a robot. After realizing that many of my classmates were doing that as well, I decided to go with something different and write the Mill Work CAD tool. Professionally, I work as a Software Engineer writing graphics code for CAD software. In this capacity, I have had some exposure to exporting data to different file formats. I believed that creating a tool that required me to utilize my skills as a programmer would allow me to learn about an aspect of CAD software in which I have limited exposure. This is the aspect of converting CAD data into a standard export format and using the exported data for a machining process. This project has given me an appreciation of the tasks involved in actually designing something from scratch ultimately to have it milled.
When I started the project, I knew very little of how an engraving machine worked. This project was appealing because it offered an opportunity to learn about how engraving and milling machines worked. Additionally, I was hoping that the project would give me some actual experience in working with a standard file format. In the case of this project, that file format was HPGL. This project forced me to develop a good understanding of HPGL. In my professional career, I normally don't need to develop my knowledge of a file format to the degree that was required for this project. In short, I chose this project because it allowed me to use my software engineering skills to develop a tool in which I would be required to learn about the Roland machine, file formats, and engraving. My hope was that I would develop some new insight that could possibly help me in my professional career.
Mill Work CAD is a software tool (Source code, Build Instructions) that allows 2D objects to be sketched and exported to a HPGL file. The HPGL file can then be sent to the Roland engraver in order to engrave the object. Mill Work CAD has predefined entities called "stubs" and "notches" that can easily be associated with an object. By using the "stubs" and "notches", multiply objects can be designed that can be attached together. Items that could possibly be created using this process are a small box or a small house.
Mill Work CAD has a simple menu system that is invoked by pressing the right mouse button. Sketch selections are made using the left mouse button. The following table describes the menu structure:
Operation -Description
File/New -Create new sketch
File/Open/<file names> -Open existing sketch files
File/Save -Save a sketch file (non-standard file format)
File/Export -Export current sketch to HPGL
File/Exit -Exit Mill Work CAD
Edit/Move Vertex -Move a sketch vertex*
Edit/Add Vertex -Add a sketch vertex*
Edit/Add Stub -Add a stub to an edge
Edit/Add Notch -Add notch to material surface
Edit/Delete Vertex -Delete a sketch vertex*
Edit/Delete Stub -Delete a stub
Edit/Delete Notch -Delete a notch
Preview -3D shape preview (not implemented)
Color Schemes -Color scheme options
*Moving, adding, or deleting a sketch vertex will clear all stubs and notches from the current sketch.
Mill Work CAD uses OpenGL graphics for all graphical display. The GLUT toolkit that is based on OpenGL is used for all window and menu support. The strength of GLUT is that it is virtually platform independent. This allows Mill Work CAD to work on both Windows and UNIX machines. I have verified that Mill Work CAD does work on at least a Sun Solaris UNIX workstation.
Another feature of Mill Work CAD is the persistence of sketches that are created. After creating a sketch, it can be saved using the File/Save menu option. File names are automatically assigned starting with a sequence number of 1 up to 99. Sketches can then be retrieved later for further modification or for exporting. I developed my own file format to use for saving the sketches of the project (Sample sketch file).
There were aspects of this project that I found difficult. Two of these areas were creating the HPGL export file and writing the code for the "stub" and "notch" entry. Creating the HPGL export file was difficult because I had to first learn HPGL. I then had to determine the correct HPGL commands to issue and to express the coordinates in the HPGL file in the correct units. The "stub" and "notch" entry code was rather challenging because "stubs" needed to be positioned and rotated correctly and "notches" needed to be equally spaced only within the sketched object.
Another difficulty I had was that router bits would become loose during milling and would no longer cut into the mill material.
The project is currently partially functional. I was able to successfully mill sketches using balsa wood, but the "notch"/"stub" fit was not very snug. This loose fit is caused by the HPGL export code not taking into account the router diameter when generating the mill paths.
I consider the project done and I do not plan any additional work on it. There are four features that I would like to add if I chose to continue to work on this project. One of these features would be to provide the 3D preview mode. This mode would construct a 3D representation of the sketch and allow the spinning and zooming of the 3D object. Additionally, I would add automatic placement functionality that would allow the selection of an edge on one sketch and a placement surface on another sketch. Mill Work CAD would then determine the "stubs" (edge) and "notches" (surface) that each of the sketches should have. Another interesting feature would be to provide an implementation of Mill Work CAD that worked with a 3D mill machine. Finally, I would like to modify Mill Work CAD so that the size of the router is taken into account will milling a shape.
There were aspects of this project that were unsuccessful. I had originally proposed a sketch tool that would ultimately mill a LEGO type block. After working with the Roland machine for a while, I can now appreciate how difficult this would have been. This did seem to be a good idea at the time. This approach was abandoned due to the difficulty of engraving a 3D object on the Roland engraving machine.
Another idea that didn't work out was using thick wood as a mill material. I purchased 1/8" thick aspen with the hope of using it as my mill material. Even though aspen is not a hard wood, the Roland machine did not work well with it. I had numerous problems of the router bit coming loose from the spindle. The router would then no longer cut and in one instance, the bit snapped in two. I was ultimately able to successfully mill shapes using a 1/16 " router while using 3/32" balsa wood as the mill material.
Another idea that I abandoned was using CAMM-GL as the file format that I sent to the engraver. Once I found out that HPGL was supported by the Roland machine, I decided to use HPGL instead of CAMM-GL. HPGL seemed easier to use and there was much more documentation on HPGL then there was on CAMM-GL.
I think this project was a good learning experience. I learned a significant amount about the Roland machine and HPGL. I also had some fun developing an interesting software tool. I do not want to continue work on Mill Work CAD for my second project. I will instead try to develop something that uses the Logo Chip and Cricket.