<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- file date version : 03-07-2020 -->
<Configuration>

//RvAlgoCircle
  double threshold = 1.0e-6;
  int  nbPointsMaxForCenterSearch = 500;
  int  nbPointsMaxForRadiusSearch = 10000;

//RvAlgoCircleDetection
    /** Taille de la cellule de détection: plus la valeur est petite, plus la détection sera positive (mais plus il y aura aussi de faux positifs)
   <br>  A l'inverse, plus le chiffre est élevé, plus le calcul sera rapide mais moins de cylindres seront détectés. 
   <br>TODO: FAIRE BENCHMARK<br> Avec 1mm, presque tous les cylindres sont découverts.
   <br>  Avec 5mm, le taux de découverte passe à xxxx%
    **/
  float circleSearchCellSize = 0.0050f;
  float circleSearchThickness = 0.1f;
  double ratioToleranceDeltaRadius = 0.2;
  int circleSearchNbPointsMin = 20;

//RvAlgoCircleSearchParameters
  double    scoreMaxAllowedForCircleSearch_default = 5e-5;
  int     circleSearchIterMax_default = 50;
  double    circleSearchInnerThreshold_default  = 0.01;
  double    circleSearchOuterThreshold_default  = 1e-5;
  double    radiusMaxAllowedInCircleSearch_default = 2;



//RvAlgoCylinderDetection

    /** Nombre de découpes faites dans le cylindre à rechercher **/
  int nbTryStd = 5;

  /** Longueur minimale du cylindre dans lequel on va essayer de détecter des valeurs. <br>
   * N'est utilisé que dans la recherche par un seul point de pivot (quand la recherche avec un segment échoue, on bascule
   * sur ce mode de recherche) <br> **/
  float lengthMin = 0.2f;

  float searchVolumeSize = 0.5f;
  double scoreMaxAllowedForCircleSearchForSeed = 1e-4;

  /**ATTENTION : le couple (nbPtsMinForRecalculusFitting, regionGrowthNbCellsIncr) est dimensionnant :
     - on lance un fitting à chaque 'nbPtsMinForRecalculusFitting', donc plus cette valeur est petite, plus l'algo va être sollicité **/
  int nbPtsMinForRecalculusFitting = 500;
  int regionGrowthNbCellsIncr = 5;
  int nbIterMinFollowingAFirstAcceptableResult = 30;
  int nbMaxIter = 30;
  float acceptableAngularDeviation = 10.f*(float)Math.PI/180;
  float cylinderSeedLength = 0.2f;
  float radiusExtensionRatio = 1.1f;
  float extensionLength = 2;
  float distanceMoyenneEntrePoints = 3*0.003f;
  float portionAngulaireMin = 45*(float)RvUtilGeom.DEG2RAD;
  double ratioToleranceDesaxage = 0.1;


//RvAlgoDetectionHelper
  int     nbNormalsMinRequiredForDualCalculation_default = 50;
  double    angleThresholdForFlatTest_default = 5*Math.PI/180.0; //Plus cette valeur est petite, plus on est sévère sur le test "zone locale plate" (moins de zones plates seront trouvées)
  double    cosAngleThresholdForFlatTest_default = Math.cos(angleThresholdForFlatTest_default);
  float   voxel1cm = 0.01f; //Attention : si cette valeur est trop petite, le calcul de la normale locale du voxel correspondant sera faux
  double           acceptableNormalScore = RvPointCloudNormalCalculator.NORMAL_SCORE_THRESHOLD_POOR_QUALITY;
  double         seedNormalSearchRadius = 0.1f;
  double         seedNormalSearchNbPointsMinRatio = (float)0.6f;
  double         seedNormalSearchAcceptableAngularDeviation = (float)(5.f*(float)Math.PI/(float)180);




