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
34
35
36
|
package org.reprap;
import org.reprap.gui.PreviewWindow;
import org.reprap.machines.MachineFactory;
/**
* Class to execute a test where a square is printed
*/
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(reprap);
preview.setVisible(true);
reprap.setPreviewer(preview);
reprap.calibrate();
reprap.selectExtruder(0);
reprap.setFeedrate(reprap.getExtruder().getXYFeedrate());
//reprap.getExtruder().setExtruderSpeed(180);
reprap.getExtruder().heatOn();
// Print a square, rotated 45 degrees
reprap.moveTo(20, 5, 2, true, false);
reprap.printTo(15, 10, 2, false);
reprap.printTo(20, 15, 2, false);
reprap.printTo(25, 10, 2, false);
reprap.printTo(20, 5, 2, true);
reprap.terminate();
}
}
|