Rev 7692 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
981 | bpr | 1 | !if $wims_read_parm!=slib_header |
13593 | bpr | 2 | !goto proc |
20 | reyssat | 3 | !endif |
4 | |||
4351 | bpr | 5 | slib_author=Bernadette, Perrin-Riou |
20 | reyssat | 6 | |
7 | !exit |
||
8 | |||
9 | :proc |
||
10 | |||
11 | !distribute items $wims_read_parm into slib_polyedre,slib_options |
||
12 | slib_prgm= |
||
13 | !reset slib_points, slib_faces, slib_aretes |
||
14 | !!********** Traitement des options |
||
15 | |||
16 | slib_optcnt=!itemcnt $slib_options |
||
17 | !for slib_no=1 to $slib_optcnt |
||
18 | slib_option=!item $slib_no of $slib_options |
||
19 | slib_option=!declosing $slib_option |
||
13593 | bpr | 20 | slib_optionname=!item 1 of $slib_option |
21 | slib_optionvalue=!items 2 to -1 of $slib_option |
||
22 | !if $slib_optionname issametext faces |
||
23 | slib_faces=$slib_optionvalue |
||
24 | !endif |
||
25 | !if $slib_optionname issametext aretes |
||
26 | slib_aretes=$slib_optionvalue |
||
27 | !endif |
||
28 | !if $slib_optionname issametext points |
||
29 | slib_points=$slib_optionvalue |
||
30 | !endif |
||
20 | reyssat | 31 | !next slib_no |
32 | !default slib_faces=0 |
||
33 | !default slib_aretes=0 |
||
34 | !default slib_points=0 |
||
35 | |||
36 | !!********** Lecture des données polyedre |
||
37 | |||
38 | slib_polyedre=!record 0 of data/polyedre_off/$slib_polyedre.off |
||
39 | slib_H=1 |
||
40 | slib_u=!line 1 of $slib_polyedre |
||
41 | slib_nom=!replace internal # by $empty in $slib_u |
||
42 | !while # isin $slib_u |
||
13593 | bpr | 43 | !advance slib_H |
44 | slib_u=!line $slib_H of $slib_polyedre |
||
20 | reyssat | 45 | !endwhile |
46 | |||
47 | |||
48 | !distribute word $slib_u into slib_S_cnt, slib_F_cnt, slib_A_cnt |
||
49 | |||
50 | slib_sommet=!line $[$slib_H+1] to $[$slib_H+$slib_S_cnt] of $slib_polyedre |
||
51 | slib_sommet=!nonempty lines $slib_sommet |
||
52 | |||
53 | slib_arete=!line $[$slib_H+$slib_S_cnt+$slib_F_cnt+1] to $[$slib_H+$slib_S_cnt+$slib_F_cnt+$slib_A_cnt] of $slib_polyedre |
||
54 | slib_arete=!nonempty line $slib_arete |
||
55 | |||
56 | slib_face=!line $[$slib_H+$slib_S_cnt+1] to $[$slib_H+$slib_S_cnt+$slib_F_cnt] of $slib_polyedre |
||
57 | slib_face=!nonempty line $slib_face |
||
58 | |||
59 | !!********** code de mise en scene |
||
60 | |||
61 | slib_prelim= |
||
62 | slib_fin= |
||
63 | !!********** code de dessin des sommets |
||
64 | |||
65 | slib_out_sommet= |
||
66 | |||
13593 | bpr | 67 | !for slib_na=1 to $slib_S_cnt |
68 | slib_coord=!line $slib_na of $slib_sommet |
||
69 | slib_out_sommet=$slib_out_sommet,$slib_coord |
||
70 | !next slib_na |
||
20 | reyssat | 71 | slib_out_sommet=!nonempty items $slib_out_sommet |
72 | slib_out_sommet=!singlespace $slib_out_sommet |
||
7692 | bpr | 73 | !!********** code de dessin des faces |
20 | reyssat | 74 | slib_out_face= |
75 | !for slib_nc=1 to $slib_F_cnt |
||
13593 | bpr | 76 | slib_r=!line $slib_nc of $slib_face |
77 | slib_r=!word 2 to -1 of $slib_r |
||
78 | slib_out_face=$slib_out_face $slib_r -1 |
||
79 | !next slib_nc |
||
20 | reyssat | 80 | slib_out_face=!singlespace $slib_out_face |
81 | |||
82 | slib_out=$slib_S_cnt $slib_F_cnt;$slib_out_sommet;$slib_out_face |