aboutsummaryrefslogtreecommitdiff
path: root/cutter.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-02 23:12:59 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-02 23:12:59 +0200
commit6c6dc92c24fa2aa120c1d85cecf5e97ccefbb96a (patch)
tree1b1cbcdaac0ef8d10bd159664e0891eac9292c5f /cutter.go
parent32514def6432733208a39905ad2ba28fbaddfbaa (diff)
Add Circle
Diffstat (limited to 'cutter.go')
-rw-r--r--cutter.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cutter.go b/cutter.go
index aa97552..2e087a4 100644
--- a/cutter.go
+++ b/cutter.go
@@ -14,6 +14,10 @@ func (p Point) Add(u Point) Point {
return Point{p.X + u.X, p.Y + u.Y}
}
+type Polar struct {
+ R, Theta int
+}
+
type Path []Point
/*
@@ -357,3 +361,9 @@ func (c Cutter) ManualSearchMarks(p Point) bool {
c.Send("TB23,", p)
return c.parseDigit() == 0
}
+
+func (c Cutter) Circle(p Point, start, end Polar) {
+ c.Send("W", p, ",",
+ start.R, ",", end.R, ",",
+ start.Theta, ",", end.Theta)
+}