From ee0a7961565ab89d88856c56c4cb996516ddaf74 Mon Sep 17 00:00:00 2001 From: Uday Kusupati Date: Wed, 22 Apr 2026 18:08:32 -0400 Subject: [PATCH 1/3] 2d bug fix --- src/ipc/smooth_contact/primitives/edge2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc/smooth_contact/primitives/edge2.cpp b/src/ipc/smooth_contact/primitives/edge2.cpp index fd3870e02..40ffaebe9 100644 --- a/src/ipc/smooth_contact/primitives/edge2.cpp +++ b/src/ipc/smooth_contact/primitives/edge2.cpp @@ -15,7 +15,7 @@ Edge2::Edge2( m_is_active = (mesh.is_orient_vertex(m_vertex_ids[0]) && mesh.is_orient_vertex(m_vertex_ids[1])) - || Math::cross2( + && Math::cross2( d, vertices.row(m_vertex_ids[1]) - vertices.row(m_vertex_ids[0])) > 0; } From b7bf3e3a064f6759e5682b6246055a8d5adffa71 Mon Sep 17 00:00:00 2001 From: udaykusupati Date: Wed, 22 Apr 2026 19:03:43 -0400 Subject: [PATCH 2/3] 2d bug fix --- src/ipc/smooth_contact/primitives/edge2.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ipc/smooth_contact/primitives/edge2.cpp b/src/ipc/smooth_contact/primitives/edge2.cpp index 40ffaebe9..db610ba3e 100644 --- a/src/ipc/smooth_contact/primitives/edge2.cpp +++ b/src/ipc/smooth_contact/primitives/edge2.cpp @@ -13,11 +13,12 @@ Edge2::Edge2( { m_vertex_ids = { { mesh.edges()(id, 0), mesh.edges()(id, 1) } }; - m_is_active = (mesh.is_orient_vertex(m_vertex_ids[0]) - && mesh.is_orient_vertex(m_vertex_ids[1])) - && Math::cross2( - d, vertices.row(m_vertex_ids[1]) - vertices.row(m_vertex_ids[0])) - > 0; + if (mesh.is_orient_vertex(m_vertex_ids[0]) + && mesh.is_orient_vertex(m_vertex_ids[1])) + m_is_active = Math::cross2( + d, vertices.row(m_vertex_ids[1]) - vertices.row(m_vertex_ids[0])) > 0; + else + m_is_active = true; } int Edge2::n_vertices() const { return N_EDGE_NEIGHBORS_2D; } From 7b1e5c7a2adbe702c11db26fbc2e96d407c7907b Mon Sep 17 00:00:00 2001 From: Uday Kusupati Date: Thu, 23 Apr 2026 12:54:08 -0400 Subject: [PATCH 3/3] clang format fix --- src/ipc/smooth_contact/primitives/edge2.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ipc/smooth_contact/primitives/edge2.cpp b/src/ipc/smooth_contact/primitives/edge2.cpp index db610ba3e..60e8f52e4 100644 --- a/src/ipc/smooth_contact/primitives/edge2.cpp +++ b/src/ipc/smooth_contact/primitives/edge2.cpp @@ -14,11 +14,15 @@ Edge2::Edge2( m_vertex_ids = { { mesh.edges()(id, 0), mesh.edges()(id, 1) } }; if (mesh.is_orient_vertex(m_vertex_ids[0]) - && mesh.is_orient_vertex(m_vertex_ids[1])) - m_is_active = Math::cross2( - d, vertices.row(m_vertex_ids[1]) - vertices.row(m_vertex_ids[0])) > 0; - else + && mesh.is_orient_vertex(m_vertex_ids[1])) { + m_is_active = + Math::cross2( + d, + vertices.row(m_vertex_ids[1]) - vertices.row(m_vertex_ids[0])) + > 0; + } else { m_is_active = true; + } } int Edge2::n_vertices() const { return N_EDGE_NEIGHBORS_2D; }