fixed some pep8 violations
This commit is contained in:
parent
1a317781cf
commit
dd6148ef52
@ -43,7 +43,8 @@ def refine(mesh):
|
|||||||
|
|
||||||
# Set each edge point to be the average of the two neighbouring, (very
|
# Set each edge point to be the average of the two neighbouring, (very
|
||||||
# recently calculated) face points ...
|
# recently calculated) face points ...
|
||||||
tmp_verts.extend([new_vertices[f + f_vert_offset] for f in old_face_ids_for_old_edge])
|
tmp_verts.extend([new_vertices[f + f_vert_offset]
|
||||||
|
for f in old_face_ids_for_old_edge])
|
||||||
|
|
||||||
# ... and its two original endpoints.
|
# ... and its two original endpoints.
|
||||||
tmp_verts.extend([mesh.vertices[vid] for vid in old_edge])
|
tmp_verts.extend([mesh.vertices[vid] for vid in old_edge])
|
||||||
@ -78,7 +79,9 @@ def refine(mesh):
|
|||||||
|
|
||||||
# where each edge midpoint is the average of its two endpoint vertices.
|
# where each edge midpoint is the average of its two endpoint vertices.
|
||||||
# **Move** each original point to the point (or add it to new_verts)
|
# **Move** each original point to the point (or add it to new_verts)
|
||||||
new_vertex_point = (F + 2 * R + (len(edges) - 3) * new_vertices[old_vid]) / len(edges)
|
new_vertex_point = (F + 2 * R
|
||||||
|
+ (len(edges) - 3) * new_vertices[old_vid]
|
||||||
|
) / len(edges)
|
||||||
new_vertices[old_vid] = new_vertex_point
|
new_vertices[old_vid] = new_vertex_point
|
||||||
|
|
||||||
# Connect each new Vertex point to the new edge points of all original
|
# Connect each new Vertex point to the new edge points of all original
|
||||||
|
@ -14,7 +14,8 @@ class TestCC(unittest.TestCase):
|
|||||||
'blender', 'samples')
|
'blender', 'samples')
|
||||||
self.cube_file_name = os.path.join(self.samples_dir, 'cube.json')
|
self.cube_file_name = os.path.join(self.samples_dir, 'cube.json')
|
||||||
self.cube = json.load(open(self.cube_file_name, 'r'))
|
self.cube = json.load(open(self.cube_file_name, 'r'))
|
||||||
self.cube_file_name = os.path.join(self.samples_dir, 'cube-blender-cc-1.json')
|
self.cube_file_name = os.path.join(self.samples_dir,
|
||||||
|
'cube-blender-cc-1.json')
|
||||||
self.cube1 = json.load(open(self.cube_file_name, 'r'))
|
self.cube1 = json.load(open(self.cube_file_name, 'r'))
|
||||||
|
|
||||||
def test_refined_vertex_location(self):
|
def test_refined_vertex_location(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user