Automatic programming method and device for glass bottle mold processing, electronic equipment and medium

By integrating two-dimensional drawings into a three-dimensional model and using preset feature recognition and process template library to generate five-axis machining paths, the problems of low programming efficiency and poor quality consistency of glass bottle molds are solved, and efficient and automated machining program generation is realized.

CN122018439APending Publication Date: 2026-05-12BEIJING JINGDIAO GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING JINGDIAO GRP CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Current technologies for glass bottle mold processing are inefficient in terms of programming, rely on personal experience, have poor quality consistency and are prone to errors, and make it difficult to transfer knowledge.

Method used

By integrating two-dimensional engineering drawings into three-dimensional contours, identifying machining features based on preset feature recognition rules, matching preset process template libraries to generate five-axis machining paths, using machine tool built-in macro programs for position compensation, and generating complete machining program code.

Benefits of technology

The automated programming of glass bottle mold processing has been realized, which has improved programming efficiency, reduced reliance on human experience, and ensured the stability and consistency of processing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122018439A_ABST
    Figure CN122018439A_ABST
Patent Text Reader

Abstract

The invention provides an automatic programming method and device for glass bottle mold machining, electronic equipment and a medium, and relates to the technical field of machining numerical control programming, and the method comprises the steps: integrating multiple views in a two-dimensional engineering drawing into a three-dimensional contour, and recognizing machining features in the three-dimensional contour based on a preset feature recognition rule; based on the preset workpiece position detection path template, arranging detection points of the glass bottle mold in a machine tool coordinate system; the machining features are matched to corresponding templates in a preset feature technology template library, a five-axis machining path is calculated based on the corresponding templates, and machining program codes containing compensation parameters are generated. According to the method and device, drawing integration, feature recognition, detection point arrangement and machining path generation are automatically completed, and finally machining program codes containing compensation parameters are output; the programming efficiency of die machining is improved, the dependence on personnel experience is reduced, and the consistency and precision of machining quality are greatly guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of CNC programming technology for machining, and in particular to an automatic programming method, apparatus, electronic device and medium for glass bottle mold processing. Background Technology

[0002] In the manufacturing process of glass bottle molds, computer-aided manufacturing software is a key tool for generating CNC machining programs. To achieve specific blowing functions and structural requirements, glass bottle molds are typically designed with a variety of complex and intricate mold features on their surfaces, such as concave centers, tendrils, air grooves, and Haver pins.

[0003] In related technologies, programmers need to manually identify and extract the more than ten mold features one by one in computer-aided manufacturing software based on two-dimensional design drawings. This method has disadvantages such as low programming efficiency, a large amount of repetitive work, programming quality relying on personal experience, poor consistency and proneness to errors, high technical threshold, and difficulty in knowledge transfer.

[0004] Therefore, how to improve the programming efficiency of mold processing, reduce reliance on personnel experience, and ensure the stability and consistency of processing quality has become a technical problem that the industry urgently needs to solve. Summary of the Invention

[0005] This application provides an automatic programming method, apparatus, electronic device, and storage medium for glass bottle mold processing, which addresses the technical problem of how to improve the programming efficiency of mold processing, reduce reliance on human experience, and ensure the stability and consistency of processing quality.

[0006] This application provides an automatic programming method for glass bottle mold processing, including: The multiple views in the two-dimensional engineering drawings of the glass bottle mold are integrated into a three-dimensional outline, and the processing features in the three-dimensional outline are identified based on preset feature recognition rules. Based on the preset workpiece position detection path template, the detection points of the glass bottle mold in the machine tool coordinate system are arranged, and the detection point coordinates, measurement sequence and compensation parameters are generated. The machining features are matched to the corresponding templates in the preset feature process template library. Based on the corresponding templates, the five-axis machining path is calculated, and the machining program code of the glass bottle mold containing the compensation parameters is generated.

[0007] In some embodiments, integrating multiple views from the two-dimensional engineering drawings of the glass bottle mold into a three-dimensional outline includes: Based on the view crosshairs in the two-dimensional engineering drawings, identify the top view and the right view; Rotate the top view to the right by a preset angle and translate it to the origin of the coordinate system; Identify the geometric center point of the right view, translate it to the origin of the coordinate system with the geometric center point as the base point, rotate the right view clockwise around the first coordinate axis by a preset angle, and then rotate it counterclockwise around the second coordinate axis by a preset angle. The right view and the top view are aligned and combined in three-dimensional space to obtain the three-dimensional outline.

[0008] In some embodiments, the step of identifying the processing features in the three-dimensional contour based on preset feature recognition rules includes: Based on preset feature recognition rules, the geometric relationships and / or color attributes of graphic elements in the three-dimensional contour are identified, and the processing features in the three-dimensional contour are determined. Assign unique colors and unique layers to the identified processing features according to feature type.

[0009] In some embodiments, the compensation parameters are generated based on the following steps: The machine tool's built-in custom macro program is invoked based on the coordinates of the detection points and the measurement sequence. The system receives the compensation parameters generated by the customized macro program; the customized macro program performs actual detection based on the coordinates of the detection point, and calculates the compensation parameters based on the detection results.

[0010] In some embodiments, the preset feature process template library is used to store the processing process parameters of processing features of various feature types; The machining process parameters include tool type, cutting parameters, machining strategy, extension amount, and machining depth.

[0011] In some embodiments, the step of matching the processing features to a corresponding template in a preset feature process template library, calculating a five-axis processing path based on the corresponding template, and generating processing program code for the glass bottle mold containing the compensation parameters includes: Based on the exclusive color and exclusive layer of the processing feature, the feature image of the processing feature is mapped to the corresponding template in the preset feature process template library; The five-axis machining path of the machining feature is calculated based on the path algorithm embedded in the corresponding template, and the compensation parameters are integrated to generate the machining path of the glass bottle mold in the machine tool. Based on the processing path, the processing program code for the glass bottle mold is generated.

