土木在线论坛 \ 建筑设计 \ CAD下载及教程 \ 求助~~~~~~~~~~~~
用CAD画90°和45°弯头怎么画啊~~~~~~大神们教教我吧

全部回答(4 )

  • fcut2004
    学下lisp吧,很快就搞定了 ,或者用插件。下面的代码可供参考,我刚学的时候写的,还很多问题,变量和捕捉参数都没有去设置,楼主经常要画图的话就学学lisp。
    (defun c:57 ()
    (setq p1 (getpoint "\n梁内边左下端点为起点: "))
    (setq p2 (getpoint p1 "\n终点: "))
    (setq p1 (polar p1 (+ (* 1.0 pi) ang1 ) 100));定义钢筋起点
    (setq p2 (polar p2 ang1 100));定义钢筋终点
    (setq dist1 (distance p1 p2));读取p1 p2间距
    (setq ang1 (angle p1 p2)) ;读取直线的角度间距
    (setq p3 (polar p1 (+ (* 0.25 pi) ang1) 200));定义斜钩起点
    (setq p4 (polar p2 (+ (* 0.75 pi) ang1) 200));定义斜钩终点
    (command "pline" p3 p1 p2 p4 "")
    (setq tempPt (list (/ (+ (car p1) (car p2)) 2) (/ (+ (cadr p1) (cadr p2)) 2)))
    (setq txtp (polar tempPt (+ (* 0.5 pi) ang1) 100))
    (setq gangjin "净距 ")
    (command "text" "c" txtp "250" (* ang1 (/ 180 pi)) (strcat gangjin (rtos dist1 2 0)) ""); 显示净距
    (entdel ent)
    (princ)
    )



    (defun C:56 ()
    ;(command "osnap" "ins")
    ;(command "osnap" "CEN,END,MID,NOD,ins")
    (setq p1 (getpoint "\n起点: "))
    (setq p2 (getpoint p1 "\n终点: "))
    (setq ang1 (angle p1 p2))
    (setq p3 (polar p1 (+ (* 1.0 pi) ang1) 25))
    (setq p4 (polar p3 (+ (* 0.5 pi) ang1) 150))
    (setq p5 (polar p4 ang1 150))
    (setq p6 (polar p2 ang1 25))
    (setq p7 (polar p6 (+ (* 0.5 pi) ang1) 150))
    (setq p8 (polar p7 (+ (* 1.0 pi) ang1) 150))
    (setq tempPt (list (/ (+ (car p1) (car p2)) 2) (/ (+ (cadr p1) (cadr p2)) 2)))
    (setq txtp (polar tempPt (+ (* 0.5 pi) ang1) 100))
    (setq gangjin "净距 ")
    (command "text" "c" txtp "250" (* ang1 (/ 180 pi)) (strcat gangjin (rtos dist1 2 0)) ""); 显示净距
    (command "PLINE" p5 p4 "a" p3 "l" p6 "a" p7 "l" p8 "")
    ;(command "PLINE" p5 p4 "")
    ;(command "layer" "set" "0" "")
    ;(command "osnap" "INS,END,MID,INT,EXT,APP,CEN,NOD,QUA,PER,TAN,NEA,PAR")
    )
    ; 水平竖直通长带弯钩底钢筋
    2012-09-29 11:47:29 来自 PC 评论 举报
  • yuanban24
    平面的~~~~~都不会!
    2012-09-24 09:52:24 来自 PC 评论 举报
加载更多
这个家伙什么也没有留下。。。

CAD下载及教程

返回版块

52.08 万条内容 · 666 人订阅

猜你喜欢

回帖成功

经验值 +10