How to region face count remove and reordering Like this in programmatically? #4836
Unanswered
JihoKang24
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hello! As I can see on screenshots - it is MeshInspector/Brush/Patch tool. It has following code: MeshLib/source/MRViewer/MRSurfaceManipulationWidget.cpp Lines 373 to 447 in 8261ac6 Main idea is to delete selected faces and fill holes: auto bds = delRegionKeepBd( *newMesh, delFaces );
for ( const auto & bd : bds )
{
if ( bd.empty() )
continue;
// assert( isHoleBd( mesh.topology, bd ) ) can probably fail due to different construction of loops,
// so we check every edge of every loop below
const auto len = calcPathLength( bd, *newMesh );
const auto avgLen = len / bd.size();
FillHoleNicelySettings settings
{
.triangulateParams =
{
.metric = getUniversalMetric( *newMesh ),
.multipleEdgesResolveMode = FillHoleParams::MultipleEdgesResolveMode::Strong
},
.maxEdgeLen = 2 * (float)avgLen,
.edgeWeights = settings_.edgeWeights
};
for ( auto e : bd )
if ( !newMesh->topology.left( e ) )
fillHoleNicely( *newMesh, e, settings );
} (other lines are needed for correct mesh attributes handling) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like the behavior to change from what is shown in photo 1 to that in photo 2.
Could you please advise on how to reduce the number of faces within the selected area and re-arrange them accordingly?
Previously, I tried to achieve this by selecting the region and applying Decimate,
but this approach didn’t produce the result I was hoping for.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions