| With the proposed action plan of "Made in China 2025",the traditional manufacturing method is undergoing profound changes.The virtual reality-based CNC simulation technology provides new ideas for manufacturing and has great research value.At present,most of the control simulation systems on the market use the C/S architecture development method,and the internal functions of CNC simulation system are complicated,which leads to the problems of low efficiency,low universality and poor compatibility of CNC simulation system development.Therefore,the development of a set of WebGL development platform for the development of CNC simulation system is very important for modern CNC training and virtual manufacturing.At the same time,the development of WebGL technology and Internet technology provides technical support for the development of virtual reality on the browser.In this paper,on the basis of WebGL technology,combined with the development characteristics of CNC simulation system,the development requirements of WebGL development platform for CNC simulation system are divided into two aspects: functional and non-functional,and the modular design idea is adopted to design and package the universal basic components and functional modules required for the development of CNC simulation system,and finally the Fanuc CNC simulation system is developed on this platform,and The practicality of the CNC simulation system developed by using this platform is verified through application testing,which can provide ideas for the research of other WebGL development platforms.The main research contents of this paper are as follows:(1)The overall architecture of the WebGL development platform for CNC simulation system is determined by dividing the development requirements into functional and non-functional for CNC simulation system.(2)For the platform commonality base components,the common components required for the development of the virtual CNC simulation system are realized through the secondary packaging based on Babylon.js framework and the design of reusable buttons.In order to provide a universal development language for the development platform,an open motion control method based on spreadsheet is designed to take the scene object of the CNC simulation system as an object,use the state to represent the functional logic relationship of the object,and use the trigger and response to serialize the specific state changes to realize the complex logic invocation relationship,which reduces the development threshold of the CNC simulation system and improves the development efficiency.(3)For NC code parsing,the abstract factory and builder patterns are introduced to realize the combination of various NC code parsing modules and various NC systems,the NC code parsing module is designed using regular expressions(.NET Regex class)to realize the parsing and compilation of NC programs,and the refinement of cutting segments is realized by using linear interpolation and circular interpolation of cutting segments. |