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 #ifndef __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__
5 #define __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__
7 #include "bbcreaVtk_EXPORT.h"
8 #include "bbtkAtomicBlackBox.h"
11 #include "vtkPoints.h"
12 #include "vtkCellArray.h"
13 #include "vtkPolyData.h"
14 #include "vtkCleanPolyData.h"
15 #include "vtkTriangleFilter.h"
21 class bbcreaVtk_EXPORT CreateMeshFromPoints
23 public bbtk::AtomicBlackBox
25 BBTK_BLACK_BOX_INTERFACE(CreateMeshFromPoints,bbtk::AtomicBlackBox);
27 // 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)
29 BBTK_DECLARE_INPUT(LstX,std::vector<double>);
30 BBTK_DECLARE_INPUT(LstY,std::vector<double>);
31 BBTK_DECLARE_INPUT(LstZ,std::vector<double>);
32 BBTK_DECLARE_INPUT(LstIndexs,std::vector<int>);
33 BBTK_DECLARE_INPUT(OpenClose, bool);
34 BBTK_DECLARE_INPUT(CloseSurface, bool);
35 BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
36 BBTK_PROCESS(Process);
41 vtkPolyData *polydata;
42 vtkCleanPolyData *clean;
43 vtkTriangleFilter *triangle;
45 bool CalcValidCentroid(double(¢roid)[3], int start, int end, int increment, int numPoints);
46 bool CheckLinePointOrder();
47 bool isPointingCorrectly( int firstPointId, int secPointId, double(¢roid)[3], int contrPointId);
48 void CloseContourBottom(bool uPointOrder);
49 void CloseContourSides(std::vector<int> lstIndexs, bool uPointOrder);
50 void CloseOpenContourSurface(std::vector<int> lstIndexs);
53 // 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)
57 BBTK_BEGIN_DESCRIBE_BLACK_BOX(CreateMeshFromPoints,bbtk::AtomicBlackBox);
58 BBTK_NAME("CreateMeshFromPoints");
59 BBTK_AUTHOR("InfoDev");
60 BBTK_DESCRIPTION("No Description.");
61 BBTK_CATEGORY("empty");
63 BBTK_INPUT(CreateMeshFromPoints,LstX,"List X point",std::vector<double>,"");
64 BBTK_INPUT(CreateMeshFromPoints,LstY,"List Y point",std::vector<double>,"");
65 BBTK_INPUT(CreateMeshFromPoints,LstZ,"List Z point",std::vector<double>,"");
66 BBTK_INPUT(CreateMeshFromPoints,LstIndexs,"Number of points by segment",std::vector<int>,"");
67 BBTK_INPUT(CreateMeshFromPoints,OpenClose,"(default false) Type of Contour: false=Open, true=Close",bool,"");
68 BBTK_INPUT(CreateMeshFromPoints,CloseSurface,"(default false) Add the caps to close the surface",bool,"");
70 BBTK_OUTPUT(CreateMeshFromPoints,Out,"vtkPolyData",vtkPolyData*,"");
72 BBTK_END_DESCRIBE_BLACK_BOX(CreateMeshFromPoints);
74 // 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)
77 // EO namespace bbcreaVtk
79 #endif // __bbcreaVtkCreateMeshFromPoints_h_INCLUDED__