三维管道末端/管道断裂
你好,来自德国,我在acad2008上使用3d管道应用程序。直到今天,还没有办法在管道上绘制3d管端或部分隔热层。
它必须看起来像阴阳符号——但在3d中:
示例1:管径114.3 mm+保温层80mm
示例2:管道外径为168.3 mm,壁厚为8mm
我使用固体的方式总是一样的。
但是,在点击管道实体的末端并输入数据后,有一个自动绘制该图的程序可能会非常有用。
我的英语不是最好的,很抱歉。希望这些图片对你有帮助。
-大蒜-
Iso。图纸
您需要什么数据作为输出? ...如图/dwg所示。对于“数据”,我指的是直径和厚度=+绝缘或-壁厚。结果应该像一个有这些“特殊端”的管道
acad2008和acad2010
...你是这个意思吗?
-大蒜-
这会让你开始
我对你的直径有误解
更改所有尺寸以适合
(defun C:SS (/ cpt dia1 dia2 dist dpt ept hgt1 thk2
sol1 sol2 sol3 sol4 spt subsol1 subsol2 thk1)
(setvar "cmdecho" 0)
(command "._-view" "_swiso")
(command "._vscurrent" "_2")
(setq dia1 (getdist "\nEnter big pipe diameter <168.3> : "))
(if (not dia1)(setq dia1 168.3))
(setq hgt1 (getdist "\nEnter pipe height <1000> : "))
(if (not hgt1)(setq hgt1 150.))
(setq thk1 (getdist "\nEnter pipe thickness <8> : "))
(if (not thk1)(setq thk1 8.))
(setq dia2 (getdist "\nEnter the conjunction pipe diameter <114.3> : "))
(if (not dia2)(setq dia2 114.3))
(setq thk2 (getdist "\nEnter thickness of insulation <40.0> : "))
(if (not thk2)(setq thk2 40.))
(setq dist (getdist "\nEnter distance between pipe axises <1000>: "))
(if (not dist)(setq dist 1000.))
(setq cpt (getpoint "\nPick center point of the big pipe: ")
spt (list (car cpt)(+ (cadr cpt) hgt1)(caddr cpt))
ept (list (car cpt)(- (cadr cpt) hgt1)(caddr cpt))
)
(command "._cylinder" "_non" spt dia1 "_A"ept)
(setq sol1 (entlast))
(command "._cylinder" "_non" spt (- dia1 (* 2 thk1)) "_A"ept)
(setq subsol1 (entlast))
(command "._rotate3d" sol1 "" "_X" "_non" cpt -45.)
(setq sol1 (entlast))
(command "._rotate3d" subsol1 "" "_X" "_non" cpt -45.)
(setq subsol1 (entlast))
(setq dpt (list (+ (car cpt) dist) (cadr cpt)(caddr cpt)))
(command "._copy" sol1 "" "_non" cpt "_non" dpt)
(setq sol2 (entlast))
(command "._rotate3d" sol2 "" "_X" "_non" cpt 90.)
(setq sol2 (entlast))
(command "._copy" subsol1 "" "_non" cpt "_non" dpt)
(setq subsol2 (entlast))
(command "._rotate3d" subsol2 "" "_X" "_non" cpt 90.)
(setq subsol2 (entlast))
(command "._cylinder" "_non" cpt dia2 "_A"dpt)
(setq sol3 (entlast))
(command "._cylinder" "_non" cpt (+ dia2 (/ thk2 2.)) "_A"dpt)
(setq sol4 (entlast))
(command "._subtract" sol4 "" sol3 "")
(setq sol4 (entlast))
(command "._subtract" sol4 "" subsol1 "")
(setq sol4 (entlast))
(command "._subtract" sol4 "" subsol2 "")
(setq sol4 (entlast))
(command "._subtract" sol4 "" sol1 "")
(setq sol4 (entlast))
(command "._subtract" sol4 "" sol2 "")
(command "._vscurrent" "_C")
(setvar "cmdecho" 1)
(princ)
)
~'J'~ ..我想,我试着解释错了。。。仅从以下内容开始:
(setq dia1(getdist“\n输入管径:”)。。。是外径
(setq hgt1(getdist“\n输入管道高度:”)。。。是管子的长度
(setq thk2(getdist“\n输入绝缘厚度:”)。。。好啊
整个管道的外径将为168,3+40+40 mm。
要减去的圆柱体直径始终为2.5 x管道外径,即168.3 x 2.5=420.75mm
圆柱体的高度可以始终是管道外径的1.1倍,这没关系。
这应该足够画出像图片上那样的部分了——我认为:不确定:。
-大蒜-
对不起,我不明白
~'J'~ 嗯,我自己也很困惑:我觉得太复杂了:?
我测试了你的代码并做了一些肮脏的更改。它现在工作正常,但“输入管道半径”必须是“输入管道直径”,如果在acad中测试,您将看到。。。
你的代码很好:D,所以我可以用它。
*******
(定义C:SS(/cpt dia1 dia2 dist dpt ept hgt1 thk2
sol1 sol2 sol3 sol4 spt subsol1 subsol2 thk1)
; (setvar“cmdecho”0)
; (命令“.-view”“\u swiso”)
; (命令“.u vscurrent”“\u 2”)
(setq dia1(getdist“\n输入减去管道半径:”)
(if(非dia1)(setq dia1 300.0))
(setq hgt1(getdist“\n输入减去管道半长:”)
(if(非hgt1)(setq hgt1 300)
(setq dia2(getdist“\n输入管道半径:”)
(if(非dia2)(setq dia2 175.0))
(setq thk2(getdist“\n输入绝缘厚度:”)
(if(非thk2)(setq thk2 50)
(setq dist(getdist“\n输入管道最大长度:”)
(if(非dist)(setq dist 1000)
(setq cpt(getpoint“\n点击减法管道的中心点:”)
spt(列表(car cpt)(+(cadr cpt)hgt1)(caddr cpt))
ept(列表(car cpt)((cadr cpt)hgt1)(caddr cpt))
)
(命令“_cylinder”“\u non”spt dia1“\u A”ept)
(setq sol1(entlast))
(命令“.u rotate3d”sol1“\u X”\u non”cpt-45。)
(setq sol1(entlast))
(setq dpt(list(+(car cpt)dist)(cadr cpt)(caddr cpt)))
(命令“..u copy“sol1”“”\u non“cpt”\u non“dpt”)
(setq sol2(entlast))
(命令“.u rotate3d”sol2“\u X”\u non”cpt 90。)
(setq sol2(entlast))
(命令“..u cylinder”“\u non”cpt dia2“\u A”dpt)
(setq sol3(entlast))
(命令“_cylinder”“\u non”cpt(+dia2(/thk2 1))“A”dpt)
(setq sol4(entlast))
(命令“.u减去”sol4“sol3”)
(setq sol4(entlast))
(命令“.u减去”sol4“sol1”)
(setq sol4(entlast))
(命令“.u减去”sol4“sol2”)
(命令“.u vscurrent”“\u 2”)
; (setvar“cmdecho”1)
(普林斯)
)
*********
我希望,现在更容易了。
-大蒜-
好啊
我需要什么
再次绘制样本图,精确尺寸为
然后上传到这里
对我来说会容易得多
~'J'~ 你好,
我刚刚画了一张附有代码的图。
希望这有帮助。
-大蒜-
非常感谢:D
SS4.dwg
SS4.lsp 是否可以为dia1“减去管道半径”和hgt1“减去管道半长”提供相同的公式:
(管径+保温层)x 2.5?
这会让管道上的破裂看起来很漂亮。
是否可能给dist“管道最大长度”始终相同的公式:dia1 x 5?
之后只剩下“管径”和“保温厚度”的问题。
那真的太完美了!(…而且很复杂?)
-大蒜-
页:
[1]
2