Skip to content

Commit

Permalink
Merge pull request #118 from vincentcasseau/main
Browse files Browse the repository at this point in the history
KCore: small fix v_cleanConnectivity.cpp
  • Loading branch information
vincentcasseau authored Jul 31, 2024
2 parents c05cca7 + c5563af commit b711799
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 b711799

Please sign in to comment.