From 5975d6831f728db831cad60867e70733348880e6 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Tue, 24 May 2022 13:21:23 +0200 Subject: [PATCH] #3274 BooleanOperationPolyDataFilter BoxWidget ClipPolyData VoxelGrid --- ...bcreaVtkBooleanOperationPolyDataFilter.cxx | 6 ++++-- .../bbcreaVtkBooleanOperationPolyDataFilter.h | 20 ++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.cxx index 9017e5b..3e8bca3 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.cxx @@ -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); } //===== diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.h b/bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.h index f604191..0b7ea84 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.h @@ -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*,""); -- 2.47.1