;;; ------------------------------------------------------------------
;;; jdx »­½Ø¶ÏÏß
(defun C:jdx (/ ang lay pt1 pt2 dis x1 pt3 pt4 pt5 pt6 scale)
	(setvar "CMDECHO" 0)
	(setq lay (getvar "clayer"))
	(command "color" "bylayer")
	(command "layer" "m" "jdx" "c" "m" "jdx" "")
	(setq scale (getreal "\nScale<300>:"))
	(if (= scale nil)
		(setq scale 300)
	)
	(setq pt1 (getpoint "\nFirst point:"))
	(setq pt2 (getpoint pt1 "\nSecond point:"))
	(setq ang (angle pt1 pt2))
	(setq dis (distance pt1 pt2))
	(setq x1 (/ (- dis (* 2 scale)) 2))
	(setq pt3 (polar pt1 ang x1))
	(setq pt4 (polar pt1 ang (+ x1 (* 2 scale))))
	(setq pt5 (polar pt3 (+ ang 1.32582) (* 2.0616 scale)))
	(setq pt6 (polar pt4 (- ang 1.81577) (* 2.0616 scale)))
	(command "pline" pt1 "w" "0" "0" pt3 pt5 pt6 pt4 pt2 "")
	(command "layer" "s" lay "")
	(princ)
	(princ)
)

;;; ------------------------------------------------------------------
;;; jdx2 »­½Ø¶ÏË«Ïß
(defun C:jdx2 (/ lay pt1 pt2 dis x1 pt3 pt4 pt5 pt6 ss ptt scale)
	(setvar "CMDECHO" 0)
	(setq lay (getvar "clayer"))
	(command "color" "bylayer")
	(command "layer" "m" "jdx" "c" "m" "jdx" "")
	(setq scale (getreal "\nScale<300>:"))
	(if (= scale nil)
		(setq scale 300)
	)
	(setq pt1 (getpoint "\nFirst point:"))
	(setq pt2 (getpoint pt1 "\nSecond point:"))
	(setq ang (angle pt1 pt2))
	(setq dis (distance pt1 pt2))
	(setq x1 (/ (- dis (* 2 scale)) 2))
	(setq pt3 (polar pt1 ang x1))
	(setq pt4 (polar pt1 ang (+ x1 (* 2 scale))))
	(setq pt5 (polar pt3 (+ ang 1.32582) (* 2.0616 scale)))
	(setq pt6 (polar pt4 (- ang 1.81577) (* 2.0616 scale)))
	(setq ptt (polar pt1 (- ang (/ pi 2)) (* 1 scale)))
	(command "pline" pt1 "w" "0" "0" pt3 pt5 pt6 pt4 pt2 "")
	(setq ss (entlast))
	(command "copy" ss "" pt1 ptt)
	(command "layer" "s" lay "")
	(princ)
	(princ)
)
