Skip to content
Draft
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
9 changes: 8 additions & 1 deletion src/mmg3d/mmg3d1.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,16 @@ int8_t MMG5_chkedg(MMG5_pMesh mesh,MMG5_Tria *pt,int8_t ori, double hmax,
/* } */
/* } */

hma2 = MMG3D_LLONG*MMG3D_LLONG*hmax*hmax;

/* Split regular boundary edges connecting ridge or non-manifold points */
if ( (MG_GEO_OR_NOM(p[i1]->tag) && MG_GEO_OR_NOM(p[i2]->tag)) && !MG_GEO_OR_NOM(pt->tag[i]) ) {
MG_SET(pt->flag,i);
continue;
}

/* check length */
hma2 = MMG3D_LLONG*MMG3D_LLONG*hmax*hmax;

ux = p[i2]->c[0] - p[i1]->c[0];
uy = p[i2]->c[1] - p[i1]->c[1];
uz = p[i2]->c[2] - p[i1]->c[2];
Expand Down
12 changes: 12 additions & 0 deletions src/mmg3d/swap_3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,18 @@ int MMG5_chkswpbdy(MMG5_pMesh mesh, MMG5_pSol met, int64_t *list,int ilist,
(tt2.v[MMG5_inxt2[ia2]] == nq && tt2.v[MMG5_iprv2[ia2]] == np) );
na2 = tt2.v[ia2];

#ifdef NDEBUG
/* Check that we don't have a regular bdy edge connecting ridge or nm points */
if ( MG_GEO_OR_NOM(mesh->point[np].tag) && MG_GEO_OR_NOM(mesh->point[nq].tag) ) {
assert ( ! MG_GEO_OR_NOM(tt1.tag[ia1]) );
assert ( ! MG_GEO_OR_NOM(tt2.tag[ia2]) );
}
#endif
/* No swap if it creates a regular boundary edge connecting ridge or non-manifold points */
if ( MG_GEO_OR_NOM(mesh->point[na1].tag) && MG_GEO_OR_NOM(mesh->point[na2].tag) ) {
return 0;
}

/* Check non convexity (temporarily use b0,b1)*/
MMG5_norpts(mesh,tt1.v[ia1],tt1.v[MMG5_inxt2[ia1]],tt2.v[ia2],b0);
MMG5_norpts(mesh,tt2.v[ia2],tt2.v[MMG5_inxt2[ia2]],tt1.v[ia1],b1);
Expand Down