Conversation
Fedr
reviewed
Sep 26, 2023
| { | ||
|
|
||
| MROPENCASCADEPLUGINS_API MR::Expected<MR::Mesh, std::string> fromStep( const std::filesystem::path& path, MR::Vector<MR::Color, MR::VertId>* colors = nullptr, MR::ProgressCallback callback = {} ); | ||
| MROPENCASCADEPLUGINS_API MR::Expected<MR::Mesh, std::string> fromStep( std::istream& in, MR::Vector<MR::Color, MR::VertId>* colors = nullptr, MR::ProgressCallback callback = {} ); |
Contributor
There was a problem hiding this comment.
MR::Vector<MR::Color, MR::VertId> -> VertColors
Fedr
reviewed
Sep 26, 2023
| @@ -0,0 +1,5 @@ | |||
| { | |||
| "Order": 300, | |||
| "LibName": "MROpenCascadePlugins", | |||
Contributor
There was a problem hiding this comment.
Let us avoid new projection creation for now, and put everything in MRMesh
Fedr
reviewed
Sep 26, 2023
| namespace MR::MeshLoad | ||
| { | ||
|
|
||
| MROPENCASCADEPLUGINS_API MR::Expected<MR::Mesh, std::string> fromStep( const std::filesystem::path& path, MR::Vector<MR::Color, MR::VertId>* colors = nullptr, MR::ProgressCallback callback = {} ); |
Grantim
reviewed
Sep 26, 2023
| namespace MR | ||
| { | ||
|
|
||
| MROPENCASCADEPLUGINS_API void loadMROpenCascadePluginsDll(); |
Contributor
There was a problem hiding this comment.
no need in this as far as we load this dll in rantime
Comment on lines
+36
to
+38
| // NOTE: OpenCASCADE STEP reader is NOT thread-safe | ||
| static std::mutex mutex; | ||
| std::unique_lock lock( mutex ); |
Contributor
There was a problem hiding this comment.
what are we protecting with this mutex?
Fedr
reviewed
Sep 26, 2023
| if ( !in ) | ||
| return unexpected( std::string( "Cannot open file for reading " ) + utf8string( path ) ); | ||
|
|
||
| return fromStep( in, colors, callback ); |
Contributor
There was a problem hiding this comment.
addFileNameInError(, see in other places
Fedr
reviewed
Sep 27, 2023
source/MRMesh/MRMeshLoadStep.h
Outdated
|
|
||
| /// loads meshes from STEP file using OpenCASCADE | ||
| MRMESH_API MR::Expected<MR::Mesh, std::string> fromStep( const std::filesystem::path& path, MR::VertColors* colors = nullptr, MR::ProgressCallback callback = {} ); | ||
| MRMESH_API MR::Expected<MR::Mesh, std::string> fromStep( std::istream& in, MR::VertColors* colors = nullptr, MR::ProgressCallback callback = {} ); |
Contributor
There was a problem hiding this comment.
probably move function declarations in MRMeshLoad.h?
Fedr
reviewed
Sep 27, 2023
source/MRMesh/MRMeshLoadStep.cpp
Outdated
| } | ||
| const auto shape = reader.OneShape(); | ||
| //for ( auto i = 1; i <= reader.NbShapes(); ++i ) | ||
| // shape = reader.Shape( i ); |
Fedr
approved these changes
Sep 27, 2023
Grantim
approved these changes
Sep 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.