| 1008 | }; |
| 1009 | |
| 1010 | Expected<std::shared_ptr<Object>> fromSceneStepFile( const std::filesystem::path& path, const MeshLoadSettings& settings, const StepLoadSettings& stepSettings ) |
| 1011 | { |
| 1012 | return fromSceneStepFileImpl( [&] ( STEPControl_Reader& reader ) |
| 1013 | { |
| 1014 | return readFromFile( reader, path ) |
| 1015 | #if !STEP_READER_FIXED |
| 1016 | .and_then( [&] { return repairStepFile( reader ); } ) |
| 1017 | #endif |
| 1018 | ; |
| 1019 | }, settings, stepSettings ) |
| 1020 | #ifndef MRIOEXTRAS_OPENCASCADE_USE_XDE |
| 1021 | .and_then( [&] ( std::shared_ptr<Object> result ) -> Expected<std::shared_ptr<Object>> |
| 1022 | { |
| 1023 | result->setName( utf8string( path.stem() ) ); |
| 1024 | |
| 1025 | auto counter = 0; |
| 1026 | for ( auto& objMesh : getAllObjectsInTree<ObjectMesh>( result.get() ) ) |
| 1027 | objMesh->setName( fmt::format( "Solid{}", ++counter ) ); |
| 1028 | |
| 1029 | auto sceneObj = std::make_shared<Object>(); |
| 1030 | sceneObj->setName( "Root" ); |
| 1031 | sceneObj->select( true ); |
| 1032 | sceneObj->addChild( std::move( result ) ); |
| 1033 | |
| 1034 | return sceneObj; |
| 1035 | } ) |
| 1036 | #endif |
| 1037 | ; |
| 1038 | } |
| 1039 | |
| 1040 | Expected<std::shared_ptr<Object>> fromSceneStepFile( std::istream& in, const MeshLoadSettings& settings, const StepLoadSettings& stepSettings ) |
| 1041 | { |
no test coverage detected