if ((bbGetInputIn1()!=NULL) && (bbGetInputIn2()!=NULL) )
{
-
+/*
printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
printf("EED Warnning BooleanOperationPolyDataFilter::Process Put this code at the end of CreateMesh.. or create 2 new boxes\n");
-
+*/
+
+/*
vtkCleanPolyData *clean1 = vtkCleanPolyData::New();
vtkCleanPolyData *clean2 = vtkCleanPolyData::New();
clean1->SetInputData( bbGetInputIn1() );
triangle2->SetInputData( clean2->GetOutput() );
triangle1->Update();
triangle2->Update();
+*/
+ //TRIANGLE FILTER NOT NEEDED, this can handle non triangle meshes.
+
// vtkPolyDataBooleanFilter is not a vtk filter (this one yes: vtkBooleanOperationPolyDataFilter )
// https://github.com/zippy84/vtkbool
// vtkPolyDataBooleanFilter is a local code creaVtk lib
vtkPolyDataBooleanFilter *booleanOperation = vtkPolyDataBooleanFilter::New();
- booleanOperation->SetInputData(0, triangle1->GetOutput() );
- booleanOperation->SetInputData(1, triangle2->GetOutput() );
+// booleanOperation->SetInputData(0, triangle1->GetOutput() );
+// booleanOperation->SetInputData(1, triangle2->GetOutput() );
-// booleanOperation->SetInputData(0, bbGetInputIn1() );
-// booleanOperation->SetInputData(1, bbGetInputIn2() );
+ booleanOperation->SetInputData(0, bbGetInputIn1() );
+ booleanOperation->SetInputData(1, bbGetInputIn2() );
if (bbGetInputOperation()==0 )
{
// fillHolesFilter->SetHoleSize(100000.0);
// fillHolesFilter->Update();
// bbSetOutputOut( fillHolesFilter->GetOutput() );
+
+ /*
+ *
+ *Added boxes(triangleFilter and CleanPolyData) to handle this outside the box
+ *
+
+ //vtkTriangleFilter *triangleEnd = vtkTriangleFilter::New();
+ //triangleEnd->SetInputData( booleanOperation->GetOutput() );
+ //triangleEnd->Update();
+
+ vtkCleanPolyData *cleanEnd = vtkCleanPolyData::New();
+ cleanEnd->SetInputData( booleanOperation->GetOutput() );
+ cleanEnd->Update();
+ bbSetOutputOut( cleanEnd->GetOutput() );
+ */
+
bbSetOutputOut( booleanOperation->GetOutput() );
} else {
bbSetOutputOut( NULL );
--- /dev/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)
+//=====
+#include "bbcreaVtkCleanPolyData.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,CleanPolyData)
+BBTK_BLACK_BOX_IMPLEMENTATION(CleanPolyData,bbtk::AtomicBlackBox);
+//=====
+// 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 CleanPolyData::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+ if( bbGetInputIn() != NULL )
+ {
+ cleanPolyData->SetInputData( bbGetInputIn() );
+ cleanPolyData->Update();
+ bbSetOutputOut( cleanPolyData->GetOutput() );
+ }else{
+ 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 CleanPolyData::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+ cleanPolyData = 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 CleanPolyData::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+ cleanPolyData = vtkCleanPolyData::New();
+
+}
+//=====
+// 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 CleanPolyData::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+ cleanPolyData->Delete();
+ cleanPolyData = NULL;
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/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)
+//=====
+#ifndef __bbcreaVtkCleanPolyData_h_INCLUDED__
+#define __bbcreaVtkCleanPolyData_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkCleanPolyData.h"
+#include "vtkPolyData.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT CleanPolyData
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(CleanPolyData,bbtk::AtomicBlackBox);
+//=====
+// 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(In,vtkPolyData*);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkCleanPolyData *cleanPolyData;
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(CleanPolyData,bbtk::AtomicBlackBox);
+BBTK_NAME("CleanPolyData");
+BBTK_AUTHOR("InfoDev");
+BBTK_DESCRIPTION("No Description.");
+BBTK_CATEGORY("empty");
+BBTK_INPUT(CleanPolyData,In,"Input PolyData",vtkPolyData*,"");
+BBTK_OUTPUT(CleanPolyData,Out,"Output PolyData",vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(CleanPolyData);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkCleanPolyData_h_INCLUDED__
+
--- /dev/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)
+//=====
+#include "bbcreaVtkTriangleFilter.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,TriangleFilter)
+BBTK_BLACK_BOX_IMPLEMENTATION(TriangleFilter,bbtk::AtomicBlackBox);
+//=====
+// 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 TriangleFilter::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+ if( bbGetInputIn() != NULL )
+ {
+ triangleFilter->SetInputData( bbGetInputIn() );
+ triangleFilter->Update();
+ bbSetOutputOut( triangleFilter->GetOutput() );
+ }else{
+ 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 TriangleFilter::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+ triangleFilter = 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 TriangleFilter::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+ triangleFilter = vtkTriangleFilter::New();
+
+}
+//=====
+// 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 TriangleFilter::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+ triangleFilter->Delete();
+ triangleFilter = NULL;
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/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)
+//=====
+#ifndef __bbcreaVtkTriangleFilter_h_INCLUDED__
+#define __bbcreaVtkTriangleFilter_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkPolyData.h"
+#include "vtkTriangleFilter.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT TriangleFilter
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(TriangleFilter,bbtk::AtomicBlackBox);
+//=====
+// 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(In,vtkPolyData*);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkTriangleFilter *triangleFilter;
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(TriangleFilter,bbtk::AtomicBlackBox);
+BBTK_NAME("TriangleFilter");
+BBTK_AUTHOR("InfoDev");
+BBTK_DESCRIPTION("No Description.");
+BBTK_CATEGORY("empty");
+BBTK_INPUT(TriangleFilter,In,"Input PolyData", vtkPolyData*,"");
+BBTK_OUTPUT(TriangleFilter,Out,"Output PolyData", vtkPolyData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(TriangleFilter);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkTriangleFilter_h_INCLUDED__
+