(DEFUN C:GATE () (IF upoint NIL (LOAD "upoint" "\nFile UPOINT.LSP not loaded! ") ) ;_ end of IF (PRINC "\nSwing is drawn left of gate line. Pick appropriate end 1st.") (PRINC) (SETQ gp1 (upoint 1 "" "First gate point" nil nil)) (SETQ gp2 (upoint 1 "" "Second gate point" nil gp1)) (SETQ old_snapang (GETVAR "snapang")) (SETVAR "snapang" (ANGLE gp1 gp2)) (SETQ gp3 (upoint 1 "" "Point along gate leaf swing vector(s)" nil (POLAR gp1 (ANGLE gp1 gp2) (/(DISTANCE gp1 gp2)2.0)))) (SETVAR "snapang" old_snapang) (SETQ gp4 (POLAR (POLAR gp1 (ANGLE gp1 gp3) (DISTANCE gp1 gp2)) (+ (ANGLE gp1 gp3) (* PI 0.5)) 50.0 ;arbitrary ) ;_ end of POLAR ) ;_ end of SETQ (SETQ gp1 (LIST (CAR gp1) (CADR gp1)) gp2 (LIST (CAR gp2) (CADR gp2)) gp3 (LIST (CAR gp3) (CADR gp3)) gp4 (LIST (CAR gp4) (CADR gp4)) ) ;_ end of SETQ (IF ukword NIL (LOAD "ukword" "\nFile UKWORD.LSP not loaded! ") ) ;_ end of IF (SETQ #leaves (ukword 1 "1 2" "No. of leaves" (IF #leaves #leaves "1" ) ;_ end of IF ) ;_ end of ukword ) ;_ end of SETQ (IF (EQ #leaves "1") (PROGN (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 gp1) (CONS 11 (POLAR gp1 (ANGLE gp1 gp3) (DISTANCE gp1 gp2))) (CONS 8 "C-FENC7GATE") ) ;_ end of LIST ) ;_ end of ENTMAKE (ENTMAKE (LIST (CONS 0 "ARC") (CONS 10 gp1) (CONS 40 (DISTANCE gp1 gp2)) (CONS 50 (ANGLE gp1 gp2)) (CONS 51 (ANGLE gp1 (POLAR gp2 (ANGLE gp2 gp3) (+ (DISTANCE gp2 (INTERS gp1 gp3 gp2 gp4 NIL)) 3.0)) ) ;_ end of ANGLE ) ;_ end of CONS (CONS 8 "C-FENC7GATE") ) ;_ end of LIST ) ;_ end of ENTMAKE ) ;_ end of PROGN (PROGN (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 gp1) (CONS 11 (POLAR gp1 (ANGLE gp1 gp3) (/ (DISTANCE gp1 gp2) 2.0))) (CONS 8 "C-FENC7GATE") ) ;_ end of LIST ) ;_ end of ENTMAKE (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 gp2) (CONS 11 (POLAR gp2 (ANGLE gp2 gp3) (/ (DISTANCE gp1 gp2) 2.0))) (CONS 8 "C-FENC7GATE") ) ;_ end of LIST ) ;_ end of ENTMAKE (ENTMAKE (LIST (CONS 0 "ARC") (CONS 10 gp1) (CONS 40 (/ (DISTANCE gp1 gp2) 2.0)) (CONS 50 (ANGLE gp1 gp2)) (CONS 51 (ANGLE gp1 gp3)) (CONS 8 "C-FENC7GATE") ) ;_ end of LIST ) ;_ end of ENTMAKE (ENTMAKE (LIST (CONS 0 "ARC") (CONS 10 gp2) (CONS 40 (/ (DISTANCE gp1 gp2) 2.0)) (CONS 50 (ANGLE gp2 gp3)) (CONS 51 (ANGLE gp2 gp1)) (CONS 8 "C-FENC7GATE") ) ;_ end of LIST ) ;_ end of ENTMAKE ) ;_ end of PROGN ) ;_ end of IF (PRINC) ) ;_ end of DEFUN ;|«Visual LISP© Format Options» (100 2 15 2 T "end of " 100 15 2 0 2 nil nil nil T) ;*** DO NOT add text below the comment! ***|;