]> Creatis software - creaVtk.git/commitdiff
#3493 MeshManager
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 4 Oct 2022 12:26:43 +0000 (14:26 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 4 Oct 2022 12:26:43 +0000 (14:26 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkMeshDeformation.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget_Base.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx

index 175e435a5ce850cdda78eab2ad7019b43f4e73c0..7a2d9567050dfcb69e8f565d3edc8e0aa1597a20 100644 (file)
@@ -38,10 +38,6 @@ void BooleanOperationPolyDataFilter::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
   
-    printf("EED  BooleanOperationPolyDataFilter::Process Start In1=%p     In2=%p\n", bbGetInputIn1(), bbGetInputIn2() );
-
-    
-
        if ((bbGetInputIn1()!=NULL)  && (bbGetInputIn2()!=NULL) )
        {
         
index 830d8ad6c33539f1f1901cec59ba9f5ad03eee83..47bf806d454819ddf306ee3a5264ffe72a0d9fcb 100644 (file)
@@ -67,37 +67,37 @@ void MeshDeformation::Process()
             displcement_y = bbGetInputDirection()[1];
             displcement_z = bbGetInputDirection()[2];
         } // if TypeIn 0 Direction
-        
         if (bbGetInputTypeIn()==1) // Center
         {
             if (EdgeIdBack==bbGetInputEdgeId() )
             {
-                displcement_x   = (lstCenter[0]-backLstCenter[0])/1.0;
-                displcement_y   = (lstCenter[1]-backLstCenter[1])/1.0;
-                displcement_z   = (lstCenter[2]-backLstCenter[2])/1.0;
+                displcement_x = (lstCenter[0]-backLstCenter[0])/1.0;
+                displcement_y = (lstCenter[1]-backLstCenter[1])/1.0;
+                displcement_z = (lstCenter[2]-backLstCenter[2])/1.0;
             } // if EdgeIdBack!=bbGetInputEdgeId()
-            backLstCenter[0]= lstCenter[0];
-            backLstCenter[1]= lstCenter[1];
-            backLstCenter[2]= lstCenter[2];
+            backLstCenter[0] = lstCenter[0];
+            backLstCenter[1] = lstCenter[1];
+            backLstCenter[2] = lstCenter[2];
         } // if TypeIn 1 Center
-
-        
-            points->GetPoint( bbGetInputEdgeId() , pb );
-            if (EdgeIdBack!=bbGetInputEdgeId() )
+        points->GetPoint( bbGetInputEdgeId() , pb );
+        if (EdgeIdBack!=bbGetInputEdgeId() )
+        {
+            EdgeIdBack = bbGetInputEdgeId();
+            displcement_x = 0;
+            displcement_y = 0;
+            displcement_z = 0;
+            voiIdPoints.clear();
+            for ( i=0 ; i<size ; i++)
             {
-                EdgeIdBack = bbGetInputEdgeId();
-                voiIdPoints.clear();
-                for ( i=0 ; i<size ; i++)
+                points->GetPoint(i,p);
+                if ( (p[0]>(pb[0]-sx)) && (p[0]<(pb[0]+sx)) &&
+                     (p[1]>(pb[1]-sy)) && (p[1]<(pb[1]+sy)) &&
+                     (p[2]>(pb[2]-sz)) && (p[2]<(pb[2]+sz)) )
                 {
-                    points->GetPoint(i,p);
-                    if ( (p[0]>(pb[0]-sx)) && (p[0]<(pb[0]+sx)) &&
-                         (p[1]>(pb[1]-sy)) && (p[1]<(pb[1]+sy)) &&
-                         (p[2]>(pb[2]-sz)) && (p[2]<(pb[2]+sz)) )
-                    {
-                        voiIdPoints.push_back( i );
-                    } // if
-                } // for i
-            } // back
+                    voiIdPoints.push_back( i );
+                } // if
+            } // for i
+        } // back
 
         if ( !((displcement_x==0) &&(displcement_y==0) && (displcement_z==0)) )
         {
index 029d552dfdb26ff81e5837a6bbdeb9e2fc1f24e6..79f86395404a3561dff4458c5785dfbbbeacb365 100644 (file)
@@ -29,10 +29,8 @@ void PlaneWidget_Base::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
-    printf("EED PlaneWidget_Base::Process Start \n");
     if ((bbGetInputType()==1)  &&  (bbGetInputIn()!=NULL) )
     {
-        printf("EED PlaneWidget_Base::Process 1 \n");
         std::vector<double> origin = bbGetInputIn()->GetCenter();
         std::vector<double> normal = bbGetInputIn()->GetNormal();
         origin[0] = origin[0] + normal[0]*bbGetInputParam();
@@ -43,7 +41,6 @@ void PlaneWidget_Base::Process()
         bbGetInputIn()->Process();
         bbGetInputIn()->Execute();
     } // if Type == 1
-    printf("EED PlaneWidget_Base::Process End \n");
 }
 
 //===== 
index 99a8d6c755ed3e7a8d1b96532a5fe142e629e408..12ea924ef258844f9a0b5fafc040904e1d87ab32 100644 (file)
@@ -31,8 +31,6 @@ void PointPickerNearest::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-    printf ("EED PointPickerNearest::Process Start\n");
-
     std::vector<double> lstNormal;
     std::vector<double> refPoint = bbGetInputPoint();
 
@@ -46,7 +44,6 @@ void PointPickerNearest::Process()
         vtkPoints   *points = bbGetInputMesh()->GetPoints();
         long        size    = points->GetNumberOfPoints();
         double      border = bbGetInputBorder() * bbGetInputBorder();
-        printf ("EED PointPickerNearest::Process 2\n");
         for ( i=0 ; i<size ; i++)
         {
             points->GetPoint(i,p);
@@ -88,12 +85,12 @@ void PointPickerNearest::Process()
         bbSetOutputPointId( iBack );
         bbSetOutputNormal( lstNormal );
         std::vector<double> lstPointOut;
-        if (iBack>=0){
+        if (iBack>=0)
+        {
             points->GetPoint(iBack,p);
             lstPointOut.push_back(p[0]);
             lstPointOut.push_back(p[1]);
             lstPointOut.push_back(p[2]);
-            printf ("EED PointPickerNearest::Process 7 pointOut=%f %f %f\n", lstPointOut[0],lstPointOut[1],lstPointOut[2]);
         }// if iBack
         bbSetOutputPointOut( lstPointOut );
         bbSignalOutputModification();
@@ -106,7 +103,6 @@ void PointPickerNearest::Process()
         bbSetOutputPointOut( bbGetInputPoint() );
         bbSignalOutputModification();
     }
-    printf ("EED PointPickerNearest::Process END\n");
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)