明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2248|回复: 5

管道专家

[复制链接]
发表于 2012-5-21 12:37:20 | 显示全部楼层 |阅读模式


管道接法基本上就是这么些了,建议写一个管道专家,或管制工具,界时所有人都规你管,

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2012-5-21 14:28:05 | 显示全部楼层
原来是求程序的,楼主不厚道!
 楼主| 发表于 2012-5-21 15:04:27 | 显示全部楼层
我不怎么画图,我的图,我组里的人画图,我只是较对对时改改图
所以说求不求的无所谓,毕竟把问题解决了,
是对一一行业的进步,做得快了也就可以做更多的
大家就可以不用那么嘛,所以我不在呼你说什么
也发两个小程序以前别人可能发发
(defun c:STl (/ yong shi ya yb xy yx xa xb PT2 PT3 PT1 PT1 DIAA DIA2 )
;获取两条直线
(SETQ AA(SSGET))
(setq L1 (ssname AA 0))
(setq L2 (ssname AA 1))
(setq YANG1(cdr (assoc 10 (ENTGET L1))))
(setq YAG1(cdr (assoc 11 (ENTGET L1))))
(setq YANG2(cdr (assoc 10 (ENTGET L2))))
(setq YAG2(cdr (assoc 11 (ENTGET L2))))
(SETQ PT1  (INTERS YANG1 YAG1 YANG2 YAG2 NIL))
(SETQ DIA (GETINT "/T请输入管的直径:"))
(if (= nil DIA) (setq DIA DIAA))
(SETQ DIAA DIA)
(SETQ DIA2 (/  DIA 2))
(SETQ LOP 0)
(WHILE (< LOP 2);变双管命令
(IF (= LOP 0)(SETQ A L1))
(IF (= LOP 1)(SETQ A L2))
(setq yan (cdr(assoc 10(entget A))))
(setq yong A)
(command "offset" DIA2 A yan "")
(SETQ LL (ENTLAST))
(IF (= LOP 0)(SETQ L3 LL)(SETQ L5 LL))
(setq xy(cdr (assoc 10 (ENTGET yong))))
(setq xa(car xy))
(setq ya(cadr xy))
(setq yx(cdr (assoc 11 (ENTGET yong))))
(setq xb(car yx))
(setq yb(cadr yx))
(command "mirror" "l" ""(list xa ya)(list xb yb)"")
(SETQ LL (ENTLAST))
(IF (= LOP 0)(SETQ L4 LL)(SETQ L6 LL))
(command "change" A "" "p" "co" 8 "");改变中心线线型及颜色
(command "change" A "" "p" "lt" "center2" "")
(setq lop(+ lop 1))
)
(setq YANG3(cdr (assoc 10 (ENTGET L3))))
(setq YAG3(cdr (assoc 11 (ENTGET L3))))
(setq YANG4(cdr (assoc 10 (ENTGET L4))))
(setq YAG4(cdr (assoc 11 (ENTGET L4))))
(setq YANG5(cdr (assoc 10 (ENTGET L5))))
(setq YAG5(cdr (assoc 11 (ENTGET L5))))
(setq YANG6(cdr (assoc 10 (ENTGET L6))))
(setq YAG6(cdr (assoc 11 (ENTGET L6))))
(SETQ PT6  (INTERS YANG1 YAG1 YANG6 YAG6 ))
(SETQ PT5  (INTERS YANG1 YAG1 YANG5 YAG5 ))
(SETQ PT4  (INTERS YANG2 YAG2 YANG4 YAG4 ))
(SETQ PT3  (INTERS YANG2 YAG2 YANG3 YAG3 ))
(COMMAND "BREAK" L3 PT3 PT3)
(COMMAND "BREAK" L4 PT4 PT4)
(COMMAND "BREAK" L5 PT5 PT5)
(COMMAND "BREAK" L6 PT6 PT6)
(COMMAND "FILLET" "RADIUS" DIA)
(SETQ DIAA (* DIA2 4))
(SETQ PT2(SUBST (+ DIAA (CAR PT1))(CAR PT1)PT1))
(SETQ PT2(SUBST (+ DIA2 (CADR PT2)) (CADR PT2)PT2))
(SETQ PT3(SUBST (+ DIAA (CADR PT1))(CADR PT1)PT1))
(SETQ PT3(SUBST (+ DIA2 (CAR PT3)) (CAR PT3)PT3))
(COMMAND "FILLET" PT2 PT3 )
(SETQ PT4(SUBST (+ DIAA (CAR PT1))(CAR PT1)PT1))
(SETQ PT4(SUBST (- (CADR PT4)DIA2 ) (CADR PT4)PT4))
(SETQ PT5(SUBST (- (CADR PT1)DIAA )(CADR PT1)PT1))
(SETQ PT5(SUBST (+ DIA2 (CAR PT5)) (CAR PT5)PT5))
(COMMAND "FILLET" PT4 PT5 )
(SETQ PT2(SUBST (- (CAR PT1)(* DIA2 4))(CAR PT1)PT1))
(SETQ PT2(SUBST (- (CADR PT2)DIA2 ) (CADR PT2)PT2))
(SETQ PT3(SUBST (- (CADR PT1)(* DIA2 4))(CADR PT1)PT1))
(SETQ PT3(SUBST (- (CAR PT3)DIA2 ) (CAR PT3)PT3))
(COMMAND "FILLET" PT2 PT3 )
(SETQ PT2(SUBST (- (CAR PT1)(* DIA2 4))(CAR PT1)PT1))
(SETQ PT2(SUBST (+ DIA2 (CADR PT2)) (CADR PT2)PT2))
(SETQ PT3(SUBST (+ (* DIA2 4)(CADR PT1))(CADR PT1)PT1))
(SETQ PT3(SUBST (- (CAR PT3)DIA2 ) (CAR PT3)PT3))
(COMMAND "FILLET" PT2 PT3 )
(SETQ PT2(SUBST (- (CAR PT1) DIA2 )(CAR PT1)PT1))
(SETQ PT2(SUBST (+ (* DIA2 3)(CADR PT2)) (CADR PT2)PT2))
(SETQ PT3(SUBST (+ DIA2 (CAR PT1))(CAR PT1)PT1))
(SETQ PT3(SUBST (+ (CADR PT3)(* DIA2 3) ) (CADR PT3)PT3))
(COMMAND "LINE" PT2 PT3 "" )
(SETQ LA (ENTLAST))
(COMMAND "ARRAY" LA """P" PT1"4" "" "")
)
 楼主| 发表于 2012-5-21 15:05:45 | 显示全部楼层
以上也是做管道用的,算是拍砖引玉吧
 楼主| 发表于 2012-9-12 12:38:07 | 显示全部楼层
由于此铁沉得太深,所以必须顶
发表于 2013-5-6 11:59:38 | 显示全部楼层
357785513 发表于 2012-5-21 15:04
我不怎么画图,我的图,我组里的人画图,我只是较对对时改改图
所以说求不求的无所谓,毕竟把问题解决了,
是对 ...

找机会也试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-18 10:41 , Processed in 0.182517 second(s), 31 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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