]> Creatis software - creaVtk.git/commitdiff
#3490 MeshManager
authorEduardo Enrique Davila Serrano <davila@creatis.insa-lyon.fr>
Thu, 6 Oct 2022 05:28:09 +0000 (07:28 +0200)
committerEduardo Enrique Davila Serrano <davila@creatis.insa-lyon.fr>
Thu, 6 Oct 2022 05:28:09 +0000 (07:28 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkCreateMeshFromPoints.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkMeshDeformation.cxx

index eee1bd2e1f515cdf2d4acc9bb0d052499ab1a28e..534d0029101cb8ca4cce1d167bf095e7721817ac 100644 (file)
@@ -31,11 +31,11 @@ void CreateMeshFromPoints::Process()
 
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
                std::vector<double> lstX                = bbGetInputLstX();
                std::vector<double> lstY                = bbGetInputLstY();
                std::vector<double> lstZ                = bbGetInputLstZ();
                std::vector<int> lstIndexs              = bbGetInputLstIndexs();
-    
                if ( (lstIndexs.size()<=1) || (lstX.size()==0) || (lstX.size()!=lstY.size()) || (lstY.size()!=lstZ.size()) )
                {
                        printf("Warnning! CreateMeshFromPoints::Process: List of points X Y Z  and LstIndexes is not correct\n");
@@ -83,8 +83,7 @@ void CreateMeshFromPoints::Process()
                                } // for ii 
                                iGeneral=iGeneral+sizeSegment1;
                                cells->InsertNextCell(triangleStrip);
-                       } //for  LstIndexs
-                        
+                       } //for  LstIndexs         
 //                     vtkPolyData *polydata = vtkPolyData::New();
                        if (polydata!=NULL) polydata->Delete();
                        polydata = vtkPolyData::New();
@@ -103,6 +102,7 @@ void CreateMeshFromPoints::Process()
                        bbSetOutputOut( clean->GetOutput() );
                }// if listXYZ size
 }
+
 //===== 
 // 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)
 //===== 
index 47bf806d454819ddf306ee3a5264ffe72a0d9fcb..760d70b5a7c17ccfa806772b4e9d5cc3b90fa6bb 100644 (file)
@@ -67,6 +67,9 @@ void MeshDeformation::Process()
             displcement_y = bbGetInputDirection()[1];
             displcement_z = bbGetInputDirection()[2];
         } // if TypeIn 0 Direction
+               
+               printf(" EED MeshDeformation::Process   %ld   %ld  -   %f %f %f \n", EdgeIdBack, bbGetInputEdgeId() , lstCenter[0],lstCenter[1],lstCenter[2] );
+               
         if (bbGetInputTypeIn()==1) // Center
         {
             if (EdgeIdBack==bbGetInputEdgeId() )
@@ -83,9 +86,6 @@ void MeshDeformation::Process()
         if (EdgeIdBack!=bbGetInputEdgeId() )
         {
             EdgeIdBack = bbGetInputEdgeId();
-            displcement_x = 0;
-            displcement_y = 0;
-            displcement_z = 0;
             voiIdPoints.clear();
             for ( i=0 ; i<size ; i++)
             {
@@ -97,7 +97,10 @@ void MeshDeformation::Process()
                     voiIdPoints.push_back( i );
                 } // if
             } // for i
-        } // back
+                       backLstCenter[0] = lstCenter[0];
+                       backLstCenter[1] = lstCenter[1];
+                       backLstCenter[2] = lstCenter[2];
+        } // if EdgeIdBack
 
         if ( !((displcement_x==0) &&(displcement_y==0) && (displcement_z==0)) )
         {