Programming-free CNC machining method and system based on CAD file and related equipment

Through the program-free CNC machining method based on CAD files, G code and M code are automatically generated, which solves the problems of high programming difficulty, low efficiency and insufficient flexibility in the existing technology, and realizes an efficient and automated CNC machining process.

CN119414779AInactive Publication Date: 2025-02-11SHENZHEN SHANLONG ZHIKONG CO LTD

Patent Information

Application Number
CN202510013149.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing CNC machining technology is difficult to program, low efficiency, error-prone and difficult to correct, lacks flexibility and fast response capabilities, and is difficult to adapt to design changes and small batch customization tasks.

Method used

The program-free CNC processing method based on CAD files is adopted. By obtaining CAD files, the processing graphics information and graphic color information are obtained, the tool information is matched, the path planning is carried out, the G code and M code are generated, and the automatic processing is realized.

Benefits of technology

It reduces the requirements for operator skills, reduces the probability of human errors, improves the degree of automation and efficiency of processing, enhances the ability to respond to design changes, and adapts to small batch customization tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119414779A_ABST
    Figure CN119414779A_ABST
Patent Text Reader

Abstract

The invention discloses a programming-free CNC (Computer Numerical Control) processing method and system based on a CAD (Computer Aided Design) file and related equipment. The method comprises the following steps: acquiring a CAD file of a workpiece to be processed; the CAD file is analyzed, and machining graph information and graph color information of the workpiece to be machined are obtained; processing tool information is obtained through matching based on the graphic color information; path planning is conducted on the basis of the machining graphic information in combination with the machining tool information, and machining path information is obtained; the machining path information is converted into a G code through a preset code conversion program, and the machining tool information is converted into an M code; and processing the to-be-processed workpiece based on the G code and the M code. According to the CNC machining method, an operator only needs to carry out CAD design and mark different machining graphs according to color rules, then generation of a path G code and a tool M code can be automatically achieved, the requirement for the skills of the operator is lowered, and the occurrence probability of human errors is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of CNC machining, and in particular to a programming-free CNC machining method, system and related equipment based on CAD files. Background Art

[0002] In traditional CNC aluminum cutting technology, programming is a key link. Operators need to use professional programming languages ​​(such as G-code, etc.) to write cutting programs according to the shape, size and other requirements of aluminum cutting. This requires operators to have high programming skills and mechanical processing knowledge. For example, when making aluminum parts with complex shapes, programmers need to accurately calculate tool paths, cutting parameters, etc., and then input these instructions into the CNC cutting equipment. Some existing CNC cutting equipment still relies on manual input of dimensions and simple graphic simulation functions. For example, some equipment can perform simple profile cutting by manually entering the length and width of a rectangle, but for cutting tasks with complex curves, irregular shapes or special process requirements, this method seems to be inadequate.

[0003] In summary, the prior art still has the following defects to a greater or lesser extent: (1) High programming difficulty and low efficiency: Professional programmers are required. Traditional programming methods require operators to be familiar with programming languages ​​and programming rules of CNC equipment. This means that companies need to hire professional programmers or provide operators with long-term programming training, which increases labor costs and time costs. It may take a lot of time to write cutting programs for complex shapes. For example, for aluminum parts with complex curves and multiple features, programmers may need to repeatedly debug and modify the program to ensure the accuracy of the tool path, which will seriously affect production efficiency.

[0004] (2) Error-prone and difficult to correct: High risk of human error: Due to the complexity of the programming process, errors are prone to occur when manually writing programs, such as code syntax errors, tool path calculation errors, etc. These errors may result in inaccurate aluminum cutting dimensions, shapes that do not meet requirements, and may even damage tools and equipment.

[0005] Complex error correction: Once an error occurs, the process of locating and correcting the error is also complicated. This is because it is necessary to check every detail of the program code and consider the mutual influence of multiple factors such as equipment parameters and aluminum material characteristics, which increases the uncertainty in the processing process.

[0006] (3) Lack of flexibility and rapid response capabilities: Poor adaptability to design changes: In actual production, customer needs may change frequently, and the product design drawings will also be modified accordingly. Under traditional programming methods, every time the design changes, the program needs to be rewritten or modified, which will extend the production cycle and fail to respond quickly to market changes. Unable to efficiently handle small batch customization tasks: For small batch, multi-variety customized aluminum cutting tasks, the efficiency of traditional programming methods is very low. Because a new program needs to be written each time a different product is cut, the efficiency of the CNC equipment cannot be fully utilized, which increases the production cost per unit product.

[0007] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0008] The present invention provides a programming-free CNC machining method, system and related equipment based on CAD files, aiming to solve the technical problems of high difficulty, low efficiency, easy error and poor flexibility in existing CNC machining programming.

