Category Archives: Uncategorized

Timed Screen Capture on OSX

I’ve done a couple of 3d printing timelapses using a little application called Iris for OSX. Iris doesn’t seem to like to save my movies for some reason, but it at least gets the output from my fin de siècle webcam onto my laptop’s display so I can do something with it, like capture the screen once a minute and write it to a file using a Python script.

The Scrying Pool to the right uses a very similar process to take snapshots of the Forge while I’m working.

I’ve written this script to be as simple as possible for a novice who knows very little about programming. Being familiar with the concepts of variables and loops before using this will help, but really you should be able to paint-by-the-numbers and get one screengrab a minute without any extra work.

Bonus: some version of Python comes pre-installed on OSX, so you don’t have to install anything to get this to run.

To use:

  1. Make a new folder on your Desktop named capture
  2. Open TextEdit.
  3. Copy this script into a new text file. Save it on your Desktop with the name capture.py
  4. Open the Terminal.
  5. In the Terminal type python ~/Desktop/capture.py

That’s it! You can stop the script from running by hitting Control-Z in the Terminal.

# everything following a hash sign is a comment. Python doesn't execute comments. They only exist to make your code more readable.
# this script requires that you have a folder on your desktop called "capture"

import os,time

delay=60 # this number is measured in seconds.
i=0 # i is a common variable used for loops. We'll use this in the infinite loop later.
counter=0

while i<1:

# this is an infinite loop! we never change the variable i, so i is always less than 1.
# this script will run forever. You have to quit it with CTRL-Z.
# see how everything inside this while loop is indented by one tab?

# create a command that the Terminal will execute. screencapture is built into OSX.
# str(counter) turns the integer "counter" into a string so that it can be added to the command string.
# if you don't do this, Python will throw an error.
# the -x option turns off the screenshot noise.
# the -o option tells the OS where to save the captured image.
# ~/Desktop is the command line shortcut to your Desktop.
# this script will name the files capture.1.png, capture.2.png and overwrite those filenames in ~/Desktop/capture/

cmd='screencapture -x -o ~/Desktop/capture/capture.'+str(counter)+'.png'

# have the OS execute the command.
os.popen(cmd)

# let the user know what you're doing by writing the command to the Terminal.
print cmd

# increase the file number by one.
counter=counter+1

#wait a little bit. You've already defined delay up at the top of the script.
time.sleep(delay)

# this comment is outside of the while loop.
# if our code were to continue, it would start here.
My apologies for the meshuggeneh formatting on the Python code above. Can’t make it work without a CSS overhaul for the entire blog.

Dualstrusion with MakerWare Beta 2.0

TL;DR summary: The UI’s handy and the MakerBot slicer is mind-blowingly fast, but I had a great deal of difficulty getting a dualstrustion to print with MakerWare.

I opened a support ticket with MakerBot yesterday, trying to get MakerWare to connect to my bot over USB. If you’ve read yesterday’s post you’ve seen the litany of troubleshooting steps I’ve already tried. Today I’m thinking maybe I’m due for a firmware upgrade, but we’ll see what MBI has to say before I fix things that are only slightly broken.

While I’m waiting for that request to percolate through the support structure I thought I’d try a workaround: printing from the SD card. I’m interested to see how MakerWare’s new dualstrustion generation works, because ReplicatorG’s method is a little kludgey.

This is MakerWare 2.0.1.211 running on OSX 10.6.8.

I’m going to print my Magic: The Gathering Vampire and Cat tokens, because I already have black and white ABS filaments loaded. One color for each token.

I import the cat and MakerWare helpfully asks me if i’d like to put the model on the build platform. Yes, yes, I would like to do that.

cat

I can command-c/command-v to copy and paste multiple cats onto the platform, and Makerware automatically places them next to each other. This is quite a nice little feature.

Just for fun I see if MakerWare will let duplicate cats off into empty space. It does.

lots of cats

The delete key rapidly relieves me of my extra cats. Next I import the vampire. The vampire and cat are cohabitating, which needs to be fixed before I can print. That’s a simple click and drag.

