//===== // 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 __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__ #define __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__ #include "bbcreaMaracasVisu_EXPORT.h" #include "bbtkAtomicBlackBox.h" #include "iostream" namespace bbcreaMaracasVisu { class bbcreaMaracasVisu_EXPORT ManualContourModel_Box : public bbtk::AtomicBlackBox { BBTK_BLACK_BOX_INTERFACE(ManualContourModel_Box,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(Active,bool); BBTK_DECLARE_INPUT(Type,int); BBTK_DECLARE_INPUT(DoubleContour,int); BBTK_DECLARE_INPUT(OpenClose,bool); BBTK_DECLARE_INPUT(OpenClose2,bool); BBTK_DECLARE_INPUT(NbPoints,int); BBTK_DECLARE_INPUT(LstIndexsIn,std::vector); BBTK_DECLARE_INPUT(LstControlPointsX,std::vector); BBTK_DECLARE_INPUT(LstControlPointsY,std::vector); BBTK_DECLARE_INPUT(LstControlPointsZ,std::vector); BBTK_DECLARE_INPUT(Param,std::vector); BBTK_DECLARE_OUTPUT(LstContourPointsX,std::vector); BBTK_DECLARE_OUTPUT(LstContourPointsY,std::vector); BBTK_DECLARE_OUTPUT(LstContourPointsZ,std::vector); BBTK_DECLARE_OUTPUT(LstIndexsOut,std::vector); BBTK_DECLARE_OUTPUT(LstPssblIncnsnstntCntrY,std::vector); BBTK_DECLARE_OUTPUT(LstPssblIncnsnstntCntrID,std::vector); BBTK_PROCESS(Process); void Process(); void ClockwisePoints( std::vector *lstInX, std::vector *lstInY, std::vector *lstOuZ, std::vector *lstIndexsIn ); void ShiftValues( std::vector *lstInX, std::vector *lstInY, std::vector *lstOuZ, std::vector *lstIndexsIn ); void ProcessBySegment( int Type, int &iGeneral, int sizeSegment, std::vector *lstInX,std::vector *lstInY, std::vector *lstInZ, std::vector *lstOutX,std::vector *lstOutY, std::vector *lstOutZ, std::vector *lstIndexsOut, bool open ); // Linear Distribution void RedistributionPoints( std::vector *lstOutX, std::vector *lstOutY, std::vector *lstOutZ, std::vector *lstIndexsOut ); // sin distribution void RedistributionPoints_SIN_iContour(int iContour, std::vector *lstOutX, std::vector *lstOutY, std::vector *lstOutZ, std::vector *lstIndexsOut,double alpha,double beta ); // find best sin distribution void RedistributionPointsAllContours_SIN( std::vector *lstOutX, std::vector *lstOutY, std::vector *lstOutZ, std::vector *lstIndexsOut ); void findAlphaBetaSinDistribution( std::vector *lstTmp2X, std::vector *lstTmp2Y, std::vector *lstTmp2Z , int sizeContour, std::vector *lstTmp1X, std::vector *lstTmp1Y, std::vector *lstTmp1Z, double *alpha, double *beta); void Redistribution_SIN( double alpha, double beta, std::vector *lstC1X, std::vector *lstC1Y, std::vector *lstC1Z, double sizeOfContour, std::vector *lstC2X, std::vector *lstC2Y, std::vector *lstC2Z ); double SizeContour( std::vector *lstX, std::vector *lstY, std::vector *lstZ ); void CalculeLstSizeContours( std::vector *lstOutX, std::vector *lstOutY, std::vector *lstOutZ, std::vector *lstIndexsOut, std::vector *lstSizeContours ); void ExtractContour(std::vector *lstX, std::vector *lstY, std::vector *lstZ, std::vector *lstIndexs, int contour, std::vector *lstOutX, std::vector *lstOutY, std::vector *lstOutZ ); void PutPointsInContour( std::vector *lstTmpX, std::vector *lstTmpY, std::vector *lstTmpZ, int iContour, std::vector *lstOutX, std::vector *lstOutY, std::vector *lstOutZ, std::vector *lstOutIndexs ); double IntegralDistanceTwoContours( std::vector *lstTmpAX, std::vector *lstTmpAY, std::vector *lstTmpAZ, std::vector *lstTmpBX, std::vector *lstTmpBY, std::vector *lstTmpBZ ); void CopyContour2InContour1( std::vector *lstInX, std::vector *lstInY, std::vector *lstInZ, std::vector *lstOutX, std::vector *lstOutY, std::vector *lstOutZ ); std::vector lstInconsistentContourY; std::vector lstInconsistentContourID; //===== // 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(ManualContourModel_Box,bbtk::AtomicBlackBox); BBTK_NAME("ManualContourModel_Box"); BBTK_AUTHOR("InfoDev"); BBTK_DESCRIPTION("No Description."); BBTK_CATEGORY("empty"); BBTK_INPUT(ManualContourModel_Box,Active,"(true default) Active true/false",bool,""); BBTK_INPUT(ManualContourModel_Box,Type,"(1 default) 1=spline, 2=rectangle, 3=circle, 4=bullEye, 6=Line, 7=points, 8=rotationTool, 10=polygon, 12=Spline3D",int,""); BBTK_INPUT(ManualContourModel_Box,DoubleContour,"(0 default) 0=Simple, 1=Double (This is used to construct surface, use LstIndexesIn)",int,""); BBTK_INPUT(ManualContourModel_Box,OpenClose,"(false default) false=open, true=close",bool,""); BBTK_INPUT(ManualContourModel_Box,OpenClose2,"(false default) false=open, true=close. Used with the DoubleContour option.",bool,""); BBTK_INPUT(ManualContourModel_Box,NbPoints,"(100 default) Number of points int the spline",int,""); BBTK_INPUT(ManualContourModel_Box,LstIndexsIn,"Lst number of points by segment",std::vector,""); BBTK_INPUT(ManualContourModel_Box,LstControlPointsX,"List of control points",std::vector,""); BBTK_INPUT(ManualContourModel_Box,LstControlPointsY,"List of control points",std::vector,""); BBTK_INPUT(ManualContourModel_Box,LstControlPointsZ,"List of control points",std::vector,""); BBTK_INPUT(ManualContourModel_Box,Param,"Param",std::vector,""); BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsX,"List of points in the contour",std::vector,""); BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsY,"List of points in the contour",std::vector,""); BBTK_OUTPUT(ManualContourModel_Box,LstContourPointsZ,"List of points in the contour",std::vector,""); BBTK_OUTPUT(ManualContourModel_Box,LstIndexsOut,"Lst number of points by segment",std::vector,""); BBTK_OUTPUT(ManualContourModel_Box,LstPssblIncnsnstntCntrY,"Lst of possible Inconsinstent Contour Y, little contour between two big contour, Difficult for the SIN distribution (DoubleContour 1)",std::vector,""); BBTK_OUTPUT(ManualContourModel_Box,LstPssblIncnsnstntCntrID,"Lst of possible Inconsinstent Contour ID, little contour between two big contour, Difficult for the SIN distribution (DoubleContour 1)",std::vector,""); BBTK_END_DESCRIBE_BLACK_BOX(ManualContourModel_Box); //===== // 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 bbcreaMaracasVisu #endif // __bbcreaMaracasVisuManualContourModel_Box_h_INCLUDED__