Esempio n. 1
0
 public static TableOfTolerancesAndFits getTableOfTolerancesAndFits()
 {
     if (tableOfTolerancesAndFits == null)
     {
         tableOfTolerancesAndFits = new TableOfTolerancesAndFits();
         tableOfTolerancesAndFits = (TableOfTolerancesAndFits)FileToObject.objectFromXML(@"XMLFiles/TableOfTolerancesAndFits.xml", tableOfTolerancesAndFits);
     }
     return(tableOfTolerancesAndFits);
 }
        private void kvalitetToAccuracy()
        {
            int numberOfOperations = this.parametersForCalculation.getNumberOfOperations();

            double[] kvalitets  = this.parametersForCalculation.getKvalitets();
            double[] accuracies = new double[numberOfOperations];

            double diameterOfPart = parametersOfPart.getDiameterOfPart();

            for (int i = 0; i < numberOfOperations; i++)
            {
                TableOfTolerancesAndFits tableOfTolerancesAndFits = Tables.getTableOfTolerancesAndFits();
                double kvalitet = kvalitets[i];
                double accuracy = tableOfTolerancesAndFits.getAccuracy(kvalitet, diameterOfPart);
                accuracies[i] = accuracy;
            }
            this.accuracies = accuracies;
        }