This script will allow you to move the Sprite and then save the motion as an SVG polyline. In the example, we move the Sprite like a Turtle Graphics program, save each new point and then export the SVG. You can modify the script to take sensor input or mouse input or game play, and save the paths as an SVG file. We use the SVGs to drive our DIWire, the desktop wire bender. To use the script: Remix the script and use the custom blocks. Here is how they work. Start File - Add's a header to SVG File Text list End File - Add's footer/closer to the SVG file text list shows the list with instructions of how to export the file. Start Line - Add's new line syntax to the SVG File Text list Add Point - Records the location of the Sprite and multiplies it by the scale of the file (currently mm) End Line - Add's End Line syntax You can have multiple points per line and multiple lines in the same file. Then right click on the SVG File Text list and export the file. Change the yourfilename.txt to yourfilename.svg and you are good to go. NOTE: Starting a line with a negative X value can sometimes fail to read the file. Perhaps a bug?
This script was created by Pensa Labs, the maker of the DIWire - a desktop cnc wire bender. With this script, you can program Scratch to create drawings that can bent out of wire. See more here: www.pensaLabs.com