//RvAlgoDetectionHelperCylinder
  int     nbPtsMinPerCylinder_1meter_default = (int)(1e3);
  double    acceptableCylinderFitDistance_default = 5e-3;
  double    acceptableCylinderFitScore_default = acceptableCylinderFitDistance_default*acceptableCylinderFitDistance_default;
  int          stretchActionStopCriteriaWindowNbPtsCloseToTheCylinder_Radius1m_WindowSize10cm_voxelSize1cm = 5000;
  int          stretchActionStopCriteriaWindowNbPtsInsideTheCylinder_Radius1m_WindowSize10cm_voxelSize1cm = 1000;
  double         stretchActionHistoStep = 0.01; //Ce serait bien que ce soit la même valeur que cellSize
  int          stretchActionIncrWindowRange = 10; 
  int          stretchActionNbStepsStopCriteria = 5; //Doit rester plus petit que incrWindowRange
  float        stretchActionRatioDeltaRadiusInside = 0.1f;
  float        stretchActionRatioDeltaRadiusCloseToTheCylinder = 0.1f;


//RvAlgoDetectionHelperPlanarSurface
  float   searchSlabScaleZ = (float)(1e-3);
  float   searchHalfThicknessDefault = 0.04f;

  float          searchSlabSize = 0.4f;
  int            searchNbCellsMinPerForm = 10;
  int            searchNbMosaiksMinPerHole = 20;
  short          searchHalfNbSlabsPerAreaPerAxis = 2;
  float          searchSlabFillRatio = 0.8f;


//RvAlgoPlaneDetection
  float  LARGE_SURFACE_THRESHOLD = 500;
  int   blankPixelsSearchRange = 2;
  double precisionTexture = 0.005;
  double precisionTextureHighQuality = 0.001;
  int maxTextureSizeAllowed = 4096;
  double scalThresholdLocatorRasant = 0.2;



//RvAlgoTexture
  int locatorNbPointsInfluenceMin = 100000;
  double locatorInfluenceRatioThreshold = 0.1;
  int holeAlphaValue = 250;
  int closeDistanceThreshold = 3;
  int nbPixelsSansInfoMaxAllowed = 10000000;



//RvAlgoTubeDetection
  int nbFurtherAwaySteps = 10;
  float searchCubeSizeRatio = 2;



