Commit 2600c3ef9fa8078f77b3c83f9addc978c6bcf4f7
1 parent
d5fd34f2
Exists in
master
and in
54 other branches
FIX: exporting only the vertices of the mesh when exporting to PLY
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
invesalius/data/surface.py
... | ... | @@ -847,12 +847,13 @@ class SurfaceManager(): |
847 | 847 | # writer = vtk.vtkIVWriter() |
848 | 848 | elif filetype == const.FILETYPE_PLY: |
849 | 849 | writer = vtk.vtkPLYWriter() |
850 | - writer.SetFileTypeToBinary() | |
851 | - writer.SetDataByteOrderToLittleEndian() | |
850 | + writer.SetFileTypeToASCII() | |
851 | + writer.SetColorModeToOff() | |
852 | + #writer.SetDataByteOrderToLittleEndian() | |
852 | 853 | #writer.SetColorModeToUniformCellColor() |
853 | 854 | #writer.SetColor(255, 0, 0) |
854 | 855 | |
855 | - if filetype == const.FILETYPE_STL: | |
856 | + if filetype in (const.FILETYPE_STL, const.FILETYPE_PLY): | |
856 | 857 | # Invert normals |
857 | 858 | normals = vtk.vtkPolyDataNormals() |
858 | 859 | normals.SetInput(polydata) | ... | ... |