A method, apparatus, and related components for visually modifying cut files.

By using a visual modification method on mobile devices, the path array of the cutting file is read and the cutting outline is drawn on the Canvas, which solves the problem that mobile users cannot quickly modify the cutting file, thus improving production efficiency and yield.

CN115239846BActive Publication Date: 2026-04-03环盛智能(深圳)有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-08
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Mobile users cannot quickly modify the cutting files, leading to data errors during the cutting process and resulting in the scrapping of screen protectors, which affects production efficiency and yield.

Method used

This paper provides a visual modification method for cutting files. By reading the path array of the cut file, a Canvas is created and the cutting outline is drawn. The file is then modified and output according to preset rules.

Benefits of technology

It enables quick and easy viewing and modification of cutting contours on mobile devices, improving production efficiency and yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115239846B_ABST
    Figure CN115239846B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, and related components for visually modifying a cut file. The method includes reading the cut file and extracting a path array from it, wherein the path array contains multiple paths, and each path contains multiple path inscription points; creating a Canvas and drawing the path array on the Canvas to obtain a cutting outline; modifying the cutting outline according to preset selection rules and outputting the result. This method visualizes the cutting outline on a mobile device, allowing users to easily check whether the cutting outline meets requirements. If it does not meet requirements, the cutting outline can be directly modified and output according to preset selection rules, making the operation simple and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and in particular to a visual modification method, apparatus, and related components for cutting and modifying files. Background Technology

[0002] Currently, generating traditional screen cutting files requires specialized drawing software. After obtaining the cutting file, the die-cutting machine performs the cutting operation on the screen protector according to the input cutting file.

[0003] If there are data errors in the cutting file during this cutting process (due to unadjusted dimensions or hardware damage), the processed mobile phone screen protector will be scrapped, seriously affecting production efficiency and yield. Therefore, the cutting outline of the cutting file needs to be checked before cutting. If any deviation is found, the cutting file needs to be modified accordingly to meet the user's needs.

[0004] However, modifying the cut files using professional drawing software is a complex and time-consuming process, requiring personnel with certain drawing skills, which is quite troublesome. In other words, mobile users face the problem of not being able to quickly modify and create cut files themselves. Summary of the Invention

[0005] The purpose of this invention is to provide a visual modification method, apparatus, and related components for cutting files, aiming to solve the problem that mobile users cannot quickly modify and create cut files.

[0006] To solve the above-mentioned technical problems, the objective of this invention is achieved through the following technical solution: providing a visual modification method for cutting files, comprising:

[0007] Read the cut file and extract the path array of the cut file, wherein the path array contains multiple paths and each path contains multiple path marking points;

[0008] Create a Canvas and draw the path array on the Canvas to obtain the cutting outline;

[0009] The cutting contour is modified and output according to the preset selection rules.

[0010] Furthermore, the technical problem to be solved by the present invention is to provide a visual modification device for cutting documents, which includes:

[0011] A reading unit is used to read a cut file and extract a path array from the cut file, wherein the path array contains multiple paths and each path contains multiple path marking points;

[0012] A drawing unit is used to create a Canvas and draw the path array on the Canvas to obtain the cutting outline;

[0013] The modification unit is used to modify and output the cutting contour according to a preset selection rule.

[0014] In addition, this embodiment of the invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the visual modification method for cutting files described in the first aspect above.

[0015] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the visual modification method for cutting files described in the first aspect above.

[0016] This invention discloses a method, apparatus, and related components for visually modifying a cut file. The method includes: reading the cut file and extracting a path array from the cut file, wherein the path array contains multiple paths, and each path contains multiple path inscription points; creating a Canvas and drawing the path array on the Canvas to obtain a cutting outline; modifying the cutting outline according to preset selection rules and outputting the modified outline. This method visualizes the cutting outline on a mobile device, allowing users to easily check whether the cutting outline meets requirements. If it does not meet requirements, the cutting outline can be directly modified and output according to preset selection rules, making the operation simple and convenient. Attached Figure Description

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

