Sunday, July 22, 2012

The Software - Design and Control.

Control


3d Printers obviously require some software to drive them. Currently this is a pretty straight forward stack. Most printers use an arduino for hardware control and most arduino are using usb (as a usb-to-serial device) to talk to the printer.

I use linux, you plug an arduino into it and it'll come up as serial so theres no driver problems. Windows folk sometimes have issues, but generally those work with externally provided drivers.

The software stack you'll need for driving a 3d printer falls into a couple of areas

  1. Drivers
  2. Firmware
  3. Firmware updaters
  4. Model Slicers
  5. Printer control
As a general rule this will mean:
  1. Arduino IDE (for re-uploading the firmware - and you'll need to do this)
  2. Slicers - Generally people are now using Slic3r, but sometimes sfact/skeinforge
  3. Printer Control - Generally this is Pronterface (or printrun)
  4. Firmware - there are several, Marlin, Sprinter, Repetier, 
The arduino IDE is used really only to update calibration data for your printer and then flash the firmware onto the control board. Current control boards all allow you to do this over the same usb interface you print with, older ones needed a programmer. Its pretty easy and im not going to go into that in any depth.

Slicers are software that will take a model (generally an STL) and convert it into "movements" that your printer will then perform in order to print your object - also known as gcode. There are several options for slicers. The most popular was Skeinforge/Sfact, but this is slowly being replaced with the simplier and easier driven Slic3r, but there are other decent alternatives such as Cura.

For printer control, theres really only 2 options, the almost all-consuming pronterface/printrun and repetier host also has its own control stack (which can drive both normal g-code based printers plus it has its own protocol for which you would need the customised repetier firmware)

For firmwares, theres generally 3 that are in use, Marlin (probably the most popular), Repetier and Sprinter (one of the original ones). Marlin and Repetier are both "step ups" from sprinter, they provider a few little extra's that you may or may not notice. They're all capable of being controlled by the same gcode though so its really quite simple to use them all.

And thats it.... Everything you see above is available equally on Linux, Windows and Mac OS and is FOSS. You can print for free!

However, there is one other component to the software stack that is almost a requirement. Often when you get models (stl's) they'll be "broken" in some way. Very common on thingiverse and even CAD software sometimes outputs broken stl's. As such this has led to the use of a bit of software called NetFabb Studio (or netfabb cloud) which can repair these broken models. Its available for free on all platforms in the form of its basic studio, and hopefully it stays that way, but its the one component of the stack that remains in a hazy proprietary license.

Design and CAD

This bit is optional and only required if you want to design your own parts. Again, im going to focus mainly on the free options out there (or at least those that available to linux-sporting folk such as myself).

As an x-engineer im quite fluent with AutoCAD (and rhino as it happens). As an x-3d graphics guy, im quite fluent with just about every form of software out there, Maya, 3ds, lightwave, Blender, this list is long.

Both blender and Maya are available in linux formats though since AutoDesk aquired Maya and they seem very anti-linux so god knows how long it will be before that linux port starts to disappear entirely. 

Blender is the only FOSS one in that stack with a largish community. And Blender is quite amazing - quite competitive with the Prioprietary 3d stacks.

For designing printable parts, you'll generally want CAD style software however. While 3d (artistic-focused) software is capable of generating objects you can work with, they lack alot of precision and often dont even care much about units. So heres a list of some of the software that falls into that category:
  1. AutoDesk AutoCAD or Inventor (not cheap)
  2. Rhino 3d (not cheap either)
  3. FreeCAD (FOSS, GPL)
  4. OpenSCAD (FOSS, GPL, parametric modeller)
  5. Netfabb (never used it for this purpose, but i believe it does this?)
  6. Heeks Cad
  7. Google Sketchup.
  8. Solidworks.


If your on a linux desktop like myself then there are a few options, but i've settled on two mainly, FreeCAD and OpenSCAD. These are both very CAD oriented applications with very very different methodologies.

FreeCAD

FreeCAD aims for an experience most CAD sporting folks (such as autocad users) will find more appealing. Its not hugely like autocad, its just a similar design paradigm. Its much simplier then AutoCAD or inventor, and there are features i really miss from both those but you can do quite well with it. If you browse on over to my model viewer, you'll see some quite complicated models i've designed in FreeCAD. It is very functional, but it has some serious pain points for an inventor/autocad user:

  1. Rotations are a nightmare - I cannot stress this enough, this is my most hated part of FreeCAD. The co-ordinate system they settled on for applying rotations to a model makes me want to kill myself.
  2. No xrefs - if you know what these are you know how wonderfull they are. Cant do this with FreeCAD
  3. The tools you have available to model with are quite simple - AutoCAD has a tool for almost any user, often these tools greatly overlap. There is almost no overlap in tools in FreeCAD
  4. No Snapping in 3d - this is generally another painful problem.
But there are also some plusses to it
  1. Unlike autocad its been designed with 3d in mind from the beginning so it does 3d quite well (in fact you could say its no use as a 2d CAD in reality). AutoCAD on the other hand isnt great at making 3d models, it has the tools, but they're sparse and inventor is a much better product for this.
  2. Quite parametric. I initially hated the lack of a command line (that autocad has) on freecad. It has a python console, but its really nothing like AutoCAD's command line. However, every model is really designed via dimensioning when you create it and as you build up a model it forms this heirachy of sequences that end with some complex model. The beauty of this is that you can then go back and modify parts inside your model on the fly. This is a very good part of FreeCAD and should not be under-estimated - its the most useful component of the FreeCAD stack.
Thats a brief view of how I see FreeCAD stacking up. Its probably the best CAD option for users coming from a CAD background.

OpenSCAD

The premise behind OpenSCAD is VERY different from CAD. Basically you design by programming. It has its own language which you use to generate models and its like designing models by writing software. Its a very powerful piece of software and not to be underestimated. As a traditional CAD user, unless you wrote software for AutoCAD in Lisp you'll be completely at sea with it, but if you persist you'll understand its power. Its available (FOSS and GPL) under linux, windows, mac.

I really only use OpenSCAD to generate gears, but heres what I see are its pluses and minuses, first the minuses.
  1. As a traditional CAD user, its a steep learning curve
  2. As a programmer, its a steep learning curve (as i am both, its not so bad, but still quite hard)
  3. Compiling models can be a pain, it doesnt do incremental compiles as such so as your model gets more and more complex the length of time to show your model gets longer and longer - that is irritating.
  4. Lacks some generic modelling tools (such as filleting).
The pluses:
  1. If you've coded and used CAD, you'll "get" it pretty quickly
  2. Very modular design - much like writing code you can grab modules other people have written to perform tasks for you (such as generating gears) and then simply add them to your model. This is very cool.
However, I think the way OpenSCAD has been written is its biggest downfall. It is entirely self contained, its an IDE, a renderer, compiler and everything all in one. It uses no external components and as such I personally think thats a big drawback. What I think OpenSCAD should have been would be quite simply summed up as "eclipse plugin" with a java-centric design. Some may laugh, but consider what this would give you (keep in mind, im not a lover of java, quite the opposite):
  1. Eclipse has substantial tools for compiling (dependency generation, incremental compiles, the works - it is very complete and very powerful)
  2. Eclipse can deal with project modularity very well - i.e. I want to make an openscad project that uses Greg Frosts gear generation tools - eclipse would be brilliant for this.
  3. Eclipse has a very functional IDE - I dont really like openscad's ide
  4. Eclipse has a very functional set of debugging tools.
  5. Theres no reason to ditch openscads own language.
Personally, i think eclipse *IS* the tool that openscad should have targeted and its a shame its a very independent design. I would love to re-write it as an eclipse plugin, but i hate coding java and i know i'd not get very far.


No comments:

Post a Comment