git.haldean.org plotter / bc79753
go "home" at end of program Haldean Brown 4 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
99
1010 (defparameter gcode-preamble '(((:G . 1) (:X . 0) (:Y . 0) (:F . 100))
1111 ))
12 (defparameter gcode-postamble '(((:G . 0) (:Z . 1))
13 ((:G . 0) (:X . 0) (:Y . 0))))
1214
1315 (defun reshape-to-2x3 (vs)
1416 (clem:array->matrix
458460 (format nil "~,2F" n)))
459461 (emit-assignment (reg) (format nil "~A~A" (car reg) (gcode-number (cdr reg))))
460462 (emit-line (line) (format nil "~{~A~^ ~}" (mapcar #'emit-assignment line))))
461 (format nil "~{~A~^~%~}" (mapcar #'emit-line (svgm-gcode svgm)))))
463 (format nil "~{~A~^~%~}" (mapcar #'emit-line (append (svgm-gcode svgm) gcode-postamble)))))