cohabitation

I’d like to have a keyboard shortcut for “Add,” if anyone from the dev team is reading this.

MTG Vampires are either black or red, so I need to change the vampire’s color. I click the vampire token and then the Object button, which brings up the properties of this instance.

There’s a strange, unused text field under the dropdown menu. No idea what this is for. I can’t click or type in it.

text field

Ah. It turns out this alleged text field is a white color swatch indicating the color of the model. I find this out when I go to change the cat’s color. A label would be helpful here for first-time naïfs like myself.

It’d be nice to have a double-click on the color swatch bring up a color picker. As is I have to go to the Settings button on the other side of the screen.

I go to change the color of the extruders in Settings, and MakerWare crashes.

changing colors

So. I retrace my steps and I’m back in business in two minutes.

Exporting the .thing to a file is a single click of the Make button, and I don’t have to mess with any settings here. I just choose “High Quality.”

welcome

Out of curiosity I poke into the Advanced settings. The speed while extruding /traveling seems really fast to me– I’m usually printing around 45/65 and MakerWare defaults to 80/150.

But I’ll give it a go since I’m trying to approach this software as if I’m a n00b who just unboxed my machine.

Skeinforge is the default slicer for High quality. The slice starts OK, and then seems to hang around 66%. I’ll give it a few more minutes and then try again.

I come back three minutes later and the slice weirdly jumps back to 33%. Two minutes later it does some “Weave” business, then a print-to-file step, and finally it’s done! Total slice time, about 15 minutes.

Remember I can’t print via USB yet, I’m exporting a .s3g file and then printing from the Replicator’s SD card slot.

The first layer looks like this:

fail

It looks like some piece of software, either MakerWare or Skeinforge, forgot to take the cat offset into account when building the gCode for this print.

So I try it again with the MakerBot slicer, which slices so quickly at first I think something’s wrong. It takes literally less than 30 seconds.

I believe that somewhere between 1.0 and 2.0 the in-application name of this slicer got changed from Miracle Grue to MakerBot Slicer. This is disappointing.

This print, too, failed in exactly the same fashion, so it’s not Skeinforge that’s the problem. I’m looking askance at you, MakerWare.

So I move the cat over a little bit, to force the geometry to change in the reslice.

nudged

Also, as long as I’m here I’m going to drop the travel speeds to something I’m more comfortable with; the machine’s rattling violently at the default speeds. Here’s the result, still overlapping.

fail

I’ll try one last time with plenty of distance between the models printing at 45/65 travel rates.

fail

And finally I get something close to a decent print.

final

The vampire printed fine, but there are little bits of black filament embedded in the white plastic– I have no idea how they got there. They don’t look like they rubbed off the left extruder head, and they don’t show up when I print models with a single extruder.

My hunch is that this is an atypical dualstrusion print– maybe I had such a hard time because MakerWare thinks all dualstrusion prints are intended to be fused together and not two models separated by a lot of space. I can’t say for sure.

It’s disappointing. MakerWare’s got a lot of promise but it’s not going to be a regular part of my workflow for a while.

Kapton tape. Not a good feature.

Ok, heads up. I really dig the Makerbot Replicator. Honest I do. I think it’s got great potential, and as a first-of-its-kind consumer level device it’s nothing short of revolutionary.

But Kapton tape has to go. If there’s one thing that diminishes the coolness of this device, it’s having to wrestle with a sheet of ill-fitting Kapton.

For the uninitiated, the Kapton is the substrate upon which all 3D prints are made. Before one runs a print, you’ve got to cover your heated build platform with a layer of space-age adhesive. It’s clingy, frustrating to work with, expensive, and absolutely essential to getting anything more than a blob of plastic ramen to print.

You can print a bunch of times with the same tape, but sooner or later it’ll get ripped, bubbled, or too filthy to use. Take off the tape and go through the painstaking process of getting it fitted to your heated build platform.

MakerBot Industries, hear my plea: do everything you can to get rid of Kapton tape in version 2.0.