| 893 | |
| 894 | #ifndef MRIOEXTRAS_OPENCASCADE_USE_XDE |
| 895 | Expected<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 |
no test coverage detected