MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / makeObjectMeshFromFile

Function makeObjectMeshFromFile

source/MRMesh/MRObjectLoad.cpp:120–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120Expected<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
136static std::string makeWarningString( int skippedFaceCount, int duplicatedVertexCount, int holesCount )
137{

Callers

nothing calls this directly

Calls 3

makeObjectFromMeshFileFunction · 0.85
errorMethod · 0.80
unexpectedFunction · 0.70

Tested by

no test coverage detected