From 2600c3ef9fa8078f77b3c83f9addc978c6bcf4f7 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Thu, 7 Nov 2013 16:03:40 -0200 Subject: [PATCH] FIX: exporting only the vertices of the mesh when exporting to PLY --- invesalius/data/surface.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index da5b5d2..91fa2cd 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -847,12 +847,13 @@ class SurfaceManager(): # writer = vtk.vtkIVWriter() elif filetype == const.FILETYPE_PLY: writer = vtk.vtkPLYWriter() - writer.SetFileTypeToBinary() - writer.SetDataByteOrderToLittleEndian() + writer.SetFileTypeToASCII() + writer.SetColorModeToOff() + #writer.SetDataByteOrderToLittleEndian() #writer.SetColorModeToUniformCellColor() #writer.SetColor(255, 0, 0) - if filetype == const.FILETYPE_STL: + if filetype in (const.FILETYPE_STL, const.FILETYPE_PLY): # Invert normals normals = vtk.vtkPolyDataNormals() normals.SetInput(polydata) -- libgit2 0.21.2