Photo

Programming

Here I present a few pieces of code, mostly written in Python. Hopefully some of it is beneficial for somebody.

pyGC - Control Program for an automated CNC glass cutter

pyGC is a control programm for an automated CNC glass cutter. The program takes care of the communication to the TinyG board which is used to control the three axes of the cutter. It provides a GUI where dxf or gcode files can be loaded, previewed and the cutting is run.

Following features are implemented:

  • Automatic connection to the glass cutter (TinyG)
  • Manual control of the axis, inclusing homing and positioning
  • Loading of dxf and gcode/ngc files
  • Graphical preview of loaded files
  • Automatic tool selection. A wheel cutter is used for horizontal and vertical lines. A diamond scribe for labels.
  • Glass thickness is variable

Dependencies:

  • Linux (tested on Ubuntu 14.04)
  • Python 2.7, wxpython
  • dxf2gcode (http://sourceforge.net/p/dxf2gcode/)
  • TinyG for controlling the hardware (stepper motors and end-stops) (https://github.com/synthetos/TinyG).
  • The glass cutter is custom built using a Shapeoko 2 (http://www.shapeoko.com/wiki/).

DOWNLOAD (bei github.com)

 Screenshots:


2DTrace

2DTrace is a two-dimensional ray tracing module written in Python. 2DTrace provides a class structure to define ray sources, objects and detectors. The ray is then traced from the source until it is lost (leaves the "world") or until it hits a detector. So far there is no absorption implemented, however this could be easily done. The modular concept allows the addition of different objects. So far, a simple object defined by two analytical, mathematical functions (and its derivatives) is implemented.

DOWNLOAD (bei github.com)

 Screenshots:


Zim4A

Zim4A is an Android application which is written in Python and uses SL4A to make a Zim Desktop Wiki available for mobile devices running Android OS. So far, it is possible to browse the index of a Zim Desktop Wiki, to show formatted pages and edit them in the raw format. So far, the applications was only tested on a Sony Compact Z3 running Android 4.4.4.

The approach I used relies on Dropsync to synchronize my Zim wiki (which lives inside my Dropbox) onto my Android system.

Installation: After installing Dropsync and choosing a folder for your Notebook, copy all Zim4A files into the same folder in which the Notebook folder (default name: "Notes") is located. Then, copy the Zim4Astarter.py script to the script folder of Sl4A and change the "fullpath" variable to the location of your Notebook. That's it.

DOWNLOAD (bei github.com)

 Screenshots:


FLEG (Fast Latex Equation Generator)

FLEG is a clone of LatexIt for Linux/Ubuntu written in python. It generates Latex formulas in svg, pdf or png, which can be moved to other programs like Inkscape or LibreOffice, etc. using drag 'n drop.

DOWNLOAD (bei github.com)

 Screenshots:


pydrop

pydrop is a small plotting program for linux. It provides an easy drag and drop area for data files (ASCII) for quick plotting using the matplotlib module. So far, pydrop is still in an early beta stage.

DOWNLOAD (.zip - 57,9 kB)

Screenshot 1     Screenshot 2