明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: yoyoho

旋转过的图块插入点如何求得?

  [复制链接]
发表于 2011-5-11 16:55:39 | 显示全部楼层
(trans (cdr (assoc 10 (entget block-ent))) block-ent 1)

评分

参与人数 1金钱 +20 收起 理由
yoyoho + 20 感谢masterlong 解答及回覆 < 谢谢你! >.

查看全部评分

发表于 2011-5-11 21:33:57 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2011-5-11 23:02:21 | 显示全部楼层
changzhi 发表于 2011-5-11 21:33
上边程序并不能完全转换正确,郁闷。

上个图看看
 楼主| 发表于 2011-5-15 17:53:46 | 显示全部楼层
;;;土法炼钢的方法
(defun c:test_1-1()
(command "ucs" "w")
(command "ucs" "z" "-90")
(command "ucs" "y" "-90")
(setq qq (trans (cdr (assoc 10 (entget (car (entsel))))) 0 1))
(princ qq)
(command "ucs" "w")
(command "id")
)

 楼主| 发表于 2011-5-15 17:58:19 | 显示全部楼层
非常感谢masterlong
依据masterlong提供方法测试 o.k.

(defun c:test_1-2()
(setq block-ent (car (entsel)))
(setq qq (trans (cdr (assoc 10 (entget block-ent))) block-ent 1))
(princ qq)
(command "ucs" "w")
(command "id")
)

 楼主| 发表于 2011-5-15 18:07:56 | 显示全部楼层
有个困惑可否麻烦masterlong解答
(trans (cdr (assoc 10 (entget block-ent))) block-ent 1)的用法
一般常看到
(trans (cdr (assoc 10 (entget block-ent))) 0 1)

(trans (cdr (assoc 10 (entget block-ent))) 1 0)
第一次看到这种用法
block-ent 1的方式
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-6-10 09:05 , Processed in 0.156508 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表