thebitbangtheory.com-cnc software toolchain for linux

6
CNC Software Toolchain for Linux thebitbangtheory.com /2012/01/cnc-sof tware-toolchain-linux/ Posted in , , , , Hi! Some time ago I made a post about My Home Lab where I showed a small CNC that I built. In the same post I said that someday I would post some details on the software toolchain and that's exactly what I'm going to do in this post. The process of using a CNC to make 3D parts follows three simple steps: 1. Design the parts. To design the parts I use HeeksCAD. HeeksCAD is a free, open source, CAD application written by Dan Heeks. I found it some time ago and I think that there isn't any free, open source software that can be compared to it. It is really, really great and allows you to design the parts. You can: Import solid models from STEP and IGES files; Draw construction geometry and lines and arcs, create new primitive solids, or make solids by extruding a sketch or by making a lofted solid between sketches; Modify solids using blending, or boolean operations. Save IGES, STEP and STL. Printer plot the 2D geometry or to HPGL.

Upload: mragsilverman

Post on 29-Dec-2015

41 views

Category:

Documents


2 download

DESCRIPTION

cnc

TRANSCRIPT

Page 1: Thebitbangtheory.com-CNC Software Toolchain for Linux

CNC Software Toolchain for Linuxthebitbangtheory.com /2012/01/cnc-sof tware-toolchain- linux/

Posted in , , , ,

Hi! Some time ago I made a post about My Home Lab where I showed a small CNC that I built. In the same post Isaid that someday I would post some details on the software toolchain and that's exactly what I'm going to do in thispost.

The process of using a CNC to make 3D parts follows three simple steps:

1. Design the parts.

To design the parts I use HeeksCAD. HeeksCAD is a free, open source, CAD application written by Dan Heeks.

I found it some time ago and I think that there isn't any free, open source software that can be compared to it. It isreally, really great and allows you to design the parts. You can:

Import solid models from STEP and IGES files;

Draw construction geometry and lines and arcs, create new primitive solids, or make solids by extruding asketch or by making a lofted solid between sketches;

Modify solids using blending, or boolean operations.

Save IGES, STEP and STL.

Printer plot the 2D geometry or to HPGL.

Page 2: Thebitbangtheory.com-CNC Software Toolchain for Linux

Import and export dxf files;

Drawing lines, arcs, ellipses, splines and polylines is supported.

Constraint based designs are also supported!

Learning how to use it is really simple and intuitive. There are some video tutorials in youtube that will teach you howto use all the features of HeeksCAD. Check the video below to see it in action. A few more video tutorials areavailable on youtube.

Update (18/03/12): Recently I found out about FreeCAD which became my #1 choice in CAD software. It is very richin features and the possibility of making constraints-oriented drawing makes it very easy and fast to work with. Afterdrawing in FreeCAD you can export it as .dxf but to import it in HeeksCAD you first need to open the .dxf in QCadand then save it again with the same format. For some reason HeeksCAD cannot open the .dxf files exported byFreeCAD. You can also export the 3D models in a .step file and then directly import them in HeeksCAD. Quick, fastand works great!

The other two 3D CAD that I have ever used are Google Sketchup (free) and Alibre Design (commercial) but noneof them can be used in linux. Google Sketchup was really easy to use, but missed some very useful features likethe support for constraint based design. On the other hand, Alibre Design is a really good, professional, easy to usesoftware but you have to buy it. However, I consider that HeeksCAD is a lot closer to Alibre Design than to GoogleSketchup. There is also a 3d modelling software that can be used in linux, which is OpenSCAD. OpenSCAD is notan interactive modeller. Instead it is something like a 3D-compiler that reads in a script file that describes the objectand renders the 3D model from this script file. It gives you full control over the modelling process and enables you toeasily change any step in the modelling process or make designs that are defined by configurable parameters.However, since I was used to Alibre Design, FreeCAD became my #1 CAD (HeeksCAD being #2) software on linux.HeeksCAD also has a very good feature that, as far as I know, none of the other softwares that I referred has andwill be described in the next step.

Page 3: Thebitbangtheory.com-CNC Software Toolchain for Linux

2. Generate the G-Code f rom the designed parts.

To generate the G-Code from the designed parts I use the HeeksCAD plugin, HeeksCNC. HeeksCNC allows you tochoose between several types of cutting operations such as pocketing or profile operations, among others. You canset the tolerances, the steps, the tools to be used, etc. The first image on this post shows the toolpaths in green. Youcan see another tutorial showing how to use the HeeksCNC plugin below:

Regarding the milling of PCBs I use the pcb2gcode application. You just have to place a "millproject" file inside thefolder where you have the gerber files of your PCBs and run the application in the console. My "millproject" filecontains the following data:

# this is an example config file for pcb2gcode.# place this in the same directory as your gerber files to save typing# You may want to uncomment and change those in local project files#front=mirror-Inferior.gblback=Sensibilizadora-Inferior.gbldrill=Sensibilizadora.drl#outline=contour.back.gbr#verbose# parameters for isolation routing / engraving / etchingzwork=-0.008zsafe=0.8zchange=1.0mill-feed=6mill-speed=30000# parameters for cutting out boardscutter-diameter=0.059055118zcut=-0.08cut-feed=3cut-speed=20000cut-infeed=1# drilling parameterszdrill=-0.08drill-feed=3drill-speed=20000#offset=0.006# generate voronoi regionsoffset=1.0dpi=1000#max-deviation=0

The first "millproject" file that I found and used as an example ever since was the one found in the RepRap Wiki.There's also some good info there. Check it out!

With pcb2gode you can generate a PCB with Voronoi regions. Voro.. what? I'll explain A PCB with Voronoi regions isa PCB where the isolation routing is optimized for the shortest path to be made by the CNC machine. Below you cansee the difference between a normal PCB and a PCB with Voronoi regions:

Page 5: Thebitbangtheory.com-CNC Software Toolchain for Linux

3. Send the G-Code commands to the machine.

To perform this final step I use the Linux EMC2. You can install it in your computer or you can run it as a live CD. Ithink it is a very good and simple to use software for controlling machines. Yes, I'm saying machines because youcan can control various types of machines with it. It has a wizard makes it very easy to create a profile for your owncustom CNC Machine where you can customize the connections and the speeds and frequencies of the signals tobe applied to the motors. It also features two manual control modes: the jog mode, and the console mode. In the jogmode you can control the machine using your mouse or your keyboard. In the console mode you can send it G-Code commands.

Page 6: Thebitbangtheory.com-CNC Software Toolchain for Linux

And with these three steps I think you are ready to make anything with your CNC using only free, open sourcesoftware I hope you liked it and if you have any questions or suggestions of other software that I do not mention inthis post, feel free to leave them in the comments section below! See you next time!

Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics,robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using thebutton below. Thanks!

Tags:

Previous PostNext Post

Previous PostNext Post