谢谢楼上的。楼上没有明白我的意思。
!
finish
/pmacro
/CLEAR
/FILNAME,kkbq
!/VIEW,1,-0.50,-0.83,0.25 !调整模型显示方位和角度
!/ANG,1,66
multipro,'start',6
*cset,1,3,D1,'shell diameter',800
*cset,4,6,D2,'pipe diameter',150
*cset,7,9,T1,'shell thickness',20
*cset,10,12,t2,'pipe thickness',15
*cset,13,15,l1,'shell length',800
*cset,16,18,l2,'pipe length',600
multipro,'end'
*IF,_BUTTON,EQ,1,THEN !如果选择取消按钮终止运行宏
/EOF
*ENDIF
multipro,'start',2
*cset,1,3,r1,'inside fillet radius',10
*cset,4,6,r2,'outside fillet radius',15
multipro,'end'
*IF,_BUTTON,EQ,1,THEN !如果选择取消按钮终止运行宏
/EOF
*ENDIF
/prep7
et,2,solid185 !进行结构分析的体单元类型
!et,1,shell57 !定义辅助建模的壳单元类型
!et,2,solid70 !进行热分析的体单元类型
mp,ex,1,2e5 !定义材料的弹性模量
mp,nuxy,1,0.3 !定义材料的泊松比
*afun,deg !转换成角度制
cylind,D1/2+T1,D1/2,0,-L1,90,270,
!wpoff,0,0,-L1/2 !将工作面沿-Z向移动L1/2
wprot,0,-90, !将工作面沿yz旋转90o
cylind,D2/2+T2,D2/2,0,L2,90,180, !生成接管
VDEL,1,2,,0,
wpcsys,1,0
APLOT
/REPLOT
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!! 内面相overlap !!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
lsel,s,radius,,d2/2
ASLL,,,,
ASEL,U,LOC,Y,L2
ASEL,U,LOC,Y,0
lsel,A,radius,,d1/2
ASLL,,,,
ASEL,U,LOC,Z,-L1
ASEL,U,LOC,Z,0
AOVLAP,ALL
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!! 外面相overlap !!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ALLSEL
lsel,s,radius,,d2/2+T2
ASLL,,,,
ASEL,U,LOC,Y,L2
ASEL,U,LOC,Y,0
lsel,A,radius,,d1/2+T1
ASLL,,,,
ASEL,U,LOC,Z,-L1
ASEL,U,LOC,Z,0
AOVLAP,ALL
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!! 删除多余面和线 !!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ALLSEL
lsel,s,radius,,d2/2,d2/2+T2
lsel,R,LOC,Y,0
ASLL,,,,
/REPLOT
LSLA,,,,
ASLL,,1,
APLOT
ADELE,ALL,,,1
Asel,S,LOC,Z,0
ADELE,ALL,,,1
ALLSEL
Asel,S,LOC,X,0
Asel,U,LOC,Y,-D1/2,-D1/2-T1
ADELE,ALL,,,1
ALLSEL
!Ksel,s,LOC,Y,d1/2,d1/2+T1,
Ksel,s,LOC,Y,d1/2-0.001,d1/2+0.001,
Ksel,A,LOC,Y,d1/2+T1-0.001,d1/2+T1+0.001
Ksel,U,LOC,Z,-L1
LSLK,,1,1,
asll,,,,
ADELE,ALL,,,1
allsel
nummrg,all !所有重合的点、线、面信息合并
numcmp,all !所有点、线、面信息依次重排序
lsel,s,radius,,d2/2-0.001,d2/2+0.001,
ASLL,,,,
ASEL,U,LOC,Y,L2-0.001,L2+0.001
!a1=_return
!cm,ar1,area
!ASEL,U,LOC,Y,0
lsel,A,radius,,d1/2-0.001,d1/2+0.001
ASLL,,,,
ASEL,U,LOC,Y,L2-0.001,L2+0.001
ASEL,U,LOC,Z,-L1
ASEL,U,LOC,y,d1/2,l2
!cm,ar2,area
allsel
AFILLT,4,5,R1,
a1=_return
AFILLT,6,7,R2,
a2=_return
上面是我的命令流,但是我需要选择出面及点,选出的面进行倒圆,选择关键点则是为了连接成线后生成面和体。
在上面的命令中由于无法获取面号,只能把实际的面号查出来,在命令中直接输上了。AFILLT,4,5,R1,
AFILLT,6,7,R2,
我想通过命令获取出4,5,6,7的面号,及中间关键点的点号。 |