您的位置:网站首页 > Ansys教程

Ansys学习笔记: 绘制椭圆

时间:2008-09-15 11:12:23 来源:
用坐标系操作来绘制圆:

命令流:

CSWPLA,11,1,0.5,1
/PREP7
K,1,-5
K,2,5
L,1,2
CSYS,0
LSYMM,Y,1,,,,0,0
lglue,all
al,1,3

详细解释:

查阅帮助得知:

1.CSWPLA:
/*
CSWPLA, KCN, KCS, PAR1, PAR2

Defines a local coordinate system at the origin of the working plane.


KCN
Arbitrary reference number assigned to this coordinate system. Must be greater than 10. A coordinate system previously defined with this number will be redefined.

KCS
Coordinate system type:

0 or CART --
Cartesian

1 or CYLIN --
Cylindrical (circular or elliptical)

2 or SPHE --
Spherical (or spheroidal)

3 or TORO --
Toroidal


PAR1
Used for elliptical, spheroidal, or toroidal systems. If KCS = 1 or 2, PAR1 is the ratio of the ellipse Y-axis radius to X-axis radius (defaults to 1.0 (circle)). If KCS = 3, PAR1 is the major radius of the torus.

PAR2
Used for spheroidal systems. If KCS = 2, PAR2 = ratio of ellipse Z-axis radius to X-axis radius (defaults to 1.0 (circle)).

*/ 可以知道第一句是定义了一个圆柱坐标系
第三四句就创建了椭圆的两个端点.
第五句创建连接两个点构成一条线(因为是圆柱坐标系,所以绘制的线不是直线了:)
csys,0切换到整体坐标系.
最后%26quot;LSYMM,Y,1,,,,0,0%26quot;一句进行对称绘制.
然后lglue,all把两条线连接起来,最后一句绘制椭圆面.
这个里面比较难以理解的是用l,1,2命令连接两点得到的不是直线而是曲线.