\documentclass{article}
\usepackage{pst-solides3d,pst-node,pst-plot,multido,url}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{colortbl}
\usepackage{array}
\usepackage[a4paper,bottom=2.5cm,top=2cm]{geometry}
%%\usepackage[frenchle]{babel}
\makeatletter

\title{\texttt{pst-solides3d} :\\
       Test}
\date{\today }
\begin{document}
\maketitle

\section {Test écriture de fichier off avec PSTricks}

%\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz}
\psset{viewpoint=50 20 30 rtp2xyz}

\begin{center}
\psset{unit=1}
\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
\begin{pspicture*}(-5,-4)(6,9)
\psframe(-5,-4)(6,9)
\psSolid[object=tore,
   file=test,
   action=writeoff
]
\end{pspicture*}
\end{center}

\section {Test lecture de fichier off avec PSTricks}

%\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz}
\psset{viewpoint=50 20 30 rtp2xyz}

\begin{center}
\psset{unit=1}
\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
\begin{pspicture*}(-5,-4)(6,9)
\psframe(-5,-4)(6,9)
\codejps {
   (test) newofffile
%   dup (test2) writeobjfile
   dup (blanc) outputcolors
   dup drawsolid*
   solidnumfaces
}
%% \psSolid[object=offfile,
%%    file=test,
%%    num=all
%%    ]
\end{pspicture*}
\end{center}

\end{document}
