输入TT,选择图1,图2,得到成品效果
本帖最后由 308578000 于 2025-2-3 18:40 编辑领币,谢谢大哥 按图上说的,是可以实现的。
其实手动用拉伸也不费事吧 ssyfeng 发表于 2024-5-13 08:30
按图上说的,是可以实现的。
其实手动用拉伸也不费事吧
手动拉伸太麻烦了 本帖最后由 尘缘一生 于 2024-5-13 09:30 编辑
这个功能实际就是“同比双图”,
请用三领测试一下试试:
链接:https://pan.baidu.com/s/1VDVpAnK5d72K53obk07CyQ
提取码:wlgy
;判断点是否在矩形两点对角区域内----(一级)-----
;p1 定义区域第一个角的 WCS 或 UCS 点
;p2 定义区域第二个角的 WCS 或 UCS 点
;pt 点转换为 UCS。
;pt 落在区域内,则为 T。
(defun MD:PointInside (p1 p2 pt / xval yval)
(and
pt
(setq pt (trans pt 0 1) xval (car pt) yval (cadr pt))
(< (min (car p1) (car p2)) xval (max (car p1) (car p2)))
(< (min (cadr p1) (cadr p2)) yval (max (cadr p1) (cadr p2)))
)
)
;;同比双图------
(defun c:bl2dwg (/ e_lst p0 p1 p2 p3 p4 ss d1 d2 plst)
(slalert (slmsg
(strcat " 调整两张图纸同比例 " "\n\n 分别量取两张图标致位置距离 \n\n 全选一张图部分,则中心放缩,改变其比例同第二张")
(strcat " 秸俱ㄢ眎瓜ゑㄒ " "\n\n だ秖ㄢ眎瓜夹璓竚禯瞒 \n\n匡眎瓜场だ玥いみ罽э跑ㄤゑㄒ材眎")
(strcat " Adjust two drawings to the same scale " "\n\n Measure the position distance of two icons respectively
\n\n Select all the parts of the drawing, and the center will be zoomed in and out, and the scale will be the same as that of the second drawing")
)
2 (slmsg "三领设计 V3.0" "烩砞璸 V3.0" "sldesign V3.0") 4096)
(setq e_lst (sysvar '("OSMODE" "ORTHOMODE")))
(setvar "ORTHOMODE" 1) ;;正交打开
(setvar "OSMODE" 16383) ;;捕捉全部打开
(setq p1 (getpoint (slmsg " \n 第一张图标志尺寸第一点" " \n 材眎瓜夹粁へ材翴" " \n The first point of the mark size in the first drawing")))
(setq p2 (getpoint p1 (slmsg " \n 第一张图标志尺寸第二点" " \n 材眎瓜夹粁へ材翴" " \n The first point of the mark size in the second drawing")))
(setq d1 (distance p1 p2))
(setq p3 (getpoint (slmsg " \n 第二张图标志尺寸第一点" " \n 材眎瓜夹粁へ材翴" " \n The second point of the mark size in the first drawing")))
(setq p4 (getpoint p3 (slmsg " \n 第二张图标志尺寸第二点" " \n 材眎瓜夹粁へ材翴" " \n The second point of the mark size in the second drawing")))
(setq d2 (distance p3 p4))
(princ (slmsg "\n 全部框选需同比的图纸部分" "\n 场匡惠ゑ瓜场だ" "\n Select all drawings to be compared with the same scale in the same box"))
(setq ss (ssget))
(setq plst (sl:getssucsbox ss) p3 (car plst) p4 (caddr plst) p0 (sl:mid p3 p4))
(if (MD:PointInside p3 p4 (sl:mid p1 p2))
(command "SCALE" ss "" p0 (/ d2 d1))
(command "SCALE" ss "" p0 (/ d1 d2))
)
(mapcar 'eval e_lst)
)
尘缘一生 发表于 2024-5-13 09:28
这个功能实际就是“同比双图”,
请用三领测试一下试试:
{:1_1:}我只想一个单独实现功能的插件,不想装工具箱了,太卡了。 ssyfeng 发表于 2024-5-13 08:30
按图上说的,是可以实现的。
其实手动用拉伸也不费事吧
付费能否帮我写
308578000 发表于 2024-5-15 12:27
付费能否帮我写
如果还没人写的话 我可以写功能加我QQ 562860217 121111111111111111111
页:
[1]