Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid switching 2nd and 3rd triangle vertices #266

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/mmg2d/API_functions_2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,8 @@ int MMG2D_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs) {
j = (i-1)*3;
ptt = &mesh->tria[i];
ptt->v[0] = tria[j] ;
ptt->v[1] = tria[j+2];
ptt->v[2] = tria[j+1];
ptt->v[1] = tria[j+1];
ptt->v[2] = tria[j+2];
if ( refs != NULL )
ptt->ref = refs[i-1];

Expand Down
4 changes: 2 additions & 2 deletions src/mmg3d/API_functions_3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ int MMG3D_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs) {
j = (i-1)*3;
ptt = &mesh->tria[i];
ptt->v[0] = tria[j] ;
ptt->v[1] = tria[j+2];
ptt->v[2] = tria[j+1];
ptt->v[1] = tria[j+1];
ptt->v[2] = tria[j+2];
if ( refs != NULL )
ptt->ref = refs[i-1];
}
Expand Down
4 changes: 2 additions & 2 deletions src/mmgs/API_functions_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ int MMGS_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs) {
j = (i-1)*3;
ptt = &mesh->tria[i];
ptt->v[0] = tria[j] ;
ptt->v[1] = tria[j+2];
ptt->v[2] = tria[j+1];
ptt->v[1] = tria[j+1];
ptt->v[2] = tria[j+2];

mesh->point[ptt->v[0]].tag &= ~MG_NUL;
mesh->point[ptt->v[1]].tag &= ~MG_NUL;
Expand Down
Loading