You got a lot of it.
I have no idea what your 3D vector memory model is, but in LB I wrote the whole thing using my own classes and derived my collection classes by inheriting the STL <vector> class of my own component classes.
Then I overloaded several operators for these classes so I can get down to the business of doing math on the objects as apposed to having to keep re-writing all the 3D vector math.
My ultimate goal is to make the most perfect wave file I can from a frame set. So some of the optimization techniques go well beyond what might be stored in an ILDA file.
I had to create what I call the intro, bridge and coda to lead into a frame, transition from the last vertex back to the first in a frame to repeat that frame and the transition from the last vertex to lead to the first vertex of the next frame.
I also created a scan practice I call wagging. If you want to scan something that is like a simple line, it makes more sense to leave the laser on and scan it back and forth, rather than scan it in one direction, blank, return to the first vertex and scan again. There is a timing variable for how long it takes to scan an object before wagging becomes a flicker problem of it own. You set this in the [Tab] menu.
None of that stuff gets stored in an ILDA file.
But all the same, if you optimize the whole set of frames in LB you do get the shortest path through all the frames. The first frame is ordered to start at the vertex closest to the origin and the next frame starts at the vertex closest to the last vertex of the previous frame.
There is a function that looks at all the vertices in a frame in sets of 3 in a row to measure the angle of approach and departure from every vertex. This is how I find and eliminate co-linear vertices and how I determine the need for dwell.
There is an overloaded | (or) operator that gives the distance between any two vertex locations in 3D space.
There is a function that finds individual lit strings of vertices (segments).
There is a function that reveres-es the order of a segment of vertices.
A frame is a segment. A segment is made of segments.
I have both 3D short integer and 3D double precision floating point vertices and segments to be able to do all that neat math that involves irrational numbers.
I use the 3D doubles to represent 3D angles of rotation, distance of offset and scaling factors.
James.