三维实体被拉伸后数据怎么发生了变化,点坐标都不对了,如何解决???
(defun 3d__Solid ( e / e c cc ccc tem list_1 list_2 qc)(setq ORENT (entget e))
(setq ACENT (GETACISDATAONLY (ACISDECODEENT ORENT)))
(setq c 0 list_1 '())
(repeat (length ACENT)
(setq tem (cdr (nth c ACENT)))
;(if (and (> (strlen tem) 90) (= (substr tem 1 25) "plane-surface $-1 -1 $-1 "))
(if (= (substr tem 1 25) "plane-surface $-1 -1 $-1 ")
(progn
(setq tem (substr tem 26)qc 0 list_2 '())
(while (and (< qc 3)(setq ccc (str_sel tem " ")))
(setq tem1 (atof (substr tem 1 (- ccc 1))))
(setq list_2 (cons tem1 list_2))
(setq tem (substr tem (+ ccc 1)))
(setq qc (+ qc 1))
)
(setq list_1 (cons (reverse list_2) list_1))
) )
(setq c (+ c 1))
)
(reverse list_1)
)
三维实体被拉伸后数据怎么发生了变化,点坐标都不对了,如何解决???
(GETACISDATAONLY (ACISDECODEENT ORENT 楼主能提供一下这两个函数吗 (defun GETACISDATAONLY (ENT)
(setq TMP ())
(foreach @@ ENT
(if (equal (car @@) 1)
(setq TMP (cons @@ TMP))
)
)
(setq TMP (reverse TMP))
(setq TMP1 (car TMP))
(setqTMP(cdr TMP)
TMP(cdr TMP)
TMP(cdr TMP)
)
(cons TMP1 TMP)
)
(defun ACISDECODE (ST / LN N C ST1)
(setq ST1 ""
N (strlen ST)
)
(while (> N 0)
(setq C (ascii (substr ST N 1)))
(setq ST1
(strcat
(cond
((= C 32) " ")
((= C 86) "I")
((chr (boole 6 C 95)))
)
ST1
)
)
(setq N (1- N))
)
ST1
) 挚友01 发表于 2023-9-25 12:06
(defun GETACISDATAONLY (ENT)
(setq TMP ())
(foreach @@ ENT
ACISDECODEENT 这个不对吧 能 把完整的代码发来吗,里面还差一些函数,例如str_sel (defun str_sel(val1 val2 / val1 val2 c n cc v1 v2)
(if (and val1 (/= val1 "")(/= val1 " "))
(progn
(setq n "T" c 1)
(setq v1 (strlen val1) v2 (strlen val2))
(while (and n (<= c v1))
(if (= (strcase (substr val2 1 1))(strcase (substr val1 c 1))); 当第一个字符相同时
(if (<= (+ c (- v2 1)) v1)
(if (= (strcase val2)(strcase (substr val1 c v2)))
(setq n nil cc c)
)
)
)
(setq c (+ c 1))
)
cc
) )
)
这个只是字符查找,上面的代码也是从网上找的... ACISDECODEENT是做啥的? 有没有“重画”,将所有的拐点恢复到【正常】的位置。。。 挚友01 发表于 2023-9-30 09:45
有没有“重画”,将所有的拐点恢复到【正常】的位置。。。
还差一个函数
ACISDECODEENT
页:
[1]