I have a vtkpolydata and i know how to save it like stl:
stlWriter = vtk.vtkSTLWriter()
stlWriter.SetFileName("gomaMI.stl")
stlWriter.SetInputConnection(self.modeloMI.GetOutputPort())
stlWriter.Write()
The problem is that i dont want to save it by code I want to specify the folder and name in a new window, like all programs. Any suggestion?
As per your code if you
SetFileName
to whatever is returned byfilename
assuming it isn't an empty string this will work.PyQt5 is nicer to look at but requires more lines of code
easygui
would also offer a solution.