Example #1
0
 public Operation(Operation operation)
 {
     this.typeOfMachining          = operation.getTypeOfMachining();
     this.idOperation              = operation.getIdOperation();
     this.typeOfInstrument         = operation.getTypeOfInstrument();
     this.idOnTechnologicalProcess = operation.getIdOnTechnologicalProcess();
 }
Example #2
0
        private static bool includedInTechnologicalProcess(Operation operation)
        {
            int idOperationOntechnologicalProcess = operation.getIdOnTechnologicalProcess();

            List <Operation> technologicalProcess = Part.getSurfaceOnIndex(0).getOperations();

            foreach (Operation operationInTechnologicalProcess in technologicalProcess)
            {
                if (idOperationOntechnologicalProcess == operationInTechnologicalProcess.getIdOnTechnologicalProcess())
                {
                    return(true);
                }
            }

            return(false);
        }
Example #3
0
        private static void changeIdOperationsInSurfaces(Operation operationInTechnologicalProcess, int idOnTechnologicalProcessNew)
        {
            int            countSurfaces = Part.getCountSurfaces();
            List <Surface> surfaces      = Part.getSurfaces();

            int idOnTechnologicalProcessOld = operationInTechnologicalProcess.getIdOnTechnologicalProcess();

            operationInTechnologicalProcess.setIdOnTechnologicalProcess(idOnTechnologicalProcessNew);

            for (int i = 1; i < countSurfaces; i++)
            {
                Surface surface = surfaces[i];

                foreach (Operation operation in surface.getOperations())
                {
                    if (operation.getIdOnTechnologicalProcess() == idOnTechnologicalProcessOld)
                    {
                        operation.setIdOnTechnologicalProcess(idOnTechnologicalProcessNew);
                    }
                }
            }
        }