[0009] The first aspect of the present invention provides a programming-free CNC processing method based on a CAD file, comprising the steps of: Obtain the CAD file of the workpiece to be processed; Parsing the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed; Obtaining machining tool information based on the matching of the graphic color information; Perform path planning based on the processing graphic information and in combination with the processing tool information to obtain processing path information; Convert the processing path information into G code and convert the processing tool information into M code by a preset code conversion program; The workpiece to be processed is processed based on the G code and the M code.

[0010] Optionally, in some implementations of the first aspect of the present invention, parsing the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed includes: Performing graphic integrity and correctness verification on the CAD file; If the graphic integrity and correctness check fails, repairing the CAD file; If the graphics integrity and correctness check passes, the CAD file is parsed to determine the position, shape and specification of each processing graphic on the workpiece to be processed; Based on the position, shape and specification of each processing graphic on the workpiece to be processed, obtaining processing graphic information; For each of the processing figures on the workpiece to be processed, obtaining the line color constituting the processing figure or the internal filling color of the processing figure; Graphic color information is obtained based on the line color or the internal filling color of each of the processing graphics on the workpiece to be processed.

[0011] Optionally, in some implementations of the first aspect of the present invention, obtaining machining tool information based on the matching of the graphic color information includes: For each of the processing figures on the workpiece to be processed, obtaining a color identification of the processing figure based on the line color or the internal filling color of the processing figure; Based on the color identification, matching the tool type and parameters of the processing graphic from a preset tool database; The tool type and parameters of each processing graphic on the workpiece to be processed are collected to obtain processing tool information of the workpiece to be processed.

[0012] Optionally, in some implementations of the first aspect of the present invention, performing path planning based on the processing graphic information and in combination with the processing tool information to obtain the processing path information includes: Based on the position, shape and specification of each processing graphic in the processing graphic information, the processing path is planned with the principle of minimizing processing time, minimizing tool idle travel and optimizing processing accuracy to obtain preliminary processing path information; The preliminary processing path information is combined with the processing tool information to optimize the processing path to obtain final processing path information.

[0013] Optionally, in some embodiments of the first aspect of the present invention, the processing path planning is performed based on the position, shape and specification of each processing graphic in the processing graphic information, with minimization of processing time, minimization of tool idle travel and optimization of processing accuracy as criteria, and obtaining preliminary processing path information includes: Based on the position, shape and specification of each processing graphic, the distribution of each processing graphic on the workpiece to be processed is obtained; Determine a processing starting point, and plan processing paths between the processing graphics based on the distance between the processing graphics and the processing starting point and the continuous processing trajectory between the processing graphics; For each of the processing graphics, if the processing graphics is a curve graphic, decomposing the processing graphics into discrete line segments and / or arc segments to perform processing path planning; The processing path planning of each processing graphic and the path planning between each processing graphic are collected to obtain preliminary processing path information.

[0014] Optionally, in some implementations of the first aspect of the present invention, the step of optimizing the preliminary processing path information in combination with the processing tool information to obtain the final processing path information includes: For each machining path in the preliminary machining path information, obtaining a tool type and parameters used in the machining path; Performing tool radius compensation on the machining path, and adjusting the offset of the machining path according to the tool size; Collect each section of the adjusted processing path to obtain final processing path information.

[0015] Optionally, in some implementations of the first aspect of the present invention, the checking of the graphics integrity and correctness of the CAD file includes: Performing breakpoint detection on the graphics in the CAD file; Verifying the integrity of the graphics based on whether there are breakpoints in the graphics in the CAD file; Performing redundant line intersection detection on the graphics in the CAD file; The correctness of the graphics is cross-checked based on whether there are redundant lines in the graphics in the CAD file.

[0016] A second aspect of the present invention provides a programming-free CNC machining system based on a CAD file, comprising: A CAD acquisition module is used to acquire the CAD file of the workpiece to be processed; A file parsing module, used to parse the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed; A tool matching module, used for obtaining processing tool information based on the matching of the graphic color information; A path planning module, used to perform path planning based on the processing graphic information and in combination with the processing tool information to obtain processing path information; A code conversion module, used to convert the processing path information into G code and convert the processing tool information into M code through a preset code conversion program; A processing module is used to process the workpiece to be processed based on the G code and the M code.

[0017] A third aspect of the present invention provides a CAD file-based programming-free CNC numerical control device, the CAD file-based programming-free CNC numerical control device comprising: a memory and at least one processor, the memory storing instructions, the memory and the at least one processor being interconnected via a line; The at least one processor calls the instructions in the memory so that the CAD file-based programming-free CNC numerical control device executes the CAD file-based programming-free CNC processing method as described in any one of the first aspects of the present invention.

