While I’ve been having a ton of fun with my MakerBot Thing-O-Matic, generating the gcode to run the machine takes an amazingly long. Despite having a quad-core Core2Duo running a hair over 2.5GHz, Skeinforge is not efficient. Python isn’t fast at that much number crunching, and the process that turns the 3D model into a series of 2D layers is almost totally serial.
- Memory usage: memory-hungry Python programs (several hundreds of MBs or more) might end up taking less space than they do in CPython. Compatibility: PyPy is highly compatible with existing python code. It supports cffi, cppyy, and can run popular python libraries like twisted, and django. It can also run NumPy, Scikit-learn and more via a c.
- So I just installed ReplicatorG for my ctc printer and the installation went well, im able to connect to my printer, move the motors and heat up the plate all from replicator. But when i try to print something, It tells me that i need a python interpreter and a Python screen pops up with the options to modify repair or uninstall python. Ive tried modify a couple times and repair a few times to.
I’ve been using a program called Pleasent3D to look at the gcode Skeinforge makes to look for errors. While reading about the software, I found a blog entry by the author describing how he got tired of waiting on Skeinforge and then ported the gcode gene ration algorithms to Objective-C and ended up with a massive speedup (up to 230x in one module).
ReplicatorG was originally abandoned at version 0040 in 2012, since Makerbot had better things to do (cough, cough). Liam Marshall (@archimedespi) created this fork with the intention of modernizing and continuing development. ReplicatorG is an open source project, owned.
Now I don’t want to get away from the official MakerBot way of doing things yet, I’m not that confident. The easiest way to speed up Skeinforge would be to speed up Python. People used to recommend Psycho, but it is no longer updated and doesn’t run in 64-bit mode (like Python does on my Mac). I finally got around to playing with PyPy, which grew out of Psyscho, to see just how much of a difference it made. I’d seen references to other people doing this, so I knew all the libraries had to be there.
Replicatorg Python Interpreter
![Replicatorg Replicatorg](/uploads/1/1/7/8/117849601/382888453.png)
Installing PyPy was as easy as downloading a pre-built binary distribution and unzipping it. The problem is that to use PyPy with Skeinforge (and therefor ReplicatorG), you need to have TkInter installed. I found a great set of steps to follow in a PyPy blog entry about using the IDLE IDE. The only problem was the TkInter package for PyPy is looking for Tk8.4, but OS X Lion has 8.5. Luckily since it’s a point release I figured I could just swap them out and it worked out fine. I updated the files in the tkinter-pypy install file and it worked fine (updated zip for download). Making ReplicatorG use PyPy is as easy as selecting it in the preferences window.
So I ran some benchmarks by running a couple of models through with both CPython and PyPy with my normal profile, no support:
Model | CPython | PyPy | Speed |
---|---|---|---|
20mm calibration cube | 19s | 13s | 1.46x |
Vica illusion sculpture | 5m 36s | 1m 48s | 3.11x |
V8 cam shafts | 6m 37s | 1m 18s | 5.09x |
Tank! | 2h 45m 29s | 38m 45s | 4.27x |
As you can see, PyPy can be dramatically faster. I chose the Tank! model (which unmodified is about 4x the max print area on my ToM) to see just how big the difference would be on very complex models. Getting a 4x speedup is a great result, but there is just one minor problem: the gcode is different. Generating gcode should be deterministic. Given the same profile, the same model, and the same version of Skeinforge you should always get the same output.
In the case of the 20mm calibration cube, the gcode is identical. But for every other model, it’s different. The F parameters on the move commands are different, and sometimes the points seem different. I haven’t looked at it too hard yet. It seems like it might be due to floating point differences, but PyPy is supposed to be a drop in replacement for most Python programs so I doubt this should be happening.
Replicatorg Software Windows 10
I’m going to have to look into it further.