------------------------------------------------------------------------------
| 17 | |
| 18 | //------------------------------------------------------------------------------ |
| 19 | void vtkIVWriter::WriteData() |
| 20 | { |
| 21 | FILE* fp; |
| 22 | |
| 23 | // make sure the user specified a FileName |
| 24 | if (this->FileName == nullptr) |
| 25 | { |
| 26 | vtkErrorMacro(<< "Please specify FileName to use"); |
| 27 | return; |
| 28 | } |
| 29 | |
| 30 | // try opening the files |
| 31 | fp = vtksys::SystemTools::Fopen(this->FileName, "w"); |
| 32 | if (!fp) |
| 33 | { |
| 34 | vtkErrorMacro(<< "unable to open OpenInventor file: " << this->FileName); |
| 35 | return; |
| 36 | } |
| 37 | |
| 38 | // |
| 39 | // Write header |
| 40 | // |
| 41 | vtkDebugMacro("Writing OpenInventor file"); |
| 42 | vtk::print(fp, "#Inventor V2.0 ascii\n"); |
| 43 | vtk::print(fp, "# OpenInventor file written by the visualization toolkit\n\n"); |
| 44 | this->WritePolyData(this->GetInput(), fp); |
| 45 | if (fclose(fp)) |
| 46 | { |
| 47 | vtkErrorMacro(<< this->FileName << " did not close successfully. Check disk space."); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | //------------------------------------------------------------------------------ |
| 52 | void vtkIVWriter::WritePolyData(vtkPolyData* pd, FILE* fp) |
nothing calls this directly
no test coverage detected