summaryrefslogtreecommitdiff
path: root/branches/sm-unittesting/src/org/reprap/SquareTest.java
blob: 33f964bfdd773634f4593271a445b03554e2faec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package org.reprap;

import org.reprap.gui.PreviewWindow;
import org.reprap.machines.MachineFactory;

public class SquareTest {
	
	public static void main(String[] args) throws Exception {
	
		Printer reprap = MachineFactory.create();

		// Comment out the following three
		// lines if you don't have java3d or don't want to preview
		PreviewWindow preview = new PreviewWindow();
		preview.setVisible(true);
		reprap.setPreviewer(preview);

		reprap.calibrate();
		reprap.selectMaterial(0);
		reprap.setSpeed(248);
		reprap.setExtruderSpeed(180);
		reprap.setTemperature(60);

		// Print a square, rotated 45 degrees
		reprap.moveTo(20, 5, 2);
		reprap.printTo(15, 10, 2);
		reprap.printTo(20, 15, 2);
		reprap.printTo(25, 10, 2);
		reprap.printTo(20, 5, 2);
		
		reprap.terminate();
	}
}