]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx
#3485 ShowNPionts for Multiple Groups
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / WidgetShowNPoints.cxx
index 796ffb333de505f1ab5fdb137a465a110b4e2040..74d9e6f6032841ffd6d56ac87aa3a520b4e2254d 100644 (file)
@@ -1250,78 +1250,8 @@ std::vector<int> WidgetShowNPoints::GetLstIndexs()
     return lstIndexs;
 }
 
-
-void WidgetShowNPoints::CreatePatch01()
+//------------------------------------------------------------------------
+int WidgetShowNPoints::GetLstModelShowNPointsSize()
 {
-    if ( (lstModelShowNPoints.size()==1) && (GetModelShowNPoints()->GetLstPointsSize()==4) )
-    {
-        StopTrackPoint();
-        double px,py,pz;
-        double dx,dy,dz,s;
-        std::vector<int> lstX = GetModelShowNPoints()->GetLstPointsX();
-        std::vector<int> lstY = GetModelShowNPoints()->GetLstPointsY();
-        std::vector<int> lstZ = GetModelShowNPoints()->GetLstPointsZ();
-        
-        // --- Group 0 ---
-        ErasePoint( 2 );
-        ErasePoint( 2 );
-        dx=lstX[1]-lstX[0];
-        dy=lstY[1]-lstY[0];
-        dz=lstZ[1]-lstZ[0];
-        s=0.33333;
-        px = lstX[0] + dx*s;
-        py = lstY[0] + dy*s;
-        pz = lstZ[0] + dz*s;
-        InsertPoint(px ,py, pz,"");
-        s=s*2;
-        px = lstX[0] + dx*s;
-        py = lstY[0] + dy*s;
-        pz = lstZ[0] + dz*s;
-        InsertPoint(px ,py, pz,"");
-
-        // --- Group 1 ---
-        OnInsertCollectionAfter_();
-          px = (lstX[0]+lstX[3])/2;
-          py = (lstY[0]+lstY[3])/2;
-          pz = (lstZ[0]+lstZ[3])/2;
-          InsertPoint(px ,py, pz,"");
-          px = (lstX[1]+lstX[2])/2;
-          py = (lstY[1]+lstY[2])/2;
-          pz = (lstZ[1]+lstZ[2])/2;
-          InsertPoint(px ,py, pz,"");
-          px = (lstX[0]+lstX[1]+lstX[2]+lstX[3])/4;
-          py = (lstY[0]+lstY[1]+lstY[2]+lstY[3])/4;
-          pz = (lstZ[0]+lstZ[1]+lstZ[2]+lstZ[3])/4;
-          InsertPoint(px ,py, pz,"");
-
-        
-        // --- Group 2 ---
-        OnInsertCollectionAfter_();
-          px = lstX[3];
-          py = lstY[3];
-          pz = lstZ[3];
-          InsertPoint(px ,py, pz,"");
-          px = lstX[2];
-          py = lstY[2];
-          pz = lstZ[2];
-          InsertPoint(px ,py, pz,"");
-          dx=lstX[2]-lstX[3];
-          dy=lstY[2]-lstY[3];
-          dz=lstZ[2]-lstZ[3];
-          s=0.33333;
-          px = lstX[3] + dx*s;
-          py = lstY[3] + dy*s;
-          pz = lstZ[3] + dz*s;
-          InsertPoint(px ,py, pz,"");
-          s=s*2;
-          px = lstX[3] + dx*s;
-          py = lstY[3] + dy*s;
-          pz = lstZ[3] + dz*s;
-          InsertPoint(px ,py, pz,"");
-
-        
-        SetOutputBox();
-    } else {
-            printf("EED WidgetShowNPoints::CreatePatch01  Warning patch not apply. Need juste one group with four points\n");
-    } // if
+    return lstModelShowNPoints.size();
 }