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

Function fromSceneStepFileImpl

source/MRIOExtras/MRStep.cpp:895–918  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

893
894#ifndef MRIOEXTRAS_OPENCASCADE_USE_XDE
895Expected<std::shared_ptr<Object>> fromSceneStepFileImpl( const std::function<Expected<void> ( STEPControl_Reader& )>& readFunc, const MeshLoadSettings& settings, const MeshLoad::StepLoadSettings& stepSettings )
896{
897 MR_TIMER;
898
899 std::unique_lock lock( cOpenCascadeMutex );
900
901 STEPControl_Reader reader;
902 {
903 auto res = readFunc( reader );
904 if ( !res )
905 return unexpected( std::move( res.error() ) );
906 }
907
908 if ( !reportProgress( settings.callback, 0.50f ) )
909 return unexpectedOperationCanceled();
910
911 StepLoader loader;
912 loader.setLoadSettings( stepSettings );
913 if ( auto exp = loader.loadModelStructure( reader, subprogress( settings.callback, 0.50f, 1.00f ) ); !exp )
914 return unexpected( std::move( exp.error() ) );
915 loader.loadMeshes();
916
917 return loader.rootObject();
918}
919#endif
920
921#ifdef MRIOEXTRAS_OPENCASCADE_USE_XDE

Callers 1

fromSceneStepFileFunction · 0.85

Calls 9

reportProgressFunction · 0.85
subprogressFunction · 0.85
errorMethod · 0.80
setLoadSettingsMethod · 0.80
loadModelStructureMethod · 0.80
loadMeshesMethod · 0.80
rootObjectMethod · 0.80
unexpectedFunction · 0.50

Tested by

no test coverage detected