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)
4 #include "bbcreaVtkTrimmedExtrusionFilter.h"
5 #include "bbcreaVtkPackage.h"
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,TrimmedExtrusionFilter)
13 BBTK_BLACK_BOX_IMPLEMENTATION(TrimmedExtrusionFilter,bbtk::AtomicBlackBox);
15 // 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)
17 void TrimmedExtrusionFilter::Process()
20 // THE MAIN PROCESSING METHOD BODY
21 // Here we simply set the input 'In' value to the output 'Out'
22 // And print out the output value
23 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
24 // void bbSet{Input|Output}NAME(const TYPE&)
25 // const TYPE& bbGet{Input|Output}NAME() const
27 // * NAME is the name of the input/output
28 // (the one provided in the attribute 'name' of the tag 'input')
29 // * TYPE is the C++ type of the input/output
30 // (the one provided in the attribute 'type' of the tag 'input')
31 // bbSetOutputOut( bbGetInputIn() );
32 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
35 printf("EED Warning!!! TrimmedExtrusionFilter::Process Box not tested....... \n");
36 printf("EED Warning!!! TrimmedExtrusionFilter::Process Box not tested....... \n");
37 printf("EED Warning!!! TrimmedExtrusionFilter::Process Box not tested....... \n");
38 printf("EED Warning!!! TrimmedExtrusionFilter::Process Box not tested....... \n");
39 printf("EED Warning!!! TrimmedExtrusionFilter::Process Box not tested....... \n");
40 printf("EED Warning!!! TrimmedExtrusionFilter::Process Box not tested....... \n");
41 printf("EED Warning!!! TrimmedExtrusionFilter::Process Box not tested....... \n");
46 if ( (bbGetInputIn()!=NULL) && (bbGetInputIn2()!=NULL) )
52 extrusion = vtkTrimmedExtrusionFilter::New();
53 std::vector<double> dir=bbGetInputDirection();
56 extrusion->SetExtrusionDirection( dir[0],dir[1],dir[2] );
58 extrusion->SetExtrusionDirection( 1,0,0 );
60 extrusion->SetInputData( bbGetInputIn() );
61 extrusion->SetTrimSurfaceData( bbGetInputIn2() );
62 if (bbGetInputType()==0)
64 extrusion->SetExtrusionStrategy(vtkTrimmedExtrusionFilter::BOUNDARY_EDGES);
66 extrusion->SetExtrusionStrategy(vtkTrimmedExtrusionFilter::ALL_EDGES);
69 bbSetOutputOut( extrusion->GetTrimSurface() );
71 printf("EED Warning!!! TrimmedExtrusionFilter::Process Either In or In2 is missing \n");
77 // 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)
79 void TrimmedExtrusionFilter::bbUserSetDefaultValues()
82 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
83 // Here we initialize the input 'In' to 0
89 std::vector<double> dir;
93 bbSetInputDirection( dir );
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::bbUserInitializeProcessing()
102 // THE INITIALIZATION METHOD BODY :
104 // but this is where you should allocate the internal/output pointers
110 // 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)
112 void TrimmedExtrusionFilter::bbUserFinalizeProcessing()
115 // THE FINALIZATION METHOD BODY :
117 // but this is where you should desallocate the internal/output pointers
122 // EO namespace bbcreaVtk