明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4285|回复: 13

求指点,我这里有个五金模具注解输出的源码,可惜我不懂怎么让它以识别

  [复制链接]
发表于 2012-4-5 22:03 | 显示全部楼层 |阅读模式
1明经币
有没人能帮我看看要怎么画才能让它识别导柱,浮升销等等这些东西呢

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

最佳答案

查看完整内容

这些就是表明导柱孔图块名是LSPP****, 螺丝沉头孔块名是LSPR****等, 如果有这程序标注的图档,看看对照着试下应该可以知道, 最好还是找作者了解吧,
发表于 2012-4-5 22:03 | 显示全部楼层
yang198910204 发表于 2012-4-6 13:05
像这面这些是什么意思
我应该怎么画才能让程序识别呢

这些就是表明导柱孔图块名是LSPP****, 螺丝沉头孔块名是LSPR****等,
如果有这程序标注的图档,看看对照着试下应该可以知道,
最好还是找作者了解吧,
回复

使用道具 举报

 楼主| 发表于 2012-4-5 22:33 | 显示全部楼层
贴个图片出来

本帖子中包含更多资源

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

x
回复

使用道具 举报

发表于 2012-4-6 08:08 | 显示全部楼层
粗略看好象是用图块名识别的,
图块名前面四个字识种类,后面数字作规格,
回复

使用道具 举报

 楼主| 发表于 2012-4-6 12:55 | 显示全部楼层
哦,我再去看看源码啦
回复

使用道具 举报

 楼主| 发表于 2012-4-6 12:58 | 显示全部楼层
   ((= "LSPN" (strcase str_no_list))
                       (setq str_ent1 " 塞打螺丝(MSB)"
                             str_ent2 "-M"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPZ" (strcase str_no_list))
                       (setq str_ent1 " 子母螺丝(MSW)"
                             str_ent2 "-M"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPP" (strcase str_no_list))
                       (setq str_ent1 " 导柱孔(线割,单边%%P0)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPF" (strcase str_no_list))
                       (setq str_ent1 " 导套孔(线割,单边%%P0,%%c背面沉深3.5)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text (+ 5 MI_text)
                       )
                      )
                      ((= "LSPD" (strcase str_no_list))
                       (setq str_ent1 " 定位销孔(线割,单边+0.00)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPG" (strcase str_no_list))
                       (setq str_ent1 " 浮升销孔(线割,单边+0.01)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPL" (strcase str_no_list))
                       (setq str_ent1 " 顶料销孔(线割,单边+0.01)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPS" (strcase str_no_list))
                       (setq str_ent1 " 弹簧孔(钻通)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPH" (strcase str_no_list))
                       (setq str_ent1 " 导正销孔(线割,单边+0.005,%%C正面沉深*)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPA" (strcase str_no_list))
                       (setq str_ent1 " 冲子(TA)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text (+ 1.5 MI_text)
                       )
                       (if (> (atof str_ent3) 18)
                         (setq str_ent3        (strcat        (substr nam_no_list 5 1)
                                                "."
                                                (substr nam_no_list 6)
                                        )
                               MI_text        (/ (atof str_ent3) 2)
                               BIG_text        (+ 1.5 MI_text)
                         )
                       )
                      )
                      ((= "LSPC" (strcase str_no_list))
                       (setq str_ent1 " 冲子(SH)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text (+ 1.5 MI_text)
                       )
                       (if (> (atof str_ent3) 18)
                         (setq str_ent3        (strcat        (substr nam_no_list 5 1)
                                                "."
                                                (substr nam_no_list 6)
                                        )
                               MI_text        (/ (atof str_ent3) 2)
                               BIG_text        (+ 1.5 MI_text)
                         )
                       )
                      )
                      ((= "LSPE" (strcase str_no_list))
                       (setq str_ent1 " 抽牙冲子(TE)"
                             str_ent2 "-%%C"
                             str_ent3 (substr nam_no_list 5)
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text (+ 1.5 MI_text)
                       )
                       (if (> (atof str_ent3) 18)
                         (setq str_ent3        (strcat        (substr nam_no_list 5 1)
                                                "."
                                                (substr nam_no_list 6)
                                        )
                               MI_text        (/ (atof str_ent3) 2)
                               BIG_text        (+ 1.5 MI_text)
                         )
                       )
                      )
                      ((= "LSPW" (strcase str_no_list))
                       (setq str_ent1 "的异形孔(线割,单边+0.00)"
                             str_ent2 "-穿丝孔为%%C"
                             str_ent3 (strcat (substr nam_no_list 5 1)
                                              "."
                                              (substr nam_no_list 6 1)
                                      )
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text MI_text
                       )
                      )
                      ((= "LSPR" (strcase str_no_list))
                       (setq str_ent3 (substr nam_no_list 5)
                             str_ent1 (strcat " 螺丝沉头孔(正面沉头深度*) "
                                              insert_3
                                      )
                             str_ent2 "-M"
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text (+ 2 MI_text)
                       )
                      )
                      ((= "LSPB" (strcase str_no_list))
                       (setq str_ent3 (substr nam_no_list 5)
                             str_ent1 (strcat " 螺丝沉头孔(背面沉头深度*) "
                                              insert_3
                                      )
                             str_ent2 "-M"
                             MI_text  (/ (atof (substr nam_no_list 5)) 2)
                             BIG_text (+ 2 MI_text)
                       )
                      )
                      (t
                       (setq str_ent1 nam_no_list
                             str_ent2 "-"
                             str_ent3 "(线割,单边+0.00)"
                             MI_text  4
                             BIG_text 6
                       )
                      )
                )
                (repeat        (sslength ss_no_select)
                  (setq        no   (1+ no)
                        cen1 (cdr
                               (assoc 10 (entget (ssname ss_no_select no)))
                             )
                  )
                  (setq        insert_wl_length (entget (ssname ss_no_select no)
                                                 (list "wl_length")
                                         )
                        insert_3add         (cadadr (assoc -3 insert_wl_length))
                  )
                  (if (not (null insert_3add))
                    (setq insert_3add
                           (rtos (cdr insert_3add))
                    )
                    (setq insert_3add
                           "*"
                    )
回复

使用道具 举报

 楼主| 发表于 2012-4-6 13:05 | 显示全部楼层
像这面这些是什么意思
我应该怎么画才能让程序识别呢
回复

使用道具 举报

 楼主| 发表于 2012-4-6 21:31 | 显示全部楼层
可是沉头螺丝我随便画出来都能识别哦,也不是用图块
回复

使用道具 举报

 楼主| 发表于 2012-4-6 21:36 | 显示全部楼层
谢谢大哥您的指点!!真的是这样呢,谢谢了
回复

使用道具 举报

 楼主| 发表于 2012-4-6 21:37 | 显示全部楼层
谢谢大哥您的指点!!真的是这样呢,谢谢了,不过好像它识别不了直径哦,
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-6 13:00 , Processed in 0.397846 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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