| 49 | } |
| 50 | |
| 51 | Expected<void> toOff( const Mesh & mesh, const std::filesystem::path & file, const SaveSettings & settings ) |
| 52 | { |
| 53 | // although .off is a textual format, we open the file in binary mode to get exactly the same result on Windows and Linux |
| 54 | std::ofstream out( file, std::ofstream::binary ); |
| 55 | if ( !out ) |
| 56 | return unexpected( std::string( "Cannot open file for writing " ) + utf8string( file ) ); |
| 57 | |
| 58 | return toOff( mesh, out, settings ); |
| 59 | } |
| 60 | |
| 61 | Expected<void> toOff( const Mesh& mesh, std::ostream& out, const SaveSettings & settings ) |
| 62 | { |