本帖最后由 lee50310 于 2022-8-23 09:27 编辑
用 TT6.LSP 程式 便是將這 測試圖中的 24個 懸空點 取出這三個區分 ,但還未做處理
此為程式的中的部分程式碼
- ;;by lee50310 2022/0624
- ;;
- (defun c:tt6( / ssd ss )
- (vl-load-com)
- (makelayer "temp" 6) ;;創建"temp"層 ,粉紅色
- (del_aid_circle) ;;清除之前輔助圓
- (setq or_layer (getvar "clayer")) ;;取出目前工作層名
- (setq os (getvar "osmode"))
- (setvar "CMDECHO"0)
- (command "UNDO" "BE")
- (setq ssd (ssget '((0 . "arc,*line,ELLIPSE"))))
- ;;選擇集轉圖元表
- (setq ss((lambda (x) (vl-remove(last x) x))(mapcar 'cadr(ssnamex ssd))))
- (or rrno1* (setq rrno1* 15.))
- (setq rr (getdist (strcat "\n輸入圓圈半徑:<" (rtos rrno1* 2) ">: ")))
- (if rr(setq rrno1* rr) (setq rr rrno1*))
- (setq ael nil bel nil cel nil)
- ;;<-- allpts 全部懸空點 點表 -->
- (setq allpts(get_dangling_point))
-
- ;;<-- ael 單點懸空 點表-->
- (setq ael(get_one_point allpts))
- (setq zzael(remove_pp ael allpts)) ;;從點表中移除單點懸空
-
- ;;<-- bel 雙點懸空 點表-->
- (setq bel(get_two_point zzael))
- (setq zel (append(mapcar 'car bel)(mapcar 'cadr bel)))
-
- ;;<-- cel (單點懸空+旁物) 點表-->
- (setq cel(remove_pp zel cel)) ;;從點表中移除雙點懸空
-
- (command "zoom" "e")
- (command "zoom" "0.8x")
- (command "UNDO""end")
- (setvar "expert" 0)
- (setvar "osmode" os)
- (setvar "clayer" or_layer)
-
- );end_defun_tt6
- (princ "\n<<<*** 執行指令:tt6 ***>>>")
- (princ)
- ;;----------------------------------------------------------------------------------
- ;;亮顯全部懸空數
- (defun c:ppa()
- (showpp allpts)
- (princ "\n亮顯全部懸空數")
- (princ)
- )
- ;;----------------------------------------------------------------------------------
- ;;亮顯單點懸空數
- (defun c:1pp()
- (showpp ael)
- (princ "\n亮顯單點懸空數")
- (princ)
- )
- ;;----------------------------------------------------------------------------------
- ;;亮顯雙點懸空數
- (defun c:2pp()
- (showpp zel)
- (princ "\n亮顯雙點懸空數")
- (princ)
- )
- ;;----------------------------------------------------------------------------------
- ;;亮顯(點懸空+旁物)數
- (defun c:1po()
- (showpp cel)
- (princ "\n亮顯(點懸空+旁物)數")
- (princ)
- )
- ;;----------------------------------------------------------------------------------
- ;;顯示懸空雙點之距離值
- (defun c:2dst()
- (princ "\n顯示懸空雙點之距離值= ")
- (dist bel)
- )
- ;;----------------------------------------------------------------------------------
|