Skip to content

Commit

Permalink
KCore: small fix v_cleanConnectivity.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentcasseau committed Jul 31, 2024
1 parent c05cca7 commit c5563af
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Cassiopee/KCore/KCore/Connect/v_cleanConnectivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ PyObject* K_CONNECT::V_cleanConnectivityNGon(
// --- 4. Reindex & Compress connectivities ---
E_Int j, k; // write pointers
E_Int ind; // read pointer, same for i
E_Int itrl, nv, nvins, vidx, nf, nfins, fidx;
E_Int indirPHi, indirPHitrl;
E_Int itrl, nv, nvins, vidx, nf, nfins, fidx, indirPHi;
E_Int sizeFN2 = sizeFN, sizeEF2 = sizeEF;

// 4.a Compress FN connectivity
Expand Down Expand Up @@ -268,18 +267,12 @@ PyObject* K_CONNECT::V_cleanConnectivityNGon(
for (E_Int i = 0; i < nelts; i++)
{
cn.getElt(i, nf, nface, indPH);
if (rmDirtyElts)
{
indirPHi = indirPH[i]; indirPHitrl = indirPH[itrl];
}
else
{
indirPHi = i; indirPHitrl = itrl;
}
if (rmDirtyElts) indirPHi = indirPH[i];
else indirPHi = i;

// Detect duplicated or collapsed elements
if ((indirPHi == COLLAPSED) ||
(rmDirtyElts && (itrl != -1 && indirPH[i] - indirPHitrl != 1)))
(rmDirtyElts && itrl != -1 && indirPHi - indirPH[itrl] != 1))
{
// Shift read pointer and skip
ind += nf+shift;
Expand Down

0 comments on commit c5563af

Please sign in to comment.