[0018] The fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the programming-free CNC machining method based on a CAD file as described in any one of the above-mentioned first aspects of the present invention is implemented.

[0019] Beneficial effects: The present invention discloses a programming-free CNC processing method, system and related equipment based on CAD files. The method includes obtaining a CAD file of a workpiece to be processed; parsing the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed; obtaining processing tool information based on the matching of the graphic color information; performing path planning based on the processing graphic information and in combination with the processing tool information to obtain processing path information; converting the processing path information into G code through a preset code conversion program, and converting the processing tool information into M code; processing the workpiece to be processed based on the G code and the M code. In the CNC processing method of the present invention, the operator only needs to know CAD design and mark different processing graphics according to color rules, and the generation of path G code and tool M code can be automatically realized, which reduces the requirements for operator skills and reduces the probability of human errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The figure is a flow chart of an exemplary CAD file-based programming-free CNC machining method of the present invention.

[0021] Figure 2 This is a schematic diagram of tool-related information in a tool database exemplifying the present invention.

[0022] Figure 3 The present invention is a schematic diagram of a process for matching cutting tools based on the color of graphic objects after inputting a CAD file.

[0023] Figure 4 The figure is a schematic diagram of an exemplary process of planning a processing path in combination with graphic colors according to the present invention.

[0024] Figure 5 The figure is a schematic diagram of the module composition of an exemplary CAD file-based programming-free CNC machining system of the present invention.

[0025] Figure 6 The figure is a schematic structural diagram of a programming-free CNC numerical control device based on a CAD file according to the present invention. DETAILED DESCRIPTION

[0026] The embodiments disclosed in the present invention are described in more detail below with reference to the accompanying drawings. Although certain embodiments disclosed in the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments disclosed in the present invention are only for exemplary purposes and are not intended to limit the scope of protection disclosed in the present invention.

[0027] In the description of the embodiments disclosed in the present invention, if there are terms, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. can refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0028] In the traditional CNC aluminum cutting process, professional programmers are usually required to write complex G-code and other programs according to the cutting requirements to control the operation of the cutting equipment. This process not only requires programmers to have deep programming knowledge and rich machining experience, but also takes a lot of time for programming and debugging, resulting in low production efficiency and prone to human programming errors, affecting cutting quality and accuracy. In addition, when the cutting task changes or it is necessary to cut aluminum of different shapes and sizes, it is often necessary to rewrite the program, further increasing production costs and production cycles.

[0029] In order to solve the technical problems existing in the prior art CNC aluminum cutting mentioned in the above introduction, see Figure 1 In a first aspect, the present invention provides a programming-free CNC processing method based on a CAD file, the CNC processing method includes but is not limited to being used for CNC aluminum cutting, and can also be used in processing scenarios of other materials or processing methods. The programming-free CNC processing method based on a CAD file includes the following steps: S100, obtaining a CAD file of a workpiece to be processed; in the present invention, an operator needs to mark different graphics according to a predetermined color rule during the CAD design stage. For example, in a workpiece to be processed (aluminum workpiece) designed by CAD, a blue graphic represents a groove or contour that needs to be milled, and a red graphic represents an outer frame that needs to be sawed. The present invention matches the image color with the tool, and the system can automatically switch the appropriate tool at different processing stages without manual intervention, thereby improving the automation and efficiency of the processing.

[0030] S200, parsing the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed; in some optional implementations of the first aspect of the present invention, parsing the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed specifically includes: S201, checking the graphics integrity and correctness of the CAD file; this step specifically includes: performing breakpoint detection on the graphics in the CAD file; checking the graphics integrity based on whether there are breakpoints in the graphics in the CAD file; performing redundant line crossing detection on the graphics in the CAD file; and checking the graphics correctness based on whether there are redundant line crossings in the graphics in the CAD file. The present invention checks the integrity and correctness of the graphics in the CAD file and repairs possible minor defects or discontinuous parts, so as to provide accurate and reliable basic data for subsequent path planning and tool mapping.

[0031] S202, if the graphic integrity and correctness check fails, the CAD file is repaired. In the CAD file repair of the present invention, the repair includes filling in the breakpoints and deleting the lines that interfere with the processed graphics, or shifting and correcting the offset of the processed graphics; S203. If the graphics integrity and correctness check passes, the CAD file is parsed to determine the position, shape and specification of each processing graphic on the workpiece to be processed; the information recorded in the CAD file of the present invention includes the contour description of the graphics (i.e., shape and specification, such as the endpoint coordinates of the straight line segment, the center coordinates and radius of the arc, etc.), the topological structure of the graphics (i.e., the position, the connection relationship between each line segment and arc), and possible internal holes, notches and other feature information.

