Skip to content
Snippets Groups Projects
Commit 1b974678 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

dg : fix(?) bug in commit 20542 : fix gLevelsetDistMesh with angle

weighted normal, (please check this commit)
parent 1e3f6a35
No related branches found
No related tags found
No related merge requests found
...@@ -979,6 +979,7 @@ double gLevelsetDistMesh::operator()(double x, double y, double z) const ...@@ -979,6 +979,7 @@ double gLevelsetDistMesh::operator()(double x, double y, double z) const
Msg::Error("Cannot compute a distance to an entity of dimension %d\n", Msg::Error("Cannot compute a distance to an entity of dimension %d\n",
(*it)->getDim()); (*it)->getDim());
} }
if ((*it)->getDim() == 2) {
if(fabs(distance) == fabs(minDistance)){ if(fabs(distance) == fabs(minDistance)){
closestElements.push_back(*it); closestElements.push_back(*it);
} }
...@@ -989,6 +990,7 @@ double gLevelsetDistMesh::operator()(double x, double y, double z) const ...@@ -989,6 +990,7 @@ double gLevelsetDistMesh::operator()(double x, double y, double z) const
closestElements.push_back(*it); closestElements.push_back(*it);
} }
} }
}
if(closestElements.size() > 1){ if(closestElements.size() > 1){
SVector3 vd(closestPoint, pt); SVector3 vd(closestPoint, pt);
SVector3 meanNorm(0., 0., 0.); // angle weighted mean normal SVector3 meanNorm(0., 0., 0.); // angle weighted mean normal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment