Pattern of hemispherical pockets cut out of prototyping foam.
SRM-20 CNC mill just after vector cutting text strings onto a part.
SRM-20 CNC mill cutting hemispherical pockets with openCAM.
Text, previously cut out of foam with a CNC mill and openCAM
Rendering of openCAM G-Code output given a string and various external libraries.
G-Code was originally deployed to the CNC/NC industry in the mid-1950's as a way of executing pre-determined vector paths on a machine tool using magnetic tape. It was an effective use of the present technology.
Today, more than 60 year's after its introduction, nearly every CNC machine (and most 3D printers) in the world still relies on G-Code. Despite several orders of magnitude of technological advancement in hardware and software, G-Code is still the standard.
In a modern CNC workflow, G-Code is clunky, confusing, limited in functionality, and arguably dangerous to use. Reliance on arbitrarily enumerated machine commands leads to an extremely high learning curve, unclear program purpose, and ambiguous flow. It's confusing to write, and especially hard to read. It's also severely limited in functionality due specifically to its age.
Our team of CS and MEs have well over 6 cumulative years of CNC experience and software development. We know G-Code is not a viable solution to advance manufacturing. We were convinced we could make an elegant programming interface designed for modern machine controllers.
What it does
openCAM is an extensible Python framework for interfacing with your CNC machine. It's designed to run natively on your new/upgraded machine. It's also backwards compatible with older machines and can export a functionally equivalent G-Code program (to the extent of functionality currently supported by G-Code).
Even simple machine operations in G-Code can be hundreds of lines long and impossible to follow or tweak. On the contrary, once you've defined an operation in openCAM, it can be re-used throughout all your parts in just one or two lines of code. This is because openCAM focuses on procedural abstraction, so you can write your machine paths in terms of operations that you're actually interested in, and let whoever wrote that operation care about the details. That might be yourself from the past, it might be someone down the hall, or it might be someone writing an open source library of threading profiles.
Unlike G-Code, openCAM was built to be object oriented. Our innovative approach to patterning and transformation makes it an incredibly fluid and powerful tool for artists, engineers, and machinists.
Anyone can easily leverage openCAM to their unique needs. Python gives you immediate access to numpy, openCV, Django, and hundreds of other widely supported frameworks. For the first time, it's easy to add QA to a mill bed and adjust cutting operations on the fly. Networking machines together is made simple, empowering numerical analysis and targeted throttling of production. Or, if Twitter is your thing, there are APIs for that too. This flexibility empowers creativity and innovation in design and R/D, and can save hundreds of hours of wasted time on manufacturing lines.
openCAM revolutionizes the CNC industry.
How we built it
Our framework was built in Python. We worked to design and implement a set of composable types that lets you hierarchically define geometry. Geometry can then be cut simply by applying a position to an established shape. Behind the curtain, we created a library for creating lines of GCode that does not depend on remembering code numbers. Our development cycle involved constant prototyping of our framework and compiler on desktop CNC mills we brought to the Hardware Cortex. We prototyped openCAM with a CAMotics simulator and a Roland SRM-20 Desktop Mill.
Challenges we ran into
Hardware is hard. In order to prove our framework, we needed to run it on actual CNC machines. We received a number or machines from vendors and OEMs sponsoring our team. Unfortunately, these are complex machines and they are especially hard to ship. We lost many hours on Friday and Saturday before we could determine that one of our machines was missing critical components.
Accomplishments that we're proud of
We've received tremendous support from the manufacturing industry. We initially reached out asking for loaner machines for a quirky hackathon project. We were blown away by how many machines we were offered. We've held several teleconferences and discussions with leading OEMs discussing the uniqueness and potential capability of our product.
Despite hardware complications with our machines and delays in the timely development of efficient data structures, we were able to achieve the most complicated element of our project in a matter of hours. We initially set a stretch goal of multi-op 3D carving, but due to smart planning and an incredible dev team, we confidently pursued this goal and completed it prior to most of our other goals.
What we learned
openCAM is designed to work with whatever geometry you give it. It should be able to handle milling an extruded rectangle just as easily as carving text with a provided font. We spent most of our planning time developing data structures and procedures for responsibly handling troublesome geometry. Circular and and rectangular bores were easy to handle, but arbitrary patterns and user-defined geometry caused issues with all of our early DS concepts. Properly separating theses notions of geometry (which can actually be manufactured) from patterns (which determine where various pieces of geometry get placed) ended up being the system we needed to be able to write intuitive code for somewhat more complex parts.
What's next for openCAM
Our goal for openCAM has always been to help new users start CNCing, and to empower veteran users to get the most out of their existing tool and workflow. We are incredibly excited to see how the industry uses openCAM.
openCAM was initially designed for 3-axis CNC mills. However, this is just a subset of CNC machines the world depends on. openCAM's modularity in handling operations as objects should make it straightforward to start interfacing with other CNC machine tools.