| Multi-axis CNC machine have complex structure various forms, and flexible movement. Collision always happens during NC machining process, which can’t be prevented by manual work. Collision is an essential problem to be solved. Based on computer graphics technology, this dissertation presented off-line collision detection algorithms and real-time anti-collision strategies for NC machines in any form.The dissertation introduced structure for virtual NC machines based on component-model structure, choosed mesh entity models such as STL model as simulation models and presented programming design method. Based on this analysis of kinematic model was given out to calculate positions of compponents and models. Besides, key technology to realize motion simulation is presented. Collision detection is the key point of this dissertation, in off-line collisin detection section we concentrate on precise and efficient algorithms. After analyzing kinetic characteristic of NC machine and studying different collision algorithms, algorithm based on OBB bounding volume hierarchy finally chosen. Besides, the algorithm was optimized by updating BVH tree partially. Judgement standard of collision is to test wether two triangle intersects, which guarantees the precision of collision detection is the same as precision of model. In the section of real-time anti-collision the key point is to sduty strategies of collision detection. According to the characteristics of auto mode the dissertation presented a strategy which adopted two buffer caches, NC programs which passed collision detecion test can drive the NC machine. For manual mode, a strategy was presented to calculate possible collision positions and response in advance which was realized by doing collision detection in direction of motion in background.The author developed anti-collision system based on algorithms presented in this dissertation and done several experiments on-line and off-line. Results of experiments proves the correctness and feasibility of methods mentioned in this dissertation. |