Subversion Repositories wimsdev

Rev

Rev 7692 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
!if $wims_read_parm!=slib_header
2
 !goto proc
3
!endif
4158 bpr 4
 
7692 bpr 5
slib_author=Fabrice, Guerimand
4158 bpr 6
 
20 reyssat 7
!exit
8
 
9
:proc
10
slib_input=$wims_read_parm
11
 
12
!distribute items $slib_input into a,b,mx,my,Mx,My
13
slib_out=$slib_input
14
 
15
liste=$empty
16
tmp=$[$mx*($a)+($b)]
17
!ifval $tmp<=$My and $tmp>=$my
14850 bpr 18
  liste=!append line $mx,$tmp to $liste
20 reyssat 19
!endif
20
tmp=$[$Mx*($a)+($b)]
21
!ifval $tmp<=$My and $tmp>=$my
14850 bpr 22
  liste=!append line $Mx,$tmp to $liste
20 reyssat 23
!endif
24
tmp=!linecnt $liste
25
!if $tmp=2
14850 bpr 26
  !goto end
20 reyssat 27
!endif
28
 
29
tmp=$[($my-($b))/($a)]
30
!ifval $tmp<=$Mx and $tmp>=$mx
14850 bpr 31
  liste=!append line $tmp,$my to $liste
20 reyssat 32
!endif
33
 
34
tmp=$[($My-($b))/($a)]
35
!ifval $tmp<=$Mx and $tmp>=$mx
14850 bpr 36
  liste=!append line $tmp,$My to $liste
20 reyssat 37
!endif
38
 
39
:end
40
 
41
 
42
tmp=!linecnt $liste
43
!if $tmp<2
14850 bpr 44
  slib_out=error
20 reyssat 45
!else
14850 bpr 46
  slib_out=!line 1 to 2 of $liste
20 reyssat 47
!endif