Beispiel #1
0
 def __init__(self, triangles, vertices, dtype=np.float64, atol=1e-8, assert_args=True):
     if isinstance(triangles, basestring):
         self.__polydata__ = vtk_u.load_polydata(triangles)
         self.__polydata_is_up_to_date__ = True
         TriMesh.__init__(self, self.get_polydata_triangles(), self.get_polydata_vertices(), dtype=dtype, atol=atol, assert_args=assert_args)
     elif isinstance(vertices, basestring):
         self.__polydata__ = vtk_u.load_polydata(vertices)
         self.__polydata_is_up_to_date__ = True
         TriMesh.__init__(self, self.get_polydata_triangles(), self.get_polydata_vertices(), dtype=dtype, atol=atol, assert_args=assert_args)
     else:
         self.__polydata__ = None
         self.__polydata_is_up_to_date__ = False
         TriMesh.__init__(self, triangles, vertices, dtype=dtype, atol=atol, assert_args=assert_args)
Beispiel #2
0
 def set_vertices(self, vertices):
     TriMesh.set_vertices(self, vertices)
     self.__polydata_is_up_to_date__ = False
Beispiel #3
0
 def set_triangles(self, triangles):
     TriMesh.set_triangles(self, triangles)
     self.__polydata_is_up_to_date__ = False