A double-mode adaptive layout and process generation method for packaging die based on collision detection
Patent Information
- Application Number
- CN202611239502.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-09-18
AI Technical Summary
[0009]本发明的目的在于提供一种基于碰撞检测的包装刀模双模式自适应排版及工艺生成方法,以解决现有技术中刀模排版依赖人工经验、模式适配性差、反向嵌套排距难以精确控制、排版与工艺输出脱节以及工艺模板固定不灵活的问题
针对传统排版过程中参数输入分散、重复录入频繁导致排版结果与工艺输出容易脱节的问题,本发明通过交互式参数输入实现了排版参数与工艺参数的一体化录入,从源头避免了重复录入和参数冲突,有效提升了数据一致性与操作效率,使排版与工艺数据同源同轨,降低了对人工经验的依赖;
Smart Images

Figure CN122778464A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided design and automatic layout technology for packaging die-cutting molds, specifically to a dual-mode adaptive layout and process generation method for packaging die-cutting molds based on collision detection. Background Technology
[0002] In the packaging production process, the layout of the die-cutting pattern directly affects material utilization, die-cutting efficiency, and subsequent process organization. Traditional die-cutting layout usually relies on designers manually copying, rotating, moving, and aligning the die-cutting pattern in a CAD environment. Then, based on the material size and experience, they determine the quantity that can be arranged. After the layout is completed, they manually calculate process information such as corrugated cardboard size, colored surface size, area, number of waste removals, number of punching and waste removals, number of machine gluings, die-cutting type, and packaging specifications.
[0003] The existing methods have at least the following problems: First, the typesetting process relies heavily on human experience, parameter input is scattered, and there is a lot of repetitive input, which can easily lead to inconsistencies between the typesetting results and the process output.
[0004] Second, the traditional regular array method is mainly suitable for die-cutting patterns with regular structure and approximately rectangular outer contour. For die-cutting patterns of color boxes with flaps, asymmetrical boundaries, or complementary nested local contours, it is difficult to balance the goal of regular layout and material saving.
[0005] Third, the key issue in reverse nested layout is how to find the minimum safe spacing between adjacent rows without causing graphic interference. Existing methods mostly rely on empirical judgment and lack a strict geometric collision determination mechanism.
[0006] IV. The process parameters such as corrugated cardboard size, colored surface size, area, punching and waste removal, machine gluing, die-cutting type, and packaging specifications are often handled by fixed templates or manual modifications afterward, which lacks flexibility and easily leads to a mismatch between the process description and the actual requirements.
[0007] Fifth, in actual workflows, there is often a business requirement of "layout first, measurement later, and process supplementation later". However, existing solutions usually do not separate automatic layout and independent process generation into two collaborative functional commands, which limits their applicability.
[0008] Therefore, a new packaging die-cutting solution is needed that can support automatic layout in both forward and reverse modes, solve for reverse nested spacing through collision detection, and support the collaborative work of automatic layout commands and independent process generation commands, thereby achieving integrated generation of layout and process routes. Summary of the Invention
[0009] The purpose of this invention is to provide a dual-mode adaptive layout and process generation method for packaging die-cutting molds based on collision detection, so as to solve the problems in the prior art, such as die-cutting mold layout relying on manual experience, poor mode adaptability, difficulty in accurately controlling the reverse nesting spacing, disconnect between layout and process output, and inflexible fixed process templates.
[0010] The objective of this invention can be achieved through the following technical solutions: This application provides a method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection, including the following steps: S1. Receive layout parameters and process parameters through the interactive parameter input interface. The automatic layout command receives layout method, cardboard limit size, subsequent process parameters and die-cutting type through the color box layout dialog box. The independent process route generation command receives layout width parameters, subsequent process setting parameters and die-cutting type through the process route dialog box. S2. Select the die-cutting pattern to be arranged, extract the geometric contour data of the die-cutting pattern, and calculate the size and center position of the outer bounding box of the die-cutting pattern; S3. Perform dual-mode adaptive typesetting based on the typesetting method, where: When the layout method is forward layout, the die-cutting pattern is copied and arranged in the same direction in a matrix manner. When the layout method is reverse layout, the adjacent die pattern diagrams are rotated 180°, and the minimum safe spacing between adjacent rows is obtained through collision detection and iterative exploration to complete the non-interference nested layout. S4. Calculate the overall layout outline dimensions based on the layout results, and generate the corrugated cardboard dimensions and colored surface dimensions; S5. Generate and output the process route text based on the total number of layouts or manually entered quantities, punching parameters, machine-glued box parameters, die-cutting type, and number of pieces per package. S6. Automatic layout command completes the linked output of layout and process route, or independent process generation command generates process route independently based on existing layout results or manual measurement results.
[0011] Compared with the prior art, the present invention has at least the following beneficial effects: To address the problem of scattered parameter input and frequent repetitive entry in traditional typesetting processes, which easily leads to a disconnect between typesetting results and process output, this invention achieves integrated input of typesetting parameters and process parameters through interactive parameter input. This avoids repetitive entry and parameter conflicts from the source, effectively improving data consistency and operational efficiency, making typesetting and process data from the same source and track, and reducing reliance on manual experience. To address the contradiction between the difficulty of balancing regular layout and material saving in traditional regular array methods, this invention adopts a dual-mode adaptive layout architecture that combines forward and reverse layout. The forward mode meets the need for rapid layout of regular patterns, while the reverse mode achieves complementary nesting of irregular die-cutting patterns through 180° rotation and collision detection, thus balancing layout regularity and material utilization. To address the challenges of relying on manual experience to determine the minimum safe spacing between adjacent rows in reverse nested layouts and lacking a rigorous geometric collision detection mechanism, this invention precisely calculates the minimum safe spacing through collision detection and iterative trial. This transforms the spacing determination in reverse nested layouts from experience-dependent to geometric algorithm-driven, providing a clear and reproducible technical implementation path and improving the accuracy and reliability of layout. To address the contradiction between the business requirement of "layout first, measurement later, and process supplementation" in actual workflows and the fragmented functions of existing tools, this invention adopts a collaborative structure of automatic layout command and independent process generation command. It supports a fully automatic process from selection to output, and is also compatible with a working mode that independently supplements and generates process routes based on existing layout results or manual measurement results. This allows designers to flexibly choose the operation path according to the actual scenario, making it more applicable. To address the shortcomings of the loose connection between the calculation of corrugated cardboard dimensions and colored surface dimensions and the process output, which makes manual conversion prone to errors, this invention uses a dual-system edge trimming compensation and automatic area conversion to make the connection between the corrugated cardboard dimensions, colored surface dimensions and the process output closer. The calculation process is completed automatically without manual intervention, effectively eliminating manual conversion errors and improving the accuracy of process data. To address the limitations of packaging specifications relying on fixed template values and being difficult to adjust flexibly according to order requirements, this invention incorporates packaging quantity into a parameterized input system. This allows the packaging process to be flexibly adapted to order requirements, no longer limited by fixed template values, further enhancing the flexibility of process generation and adaptability to diverse production needs. Attached Figure Description
[0012] To better understand and implement this application, the technical solution is described in detail below with reference to the accompanying drawings.
[0013] Figure 1 A flowchart illustrating a collision detection-based dual-mode adaptive layout and process generation method for packaging die-cutting molds provided in this application; Figure 2 A schematic diagram of the color box layout dialog box for the automatic layout command provided in this application; Figure 3 A schematic diagram of the forward typesetting mode provided for this application; Figure 4 A schematic diagram of reverse layout and collision detection provided for this application; Figure 5A schematic diagram illustrating the selection, positioning, and layout output of the die-cutting pattern provided in this application; Figure 6 A schematic diagram of the dual-system trimming compensation and process route generation provided for this application; Figure 7 A schematic diagram of the process route dialog box for the independent process route generation command provided in this application. Detailed Implementation
[0014] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0015] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0016] The following detailed description of the specific implementation methods, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided in detail.
[0017] Example 1, please refer to Figures 1-7 This embodiment provides a method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection, including the following steps: S1. Parameter Input: After the automatic layout command is started, the system will pop up the carton layout dialog box, which includes the layout method area, cardboard limit size area, post-process area and die-cutting type area.
[0018] Among them: the layout method area is used to select forward or reverse layout; The cardboard size limit area has a limit length Lt, a limit width Bt, and a layout gap J; The post-processing area is used to input the number of punches per box, the number of packages, and the number of times the box is machine-glued. The die-cutting type area is used to select between standard outsourced die-cutting and extra-large die-cutting.
[0019] After the independent process route generation command is initiated, the system will display a process route dialog box, which includes a layout width area, a subsequent process setting area, and a die-cutting type selection area.
[0020] Among them: the layout width area is used to input the outline length L and the outline width B; The post-process setting area is used to input the waste removal quantity N and the total number of punching waste removal operations. Q h Number of times machine bonding g n Number of items per package, p; The die-cutting type selection area is used to choose between standard outsourced die-cutting or extra-large die-cutting.
[0021] Specifically, it enables the integrated input of layout parameters and process parameters, avoiding problems such as scattered parameter input, repeated input, and inconsistencies at the process entry point, laying the foundation for the automated connection of subsequent layout calculation, dimension back-calculation, and process generation.
[0022] S2. Selection of die-cutting pattern and extraction of bounding box: Select the die-cutting pattern to be arranged and extract the geometric contour data of the die-cutting pattern.
[0023] Preferably, by traversing the vertex coordinates or key point coordinates of the selected entity, the minimum value in the X direction, the maximum value in the X direction, the minimum value in the Y direction, and the maximum value in the Y direction are extracted, thereby obtaining the size and center position of the bounding box of the die-cutting pattern.
[0024] Let the circumscribed length of a single die pattern be... L 0, outer width is B 0.
[0025] For details on selection operations and subsequent layout output, please refer to [link / reference]. Figure 5 The diagram shown illustrates the selection, positioning, and layout output of the die-cutting pattern. The original die-cutting pattern in the drawing area represents the die-cutting pattern selected by the user during the selection phase. The result generated after clicking "OK" represents the complete layout array generated by the system based on the layout parameters. The layout result and process route represent the final output layout graphic and the synchronously generated process route text.
[0026] S3, Forward Layout: When the layout method is forward layout, the die-cutting pattern retains its original orientation and is copied and arranged in a matrix manner under the unified left reference constraint.
[0027] Preferably, the number of horizontal layouts and the number of vertical layouts are respectively:
[0028]
[0029] in, Limiting the length of cardboard, i.e., limiting the dimensions of the material width in the length direction; The spacing between adjacent die patterns is the distance between them. This refers to the number of horizontally arranged die-cutting molds, i.e., the number of die-cutting molds that can be arranged along the length direction. This refers to the vertical layout quantity, i.e., the number of die-cutting molds that can be arranged along the width direction; The width limit for the cardboard indicates the restricted dimension of the material width; J is the layout gap, referring to the distance between adjacent die patterns.
[0030] The total number of forward layouts is:
[0031] The preferred overall outline dimensions for forward typesetting are:
[0032]
[0033] in, The overall outer length, This refers to the overall outer width.
[0034] The execution process and arrangement effect of this step can be found in [link to relevant documentation]. Figure 3 The diagram shown illustrates the forward layout mode. Figure 3 The original die-cutting pattern represents the initial graphic object selected by the user, and the forward layout result represents the regular array generated after copying and arranging in the same direction in a matrix manner.
[0035] S4. Reverse Layout: When the layout method is reverse layout, the adjacent die-cutting patterns are rotated 180°, and collision detection is used to determine the minimum safe spacing between adjacent rows.
[0036] The minimum safe row spacing between adjacent rows is determined using collision detection, including: Copy the original die-cutting pattern; Rotate the copied die-cutting pattern 180° around the preset center point; Arrange the rotated die-cutting pattern and the unrotated die-cutting pattern in adjacent rows; Perform collision detection on two rows of objects; If interference is detected, return to the previous position and reduce the trial step size; If no interference is detected, the current position is retained and the approximation continues; When the trial step size is less than the preset tolerance, the displacement corresponding to the current non-interference position is taken as the minimum safe row spacing.
[0037] Let the collision detection function be Collision(⋅), then the minimum safe spacing dmin can be expressed as:
[0038] in, For the collection of objects in the previous row, For the current set of sorted objects, This is the step size variable used during the iteration process to explore the longitudinal spacing between the two rows.
[0039] In engineering implementation, the aforementioned It is obtained through iterative exploration and step-down approximation based on the CAD geometry intersection interface.
[0040] The overall outline width of the reverse layout is preferably determined by the cumulative actual usage height of each row, rather than simply multiplying the number of rows by the outer width of a single die-cut drawing.
[0041] The rotation direction of the original die-cutting pattern, the arrangement of adjacent rows, and the collision detection process in this step can be found in [reference needed]. Figure 4 The diagram shown illustrates reverse layout and collision detection. In the diagram, the original die-cut drawing represents the initial graphic object that has not been rotated. The graphic after being rotated 180° is arranged in adjacent rows with the original graphic. Collision detection is used to determine the minimum safe spacing between rows, and finally, a reverse nested layout result is generated.
[0042] S5. Dual-system trimming compensation and area calculation: After obtaining the overall outline dimensions of the layout, generate the corrugated cardboard dimensions and the colored surface dimensions respectively.
[0043] Let the overall outline length be Px and the overall outline width be Py.
[0044] In a preferred embodiment, when the long side is on the Px side:
[0045]
[0046]
[0047]
[0048] When the longer side is on the Py side:
[0049]
[0050]
[0051]
[0052] in: , These are the length and width of the corrugated cardboard, respectively. , These are the length and width of the colored surface, respectively.
[0053] In a preferred embodiment, when the dimensions in both directions are equal, according to Side rule processing.
[0054] The area of the corrugated cardboard is:
[0055] The unit is square meters.
[0056] S6. Process route generation: Generate process route text based on the layout results or manual input results.
[0057] The optimal process route includes: surface lamination; die-cutting; sorting; punching and waste removal; waste removal or discharge of color boxes; machine gluing; and packaging.
[0058] in: In the automatic layout command, the total number of punching and waste removal cycles is automatically calculated based on the number of punches per box:
[0059] In the independent process generation command, directly input the total number of punching and waste removal cycles. N represents the total number of die-cutting dies arranged on the entire sheet of material; h represents the number of holes punched per box, i.e., the number of holes that need to be punched in a single cardboard box / carton.
[0060] The packaging process outputs the following based on the input number of packages p: "Packaging (simple packaging) (p pieces / package)".
[0061] In a preferred embodiment, when the die-cutting type is extra-large die-cutting, the machine gluing box process can be omitted.
[0062] Step S6 also includes: at least two command modules that can be executed independently but can be used in conjunction with each other: The automatic layout command is used to complete the main process from selecting the die drawing frame, inputting parameters, forward / reverse layout to automatic output of the process route; Independent process generation command is used to generate a process route based on existing layout results or manual measurement results, by simply inputting length, width, quantity and subsequent process parameters.
[0063] This embodiment achieves material-saving nested layout based on the complementary relationship of real contours through collision detection and step-down iteration distance calculation in reverse layout mode. After the layout is completed, it automatically completes edge trimming compensation, area conversion and process route generation, which effectively improves the automation level and data consistency of packaging die layout and process output.
[0064] Example 2: Implementation of Forward Layout Using Automatic Layout Commands After the user initiates the automatic layout command, the system will display a "Carton Layout" dialog box. The dialog box includes a layout method area, a cardboard size limit area, a post-processing area, and a die-cutting type area.
[0065] In this dialog box, the user enters: layout method; length limit; width limit; layout gap; single box punching; packaging quantity; number of machine bonding cycles; and die-cutting type.
[0066] Then, select a single die-cutting pattern image. The system calculates its bounding box by traversing the vertices or keypoints of the selected entity, thereby obtaining the length and width of the die-cutting pattern image.
[0067] The system calculates the horizontal and vertical quantities based on the length, width, and spacing limits, and uses a double-layer cyclic copying method to complete the rule matrix layout.
[0068] After the layout is completed, the system automatically calculates the overall outline dimensions and generates the corrugated cardboard dimensions, colored surface dimensions, area, and process route.
[0069] In this implementation, the total number of punching and waste removal cycles is automatically calculated by "number of punches per box × total number of layouts"; the packaging process outputs according to the input number of packages per pack.
[0070] Example 3: Reverse Layout Implementation of Automatic Layout Command After the user selects the reverse layout mode, the system first obtains the bounding box, center point, and reference point of the die-cutting pattern.
[0071] Then, the system copies the die-cutting pattern and constructs a set of objects in the original orientation and a set of objects rotated 180°. The rotated objects are initially positioned adjacent to the objects in the original orientation. The system performs collision detection on the object set and gradually approaches the previous row of objects vertically.
[0072] The system adopts the following iterative process: Set the initial trial step size; Move the current row object one trial step length vertically; If the collision detection result is an intersection, then return to the previous position and halve the trial step size; If the collision detection result is non-intersecting, retain the current position and continue moving; When the trial step size is less than the preset tolerance, the displacement corresponding to the current non-collision position is taken as the minimum safe spacing.
[0073] The system further performs multi-row copying based on this minimum safe spacing, thereby achieving reverse nested layout.
[0074] Example 4: Implementation of Independent Process Generation Command Based on existing layout results or manual measurement results, initiate the independent process route generation command, and the system will display a "Process Route" dialog box. The dialog box includes a layout width area, a subsequent process setting area, and a die-cutting type selection area.
[0075] The system receives the following in the dialog box: Layout width parameters: length L, width B; Post-process settings parameters: waste discharge quantity, punching and waste removal, number of machine bonding cycles, and number of packages; Die-cutting type.
[0076] The system automatically matches trimming compensation rules based on the length-width relationship, generates corrugated cardboard dimensions and colored surface dimensions, completes area conversion, and outputs process route text.
[0077] In this implementation, the punching process adopts the "punching and waste removal" direct input method, which forms two input modes for the same process item with the "single box punching automatic conversion mode" in the automatic layout command.
[0078] The system switches the process template based on the die-cutting type parameters: When the die-cutting type is ordinary die-cutting, the output machine performs a box gluing process; When the die-cutting type is extra-large die-cutting, the machine gluing process is not output.
[0079] This allows the process route to automatically adapt to different die-cutting conditions.
[0080] Example 5: Parameterized Implementation of Packing Quantity Both the automatic layout command and the independent process generation command accept the parameter p for the number of pieces per package.
[0081] The system automatically outputs the following in the process route: "Packaging (simple packaging) (p pieces / package)" For example, when p=15, the output is: "Package (simple packaging) (15 pieces / pack)" When p=20, the output is: "Package (simple packaging) (20 pieces / pack)" This allows packaging specifications to be flexibly changed according to order requirements.
[0082] Example 6: Implementation Method of Linking Process Numbers When the punching and waste removal process exists, the system includes it in the process route and keeps the subsequent process numbers sequential; when the punching and waste removal process does not exist, the subsequent process numbers are automatically moved forward.
[0083] When the die-cutting type is extra-large die-cutting and the machine gluing box process does not output, the packaging process maintains the same sequential numbering system as the preceding process items in the display.
[0084] Alternative implementation methods The collision detection module is not limited to a specific CAD function. As long as it can determine whether geometric interference occurs between sets of objects, it can be used as an equivalent implementation of this invention. The solution for the minimum safe spacing is not limited to a single step-shrinking iteration method; it can also be achieved using methods such as binary approximation, variable step-size search, and piecewise search. The process route can be directly written into the CAD drawing, or it can be exported as a table, attribute block, database field or external report file; The number of items per package parameter can be entered manually by the user, or it can be initialized by the system default value and then modified by the user. The independent process generation command can either directly input the outline dimensions and quantity, or automatically import them by reading the bounding box data of an existing graphic object in the extended mode.
[0085] This embodiment proposes a dual-mode adaptive layout and process generation method for packaging die-cutting molds based on collision detection. This method achieves a complete closed loop for die-cutting diagrams, from parameter input, graphic layout, geometric determination, and dimensional calculation to process text output, through the coordinated operation of automatic layout commands and independent process generation commands. In particular, by using collision detection and iterative experiments to determine the minimum safe spacing for reverse layout, reverse nested layout has a clear technical implementation path and high engineering operability, demonstrating promising prospects for industrial application.
[0086] Example 7: This example also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements a method for generating a dual-mode adaptive layout process for packaging die-cutting based on collision detection.
[0087] The computer-readable storage medium can be any volatile or non-volatile storage device, including but not limited to: disks, optical disks, solid-state drives (SSDs), USB flash drives, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), flash memory cards, etc.
[0088] In a preferred embodiment, the storage medium is a non-volatile storage medium installed on the computer where the CAD software resides. The computer program is loaded and executed as a plug-in or extended function module of the CAD software. After the user starts the CAD software, by loading the program instructions in the storage medium, the user can invoke automatic layout commands or independent process generation commands in the CAD environment, thereby realizing functions such as die drawing selection, parameter input, dual-mode layout, dimension calculation, and process route generation.
[0089] In another embodiment, the storage medium is an independent distribution medium, such as an optical disc or USB flash drive, which allows the user to copy the installation program stored therein to the target computer to complete the installation. When the processor of the target computer executes the instruction sequence corresponding to the installation program, the methods described in each step of this invention are implemented.
[0090] Through the implementation of this computer-readable storage medium, the method of the present invention can be independently distributed, installed, and updated in the form of a software product, facilitating its application on existing CAD platforms without requiring replacement of users' existing hardware and CAD infrastructure.
[0091] Example 8: This embodiment also provides an electronic device, which includes a processor and a memory. The memory stores a computer program, and when the processor executes the computer program, it implements a collision detection-based dual-mode adaptive layout process generation method for packaging die-cutting.
[0092] The electronic device can be a general-purpose computer (such as a desktop computer, laptop computer, or workstation), an industrial control computer, a server, or a dedicated graphics processing terminal with an integrated CAD operating environment.
[0093] In this embodiment, the processor includes at least one central processing unit (CPU), and preferably also includes a graphics processing unit (GPU) to accelerate geometric calculations during graphics rendering and collision detection. The memory is used to store computer programs and intermediate data such as die-cutting pattern data, layout parameters, and process parameters. Preferably, it also includes non-volatile memory units for long-term storage of program code and volatile memory units for dynamically loading program instructions at runtime.
[0094] In a preferred embodiment, the electronic device further includes a display for showing an interactive parameter input dialog box, a die-cutting diagram selection interface, a layout result preview, and process route text. The processor responds to user input in the dialog box, calculates the layout quantity and overall dimensions in real time, and outputs the layout preview results to the display.
[0095] In another preferred embodiment, the electronic device further includes a network communication interface for transmitting die-cutting pattern data, layout results, and process route information with a remote server or collaborative terminal, thereby supporting collaborative design scenarios.
[0096] In a specific application scenario, the user launches CAD software on the electronic device, which contains a program module implementing the method of this invention. The processor responds to the user's click on the automatic layout command, pops up a "Color Box Layout" dialog box on the display, and receives the layout and process parameters input by the user. Subsequently, in response to a selection operation, it extracts the boundary frame dimensions of the die-cutting drawing. Then, based on the selected layout method, it calls the corresponding forward layout module or reverse layout and collision detection module to complete the copying and arrangement of the die-cutting drawing. Finally, the processor executes the process generation module, outputs the process route text, and displays the layout results and process route on the display.
[0097] In another specific application scenario, the user initiates an independent process generation command on the electronic device. The processor pops up a "process route" dialog box, receives the length, width, and quantity measured manually by the user, as well as the parameters of the subsequent processes, and directly generates the process route text without having to re-execute the typesetting calculation.
[0098] Through this electronic device implementation, the method of the present invention can be fully implemented using existing computer hardware and CAD platforms, exhibiting good compatibility and ease of deployment. The coordinated operation of the processor and memory ensures efficient execution of graphics calculations, collision detection iterations, and process text generation, meeting the actual production efficiency requirements of packaging structure design.
[0099] Example 9: In a specific implementation, the present invention can be configured as follows, combining the storage medium and the electronic device: A computer program provided by a computer-readable storage medium is installed in the memory of an electronic device. Once loaded, this program forms a collision detection-based dual-mode adaptive layout and process generation system for packaging die-cutting. This system includes: a parameter input module, a die-cutting diagram selection and positioning module, a bounding box calculation module, a forward layout module, a reverse layout module, a collision detection and minimum safe spacing solution module, a dual-system trimming compensation module, a process generation module, and a text output module.
[0100] These modules work collaboratively under the processor scheduling of the electronic device: First, the parameter input module obtains the layout method and process parameters; then, the die-cutting pattern selection and positioning module picks up the user-selected graphic objects; the bounding box calculation module traverses the vertex coordinates of the selected graphic objects to extract the outer bounding box size and center position; according to the layout method, the forward layout module performs matrix copying and layout, or the reverse layout module copies the die-cutting pattern and rotates it 180° to place it after the adjacent row; the collision detection and minimum safe spacing solution module iterates and approximates by stepping, calling the CAD geometry intersection interface at each step to detect interference. If there is a collision, the stepping back is initiated; if there is no collision, the approximation continues until the step size is less than the preset tolerance, and the minimum safe spacing is obtained to complete the interference-free nested layout; the dual-system trimming compensation module calculates the corrugated cardboard and colored surface dimensions based on the layout results; the process generation module generates the process route based on the number of layouts or the number of manually inputs; finally, the process route is written into the CAD drawing or exported as an external report through the text output module.
[0101] In this implementation, users can obtain fully automatic output from graphics to process under the automatic layout command, or obtain only process route text under the independent process generation command. Both share the same process generation logic, ensuring consistency between the layout result and the process description, while also providing designers with flexible operation options.
[0102] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any brief modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection, characterized in that: Includes the following steps: S1. Receive layout parameters and process parameters through the interactive parameter input interface. The automatic layout command receives layout method, cardboard limit size, subsequent process parameters and die-cutting type through the color box layout dialog box. The independent process route generation command receives layout width parameters, subsequent process setting parameters and die-cutting type through the process route dialog box. S2. Select the die-cutting pattern to be arranged, extract the geometric contour data of the die-cutting pattern, and calculate the size and center position of the outer bounding box of the die-cutting pattern; S3. Perform dual-mode adaptive typesetting based on the typesetting method, where: When the layout method is forward layout, the die-cutting pattern is copied and arranged in the same direction in a matrix manner. When the layout method is reverse layout, the adjacent die pattern diagrams are rotated 180°, and the minimum safe spacing between adjacent rows is obtained through collision detection and iterative exploration to complete the non-interference nested layout. S4. Calculate the overall layout outline dimensions based on the layout results, and generate the corrugated cardboard dimensions and colored surface dimensions; S5. Generate and output the process route text based on the total number of layouts or manually entered quantities, punching parameters, machine-glued box parameters, die-cutting type, and number of pieces per package. S6. Automatic layout command completes the linked output of layout and process route, or independent process generation command generates process route independently based on existing layout results or manual measurement results.
2. The method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 1, characterized in that: The carton layout dialog box includes a layout method area, a cardboard size limit area, a post-processing area, and a die-cutting type area. The layout method area is used to select forward or reverse layout; the cardboard size limit area is used to input the length L, width B, and gap J; the post-processing area is used to input the punching per box, the number of packings, and the number of machine gluing cycles; and the die-cutting type area is used to select standard outsourced die-cutting or extra-large die-cutting. The process route dialog box includes a layout width area, a post-process setting area, and a die-cutting type selection area, wherein: The layout width area is used to input the length L and width B; The post-process setting area is used to input the waste discharge quantity, punching and waste removal, number of machine bonding cycles, and packaging quantity; The die-cutting type selection area is used to choose between standard outsourced die-cutting or extra-large die-cutting.
3. The method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 1, characterized in that: The bounding box of the die-cutting pattern is obtained by traversing the vertex coordinates or key point coordinates of the selected entity, and the minimum, maximum, minimum and maximum values in the X and Y directions are extracted to calculate the length, width and center position of the die-cutting pattern.
4. The method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 2, characterized in that: The forward layout adopts a matrix-style copying and layout method. Based on the outer length, outer width and layout gap of the die-cutting pattern, the number of horizontal and vertical layouts are calculated, and a regular array layout result is formed through double-layer cyclic copying.
5. The method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 3, characterized in that: The reverse typesetting includes: Copy the original die-cutting pattern, rotate the copied die-cutting pattern 180° around the preset center point, arrange the rotated die-cutting pattern and the unrotated die-cutting pattern in adjacent rows, perform collision detection on the object set of the current row and the previous row, and iteratively adjust the displacement of the current row according to the collision detection results until the minimum safe row distance under the condition of no collision is obtained.
6. The method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 5, characterized in that: The minimum safe spacing is obtained through iterative trial and step-reduction approximation, specifically including: Set the initial trial step size; Move the currently sorted object one trial step along the predetermined direction; If a collision is detected, return to the previous position and reduce the trial step size; If no collision is detected, retain the current position and continue moving; When the trial step size is less than the preset tolerance, the displacement corresponding to the current non-collision position is taken as the minimum safe spacing.
7. The method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 6, characterized in that: The minimum safe row spacing includes: Let the collision detection function be Collision(⋅), then the minimum safe spacing is... Represented as: ; in, For the collection of objects in the previous row, For the current set of sorted objects, The step size variable used during the iteration process to explore the longitudinal spacing between the two rows, the It is obtained through iterative exploration and step-down approximation based on the CAD geometry intersection interface.
8. The method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 1, characterized in that: The process route includes at least two or more of the following: ordinary lamination, die-cutting process, sorting, punching and waste removal, color box waste removal or color box waste discharge, machine gluing and packaging. The punching and waste removal process supports two input modes: In the automatic layout command, the punching parameters are input in the "single box punching" mode, and the total number of punching and waste removal times are automatically calculated based on the total number of layouts. In the command to generate an independent process route, the punching parameters are directly input using the "punching and waste removal" method. Among them, in the automatic layout command, the total number of punching and waste removal times Calculate as follows: ; in, N This represents the total number of pages typed. h This refers to the number of holes punched per box.
9. A method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 8, characterized in that: The process route output template is switched according to the type parameter of the die-cutting process. When the die-cutting type is ordinary die-cutting, the machine gluing process is output; when the die-cutting type is extra-large die-cutting, the machine gluing process is omitted.
10. The method for dual-mode adaptive layout and process generation of packaging die-cutting molds based on collision detection according to claim 1, characterized in that: The independent process route generation command does not rely on re-executing automatic layout. Instead, it generates a process route independently based on existing layout results or manual measurement results by inputting layout width parameters, waste removal quantity, and subsequent process setting parameters. This is used to adapt to the workflow of first layout, then measurement, and then supplementary process.