[0032] S204, obtaining processing graphic information based on the position, shape and specification of each processing graphic on the workpiece to be processed. In the present invention, the processing graphic information includes processing graphic information of all processing graphics on the workpiece to be processed; S205. For each of the processing graphics on the workpiece to be processed, the line color constituting the processing graphics or the internal filling color of the processing graphics is obtained. In the present invention, a mapping mechanism is set between the color of the processing graphics and the tool, and the color of the processing graphics can be represented by the filling color in the processing image to indicate the tool information required to be used, or by the line color of the contour of the processing graphics to indicate the tool information required to be used. In some optional implementations, the method of representing the color of the processing graphics can be determined based on the size specifications of the processing graphics. For example, when the size specification of the processing graphics is greater than the preset specification, the line color of the contour of the graphics is used to indicate the tool information required to be used. When the size specification of the processing graphics is less than the preset specification, the filling color in the processing image is used to indicate the tool information required to be used.

[0033] S206. Obtaining graphic color information based on the line color or the internal fill color of each of the processed graphics on the workpiece to be processed. In the present invention, the graphic color information of each of the processed graphics is bound to its corresponding processing graphic information, so that when the processing graphics are processed, the corresponding graphic color information can be quickly found and matched with the tool information. In another optional implementation of this step, after extracting the processing graphic information and the color information of the graphics filled or lines, these graphic information can also be pre-processed, and these color information can be converted into specific color codes or identifiers, and the coordinate data of the processed graphics can be normalized.

[0034] S300, obtaining machining tool information based on the matching of the graphic color information; in this step of the present invention, it is necessary to pre-establish a tool database, which stores detailed information of different tools, including tool type (such as milling cutter, saw blade, etc.), tool size (diameter, length, etc.), tool material, applicable aluminum cutting process and corresponding color identification. This database can be expanded and updated according to actual production needs to adapt to different cutting tasks and tool configurations. The matching tool algorithm can be implemented using a special matching algorithm, which uses the color code extracted from the CAD file as input, searches and matches in the tool database, and once the corresponding color identification is found, the tool information associated with it is extracted, including tool type, size and other parameters, and this information is passed to the machining path planning module to constrain and optimize the cutting path planning.

[0035] An exemplary tool data and graphic color attribute association structure of the present invention may be as follows: Int m_iToolNum; / / tool number integer [1, tool capacity]; Int m_iToolType; / / Tool type 0: Cutter 1: Drill 2: Milling cutter; Int m_iToolRadiusCompensation; / / Tool radius compensation [0, 2], 0: inward offset, 1: outward offset, 2: no offset; Int m_iToolOffsetInwardColor; / / Tool inward offset color representation; Int m_iToolOffsetOutwardColor; / / Tool outward offset color; Int m_iToolNoOffsetColor; / / Tool has no offset color representation; Int m_iToolDrillColor; / / Drill color representation; Int m_iKnifeDirection; / / Select integer [0, 1] for clockwise and counterclockwise, 0: clockwise, 2: counterclockwise; QString m_strAuxiliaryCodeStart; / / Start of auxiliary code; QString m_strAuxiliaryCodeEnd; / / End of auxiliary code; Bool m_bShortestDistanceFirst; / / Shortest distance first; / / Processing parameters Double m_dToolDiameter; / / Tool diameter float type [0, 100] mm; Double m_dProcessingDepth; / / Processing depth floating point type [0, 1000000]; Double m_dDepthEachLayer; / / Depth of each layer: floating point type [0, 1000000]; Double m_dDrillProcessingDepth; / / Drill processing depth floating point type [0, 1000000]; Double m_dDrillDepthEachLayer; / / Drill depth per layer float type [0, 1000000]; Double m_dMillingProcessingDepth; / / milling cutter processing depth floating point type [0, 1000000]; Double m_dMillingDepthEachLayer; / / Milling cutter depth per layer float type [0, 1000000]; Double m_dSpindleSpeed; / / spindle speed float type [1, 99999]; Double m_dFeedRate; / / feed rate float type [1, 99999]; Double m_dCuttingSpeed; / / Cut speed float type [1, maximum speed of Z axis]; Double m_dToolTipDistance; / / Tool tip distance, used for bottom milling function Float type [0, 100] mm; Int m_iMillingMode; / / Milling mode [horizontal line, vertical line, loop, once]; Double m_dToolRetracement; / / Drill tool retraction amount; Double m_dToolSafeDistance; / / Drill safety distance; int m_iDrillWorkingMode; / / Drilling tool working mode [one-shot: drill to the bottom in one go; high speed: after drilling to the depth, retreat to the tool retraction amount and reciprocate; safe: after drilling to the depth, retreat to the safe height and reciprocate]; Int m_iCuttingOrder; / / Cutting order integer [1, 100]; Double m_dToolOffsetX; / / Tool offset X float type [-99999, 99999] mm; Double m_dToolOffsetY; / / Tool offset Y float type [-99999, 99999] mm; Double m_dToolOffsetZ; / / Tool offset Z float type [-99999, 99999] mm; Ulong m_ulProcessGraphicsColor; / / Process graphics color unsigned long integer [0, maximum value]; Double m_dProcessingSpeed; / / Processing speed floating point type [1, maximum speed of X / Y axis]; Double _dKnifeLiftingSpeed; / / Knife lifting speed floating point type [1, maximum speed of Z axis]; Int m_iCutWay; / / Cut way integer [0, 10], 0: straight cut, 1: spiral cut, 2: arc cut, 3~10 reserved; Double m_dFeedAcceleration; / / feed acceleration float type [1, 100000000] S; Double m_dFeedJerk; / / feed acceleration float type [1, 1000000000]; Double m_dTurningAcceleration; / / turning acceleration float type [1, 100000000]; Double m_dKnifeLiftHeight; / / Knife lift height floating point type [-1000000, 1000000]; Int m_iInterExterCut; / / Inter-exter selection integer [0, 1], 0: internal cutting, 2: external cutting; Int m_iKnifePosition; / / Knife position integer [0, 10], 0: lower left corner, 1: lower right corner, 2: upper left corner, 3: upper right corner, 4: customer selected (DXF default starting point); Int m_iSortingMethod; / / Sorting method selection integer [0, 10], 0: default graphic order, 1: Z-shaped, 2: N-shaped, 3: optimal efficiency path sorting.

