Changeset 54
- Timestamp:
- 06/19/08 10:25:44 (7 months ago)
- Files:
-
- trunk/doc/par-section.tex (modified) (1 diff)
- trunk/solides.pro (modified) (24 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doc/par-section.tex
r49 r54 599 599 name=parts_cube, 600 600 action=none](a 2 div,a 2 div,a 2 div) 601 \psSolid[object=load,602 load=parts_cube1,603 action=writesolid,604 file=cubeHexagone]601 %\psSolid[object=load, 602 % load=parts_cube1, 603 % action=writesolid, 604 % file=cubeHexagone] 605 605 \psSolid[object=datfile, 606 606 fcol=0 (Dandelion), trunk/solides.pro
r44 r54 1 1 %! 2 2 % PostScript prologue for pst-solides3d.tex. 3 % Version 3.3 0, 2008/06/133 % Version 3.31, 2008/06/19 4 4 % 5 5 %% COPYRIGHT 2008 by Jean-Paul Vignault, Manuel Luque … … 613 613 /frct true def 614 614 pop 615 i 0 eq {616 0617 } if615 i 0 eq { 616 0 617 } if 618 618 } { 619 619 dup 45 eq { … … 621 621 pop 622 622 } { 623 frct not {623 frct not { 624 624 i 1 ge signnum 0 ge and i 2 ge or { 625 625 exch 10 mul 48 sub add … … 627 627 48 sub 628 628 } ifelse 629 } {630 48 sub631 /k k 1 add store632 10 k exp div add633 } ifelse629 } { 630 48 sub 631 /k k 1 add store 632 10 k exp div add 633 } ifelse 634 634 } ifelse 635 635 } ifelse … … 945 945 3 dict begin 946 946 /lepl@n exch def 947 lepl@n plangetbase aload pop948 /@V defpoint3d949 /@U defpoint3d950 lepl@n plangetorigine951 [@U @U @V vectprod3d] mybool planprojpath947 lepl@n plangetbase aload pop 948 /@V defpoint3d 949 /@U defpoint3d 950 lepl@n plangetorigine 951 [@U @U @V vectprod3d] mybool planprojpath 952 952 end 953 953 } { … … 3564 3564 0 1 n 1 sub { 3565 3565 /j exch def 3566 j i ne {3566 j i ne { 3567 3567 solid j solidgetsommet 3568 } if3568 } if 3569 3569 } for 3570 3570 ] def … … 3576 3576 %% face d indice j 3577 3577 /j exch def 3578 /Fj solid j solidgetface def3579 [0 1 Fj length 1 sub {3580 %% sommet d indice k de la face Fj3581 /k exch def3582 Fj k get dup i gt {3583 1 sub3584 } if3585 } for]3578 /Fj solid j solidgetface def 3579 [0 1 Fj length 1 sub { 3580 %% sommet d indice k de la face Fj 3581 /k exch def 3582 Fj k get dup i gt { 3583 1 sub 3584 } if 3585 } for] 3586 3586 } for 3587 3587 ] def … … 3905 3905 i sol j solidgetface in { 3906 3906 %% le sommet i est dans la face j 3907 pop3907 pop 3908 3908 exit 3909 3909 } if … … 3932 3932 dup isarray { 3933 3933 /tableaffectation exch def 3934 /mode -1 def3934 /mode -1 def 3935 3935 } { 3936 3936 /mode defaultsolidmode def … … 4985 4985 candidat 3 get isarray { 4986 4986 candidat 4 get isarray { 4987 candidat 5 get isarray 4987 candidat 5 get isarray 4988 4988 } { 4989 4989 false 4990 4990 } ifelse 4991 4991 } { 4992 false4992 false 4993 4993 } ifelse 4994 4994 } { … … 5447 5447 dup 0 ne { 5448 5448 /x exch def 5449 x5450 x x truncate eq {5451 cvi5452 } if5449 x 5450 x x truncate eq { 5451 cvi 5452 } if 5453 5453 dup chaine cvs exch 0 leplan mybool dctextp3d 5454 newpath5455 x 0 smoveto5456 0 2.5 rmoveto5457 0 -5 rlineto5458 leplan mybool projpath5459 stroke5454 newpath 5455 x 0 smoveto 5456 0 2.5 rmoveto 5457 0 -5 rlineto 5458 leplan mybool projpath 5459 stroke 5460 5460 } { 5461 5461 pop (0) 0 0 leplan mybool dltextp3d … … 5487 5487 dup 0 ne { 5488 5488 /y exch def 5489 y5490 y y truncate eq {5491 cvi5492 } if5489 y 5490 y y truncate eq { 5491 cvi 5492 } if 5493 5493 dup chaine cvs exch 0 exch leplan mybool cltextp3d 5494 newpath5495 0 y smoveto5496 2.5 0 rmoveto5497 -5 0 rlineto5498 leplan mybool projpath5499 stroke5494 newpath 5495 0 y smoveto 5496 2.5 0 rmoveto 5497 -5 0 rlineto 5498 leplan mybool projpath 5499 stroke 5500 5500 } { 5501 5501 pop (0) 0 0 leplan mybool dltextp3d … … 5653 5653 dup isstring { 5654 5654 /couleur2 exch def 5655 dup isstring {5655 dup isstring { 5656 5656 /couleur1 exch def 5657 } {5657 } { 5658 5658 /couleur1 (rouge) def 5659 } ifelse5659 } ifelse 5660 5660 } { 5661 5661 /couleur2 (vert) def … … 6449 6449 0 1 indicesommetstries length 1 sub { 6450 6450 /k exch def 6451 nouveauxindices indicesommetstries k get get6451 nouveauxindices indicesommetstries k get get 6452 6452 } for 6453 6453 ] solidaddface … … 6719 6719 0 1 indicesommetstries length 1 sub { 6720 6720 /k exch def 6721 nouveauxindices indicesommetstries k get get6721 nouveauxindices indicesommetstries k get get 6722 6722 } for 6723 6723 ] solidaddface … … 6900 6900 /v ymin j dy mul add def 6901 6901 u v 6902 surfz {2 copy} if6903 f_surface6902 surfz {2 copy} if 6903 f_surface 6904 6904 pstrickactionR3 6905 6905 } for … … 8184 8184 0 1 Fi length 1 sub { 8185 8185 /j exch def 8186 lefichierfaces Fi j get chaine cvs writestring8186 lefichierfaces Fi j get chaine cvs writestring 8187 8187 lefichierfaces 32 write %% espace 8188 8188 } for … … 8446 8446 k1 k2 vectprod3d normalize3d /k3 defpoint3d 8447 8447 k3 norme3d 0 eq { 8448 tub@dernierk3 aload pop /k3 defpoint3d8448 tub@dernierk3 aload pop /k3 defpoint3d 8449 8449 } { 8450 8450 /tub@dernierk3 [k3] store … … 8639 8639 /writeoff {solidfilename writeofffile} def 8640 8640 /none {pop} def 8641 /vecteur_en_c@urs false def 8641 8642 8642 8643 /gere_pstricks_color_inout { … … 8683 8684 /i exch def 8684 8685 plansection i get solidplansection 8685 dup 0 solidrmface8686 dup 0 solidrmface 8686 8687 } for 8687 8688 } if … … 8695 8696 } if 8696 8697 solidaffinage length 0 ne { 8698 %% si on affine, il faut colorier avant 8699 activationgestioncouleurs { 8700 gere_pstricks_color_out 8701 } if 8697 8702 solidaffinage 0 get isstring { 8698 8703 dup affinagecoeff 8699 /solidfcolor where {8700 pop8701 solidfcolor8702 } if8703 affinagerm solidaffine8704 /solidfcolor where { 8705 pop 8706 solidfcolor 8707 } if 8708 affinagerm solidaffine 8704 8709 } { 8705 8710 dup affinagecoeff solidaffinage 8706 /solidfcolor where {8707 pop8708 solidfcolor8709 } if8710 affinagerm solidaffine8711 /solidfcolor where { 8712 pop 8713 solidfcolor 8714 } if 8715 affinagerm solidaffine 8711 8716 } ifelse 8717 %% et il faut evider et coloriier l'interieur si necessaire 8718 solidhollow { 8719 dup videsolid 8720 activationgestioncouleurs { 8721 gsave 8722 dup [fillincolor] (setrgbcolor) astr2str inputcolors 8723 grestore 8724 } if 8725 } if 8726 /activationgestioncouleurs false def 8712 8727 } if 8713 8728 tx@Dict /plansepare known { … … 8748 8763 } if 8749 8764 } ifelse 8750 /lightsrc where {pop solidlightOn} if 8765 vecteur_en_c@urs not { 8766 /lightsrc where {pop solidlightOn} if 8767 } { 8768 /vecteur_en_c@urs false def 8769 } ifelse 8751 8770 dup action 8752 8771 noir … … 9143 9162 /pst-vecteur { 9144 9163 gsave 9145 2 dict begin9146 9164 /activationgestioncouleurs false def 9147 solidlightOff9165 /vecteur_en_c@urs true def 9148 9166 solidlinewidth setlinewidth 9149 9167 2 setlinejoin … … 9158 9176 args definition cvx exec newvecteur 9159 9177 dup 9178 gsave 9160 9179 [linecolor currentrgbcolor] ( ) astr2str (setrgbcolor) append 9161 9180 outputcolors 9181 grestore 9162 9182 gere_pstricks_opt 9163 end9164 9183 grestore 9165 9184 } def
