diff --git a/libsrc/meshing/hprefinement.cpp b/libsrc/meshing/hprefinement.cpp index 0446f25b..384eaab3 100644 --- a/libsrc/meshing/hprefinement.cpp +++ b/libsrc/meshing/hprefinement.cpp @@ -699,6 +699,8 @@ namespace netgen { INDEX_2 i2(el.pnums[hprs->splitedges[j][0]-1], el.pnums[hprs->splitedges[j][1]-1]); + if (fac1 == 0.5) i2.Sort(); + if (!newpts.Used (i2)) { Point<3> np; @@ -787,7 +789,8 @@ namespace netgen { INDEX_2 i2(el.pnums[hprs->splitedges[j][0]-1], el.pnums[hprs->splitedges[j][1]-1]); - + if (fac1 == 0.5) i2.Sort(); + int npi = newpts.Get(i2); newpnums[hprs->splitedges[j][2]-1] = npi; @@ -1990,8 +1993,11 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE & edges, INDEX_2_HAS } case HP_SEGM: { - hpel.type = ClassifySegm(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, - faces, face_edges, surf_edges, facepoint); + if (split == SPLIT_HP) + hpel.type = ClassifySegm(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, + faces, face_edges, surf_edges, facepoint); + else if (split == SPLIT_POWELL) + hpel.type = HP_SEGM_SINGCORNERL; dd = 1; break; } diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 5685a17b..010aa52e 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -4043,6 +4043,9 @@ namespace netgen pused[seg[j]] = true; } + for(auto& pe : pointelements) + pused[pe.pnum] = true; + for (int i = 0; i < openelements.Size(); i++) { const Element2d & el = openelements[i]; @@ -4129,6 +4132,9 @@ namespace netgen seg[j] = op2np[seg[j]]; } + for(auto& pe : pointelements) + pe.pnum = op2np[pe.pnum]; + for (int i = 1; i <= openelements.Size(); i++) { Element2d & el = openelements.Elem(i); diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 6908fe5f..9c50261c 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -631,6 +631,7 @@ public: auto Offset(double d) { + Finish(); TopoDS_Wire wire = wires.back(); wires.pop_back(); @@ -641,7 +642,7 @@ public: BRepOffsetAPI_MakeOffset builder(makeFace.Face()); builder.Perform(d); auto shape = builder.Shape(); - wires.push_back (TopoDS::Wire(shape.Reversed())); + wires.push_back (TopoDS::Wire(shape)); return shared_from_this(); }