From 8ddfb4bf4203c99101d1fc80cc7040d4b57b9392 Mon Sep 17 00:00:00 2001 From: TheNumbat Date: Sun, 21 Mar 2021 22:00:10 -0400 Subject: [PATCH] render edges within a single boundary face --- src/gui/model.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/model.cpp b/src/gui/model.cpp index 1c53d12..cf0fdf6 100644 --- a/src/gui/model.cpp +++ b/src/gui/model.cpp @@ -381,8 +381,17 @@ void Model::rebuild() { // Create cylinder for each edge cylinders.clear(); for(auto e = mesh.edges_begin(); e != mesh.edges_end(); e++) { + + // We don't want to render edges between two boundary faces, since the boundaries + // should look contiguous + if(e->halfedge()->is_boundary() && e->halfedge()->twin()->is_boundary()) { + + // Unless both surrounding boundaries are the same face, in which case we should + // render this edge to show that the next vertex is connected + if(e->halfedge()->face() != e->halfedge()->twin()->face()) + continue; + } - if(e->halfedge()->is_boundary() && e->halfedge()->twin()->is_boundary()) continue; Mat4 transform; edge_viz(e, transform); id_to_info[e->id()] = {e, cylinders.add(transform, e->id())}; -- GitLab