[0036] In some optional implementations of the first aspect of the present invention, obtaining the machining tool information based on the matching of the graphic color information includes: S301. For each processing graphic on the workpiece to be processed, obtain the color identification of the processing graphic based on the line color or the internal fill color of the processing graphic; in this step, when matching the processing graphic color and tool information, replace the color information with the corresponding color identification, which can be more conveniently searched in the tool database.

[0037] S302, based on the color identification, match the tool type and parameters of the processing graphic from the preset tool database. In the present invention, the tool types include milling cutters, cutters, drills and saw blades, and the tool parameters include tool size (diameter, length, etc.), tool material, applicable aluminum cutting process and corresponding color identification. The exemplary tool information in the tool database of the present invention can be as follows: Figure 2 shown.

[0038] S303, collecting the tool type and parameters of each processing graphic on the workpiece to be processed, and obtaining the processing tool information of the workpiece to be processed. In the processing tool information of the present invention, each processing graphic has its corresponding tool type and parameters, and the processing tool information of each processing graphic is also bound to its corresponding processing graphic information.

[0039] S400, performing path planning based on the processing graphic information and in combination with the processing tool information to obtain processing path information. In the present invention, after extracting the tool information (including tool type, size and other parameters) associated with each processing graphic, the system will pass this information to the cutting path planning module to constrain and optimize the cutting path planning.

[0040] In some optional implementations of step S400 of the present invention, performing path planning based on the processing graphic information and in combination with the processing tool information to obtain the processing path information includes: S401. Based on the position, shape and specification of each processing graphic in the processing graphic information, the processing path is planned with the criteria of minimizing processing time, minimizing tool idle stroke and optimizing processing accuracy, and preliminary processing path information is obtained; in the present invention, the path planning algorithm plans the processing path with the goal of minimizing processing time, reducing tool idle stroke, and improving cutting accuracy and surface quality. For example, for a CAD design composed of multiple independent graphics, the algorithm will determine a reasonable cutting order, give priority to cutting graphics close to the starting point or that can form a continuous cutting trajectory, and reduce the frequent start and stop and moving distance of the tool; for complex curved graphics, the algorithm will discretize them into a series of small line segments or arc segments, and optimize the path connecting these line segments, so that the tool movement is smoother and more continuous, reducing mechanical shock and vibration, and improving the flatness of the cutting surface.

[0041] In some optional embodiments of step S401 of the present invention, the step S401 includes: based on the position, shape and specification of each of the processing graphics, obtaining the distribution of each of the processing graphics on the workpiece to be processed; determining the processing starting point, and planning the processing path between each of the processing graphics based on the distance between each of the processing graphics and the processing starting point and the ability to form a continuous processing trajectory between each of the processing graphics; for each of the processing graphics, if the processing graphics is a curve graphic, decomposing the processing graphics into discrete line segments and / or arc segments for processing path planning; collecting the processing path planning of each of the processing graphics and the path planning between each of the processing graphics to obtain preliminary processing path information.

