Eekadoodle prevention causes error in LoopTools addon #42058

Closed
opened 2014-10-03 15:01:12 +02:00 by Anne Jorstad · 3 comments

System Information
Ubuntu 12.04.3 LTS (error reproducible on other systems, including Mac)
NVIDIA Corporation G94 [GeForce 9600 GT]

Blender Version
Broken: 2.71a

Short description of error

In the LoopTools addon, there is a short block of code for "eekadoodle prevention". Immediately after this block, a check is performed to see if any (quad) faces have a repeat vertex, in which case that vertex is removed before the faces.new() is called. However, the vertex reordering from the eekadoodle prevention prevents the duplicate vertex check from finding the duplicate vertex in one specific case.

Specifically, if faces- [x] at line 1385 of mesh_looptools.py is of the pattern [a, b, 0, 0], then the eekadoodle prevention rearranges this to be [0, a, b, 0] (not checking for a second 0). The repeat vertex check on line 1391 only looks for vertex #3 == vertex #4, because this is apparently how the quads are constructed (for example from line 859). So the repeat vertex check cannot find the repeat 0 that has been moved, and the script crashes at bm.faces.new() at line 1396.

Solutions:

  1. I don't believe the "eekadoodle" problem exists anymore in Blender, and so this check can be removed. If I remove lines 1385-1389, I not longer encounter this error.
  2. Perhaps a cleaner solution is to be sure to catch all possible repeat vertices (I do not claim to understand everything that the bridge_calculate_geometry() function is doing). In this case, changing lines 1391-1392 to the following also fixes the problem:
    if sorted(faces- ) != sorted(list(set(faces- ))): # there is a repeat
  faces[i] = list(set(faces[i]))

Exact steps for others to reproduce the error

In the attached .blend file, turn on the LoopTools addon. Select the "curves" object. Click on "Loft" in the LoopTools addon. The error happens for any number of segments, using either linear or cubic interpolation.

looptools_error.blend

**System Information** Ubuntu 12.04.3 LTS (error reproducible on other systems, including Mac) NVIDIA Corporation G94 [GeForce 9600 GT] **Blender Version** Broken: 2.71a **Short description of error** In the LoopTools addon, there is a short block of code for "eekadoodle prevention". Immediately after this block, a check is performed to see if any (quad) faces have a repeat vertex, in which case that vertex is removed before the faces.new() is called. However, the vertex reordering from the eekadoodle prevention prevents the duplicate vertex check from finding the duplicate vertex in one specific case. Specifically, if faces- [x] at line 1385 of mesh_looptools.py is of the pattern [a, b, 0, 0], then the eekadoodle prevention rearranges this to be [0, a, b, 0] (not checking for a second 0). The repeat vertex check on line 1391 only looks for vertex #3 == vertex #4, because this is apparently how the quads are constructed (for example from line 859). So the repeat vertex check cannot find the repeat 0 that has been moved, and the script crashes at bm.faces.new() at line 1396. Solutions: 1. I don't believe the "eekadoodle" problem exists anymore in Blender, and so this check can be removed. If I remove lines 1385-1389, I not longer encounter this error. 2. Perhaps a cleaner solution is to be sure to catch all possible repeat vertices (I do not claim to understand everything that the bridge_calculate_geometry() function is doing). In this case, changing lines 1391-1392 to the following also fixes the problem: if sorted(faces- [x]) != sorted(list(set(faces- [x]))): # there is a repeat ``` faces[i] = list(set(faces[i])) ``` **Exact steps for others to reproduce the error** In the attached .blend file, turn on the LoopTools addon. Select the "curves" object. Click on "Loft" in the LoopTools addon. The error happens for any number of segments, using either linear or cubic interpolation. [looptools_error.blend](https://archive.blender.org/developer/F114390/looptools_error.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Animik

Added subscriber: @Animik
Bart Crouch was assigned by Bastien Montagne 2014-10-03 16:02:13 +02:00
Member

Closed as duplicate of #45844

Closed as duplicate of #45844
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#42058
No description provided.