From fc1dbc29577fea7a9394aad7f1a9cc093f6e1c63 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 20 Sep 2019 12:46:44 +0200 Subject: [PATCH] Revert "Change elementsonnode only when applying optimization" This reverts commit 6c0171f2c0067a8785e2df25696208754cc1c20f. --- libsrc/meshing/improve3.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/meshing/improve3.cpp b/libsrc/meshing/improve3.cpp index 263bad57..beb3cd5a 100644 --- a/libsrc/meshing/improve3.cpp +++ b/libsrc/meshing/improve3.cpp @@ -1027,6 +1027,9 @@ bool MeshOptimize3d :: SwapImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal, el33[3] = pi3; el33.SetIndex (mattyp); + elementsonnode.Add (pi4, hasbothpoints[1]); + elementsonnode.Add (pi3, hasbothpoints[2]); + bad1 = CalcBad (mesh.Points(), el31, 0) + CalcBad (mesh.Points(), el32, 0) + CalcBad (mesh.Points(), el33, 0); @@ -1118,9 +1121,6 @@ bool MeshOptimize3d :: SwapImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal, mesh[hasbothpoints[2]][l].Invalidate(); mesh[hasbothpoints[2]].Delete(); - elementsonnode.Add (pi4, hasbothpoints[1]); - elementsonnode.Add (pi3, hasbothpoints[2]); - for (int k = 0; k < 2; k++) for (int l = 0; l < 4; l++) elementsonnode.Add (mesh[hasbothpoints[k]][l], hasbothpoints[k]);