[0012] In some embodiments, generating the processing program code for the glass bottle mold based on the processing path includes: Perform path verification on the processing path; If the path verification passes, the processing program code for the glass bottle mold is generated.

[0013] This application provides an automatic programming device for glass bottle mold processing, comprising: The drawing processing and feature generation module is used to integrate multiple views in the two-dimensional engineering drawings of glass bottle molds into a three-dimensional outline, and to identify the processing features in the three-dimensional outline based on preset feature recognition rules. The rapid detection point placement module is used to arrange the detection points of the glass bottle mold in the machine tool coordinate system based on the preset workpiece position detection path template, and generate the detection point coordinates, measurement sequence and compensation parameters. The processing path module is used to match the processing features to the corresponding templates in the preset feature process template library, calculate the five-axis processing path based on the corresponding templates, and generate the processing program code of the glass bottle mold containing the compensation parameters.

[0014] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the automatic programming method for glass bottle mold processing.

[0015] This application provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the automatic programming method for glass bottle mold processing.

[0016] The automatic programming method, apparatus, electronic equipment, and storage medium for glass bottle mold processing provided in this application automatically complete the following steps based on standardized two-dimensional drawings of the glass bottle mold: drawing integration, feature recognition, matching preset workpiece position detection path templates to arrange detection points, matching preset feature process template libraries to generate processing paths, and finally outputting complete processing program code with compensation parameters. This highly automates the most time-consuming and error-prone steps in traditional programming, such as drawing understanding, feature extraction, workpiece alignment, and process setting. It frees programmers from a large amount of repetitive labor, reducing programming time from several hours to tens of minutes, improving the programming efficiency of mold processing, and reducing reliance on human experience. Due to the use of standardized process templates and precise position compensation, the consistency and accuracy of processing quality are greatly guaranteed. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the automatic programming method for glass bottle mold processing provided in this application.

[0020] Figure 2 This is a schematic diagram of the two-dimensional engineering drawings provided in this application.

[0021] Figure 3 This is a schematic diagram of the automatic programming device for glass bottle mold processing provided in this application.

[0022] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps, units, or modules is not necessarily limited to those explicitly listed, but may include other steps, units, or modules not explicitly listed or inherent to such processes, methods, products, or devices.

[0025] In order to address the shortcomings of related technologies, Figure 1 This is a flowchart illustrating the automatic programming method for glass bottle mold processing provided in this application, as shown below. Figure 1 As shown, the method includes steps 110, 120 and 130.

[0026] Step 110: Integrate the multiple views in the two-dimensional engineering drawings of the glass bottle mold into a three-dimensional contour, and identify the processing features in the three-dimensional contour based on the preset feature recognition rules.

[0027] Specifically, the executing entity of the automatic programming method for glass bottle mold processing provided in this application is an automatic programming device or system for glass bottle mold processing. This device can be implemented through software, such as an automatic programming program or plugin for glass bottle mold processing; it can also be a device that executes the automatic programming method for glass bottle mold processing, such as a terminal, computer, or server. The method provided in this application is applicable to CNC machining of various types of molds. The following embodiments will use glass bottle mold processing as an example for illustration.

[0028] Two-dimensional engineering drawings are standard industrial drawings that describe the geometry of glass bottle molds. Their format can be, but is not limited to, DXF (Drawing Exchange Format). These drawings typically contain multiple views, such as top view, front view, left view, and right view, to fully express the three-dimensional structure of the mold from different angles.

[0029] Integration into a 3D contour refers to aligning and combining multiple views in a 2D plane through spatial transformations (such as translation and rotation) in a 3D coordinate system to reconstruct a digital 3D geometric model of the glass bottle mold, i.e., its 3D contour. This integration process can be automatically aligned based on predefined reference points, baselines, or view bounding boxes in the drawings, or it can be completed with user-assisted specification of key corresponding points. Its purpose is to transform discrete 2D view information into a unified and complete 3D data model, providing a geometric foundation for subsequent feature recognition and path calculation.

[0030] After obtaining the 3D contour, the system automatically identifies the machining features contained within it based on preset feature recognition rules. Here, machining features refer to geometric structural units on the mold that have specific functions and require mechanical processing (such as milling, drilling, etc.) to form. In the field of glass bottle mold technology, these machining features can be, but are not limited to, recesses, tendrils, air grooves, Haver pins, waste troughs, R-shaped nail grooves, etc.

[0031] Predefined feature recognition rules are a set of predefined logical judgment conditions used to search for and identify combinations of geometric elements that meet specific conditions in a 3D contour. These rules can be based on the following factors: (1) geometric attributes, such as identifying a circular hole of a specific diameter, a groove of a specific width, or a surface with a specific curvature. (2) topological relationships, such as identifying three parallel line segments, identifying another surface tangent to a certain surface, or identifying a closed coil. (3) non-geometric attributes, such as drawings following specific specifications and using specific colors, layers, or line types to represent different types of processing features. In this case, the recognition rules can directly read these non-geometric attributes for quick classification. For example, the rule can be defined as "all red curves on the 'air groove' layer are identified as air groove processing features".

[0032] By performing this step, the system can parse a complex three-dimensional contour that was originally composed of only points, lines, and surfaces into a set of meaningful features to be processed, thereby replacing the tedious work of manually identifying and picking features one by one in traditional programming.

[0033] Step 120: Based on the preset workpiece position detection path template, arrange the detection points of the glass bottle mold in the machine tool coordinate system, and generate the detection point coordinates, measurement sequence and compensation parameters.