[0018] Figure 1 A flowchart illustrating the visual modification method for cutting files provided in an embodiment of the present invention;

[0019] Figure 2 A schematic diagram of the cutting contour in the visual modification method for cutting files provided in an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of a sub-process of the visual modification method for cutting files provided in an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the edit box in the visual modification method for cutting files provided in an embodiment of the present invention;

[0022] Figure 5 A schematic block diagram of a visual modification device for cutting documents provided in an embodiment of the present invention;

[0023] Figure 6 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0026] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0027] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0028] Please see Figure 1 , Figure 1 A flowchart illustrating the visual modification method for cutting files provided in an embodiment of the present invention;

[0029] like Figure 1 As shown, the method includes steps S101 to S103.

[0030] S101. Read the cut file and extract the path array of the cut file, wherein the path array contains multiple paths and the path contains multiple path marking points;

[0031] S102. Create a Canvas and draw the path array on the Canvas to obtain the cutting outline;

[0032] S103. Modify and output the cutting contour according to the preset selection rules.

[0033] In this embodiment, before the cutting file is input into the film cutting machine, the mobile user receives the cutting file using their mobile device. After receiving the input information for the cutting file, the application reads the cutting file and extracts the path array within it, for example... Figure 2 As shown, one path array includes 5 paths, and each path is formed by connecting multiple path inscription points. It should be noted that the path in this application is formed by multiple path inscription points forming a closed loop. In actual cases, the path can also be defined as extending from a starting point in one direction, so this embodiment will not elaborate further.

[0034] Since the cutting file consists of a series of x and y coordinates, such as (PD0, 3; PU3, 4; PD5, 6), where PD represents cutting down and PU represents cutting up, the command "PD x, y" means cutting down first and then moving to the (x, y) coordinate; the command "PU x, y" means cutting up first and then moving to the (x, y) coordinate. Directly opening the cutting file makes it impossible to see where the size of the cutting contour is too large or the position is off. Therefore, this application first creates a Canvas, then draws the path array on the Canvas, thereby making the cutting contour in the cutting file visible and convenient for users to view. Finally, the cutting contour is modified and output according to the preset selection rules.

[0035] In this embodiment, in order to solve the problems in the prior art that modifying the cutting file requires personnel with professional drawing knowledge, and that modifying the cutting contour in existing drawing software is cumbersome and time-consuming, the visual modification method for cutting files provided in this application can visualize the cutting contour on a mobile device, thereby making it convenient for users to check whether the cutting contour meets the requirements. If it does not meet the requirements, the cutting contour can be directly modified and output according to the preset selection rules, which is simple and convenient to operate.

[0036] In one specific embodiment, step S102 includes the following steps:

[0037] S10. Obtain the preset Canvas properties and create a Canvas based on the Canvas properties;

[0038] S11. Obtain the position coordinates of all the path inscription points, and based on the preset screen coordinate system on the Canvas, draw all the path inscription points at the corresponding positions on the Canvas to obtain the cutting contour.

[0039] In this embodiment, the Canvas properties can be pre-configured, such as the length and width of the Canvas, the background color of the Canvas, and the transparency of the Canvas, so that the cutting outline can be clearly displayed on the Canvas. Since each path inscription point has its own coordinate position information, the cutting outline can be drawn on the corresponding position of the Canvas according to the actual size of the cutting outline according to the position coordinates of each path inscription point. This application establishes a screen coordinate system on the Canvas, wherein the origin of the screen coordinate system is set at the lower left corner of the Canvas.

[0040] In one specific embodiment, step S103 includes the following steps:

[0041] S20. Based on the user's selection command, select the target path in the cutting contour;

[0042] S21. Based on the user's modification command, perform a modification operation on the target path;

[0043] S22. After all modification operations are performed, update the path array and output the target split file.

