;Parametric Vocabulary:portal.lsp ;Autolisp file for 4.207 prepared by Lee, Hee Won ;Date: 3/22/97 (command "cmdecho" "0") (defun c:x () (load "gateway")) (xload "geom3d") (command "units" 4 "" "" "" "" "") (command "limits" (list -1200 -1200) (list 1200 1200)) (command "vpoint" (list -1 -1 1)) (load "nagakura") (defun portal (x y z left_w right_w d gate_w gate_d t) (command "cmdecho" "0") ;Set up local coordinate system (command "ucs" "origin" (list 0 0 z) ) (command "layer" "new" "wall_plane1" "color" "red" "wall_plane1" "") (command "layer" "set" "wall_plane1" "") (command "pline" (list x y) (list x (+ y gate_d)) (list (+ x gate_w) (+ y gate_d)) (list (+ x gate_w) y) (list (+ (+ x gate_w) right_w) y) (list (+ (+ x gate_w) right_w) (+ y d)) (list (- x left_w) (+ y d)) (list (- x left_w) y) "c" ) (setq ent1 (entlast)) ;Draw 3d_wall (command "extrude" ent1 "" (list 0 0) (list 0 0 t) "" ) (setq ent2(entlast)) (rotate3d ent2 (list x y) (list (+ x 1) y) 90) (setq ent3(entlast)) ;Reset the ucs to world-coordinate-system (command "ucs" "world") ;Make 'ent' as a block for "nagakura" program ;(nt_make_ablock ent) ent3 ) ; end of defun (nt_def_type "portal" 'portal '(("xo" . 0) ("yo" . 0) ("zo" . 0) ("left_w" . 12) ("right_w" . 12) ("d" . 150) ("gate_w" . 72) ("gate_d" . 110) ("t" . 9)))