0
我在autocad中有以下二維多段線。如何選擇內部沒有艙口的封閉二維多段線?
我試圖創建一個代碼,選擇所有的人時,會過濾掉那些誰擁有內孵化。
從另一個來源我有下面這段代碼(感謝tharwat),但是,altough我明白每一塊的話,從第二ssget
我不明白這些元素的意思在一起。
(defun c:test (/ ss i sn e)
(if (setq ss (ssget '((0 . "POLYLINE")))) ;;selects all the polylines in a window
(repeat (setq i (sslength ss)) ;;cycles trough each one of them
(if (ssget "_CP" ;;???defines a crossing poligon inside wich the polylines will be considered???
(mapcar 'cdr ;;???
(vl-remove-if-not '(lambda (p) (= (car p) 10))
(entget (setq sn (ssname ss (setq i (1- i)))))
)
)
'((0 . "HATCH"))
)
(ssdel sn ss) ;;deletes the entities wich belong to the selection set
)
)
)
(sssetfirst nil ss)
(princ)
)
初學者在這裏,對不起,如果這是不是一個好問題。