public ParametersOperation(ParametersOperation operation)
 {
     this.typeOfMachining       = operation.getTypeOfMachining();
     this.precisionOfMachining  = operation.getPrecisionOfMachining();
     this.surfaceRoughnessRz    = operation.getSurfaceRoughnessRz();
     this.recommendedIntervalRz = operation.getRecommendedIntervalRz();
     this.idOperation           = operation.getIdOperation();
     this.kvalitet = operation.getKvalitet();
     this.thicknessOfDefectiveCoating = operation.getThicknessOfDefectiveCoating();
     this.coefficientOfRefinement     = operation.getCoefficientOfRefinement();
     this.typeOfInstrument            = operation.getTypeOfInstrument();
 }
Exemplo n.º 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);
        }