不确定发生了什么,但从这里丢失了代码。将再次重做。
请注意CMDactive崩溃Briscad。我会调查的。
- ; reduce polygon facets by AlanH OCT 2019
- (defun c:polred ( / x R lst co-ord plent)
- (setq plent (entsel "pick polygon"))
- (if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent))))))
- (setq R (getint "Enter reduction factor 2 3 4 etc"))
- (setq x 0)
- (setq lst '())
- (setq lst (cons (nth x co-ord) lst))
- (repeat (- (/ (length co-ord) R) 1)
- (setq lst (cons (nth (setq x (+ x R)) co-ord) lst))
- )
- (setvar 'clayer "0") ; add your layer or else erase plent
- ;(command "erase" plent "")
- (command "_pline")
- (while (= (getvar "cmdactive") 1 )
- (repeat (setq x (length lst))
- (command (nth (setq x (- x 1)) lst))
- )
- (command "C")
- )
- )
- (c:polred)
|