From 4fd8ec427d591a7e9aae7a59cec997a37b67710a Mon Sep 17 00:00:00 2001 From: Alan <37482427+alemon-aquaveo@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:25:28 -0600 Subject: [PATCH] -bug fix when using the fix_point_connections for the new test case -updated the version --- _package/xms/mesher/__init__.py | 2 +- test_files/meshing/CaseRefine01.txt | 23 +++ test_files/meshing/CaseRefine01_base.2dm | 183 +++++++++++++++++++++++ xmsmesher/meshing/MeMultiPolyTo2dm.cpp | 8 +- xmsmesher/meshing/MeMultiPolyTo2dm.t.h | 1 + xmsmesher/meshing/MePolyMesher.cpp | 1 + 6 files changed, 216 insertions(+), 2 deletions(-) create mode 100644 test_files/meshing/CaseRefine01.txt create mode 100644 test_files/meshing/CaseRefine01_base.2dm diff --git a/_package/xms/mesher/__init__.py b/_package/xms/mesher/__init__.py index fd500bf1..31f2cc66 100644 --- a/_package/xms/mesher/__init__.py +++ b/_package/xms/mesher/__init__.py @@ -2,4 +2,4 @@ from . import meshing # NOQA: F401 from .api.mesh import generate_mesh # NOQA: F401 -__version__ = '5.1.4' +__version__ = '5.1.5' diff --git a/test_files/meshing/CaseRefine01.txt b/test_files/meshing/CaseRefine01.txt new file mode 100644 index 00000000..b1323fe5 --- /dev/null +++ b/test_files/meshing/CaseRefine01.txt @@ -0,0 +1,23 @@ +BEGIN_POLYGON +OUTSIDE_3D 11 +360220.6991683 4132489.8894161 0.0 +360286.78494426 4132279.8816603 0.0 +360355.81635511 4132043.8920739 0.0 +360446.40469773 4131744.7281546 0.0 +360548.98474911 4131405.9621575 0.0 +360281.54312154 4131578.9360971 0.0 +360040.07808281 4131727.5189229 0.0 +359780.70702168 4131885.5290183 0.0 +359549.5 4132072.5 0.0 +359752.53896709 4132210.4007777 0.0 +359900.6721833 4132290.8786266 0.0 +BIAS 0.3 +FIX_POINT_CONNECTIONS +REMOVE_INTERNAL_FOUR_TRIANGLE_PTS +END_POLYGON +RETURN_CELL_POLYGONS +REFINE_POINTS 4 +360216.69669785 4132071.3505794 10.0 1 +360214.33895598 4132277.1287016 10.0 1 +360001.9 4132105.4 40.0 1 +360096.6 4131912.2 30.0 1 \ No newline at end of file diff --git a/test_files/meshing/CaseRefine01_base.2dm b/test_files/meshing/CaseRefine01_base.2dm new file mode 100644 index 00000000..a207daf1 --- /dev/null +++ b/test_files/meshing/CaseRefine01_base.2dm @@ -0,0 +1,183 @@ +MESH2D +E3T 1 1 11 2 1 +E3T 2 2 11 33 1 +E3T 3 2 33 3 1 +E3T 4 3 32 57 1 +E3T 5 3 33 32 1 +E3T 6 3 56 4 1 +E3T 7 3 57 56 1 +E3T 8 4 19 5 1 +E3T 9 4 20 19 1 +E3T 10 4 56 20 1 +E3T 11 5 18 23 1 +E3T 12 5 19 18 1 +E3T 13 5 23 47 1 +E3T 14 5 46 6 1 +E3T 15 5 47 46 1 +E3T 16 6 12 62 1 +E3T 17 6 46 12 1 +E3T 18 6 62 65 1 +E3T 19 6 65 7 1 +E3T 20 7 9 8 1 +E3T 21 7 63 9 1 +E3T 22 7 65 63 1 +E3T 23 9 63 10 1 +E3T 24 10 27 11 1 +E3T 25 10 28 27 1 +E3T 26 10 63 64 1 +E3T 27 10 64 28 1 +E3T 28 11 27 34 1 +E3T 29 11 34 33 1 +E3T 30 12 13 39 1 +E3T 31 12 17 62 1 +E3T 32 12 39 17 1 +E3T 33 12 46 13 1 +E3T 34 13 14 39 1 +E3T 35 13 46 48 1 +E3T 36 13 48 14 1 +E3T 37 14 15 39 1 +E3T 38 14 48 49 1 +E3T 39 14 49 15 1 +E3T 40 15 16 39 1 +E3T 41 15 49 59 1 +E3T 42 15 59 16 1 +E3T 43 16 17 39 1 +E3T 44 16 59 61 1 +E3T 45 16 61 17 1 +E3T 46 17 61 62 1 +E3T 47 18 19 40 1 +E3T 48 18 40 23 1 +E3T 49 19 20 40 1 +E3T 50 20 21 40 1 +E3T 51 20 45 21 1 +E3T 52 20 56 45 1 +E3T 53 21 22 40 1 +E3T 54 21 45 22 1 +E3T 55 22 23 40 1 +E3T 56 22 45 47 1 +E3T 57 22 47 23 1 +E3T 58 24 25 41 1 +E3T 59 24 29 64 1 +E3T 60 24 41 29 1 +E3T 61 24 60 25 1 +E3T 62 24 64 60 1 +E3T 63 25 26 41 1 +E3T 64 25 38 26 1 +E3T 65 25 60 38 1 +E3T 66 26 27 41 1 +E3T 67 26 36 27 1 +E3T 68 26 38 36 1 +E3T 69 27 28 41 1 +E3T 70 27 36 34 1 +E3T 71 28 29 41 1 +E3T 72 28 64 29 1 +E3T 73 30 31 42 1 +E3T 74 30 35 37 1 +E3T 75 30 37 43 1 +E3T 76 30 42 35 1 +E3T 77 30 43 44 1 +E3T 78 30 44 31 1 +E3T 79 31 32 42 1 +E3T 80 31 44 57 1 +E3T 81 31 57 32 1 +E3T 82 32 33 42 1 +E3T 83 33 34 42 1 +E3T 84 34 35 42 1 +E3T 85 34 36 35 1 +E3T 86 35 36 37 1 +E3T 87 36 38 37 1 +E3T 88 37 38 58 1 +E3T 89 37 50 43 1 +E3T 90 37 58 50 1 +E3T 91 38 60 61 1 +E3T 92 38 61 58 1 +E3T 93 43 50 51 1 +E3T 94 43 51 44 1 +E3T 95 44 51 55 1 +E3T 96 44 55 57 1 +E3T 97 45 52 47 1 +E3T 98 45 54 52 1 +E3T 99 45 56 54 1 +E3T 100 46 47 48 1 +E3T 101 47 52 48 1 +E3T 102 48 52 53 1 +E3T 103 48 53 49 1 +E3T 104 49 50 58 1 +E3T 105 49 53 50 1 +E3T 106 49 58 59 1 +E3T 107 50 53 51 1 +E3T 108 51 52 55 1 +E3T 109 51 53 52 1 +E3T 110 52 54 55 1 +E3T 111 54 56 57 1 +E3T 112 54 57 55 1 +E3T 113 58 61 59 1 +E3T 114 60 62 61 1 +E3T 115 60 64 65 1 +E3T 116 60 65 62 1 +E3T 117 63 65 64 1 +ND 1 359549.5 4132072.5 0.0 +ND 2 359752.539 4132210.4 0.0 +ND 3 359900.672 4132290.88 0.0 +ND 4 360220.699 4132489.89 0.0 +ND 5 360286.785 4132279.88 0.0 +ND 6 360355.816 4132043.89 0.0 +ND 7 360446.405 4131744.73 0.0 +ND 8 360548.985 4131405.96 0.0 +ND 9 360281.543 4131578.94 0.0 +ND 10 360040.078 4131727.52 0.0 +ND 11 359780.707 4131885.53 0.0 +ND 12 360226.697 4132071.35 0.0 +ND 13 360221.697 4132080.01 0.0 +ND 14 360211.697 4132080.01 0.0 +ND 15 360206.697 4132071.35 0.0 +ND 16 360211.697 4132062.69 0.0 +ND 17 360221.697 4132062.69 0.0 +ND 18 360224.339 4132277.13 0.0 +ND 19 360219.339 4132285.79 0.0 +ND 20 360209.339 4132285.79 0.0 +ND 21 360204.339 4132277.13 0.0 +ND 22 360209.339 4132268.47 0.0 +ND 23 360219.339 4132268.47 0.0 +ND 24 360126.6 4131912.2 0.0 +ND 25 360111.6 4131938.18 0.0 +ND 26 360081.6 4131938.18 0.0 +ND 27 360066.6 4131912.2 0.0 +ND 28 360081.6 4131886.22 0.0 +ND 29 360111.6 4131886.22 0.0 +ND 30 360041.9 4132105.4 0.0 +ND 31 360021.9 4132140.04 0.0 +ND 32 359981.9 4132140.04 0.0 +ND 33 359961.9 4132105.4 0.0 +ND 34 359981.9 4132070.76 0.0 +ND 35 360021.9 4132070.76 0.0 +ND 36 360053.298 4132007.2 0.0 +ND 37 360078.21 4132054.05 0.0 +ND 38 360117.571 4131991.86 0.0 +ND 39 360216.697 4132071.35 0.0 +ND 40 360214.339 4132277.13 0.0 +ND 41 360096.6 4131912.2 0.0 +ND 42 360001.9 4132105.4 0.0 +ND 43 360081.53 4132110.11 0.0 +ND 44 360057.628 4132164.12 0.0 +ND 45 360150.607 4132253.56 0.0 +ND 46 360271.391 4132146.94 0.0 +ND 47 360218.708 4132210.34 0.0 +ND 48 360200.515 4132142.1 0.0 +ND 49 360167.274 4132086.96 0.0 +ND 50 360119.369 4132089.34 0.0 +ND 51 360109.728 4132145.56 0.0 +ND 52 360148.825 4132188.02 0.0 +ND 53 360151.424 4132129.04 0.0 +ND 54 360094.615 4132249.12 0.0 +ND 55 360084.76 4132198.91 0.0 +ND 56 360098.805 4132335.52 0.0 +ND 57 360013.985 4132241.19 0.0 +ND 58 360131.166 4132043.02 0.0 +ND 59 360172.209 4132049.77 0.0 +ND 60 360198.12 4131934.85 0.0 +ND 61 360185.962 4132007.5 0.0 +ND 62 360263.281 4131989.02 0.0 +ND 63 360249.088 4131739.03 0.0 +ND 64 360165.328 4131825.8 0.0 +ND 65 360304.047 4131870.31 0.0 diff --git a/xmsmesher/meshing/MeMultiPolyTo2dm.cpp b/xmsmesher/meshing/MeMultiPolyTo2dm.cpp index f53323ed..3f1feda1 100644 --- a/xmsmesher/meshing/MeMultiPolyTo2dm.cpp +++ b/xmsmesher/meshing/MeMultiPolyTo2dm.cpp @@ -868,6 +868,12 @@ void MeMultiPolyTo2dmIntermediateTests::testPatch7() { iTestFromPolyFile("CasePatch7", 10); } // MeMultiPolyTo2dmIntermediateTests::testPatch7 - +//------------------------------------------------------------------------------ +/// \brief Test for a patch with Z elevations on the outside polygon +//------------------------------------------------------------------------------ +void MeMultiPolyTo2dmIntermediateTests::testRefine() +{ + iTestFromPolyFile("CaseRefine01", 10); +} // MeMultiPolyTo2dmIntermediateTests::testRefine #endif // CXX_TEST diff --git a/xmsmesher/meshing/MeMultiPolyTo2dm.t.h b/xmsmesher/meshing/MeMultiPolyTo2dm.t.h index cab7dfa9..9903c5e0 100644 --- a/xmsmesher/meshing/MeMultiPolyTo2dm.t.h +++ b/xmsmesher/meshing/MeMultiPolyTo2dm.t.h @@ -58,6 +58,7 @@ class MeMultiPolyTo2dmIntermediateTests : public CxxTest::TestSuite void testbug15186(); void testbug15246(); void testPatch7(); + void testRefine(); }; //} // namespace xms diff --git a/xmsmesher/meshing/MePolyMesher.cpp b/xmsmesher/meshing/MePolyMesher.cpp index 73a2b863..f7de52ef 100644 --- a/xmsmesher/meshing/MePolyMesher.cpp +++ b/xmsmesher/meshing/MePolyMesher.cpp @@ -762,6 +762,7 @@ void MePolyMesherImpl::FixPointsWithTooManyConnections() { FindAllPolyPointIdxs(); m_points = m_tin->PointsPtr(); + FindAllPolyPointIdxs(); m_relaxAgain = true; } else