]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkPolyDataNormals.cxx
#3502 Bug close surface in CreateMeshFromPoints
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkPolyDataNormals.cxx
index c48f31c9bd7235b7cf6f514e14c7c3d5963fedd0..b560cc95095dc6dabd1dbcac6dd7dc04355c61b4 100644 (file)
@@ -38,8 +38,15 @@ void PolyDataNormals::Process()
     
     if (bbGetInputIn()!=NULL)
     {
-  
         vtkPolyDataNormals* normal = vtkPolyDataNormals::New();
+
+//      Automatically change the orientation fo normals, put it from inside to outside
+        normal->SetAutoOrientNormals(true);
+        normal->SetConsistency(true);
+//      this force to not change the order of triangles, keep the original order        
+//        normal->SetAutoOrientNormals(false);
+//        normal->SetConsistency(false);
+
         normal->SetInputData( bbGetInputIn() );
         if (bbGetInputComputeType()==0)
         {
@@ -136,8 +143,8 @@ void PolyDataNormals::Process()
     } else {
         bbSetOutputOut( NULL );
     }// if In
-    
 }
+
 //===== 
 // 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)
 //===== 
@@ -145,35 +152,34 @@ void PolyDataNormals::bbUserSetDefaultValues()
 {
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
+    bbSetInputType(0);
+    bbSetInputComputeType(0);
     bbSetInputIn(NULL);
     bbSetOutputOut( NULL );
 }
+
 //===== 
 // 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)
 //===== 
 void PolyDataNormals::bbUserInitializeProcessing()
 {
-
 //  THE INITIALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should allocate the internal/output pointers 
-//    if any 
-
-  
+//    if any
 }
+
 //===== 
 // 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)
 //===== 
 void PolyDataNormals::bbUserFinalizeProcessing()
 {
-
 //  THE FINALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should desallocate the internal/output pointers 
 //    if any
-  
-}
 }
-// EO namespace bbcreaVtk
+
+}// EO namespace bbcreaVtk