[0042] S402, optimize the processing path of the preliminary processing path information in combination with the processing tool information to obtain the final processing path information. In the present invention, the tool matching algorithm uses the color identification extracted from the CAD file as input to search and match in the tool database. Once the corresponding color identification is found, the tool information associated with it is extracted, including tool type, size and other parameters, and this information is passed to the cutting path planning module to constrain and optimize the cutting path planning. For example, considering tool radius compensation, adjust the offset of the cutting path according to the tool size to ensure that the actual size after cutting meets the design requirements.

[0043] In some optional embodiments of step S402 of the present invention, the processing path optimization of the preliminary processing path information in combination with the processing tool information to obtain the final processing path information includes: for each processing path in the preliminary processing path information, obtaining the tool type and parameters used in the processing path; performing tool radius compensation on the processing path, and adjusting the offset of the processing path according to the tool size; collecting each adjusted processing path to obtain the final processing path information.

[0044] S500. Convert the processing path information into G code and convert the processing tool information into M code through a preset code conversion program; G code is a language used in CNC programming, which is mainly used to describe the processing information of the machine tool, such as tool path, selection of coordinate system, opening of coolant, etc. It controls the movement and operation of the machine tool through a series of instructions to achieve precise processing control. M code is used to control the auxiliary functions of the machine tool in CNC programming, such as starting and stopping the spindle, switching the coolant, exchanging the tool, etc. In the present invention, after obtaining the processing path information and the processing tool information, the system will use a preset code conversion program to convert these information into code without manual work, and the code conversion can be implemented by an automated script.

[0045] S600, processing the workpiece to be processed based on the G code and the M code. In the present invention, the G code is mainly used to control how the machine tool performs tool movement at each stage, and the M code is used to control which tool the machine tool uses at each stage. The machine tool operator of the present invention only needs to mark different graphics according to the predetermined color rules during the CAD design stage, without manually setting tool parameters and switching tools on the cutting equipment. This greatly simplifies the operation process, reduces the requirements for the professional skills of the operator, and reduces the probability of human error.

[0046] In summary, cooperation Figure 3 and Figure 4 The technical solution of the present invention can be simply understood as follows: 1. After the CAD file is imported, the color recognition module first scans and extracts the graphic colors in the file and generates a color information list.

[0047] 2. The matching algorithm traverses the color information list and searches the tool database for each color code.

[0048] 3. When the matching tool information is found, the relevant parameters of the tool are passed to the cutting path planning module. When planning the tool path, the cutting path planning module will use the characteristic information of the tool to optimize the path, such as considering factors such as tool radius compensation. In the cutting execution stage, the CNC controller controls the tool library to automatically change the tool according to the tool information, and performs the cutting operation according to the planned path. Through this method of matching different tools based on the color of CAD file graphics, the intelligence and automation level of the programming-free CNC aluminum cutting system based on CAD files can be further improved, and the production efficiency and processing quality can be improved. It has broad application prospects in related fields such as aluminum processing.

[0049] In summary, the technical solution of the present invention has the following application scenarios and advantages: (1) Multi-process cutting scenarios: For example, in a CAD-designed aluminum workpiece, the blue graphic represents the groove or contour that needs to be milled, and the red graphic represents the outer frame that needs to be sawed. By matching the color with the tool, the system can automatically switch the appropriate tool at different processing stages without manual intervention, thereby improving the automation and efficiency of the processing.

[0050] (2) Improve processing accuracy and quality: Different tools are suitable for different processing tasks. By accurately matching the color and tool, it can ensure that the most suitable tool is used during the cutting process, thereby improving the cutting accuracy and quality. For example, for fine internal contour processing, use a small, high-precision milling cutter; for large-area material removal, use a larger-sized saw blade, which can avoid processing defects caused by improper tool selection.

[0051] (3) Simplified operation process: Operators only need to mark different graphics according to the predetermined color rules during the CAD design stage, without having to manually set tool parameters and switch tools on the cutting equipment. This greatly simplifies the operation process, reduces the requirements for the professional skills of operators, and reduces the probability of human errors.

[0052] See also Figure 5 The second aspect of the present invention provides a programming-free CNC machining system based on CAD files, comprising: A CAD acquisition module 10 is used to acquire a CAD file of a workpiece to be processed; A file parsing module 20, used to parse the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed; A tool matching module 30, used for obtaining processing tool information based on the matching of the graphic color information; A path planning module 40, configured to perform path planning based on the processing graphic information and in combination with the processing tool information to obtain processing path information; A code conversion module 50, used to convert the processing path information into G code and convert the processing tool information into M code through a preset code conversion program; The processing module 60 is used to process the workpiece to be processed based on the G code and the M code.

