Merge remote-tracking branch 'origin/master' into boundarylayer_fixes

This commit is contained in:
Matthias Hochsteger 2024-02-09 12:01:54 +01:00
commit dd68bae1a3
3 changed files with 17 additions and 4 deletions

View File

@ -699,6 +699,8 @@ namespace netgen
{ {
INDEX_2 i2(el.pnums[hprs->splitedges[j][0]-1], INDEX_2 i2(el.pnums[hprs->splitedges[j][0]-1],
el.pnums[hprs->splitedges[j][1]-1]); el.pnums[hprs->splitedges[j][1]-1]);
if (fac1 == 0.5) i2.Sort();
if (!newpts.Used (i2)) if (!newpts.Used (i2))
{ {
Point<3> np; Point<3> np;
@ -787,6 +789,7 @@ namespace netgen
{ {
INDEX_2 i2(el.pnums[hprs->splitedges[j][0]-1], INDEX_2 i2(el.pnums[hprs->splitedges[j][0]-1],
el.pnums[hprs->splitedges[j][1]-1]); el.pnums[hprs->splitedges[j][1]-1]);
if (fac1 == 0.5) i2.Sort();
int npi = newpts.Get(i2); int npi = newpts.Get(i2);
newpnums[hprs->splitedges[j][2]-1] = npi; newpnums[hprs->splitedges[j][2]-1] = npi;
@ -1990,8 +1993,11 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
} }
case HP_SEGM: case HP_SEGM:
{ {
if (split == SPLIT_HP)
hpel.type = ClassifySegm(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, hpel.type = ClassifySegm(hpel, edges, edgepoint_dom, cornerpoint, edgepoint,
faces, face_edges, surf_edges, facepoint); faces, face_edges, surf_edges, facepoint);
else if (split == SPLIT_POWELL)
hpel.type = HP_SEGM_SINGCORNERL;
dd = 1; dd = 1;
break; break;
} }

View File

@ -4043,6 +4043,9 @@ namespace netgen
pused[seg[j]] = true; pused[seg[j]] = true;
} }
for(auto& pe : pointelements)
pused[pe.pnum] = true;
for (int i = 0; i < openelements.Size(); i++) for (int i = 0; i < openelements.Size(); i++)
{ {
const Element2d & el = openelements[i]; const Element2d & el = openelements[i];
@ -4129,6 +4132,9 @@ namespace netgen
seg[j] = op2np[seg[j]]; seg[j] = op2np[seg[j]];
} }
for(auto& pe : pointelements)
pe.pnum = op2np[pe.pnum];
for (int i = 1; i <= openelements.Size(); i++) for (int i = 1; i <= openelements.Size(); i++)
{ {
Element2d & el = openelements.Elem(i); Element2d & el = openelements.Elem(i);

View File

@ -631,6 +631,7 @@ public:
auto Offset(double d) auto Offset(double d)
{ {
Finish();
TopoDS_Wire wire = wires.back(); TopoDS_Wire wire = wires.back();
wires.pop_back(); wires.pop_back();
@ -641,7 +642,7 @@ public:
BRepOffsetAPI_MakeOffset builder(makeFace.Face()); BRepOffsetAPI_MakeOffset builder(makeFace.Face());
builder.Perform(d); builder.Perform(d);
auto shape = builder.Shape(); auto shape = builder.Shape();
wires.push_back (TopoDS::Wire(shape.Reversed())); wires.push_back (TopoDS::Wire(shape));
return shared_from_this(); return shared_from_this();
} }