| 118 | } |
| 119 | |
| 120 | Expected<LoadedObjectMesh> makeObjectMeshFromFile( const std::filesystem::path& file, const ProgressCallback& cb ) |
| 121 | { |
| 122 | auto maybe = makeObjectFromMeshFile( file, cb, true ); |
| 123 | if ( !maybe ) |
| 124 | return unexpected( std::move( maybe.error() ) ); |
| 125 | |
| 126 | auto objMesh = std::dynamic_pointer_cast<ObjectMesh>( maybe->obj ); |
| 127 | if ( !objMesh ) |
| 128 | { |
| 129 | assert( false ); |
| 130 | return unexpected( "makeObjectFromMeshFile returned not a mesh" ); |
| 131 | } |
| 132 | |
| 133 | return LoadedObjectMesh{ .obj = std::move( objMesh ), .warnings = std::move( maybe->warnings ) }; |
| 134 | } |
| 135 | |
| 136 | static std::string makeWarningString( int skippedFaceCount, int duplicatedVertexCount, int holesCount ) |
| 137 | { |
nothing calls this directly
no test coverage detected