Changeset 13367


Ignore:
Timestamp:
09/13/12 14:45:02 (13 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixed bug in trimesh with holes

Location:
issm/trunk-jpl/src/c/shared
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Exp/IsInPolySerial.cpp

    r8301 r13367  
    2424                y0=y[i];
    2525                if (pnpoly(numvertices,xc,yc,x0,y0,edgevalue)){
    26                         in[i]=1;
     26                        in[i]=1.;
    2727                }
    2828                else{
    29                         in[i]=0;
     29                        in[i]=0.;
    3030                }
    3131        }
  • issm/trunk-jpl/src/c/shared/TriMesh/GridInsideHole.cpp

    r13366 r13367  
    1414int GridInsideHole(double* px0,double* py0,int n,double* x,double* y){
    1515
    16         double flag=0.;
     16        double flag=0.0;
    1717        double xA,xB,xC,xD,xE;
    1818        double yA,yB,yC,yD,yE;
     
    3030        /*D and E are on each side of segment [A B], on the median line between segment [A  B],
    3131         *at an angle of 10 degree (less than the minimum 30 enforced by the quality of the mesh: */
    32 
    33 
    3432        xD=xC+tan(10./180.*M_PI)*(yC-yA);
    3533        yD=yC+tan(10./180.*M_PI)*(xA-xC);
    36 
    3734        xE=xC-tan(10./180.*M_PI)*(yC-yA);
    3835        yE=yC-tan(10./180.*M_PI)*(xA-xC);
     
    4037        /*Either E or D is inside profile (x,y): */
    4138        IsInPolySerial(&flag,&xD,&yD,1,x,y,n,2);
    42         if (flag){
     39        /*FIXME: used to be 'flag' and not '!flag', check*/
     40        if(!flag){
    4341                /*D is inside the poly: */
    4442                *px0=xD;
Note: See TracChangeset for help on using the changeset viewer.