[0034] Specifically, the preset workpiece position detection path template is a set of one or more pre-stored standardized detection strategies. Each template corresponds to a typical detection scheme for one type or class of molds. The template contains multiple pre-made detection paths or detection point groups, such as points for determining the position of the Haver pin, points for locating the internal cavity, etc.

[0035] These templates are designed to constrain the workpiece's six degrees of freedom (translation in three directions and rotation in three axes) in space with the fewest possible probe points. Specifically, three points are manually placed on the Haver surface to define a plane that restricts idling rotation, two points are taken on the right end face of the product to construct a two-dimensional straight line that restricts surface rotation, and the origin of the workpiece coordinate system is determined by placing points according to actual needs, thereby achieving precise positioning of the workpiece in the machine tool coordinate system.

[0036] The process of setting up probe points involves the system automatically selecting a suitable probe path template from a template library, either automatically or with user guidance, based on the type or structure of the glass bottle mold. Subsequently, the system maps the logical probe points defined in that template to specific locations on the current mold's 3D contour. Users can quickly select the probe points to be placed through the interface.

[0037] After the detection points are set up, the system will generate the detection point coordinates, measurement sequence, and compensation parameters.

[0038] The coordinates of a probe point refer to the three-dimensional coordinates of each probe point in the ideal model coordinate system.

[0039] The measurement sequence is used to specify the order in which the probes on the machine tool should contact these detection points.

[0040] Compensation parameters are a set of key data used to correct the deviation between the actual and theoretical positions of a glass bottle mold (workpiece). There are several ways to generate compensation parameters. One method is for the system to generate intermediate program code. When this code is executed on the machine tool, it calls the machine tool's built-in macro program. The macro program drives the probe to complete the actual measurement and calculate the compensation value in real time, then updates the machine tool's working coordinate system. Another method is to include variables in the generated program code to store the compensation values. The values ​​of these variables will be filled in after the machine tool performs the actual measurement.

[0041] This step automatically generates a detection program to accurately determine the actual position of the glass bottle mold in the machine tool, eliminating the need for programmers to have professional measurement knowledge. This enables rapid and accurate positioning of the glass bottle mold, laying the foundation for subsequent high-precision processing.

[0042] Step 130: Match the machining features to the corresponding templates in the preset feature process template library, calculate the five-axis machining path based on the corresponding templates, and generate the machining program code for the glass bottle mold containing compensation parameters.

[0043] Specifically, the system matches each identified machining feature with a template in a preset feature process template library. This library is a database storing standardized, optimized machining process schemes for various machining features. Each template in the library defines in detail all the process information required to machine a specific feature, such as: the type of tool to be used (e.g., ball end mill, flat end mill), cutting parameters (e.g., spindle speed, feed rate), machining strategy (e.g., contour milling, reciprocating milling, projection machining), machining extension, and machining depth.

[0044] The matching process involves finding the most suitable processing solution for each identified processing feature from a pre-defined feature process template library. This matching can be based on the feature's type name (e.g., matching the identified "air groove" feature to the "air groove processing" template in the library), or on the feature's geometric dimensions or other attributes assigned during the identification phase. The system can automatically pick up the processing area based on the feature's dedicated layer (e.g., "air groove processing area") or color, and link it to the corresponding process template, triggering automatic calculations.

[0045] After a successful match, the system will calculate the five-axis machining path based on the corresponding template. The system calls the path generation algorithm embedded in the template and the preset process parameters, and combines them with the specific geometry (size, position, contour) of the current machining feature to automatically calculate the detailed trajectory of the tool center point or tool tip point under five-axis linkage motion.

[0046] Finally, the system generates machining program code for the glass bottle mold, including compensation parameters. The system converts the five-axis machining path calculated in the previous step into instruction code (usually G-code) that can be recognized and executed by CNC machine tools of a specific brand and model. The generated code includes instructions related to the compensation parameters at the beginning or in appropriate locations. These instructions precisely adjust the machine tool's working coordinate system to the actual position of the glass bottle mold before machining begins.

[0047] The automatic programming method for glass bottle mold processing provided in this application automatically integrates the standardized two-dimensional drawings of the glass bottle mold, identifies features, matches preset workpiece position detection path templates to realize the placement of detection points, matches preset feature process template libraries to generate processing paths, and finally outputs complete processing program code with compensation parameters. It achieves a high degree of automation in the most time-consuming and error-prone aspects of traditional programming, such as drawing understanding, feature extraction, workpiece alignment, and process setting. It frees programmers from a lot of repetitive labor, making it possible to shorten programming time from several hours to tens of minutes, improving the programming efficiency of mold processing and reducing dependence on human experience. Due to the use of standardized process templates and precise position compensation, the consistency and accuracy of processing quality are greatly guaranteed.

[0048] It should be noted that each implementation method of this application can be freely combined, rearranged, or executed individually, and does not need to rely on or depend on a fixed execution order.

[0049] In some embodiments, integrating multiple views in a two-dimensional engineering drawing of a glass bottle mold into a three-dimensional outline includes: Identify the top view and right view based on the crosshairs in 2D engineering drawings; Rotate the top view to the right by a preset angle and translate it to the origin of the coordinate system; Identify the geometric center point of the right view, translate it to the origin of the coordinate system with the geometric center point as the base point, rotate the right view clockwise around the first coordinate axis by a preset angle, and then rotate it counterclockwise around the second coordinate axis by a preset angle. Align and combine the right view and the top view in three-dimensional space to obtain the three-dimensional outline.

[0050] Specifically, Figure 2 This is a schematic diagram of the two-dimensional engineering drawings provided in this application, such as... Figure 2 As shown, view crosshairs can be understood as baselines or center lines used in drawings to assist in positioning and distinguishing different view areas. They are usually composed of two long, perpendicular straight lines.

