;floor works fine
;how it works: first, you should have dividided the floor into rectangles and other 3 or 4 sided polygons on another layer. run this. select 2-4 points and hit enter, and it creates a face oriented in the right direction for you.
(defun c:fl ( / lst) ;select points in CLOCKWISE direction
(command "layer" "make" "floor" "")
;(command "layer" "color" "green" "floor" "")
(command "layer" "set" "floor" "")
(setq lst (get_points))
(while (not (eq lst nil))
(cond ((eq (length lst) 2) (make_rect_face_ccw (first lst) (second lst) 0))
((eq (length lst) 3) (make_tri_face (first lst) (second lst) (third lst) 0))
((eq (length lst) 4) (make_face (first lst) (second lst) (third lst) (fourth lst) 0)))
(setq lst (get_points))))
; FOR TESTING PURPOSES ONLY
(defun make_rect_face_test (p1 p2 height /)
(if (or (and (< (x p1) (x p2)) (< (y p1) (y p2)))
(and (> (x p1) (x p2)) (> (y p1) (y p2))))
(print (list
(list (x p1) (y p1) height)
(list (x p2) (y p1) height)
(list (x p2) (y p2) height)
(list (x p1) (y p2) height)))
(print (list
(list (x p1) (y p1) height)
(list (x p1) (y p2) height)
(list (x p2) (y p2) height)
(list (x p2) (y p1) height)))))