yang198910204 发表于 2012-4-5 22:03:46

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

有没人能帮我看看要怎么画才能让它识别导柱,浮升销等等这些东西呢

690994 发表于 2012-4-5 22:03:47

yang198910204 发表于 2012-4-6 13:05 static/image/common/back.gif
像这面这些是什么意思
我应该怎么画才能让程序识别呢

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

yang198910204 发表于 2012-4-5 22:33:29

贴个图片出来

690994 发表于 2012-4-6 08:08:29

粗略看好象是用图块名识别的,
图块名前面四个字识种类,后面数字作规格,

yang198910204 发表于 2012-4-6 12:55:18

哦,我再去看看源码啦

yang198910204 发表于 2012-4-6 12:58:41

   ((= "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_text4
                             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
                           "*"
                  )

yang198910204 发表于 2012-4-6 13:05:11

像这面这些是什么意思
我应该怎么画才能让程序识别呢

yang198910204 发表于 2012-4-6 21:31:17

可是沉头螺丝我随便画出来都能识别哦,也不是用图块

yang198910204 发表于 2012-4-6 21:36:51

谢谢大哥您的指点!!真的是这样呢,谢谢了

yang198910204 发表于 2012-4-6 21:37:38

谢谢大哥您的指点!!真的是这样呢,谢谢了,不过好像它识别不了直径哦,
页: [1] 2
查看完整版本: 求指点,我这里有个五金模具注解输出的源码,可惜我不懂怎么让它以识别