I would like to submit a possible issue, i have found in LaplacianMeshSmoother.cs.
In RegionSmooth, line 356. This function crash when my BaseBorderV. Count of my "submesh" is equal to zero.
In fact, in this case the "HashSet constrained" is not allocated so when the test if "constrained.Count > 0" the variable is null ! line 407.
line 397 to 407 : (My correction)
// Old method with crash
//HashSet<int> constrained = (submesh.BaseBorderV.Count > 0) ? new HashSet<int>() : null;
HashSet<int> constrained = new HashSet<int>();
foreach (int base_vid in submesh.BaseBorderV) {
int sub_vid = submesh.BaseToSubV[base_vid];
smoother.SetConstraint(sub_vid, smoothMesh.GetVertex(sub_vid), w, true);
if (constrained != null)
constrained.Add(sub_vid);
}
if (constrained.Count > 0)
Hello,
I would like to submit a possible issue, i have found in LaplacianMeshSmoother.cs.
In RegionSmooth, line 356. This function crash when my BaseBorderV. Count of my "submesh" is equal to zero. In fact, in this case the "HashSet constrained" is not allocated so when the test if "constrained.Count > 0" the variable is null ! line 407.
line 397 to 407 : (My correction)
Maybe i'm wrong, let me know about this !