%% syntaxe : solid i solidrmface -> -
/solidrmface {
5 dict begin
/i exch def
/solid exch def
solid issolid not {
(Error : mauvais type d argument dans solidrmface) ==
quit
} if
%% on enleve la face
/F solid solidgetfaces def
F length 1 sub i lt {
(Error : indice trop grand dans solidrmface) ==
quit
} if
[
0 1 F length 1 sub {
/j exch def
i j ne {
F j get
} if
} for
]
/NF exch def
solid NF solidputfaces
%% on enleve la couleur correspondante
/FC solid solidgetfcolors def
[
0 1 FC length 1 sub {
/j exch def
i j ne {
FC j get
} if
} for
]
/NFC exch def
solid NFC solidputfcolors
%% on ajuste la table inout
/IO solid solidgetinouttable def
solid i solidisoutface {
IO 1 IO 1 get 1 sub put
solid solidwithinfaces {
IO 2 IO 2 get 1 sub put
IO 3 IO 3 get 1 sub put
} if
} if
solid i solidisinface {
IO 1 IO 1 get 1 sub put
IO 2 IO 2 get 1 sub put
IO 3 IO 3 get 1 sub put
} if
solid IO solidputinouttable
end
} def
%% syntaxe : solid table solidrmfaces --> -
/solidrmfaces {
2 dict begin
/table exch bubblesort reverse def
/solid exch def
table {solid exch solidrmface} apply
end
} def
|