[0053] In some optional implementations of the second aspect of the present invention, the file parsing module includes: A graphics verification unit, used to verify the graphics integrity and correctness of the CAD file; A graphics repair unit, used for repairing the CAD file if the graphics integrity and correctness check fails; A processing graphic acquisition unit is used to parse the CAD file to determine the position, shape and specification of each processing graphic on the workpiece to be processed if the integrity and correctness of the graphic pass the verification; A graphic information summarizing unit, used for obtaining processing graphic information based on the position, shape and specification of each processing graphic on the workpiece to be processed; A graphic color acquisition unit, used for acquiring, for each processing graphic on the workpiece to be processed, the color of the lines constituting the processing graphic or the internal filling color of the processing graphic; The color information summarizing unit is used to obtain the graphic color information based on the line color or the internal filling color of each processing graphic on the workpiece to be processed.

[0054] In some optional implementations of the second aspect of the present invention, the tool matching module includes: A color identification acquisition unit, configured to obtain, for each processing graphic on the workpiece to be processed, a color identification of the processing graphic based on the line color or the internal filling color of the processing graphic; A tool matching unit, used for matching the tool type and parameters of the processing graphic from a preset tool database based on the color identification; The tool information summary unit is used to collect the tool type and parameters of each processing graphic on the workpiece to be processed, and obtain the processing tool information of the workpiece to be processed.

[0055] In some optional implementations of the second aspect of the present invention, the path planning module includes: A preliminary path acquisition unit, configured to plan a processing path based on the position, shape and specification of each processing graphic in the processing graphic information, with the principle of minimizing processing time, minimizing tool idle travel and optimizing processing accuracy, and obtain preliminary processing path information; The path optimization unit is used to optimize the preliminary processing path information in combination with the processing tool information to obtain the final processing path information.

[0056] In some optional implementations of the second aspect of the present invention, the preliminary path acquisition unit includes: A graphics distribution acquisition subunit, used for acquiring the distribution of each processing graphic on the workpiece to be processed based on the position, shape and specification of each processing graphic; The inter-graphics path planning subunit is used to determine the processing starting point, and to plan the processing paths between the processing graphics based on the distance between each processing graphic and the processing starting point and the continuous processing trajectory that can be formed between each processing graphic; A graphics path planning subunit, for each of the processing graphics, if the processing graphics is a curve graphics, decomposing the processing graphics into discrete line segments and / or arc segments to perform processing path planning; The path information collection subunit is used to collect the processing path planning of each processing graphic and the path planning between each processing graphic to obtain preliminary processing path information.

[0057] In some optional implementations of the second aspect of the present invention, the path optimization unit includes: A segmented tool information acquisition subunit, used to acquire the tool type and parameters used in each segment of the processing path in the preliminary processing path information; A path compensation subunit, used for performing tool radius compensation on the machining path and adjusting the offset of the machining path according to the tool size; The adjustment path collection subunit is used to collect each section of the adjusted processing path to obtain final processing path information.

[0058] In some optional implementations of the second aspect of the present invention, the graphic verification unit includes: A breakpoint detection subunit, used for performing breakpoint detection on the graphics in the CAD file; A graphics integrity judgment subunit, used for checking the graphics integrity based on whether there are breakpoints in the graphics in the CAD file; A line crossing detection subunit, used for performing redundant line crossing detection on the graphics in the CAD file; The graphic correctness judgment subunit is used to cross-check the graphic correctness based on whether there are redundant lines in the graphic in the CAD file.

[0059] Figure 6 It is a structural schematic diagram of a programming-free CNC numerical control device based on a CAD file provided by an embodiment of the present invention. The programming-free CNC numerical control device 70 based on a CAD file may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 80 (for example, one or more processors) and a memory 90, and one or more storage media 110 (for example, one or more mass storage devices) storing application programs 100 or data. Among them, the memory and the storage medium can be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the programming-free CNC numerical control device based on the CAD file. Furthermore, the processor can be configured to communicate with the storage medium to execute a series of instruction operations in the storage medium on the programming-free CNC numerical control device based on the CAD file.

[0060] The programming-free CNC numerical control device based on CAD files of the present invention may also include one or more power supplies 120, one or more wired or wireless network interfaces 130, one or more input and output interfaces 140, and / or one or more operating systems 150, such as Windows Serve, Mac OS X, Unix, Linux, Free BSD, etc. It can be understood by those skilled in the art that Figure 6 The structure of the programming-free CNC numerical control device based on a CAD file shown does not constitute a limitation of the programming-free CNC numerical control device based on a CAD file, and may include more or less components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0061] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the programming-free CNC machining method based on CAD files.

[0062] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0063] In addition, although each operation is described in a specific order, this should be understood as requiring such operation to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination mode.