[0044] In this embodiment, after the user checks the displayed cutting contour, if some paths need to be modified, the user selects the paths based on the user's selection command. After the path is selected, the length of the selected path is adjusted and modified according to the actual size of the cutting contour. After checking the entire cutting contour and making corresponding modifications, a new path array is obtained. The new path array is stored or directly overwrites the original cutting file to obtain the target cutting file and output it.

[0045] like Figure 3 As shown, in one specific embodiment, step S20 includes the following steps:

[0046] S30. Calculate the distance data between each of the path marking points and the edge line of the Canvas to obtain a distance data sequence;

[0047] S31. Traverse the distance data sequence and extract the baseline path marking point corresponding to the distance data with the smallest value;

[0048] S32. Based on the preset judgment rules, determine whether the minimum distance data is greater than the distance threshold. If the minimum distance data is greater than the distance threshold, then execute step S33. If the minimum distance data is less than the distance threshold, then execute step S34.

[0049] S33. Perform a proportional scaling operation on the canvas to make the updated minimum distance data of the reference path inscription points equal to the distance threshold.

[0050] S34. Perform a proportional scaling operation on the canvas so that the minimum distance data of the updated reference path plotting points is equal to the distance threshold.

[0051] In this embodiment, during the actual visualization process, the Canvas may be much larger than the cutting outline, resulting in a smaller display area for the cutting outline and making it inconvenient for users to view the cutting outline. Alternatively, the path of the cutting outline may be too close to the edge of the Canvas, also causing inconvenience for users to view the cutting outline.

[0052] To address the aforementioned issues, this embodiment first calculates the distance between each path's annotation point and the edge of the Canvas. For example, path annotation points A, B, C, and D are the closest annotation points to the Canvas edge on the left, top, right, and bottom paths of the cutting contour, respectively. Specifically, the distance between path annotation point A and the left edge of the Canvas is 10, the distance between path annotation point B and the left edge of the Canvas is 15, and the distance between path annotation point C and the Canvas edge is... The distance from the left edge of the canvas is 13, and the distance from the D path inscription point to the left edge of the canvas is 17. Therefore, the A path inscription point is selected as the reference inscription point. Assuming the distance threshold is 8, it can be determined that the minimum distance between the A path inscription point and the left edge of the canvas is greater than the distance threshold. Therefore, the canvas needs to be enlarged so that the minimum distance between the updated reference path inscription point is equal to the distance threshold. Since the canvas is enlarged, the coordinates of each path inscription point of the cutting contour remain unchanged, which facilitates the modification of the path later.

[0053] In one specific embodiment, step S20 includes the following steps:

[0054] S40. Based on the user's selection command, select the target path in the cutting contour and generate an edit box on the Canvas, wherein the target path is located within the edit box;

[0055] S41. Based on the Canvas properties, generate zoom and displacement buttons on the edit box.

[0056] In this embodiment, since the selected target path may be small, to make it easier for the user to modify the cutting contour, after the user selects the corresponding target path, an edit box for wrapping the target path is automatically generated on the Canvas, such as... Figure 4 The dashed box shown in the image generates corresponding zoom and shift buttons on the edit box, as shown below. Figure 4 The four directional arrow images and the zoom button image shown on the dashed box allow users to zoom or pan the target path by clicking the corresponding button.

[0057] In one specific embodiment, step S20 includes the following steps:

[0058] S50. Based on the user's selection command, select the target path in the cutting contour and highlight all path marking points on the target path.

[0059] In this embodiment, to further facilitate users in modifying the selected target path, all path marking points on the target path are highlighted, for example, the selected target path is converted to an easily distinguishable color.

[0060] In one specific embodiment, step S21 includes the following steps:

[0061] S60. Receive and respond to the user's modification command for the zoom button or displacement button, so that the position coordinates of the path marking points on the target path are scaled or translated.

