Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mesh utilities softwares #969

Merged
merged 5 commits into from
Feb 12, 2021
Merged

Add mesh utilities softwares #969

merged 5 commits into from
Feb 12, 2021

Conversation

gregoire-dl
Copy link
Member

Description

Add two softwares based on Geogram for mesh boolean operations and mesh conversion.

Features list

  • Add MergeMeshes software
  • Add ConvertMesh software

Allows to perform a boolean operation between two meshes
Use Geogram library in order to convert an input mesh to another mesh format.
@gregoire-dl gregoire-dl changed the title Add Mesh Utilitaries Softwares Add mesh utilities softwares Feb 3, 2021
bool preProcess = true;
bool postProcess = true;

po::options_description allParams("AliceVision mergeMeshes");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify better what the program does e.g. "The program takes two meshes and..."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

std::string inputMeshPath;
std::string outputFilePath;

po::options_description allParams("AliceVision convertMesh");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

Comment on lines +115 to +126
{
const std::string outputFolderPart = fs::path(outputFilePath).parent_path().string();

if(!outputFolderPart.empty() && !fs::exists(outputFolderPart))
{
if(!fs::create_directory(outputFolderPart))
{
ALICEVISION_LOG_ERROR("Cannot create output folder");
return EXIT_FAILURE;
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can refactor in function inside alicevision_system to be used in all the other exe

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea. But maybe it's better to do that in another PR with a larger scope ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can start with this one creating the function in the library and replacing the code in these 2.

I don't know how many other blocks are there like this one in the other binaries but it's a matter of search and replace

@fabiencastan fabiencastan added this to the 2.4.0 milestone Feb 11, 2021
@fabiencastan fabiencastan merged commit 772cd3e into develop Feb 12, 2021
@fabiencastan fabiencastan deleted the dev_addMeshUtils branch February 12, 2021 09:32
return "Operation types used to merge two meshes:\n"
"* boolean_union: Create a new mesh with the combined volume of the two input meshes.\n"
"* boolean_intersection: Create a new mesh from the intersected volumes of the two input meshes.\n"
"* boolean_difference: Create a new mesh from the volume of the first input mesh substracted by the second input mesh.\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: subtracted not substracted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants