Skip to content

Commit

Permalink
Merge pull request #287 from MmgTools/feature/BezierNom-retval
Browse files Browse the repository at this point in the history
Solve issue when inserting a point along a non-manifold edge with 2 singular extremities
  • Loading branch information
corentin-prigent authored Oct 29, 2024
2 parents af80663 + 1e303f8 commit 4d8232c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mmg3d/tools_3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,9 @@ inline int MMG5_BezierNom(MMG5_pMesh mesh,MMG5_int ip0,MMG5_int ip1,double s,dou
/* Coordinates of the new tangent and normal */
if ( MG_SIN(p0->tag) && MG_SIN(p1->tag) ) { // function should not be used in that case
memcpy(to,t0,3*sizeof(double));
return 1;
/* returning 1 here may create memory error afterward because no (that
* is not filled) will be used */
return 0;
}
else if ( MG_SIN(p0->tag) ) {
memcpy(n1,&(mesh->xpoint[p1->xp].n1[0]),3*sizeof(double));
Expand Down

0 comments on commit 4d8232c

Please sign in to comment.