Skip to content

Commit

Permalink
Merge pull request #84 from kerautret/fixPolyMeshEdit
Browse files Browse the repository at this point in the history
fix performance issue in display loop
  • Loading branch information
dcoeurjo authored May 25, 2024
2 parents d83c7ee + 8a6ceac commit 60cc5c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
- *visualisation*
- polyMeshEdit: tool to edit a mesh (add local noise, remove selected faces).
(Bertrand Kerautret [#78](https://github.com/DGtal-team/DGtalTools-contrib/pull/78))
- polyMeshEdit: fix preformance issue in display loop.
(Bertrand Kerautret [#84](https://github.com/DGtal-team/DGtalTools-contrib/pull/84))


# DGtalTools-contrib 1.3
Expand Down
9 changes: 5 additions & 4 deletions visualisation/polyMeshEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ std::vector<PolySurface::Face> faceAround(const PolySurface &polysurff,
}
fVisited[faceId] = true;
bool addNewFaces = true;
while (!q.empty() )
while (!q.empty() )
{
PolySurface::Vertex v = q.front(); q.pop();
auto listFace = polysurff.facesAroundVertex(v);
Expand Down Expand Up @@ -283,7 +283,7 @@ void callbackFaceID() {
ImGui::Separator();

ImGui::Text("Action:");
if (ImGui::Button("Clear selection"))
if (ImGui::Button("Clear selection"))
{
for(auto &i : vectSelection)
{
Expand All @@ -303,14 +303,14 @@ void callbackFaceID() {
ImGui::Separator();
ImGui::Text("IO");

if (ImGui::Button("save in .obj"))
if (ImGui::Button("save in .obj"))
{
std::ofstream obj_stream( outputFileName.c_str() );
MeshHelpers::exportOBJ(obj_stream, currentPolysurf);
}
ImGui::SameLine();

if (ImGui::Button("reload src"))
if (ImGui::Button("reload src"))
{
currentPolysurf = firstPolysurf;
addSurfaceInPolyscope(currentPolysurf);
Expand Down Expand Up @@ -415,3 +415,4 @@ int main(int argc, char** argv)
return 0;

}

0 comments on commit 60cc5c6

Please sign in to comment.