[0051] After importing 2D engineering drawings, the system first performs view recognition. By scanning all graphic elements in the drawing, it locates the crosshairs according to preset rules. For example, the rules can be defined as "searching for horizontal and vertical lines with a length exceeding a certain threshold within a specific area of ​​the drawing", or "identifying lines with a specific color or located on a specific layer as crosshairs".

[0052] After locating the crosshairs, the system can identify the corresponding view based on their relative positions on the drawing. For example, it can be pre-defined that the area enclosed by the crosshairs in the upper half of the drawing is the top view, while the area enclosed by the crosshairs in the lower half is the right view. For instance, using the crosshairs as a reference, the system captures the top view by scanning 100 mm to the left and right with the upper crosshair, and the right view by scanning 100 mm to the left and right with the lower crosshair, accurately separating the graphic data of the top and right views.

[0053] The system will perform a series of spatial transformations on the identified view to position it in three-dimensional space. This process is divided into independent transformations of the top view and the right view.

[0054] After identifying the top view, the system performs a rigid body transformation on it. The preset angle is typically set according to engineering drawing standards; in one specific embodiment, this angle is 90 degrees. Operationally, the system rotates the top view 90 degrees to the right (clockwise) around the intersection of the top view and the crosshairs, or its geometric center, and then translates it so that this rotation center coincides with the origin of the 3D coordinate system. The purpose of this operation is to standardize the placement of the top view on a reference plane of the 3D coordinate system, such as the XY plane.

[0055] For the right view, the system first analyzes its geometry to find a stable reference point. In a typical scenario of a glass bottle mold, the right view usually contains a circular outline, so the center of the largest circle in the right view can be identified and used as the geometric center point. Using this geometric center point as the base point, the entire right view is translated to the origin of the coordinate system. Then, two consecutive rotation operations are performed. The first and second coordinate axes are two orthogonal axes of a three-dimensional Cartesian coordinate system, such as the Y-axis and X-axis. The preset angle can also be set to 90 degrees. Specifically, the translated right view is first rotated 90 degrees clockwise around the Y-axis, and then 90 degrees counterclockwise around the X-axis. The combined effect of this series of operations is equivalent to rotating the right view, originally located in the XY plane, to the correct spatial orientation parallel to the XZ or YZ plane.

[0056] Since the transformation steps described above all use the origin of the coordinate system as a common reference, once the top view and the right view have completed their respective transformations, they are automatically aligned in three-dimensional space. At this point, the system can use the geometric information of the two views to combine them. For example, the system can extract X and Y coordinate information from the top view and Z coordinate (i.e., height or depth) information from the right view. By combining this information, a complete wireframe model or surface model that expresses the true three-dimensional structure of the mold can be constructed, i.e., the final three-dimensional contour.

[0057] The automatic programming method for glass bottle mold processing provided in this application embodiment can fully automate the integration process of two-dimensional drawings, avoiding problems such as view misalignment and rotation angle errors that may occur in manual operation. It ensures that the generated three-dimensional contours are standard, consistent and accurate each time, providing a reliable data foundation for subsequent high-precision processing feature recognition and path calculation, thereby significantly improving the stability and reliability of the entire automated programming process.

[0058] In some embodiments, identifying processing features in a three-dimensional contour based on preset feature recognition rules includes: Based on preset feature recognition rules, the geometric relationships and / or color attributes of graphic elements in the 3D contour are identified to determine the processing features in the 3D contour. Assign unique colors and unique layers to the identified processing features according to feature type.

[0059] Specifically, preset feature recognition rules are used to transform the drawing interpretation experience of senior process engineers into computer-executable logical judgments. The rules make full use of the geometric relationships and color attributes of graphic elements to achieve accurate capture of processing features.

[0060] After obtaining the three-dimensional outline, the system automatically extracts and generates graphics of various processing features from the assembled drawing (three-dimensional outline) according to preset feature recognition rules.

[0061] In one specific embodiment, geometric relationships can be relied upon for identification alone.

[0062] Taking air groove identification as an example, the system can automatically determine the type of inner and outer sides based on the coordinates of the center of the circle, and generate processing line segments of different lengths and directions accordingly.

[0063] In another specific embodiment, identification can be based on the number of geometric elements.

[0064] Take a garbage chute as an example. The garbage chute may be composed of a curve or a surface. The recognition rule can be set to an adaptive mode: "The system picks up the curves that make up the garbage chute in the specified area. If the number of picked curves is 1, the curve processing flow is executed; if the number of picked curves is greater than 1, the surface construction flow is automatically executed." In another specific embodiment, relying solely on geometric relationships or color attributes may not be sufficient to uniquely identify a feature; a combination of both can be used for identification.

[0065] Taking the identification of concave features as an example, the preset feature identification rule can be defined as: "Identify three parallel red midline lines in the 3D contour with a length error within 90% range." Once the system finds such a set of line segments, it will further perform geometric construction operations. For example, the minimum and maximum x-coordinates (Xmin and Xmax) of the three lines are averaged to ensure consistent length and consistent start and end points on the X-axis. A curve is constructed by two three-point circular arcs, and a concave surface is generated by sweeping the red straight line with the minimum y-coordinate (Ymin).

[0066] After successfully identifying a processing feature, the system will immediately mark and classify the feature to facilitate subsequent processing and manual verification.

[0067] The system maintains a preset layer and color allocation scheme. Once a feature is identified, the system assigns a dedicated layer and color to distinguish the processing area.

[0068] Assigning a dedicated layer means moving all the geometric elements (points, lines, and surfaces) that make up the feature to a dedicated layer named after its feature type. For example, all the geometry that makes up the "Concave" feature would be placed in a layer called "Concave Processing Domain"; all the geometry that makes up the "Garbage Ditch" would be placed in the "Garbage Ditch Processing Domain" layer.

