5 * Revision 1.1.1.1 1999/05/18 15:55:17 fca
8 * Revision 1.1.1.1 1995/10/24 10:20:46 cernlib
12 #include "geant321/pilot.h"
13 *CMZ : 3.21/02 29/03/94 15.41.32 by S.Giani
15 SUBROUTINE GCTSET(PAR)
17 C- Created 26-JUL-1991 Nils Joar Hoimyr
18 C- Modified by J. Vuoskoski 21.02.1992
20 C- Describes a contour face of a tube segment from the GEANT
21 C- CTUB shape parameters. This face is rotated around the
22 C- Z-axis to generated a solid tube segment in SET. To cut the
23 C- tube, the cutting planes are calculated from the shape parameters,
24 C- and then 2 half-spaces are generated and subtracted from the tube
25 C- in a boolean CUT operation.
27 #include "geant321/gcsetf.inc"
32 REAL Z,DX,DY,DZ,RMIN,RMAX,PHIMIN,PHIMAX
33 REAL LXL,LYL,LZL,LXH,LYH,LZH
35 C----------------------------------------------------------
50 IF (RMAX .LE. 0.0) THEN
51 WRITE (*,*) 'IMPOSSIBLE RADIUS VALUE'
59 C Starts with a normal TUBS element
60 C *WRITE SET @50,N1,:5,2#32,RMAX,Z,PHIMIN,PHIMAX,RMIN
61 C *WRITE SET @302,N2,:5,2#317,0,0,-DZ
62 C *WRITE SET @100,N3,:5,2,:9,'MATNAM'#101,!N1,!N2
64 C------------------------------------------------------------------
66 WRITE(BLKSTR,10000)N1,RMAX,Z,PHIMIN,PHIMAX,RMIN
69 WRITE(BLKSTR,10100)N1,-DX,-DY,-DZ
72 WRITE(BLKSTR,10200)N1,N1-2,N1-1
77 C Create cutting planes, and semi-spaces which are used to
78 C cut the tube section
79 C SET blocks @30..#30 plane normals given by LXL, etc
82 WRITE(BLKSTR,10300)N1,LXL,LYL,LZL,-DZ
85 WRITE(BLKSTR,10400)N1,N1-1
88 WRITE(BLKSTR,10300)N1,LXH,LYH,LZH,DZ
91 WRITE(BLKSTR,10400)N1,N1-1
94 WRITE(BLKSTR,10500)N1,N1-5,N1-1,N1-3
97 10000 FORMAT('@50,',I10,',:5,2#32,',G14.7,',',G14.7,','
98 + ,G14.7,',',G14.7,',',G14.7)
99 10100 FORMAT('@302,',I10,'#317,',G14.7,',',G14.7,',',G14.7)
100 10200 FORMAT('@100,',I10,',:5,2#101,!',I10,',!',I10)
101 10300 FORMAT('@30,',I10,',:5,2#30,',G14.7,',',G14.7,','
103 10400 FORMAT('@100,',I10,',:5,2#139,!',I10,',1,1')
104 10500 FORMAT('@100,',I10,',:5,2#100,3,!',I10,',!',I10,',!',I10)