Commit 9171f9d0 authored by Alexander Dielen's avatar Alexander Dielen

updated the tests to work without the status class

parent eceb478a
This diff is collapsed.
......@@ -126,11 +126,6 @@ class Property(unittest.TestCase):
self.assertEqual(self.mesh.vertex_property("intProp", next(v_it)), 2)
def test_check_status_properties_halfedge_edge_all_deleted(self):
self.mesh.request_vertex_status()
self.mesh.request_face_status()
self.mesh.request_halfedge_status()
self.mesh.request_edge_status()
# Define positions
p1 = np.array([0, 0, 0])
p2 = np.array([0, 1, 0])
......@@ -156,8 +151,8 @@ class Property(unittest.TestCase):
self.mesh.delete_face(f4)
for heh in self.mesh.halfedges():
self.assertTrue(self.mesh.status(self.mesh.edge_handle(heh)).deleted())
self.assertTrue(self.mesh.status(heh).deleted())
self.assertTrue(self.mesh.is_deleted(self.mesh.edge_handle(heh)))
self.assertTrue(self.mesh.is_deleted(heh))
def test_copy_all_properties_vertex_after_remove_of_property(self):
# Add some vertices
......
......@@ -56,10 +56,6 @@ class Collapse(unittest.TestCase):
face_vhandles.append(self.vhandle[2])
self.mesh.add_face(face_vhandles)
self.mesh.request_vertex_status()
self.mesh.request_edge_status()
self.mesh.request_face_status()
# Get the halfedge
v2v1 = self.mesh.find_halfedge(self.vhandle[2], self.vhandle[1])
......@@ -105,10 +101,6 @@ class Collapse(unittest.TestCase):
face_vhandles.append(self.vhandle[0])
self.mesh.add_face(face_vhandles)
self.mesh.request_vertex_status()
self.mesh.request_edge_status()
self.mesh.request_face_status()
v0v1 = self.mesh.halfedge_handle(0)
v1v0 = self.mesh.opposite_halfedge_handle(v0v1)
......@@ -186,10 +178,10 @@ class Collapse(unittest.TestCase):
self.assertEqual(self.mesh.n_faces(), 4)
# Check if the right vertices got deleted
self.assertTrue(self.mesh.status(self.mesh.face_handle(0)).deleted())
self.assertFalse(self.mesh.status(self.mesh.face_handle(1)).deleted())
self.assertFalse(self.mesh.status(self.mesh.face_handle(2)).deleted())
self.assertTrue(self.mesh.status(self.mesh.face_handle(3)).deleted())
self.assertTrue(self.mesh.is_deleted(self.mesh.face_handle(0)))
self.assertFalse(self.mesh.is_deleted(self.mesh.face_handle(1)))
self.assertFalse(self.mesh.is_deleted(self.mesh.face_handle(2)))
self.assertTrue(self.mesh.is_deleted(self.mesh.face_handle(3)))
# Check the vertices of the two remaining faces
fh_1 = self.mesh.face_handle(1)
......@@ -395,10 +387,6 @@ class Collapse(unittest.TestCase):
face_vhandles.append(self.vhandle[3])
self.mesh.add_face(face_vhandles)
self.mesh.request_vertex_status()
self.mesh.request_edge_status()
self.mesh.request_face_status()
# =============================================
# Collapse halfedge from 0 to 4
# =============================================
......@@ -488,11 +476,6 @@ class Collapse(unittest.TestCase):
# \ / \|/
# 3 ==== 4
# Request the status bits
self.mesh.request_vertex_status()
self.mesh.request_edge_status()
self.mesh.request_face_status()
# =============================================
# Collapse halfedge from 1 to 4
# =============================================
......@@ -515,8 +498,8 @@ class Collapse(unittest.TestCase):
# Collapse it
self.mesh.collapse(heh_collapse)
self.assertTrue(self.mesh.status(vh_from).deleted())
self.assertFalse(self.mesh.status(vh_to).deleted())
self.assertTrue(self.mesh.is_deleted(vh_from))
self.assertFalse(self.mesh.is_deleted(vh_to))
if __name__ == '__main__':
......
......@@ -7,11 +7,6 @@ class TriMeshGarbageCollection(unittest.TestCase):
def setUp(self):
self.mesh = openmesh.TriMesh()
self.mesh.request_vertex_status()
self.mesh.request_edge_status()
self.mesh.request_halfedge_status()
self.mesh.request_face_status()
# Add some vertices
self.vhandle = []
......
......@@ -178,10 +178,6 @@ class TriMeshIterators(unittest.TestCase):
# Run over all halfedges
heCounter = 0
self.mesh.request_face_status()
self.mesh.request_vertex_status()
self.mesh.request_halfedge_status()
# Get second edge
eh = self.mesh.edge_handle(2)
......@@ -280,10 +276,6 @@ class TriMeshIterators(unittest.TestCase):
# Run over all halfedges
heCounter = 0
self.mesh.request_face_status()
self.mesh.request_vertex_status()
self.mesh.request_halfedge_status()
# Get second edge
eh = self.mesh.edge_handle(2)
......@@ -360,11 +352,6 @@ class TriMeshIterators(unittest.TestCase):
self.assertFalse(found_37)
def test_face_iter_empty_mesh_one_deleted_face(self):
# Request delete_face capability
self.mesh.request_vertex_status()
self.mesh.request_edge_status()
self.mesh.request_face_status()
# Add some vertices
self.vhandle.append(self.mesh.add_vertex(np.array([0, 0, 0])))
self.vhandle.append(self.mesh.add_vertex(np.array([0, 1, 0])))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment