2 // 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)
5 #include "bbcreaVtkTrimmedExtrusionFilter.h"
7 #include "bbcreaVtkPackage.h"
14 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,TrimmedExtrusionFilter)
15 BBTK_BLACK_BOX_IMPLEMENTATION(TrimmedExtrusionFilter,bbtk::AtomicBlackBox);
17 // 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)
19 void TrimmedExtrusionFilter::Process()
22 // THE MAIN PROCESSING METHOD BODY
23 // Here we simply set the input 'In' value to the output 'Out'
24 // And print out the output value
25 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
26 // void bbSet{Input|Output}NAME(const TYPE&)
27 // const TYPE& bbGet{Input|Output}NAME() const
29 // * NAME is the name of the input/output
30 // (the one provided in the attribute 'name' of the tag 'input')
31 // * TYPE is the C++ type of the input/output
32 // (the one provided in the attribute 'type' of the tag 'input')
33 // bbSetOutputOut( bbGetInputIn() );
34 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
36 if ( (bbGetInputIn()!=NULL) && (bbGetInputIn2()!=NULL) )
42 extrusion = vtkTrimmedExtrusionFilter::New();
43 std::vector<double> dir=bbGetInputDirection();
46 extrusion->SetExtrusionDirection( dir[0],dir[1],dir[2] );
48 extrusion->SetExtrusionDirection( 1,0,0 );
50 extrusion->SetInputData( bbGetInputIn() );
51 extrusion->SetTrimSurfaceData( bbGetInputIn2() );
52 if (bbGetInputType()==0)
54 extrusion->SetExtrusionStrategy(vtkTrimmedExtrusionFilter::BOUNDARY_EDGES);
56 extrusion->SetExtrusionStrategy(vtkTrimmedExtrusionFilter::ALL_EDGES);
59 bbSetOutputOut( extrusion->GetTrimSurface() );
61 printf("EED Warning!!! TrimmedExtrusionFilter::Process Either In or In2 is missing \n");
66 // 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)
68 void TrimmedExtrusionFilter::bbUserSetDefaultValues()
70 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
71 // Here we initialize the input 'In' to 0
73 // ------ Not exist in windows old VTK 8.1 version ---------
78 std::vector<double> dir;
82 bbSetInputDirection( dir );
86 // 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)
88 void TrimmedExtrusionFilter::bbUserInitializeProcessing()
90 // THE INITIALIZATION METHOD BODY :
92 // but this is where you should allocate the internal/output pointers
97 // 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)
99 void TrimmedExtrusionFilter::bbUserFinalizeProcessing()
101 // THE FINALIZATION METHOD BODY :
103 // but this is where you should desallocate the internal/output pointers
107 } // EO namespace bbcreaVtk