;;; seg ==> '(bulge p1 p2) ---> (0.41421356 '(0 0) '(1 1))
(defun seg2cir (seg / Vx1 Vx2 Bulge ArcRad HlfAng) (cond ((zerop (setq Bulge (car seg))) nil) ((setq Vx1 (cadr seg) Vx2 (caddr seg) HlfAng (* 2 (atan Bulge)) ArcRad (abs (/ (/ (distance Vx1 Vx2) 2.0) (sin HlfAng))) ) (list (polar Vx1 ((if (< Bulge 0) - +) (- (angle Vx1 Vx2) HlfAng) (/ Pi 2)) ArcRad ) ArcRad ))) ) ;; return '(centerPnt AraRadius) |