[go: up one dir, main page]

CN107290980B - Process simulation method, terminal device and computer-readable storage medium - Google Patents

Process simulation method, terminal device and computer-readable storage medium Download PDF

Info

Publication number
CN107290980B
CN107290980B CN201710560993.1A CN201710560993A CN107290980B CN 107290980 B CN107290980 B CN 107290980B CN 201710560993 A CN201710560993 A CN 201710560993A CN 107290980 B CN107290980 B CN 107290980B
Authority
CN
China
Prior art keywords
code
simulation
original
action event
workpiece
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710560993.1A
Other languages
Chinese (zh)
Other versions
CN107290980A (en
Inventor
刘杰
黄永庞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Guotengan Vocational Education Technology Co ltd
Original Assignee
Shenzhen GTA Education Tech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen GTA Education Tech Ltd filed Critical Shenzhen GTA Education Tech Ltd
Priority to CN201710560993.1A priority Critical patent/CN107290980B/en
Publication of CN107290980A publication Critical patent/CN107290980A/en
Application granted granted Critical
Publication of CN107290980B publication Critical patent/CN107290980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

本发明提供了一种加工仿真的方法、终端设备及计算机可读存储介质,涉及加工仿真技术领域。该方法包括:对原始G代码参照预设格式进行语法检查;语法检查的检查结果若正确,则将原始G代码进行解释后生成动作事件列表;若错误,则将原始G代码参照预设格式进行更改后,重复进行语法检查,直至检查结果正确;根据触发的动作从动作事件列表内匹配相应的动作事件,将匹配得到的动作事件发送给仿真端进行模型加工演示。本发明通过将不同格式的G代码更改为格式统一的G代码格式,并输出给3D仿真端进行加工演示,增强了3D仿真端的兼容性,方便不同源G代码输入该3D仿真端即可查看工件加工过程,减少了配置不同源设备的成本。

Figure 201710560993

The invention provides a processing simulation method, a terminal device and a computer-readable storage medium, and relates to the technical field of processing simulation. The method includes: performing a grammar check on the original G code with reference to a preset format; if the check result of the grammar check is correct, interpreting the original G code to generate an action event list; if it is wrong, performing the original G code with reference to the preset format. After the change, repeat the syntax check until the check result is correct; match the corresponding action event from the action event list according to the triggered action, and send the matched action event to the simulation terminal for model processing demonstration. The present invention enhances the compatibility of the 3D simulation terminal by changing the G codes of different formats into a unified format G code format, and outputs it to the 3D simulation terminal for processing demonstration, and it is convenient for different source G codes to be input to the 3D simulation terminal to view the workpiece. The processing process reduces the cost of configuring different source equipment.

Figure 201710560993

Description

Machining simulation method, terminal device and computer-readable storage medium
Technical Field
The invention belongs to the technical field of machining simulation, and particularly relates to a machining simulation method, terminal equipment and a computer readable storage medium.
Background
The G code is a machining instruction in the numerical control program, and is also called a G instruction, and can be used to directly drive a machine tool and various control systems. Because the format of the G code is not set to be a unified standard, a plurality of manufacturers on the market have a plurality of G code development formats. Therefore, different three-dimensional (3D) demonstration terminals are needed for analyzing and simulating the machining instructions represented by the G codes for different G codes, and a 3D demonstration terminal capable of integrating multiple G codes for machining simulation does not exist.
The above problems are urgently needed to be solved.
Disclosure of Invention
The invention provides a machining simulation method, terminal equipment and a computer-readable storage medium, aiming at the defects that different G codes require different 3D demonstration terminals to analyze and simulate machining instructions represented by the G codes and a 3D demonstration terminal capable of integrating multiple G codes for machining simulation does not exist.
A first aspect of an embodiment of the present invention provides a machining simulation method, including:
carrying out syntax check on the original G code by referring to a preset format;
if the checking result of the grammar checking is correct, the original G code is interpreted to generate an action event list; if the G code is wrong, the original G code is changed according to a preset format, and grammar check is repeatedly carried out until a check result is correct;
and matching corresponding action events from the action event list according to the triggered actions, and sending the action events obtained by matching to a simulation end for model processing demonstration.
Further, before syntax checking is performed on the original G code with reference to a preset format, the method includes:
the original G code is received and saved.
Further, the original G code is interpreted to generate an action event list, which includes:
interpreting the original G code to generate a plurality of action events;
a number of action events are placed into the event manager in the order of occurrence of the events.
Further, the action event obtained by matching is sent to a simulation end for model processing demonstration, and the method comprises the following steps:
processing the three-dimensional coordinate points of the cutter to form a cutter height map;
processing the three-dimensional coordinate points of the workpiece prototype to form a workpiece prototype height map;
projecting the tool height map onto the workpiece prototype height map to form a deformed workpiece height map;
and generating a deformed workpiece according to the height map of the deformed workpiece and demonstrating the deformed workpiece.
Further, after the corresponding action event is matched from the action event list according to the triggered action and the matched action event is sent to the simulation terminal for demonstration, the method comprises the following steps:
and coloring the surface of the model for demonstration by the simulation end.
A second aspect of an embodiment of the present invention provides a machining simulation apparatus, including:
the checking module is used for checking the grammar of the original G code according to a preset format;
the generating module is used for judging whether the checking result of the grammar checking is correct or not, interpreting the original G code and then generating an action event list; if the G code is wrong, the original G code is changed according to a preset format, and grammar check is repeatedly carried out until a check result is correct;
and the machining demonstration module is used for matching corresponding action events from the action event list according to the triggered actions and sending the action events obtained by matching to the simulation end for model machining demonstration.
Further, the generating module specifically includes:
the interpretation unit is used for interpreting the original G code to generate a plurality of action events;
and the placing unit is used for placing a plurality of action events into the event manager according to the occurrence sequence of the events.
Further, the apparatus further comprises:
and the coloring module is used for coloring the surface of the model which is demonstrated by the simulation end.
A third aspect of an embodiment of the present invention provides a machining simulation terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the following steps when executing the computer program:
carrying out syntax check on the original G code by referring to a preset format;
if the checking result of the grammar checking is correct, the original G code is interpreted to generate an action event list; if the G code is wrong, the original G code is changed according to a preset format, and grammar check is repeatedly carried out until a check result is correct;
and matching corresponding action events from the action event list according to the triggered actions, and sending the action events obtained by matching to a simulation end for model processing demonstration.
A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium for machining simulation, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:
carrying out syntax check on the original G code by referring to a preset format;
if the checking result of the grammar checking is correct, the original G code is interpreted to generate an action event list; if the G code is wrong, the original G code is changed according to a preset format, and grammar check is repeatedly carried out until a check result is correct;
and matching corresponding action events from the action event list according to the triggered actions, and sending the action events obtained by matching to a simulation end for model processing demonstration.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: according to the invention, the G codes with different formats are changed into the G code format with a uniform format, and the G codes are output to the 3D simulation end for processing demonstration, so that the compatibility of the 3D simulation end is enhanced, different source G codes can be conveniently input into the 3D simulation end to check the processing process of the workpiece, and the cost for configuring different source equipment is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart illustrating an implementation of a method for machining simulation according to an embodiment of the present invention;
FIG. 2 is a system architecture diagram of the method of machining simulation provided in FIG. 1;
FIG. 3 is a flow chart of a scenario application of the method of machining simulation provided in FIG. 1;
FIG. 4 is a schematic flow chart illustrating an implementation of a method for machining simulation according to another embodiment of the present invention;
FIG. 5 is a schematic block diagram of an apparatus for process simulation provided by an embodiment of the present invention;
fig. 6 is a schematic diagram of a terminal device for machining simulation according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
FIG. 1 is a schematic flow chart illustrating an implementation of a method for machining simulation according to an embodiment of the present invention; FIG. 2 is a system architecture diagram of the method of machining simulation provided in FIG. 1; FIG. 3 is a scenario application flow diagram of the method of machining simulation provided in FIG. 1. As shown in fig. 1 to fig. 3, an execution subject of the present embodiment is a 3D demonstration terminal, and the machining simulation method provided by the present embodiment may include:
101. carrying out syntax check on the original G code by referring to a preset format;
specifically, the original G code needs to be received and saved first before syntax checking with reference to a preset format is performed on the original G code. The original G code saved here is different source G code developed by various manufacturers on the market. The preset format is a unified format for storing the G code specified by the presentation terminal, for example, the G code is deleted with irrelevant information such as blank line, space, comment, start mark, end mark, etc., and only keyword information is left. The preset format is not limited herein.
It should be noted that there are many 3D presentation terminals on the market, and the description is given by taking unity3D as the 3D presentation terminal in this embodiment.
102. If the checking result of the grammar checking is correct, the original G code is interpreted to generate an action event list; if the G code is wrong, the original G code is changed according to a preset format, and grammar check is repeatedly carried out until a check result is correct;
specifically, the generating of the action event list after the original G code is interpreted includes: interpreting the original G code to generate a plurality of action events; a number of action events are placed into the event manager in the order of occurrence of the events. Further, a cnc (computer numerical control) numerical control system is an abbreviation of a numerical control system, executes a part or all of numerical control functions according to a control program stored in a computer memory, and is provided with a dedicated computer system of an interface circuit and a servo drive device. The G code may be compiled in a CNC code compiler. In this embodiment, the CNC code compiler is packaged as a DLL file and embedded in a script code editor of U3D (Universal 3D graphics format). The format of the input original G code is determined by calling a syntax checking function in the CNC code compiler.
If the format is judged to be wrong, the input original G code format is not consistent with the preset format, and the format is judged again after the format is required to be changed into the format specified by the preset format. If the format is judged to be correct, the input original G code has no grammar and logic errors, and then the G code is read line by line in a new file. The G code in the new file is processed standard G code referring to a preset format, and irrelevant information such as blank lines, spaces, comments, start marks, end marks and the like is deleted. After each line of processed G code is transmitted to a CNC code compiler, the compiler interprets and translates the G code and finally delivers the G code to a U3D demonstration terminal in the form of an event list.
Further, each line of G code may be translated into multiple instructions that are placed into the event manager in the order in which the actions occur. After the translation is completed, the CNC code compiler automatically triggers the first instruction, and the action corresponding to the instruction is implemented in the U3D interface (if the action instruction exists in U3D). After the action is completed, U3D takes over the event manager, triggers the next instruction and implements its action or function, and so on until all events and instructions are completed. And then sending the next line of G codes to a CNC code compiler, and repeating the process until all the G codes are processed and stored in a preset format.
103. And matching corresponding action events from the action event list according to the triggered actions, and sending the action events obtained by matching to a simulation end for model processing demonstration.
Specifically, the working actions of the simulation end in model processing demonstration are shown in the following table:
Figure BDA0001347080610000061
Figure BDA0001347080610000071
the deformation process of the workpiece is demonstrated, and a tool for cutting the workpiece is selected. The cutting tool is a tool used for cutting in machine manufacturing, and is also called as a cutting tool. Most knives are machine-operated and also hand-operated. Since tools used in machine manufacturing are basically used for cutting metal materials, the term "tool" is generally understood to mean a metal cutting tool. The types of the cutters are various, and the proper cutters are selected according to the machining shapes of the parts.
Further, the action event obtained by matching is sent to a simulation end for model processing demonstration, and the method comprises the following steps: processing the three-dimensional coordinate points of the cutter to form a cutter height map; processing the three-dimensional coordinate points of the workpiece prototype to form a workpiece prototype height map; projecting the tool height map onto the workpiece prototype height map to form a deformed workpiece height map; and generating a deformed workpiece according to the height map of the deformed workpiece and demonstrating the deformed workpiece. And further, extracting three-dimensional coordinate points of the cutter, and projecting the cutter onto a virtual plane by methods of invalid elimination, position conversion, scaling conversion, rotating set points and the like to form a cutter height map. And generating a dynamic workpiece prototype height map by using the three-dimensional coordinate points of the workpiece prototype, and setting the normal of the workpiece prototype and the coordinates of the literary sketch. And the subsequent workpiece deformation operation projects the cutter height map onto the workpiece height map, a new deformed workpiece height map is formed through height conversion, and a new deformed workpiece is formed through the deformed workpiece height map. Wherein, the process of deforming the workpiece comprises the whole process that the blank workpiece is regularly cut and gradually becomes a part in the machining and cutting process.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The method provided by the embodiment can be seen that the method changes the G codes with different formats into the G code format with a uniform format and outputs the G codes to the 3D simulation end for processing demonstration, so that the compatibility of the 3D simulation end is enhanced, different source G codes can be conveniently input into the 3D simulation end to check the processing process of the workpiece, and the cost for configuring different source equipment is reduced.
FIG. 4 is a schematic flow chart illustrating an implementation of a method for machining simulation according to another embodiment of the present invention; as shown in fig. 4, the execution subject in this embodiment is a 3D demonstration terminal, and after the action event provided in this embodiment is matched with the corresponding action event from the action event list according to the triggered action and the matched action event is sent to the simulation end for demonstration, the method may further include:
401. and coloring the surface of the model for demonstration by the simulation end.
Specifically, the contour of the workpiece after deformation is not obvious, and the actual effect is difficult to be highlighted. In this case, a color separation means is used to generate a texture with a bright color profile by the height difference of each coordinate point in the height map of the deformed workpiece, and the texture is attached to the deformed workpiece.
Compared with the previous embodiment, the present embodiment can clearly observe the deformation effect of the actual workpiece by adding the surface texture to the workpiece.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
FIG. 5 is a schematic block diagram of an apparatus for process simulation provided by an embodiment of the present invention; as shown in fig. 5, the execution subject of the present embodiment is a 3D demonstration terminal, and the apparatus for machining simulation provided by the present embodiment may include:
a checking module 51, configured to perform syntax checking on the original G code with reference to a preset format;
the generating module 52 is configured to interpret the original G code and generate an action event list if the checking result of the syntax checking is correct; if the G code is wrong, the original G code is changed according to a preset format, and grammar check is repeatedly carried out until a check result is correct;
and the machining demonstration module 53 is configured to match a corresponding action event from the action event list according to the triggered action, and send the action event obtained through matching to the simulation end for model machining demonstration.
It should be noted that, since each module in the system provided in the embodiment of the present invention is based on the same concept as that of the embodiment of the method of the present invention, the technical effect brought by the embodiment of the method of the present invention is the same as that of the embodiment of the method of the present invention, and specific contents may be referred to the description in the embodiment of the method of the present invention, and are not described herein again.
The device provided by the embodiment also shows that the invention changes the G codes with different formats into the G code format with a uniform format and outputs the G codes to the 3D simulation end for processing demonstration, thereby enhancing the compatibility of the 3D simulation end, facilitating the input of different source G codes into the 3D simulation end to check the processing process of the workpiece and reducing the cost for configuring different source equipment.
Fig. 6 is a schematic diagram of a terminal device for machining simulation according to an embodiment of the present invention. As shown in fig. 6, the terminal device 6 of the machining simulation of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in the memory 61 and executable on the processor 60, such as a computer program for implementing a method of machining simulation. The processor 60, when executing the computer program 62, implements the steps in the various method embodiments of the machining simulation described above, such as the steps 101-104 shown in FIG. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the various modules/units in the above-described apparatus embodiments, such as the functions of the modules 51 to 54 shown in fig. 5.
The invention proposes a computer program 62 for implementing a method of machining simulation, comprising: carrying out syntax check on the original G code by referring to a preset format; if the checking result of the grammar checking is correct, the original G code is interpreted to generate an action event list; if the G code is wrong, the original G code is changed according to a preset format, and grammar check is repeatedly carried out until a check result is correct; and matching corresponding action events from the action event list according to the triggered actions, and sending the action events obtained by matching to a simulation end for model processing demonstration. The computer program 62 may be divided into one or more modules/units, which are stored in the memory 61 and executed by the processor 60 to implement the present invention. One or more of the modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal device 6 for machining simulation. For example, the computer program 62 may be divided into a synchronization module, a summarization module, an acquisition module, and a return module (a module in a virtual device), each of which functions specifically as follows:
the terminal device 6 for processing simulation may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal equipment for machining simulation may include, but is not limited to, a processor 60, and a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of the process simulation terminal device 6 and does not constitute a limitation of the process simulation terminal device 6 and may include more or fewer components than shown, or some components in combination, or different components, e.g., the process simulation terminal device 6 may also include input-output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the machining simulation terminal device 6, such as a hard disk or a memory of the machining simulation terminal device 6. The memory 61 may also be an external storage device of the simulation terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the simulation terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the machining simulation terminal device 6. The memory 61 is used to store computer programs and other programs and data required for processing the simulated terminal device 6. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the embodiments of the present invention may also be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (9)

1.一种加工仿真的方法,其特征在于,包括:1. a method for machining simulation, is characterized in that, comprises: 对原始G代码参照预设格式进行语法检查,所述预设格式为演示终端指定的G代码保存的统一的格式,所述原始G代码为不同源G代码;Syntax checking is performed on the original G code with reference to a preset format, the preset format is a unified format stored by the G code specified by the demonstration terminal, and the original G code is a different source G code; 所述语法检查的检查结果若正确,则将所述原始G代码进行解释后生成动作事件列表;若错误,则将所述原始G代码参照所述预设格式进行更改后,重复进行语法检查,直至检查结果正确;If the inspection result of the grammar check is correct, then the original G code is interpreted to generate an action event list; if it is wrong, the grammar check is repeated after the original G code is modified with reference to the preset format, until the inspection result is correct; 根据触发的动作从所述动作事件列表内匹配相应的动作事件,将匹配得到的所述动作事件发送给仿真端进行模型加工演示;Match the corresponding action event from the action event list according to the triggered action, and send the matched action event to the simulation terminal for model processing demonstration; 所述将匹配得到的所述动作事件发送给仿真端进行模型加工演示,包括:The described action event obtained by matching is sent to the simulation terminal for model processing demonstration, including: 将刀具的三维坐标点提取出来,经过无效剔除,位置转换,缩放转换,旋转付点方法,将刀具投影到一张虚拟平面上,形成一张刀具高度图;Extract the three-dimensional coordinate points of the tool, and project the tool on a virtual plane to form a tool height map after invalid elimination, position conversion, scaling conversion, and rotation pay point method; 将工件原型的三维坐标点进行处理后也生成一张动态的工件原型高度图,并设置好工件原型的法线和文理贴图坐标;After processing the three-dimensional coordinate points of the workpiece prototype, a dynamic workpiece prototype height map is also generated, and the normal and texture map coordinates of the workpiece prototype are set; 将所述刀具高度图投影到所述工件原型高度图上通过高度换算形成变形工件高度图;Projecting the height map of the tool onto the height map of the workpiece prototype and converting the height to form a height map of the deformed workpiece; 根据所述变形工件高度图生成变形工件并演示出来。The deformed workpiece is generated according to the height map of the deformed workpiece and demonstrated. 2.如权利要求1所述的加工仿真的方法,其特征在于,所述对原始G代码参照预设格式进行语法检查之前,所述方法还包括:2. The method for machining simulation as claimed in claim 1, wherein before the grammar check is performed to the original G code with reference to the preset format, the method further comprises: 接收并保存所述原始G代码。The raw G-code is received and saved. 3.如权利要求1所述的加工仿真的方法,其特征在于,所述将所述原始G代码进行解释后生成动作事件列表,包括:3. The method for machining simulation as claimed in claim 1, characterized in that, generating an action event list after interpreting the original G code, comprising: 将所述原始G代码进行解释生成若干动作事件;Interpret the original G code to generate several action events; 将所述若干动作事件按事件的发生顺序放置到事件管理器。The several action events are placed in the event manager in the order in which the events occur. 4.如权利要求1所述的加工仿真的方法,其特征在于,所述根据触发的动作从所述动作事件列表内匹配相应的动作事件,将匹配得到的所述动作事件发送给仿真端进行演示之后,所述方法还包括:4. The method for machining simulation as claimed in claim 1, wherein the corresponding action event is matched from the action event list according to the triggered action, and the action event obtained by matching is sent to the simulation terminal for carrying out After the demonstration, the method further includes: 所述仿真端对所述进行演示的模型的表面上色。The simulation end paints the surface of the model being demonstrated. 5.一种加工仿真的装置,其特征在于,包括:5. A device for machining simulation, characterized in that, comprising: 检查模块,用于对原始G代码参照预设格式进行语法检查,所述预设格式为演示终端指定的G代码保存的统一的格式,所述原始G代码为不同源G代码;The checking module is used to perform syntax checking on the original G code with reference to a preset format, where the preset format is a unified format saved by the G code specified by the demonstration terminal, and the original G code is a different source G code; 生成模块,用于判定所述语法检查的检查结果若正确,则将所述原始G代码进行解释后生成动作事件列表;若错误,则将所述原始G代码参照所述预设格式进行更改后,重复进行语法检查,直至检查结果正确;The generation module is used to determine that if the check result of the grammar check is correct, then the original G code is interpreted to generate an action event list; if it is wrong, the original G code is modified with reference to the preset format , repeat the grammar check until the check result is correct; 加工演示模块,用于根据触发的动作从所述动作事件列表内匹配相应的动作事件,将匹配得到的所述动作事件发送给仿真端进行模型加工演示,具体为,将刀具的三维坐标点提取出来,经过无效剔除,位置转换,缩放转换,旋转付点方法,将刀具投影到一张虚拟平面上,形成一张刀具高度图;将工件原型的三维坐标点也生成一张动态的工件原型高度图,并设置好工件原型的法线和文理贴图坐标;将所述刀具高度图投影到所述工件原型高度图上通过高度换算形成变形工件高度图;根据所述变形工件高度图生成变形工件并演示出来。The processing demonstration module is used to match the corresponding action event from the action event list according to the triggered action, and send the matched action event to the simulation terminal for model machining demonstration, specifically, extracting the three-dimensional coordinate point of the tool Out, after invalid elimination, position conversion, scaling conversion, and rotating pay point methods, the tool is projected on a virtual plane to form a tool height map; the three-dimensional coordinate points of the workpiece prototype are also generated. A dynamic workpiece prototype height map, and set the normal and texture map coordinates of the workpiece prototype; project the height map of the tool onto the height map of the workpiece prototype to form a height map of the deformed workpiece through height conversion; generate the deformed workpiece according to the height map of the deformed workpiece Demonstrate it. 6.如权利要求5所述的加工仿真的装置,其特征在于,所述生成模块,具体包括:6. The device for machining simulation according to claim 5, wherein the generating module specifically comprises: 解释单元,用于将所述原始G代码进行解释生成若干动作事件;an interpretation unit for interpreting the original G code to generate several action events; 放置单元,用于将所述若干动作事件按事件的发生顺序放置到事件管理器里。The placing unit is used for placing the several action events into the event manager in the order of occurrence of the events. 7.如权利要求5所述的加工仿真的装置,其特征在于,所述装置还包括:7. The device for machining simulation according to claim 5, wherein the device further comprises: 上色模块,用于所述仿真端对所述进行演示的模型的表面上色。The coloring module is used for the simulation end to color the surface of the model for demonstration. 8.一种加工仿真的终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至4任一项所述方法。8. A terminal device for processing simulation, comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the computer program when executing the computer program A method as claimed in any one of claims 1 to 4. 9.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至4任一项所述方法。9 . A computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 1 to 4 when the computer program is executed by a processor. 10 .
CN201710560993.1A 2017-07-11 2017-07-11 Process simulation method, terminal device and computer-readable storage medium Active CN107290980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710560993.1A CN107290980B (en) 2017-07-11 2017-07-11 Process simulation method, terminal device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710560993.1A CN107290980B (en) 2017-07-11 2017-07-11 Process simulation method, terminal device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN107290980A CN107290980A (en) 2017-10-24
CN107290980B true CN107290980B (en) 2021-08-03

Family

ID=60100545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710560993.1A Active CN107290980B (en) 2017-07-11 2017-07-11 Process simulation method, terminal device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN107290980B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303105B (en) * 2023-05-23 2023-08-08 中科航迈数控软件(深圳)有限公司 Automatic checking method, device, equipment and medium for control codes of numerical control machine tool

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206467A (en) * 2006-12-22 2008-06-25 南京理工大学 General NC code analysis method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2445814A1 (en) * 1974-09-25 1976-04-08 Siemens Ag DEVICE FOR CORRECTING AND / OR ADDING INFORMATION THAT CAN BE REMOVED FROM A MECHANICAL DATA MEDIUM
CN100474189C (en) * 2007-03-15 2009-04-01 天津钢管集团股份有限公司 Threading machine cycle processing method for turning hook-tooth thread
CN101436051A (en) * 2007-11-16 2009-05-20 北京数码大方科技有限公司 Method for switching and checking numerical control machining code
CN100557536C (en) * 2007-12-28 2009-11-04 中国地质大学(武汉) Multi-station numerical control system dedicated for sculpture
CN102023613A (en) * 2010-12-29 2011-04-20 广西工学院 Five-axis linkage numerical control (NC) machining post processor and processing method thereof
CN103048952B (en) * 2013-01-22 2016-04-27 北京数码大方科技股份有限公司 The verification method of machine tooling code, Apparatus and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206467A (en) * 2006-12-22 2008-06-25 南京理工大学 General NC code analysis method

Also Published As

Publication number Publication date
CN107290980A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
CN109189619B (en) I2C bus compatibility test method, system, storage medium and equipment
CN112818457A (en) BIM (building information modeling) model intelligent generation method and system based on CAD (computer-aided design) drawing
CN104985939B (en) A kind of laser marking machine control method and laser marking machine
CN112256670A (en) Data migration method, terminal device and readable storage medium
EP4283441B1 (en) Control method, device, equipment and storage medium for interactive reproduction of target object
EP3506168A1 (en) Method, apparatus, and computer readable medium for processing image
CN112270146A (en) Process design toolkit development method and device, electronic equipment and storage medium
JP2017084082A (en) Simulation device, test scenario file creation method, and test method using test scenario file
CN112949003B (en) Part measuring method, device, equipment and storage medium
CN109542398B (en) Business system generation method and device and computer readable storage medium
CN107290980B (en) Process simulation method, terminal device and computer-readable storage medium
CN114896161A (en) File construction method and device based on artificial intelligence, computer equipment and medium
CN110633258A (en) Log insertion method, device, computer device and storage medium
CN117892665B (en) Modeling simulation method, device, medium and equipment based on circuit system level model
CN204406148U (en) Generate the system of numerically-controlled machine machining control data
US20160371402A1 (en) Layout synthesis of a three-dimensional mechanical system design
CN111353335A (en) Method for converting control layer logic diagram into simulation system configuration file
JP2010225053A (en) Numerical analysis result report preparation method and system, and program
CN111199086A (en) Three-dimensional geometric discretization processing system
JP4803447B2 (en) CAD system and program implemented in this system
CN115170765A (en) Model processing system, method and device
TW202228000A (en) Augmented reality processing auxiliary system and the usage method thereof
CN112596536A (en) Method, product, storage medium and electronic device for clustering unmanned aerial vehicle performance pictures
CN115221604A (en) A simulation modeling method, device, equipment and storage medium for vehicle parts
JPH05225290A (en) Shape correction system by three dimensional parametric function

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 12th Floor, Building A4, Nanshan Zhiyuan, 1001 Xueyuan Avenue, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Guotaian Educational Technology Co., Ltd.

Address before: 518000 Checkpoint, Nantou, Shenzhen, Guangdong Province, 30 Building 3, Zhiheng Industrial Park, Gate 2, Nanshan District, Shenzhen

Applicant before: GTA INFORMATION TECHNOLOGY CO., LTD. (GTA)

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210929

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Patentee after: Shenzhen guotengan Vocational Education Technology Co.,Ltd.

Address before: 518000 12th Floor, Building A4, Nanshan Zhiyuan, 1001 Xueyuan Avenue, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN GTA EDUCATION TECH Ltd.