git.haldean.org plotter / 7ae9725
support for <polygon> elements Haldean Brown 3 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
409409 (list '(:G . 2) (cons :X xx) (cons :Y yy) (cons :I (- r)) '(:J . 0))
410410 (list '(:G . 0) '(:Z . 1))
411411 ))))
412 (defun load-unxf-polygon (svgm d)
413 (let ((points (load-path-args (cadr (assoc "points" (cadr d) :test #'string-equal)))))
414 (run-stanzas (append (list (list #\M (first points) (second points)))
415 (normalize-stanza (cons #\L (cddr points))))
416 svgm)
417 ))
412418
413419 (defun load-unxf-gcode (svgm data)
414420 (funcall (alexandria:switch ((caar data) :test #'string-equal)
415421 ("path" #'load-unxf-path)
416422 ("line" #'load-unxf-line)
417423 ("circle" #'load-unxf-circle)
424 ("polygon" #'load-unxf-polygon)
418425 (otherwise (lambda (svgm &rest _) svgm))
419426 )
420427 svgm data))