if (bbGetInputType()==12) // Nearest point in vector
{
int i;
- int sizeLstX = In0.size(); // lstX
- int sizeLstY = In1.size(); // lstY
- int sizeLstZ = In2.size(); // lstZ
+ int sizeLstX = In0.size(); // lstX
+ int sizeLstY = In1.size(); // lstY
+ int sizeLstZ = In2.size(); // lstZ
std::vector<double> spc = bbGetInputk1();
if (spc.size()>=1)
{
Out0.push_back( sqrt( x*x +y*y +z*z ) );
}
} // Type 13
+ if (bbGetInputType()==14) // Select segments
+ {
+ if ( (In0.size()==In1.size()) && (In0.size()==In2.size() ) )
+ {
+ if (bbGetInputk1().size()==0) // not filter , just passing all segmentes
+ {
+ Out0 = In0;
+ Out1 = In1;
+ Out2 = In2;
+ Out3 = In3;
+ } else {
+ std::vector<double> k1 =bbGetInputk1();
+ int iSeg, sizeLstIndex = In3.size();
+ int iGeneral=0;
+ int i, size;
+ for (iSeg = 0; iSeg<sizeLstIndex; iSeg++)
+ {
+ size = In3[iSeg];
+ if (std::find(k1.begin(), k1.end(),iSeg)!=k1.end() ) // checking if element exist inside
+ {
+ Out3.push_back(size);
+ for (i=0; i<size; i++)
+ {
+ Out0.push_back( In0[iGeneral] );
+ Out1.push_back( In1[iGeneral] );
+ Out2.push_back( In2[iGeneral] );
+ iGeneral++;
+ } // for i
+ } else {
+ iGeneral=iGeneral+size;
+ }
+ } // for iSeg
+ } // if k1 not empty
+ }
+ } // Type 14
+
bbSetOutputOut0( Out0 );
bbSetOutputOut1( Out1 );
bbSetOutputOut2( Out2 );
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), 11=Mul Spacing (K1[spcX,spcY,spcZ]=Spacing), 12=Div Spacing (K1[spcX,spcY,spcZ]=Spacing), 13=Distance pointIn0 and pontIn1",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<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), 13=Distance pointIn0 and pontIn1, 14=Select specific segments In0=lstPx In1=lstPy In2=lstPz In3=lstIndex (if k1 empty all segments are selected) ",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) , k1[segment1, segment2,..] (type 14) ",std::vector<double>,"");
BBTK_INPUT(VectorFilterDouble,In0,"Input vector",std::vector<double>,"");
BBTK_INPUT(VectorFilterDouble,In1,"Input vector",std::vector<double>,"");
BBTK_INPUT(VectorFilterDouble,In2,"Input vector",std::vector<double>,"");