```
*
#\$b001
display
*

This example Q1 demonstrates the use of Copy-Rotate
option for BFC-type grid; it is used here to create
S-bend of a tube.

CT1=TEXT(COPY-ROTATE_EXAMPLE :               B540
#\$b002
*
Set the grid type to BFC
CT1=BFC=T
#\$b002

INTEGER(NAB,NBC)
Input data used in this example:

*
Define points A,B,C and D
GSET(P,A,0,0,0)
Point A positioned at (0,0,0)
GSET(P,A,0,0,0)
#\$b003
*
Draw  four arc lines (AB,BC,CD,DA) from A to D
to create a circle.
Lines AB&CD must have equal number of cells, as
well as lines BC&DA. Power is set to 1.0, ie. cells
are uniformly distributed.

Enter number of cells for AB(&CD) lines (default 5)
Arc AB (A-B) goes through point (0,radius-root,root)

Enter number of cells for BC(&DA) lines (default 5)
Arc BC (B-C) goes through point (0,radius+root,root)
Arc CD (C-D) goes through point (0,radius+root,-root)
Arc DA (D-A) goes through point (0,radius-root,-root)
#\$b003
*
Define frame ABCD (circle) which has corner points
A,B,C,D
CT1=GSET(F,ABCD,A,-,B,-,C,-,D,-)
#\$b003
*
Enter number of cells for I direction (default 20)
if(iqalib.ne.0) then
+ nx=0 ! set nx=0 so that readvdu will take default 20
endif
MESG(Set the BFC grid dimension as :nx: x :nbc: x :nab: cells with
#\$B004
*

Match grid plane I1 on frame ABCD using the
trans-finite method
CT1=GSET(M,ABCD,+K+J,1,1,1,TRANS)
#\$B004
*
it2=nx/4
MESG(Copy I:it2: plane from I1 plane by shifting.
REAL(SHIFT)
Enter shifting distance; it will define a straight part
Copy planes with a distance (dx=shift,dy=0,dz=0), including
internal planes; internal planes are uniformly distributed,
hence power is set to 1.
CT1=GSET(C,I:it2:,F,I1,1,nbc,1,nab,+,shift,0,0,INC,1)
#\$B004
*
it1=nx/2
MESG(Copy I:it1: plane from I:it2: plane by rotating it around
Z axis located at X=shift, Y=-0.2 m, clock-wise by 90deg.(PI/2)
Include internal planes and distribute them uniformly.
CT1=GSET(C,I:it1:,F,I:it2:,1,nbc,1,nab
CT1=:CT1:,RZ,-1.5700E+00,shift,-0.2,INC,1)
#\$B004
*
it1=nx/2
it2=it1+it2
MESG(Copy I:it2: plane from I:it1: plane by rotating it around
Z axis located at X(axis)=shift+radius*2+0.4, Y=-0.2 m, anti-
clock-wise by 90deg.(PI/2). Include internal planes and
distribute them uniformly.