예제 #1
0
        public void calculationOFSurface()
        {
            ParametersOfSurface parametersOfSurface = this.getParametersOfSurface();

            parametersOfSurface.setLengthOfPart(Part.getLenghtOfPart());

            DataStructures.CalculationOfSurface.ParametersOperationsForCalculation parametersOperations = getParametersOperationsForCalculation();

            CalculationOfSurface calculationOfSurface = new CalculationOfSurface(parametersOfSurface, parametersOperations);

            ClassesToCalculate.ResultsOfCalculation[] resultsOfCalculation = calculationOfSurface.calculation();

            recordOfResultsOfOperations(resultsOfCalculation);
        }
예제 #2
0
        private DataStructures.CalculationOfSurface.ParametersOperationsForCalculation getParametersOperationsForCalculation()
        {
            this.formationOfLongListWithParametersOfOperation();

            int countLongListOperation = this.getCountLongListOperation();

            double[] surfaceRoughnessRz          = new double[countLongListOperation + 1];;
            double[] kvalitets                   = new double[countLongListOperation + 1];;
            double[] thicknessOfDefectiveCoating = new double[countLongListOperation + 1];;
            double[] coefficientOfRefinement     = new double[countLongListOperation + 1];;

            int[]    idOperation      = new int[countLongListOperation + 1];;
            string[] typeOfInstrument = new string[countLongListOperation + 1];

            ParametersWorkpiece workpiece = Part.getWorkpiece();

            surfaceRoughnessRz[0]          = workpiece.getSurfaceRoughnessRz();
            kvalitets[0]                   = workpiece.getKvalitet();
            thicknessOfDefectiveCoating[0] = workpiece.getThicknessOfDefectiveCoating();

            idOperation[0] = workpiece.getIdWorkpiece();

            double validOffsetSurface = workpiece.getValidOffsetSurface();

            for (int i = 0; i < countLongListOperation; i++)
            {
                ParametersOperation operation = this.parametersOperation[i];

                surfaceRoughnessRz[i + 1]          = operation.getSurfaceRoughnessRz();
                kvalitets[i + 1]                   = operation.getKvalitet();
                thicknessOfDefectiveCoating[i + 1] = operation.getThicknessOfDefectiveCoating();
                coefficientOfRefinement[i + 1]     = operation.getCoefficientOfRefinement();

                idOperation[i + 1] = operation.getIdOperation();

                typeOfInstrument[i + 1] = operation.getTypeOfInstrument();
            }

            typeOfInstrument = changeTypeOfInstrument(typeOfInstrument);

            DataStructures.CalculationOfSurface.ParametersOperationsForCalculation parameters = new DataStructures.CalculationOfSurface.ParametersOperationsForCalculation(surfaceRoughnessRz, kvalitets, thicknessOfDefectiveCoating, coefficientOfRefinement, idOperation, typeOfInstrument, validOffsetSurface);
            return(parameters);
        }
 public CalculationOfSurface(ParametersOfSurface parametersOfPart, DataStructures.CalculationOfSurface.ParametersOperationsForCalculation parametersForCalculation)
 {
     this.parametersOfPart         = parametersOfPart;
     this.parametersForCalculation = parametersForCalculation;
 }