//RvCylinderManager (not used)
  double ratioToleranceRadiusDefault = 0.1;
  double ratioToleranceEcartDefault = 0.1;
  double toleranceEcartAxisDefault = 0.1;



  <item name="offsetPositionPlaneAllowed" type="NUMERIC" value="0.02"/>
  <item name="offsetPositionNormalAllowed" type="NUMERIC" value="0.01"/>
  <!--<item name="offsetAnglePlaneAllowed" type="NUMERIC" value="0.573"/>-->
  <item name="offsetAnglePlaneAllowed" type="NUMERIC" value="3"/>
  <item name="offsetAngleNormalAllowed" type="NUMERIC" value="1"/>
  <item name="offsetDimensionAllowed" type="NUMERIC" value="0.05"/>
  
  <item name="offsetAlignCoupleRailAllowed" type="NUMERIC" value="0.05"/>
  <item name="offsetSpacingCoupleRailAllowed" type="NUMERIC" value="0.005"/>
  <item name="angleParallelismCoupleRailAllowed" type="NUMERIC" value="1"/>
  <item name="offsetPlaneityCoupleRailAllowed" type="NUMERIC" value="0.05"/> 
  
  <item name="offsetSurfacePlaneityAllowed" type="NUMERIC" value="0.002"/>

  <item name="fourreauToleranceUV" type="NUMERIC" value="0.02"/>
  <item name="fourreauToleranceN" type="NUMERIC" value="0.02"/>
  <item name="tremieToleranceUV" type="NUMERIC" value="0.02"/>
  <item name="tremieToleranceN" type="NUMERIC" value="0.02"/>
  <item name="nbPointsInsideTremieThreshold" type="NUMBER" value="100"/>
  <!--<item name="nbPointsInsideTremieThreshold" type="NUMBER" value="100000"/>-->
  
  
  <item name="panelBackgroundColor" type="COLOR3D" value="0 150 0"/>
  
  <!--<item name="panelBackgroundColor" type="COLOR3D" value="250 250 250"/>-->
	
	
  <item name="elementsGCRootGroupName" type="TEXT" value="ELEMENTS GC"/>
  <item name="nbMaxThreadsAllowed" type="NUMBER" value="1"/>
  <item name="structureComplianceDeltaMaxAllowed" type="NUMERIC" value="0.20"/>
  
  <item name="visibilityAngleMax" type="NUMERIC" value="80"/>
  <item name="visibilityAngleVeryGood" type="NUMERIC" value="20"/>
  <item name="visibilityAngleVeryGoodAtShortDistance" type="NUMERIC" value="60"/>
  
  <item name="adjustIntensitiesWhenHighQuality" type="BOOL" value="0"/> 
  <item name="maxTextureSizeAllowed" type="NUMBER" value="4096"/>

  <item name="visibilityDistanceMax" type="NUMERIC" value="20"/>
  <item name="visibilityShortDistanceThreshold" type="NUMERIC" value="5"/>	
  <item name="precisionScan" type="NUMERIC" value="0.003"/>
  <!--<item name="searchAreaRadius" type="NUMERIC" value="1"/>-->
  <item name="searchAreaRadius" type="NUMERIC" value="0.7"/>
  <!--<item name="searchAreaRatio" type="NUMERIC" value="1.5"/>-->
  <!--<item name="searchAreaThickness" type="NUMERIC" value="0.1"/>-->
 <item name="searchAreaThickness" type="NUMERIC" value="0.05"/>
  <!--<item name="localNormalCalculationNbPointsMin" type="NUMBER" value="60"/>-->
  <item name="localNormalCalculationNbPointsMin" type="NUMBER" value="600"/>
  <!--<item name="localNormalCalculationRadiusRatio" type="NUMERIC" value="0.1"/>-->
  <item name="localNormalCalculationRadiusRatio" type="NUMERIC" value="0.15"/>
  <!--<item name="gridInitialCellSizeWRTprecisionScanRatio" type="NUMERIC" value="4"/>-->
  <item name="gridInitialCellSizeWRTprecisionScanRatio" type="NUMERIC" value="2"/>
  <item name="gridDensityRatioMinAllowed" type="NUMERIC" value="0.5"/>
  <item name="gridDensityCalculationSearchRange" type="NUMBER" value="5"/>
  <item name="colorDeviationNeighborhoodRangeInGrid" type="NUMBER" value="2"/>
  <!--
  <item name="colorDeltaAllowed" type="NUMBER" value="5"/>
  <item name="colorDeviationAllowed" type="NUMBER" value="2"/>
  -->
  
  <item name="colorDeltaAllowed" type="NUMBER" value="20"/>
  <item name="colorDeviationAllowed" type="NUMBER" value="10"/>
	
  <item name="intensityAdjustPercentThreshold" type="NUMERIC" value="0.05"/>
	
  <item name="pointeSubpixellique" type="BOOL" value="1"/>
  <item name="manageRailsAsCouples" type="BOOL" value="0"/>
  
  <item name="useSiteAreasInVisibilityCheck" type="BOOL" value="0"/>
 
 
  <item name="embeddingAreaRatioU_couple_rail" type="NUMERIC" value="1.5"/>  
  <item name="embeddingAreaRatioV_couple_rail" type="NUMERIC" value="2"/>   
  <item name="innerAreaRatioU_couple_rail" type="NUMERIC" value="0.8"/>  
  <item name="innerAreaRatioV_couple_rail" type="NUMERIC" value="0.8"/> 
  
  <item name="embeddingAreaRatioU_rail" type="NUMERIC" value="1.5"/>  
  <item name="embeddingAreaRatioV_rail" type="NUMERIC" value="4"/>   
  <item name="innerAreaRatioU_rail" type="NUMERIC" value="1"/>  
  <item name="innerAreaRatioV_rail" type="NUMERIC" value="2"/> 
  
  <item name="embeddingAreaRatioU_platine" type="NUMERIC" value="2"/>  
  <item name="embeddingAreaRatioV_platine" type="NUMERIC" value="2"/>   
  <item name="innerAreaRatioU_platine" type="NUMERIC" value="0.8"/>  
  <item name="innerAreaRatioV_platine" type="NUMERIC" value="0.8"/>  	
	
  <item name="embeddingAreaRatioU_tremie" type="NUMERIC" value="1.5"/>  
  <item name="embeddingAreaRatioV_tremie" type="NUMERIC" value="1.5"/>   
  <item name="innerAreaRatioU_tremie" type="NUMERIC" value="1.5"/>  
  <item name="innerAreaRatioV_tremie" type="NUMERIC" value="1.5"/>  	
		
  <item name="embeddingAreaRatioU_fourreau" type="NUMERIC" value="2"/>  
  <item name="embeddingAreaRatioV_fourreau" type="NUMERIC" value="2"/>   
  <item name="innerAreaRatioU_fourreau" type="NUMERIC" value="2"/>  
  <item name="innerAreaRatioV_fourreau" type="NUMERIC" value="2"/>  

  <item name="fitToPointCloudBorderSize_platine" type="NUMERIC" value="0.03"/>
  <item name="fitToPointCloudBorderSize_rail" type="NUMERIC" value="0.01"/>
  <item name="fitToPointCloudExternalBorder_rail" type="NUMERIC" value="0.05"/>
  <item name="fitToPointCloudAllowedDeltaZ" type="NUMERIC" value="1.0"/>


  <!--
  <item name="embeddingAreaRatioU_couple_rail" type="NUMERIC" value="1.5"/>  
  <item name="embeddingAreaRatioV_couple_rail" type="NUMERIC" value="1.5"/>   
  <item name="innerAreaRatioU_couple_rail" type="NUMERIC" value="0.8"/>  
  <item name="innerAreaRatioV_couple_rail" type="NUMERIC" value="0.8"/> 
  
  <item name="embeddingAreaRatioU_rail" type="NUMERIC" value="1.5"/>  
  <item name="embeddingAreaRatioV_rail" type="NUMERIC" value="2.5"/>   
  <item name="innerAreaRatioU_rail" type="NUMERIC" value="0.8"/>  
  <item name="innerAreaRatioV_rail" type="NUMERIC" value="2"/> 
  
  <item name="embeddingAreaRatioU_platine" type="NUMERIC" value="1.5"/>  
  <item name="embeddingAreaRatioV_platine" type="NUMERIC" value="1.5"/>   
  <item name="innerAreaRatioU_platine" type="NUMERIC" value="0.8"/>  
  <item name="innerAreaRatioV_platine" type="NUMERIC" value="0.8"/>  	
	
  <item name="embeddingAreaRatioU_tremie" type="NUMERIC" value="1.5"/>  
  <item name="embeddingAreaRatioV_tremie" type="NUMERIC" value="1.5"/>   
  <item name="innerAreaRatioU_tremie" type="NUMERIC" value="1.5"/>  
  <item name="innerAreaRatioV_tremie" type="NUMERIC" value="1.5"/>  	
		
  <item name="embeddingAreaRatioU_fourreau" type="NUMERIC" value="1.5"/>  
  <item name="embeddingAreaRatioV_fourreau" type="NUMERIC" value="1.5"/>   
  <item name="innerAreaRatioU_fourreau" type="NUMERIC" value="1.5"/>  
  <item name="innerAreaRatioV_fourreau" type="NUMERIC" value="1.5"/>  		
  -->


  <item name="searchResolutionInDepthBuffer" type="NUMBER" value="1"/>
  <item name="depthBufferQuality" type="TEXT" value="Z"/>
  <item name="precisionScanSousEch" type="NUMBER" value="1"/>
  
  <item name="Platine" type="FILE" value="DAC/treetable/platineAncrage.png"/>
  <item name="ICON_OK" type="FILE" value="DAC/ICONS/ok.png"/>
  <item name="ICON_POK" type="FILE" value="DAC/ICONS/pok.png"/>
  <item name="ICON_ERROR" type="FILE" value="DAC/ICONS/error.png"/>
  <item name="ICON_AUTO" type="FILE" value="DAC/ICONS/auto.png"/>
  <item name="ICON_MANUAL" type="FILE" value="DAC/ICONS/manual.png"/>
  <item name="ICON_IMPORT" type="FILE" value="DAC/ICONS/import.png"/>
  <item name="ICON_GRID" type="FILE" value="DAC/ICONS/grid.png"/>
  <item name="ICON_IMG" type="FILE" value="DAC/ICONS/img.png"/>
  <item name="ICON_EXPORT" type="FILE" value="DAC/ICONS/export.png"/>
  <item name="ICON_UPDATE" type="FILE" value="DAC/ICONS/refresh_blue_big.png"/>
 
</Configuration>
