 (defmulti generate (fn [x] (:kind x)))
 
 (defn drawing-name [x]
-  (str "10" (nextline)  "$" (upper-case (subs (str x) 1))))
+  (str "10" (nextline) "$" (upper-case (subs (str x) 1))))
 
 (defn drawing-point [name x]
   (str (drawing-name name) (nextline) (point (name x))))

)

(defmethod generate :layer [l]
  (str
    "0" (nextline) "LAYER" (nextline)
    "2" (nextline) (upper-case (:name l)) (nextline)
    "70" (nextline) (:flag l) (nextline)
    "62" (nextline) (:color l) (nextline)
    "6" (nextline) (:lineType l)
  ))

(defmethod generate :style [s]
    (str
      "0" (nextline) "STYLE" (nextline)
      "2" (nextline) (upper-case (:name s)) (nextline)
      "70" (nextline) (:flag s) (nextline)
      "40" (nextline) (:flag s) (nextline)
      "41" (nextline) (:widthFactor s) (nextline)
      "50" (nextline) (:obliqueAngle s) (nextline)
      "71" (nextline) (:mirror s) (nextline)
      "42" (nextline) (:lastHeight s) (nextline)
      "3" (nextline) (upper-case (:font s)) (nextline)
      "4" (nextline) (upper-case (:bigFont s))
    ))

(defmethod generate :linetype [l]
  (str
    "0" (nextline) "LTYPE" (nextline)
    "2" (nextline) (upper-case (:name l)) (nextline)
    "70" (nextline) (:flag l) (nextline)
    "3" (nextline) (:description l) (nextline)
    "72" (nextline) "65" (nextline)
    "73" (nextline) (count (:elements l)) (nextline)
    "40" (nextline) "0.0"))

(defn common [c]
  (let [parent (:parent c c)]

    )))

(defmethod generate :face [f]
  (join (nextline) [
    "0" "3DFACE"
    (common f)
    (points (:points f))
  ]))

