In preparation for some hacking on the Student Robotics motor feedback, I’ve written a script for generating PDFs containing rotary encoder patterns. I wrote a utility that used cairo in C a while back. I thought I’d try out pycairo. It was pretty much the same experience. I’ve put it up on gitorious. Run it like this:
% git clone git://gitorious.org/rotenc/rotenc.git % cd rotenc % ./rotenc Usage: rotenc INNER_DIAMETER OUTER_DIAMETER N_SEG OUT_FILE Where: INNER_DIAMETER is the diameter of the inner circle in millimetres. OUTER_DIAMETER is the diameter of the outer circle in millimetres. N_SEG is the number of segments to draw OUT_FILE is the name of the pdf file to write to. % ./rotenc 50 60 16 encoder.pdf %
Update:I thought I’d experiment with Thingiverse, and upload it there.
Site by Robert Spanton. © 2008 - 2018