]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp
no message
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualViewContour.cpp
index c5b00f74e1b9fb1555731980bda32993cd7d6e26..4fcd7228798e90ea5acf0a56a9ba7205e52fb63f 100644 (file)
@@ -161,6 +161,7 @@ void manualViewContour::RefreshText()  // virtual
 
 // ----------------------------------------------------------------------------
 bool manualViewContour::ifTouchContour(int x,int y,int z){
+       
        bool result=false;
        double xx=x;
        double yy=y;
@@ -168,7 +169,7 @@ bool manualViewContour::ifTouchContour(int x,int y,int z){
        double ppA[3];
        double ppB[3];
        double d1,d2,d3;
-       TransfromeCoordViewWorld(xx,yy,zz);
+       TransfromCoordViewWorld(xx,yy,zz);
 
 //EED 27 sep 2006
        xx = xx * _spc[0];
@@ -194,12 +195,19 @@ bool manualViewContour::ifTouchContour(int x,int y,int z){
                d2= sqrt( (ppB[0]-xx)*(ppB[0]-xx) + (ppB[1]-yy)*(ppB[1]-yy) + (ppB[2]-zz)*(ppB[2]-zz));
                d3= sqrt( (ppB[0]-ppA[0])*(ppB[0]-ppA[0]) + (ppB[1]-ppA[1])*(ppB[1]-ppA[1]) + (ppB[2]-ppA[2])*(ppB[2]-ppA[2]));
 
-
                if (  ((d1+d2)>=d3) &&  ((d1+d2)<=d3*1.3) ) 
+               {
+                       result=true;
+                       i=nps;
+               } 
+               
+               //EED 25 Sep 2009
+               if ((d1<=1) || (d2<=1))
                {
                        result=true;
                        i=nps;
                }
+               
        }
        
        return result;
@@ -234,7 +242,7 @@ void manualViewContour::InitMove(int x, int y, int z)
        double XX=x;
        double YY=y;
        double ZZ=z;
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
        for ( i=0; i<manualPointsSZ; i++ )
@@ -252,7 +260,7 @@ void manualViewContour::MoveContour(int x, int y, int z)
        double YY=y;
        double ZZ=z;
 
-       TransfromeCoordViewWorld(XX,YY,ZZ);
+       TransfromCoordViewWorld(XX,YY,ZZ);
 
        int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
        for ( i=0; i<manualPointsSZ; i++ )