So... if we can trust the x/y/z data in the file we import then...
It's easy to spit into 'sets' of cpoints as they come in.
The very first z is a 'top' and every line of text after that with a lower z is in the same set.
We will eventually draw lines from one to the next
If a z is more that it's predecessor then a new set is started.
We repeat adding cpoints until the next set starts etc.
As we go we keep a list of the these cpoint sets.
Now we draw the lines...
The 'vertical' ones are easy as we simply go through the sets of cpoints and for each list of cpoints we add_line from pt[0],pt[1] then pt[1],pt[2] etc.
To add 'cross' members between pairs of nodes in adjacent sets we iterate a set and the next one to it using add_line set[0]pt[0],set[1]pt[0] then set[0]pt[1],set[1]pt[1] etc.
Now we have a 'grid' of lines between the corresponding sets of cpoints in the file.
If 'diagonals' are needed to triangulate the 'rectangles' then it's done as above but add_line steps up/down one item for the next set thus set[0]pt[0],set[1]pt[1]...
If faces are needed then again these could be added instead of unfaced edges by finding the appropriate three pints in the sets/points and add_face(p0,p1,p2)[ruby]
There's also the clever http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#fill_from_mesh that might be useful in some circumstances...