;; OUTLINE.LSP Copyright 1997 Tony Tanzillo all rights reserved ;; ;; Generates an outline of selected coplanar 3DFACES ;; The 3D faces should be coincident and form a single ;; polygon with no internal islands (typically what ;; is produced by exploding a flat POLYFACE/POLYGON MESH) (defun C:OUTLINE ( / ss l) (cond ( (not (setq ss (ssget '((0 . "3DFACE")))))) (t (setvar "CMDECHO" 0) (command "._UNDO" "_Begin") (setq l (mark)) (command "._REGION" ss "") (setq ss (ssnew l)) (if ss (command "._UNION" ss "" "._EXPLODE" ss "._PEDIT" (entlast) "_Y" "_Join" "_P" "" "_X" "._UNDO" "_End" ) ) (princ "\nNo region created from 3DFACE(s)") ) ) (princ) ) (defun mark () (entmake '((0 . "POINT") (10 0 0 0))) (entdel (entlast)) ) (defun ssnew (e / ss) (setq ss (ssadd)) (while (setq e (entnext e)) (ssadd e ss) ) (if (> (sslength ss) 0) ss) )