[0062] In this embodiment, as Figure 4 As shown, when a user places two fingers on the screen and moves them closer together or further apart, they send a modification command to the application to zoom in or out of the target path. The application responds to the modification command by zooming in or out of the target path proportionally. Similarly, when a user clicks the corresponding pan image button, they can pan the target path until the specified position is reached.

[0063] Even better, this application can operate on multiple cut files. If multiple cut files are input, such as... Figure 4 As shown, multiple selection boxes are generated at the bottom of the Canvas. Each selection box has a cutting outline that corresponds to one of the multiple cutting files. When the user selects the corresponding selection box, the corresponding cutting outline is displayed in the middle of the Canvas.

[0064] In one specific embodiment, step S22 includes the following steps:

[0065] S50. After all modification operations are performed, update the path array to obtain the target split file;

[0066] S51. Based on the plt file rules, convert the target cutting file into a plt format file and output it.

[0067] In this embodiment, all edited paths are obtained, and a PLT format file is generated according to the PLT file rules. In the PLT file, 1mm corresponds to 40 units. PD in the PLT represents tool entry, and PU represents tool retraction. The command "PD x, y" means to first enter the tool and then move to the (x, y) coordinate. The command "PU x, y" means to first retract the tool and then move to the (x, y) coordinate. It should be noted that the PLT file starts with IN and ends with "PG; @".

[0068] Finally, based on the user's instructions, the application sends the generated plt format file to the film cutting machine for contour cutting.

[0069] This invention also provides a visual modification apparatus for cutting documents, which is used to execute any embodiment of the aforementioned visual modification method for cutting documents. Specifically, please refer to... Figure 5 , Figure 5 This is a schematic block diagram of a visual modification device for cutting files provided in an embodiment of the present invention.

[0070] like Figure 5 As shown, the visual modification device 500 for cutting documents includes:

[0071] The reading unit 501 is used to read the cut file and extract the path array of the cut file, wherein the path array contains multiple paths and the paths contain multiple path marking points;

[0072] The drawing unit 502 is used to create a Canvas and draw the path array on the Canvas to obtain the cutting outline.

[0073] Modification unit 503 is used to modify and output the cutting contour according to preset selection rules.

[0074] This device can visualize the cutting outline on a mobile device, allowing users to easily check whether the cutting outline meets the requirements. If it does not meet the requirements, the cutting outline can be modified and output directly according to preset selection rules, making the operation simple and convenient.

[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0076] The aforementioned visual modification device for cutting documents can be implemented as a computer program, which can, for example... Figure 6 It runs on the computer device shown.

[0077] Please see Figure 6 , Figure 6 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 1100 is a server, which can be a standalone server or a server cluster composed of multiple servers.

[0078] See Figure 6 The computer device 1100 includes a processor 1102, a memory, and a network interface 1105 connected via a system bus 1101. The memory may include a non-volatile storage medium 1103 and internal memory 1104.

[0079] The non-volatile storage medium 1103 may store an operating system 11031 and a computer program 11032. When the computer program 11032 is executed, it enables the processor 1102 to perform a visual modification method for splitting files.

[0080] The processor 1102 provides computing and control capabilities to support the operation of the entire computer device 1100.

[0081] The internal memory 1104 provides an environment for the execution of the computer program 11032 in the non-volatile storage medium 1103. When the computer program 11032 is executed by the processor 1102, the processor 1102 can perform a visual modification method for splitting files.

[0082] The network interface 1105 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 1100 to which the present invention is applied. The specific computer device 1100 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0083] Those skilled in the art will understand that Figure 6The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 6 The embodiments shown are consistent and will not be repeated here.

[0084] It should be understood that, in this embodiment of the invention, the processor 1102 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0085] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the visual modification method for cutting files according to embodiments of the present invention.

[0086] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code.

