BOX
creaVtk:Cutter:Box00
ISEXEC:FALSE
--226.539144:46.310533:-900.000000
--194.339144:36.310533:-900.000000
+-145.723171:32.668251:-900.000000
+-113.523171:22.668251:-900.000000
FIN_BOX
BOX
vtk:SphereSource:Box01
ISEXEC:FALSE
--177.440184:69.250364:-900.000000
--137.615184:59.250364:-900.000000
+-111.028659:69.110634:-900.000000
+-71.203659:59.110634:-900.000000
PORT
CenterX:"0"
PORT
BOX
creaMaracasVisu:ViewerNV:Box02
ISEXEC:FALSE
-31.452292:22.917500:-900.000000
-95.172292:12.917500:-900.000000
-FIN_BOX
-BOX
-vtk:LoadHola:Box03
-ISEXEC:FALSE
-67.171981:67.171981:-900.000000
-102.721981:57.171981:-900.000000
+-39.027712:25.464030:-900.000000
+24.692288:15.464030:-900.000000
+PORT
+nTypeView:"7"
FIN_BOX
BOX
vtk:PolyDataToActor:Box04
ISEXEC:FALSE
--147.306444:-1.305431:-900.000000
--102.066444:-11.305431:-900.000000
+-160.865702:-7.231106:-900.000000
+-115.625702:-17.231106:-900.000000
PORT
Colour:"1 0 0"
PORT
+LineWidth:"2"
+PORT
Opacity:"1"
PORT
Representation:"1"
BOX
wx:LayoutSplit:Box05
ISEXEC:TRUE
--28.011797:-111.715695:-900.000000
-11.068203:-121.715695:-900.000000
+-85.277640:-110.429457:-900.000000
+-46.197640:-120.429457:-900.000000
PORT
Orientation:"H"
FIN_BOX
BOX
-wx:LayoutLine:Box07
-ISEXEC:FALSE
--135.789124:-72.766127:-900.000000
--78.229124:-82.766127:-900.000000
-FIN_BOX
-BOX
vtk:PolyDataToActor:Box09
ISEXEC:FALSE
--74.693411:-18.608435:-900.000000
--29.453411:-28.608435:-900.000000
+-118.071022:-28.000184:-900.000000
+-72.831022:-38.000184:-900.000000
PORT
Opacity:"0.2"
PORT
BOX
vtk:UpdateRender:Box13
ISEXEC:FALSE
--64.894456:-60.049950:-900.000000
--24.569456:-70.049950:-900.000000
+-86.780672:-58.548149:-900.000000
+-46.455672:-68.548149:-900.000000
PORT
Active:"true"
FIN_BOX
BOX
wx:CommandButton:Box15
ISEXEC:FALSE
--77.543946:52.017647:-900.000000
--34.768946:42.017647:-900.000000
+-191.766922:14.485134:-900.000000
+-148.991922:4.485134:-900.000000
PORT
Label:"Refresh"
FIN_BOX
+BOX
+creaVtk:Plane:Box10
+ISEXEC:FALSE
+-159.787919:55.095091:-900.000000
+-128.062919:45.095091:-900.000000
+PORT
+Normal:"0 0 1"
+PORT
+Origin:"0 0 30"
+FIN_BOX
+BOX
+vtk:LoadHola:Box11
+ISEXEC:FALSE
+-22.628739:43.735282:-900.000000
+12.921261:33.735282:-900.000000
+FIN_BOX
CONNECTIONS:13
CONNECTION
-Box03:Out:Box02:In
-NumberOfControlPoints:0
-CONNECTION
Box00:Out:Box04:In
NumberOfControlPoints:0
CONNECTION
Box02:Widget:Box05:Widget2
NumberOfControlPoints:0
CONNECTION
-Box07:Widget:Box05:Widget1
-NumberOfControlPoints:0
-CONNECTION
Box02:Renderer1:Box09:Renderer
NumberOfControlPoints:0
CONNECTION
Box15:BoxChange:Box04:BoxExecute
NumberOfControlPoints:0
CONNECTION
-Box15:Widget:Box07:Widget2
-NumberOfControlPoints:0
-CONNECTION
Box04:BoxChange:Box09:BoxExecute
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box01:Out:Box09:In
NumberOfControlPoints:0
+CONNECTION
+Box15:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box00:ImplicitFunction
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box02:In
+NumberOfControlPoints:0
APP_END
set Box01.ThetaResolution "15"
new creaMaracasVisu:ViewerNV Box02
-
-new vtk:LoadHola Box03
+ set Box02.nTypeView "7"
new vtk:PolyDataToActor Box04
set Box04.Colour "1 0 0"
+ set Box04.LineWidth "2"
set Box04.Opacity "1"
set Box04.Representation "1"
new wx:LayoutSplit Box05
set Box05.Orientation "H"
-new wx:LayoutLine Box07
-
new vtk:PolyDataToActor Box09
set Box09.Opacity "0.2"
set Box09.Representation "2"
new wx:CommandButton Box15
set Box15.Label "Refresh"
+new creaVtk:Plane Box10
+ set Box10.Normal "0 0 1"
+ set Box10.Origin "0 0 30"
+
+new vtk:LoadHola Box11
-connect Box03.Out Box02.In
connect Box00.Out Box04.In
connect Box02.Widget Box05.Widget2
-connect Box07.Widget Box05.Widget1
-
connect Box02.Renderer1 Box09.Renderer
connect Box02.Renderer1 Box13.Renderer
connect Box15.BoxChange Box04.BoxExecute
-connect Box15.Widget Box07.Widget2
-
connect Box04.BoxChange Box09.BoxExecute
connect Box09.BoxChange Box13.BoxExecute
connect Box01.Out Box09.In
+connect Box15.Widget Box05.Widget1
+
+connect Box10.Out Box00.ImplicitFunction
+
+connect Box11.Out Box02.In
+
# Complex input ports
#include "bbcreaVtkPackage.h"
#include "vtkCutter.h"
#include "vtkStripper.h"
-#include "vtkPlane.h"
-#
+
namespace bbcreaVtk
{
vtkPolyData *poly;
vtkStripper *strips;
- vtkPlane *plane;
- plane = vtkPlane::New();
- plane->SetOrigin(0,0,30);
- plane->SetNormal(0,0,1);
-
cutter = vtkCutter::New();
cutter->SetInputData( bbGetInputIn() );
- cutter->SetCutFunction( plane );
+ cutter->SetCutFunction( bbGetInputImplicitFunction() );
cutter->Update();
-
+
strips = vtkStripper::New();
strips->SetInputData( cutter->GetOutput() );
strips->Update();
poly = vtkPolyData::New();
poly->SetPoints( strips->GetOutput()->GetPoints() );
poly->SetPolys( strips->GetOutput()->GetLines() );
-
+
+// bbSetOutputOut( cutter->GetOutput() );
bbSetOutputOut( poly );
-// bbSetOutputOut( cutter->GetOutput() );
-
-
+
}
//=====
// 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 "bbtkAtomicBlackBox.h"
#include "iostream"
#include "vtkPolyData.h"
+#include "vtkImplicitFunction.h"
namespace bbcreaVtk
{
// 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_INPUT(ImplicitFunction,vtkImplicitFunction*);
BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
BBTK_PROCESS(Process);
void Process();
BBTK_CATEGORY("empty");
BBTK_INPUT(Cutter,In,"vtkPolyData input",vtkPolyData*,"");
+ BBTK_INPUT(Cutter,ImplicitFunction,"vtkImpliciteFunction ex.: vtkBox, vtkCone, vtkCylender, vtkPlane, vtkSphere(s), vtkQuadric, ETC.",vtkImplicitFunction*,"");
BBTK_OUTPUT(Cutter,Out,"vtkPolyData output",vtkPolyData*,"");
--- /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 "bbcreaVtkPlane.h"
+#include "bbcreaVtkPackage.h"
+
+#include "vtkPlane.h"
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,Plane)
+BBTK_BLACK_BOX_IMPLEMENTATION(Plane,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 Plane::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')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ vtkPlane *plane = NULL;
+
+ if ( (bbGetInputOrigin().size()==3) && (bbGetInputNormal().size()==3) )
+ {
+ plane = vtkPlane::New();
+ plane->SetOrigin( bbGetInputOrigin()[0],bbGetInputOrigin()[1],bbGetInputOrigin()[2] );
+ plane->SetNormal( bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2] );
+ }
+
+ bbSetOutputOut( plane );
+
+}
+
+//=====
+// 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 Plane::bbUserSetDefaultValues()
+{
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ std::vector<double> origin;
+ std::vector<double> normal;
+ origin.push_back(0);
+ origin.push_back(0);
+ origin.push_back(0);
+ normal.push_back(0);
+ normal.push_back(0);
+ normal.push_back(1);
+ bbSetInputOrigin( origin );
+ bbSetInputNormal( normal );
+}
+
+//=====
+// 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 Plane::bbUserInitializeProcessing()
+{
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+}
+
+//=====
+// 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 Plane::bbUserFinalizeProcessing()
+{
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+}
+
+} // 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 __bbcreaVtkPlane_h_INCLUDED__
+#define __bbcreaVtkPlane_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+#include "vtkImplicitFunction.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT Plane
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(Plane,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(Origin,std::vector<double>);
+ BBTK_DECLARE_INPUT(Normal,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(Out,vtkImplicitFunction*);
+ 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)
+//=====
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(Plane,bbtk::AtomicBlackBox);
+ BBTK_NAME("Plane");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("Implicite Function of VTK");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(Plane,Origin,"(default [0,0,0]) point [x,y,z]",std::vector<double>,"");
+ BBTK_INPUT(Plane,Normal,"(default [0,0,1]) vector [x,y,z]",std::vector<double>,"");
+
+ BBTK_OUTPUT(Plane,Out,"vtkImplicitFuntion",vtkImplicitFunction*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(Plane);
+//=====
+// 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 // __bbcreaVtkPlane_h_INCLUDED__
+