diff --git a/Plugin/BoundaryAngles.cpp b/Plugin/BoundaryAngles.cpp index c32ce50acdb882ce31f28b6e69f3e156c7af39d8..c200dd849982446628b3dbf77264f5dafac1112d 100644 --- a/Plugin/BoundaryAngles.cpp +++ b/Plugin/BoundaryAngles.cpp @@ -128,7 +128,6 @@ PView *GMSH_BoundaryAnglesPlugin::execute(PView *v) } } // Handle last elements - nodes[0].push_back(nodes[0][0]); nodes[0].push_back(nodes[0][1]); // Compute angle at each point (mod 2pi) for(std::size_t i = 0; i < nodes[0].size() - 2; i++) { @@ -141,6 +140,9 @@ PView *GMSH_BoundaryAnglesPlugin::execute(PView *v) data->SP.push_back(p2.x()); data->SP.push_back(p2.y()); data->SP.push_back(p2.z()); + // Choose the angle inside the polygon + if(a>0) + a = -(2*M_PI-a); data->SP.push_back(a); data->NbSP++; }