From 5c9721d401ef00ce2196ff5ea60bfbe02d8a8e87 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 13 Jul 2022 12:36:59 +0200 Subject: [PATCH] #3488 VectorFilterDouble Spacing Mul Div --- packages/std/src/bbstdVectorFilterDouble.cxx | 118 ++++++++++++++++--- packages/std/src/bbstdVectorFilterDouble.h | 50 ++++---- 2 files changed, 128 insertions(+), 40 deletions(-) diff --git a/packages/std/src/bbstdVectorFilterDouble.cxx b/packages/std/src/bbstdVectorFilterDouble.cxx index 88370e2..9d59c39 100644 --- a/packages/std/src/bbstdVectorFilterDouble.cxx +++ b/packages/std/src/bbstdVectorFilterDouble.cxx @@ -118,7 +118,7 @@ void VectorFilterDouble::Process() int ipLstvec2; double iLine; int sizeLines = (*pLstVec[0]).size(); - double step = (double)sizeLines/((double)bbGetInputk1()-1); + double step = (double)sizeLines/((double)bbGetInputk1()[0]-1); for (iLine=0 ; iLine spc = bbGetInputk1(); + if (spc.size()>=1) + { + for (i=0;i=2) + { + for (i=0;i=3) + { + for (i=0;i spc = bbGetInputk1(); + if (spc.size()>=1) + { + if (spc[0]!=0) + { + for (i=0;i=2) + { + if (spc[0]!=0) + { + for (i=0;i=3) + { + if (spc[0]!=0) + { + for (i=0;i k1; + k1.push_back(0); + bbSetInputk1(k1); } //===== // 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) diff --git a/packages/std/src/bbstdVectorFilterDouble.h b/packages/std/src/bbstdVectorFilterDouble.h index 8f2110a..e807839 100644 --- a/packages/std/src/bbstdVectorFilterDouble.h +++ b/packages/std/src/bbstdVectorFilterDouble.h @@ -18,29 +18,29 @@ class bbstd_EXPORT VectorFilterDouble //===== // 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(Type,int); - BBTK_DECLARE_INPUT(k1,double); - BBTK_DECLARE_INPUT(In0,std::vector); - BBTK_DECLARE_INPUT(In1,std::vector); - BBTK_DECLARE_INPUT(In2,std::vector); - BBTK_DECLARE_INPUT(In3,std::vector); - BBTK_DECLARE_INPUT(In4,std::vector); - BBTK_DECLARE_INPUT(In5,std::vector); - BBTK_DECLARE_INPUT(In6,std::vector); - BBTK_DECLARE_INPUT(In7,std::vector); - BBTK_DECLARE_INPUT(In8,std::vector); - BBTK_DECLARE_INPUT(In9,std::vector); - BBTK_DECLARE_OUTPUT(Out0,std::vector); - BBTK_DECLARE_OUTPUT(Out1,std::vector); - BBTK_DECLARE_OUTPUT(Out2,std::vector); - BBTK_DECLARE_OUTPUT(Out3,std::vector); - BBTK_DECLARE_OUTPUT(Out4,std::vector); - BBTK_DECLARE_OUTPUT(Out5,std::vector); - BBTK_DECLARE_OUTPUT(Out6,std::vector); - BBTK_DECLARE_OUTPUT(Out7,std::vector); - BBTK_DECLARE_OUTPUT(Out8,std::vector); - BBTK_DECLARE_OUTPUT(Out9,std::vector); - BBTK_PROCESS(Process); + BBTK_DECLARE_INPUT(Type,int); + BBTK_DECLARE_INPUT(k1,std::vector); + BBTK_DECLARE_INPUT(In0,std::vector); + BBTK_DECLARE_INPUT(In1,std::vector); + BBTK_DECLARE_INPUT(In2,std::vector); + BBTK_DECLARE_INPUT(In3,std::vector); + BBTK_DECLARE_INPUT(In4,std::vector); + BBTK_DECLARE_INPUT(In5,std::vector); + BBTK_DECLARE_INPUT(In6,std::vector); + BBTK_DECLARE_INPUT(In7,std::vector); + BBTK_DECLARE_INPUT(In8,std::vector); + BBTK_DECLARE_INPUT(In9,std::vector); + BBTK_DECLARE_OUTPUT(Out0,std::vector); + BBTK_DECLARE_OUTPUT(Out1,std::vector); + BBTK_DECLARE_OUTPUT(Out2,std::vector); + BBTK_DECLARE_OUTPUT(Out3,std::vector); + BBTK_DECLARE_OUTPUT(Out4,std::vector); + BBTK_DECLARE_OUTPUT(Out5,std::vector); + BBTK_DECLARE_OUTPUT(Out6,std::vector); + BBTK_DECLARE_OUTPUT(Out7,std::vector); + BBTK_DECLARE_OUTPUT(Out8,std::vector); + BBTK_DECLARE_OUTPUT(Out9,std::vector); + 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) @@ -52,8 +52,8 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterDouble,bbtk::AtomicBlackBox); BBTK_AUTHOR("InfoDev"); BBTK_DESCRIPTION("No Description."); BBTK_CATEGORY("empty"); - BBTK_INPUT(VectorFilterDouble,Type,"default (0) 0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition k1, 4=Substraction k1, 5=Multilication k1, 6=Division k1, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In3PointXYZ In0LstX In1LstY In2LstZ (Out0-index Out1-PointXYZ)",int,""); - BBTK_INPUT(VectorFilterDouble,k1,"default (0) nothing (Type0), k1=new size vectors (Type 1) , nothing (Type2), k1 = Addition const. (Type 3), k1 = Substraction const. (Type 4), k1 = Multiplication const. (Type 5) , k1 = Division const. (Type 6) , ",double,""); + BBTK_INPUT(VectorFilterDouble,Type,"default (0) 0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition k1, 4=Substraction k1, 5=Multilication k1, 6=Division k1, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In3PointXYZ In0LstX In1LstY In2LstZ (Out0-index Out1-PointXYZ), 11=Mul Spacing (K1[spcX,spcY,spcZ]=Spacing), 12=Div Spacing (K1[spcX,spcY,spcZ]=Spacing)",int,""); + BBTK_INPUT(VectorFilterDouble,k1,"(default [0]) nothing (Type0), k1[0]=new size vectors (Type 1) , nothing (Type2), k1[0] = Addition const. (Type 3), k1[0] = Substraction const. (Type 4), k1[0] = Multiplication const. (Type 5) , k1[0] = Division const. (Type 6) , k1[spcX,spcY,spcZ] MulSpc In0_X,In1_Y,In2_Z (type 11), k1[spcX,spcY,spcZ] DivSpc In0_X,In1_Y,In2_Z (type 12) ",std::vector,""); BBTK_INPUT(VectorFilterDouble,In0,"Input vector",std::vector,""); BBTK_INPUT(VectorFilterDouble,In1,"Input vector",std::vector,""); BBTK_INPUT(VectorFilterDouble,In2,"Input vector",std::vector,""); -- 2.45.1