summaryrefslogtreecommitdiff
path: root/branches/sm-unittesting/src/org/reprap/Printer.java
blob: ec3ffa8bc75dea52f0a54a5eedb30c5d9a62a32e (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package org.reprap;

import java.io.IOException;

import org.reprap.gui.Previewer;

public interface Printer {

	public void calibrate();

	public void printSegment(double startX, double startY,
			double startZ, double endX, double endY, double endZ) throws ReprapException, IOException;
	
	public void moveTo(double x, double y, double z) throws ReprapException, IOException;
	public void printTo(double x, double y, double z) throws ReprapException, IOException;

	public void selectMaterial(int materialIndex);
	
	/**
	 * Indicates end of job, homes extruder, powers down etc
	 *
	 */
	public void terminate() throws Exception;
	public void dispose();
	
	
	public int getSpeed();
	public void setSpeed(int speed);
	public int getExtruderSpeed();
	public void setExtruderSpeed(int speed);
	public void setPreviewer(Previewer previewer);
	public void setTemperature(int temperature) throws Exception;

	public boolean isCancelled();

	public void initialise();
	
	public double getX();
	public double getY();
	public double getZ();
	
	/**
	 * Get the total distance moved (whether extruding or not)
	 * @return a double representing the distance travelled (mm)
	 */
	public double getTotalDistanceMoved();
	
	/**
	 * Get the total distance moved while extruding
	 * @return a double representing the distance travelled (mm)
	 */
	public double getTotalDistanceExtruded();
}