Rev 14850 | Rev 16996 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if $wims_read_parm!=slib_header |
13593 | bpr | 2 | !goto proc |
20 | reyssat | 3 | !endif |
4158 | bpr | 4 | |
4351 | bpr | 5 | slib_author=Bernadette, Perrin-Riou |
14219 | bpr | 6 | slib_title=3Dviewer |
4158 | bpr | 7 | |
16944 | bpr | 8 | slib_example=[14,6;-1.0,-1.0,0;1.0,-1.0,0;1.0,1.0,0;-1.0,1.0,0;1.0,3.0,0;-1.0,3.0,0;-1.0,5.0,0;1.0,5.0,0;-3.0,1.0,0;-3.0,3.0,0;3.0,1.0,0;3.0,3.0,0;-1.0,-3.0,0;1.0,-3.0,0;4,6,5,4,7;4,3,2,4,5;4,8,3,5,9;4,2,10,11,4;4,1,0,12,13;4,0,1,2,3], scale=1 height=400 width=400 id=0 format=off\ |
9 | j87_augmented_sphenocorona,bondcolor=red id=1\ |
||
10 | rhombicosidodecahedron,label=false scale=1 height=400 width=400 bgcolor=blue id=2\ |
||
11 | cube,label=false scale=0.8 height=300 width=300 id=3\ |
||
12 | |||
20 | reyssat | 13 | !exit |
14 | |||
15 | :proc |
||
14219 | bpr | 16 | !reset slib_option |
20 | reyssat | 17 | slib_data = !item 1 of $wims_read_parm |
16944 | bpr | 18 | slib_data=!declosing $slib_data |
14219 | bpr | 19 | slib_option= !item -1 of $wims_read_parm |
20 | reyssat | 20 | |
21 | !default slib_cnt=0 |
||
22 | slib_cnt= $[$slib_cnt +1] |
||
23 | |||
14219 | bpr | 24 | !for slib_a in label,scale,box,bonds,bgcolor,bondcolor,atomcolor,facecolor,format,width,height,id |
25 | !reset slib_$slib_a |
||
20 | reyssat | 26 | slib_$slib_a=!getopt $slib_a in $slib_option |
27 | !next slib_a |
||
28 | !default slib_label=false |
||
14219 | bpr | 29 | !default slib_bgcolor=white |
30 | !default slib_bondcolor=yellow |
||
20 | reyssat | 31 | !default slib_box=true |
32 | !default slib_bonds=true |
||
33 | !default slib_scale=0.8 |
||
34 | !default slib_width=300 |
||
35 | !default slib_height=300 |
||
14219 | bpr | 36 | !default slib_id=!randint 1000,3000 |
20 | reyssat | 37 | slib_out= |
38 | slib_cnt_word=!wordcnt $slib_data |
||
16944 | bpr | 39 | slib_cnt_item=!itemcnt $slib_data |
40 | !if $slib_cnt_word=1 and $slib_cnt_item=1 |
||
20 | reyssat | 41 | slib_data=!record 0 of data/polyedre_off/$slib_data.off |
42 | slib_format=off |
||
16944 | bpr | 43 | !else |
44 | slib_data=!replace internal , by $ $ in $slib_data |
||
20 | reyssat | 45 | !endif |
46 | !if $slib_format issametext off |
||
14219 | bpr | 47 | slib_atomes=$slib_data |
16944 | bpr | 48 | slib_atomes=!translate ; to $\ |
49 | $ in $slib_atomes |
||
20 | reyssat | 50 | !else |
13593 | bpr | 51 | slib_atomes=$slib_data |
20 | reyssat | 52 | !endif |
53 | slib_atomes=!translate $ $ to $\ |
||
54 | $ in $slib_atomes |
||
55 | |||
804 | reyssat | 56 | !default slib_cnt=0 |
14219 | bpr | 57 | slib_cnt= $[$slib_cnt+1] |
804 | reyssat | 58 | slib_fichier=fichier.$slib_cnt |
59 | |||
20 | reyssat | 60 | !readproc oef/togetfile.proc $slib_fichier new\ |
61 | $slib_atomes |
||
62 | |||
14219 | bpr | 63 | !set slib_option=,AA, |
16944 | bpr | 64 | !!careful confusion with slib_width in off2jmol |
65 | !set slib_width_v=$(slib_width) |
||
66 | !set slib_height_v=$(slib_height) |
||
14219 | bpr | 67 | !readproc slib/geo3D/off2jmol $slib_atomes,[$slib_option],[ ,$slib_bondcolor,],[0.01,0.01],url distance |
16944 | bpr | 68 | !readproc slib/chemistry/jmolshow $(slib_out[2]),$slib_height_v,$slib_width_v,$slib_bgcolor,script "$(slib_out[1])";zoom 180,$slib_id |