[0069] Assigning a specific color means assigning a specific color to the geometric elements of that feature. For example, setting the machining line segment of the "air groove (inner side)" to blue and the machining line segment of the "air groove (outer side)" to yellow.

[0070] This integrated "type-layer-color" management system offers significant technological advantages. By structurally reorganizing the 3D model according to processing characteristics, it replaces the chaotic state of traditional models where all geometric elements are mixed in a few layers. This not only makes the model visually clear and identifiable, but more importantly, it provides a machine-readable basis for subsequent automated process matching. In subsequent steps, the system does not need to perform complex geometric analysis again; it can accurately identify the processing object by simply querying the layer name (e.g., "read all surfaces in the 'Concave Machining Domain' layer") or color attribute, greatly simplifying the programming logic and improving processing speed and reliability.

[0071] The automatic programming method for glass bottle mold processing provided in this application successfully solves the problem of accuracy and robustness of feature recognition in automated programming by defining refined recognition rules that integrate geometric and color information, as well as subsequent systematic layer and color allocation strategies.

[0072] In some embodiments, the compensation parameters are generated based on the following steps: The machine tool's built-in custom macro program is invoked based on the coordinates of the detection points and the measurement sequence; Receive compensation parameters generated by a custom macro program; the custom macro program performs actual detection based on the coordinates of the detection point and calculates compensation parameters based on the detection results.

[0073] Specifically, based on the preset workpiece position detection path template, the system arranges a series of logical detection points on the three-dimensional contour of the glass bottle mold, and generates the detection point coordinates in the theoretical model coordinate system and the recommended measurement sequence.

[0074] The method in this application does not directly calculate the compensation parameters, but generates a special program code. This code acts as an instruction issuer to call and drive a set of customized macro programs pre-installed inside the machine tool control system.

[0075] The system will output the calculated 3D coordinates of each detection point and the measurement sequence information in a specific format. In the final generated machining program code, the system will insert a standard macro program call instruction to pass information such as the file path of the detection point coordinates and the number of detection points.

[0076] A custom macro program is a high-level program that runs on a machine tool's CNC system. It can be pre-written by a professional according to the detection logic provided by the methods in this application's embodiments and installed into the machine tool. This macro program is the task executor, possessing the ability to directly control the physical movement of the machine tool probe and trigger measurements.

[0077] When the code containing the aforementioned macro program call instructions runs on the machine tool, control of the machine tool is temporarily transferred to the customized macro program. At this time, the macro program will perform the following series of automated operations: (1) Read the probe point data. The macro program will read the previously stored theoretical coordinates and measurement sequence of the probe points according to the parameters provided by the calling instruction.

[0078] (2) To perform the actual detection, the macro program will control the probe to move to the vicinity of each theoretical detection point one by one according to the measurement sequence, and then feed at a relatively slow speed until the sensor of the probe contacts the workpiece surface and triggers a signal. Once triggered, the machine tool will immediately lock the absolute coordinates of the probe tip at this time. This process will be repeated for all preset detection points.

[0079] (3) Calculate the compensation parameters. After obtaining the actual three-dimensional coordinates of all probe points in the machine tool coordinate system, the macro program will compare and analyze these actual coordinates with the previously read theoretical coordinates. Through calculation, the macro program can accurately calculate the translational and rotational deviations of the theoretical coordinate system relative to the machine tool coordinate system. This set of deviation values ​​is the compensation parameter defined in this application.

[0080] (4) Apply or return compensation parameters. After calculating the compensation parameters, the macro program usually directly executes the machine tool's coordinate system setting instructions and writes the calculated deviation value into a specified working coordinate system. In this way, the entire working coordinate system is translated and rotated to perfectly match the actual position and posture of the workpiece.

[0081] After the macro program finishes execution, control is returned to the main program, which then continues to execute subsequent machining instructions. At this point, all machining paths will be executed in this precisely compensated new coordinate system.

[0082] Alternatively, macro programs can write the calculated compensation parameter values ​​into a set of public variables, which can then be read and used by the main program later.

[0083] The automatic programming method for glass bottle mold processing provided in this application fully utilizes the advantages of the machine tool itself as the most accurate measuring tool. By calling macro programs, the position compensation calculation task is sent to the machine tool for execution. This not only greatly improves the accuracy of compensation, but also makes the entire detection and compensation process completely transparent and automated for the operator, achieving the effect of "arbitrary clamping and accurate processing". It significantly reduces the skill requirements for operators and can be operated without professional programming experience.

[0084] In some embodiments, the preset feature process template library is used to store the processing process parameters of processing features of various feature types; Machining process parameters include tool type, cutting parameters, machining strategy, extension amount, and machining depth.

[0085] Specifically, the preset feature process template library is a collection used to store processing solutions for different feature types. In the field of glass bottle mold manufacturing, these feature types cover more than ten geometric structures with specific functions, such as concave centers, whiskers, air grooves, Haver pins, waste troughs, and R-shaped nail grooves. The template library pre-configures a complete processing solution for each or each type of such processing feature.

[0086] In this embodiment, the core content of each template stored in the template library is the machining process parameters corresponding to that feature. These parameters are a series of specific values ​​and options defining how to perform the cutting process, mainly including but not limited to: (1) Tool type: This parameter defines the specific information of the tool required to perform the machining task.

[0087] (2) Cutting parameters: This set of parameters defines the dynamic physical parameters in the machining process, which directly affect machining efficiency, surface quality and tool life.

[0088] (3) Machining strategy: This parameter defines the algorithm for generating the tool path and the overall motion mode. For example, the inner air groove adopts the projection machining strategy, while the outer air groove adopts the direct milling strategy.

