} // for pLstVec
} // Type==5
- if (bbGetInputType()==6) // Division k1
+ if (bbGetInputType()==6) // Division k1ng gadget (node check, owner GtkCheckButton)
+
+
{
int ipLstvec;
int i;
} // for pLstVec
} // Type==6
+
+
+ if (bbGetInputType()==7)
+ {
+ int i,j;
+ for (j=0;j<In4.size(); j++)
+ {
+ Out0.push_back( In4[j] );
+ Out1.push_back( In5[j] );
+ Out2.push_back( In6[j] );
+ } //
+
+
+ int iGeneral=0,sizeI,sizeLst1Indexes=In3.size();
+ for (i=0; i<sizeLst1Indexes-1;i++) { iGeneral=iGeneral+In3[i]; }
+ sizeI=iGeneral+In3[ sizeLst1Indexes-1 ];
+
+ int jGeneral = 0;
+ int sizeJ = In7[ 0 ];
+
+ double dist2,dist2Min,dx,dy,dz;
+ int iBack;
+
+ for (j=jGeneral;j<sizeJ;j++)
+ {
+ dist2Min=1000000;
+ for (i=iGeneral;i<sizeI;i++)
+ {
+ dx = In0[i]-In4[j];
+ dy = In1[i]-In5[j];
+ dz = In2[i]-In6[j];
+ dist2 = dx*dx + dy*dy + dz*dz;
+ if (dist2<dist2Min)
+ {
+ dist2Min=dist2;
+ iBack=i;
+ } // if
+ } // for j
+ Out0[j]=In0[iBack];
+ Out1[j]=In1[iBack];
+ Out2[j]=In2[iBack];
+ } // for i
+
+
+ } // Type 7
+
+
+
+ if (bbGetInputType()==8) // order all vectors using as base the vector In0
+ {
+printf("EED VectorFilterDouble::Process Type 8 Start\n");
+ double tmp;
+ int i,j,ii,sizeII;
+ sizeII=pLstVec.size();
+
+
+ int size=In0.size();
+ for (i=0;i<size; i++)
+ {
+ for (ii=0;ii<sizeII;ii++)
+ {
+ (*pLstVecOut[ii]).push_back( (*pLstVec[ii])[i] );
+ } // for ii
+ } // i
+ for (i=0;i<size;i++)
+ {
+ for (j=i;j<size;j++)
+ {
+ if ((*pLstVecOut[0])[j] <= (*pLstVecOut[0])[i] )
+ {
+
+ for (ii=0;ii<sizeII;ii++)
+ {
+ tmp = (*pLstVecOut[ii])[i];
+ (*pLstVecOut[ii])[i] = (*pLstVecOut[ii])[j];
+ (*pLstVecOut[ii])[j] = tmp;
+// tmp=Out0[i]; Out0[i]=Out0[j]; Out0[j]=tmp;
+ }
+ }
+ } // for j
+ } // for i
+printf("EED VectorFilterDouble::Process Type 8 End\n");
+
+ } // Type 8
+
+
+
+
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, 4=Substraction, 5=Multilication, 6=Division ",int,"");
+ BBTK_INPUT(VectorFilterDouble,Type,"default (0) 0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition, 4=Substraction, 5=Multilication, 6=Division, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 ",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,In0,"Input vector",std::vector<double>,"");
BBTK_INPUT(VectorFilterDouble,In1,"Input vector",std::vector<double>,"");
vOut->push_back(std::to_string(acum));
}
+
+
void VectorFilterString::Process()
{
bbSetOutputOut9( vOut9 );
}
-
}
//=====
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputType(0);
-
+ bbSetInputsk1("");
+ bbSetInputsk2("");
}
//=====
// 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(In8,std::vector<std::string>);
BBTK_DECLARE_INPUT(In9,std::vector<std::string>);
BBTK_DECLARE_INPUT(Type,int);
+ BBTK_DECLARE_INPUT(sk1,std::string);
+ BBTK_DECLARE_INPUT(sk2,std::string);
BBTK_DECLARE_OUTPUT(Out0,std::vector<std::string>);
BBTK_DECLARE_OUTPUT(Out1,std::vector<std::string>);
BBTK_INPUT(VectorFilterString,In7,"Input vector",std::vector<std::string>,"");
BBTK_INPUT(VectorFilterString,In8,"Input vector",std::vector<std::string>,"");
BBTK_INPUT(VectorFilterString,In9,"Input vector",std::vector<std::string>,"");
- BBTK_INPUT(VectorFilterString,Type,"(Default 0) 0:count connected repetitions",int,"");
+ BBTK_INPUT(VectorFilterString,Type,"(Default 0) 0:count connected repetitions, 1:CleaningPointsConnectTwoMesh sk1 criterium",int,"");
+ BBTK_INPUT(VectorFilterString,sk1,"constant 1",std::string,"");
+ BBTK_INPUT(VectorFilterString,sk2,"constant 2",std::string,"");
BBTK_OUTPUT(VectorFilterString,Out0,"First output",std::vector<std::string>,"");
BBTK_OUTPUT(VectorFilterString,Out1,"First output",std::vector<std::string>,"");