jlopezbi / rhinoUnfolder

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

Segmentation FlatVert re-allocation #19

Closed jlopezbi closed 10 years ago

jlopezbi commented 11 years ago

during segmentation this bug appears: screen shot 2013-08-02 at 12 58 21 pm screen shot 2013-08-02 at 12 54 42 pm

jlopezbi commented 10 years ago

not fully understanding bug.... seems to be referencing incorrect flat vert. here is what I do know: each flat vert is associated with one mesh-face. each flatFace can get its flatVerts, each edge can get its flatVerts. Segments are collections of faces. Segmenting means that a for a given fold edge a new flat edge is created (the original flatEdge is set to 'cut'). The new edge references two brand new flatVerts. The flatFace adjacent to the picked edge that has been moved is modified to reference the new flatVerts.

jlopezbi commented 10 years ago

Bug understood: initially was not making a new Point3D instance for the newly crated flatVerts: thus for two distinct flatVerts a single point was being translated. Also, each flatFace and flatEdge that is a neighbor of the one of the two flatVerts which are being duplicated must be reassigned to the newly created flatVerts. That is, if those elements are part of the segment to be translated.

This is working, but for large meshes is wayyyyy to slow. If many segmentation operations are to be performed it must be very fast so that the user does not loose patience.