[0087] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0088] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A visual modification method for cutting files, characterized in that, include: Read the cut file and extract the path array of the cut file, wherein the path array contains multiple paths and each path contains multiple path marking points; Create a Canvas and draw the path array on the Canvas to obtain the cutting outline; The cutting contour is modified and output according to preset selection rules, and includes: Based on the user's selection command, the target path in the cutting contour is selected; Based on the user's modification instructions, a modification operation is performed on the target path; After all modification operations are performed, the path array is updated and the target split file is output; The step of selecting the target path in the cutting contour based on the user's selection command further includes: Calculate the distance data between each of the path inscription points and the edge line of the Canvas to obtain a distance data sequence; Traverse the distance data sequence and extract the baseline path marking point corresponding to the minimum distance data; Based on a preset judgment rule, it is determined whether the minimum distance data is greater than a distance threshold. If the minimum distance data is greater than the distance threshold, the canvas is enlarged proportionally so that the updated minimum distance data of the reference path inscription points is equal to the distance threshold. If the minimum distance data is less than the distance threshold, the canvas is reduced proportionally so that the updated minimum distance data of the reference path inscription points is equal to the distance threshold.

2. The visual modification method for cutting files according to claim 1, characterized in that, The step of creating a Canvas and drawing the path array on the Canvas includes: Obtain the preset Canvas properties and create a Canvas based on the Canvas properties; Obtain the position coordinates of all the path inscription points, and based on the preset screen coordinate system on the Canvas, draw all the path inscription points at the corresponding positions on the Canvas to obtain the cutting contour.

3. The visual modification method for cutting files according to claim 2, characterized in that, The step of selecting the target path in the cutting contour based on the user's selection command, and performing a modification operation on the target path based on the user's modification command, includes: Based on the user's selection command, the target path in the cutting contour is selected, and an edit box is generated on the Canvas, wherein the target path is located within the edit box; Based on the Canvas properties, a zoom button and a displacement button are generated on the edit box; Receive and respond to user commands to modify the zoom or displacement buttons, causing the position coordinates of the path marking points on the target path to be scaled or translated.

4. The visual modification method for cutting files according to claim 1, characterized in that, The step of selecting the target path in the cutting contour based on the user's selection command includes: Based on the user's selection command, the target path in the cutting contour is selected, and all path marking points on the target path are highlighted.

5. The visual modification method for cutting files according to claim 1, characterized in that, After all modification operations are performed, updating the path array and outputting the target split file includes: After performing all the modification operations, update the path array to obtain the target split file; Based on the plt file rules, the target segmented file is converted into a plt format file and output.

6. A visual modification device for cutting documents, characterized in that, include: A reading unit is used to read a cut file and extract a path array from the cut file, wherein the path array contains multiple paths and each path contains multiple path marking points; A drawing unit is used to create a Canvas and draw the path array on the Canvas to obtain the cutting outline; The modification unit is used to modify and output the cutting contour according to preset selection rules, and includes: selecting a target path in the cutting contour based on the user's selection instruction; performing a modification operation on the target path based on the user's modification instruction; updating the path array and outputting the target cutting file after all modification operations are performed; wherein, before selecting the target path in the cutting contour based on the user's selection instruction, the unit further includes: Calculate the distance data between each of the path inscription points and the edge line of the Canvas to obtain a distance data sequence; Traverse the distance data sequence and extract the baseline path marking point corresponding to the minimum distance data; Based on a preset judgment rule, it is determined whether the minimum distance data is greater than a distance threshold. If the minimum distance data is greater than the distance threshold, the canvas is enlarged proportionally so that the updated minimum distance data of the reference path inscription points is equal to the distance threshold. If the minimum distance data is less than the distance threshold, the canvas is reduced proportionally so that the updated minimum distance data of the reference path inscription points is equal to the distance threshold.

7. A computer 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 visual modification method for cutting files as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the visual modification method for cutting files as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • A mining machine adapted for extracting material from a deposit, and method for control thereof

    CN113330182A

  • Cutting contour extraction method, device system and medium

    CN113920038A