Conversation
Fedr
reviewed
Jul 19, 2022
source/MRMesh/MRMeshMetrics.h
Outdated
| /// 0.0 | ||
| MRMESH_API virtual double getEdgeMetric( const VertId&, const VertId&, const VertId&, const VertId& ) const override; | ||
| }; | ||
| /// This struct provides complex metric which fines new triangles for: \n |
Contributor
There was a problem hiding this comment.
struct->function, fines->penalizes
added 2 commits
July 19, 2022 18:36
Fedr
reviewed
Jul 19, 2022
source/MRMesh/MRMeshDelone.h
Outdated
|
|
||
| /// computes dihedral angle between leftNorm and rightNorm, with sign | ||
| template <typename T> | ||
| T dihedralAngle( const Vector3<T>& leftNorm, const Vector3<T>& rightNorm, const Vector3<T>& edgeVec ); |
Fedr
reviewed
Jul 19, 2022
source/MRMesh/MRMeshFillHole.cpp
Outdated
| } | ||
|
|
||
| constexpr int maxStepsNum = 20; | ||
| constexpr int maxStepsNum = 100; |
Contributor
There was a problem hiding this comment.
Why do we change it now? It is worth converting it in a parameter later.
Fedr
reviewed
Jul 19, 2022
| if ( metrics.triangleMetric ) | ||
| { | ||
| auto triMetric = metrics.triangleMetric( aVert, topology.org( loop[v] ), bVert ); | ||
| weight = metrics.combineMetric( weight, triMetric ); |
Contributor
There was a problem hiding this comment.
Do we support if (!combineMetric)?
Contributor
Author
There was a problem hiding this comment.
metrics.combineMetric and one of metrics.edgeMetric metrics.triangleMetric are always set
Fedr
reviewed
Jul 19, 2022
source/MRMesh/MRMeshMetrics.cpp
Outdated
| Vector3d bP = Vector3d( mesh.points[b] ); | ||
| Vector3d cP = Vector3d( mesh.points[c] ); | ||
| if ( dot( norm, cross( bP - aP, cP - aP ) ) < 0.0 ) | ||
| return BadTriangulationMetric; // DBL_MAX break any triangulation, just return big value to be allow some bad meshes |
Fedr
reviewed
Jul 19, 2022
| // Big value, but less then DBL_MAX, to be able to pass some bad triangulations instead of breaking it | ||
| constexpr double BadTriangulationMetric = 1e100; | ||
| // This constant modifier was born empirically | ||
| constexpr double TriangleAreaModifier = 1e2; |
Contributor
Author
There was a problem hiding this comment.
It was moved from MRE fill hole metrics (they were moved to this files)
Fedr
approved these changes
Jul 19, 2022
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.