From 6c6dc92c24fa2aa120c1d85cecf5e97ccefbb96a Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 2 May 2015 23:12:59 +0200 Subject: Add Circle --- cutter.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cutter.go') 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) +} -- cgit v1.2.3