删除表中元素
(setq points ((378499.0 43587.4 -1.65106e-056)
(378499.0 43587.4 -1.65106e-056)
(378499.0 43587.4 -1.65106e-056)
(378480.0 43587.4 -1.65106e-056)
))
如何输出points为去除相同元素后的列表
本帖最后由 USER2128 于 2015-11-5 08:44 编辑
(setq points '((378499.0 43587.4 -1.65106e-056)
(378499.0 43587.4 -1.65106e-056)
(378499.0 43587.4 -1.65106e-056)
(378480.0 43587.4 -1.65106e-056)
))
;;; 对点表进行X、Y、Z排序(此略).
(setq tmp (mapcar '(lambda(x y) (if (equal x y) nil y))
points (cdr points)))
(setq tmp (vl-remove 'nil tmp))
(setq tmp (cons (car points) tmp)) USER2128 发表于 2015-11-5 08:25 static/image/common/back.gif
points后面的列表不带标点符号’ 你从基本功抓起吧,如你不用',就用
(setq points (List (378499.0 43587.4 -1.65106e-056)
(378499.0 43587.4 -1.65106e-056)
(378499.0 43587.4 -1.65106e-056)
(378480.0 43587.4 -1.65106e-056)
))
也行的。 USER2128 发表于 2015-11-5 10:36 static/image/common/back.gif
你从基本功抓起吧,如你不用',就用
(setq points (List (378499.0 43587.4 -1.65106e-056)
...
恩 好的 我在从基础学习 谢谢您了
页:
[1]