Subversion Repositories wimsdev

Rev

Rev 4351 | Rev 13593 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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