]> Creatis software - creaVtk.git/commitdiff
#3274 BooleanOperationPolyDataFilter BoxWidget ClipPolyData VoxelGrid
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 24 May 2022 11:21:23 +0000 (13:21 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 24 May 2022 11:21:23 +0000 (13:21 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.h

index 9017e5bdcb66b9ef2683d8d05139f6fe920a18d1..3e8bca33a88de30726ca28806c6162c798cb0cad 100644 (file)
@@ -71,8 +71,9 @@ printf("EED Warnning BooleanOperationPolyDataFilter::Process  Put this code at t
                }
                if (bbGetInputOperation()==2 )
                {
-                       booleanOperation->SetOperationToDifference();  
-               }
+                       booleanOperation->SetOperationToDifference();
+            booleanOperation->SetReorientDifferenceCells( bbGetInputReorientDifferenceCells() );
+        }
                booleanOperation->Update();
                bbSetOutputOut( booleanOperation->GetOutput() );
        } else {
@@ -90,6 +91,7 @@ void BooleanOperationPolyDataFilter::bbUserSetDefaultValues()
    bbSetInputIn1(NULL);
    bbSetInputIn2(NULL);
    bbSetInputOperation(0);
+   bbSetInputReorientDifferenceCells(true);
   
 }
 //===== 
index f604191a29f57ca92b43fdb8d8e135b807de8840..0b7ea8479c5617cf32c69335398775baa6bbf2da 100644 (file)
@@ -21,12 +21,13 @@ class bbcreaVtk_EXPORT BooleanOperationPolyDataFilter
 //===== 
 // 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)
 //===== 
-  BBTK_DECLARE_INPUT(In1,vtkPolyData*);
-  BBTK_DECLARE_INPUT(In2,vtkPolyData*);
-  BBTK_DECLARE_INPUT(Operation,int);
-  BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
-  BBTK_PROCESS(Process);
-  void Process();
+    BBTK_DECLARE_INPUT(In1,vtkPolyData*);
+    BBTK_DECLARE_INPUT(In2,vtkPolyData*);
+    BBTK_DECLARE_INPUT(Operation,int);
+    BBTK_DECLARE_INPUT(ReorientDifferenceCells,bool);
+    BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+    BBTK_PROCESS(Process);
+    void Process();
 //===== 
 // 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)
 //===== 
@@ -38,9 +39,10 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(BooleanOperationPolyDataFilter,bbtk::AtomicBlackBo
   BBTK_DESCRIPTION("No Description.");
   BBTK_CATEGORY("empty");
 
-  BBTK_INPUT(BooleanOperationPolyDataFilter,In1,"vtkPolyData",vtkPolyData*,"");
-  BBTK_INPUT(BooleanOperationPolyDataFilter,In2,"vtkPolyData",vtkPolyData*,"");
-  BBTK_INPUT(BooleanOperationPolyDataFilter,Operation,"(defalut 0) 0:Union 1:Intersection 2:Difference",int,"");
+    BBTK_INPUT(BooleanOperationPolyDataFilter,In1,"vtkPolyData",vtkPolyData*,"");
+    BBTK_INPUT(BooleanOperationPolyDataFilter,In2,"vtkPolyData",vtkPolyData*,"");
+    BBTK_INPUT(BooleanOperationPolyDataFilter,Operation,"(defalut 0) 0:Union 1:Intersection 2:Difference",int,"");
+    BBTK_INPUT(BooleanOperationPolyDataFilter,ReorientDifferenceCells,"(defalut true) With Operation 2:Difference   Reorient Difference Cells",bool,"");
 
   BBTK_OUTPUT(BooleanOperationPolyDataFilter,Out,"vtkPolyData",vtkPolyData*,"");