[0064] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A programming-free CNC processing method based on CAD files, characterized in that: Includes steps: Obtain the CAD file of the workpiece to be processed; Parsing the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed; Obtaining machining tool information based on the matching of the graphic color information; Perform path planning based on the processing graphic information and in combination with the processing tool information to obtain processing path information; Convert the processing path information into G code and convert the processing tool information into M code by a preset code conversion program; The workpiece to be processed is processed based on the G code and the M code.

2. The programming-free CNC processing method based on CAD files according to claim 1, characterized in that: The step of parsing the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed includes: Performing graphic integrity and correctness verification on the CAD file; If the graphic integrity and correctness check fails, repairing the CAD file; If the graphics integrity and correctness check passes, the CAD file is parsed to determine the position, shape and specification of each processing graphic on the workpiece to be processed; Based on the position, shape and specification of each processing graphic on the workpiece to be processed, obtaining processing graphic information; For each of the processing figures on the workpiece to be processed, obtaining the line color constituting the processing figure or the internal filling color of the processing figure; Graphic color information is obtained based on the line color or the internal filling color of each of the processing graphics on the workpiece to be processed.

3. The programming-free CNC processing method based on CAD files according to claim 2 is characterized in that: The obtaining of machining tool information based on the matching of the graphic color information includes: For each of the processing figures on the workpiece to be processed, obtaining a color identification of the processing figure based on the line color or the internal filling color of the processing figure; Based on the color identification, matching the tool type and parameters of the processing graphic from a preset tool database; The tool type and parameters of each processing graphic on the workpiece to be processed are collected to obtain processing tool information of the workpiece to be processed.

4. The programming-free CNC processing method based on CAD files according to claim 3 is characterized in that: The path planning is performed based on the processing graphic information and combined with the processing tool information to obtain the processing path information, including: Based on the position, shape and specification of each processing graphic in the processing graphic information, the processing path is planned with the principle of minimizing processing time, minimizing tool idle travel and optimizing processing accuracy to obtain preliminary processing path information; The preliminary processing path information is combined with the processing tool information to optimize the processing path to obtain final processing path information.

5. The programming-free CNC processing method based on CAD files according to claim 4 is characterized in that: Based on the position, shape and specification of each processing graphic in the processing graphic information, the processing path planning is performed with the principle of minimizing processing time, minimizing tool idle travel and optimizing processing accuracy, and obtaining preliminary processing path information includes: Based on the position, shape and specification of each processing graphic, the distribution of each processing graphic on the workpiece to be processed is obtained; Determine a processing starting point, and plan processing paths between the processing graphics based on the distance between the processing graphics and the processing starting point and the continuous processing trajectory between the processing graphics; For each of the processing graphics, if the processing graphics is a curve graphic, decomposing the processing graphics into discrete line segments and / or arc segments to perform processing path planning; The processing path planning of each processing graphic and the path planning between each processing graphic are collected to obtain preliminary processing path information.

6. The programming-free CNC processing method based on CAD files according to claim 4 is characterized in that: The step of optimizing the preliminary processing path information in combination with the processing tool information to obtain the final processing path information includes: For each machining path in the preliminary machining path information, obtaining a tool type and parameters used in the machining path; Performing tool radius compensation on the machining path, and adjusting the offset of the machining path according to the tool size; Collect each section of the adjusted processing path to obtain final processing path information.

7. The programming-free CNC processing method based on CAD files according to claim 2, characterized in that: The checking of the graphics integrity and correctness of the CAD file comprises: Performing breakpoint detection on the graphics in the CAD file; Verifying the integrity of the graphics based on whether there are breakpoints in the graphics in the CAD file; Performing redundant line intersection detection on the graphics in the CAD file; The correctness of the graphics is cross-checked based on whether there are redundant lines in the graphics in the CAD file.

8. A programming-free CNC processing system based on CAD files, characterized in that: include: A CAD acquisition module is used to acquire the CAD file of the workpiece to be processed; A file parsing module, used to parse the CAD file to obtain processing graphic information and graphic color information of the workpiece to be processed; A tool matching module, used for obtaining processing tool information based on the matching of the graphic color information; A path planning module, used to perform path planning based on the processing graphic information and in combination with the processing tool information to obtain processing path information; A code conversion module, used to convert the processing path information into G code and convert the processing tool information into M code through a preset code conversion program; A processing module is used to process the workpiece to be processed based on the G code and the M code.

9. A programming-free CNC numerical control device based on CAD files, characterized in that: The CAD file-based programming-free CNC numerical control device comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory so that the CAD file-based programming-free CNC numerical control device executes the CAD file-based programming-free CNC machining method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the programming-free CNC machining method based on a CAD file as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Off line programming tool for industrial robot

    CN101092031A

  • CAM system for automatically controlling machining center according to drawings

    CN117348524A

Cited By

  • Automatic programming system of multi-axis numerical control milling machine

    CN119644918A