
Vincent Rouilly from OpenWetWare.org is using Contraptor plotter to build an open source robot for microbiology lab. Needless to say, I am pretty excited about this! We've been exchanging emails, modding Arduino GCode Interpreter and figuring out how to drive a plotter head with a cheap servo. He made a great suggestion to use different colors for different components in Sketchup files. Up till now, the 3D model of a contraption would be pretty much required to look at during assembly. With components in color, assembly from Sketchup screenshots (or printed pages) is a whole lot easier.
To automate this, I wrote a quick Ruby script which creates several layers in Sketchup model and moves different components to different layers (or rather, assigns layers to components to be technically correct). The layers can then be displayed each in its own color. Unfortunately, Sketchup API doesn't have a way to set layer colors programmatically - kind of a bummer. However, the colors can be set rather quickly by hand via RGB values in Layers panel. I used the following sequence of colors:
To use: drop the attached script into Sketchup/Plugins folder and restart Sketchup; select components to color and do Plugins > Contraptor > Components to layers. Then set RGBs for each layer. The script is very easy to modify in case other components need to have a color, and there are still 3 remaining basic colors - Teal, Purple, Olive.
This is a screenshot of a belt-driven mini-router that I've assembled with the intention to perform one very time consuming drilling job. More on this later.
| Attachment | Size |
|---|---|
| contraptor_components_to_layers.rb | 1.29 KB |