[0089] (4) Extension amount: This parameter is used to define the extension distance of the tool path at the boundary of the machining area.

[0090] (5) Machining Depth: This parameter explicitly defines the final depth to which the feature needs to be machined. This value can be an absolute depth relative to a reference plane or a relative depth relative to the pick geometry. For example, a "tentacle" machining template may specify a machining depth of 0.8 mm; while a "recessed" feature template may have a machining depth precisely controlled at 0.07 mm.

[0091] The automatic programming method for glass bottle mold processing provided in this application transforms the complex process decision-making process into a simple template matching and calling process by constructing a preset feature process template library. This not only greatly simplifies the operation of programmers and eliminates the problem of inconsistent processes caused by differences in personal experience, but also ensures that each product can achieve the expected processing quality and precision by solidifying the optimal parameters. This achieves the standardization and automation of the processing technology and improves the overall production efficiency and quality stability.

[0092] In some embodiments, the machining features are matched to corresponding templates in a preset feature process template library, a five-axis machining path is calculated based on the corresponding template, and machining program code for a glass bottle mold containing compensation parameters is generated, including: Based on the exclusive colors and exclusive layers of the processing features, the feature images of the processing features are mapped to the corresponding templates in the preset feature process template library; The five-axis machining path of the machining features is calculated based on the path algorithm embedded in the corresponding template, and the compensation parameters are integrated to generate the machining path of the glass bottle mold in the machine tool. Based on the processing path, generate the processing program code for the glass bottle mold.

[0093] Specifically, the system employs dedicated recognition logic for different processing features (points, lines, and surfaces). For example, based on the geometric attributes and topological relationships of the features, the system designs logic for center capture of point features, curvature continuity judgment of line features, and boundary extraction and stitching of surface features, ensuring that various feature graphics can be accurately and completely recognized and extracted. The system assigns a dedicated layer and color to each recognized processing feature. A feature image refers to all the geometric elements constituting a processing feature, such as points, line segments, arcs, curves, or surfaces.

[0094] The system iterates through the preset feature process template library. For each template, the program reads its associated layer name. For example, when processing the "Concave Machining" template, it learns that the geometric objects to be processed by this template are located in a layer named "Concave Machining Domain". The system automatically selects all geometric elements located within the "Concave Machining Domain" layer in the current 3D contour model. This establishes a direct association between the "Concave Machining" template and the actual concave geometry in the model. Similarly, when processing the "Inner Air Groove" template, the program picks the blue-colored line segments in the "Air Groove (Inner)" layer.

[0095] Once the mapping relationship is established, the system will load all the preset machining process parameters (such as tool type, cutting parameters, machining strategy, etc.) in the template into the current processing task, ready for subsequent path calculation.

[0096] After completing the template mapping and loading the process parameters, the system begins to perform the core toolpath calculation.

[0097] Each process template contains or is associated with one or more specific path algorithms. These algorithms are determined based on the machining strategy defined in the template. When calculating the path, the system comprehensively considers the tool geometry, the required tool axis tilt angle, and other cutting parameters, ultimately generating a series of five-axis data points containing position coordinates and tool axis vectors. This is the initial five-axis machining path.

[0098] Integrated compensation parameters refer to the explicit association or reference to the workpiece coordinate system to be used on the machine tool within the generated machining path data structure. This coordinate system is established by the preceding detection and compensation steps and already contains precise compensation parameter values. Through this association, the subsequently generated code will automatically execute in the correct, compensated coordinate system, ensuring the accuracy of the machining position.

[0099] The system reads five-axis machining path data containing coordinate and tool axis information, and translates it point by point or segment by segment into machining program code (i.e., G code) that the target machine tool can recognize and execute.

[0100] The automatic programming method for glass bottle mold processing provided in this application embodiment achieves reliable template matching through standardized layer / color markings, automatically calculates optimized five-axis machining paths using embedded algorithms and parameters, and finally generates a complete machining program that integrates precise position compensation and can be directly executed on the machine. This greatly reduces manual intervention, shortens the programming cycle, and fundamentally ensures the consistency of the process and the precision of the machining.

[0101] In some embodiments, based on the processing path, processing program code for the glass bottle mold is generated, including: Perform path verification on the processing path; If the path verification passes, the processing program code for the glass bottle mold is generated.

[0102] Specifically, after the system automatically calculates the preliminary five-axis machining path based on the process template, it does not immediately perform post-processing to generate machining program code. Instead, it first initiates an automated path verification module. This module performs multi-dimensional and multi-level simulation and analysis on the generated toolpath to check for potential problems. The verification content mainly includes, but is not limited to, the following aspects: (1) Feature Picking Integrity Check: The verification module checks whether the machining feature geometry elements used to generate the path have been picked completely and correctly. For example, if a closed groove outline is accidentally broken during picking, it may result in an incomplete generated path. The system will check for such topology errors and issue a warning.

[0103] (2) Machining Domain Interference Detection: The verification module constructs a complete virtual machining environment including the workpiece, cutting tool (including tool holder and chuck), and machine tool fixture. Then, it simulates the entire process of the cutting tool moving along the generated path, and detects in real time whether the non-cutting parts of the cutting tool (such as the tool holder) collide with the workpiece, or whether the cutting tool hits the workpiece or fixture during rapid movement. Any detected collision will be marked as a critical error.

[0104] (3) Tool and curve matching analysis: Especially when machining three-dimensional curves or surfaces, the verification module will analyze the matching relationship between the selected tool size (especially the tool tip radius) and the minimum radius of curvature of the curve to be machined. If the tool radius is greater than the minimum concave radius of the curve, the tool will not be able to accurately machine the shape of the curve, resulting in undercutting. The system will provide a prompt for such mismatches.

