Vladimir Lazunin wrote:
> The input file first contains many data, unnecessary for the output 
> file, so it should be skipped. Then there is a something like:
> *NODE
>   100005-232.27999877930-422.06298828125 22.000000000000       0
0
>   100006-234.33399963379-381.77999877930 22.000000000000       0
0
>   100008-269.00201416016-379.25601196289 22.000000000000       0
0

Given that the output format so closely resembles the input 
format here, I'd be tempted to treat this as a purely textual
conversion:
   (16j1#3#1)expand 48{.8}.y

For your polygon structure, I'd be tempted to simply
run each line of indices through ~. just before it was
formatted and written to file.  This would not work for
degenerate geometry, but if the data is well formed that
should never happen.

   ~. 48 52 60 60
48 52 60
   ~. 48 52 74 90
48 52 74 90

Alternatively, if degenerate geometry does occur it could
either be suppressed from the output, or it could be 
re-constituted as a triangle.

   NB. suppress formatted text for degenerate geometry
   ((3 <: [EMAIL PROTECTED]) # NL , ".)@~. y

   NB. reconstitute degenerate triangles (neglecting formatting)
   ($~ 3 >. #)@~. y

-- 
Raul

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to