Q : How can I rotate a Working plane about the Z global Axis in ANSYS?

A : Please see the MACRO below.

csys,0
!Rotate angle about the global cartesian Z axis
ANGLE = 90

! dataset of the actual Working Plane
*get,X,CDSY,4,LOC,X
*get,Y,CDSY,4,LOC,Y
*get,Z,CDSY,4,LOC,Z
*get,XY,CDSY,4,ANG,XY
*get,YZ,CDSY,4,ANG,YZ
*get,ZX,CDSY,4,ANG,ZX

csys,0
! Use of a node for copy and rotate the WP center (Node number is here 100000)
N,100000,X,Y,Z
csys,1

! Copy of the node to locate the center of the new Working Plane New node number = 100001)
NGEN,2,1,100000, , , ,ANGLE, ,1,
NWPAVE,100001

! dataset of the new Working Plane
*get,X,CDSY,4,LOC,X
*get,Y,CDSY,4,LOC,Y
*get,Z,CDSY,4,LOC,Z

! New angle about the Z axis
XYNEW = XY + ANGLE
csys,0
CLOCAL,11,0,X,Y,Z,XYNEW,YZ,ZX

! Delete of the none used entities
csys,11
WPCSYS,-1
csys,0
NDEL,100000
NDEL,100001
CSDEL,11
**** Entered By: swescott @ 02/28/2005 09:53 AM ****


Q : How can I rotate a Working plane about the Z global Axis in ANSYS?

A : Please see the MACRO below.

csys,0
!Rotate angle about the global cartesian Z axis
ANGLE = 90

! dataset of the actual Working Plane
*get,X,CDSY,4,LOC,X
*get,Y,CDSY,4,LOC,Y
*get,Z,CDSY,4,LOC,Z
*get,XY,CDSY,4,ANG,XY
*get,YZ,CDSY,4,ANG,YZ
*get,ZX,CDSY,4,ANG,ZX

csys,0
! Use of a node for copy and rotate the WP center (Node number is here 100000)
N,100000,X,Y,Z
csys,1

! Copy of the node to locate the center of the new Working Plane New node number = 100001)
NGEN,2,1,100000, , , ,ANGLE, ,1,
NWPAVE,100001

! dataset of the new Working Plane
*get,X,CDSY,4,LOC,X
*get,Y,CDSY,4,LOC,Y
*get,Z,CDSY,4,LOC,Z

! New angle about the Z axis
XYNEW = XY + ANGLE
csys,0
CLOCAL,11,0,X,Y,Z,XYNEW,YZ,ZX

! Delete of the none used entities
csys,11
WPCSYS,-1
csys,0
NDEL,100000
NDEL,100001
CSDEL,11
**** Entered By: swescott @ 02/28/2005 09:53 AM ****





Show Form
No comments yet. Be the first to add a comment!