[0105] When the verification module finds any abnormalities during the above checks (such as missing features, tool overcutting, path conflicts, etc.), the system will immediately issue a prompt and highlight the problematic path segment.

[0106] The system also supports manual intervention for parameter adjustments or path corrections. For example, operators can replace the tool with a smaller one or adjust the tool axis tilt strategy to avoid interference areas, and then recalculate and verify the path.

[0107] Only when all verification items pass smoothly, and the system confirms that the generated machining path is safe, interference-free, overcut-free, and meets machining requirements, will the program enter the final code generation stage. At this point, the system performs post-processing operations, converting this rigorously verified and reliable machining path into machining program code (G-code program) executable by a specific machine tool. Since the correctness of the path has been guaranteed, the generated G-code program can be directly and reliably transmitted to the CNC machine tool for actual production.

[0108] The automatic programming method for glass bottle mold processing provided in this application ensures that every line of code output from the automated programming software is securely verified, thereby guaranteeing the safety of the processing and the precision stability of the final product, and avoiding expensive equipment damage, tool scrapping, and workpiece loss caused by program errors.

[0109] Based on the above embodiments, the automatic programming method for glass bottle mold processing provided in this application can be written as a plug-in and embedded in computer-aided design software of related technologies.

[0110] Open the programming template for the corresponding product type in the plugin. Click "Mold Import" in the plugin's functions to import standardized 2D drawings. The plugin will automatically move and rotate the two views to merge them into the actual product shape. Click "Detect" in the plugin's functions to quickly place points. Click "Automatic Calculation" in the plugin's functions to calculate the pre-made process path. After the calculation is completed, if the product type is special and manual modification is required, the processing domain can be manually selected through the various function modules in the plugin.

[0111] After importing the drawing, the plugin will automatically hide the dimension line layer, which will not be involved in the calculation. Crosshairs are captured using RGB colors. The top crosshair, scanning 100mm left and right, captures the top view, while the bottom crosshair, scanning 100mm left and right, captures the right view. The point with the maximum ordinate (Ymax) of the intersection of the top crosshair and the top view is the origin of the coordinate system. The top view is rotated 90 degrees to the right and translated to the origin. The center of the largest circle in the right view is used as the center point. The view is translated to the origin, rotated 90 degrees clockwise around the Y-axis, and then 90 degrees counterclockwise around the X-axis to complete the stitching.

[0112] For concave formation: The plugin identifies the red center line and the horizontal lines on both sides, picks the nearest vertical line along the X direction, constructs arcs at both ends of the Y direction using the "three-point arc" function, generates a curved surface, extends 5.5mm outward along the Y direction to modify the curved surface, extracts the outline and saves it to the "concave" layer.

[0113] For gas trough generation: Identify the R3 semicircle and extract its center. If the center X value is within the range of the two concave ends (X1=10mm, X2=30mm), it is determined to be the inner air groove. Draw two 11.5mm blue line segments along the Y direction where the absolute value decreases. The other center X=5mm (outside the range) is determined to be the outer air groove. Draw two 10mm yellow line segments along the Y direction where the absolute value increases. Store them in the sub-layers "Air Groove (Inner)" and "Air Groove (Outer)" respectively.

[0114] For garbage bin generation: Pick up 3 curves and process them according to the curved garbage trough process: after the red straight line is expanded outward by 2mm, bevel it with R2. Rotate the pink straight line around the maximum point of Y by 10 degrees to construct two three-point arcs and combine them into curves. After two-way masking, divide it according to the XOY plane, keep the negative part of Z, and save it into the "garbage trough processing area" layer (pink dotted line). The system automatically constructs features such as tendrils (extended by 4mm), Haval pins (center extraction), and R-slots (line segment drawing) simultaneously. Each layer is named according to its features for easy identification.

[0115] After that, the plugin automatically matches the preset process template to generate the detection path and the processing path, and finally outputs a complete processing program including in-machine compensation parameters.

[0116] The method provided in this application deeply integrates specific feature generation rules (such as the arc construction parameters of concave areas, the inner and outer differentiation logic of air channels, and the curved / curved dual mode of waste channels) into the programming process in automatic mold programming. Through standardized drawing specifications, multi-feature-specific recognition logic, and the construction of a process template library, it achieves automated connection from drawings to programs. During implementation, feature recognition logic, layer allocation rules, and process parameter templates can be embedded into plugins. Users only need to import drawings according to specifications to complete automated programming of more than ten features, significantly reducing operational difficulty and repetitive labor. It solves the problems of cumbersome feature recognition, numerous repetitive operations, and easy parameter deviations in related technical programming, shortening the programming time for a single mold from 1 hour to within 20 minutes, controlling processing accuracy fluctuations within ±0.01mm, covering more than 90% of glass bottle mold types, and significantly improving processing efficiency and quality consistency.

[0117] The apparatus provided in the embodiments of this application is described below. The apparatus described below can be referred to in correspondence with the method described above.

[0118] Figure 3 This is a schematic diagram of the automatic programming device for glass bottle mold processing provided in this application, as shown below. Figure 3 As shown, the device includes: The drawing processing and feature generation module 310 is used to integrate multiple views in the two-dimensional engineering drawings of the glass bottle mold into a three-dimensional outline, and to identify the processing features in the three-dimensional outline based on preset feature recognition rules. The rapid detection point placement module 320 is used to arrange the detection points of the glass bottle mold in the machine tool coordinate system based on the preset workpiece position detection path template, and generate the detection point coordinates, measurement sequence and compensation parameters. The machining process path module 330 is used to match machining features to the corresponding templates in the preset feature process template library, calculate the five-axis machining path based on the corresponding templates, and generate machining program code for glass bottle molds containing compensation parameters.

