Doodle3D / print3d

The application that runs on a Doodle3D WiFi box that communicates with printers.
www.doodle3d.com
GNU General Public License v2.0
13 stars 4 forks source link

PRINT3D README

This package provides access to multiple types of 3D printers. It aims to be usable at least on OSX and Openwrt (linux) and currently provides a command-line frontend and a lua binding.

HOW TO BUILD

This package is intended to be built either for embedded devices using the Openwrt build system or natively using CMake. Building natively is done using the script build-local.sh (or manually). The included Eclipse CDT project also has the necessary targets configured. Requirements to build and run the code natively are: cmake (more to come). Building for OpenWRT is slightly complex and not described here.

C++ unit tests use Fructose 1.2.0 (http://fructose.sourceforge.net/).

Startup scripts

The Print3D package includes shell scripts that start print3D when a printer is connected.

Command-line usage

After building they can be added to your path using for example:

sudo ln -s "$PWD/build/Debug/frontends/p3d" /usr/bin/p3d
sudo ln -s "$PWD/build/Debug/server/print3d" /usr/bin/print3d

In one terminal window you can start print3d:

print3d -V -d tty.usbmodemXXXXXX -p ultimaker

In another you can send commands using p3d:

p3d -v -c 'G28 X Y Z'

Miscellaneous notes

Code would be more readable and maintainable if all code was C++ (except for the Lua binding, which is the reason for the code partly being written in C). In hindsight, the IPC mechanism seems overly complicated because GCode has to be split up in very small chunks. A simpler mechanism should be possible (e.g. shared memory or even an existing library). Interesting read on various IPC mechanisms: http://www.advancedlinuxprogramming.com/alp-folder/alp-ch05-ipc.pdf.