找回密码
 注册
Simdroid-非首页
查看: 65|回复: 8

[命令和APDL] 关于circle的return

[复制链接]
发表于 2007-8-19 23:42:00 | 显示全部楼层 |阅读模式 来自 湖北武汉
贴一段简化过的命令。

*dim,x1,,7
*dim,pradius,,7
*dim,degree,,7
x1(1)=80.5,76.9,72,68,64.4,62.4,60
h=8
pradius(1)=56,56,48,43,40,38,38
degree(1)=8,16,32,48,64,76,83
*dim,lnumber5,,7


*do,i,1,7,1

/prep7
*afun,deg

k,,x1(i),h/2,-(i-1)*800
k,,x1(i),h/2+pradius(i),-(i-1)*800
circle,kp(x1(i),h/2+pradius(i),-(i-1)*800),,,kp(x1(i),h/2,-(i-1)*800),degree(i),1
lnumber5(i)=_return
finish
*enddo


大家帮忙运行下,查看lnumber5的数组,发现只有lnumber5(1)有数组,其他的都为0,这是什么原因呢。。。
发表于 2007-8-20 00:00:39 | 显示全部楼层 来自 陕西西安
Simdroid开发平台
我稍稍改了一下:
/prep7
*dim,x1,,7
*dim,pradius,,7
*dim,degree,,7
x1(1)=80.5,76.9,72,68,64.4,62.4,60
h=8
pradius(1)=56,56,48,43,40,38,38
degree(1)=8,16,32,48,64,76,83
*dim,lnumber5,,7

*afun,deg

*do,i,1,7,1
k,,x1(i),h/2,-(i-1)*800
k,,x1(i),h/2+pradius(i),-(i-1)*800
circle,kp(x1(i),h/2+pradius(i),-(i-1)*800),,,kp(x1(i),h/2,-(i-1)*800),degree(i),1
lnumber5(i)=_return
*enddo

结果:
PARAMETER STATUS- LNUMBER5  (  21 PARAMETERS DEFINED)
                  (INCLUDING    15 INTERNAL PARAMETERS)

      LOCATION                VALUE
        1       1       1    1.00000000   
        2       1       1    2.00000000   
        3       1       1    3.00000000   
        4       1       1    4.00000000   
        5       1       1    5.00000000   
        6       1       1    6.00000000   
        7       1       1    7.00000000
回复 不支持

使用道具 举报

发表于 2007-8-20 00:03:07 | 显示全部楼层 来自 加拿大
原帖由 byb 于 2007-8-19 23:42 发表
贴一段简化过的命令。

*dim,x1,,7
*dim,pradius,,7
*dim,degree,,7
x1(1)=80.5,76.9,72,68,64.4,62.4,60
h=8
pradius(1)=56,56,48,43,40,38,38
degree(1)=8,16,32,48,64,76,83
*dim,lnumber5,,7


...


Maybe, I don't understand what you expect fully. Try to test the following APDL for you:

*dim,x1,,7
*dim,pradius,,7
*dim,degree,,7
x1(1)=80.5,76.9,72,68,64.4,62.4,60
h=8
pradius(1)=56,56,48,43,40,38,38
degree(1)=8,16,32,48,64,76,83
*dim,lnumber5,,7
/prep7
*afun,deg

*do,i,1,7,1

k,,x1(i),h/2,-(i-1)*800
k,,x1(i),h/2+pradius(i),-(i-1)*800
circle,kp(x1(i),h/2+pradius(i),-(i-1)*800),,,kp(x1(i),h/2,-(i-1)*800),degree(i),1
alls
*get,_return,line,0,num,max,  !!! it depends
lnumber5(i)=_return
*enddo

finish

[ 本帖最后由 jinqinghai 于 2007-8-20 00:08 编辑 ]
回复 不支持

使用道具 举报

发表于 2007-8-20 00:08:09 | 显示全部楼层 来自 加拿大
原帖由 yangjungang2004 于 2007-8-20 00:00 发表
我稍稍改了一下:
/prep7
*dim,x1,,7
*dim,pradius,,7
*dim,degree,,7
x1(1)=80.5,76.9,72,68,64.4,62.4,60
h=8
pradius(1)=56,56,48,43,40,38,38
degree(1)=8,16,32,48,64,76,83
*dim,lnumber5,,7

...


So, /prep7 is always topped up.
you master it very well.
回复 不支持

使用道具 举报

 楼主| 发表于 2007-8-20 09:24:12 | 显示全部楼层 来自 湖北武汉
原帖由 yangjungang2004 于 2007-8-20 00:00 发表
我稍稍改了一下:
/prep7
*dim,x1,,7
*dim,pradius,,7
*dim,degree,,7
x1(1)=80.5,76.9,72,68,64.4,62.4,60
h=8
pradius(1)=56,56,48,43,40,38,38
degree(1)=8,16,32,48,64,76,83
*dim,lnumber5,,7

...

谢谢版主解答,可是似乎没有改动什么?我运行过后,查看lnumber5的数组,值还是为0(附件所示),请版主看看。

本帖子中包含更多资源

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

×
回复 不支持

使用道具 举报

 楼主| 发表于 2007-8-20 09:27:36 | 显示全部楼层 来自 湖北武汉
原帖由 jinqinghai 于 2007-8-20 00:03 发表


Maybe, I don't understand what you expect fully. Try to test the following APDL for you:

*dim,x1,,7
*dim,pradius,,7
*dim,degree,,7
x1(1)=80.5,76.9,72,68,64.4,62.4,60
h=8
pradius(1) ...


汗一个,版主竟然用折衷的办法处理。。。。我的目的是看看circle使用后的_return的返回值。。。。

请版主再帮忙想想。。

谢谢
回复 不支持

使用道具 举报

发表于 2007-8-20 10:00:18 | 显示全部楼层 来自 加拿大
原帖由 byb 于 2007-8-20 09:27 发表


汗一个,版主竟然用折衷的办法处理。。。。我的目的是看看circle使用后的_return的返回值。。。。

请版主再帮忙想想。。

谢谢



Look! it works as shown.

本帖子中包含更多资源

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

×
回复 不支持

使用道具 举报

发表于 2007-8-20 10:01:14 | 显示全部楼层 来自 加拿大
BTW, "circle" command can only return the "first line number" to the parameter of"_return"
Not like other commands such as "L", "Larc","Lstr".

[ 本帖最后由 jinqinghai 于 2007-8-20 10:17 编辑 ]
回复 不支持

使用道具 举报

 楼主| 发表于 2007-8-20 14:09:53 | 显示全部楼层 来自 湖北武汉
ok,3Q.I KNOWS LOTS FORM YOU SAID.3Q AGAIN.
回复 不支持

使用道具 举报

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

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-5-23 20:29 , Processed in 0.035599 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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