[0119] The automatic programming device for glass bottle mold processing provided in this application automatically integrates the standardized two-dimensional drawings of the glass bottle mold, identifies features, matches preset workpiece position detection path templates to arrange detection points, matches preset feature process templates to generate processing paths, and finally outputs complete processing program code with compensation parameters. It achieves a high degree of automation in the most time-consuming and error-prone aspects of traditional programming, such as drawing understanding, feature extraction, workpiece alignment, and process setting. It frees programmers from a lot of repetitive labor, making it possible to shorten programming time from several hours to tens of minutes, improving the programming efficiency of mold processing and reducing reliance on human experience. Due to the use of standardized process templates and precise position compensation, it greatly ensures the consistency and accuracy of processing quality.

[0120] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor, communications interface, and memory communicate with each other via the communications bus. The processor can invoke logical commands stored in the memory to execute the methods described in the above embodiments, for example: The process integrates multiple views from the 2D engineering drawings of the glass bottle mold into a 3D contour, identifies machining features in the 3D contour based on preset feature recognition rules, arranges the detection points of the glass bottle mold in the machine tool coordinate system based on the preset workpiece position detection path template, and generates the detection point coordinates, measurement sequence and compensation parameters. The machining features are matched to the corresponding templates in the preset feature process template library, the five-axis machining path is calculated based on the corresponding templates, and the machining program code of the glass bottle mold containing compensation parameters is generated.

[0121] Furthermore, the logical commands in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several commands to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0122] The processor in the electronic device provided in this application embodiment can call logical instructions in the memory to implement the above method. Its specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effect, which will not be repeated here.

[0123] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments.

[0124] The specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effects, so it will not be repeated here.

[0125] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.

[0126] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0127] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An automatic programming method for glass bottle mold processing, characterized in that, include: The multiple views in the two-dimensional engineering drawings of the glass bottle mold are integrated into a three-dimensional outline, and the processing features in the three-dimensional outline are identified based on preset feature recognition rules. Based on the preset workpiece position detection path template, the detection points of the glass bottle mold in the machine tool coordinate system are arranged, and the detection point coordinates, measurement sequence and compensation parameters are generated. The machining features are matched to the corresponding templates in the preset feature process template library. Based on the corresponding templates, the five-axis machining path is calculated, and the machining program code of the glass bottle mold containing the compensation parameters is generated.

2. The automatic programming method for glass bottle mold processing according to claim 1, characterized in that, The process of integrating multiple views from the two-dimensional engineering drawings of the glass bottle mold into a three-dimensional outline includes: Based on the view crosshairs in the two-dimensional engineering drawings, identify the top view and the right view; Rotate the top view to the right by a preset angle and translate it to the origin of the coordinate system; Identify the geometric center point of the right view, translate it to the origin of the coordinate system with the geometric center point as the base point, rotate the right view clockwise around the first coordinate axis by a preset angle, and then rotate it counterclockwise around the second coordinate axis by a preset angle. The right view and the top view are aligned and combined in three-dimensional space to obtain the three-dimensional outline.

3. The automatic programming method for glass bottle mold processing according to claim 1, characterized in that, The process of identifying the processing features in the three-dimensional contour based on preset feature recognition rules includes: Based on preset feature recognition rules, the geometric relationships and / or color attributes of graphic elements in the three-dimensional contour are identified to determine the processing features in the three-dimensional contour. Assign unique colors and unique layers to the identified processing features according to feature type.

4. The automatic programming method for glass bottle mold processing according to claim 1, characterized in that, The compensation parameters are generated based on the following steps: The machine tool's built-in custom macro program is invoked based on the coordinates of the detection points and the measurement sequence. The system receives the compensation parameters generated by the customized macro program; the customized macro program performs actual detection based on the coordinates of the detection point, and calculates the compensation parameters based on the detection results.

5. The automatic programming method for glass bottle mold processing according to claim 1, characterized in that, The preset feature process template library is used to store the processing process parameters of processing features of various feature types; The machining process parameters include tool type, cutting parameters, machining strategy, extension amount, and machining depth.

6. The automatic programming method for glass bottle mold processing according to claim 1, characterized in that, The step of matching the processing features to the corresponding template in the preset feature process template library, calculating the five-axis processing path based on the corresponding template, and generating the processing program code for the glass bottle mold containing the compensation parameters includes: Based on the exclusive color and exclusive layer of the processing feature, the feature image of the processing feature is mapped to the corresponding template in the preset feature process template library; The five-axis machining path of the machining feature is calculated based on the path algorithm embedded in the corresponding template, and the compensation parameters are integrated to generate the machining path of the glass bottle mold in the machine tool. Based on the processing path, the processing program code for the glass bottle mold is generated.

7. The automatic programming method for glass bottle mold processing according to claim 6, characterized in that, The step of generating the processing program code for the glass bottle mold based on the processing path includes: Perform path verification on the processing path; If the path verification passes, the processing program code for the glass bottle mold is generated.

8. An automatic programming device for glass bottle mold processing, characterized in that, include: The drawing processing and feature generation module is used to integrate multiple views in the two-dimensional engineering drawings of glass bottle molds into a three-dimensional outline, and to identify the processing features in the three-dimensional outline based on preset feature recognition rules. The rapid detection point placement module is used to arrange the detection points of the glass bottle mold in the machine tool coordinate system based on the preset workpiece position detection path template, and generate the detection point coordinates, measurement sequence and compensation parameters. The processing path module is used to match the processing features to the corresponding templates in the preset feature process template library, calculate the five-axis processing path based on the corresponding templates, and generate the processing program code of the glass bottle mold containing the compensation parameters.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the automatic programming method for glass bottle mold processing as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the automatic programming method for glass bottle mold processing as described in any one of claims 1 to 7.