jlopezbi / rhinoUnfolder

unwrap meshes in rhino!
GNU General Public License v3.0
8 stars 2 forks source link

better net data structure #18

Closed jlopezbi closed 11 years ago

jlopezbi commented 11 years ago

possibly use: winged edge, or half edge the main goal is to make a nice mapping to the initial mesh, it would be good to store mesh-net relationships. And for a given mesh vertex or edge, there could be two flatVertices or flatEdges.

note that the layout function means that the mesh is being traversed in a particular way, which probably lends itself to a particular data structure.....

jlopezbi commented 11 years ago

approaches: 1) store arrays of flatEdges and flatVerts. each row corresponds to a mesh element index. the two rows allow for two net elements, which happens on cut edges and (some) of the associated verts. This allows for more easy back-and-forth data look-up between the net and the mesh. 2) store lists of flatEdge and flatVerts. the index of each flatElement has no meaning. each flatElement stores the index of the corresponding mesh element.

jlopezbi commented 11 years ago

(1) looks better since look up is by index instead of searching through the list.

jlopezbi commented 11 years ago

Have implemented flatVerts and flatEdges. flatEdges uses flatVerts and the mesh to get informations. will implement flatFaces when it seems necessary.