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

Function debugSaveMesh_

source/MRMesh/MRMeshSave.cpp:553–569  ·  view source on GitHub ↗

One can call this function from VS interpreter window during debuging ( { ,,MRMesh.dll }MR::MeshSave::debugSaveMesh_ )( ( void* )meshPtr,( void* )faceBitSet, "E:/debug.mru" )

Source from the content-addressed store, hash-verified

551/// One can call this function from VS interpreter window during debuging
552/// ( { ,,MRMesh.dll }MR::MeshSave::debugSaveMesh_ )( ( void* )meshPtr,( void* )faceBitSet, "E:/debug.mru" )
553void debugSaveMesh_( void* mesh, void* faces, const char* path )
554{
555 using namespace MR;
556 auto pp = pathFromUtf8( path );
557 if ( utf8string( pp.extension() ) == ".mru" || faces )
558 {
559 // isolation is needed so it does not steal actuall work during debug saving
560 tbb::this_task_arena::isolate( [&] ()
561 {
562 ( void )serializeMesh( *( const Mesh* )mesh, pp, ( const FaceBitSet* )faces );
563 } );
564 }
565 else
566 {
567 ( void )toAnySupportedFormat( *( const Mesh* )mesh, pp );
568 }
569}
570
571MR_ADD_MESH_SAVER_WITH_PRIORITY( IOFilter( "MrMesh (.mrmesh)", "*.mrmesh" ), toMrmesh, {}, -1 )
572MR_ADD_MESH_SAVER( IOFilter( "Binary STL (.stl)", "*.stl" ), toBinaryStl, {} )

Callers

nothing calls this directly

Calls 4

pathFromUtf8Function · 0.85
utf8stringFunction · 0.85
serializeMeshFunction · 0.85
toAnySupportedFormatFunction · 0.70

Tested by

no test coverage detected