New OpenSource CAM project: "camvox" | | Hello everyone,
I recently bought a Proxxon MF-70 CNC, with 4-axis. But I was pretty shocked at the lack of an open source CAM project for those kinds of machines.
So I decided to create a open source (GPL3) project myself, called "camvox". I am awaiting approval from sourceforge to host the project over there, otherwise I will host it at my own website.
The flow of the software is as follows:
- Describe the work-piece, material and tools using constructive solid geometry.
- Then convert the work-piece and material to high resolution voxel space.
- Remove material slice by slice without colliding the tool through the work-piece or too much material. Continue until there is no material left.
- Write the tool-path (g-code) made by the tool to disk.
The code is written in C++ for both speed and memory usage (voxel spaces tend to be memory hungry). It will be accessible through python, so one can build the CSG trees, make tool movements and write the g-code in an easier to use language.
The maximum voxel space will contain 2 billion oct tree nodes and use 68 GB of memory. If you will need all nodes of the octtree you can only go 10 deep or 1024 x 1024 x 1024 pixels. My mill can cut material of around 25 cm in length, so that is a minimum of 0.24 mm accuracy. In reality one would not use all the nodes of an octtree and the depth/accuracy should be much higher.
Right now the code can render a unit sphere at the origin into voxel space. It can also write a POV-RAY scene consisting of a bunch of oct-tree boxes.
Luckily the algorithm for rendering CSG into voxels is really simple and you can simply use characteristic functions of objects for inside-outside checking (x^2 + y^2 + z^2 + 1 is a characteristic function for a unit sphere).
So it is really easy to extend the number of primitives, or even use mathematical formulas to describe a surface. It is also possible to make a bag-of-triangles CSG object (for compatibility with CAD programs that create STL files) as long as the resulting object is a solid.
I am currently making the code ready for publishing and creating the python interface and optimising the voxel space memory usage.
I hope I will be able to get some feedback and help from everyone here.
Cheers,
Take |