occ - allow closed edges in identified faces

This commit is contained in:
mhochsteger@cerbsim.com 2021-11-28 19:59:14 +01:00
parent bba4f414b7
commit 9537ccdb7a
2 changed files with 15 additions and 7 deletions

View File

@ -57,12 +57,20 @@ namespace netgen
if(tol < Dist(GetCenter(), e.GetCenter()))
return false;
auto &v0 = GetStartVertex();
auto &v1 = GetEndVertex();
auto &w0 = e.GetStartVertex();
auto &w1 = e.GetEndVertex();
return( (v0.IsMappedShape(w0, trafo, tol) && v1.IsMappedShape(w1, trafo, tol)) ||
(v0.IsMappedShape(w1, trafo, tol) && v1.IsMappedShape(w0, trafo, tol)) );
auto v0 = GetStartVertex().GetPoint();
auto v1 = GetEndVertex().GetPoint();
auto w0 = e.GetStartVertex().GetPoint();
auto w1 = e.GetEndVertex().GetPoint();
// have two closed edges, use midpoints to compare
if(Dist(v0,v1) < tol && Dist(w0,w1) < tol)
{
v1 = GetPoint(0.5);
w1 = other_ptr->GetPoint(0.5);
}
return( (Dist(v0, w0) < tol && Dist(v1, w1) < tol) ||
(Dist(v0, w1) < tol && Dist(v1, w0) < tol) );
}
void GeometryFace :: RestrictHTrig(Mesh& mesh,

View File

@ -1967,7 +1967,7 @@ namespace netgen
{
auto s = verts_me[i].TShape();
if(vmap.count(s)>0)
throw Exception("vertex mapped twice!");
continue;
auto p = trafo(occ2ng(s));
tree.Insert( p, i );
vmap[s] = nullptr;