小巨人数控编程视频
#include #include void Merge(int sourceArr[],int tempArr[], int startIndex, int midIndex, int endIndex) { int i = startIndex, j=midIndex+1, k = startIndex; while(i!=midIndex+1 && j!=endIndex+1) { if(sourceArr[i] >= sourceArr[j]) tempArr[k++] = sourceArr[j++]; else tempArr[k++] = sourceArr[i++]; } while(i != midIndex+1) tempArr[k++] = sourceArr[i++]; while(j != endIndex+1) tempArr[k++] = sourceArr[j++]; for(i=startIndex; i<=endIndex; i++) sourceArr[i] = tempArr[i]; } //内部使用递归 void MergeSort(int sourceArr[], int tempArr[], int startIndex, int endIndex) { int midIndex; if(startIndex < endIndex) { midIndex = (startIndex + endIndex) / 2; MergeSort(sourceArr, tempArr, startIndex, midIndex); MergeSort(sourceArr, tempArr, midIndex+1, endIndex); Merge(sourceArr, tempArr, startIndex, midIndex, endIndex); } } int main(int argc, char * argv[]) { int a[8] = {50, 10, 20, 30, 70, 40, 80, 60}; int i, b[8]; MergeSort(a, b, 0, 7); for(i=0; i<8; i++) printf("%d ", a[i]); printf("\n"); return 0; }
怎样学习数控编程
数控编程教学视频地址 G92 X0 Y0 Z0;设定绝对坐标系,刀具位于开始位置(X0,Y0,Z0); N1 G90 G17 G00 G41 D07 X250.0 Y550.0;建立刀具半径补偿; N2 G01 Y900.0 F150; N3 X450.0; N4 G03 X500.0 Y1150.0 R650.0; N5 G02 X900.0 R-250.0; N6 G03 X950.0 Y900.0 R650.0; N7 G01 X1150.0; N8 Y550.0; N9 X700.0 Y650.0; N10 X250.0 Y550.0; N11 G00 G40 X0 Y0;
cnc编程 怎么样学才容易?
一开始不要贪多而全,先解决一下简单的编程问题,有个成就感,再解决较难的问题,增强信心.《工厂数控编程技术实例特训(UG NX6版)》和《PowerMILL10.0数控编程技术实战特训》这些书就是依据这个学习规律来讲述的.如你有兴趣,可以参考一下.希望对你有帮助! ...