本人独立开发的小程序,算线段长度,实际用途,计算钢筋长度,可以计算线段,弧长,源代码公开,大家可以往里面加入适合自己的意图.使用方法:加载-输入命令CHANG
本人独立开发的小程序,算线段长度,实际用途,计算钢筋长度,可以计算线段,弧长,源代码公开,大家可以往里面加入适合自己的意图.
使用方法:加载-输入命令CHANG
12楼
我又不是做软件的,我是制图员,日本软件贵的很,公司根本不给上.
回复
13楼
支持下月光下的小公主 现在版块挺缺少原创的。多来带动下这个板块氛围哦。
回复
14楼
回RQ28
我看了你的源程序,不象是你写的,到是太象网上下载来的啊。
能把你100一个的图发个给我看看好吗?
当然英文字母不是我开发的,函数也不是我开发的,我只是将它们组合在了一起,实现了一些功能.
回复
15楼
感谢小公主的
芳田桥
让我也开开眼界,100一个图,也还是不好吃的哟:victory:
佩服啊佩服:hug: :hug: :hug:
回复
16楼
原创的东西啊,支持——
回复
17楼
[code] (if (= "LINE" (cdr P3))
(progn
(setq S1 (cdr (assoc 10 P2)))
(setq S2 (cdr (assoc 11 P2)))
(setq K1 (distance S1 S2))
(setq G1 (fix K1))
(setq G2 (- K1 G1))
(if (>= G2 0.5)
(setq K1 (1+ G1))
(setq K1 G1)
)
(setq K (+ K1 K))
(setq G (1+ G))
)
)[/code]其中[code] (setq G1 (fix K1))
(setq G2 (- K1 G1))
(if (>= G2 0.5)
(setq K1 (1+ G1))
(setq K1 G1)
)[/code]可修改为:
(setq k1 (atoi (rtos k1 2 0)))
[
本帖最后由 zml1984 于 2009-9-6 15:57 编辑 ]
回复
18楼
;;;写直线长度
(defun C:xc ()
(setvar "cmdecho" 0)
(setq os (getvar "osmode"))
(setvar "osmode" 0)
(setq ss (ssget))
(setq i 0)
(setq nn (sslength ss))
(repeat nn
(setq en (ssname ss i))
(setq ssdata (entget en))
(setq sstyp (cdr (assoc 0 ssdata)))
(if (= sstyp "LINE")
(progn
(setq pt10 (cdr (assoc 10 (entget en))))
(setq pt11 (cdr (assoc 11 (entget en))))
(setq dd (distance pt10 pt11))
(setq hh 400)
(setq txt (strcat (rtos dd 2)))
(setq ang (angle pt10 pt11))
(if (> ang pi)
(progn
(setq ang (- ang pi))
(if (> ang (/ pi 2))
(progn
(setq txtpt pt11)
(setq txtpt (polar txtpt (- ang (/ pi 2)) 150))
(setq txtpt (polar txtpt ang (/ dd 2)))
(setq ang (angle pt10 pt11))
(command "text" "c" txtpt hh (* (/ ang pi) 180) txt)
)
(progn
(setq txtpt pt10)
(setq txtpt (polar txtpt (+ ang (/ pi 2)) 150))
(setq txtpt (polar txtpt ang (/ dd -2)))
(command "text" "c" txtpt hh (* (/ ang pi) 180) txt)
)
)
)
(progn
(setq ang ang)
(if (> ang (/ pi 2))
(progn
(setq txtpt pt11)
(setq txtpt (polar txtpt (- ang (/ pi 2)) 150))
(setq txtpt (polar txtpt ang (/ dd -2)))
(setq ang (+ ang pi))
(command "text" "c" txtpt hh (* (/ ang pi) 180) txt)
)
(progn
(setq txtpt pt10)
(setq txtpt (polar txtpt (+ ang (/ pi 2)) 150))
(setq txtpt (polar txtpt ang (/ dd 2)))
(command "text" "c" txtpt hh (* (/ ang pi) 180) txt)
)
)
)
)
)
)
(setq i (1+ i))
)
(setvar "osmode" os)
(prin1)
)
回复
19楼
谢谢啦楼主!!!
回复
20楼
你是最棒的!!
回复
21楼
:lol 学习了,困惑了好几天的问题找到了!
回复