mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
occ - allow closed edges in identified faces
This commit is contained in:
parent
bba4f414b7
commit
9537ccdb7a
@ -57,12 +57,20 @@ namespace netgen
|
|||||||
if(tol < Dist(GetCenter(), e.GetCenter()))
|
if(tol < Dist(GetCenter(), e.GetCenter()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
auto &v0 = GetStartVertex();
|
auto v0 = GetStartVertex().GetPoint();
|
||||||
auto &v1 = GetEndVertex();
|
auto v1 = GetEndVertex().GetPoint();
|
||||||
auto &w0 = e.GetStartVertex();
|
auto w0 = e.GetStartVertex().GetPoint();
|
||||||
auto &w1 = e.GetEndVertex();
|
auto w1 = e.GetEndVertex().GetPoint();
|
||||||
return( (v0.IsMappedShape(w0, trafo, tol) && v1.IsMappedShape(w1, trafo, tol)) ||
|
|
||||||
(v0.IsMappedShape(w1, trafo, tol) && v1.IsMappedShape(w0, trafo, tol)) );
|
// 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,
|
void GeometryFace :: RestrictHTrig(Mesh& mesh,
|
||||||
|
@ -1967,7 +1967,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
auto s = verts_me[i].TShape();
|
auto s = verts_me[i].TShape();
|
||||||
if(vmap.count(s)>0)
|
if(vmap.count(s)>0)
|
||||||
throw Exception("vertex mapped twice!");
|
continue;
|
||||||
auto p = trafo(occ2ng(s));
|
auto p = trafo(occ2ng(s));
|
||||||
tree.Insert( p, i );
|
tree.Insert( p, i );
|
||||||
vmap[s] = nullptr;
|
vmap[s] = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user