%% syntaxe : solid indiceface triangulemaillage --> -
%% syntaxe : solid array triangulemaillage --> -
%% syntaxe : solid triangulemaillage --> -
/triangulemaillage {
10 dict begin
dup issolid {
dup solidnombrefaces /N exch def
/table [0 1 N 1 sub {} for] def
} {
dup isarray {
/table exch def
} {
[ exch ] /table exch def
} ifelse
} ifelse
/solid exch def
/n table length def
0 1 n 1 sub {
/i exch def
solid table i get solidgetface /F exch def
solid table i get solidcentreface /G defpoint3d
G == == ==
solid G solidaddsommet /k exch def
/ni F length def
0 1 ni 1 sub {
/j exch def
solid [
F j get
F j 1 add ni mod get
k
] solidaddface
} for
} for
solid table solidrmfaces
end
} def
|