Pattern lead generation method, processing device, system and storage medium

By acquiring lead attribute information and graphic type, graphic leads are automatically generated, solving the problems of insufficient accuracy and efficiency of graphic leads in existing technologies, and realizing efficient and accurate graphic lead generation.

CN122156353APending Publication Date: 2026-06-05SHENZHEN MAKER WORKS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN MAKER WORKS TECH CO LTD
Filing Date
2024-12-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of automated generation of graphic leaders is insufficient, while manual setting is inefficient, making it difficult to simultaneously guarantee the efficiency and accuracy of graphic leader setting.

Method used

By acquiring preset lead wire attribute information, including lead wire type indication information, the graphic type and lead wire type of the target graphic are determined, the corresponding lead wire is generated, and processing interference detection and adjustment are performed to achieve automated generation.

Benefits of technology

It improves the accuracy and efficiency of generating graphic leaders, and can automatically generate leaders for different graphic types without requiring manual settings by the user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156353A_ABST
    Figure CN122156353A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a graphic lead generation method, a processing device, a system and a storage medium. The method comprises: obtaining preset lead attribute information; obtaining a target graphic of a lead to be generated and a graphic type corresponding to the target graphic; determining a lead type corresponding to the target graphic according to the graphic type and lead type indication information; and generating a lead corresponding to the target graphic according to the lead type corresponding to the target graphic. In this way, on the one hand, by obtaining the graphic type corresponding to the target graphic of the lead to be generated and containing the lead type indication information in the lead attribute information, the lead type corresponding to the target graphic can be more accurately determined for different graphic types, thereby improving the accuracy of lead generation. On the other hand, the automatic generation of the lead can be realized for graphics of different graphic types, without the need for manual setting of the lead by the user, while ensuring the lead setting efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of laser technology, and more specifically, to a method, processing equipment, system, and computer-readable storage medium for generating patterned leads. Background Technology

[0002] Currently, in the field of lasers, users often need to use blade cutting or cutting functions to cut and engrave parts of different sizes on a sheet of material. In order to ensure that the parts are free of any defects and retain their integrity, it is necessary to set guide lines for all the cutting objects on the drawing. Cutting according to the guide lines during the cutting process can produce complete parts.

[0003] In related technologies, when setting graphic leaders, in order to ensure the efficiency of graphic leader setting, graphic leaders are usually automatically generated by pre-setting fixed relevant parameters. However, the accuracy of this automated generation method cannot be guaranteed. While the manual setting method can guarantee accuracy, the efficiency of graphic leader setting is poor. Therefore, it is difficult to guarantee both the efficiency and accuracy of graphic leader setting at the same time. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this application provide a method, processing equipment, system, and storage medium for generating graphic leads, which can improve the efficiency of graphic lead setting while ensuring the accuracy of graphic lead setting.

[0005] According to one aspect of the embodiments of this application, a method for generating graphic leaders is provided, comprising: acquiring preset leader attribute information; the preset leader attribute information including leader type indication information, wherein the leader type is used to indicate whether a leader is generated inside or outside the graphic; acquiring a target graphic for which a leader is to be generated, and a graphic type corresponding to the target graphic; determining the leader type corresponding to the target graphic based on the graphic type and the leader type indication information; and generating the leader corresponding to the target graphic based on the leader type corresponding to the target graphic.

[0006] In another exemplary embodiment, determining the leader type corresponding to the target graphic based on the graphic type and the leader type indication information includes: when the graphic type is a nested graphic, determining the level of each graphic in the nested graphic; wherein the nested graphic includes at least two graphics with an inclusion relationship, and the level is used to characterize the internal and external relationship between each graphic in the nested graphic; determining the leader type of each graphic in the nested graphic based on the leader type indication information and the level of each graphic in the nested graphic; and when the graphic type is an independent graphic, determining the leader type corresponding to the leader type indication information as the leader type corresponding to the independent graphic.

[0007] In another exemplary embodiment, the lead type indication information includes workpiece region indication information; determining the lead type of each graphic in the nested graphic based on the lead type indication information and the layer of each graphic in the nested graphic includes: obtaining the workpiece region contained in the nested graphic based on the workpiece region indication information; if the outer layer graphic of each workpiece region in the nested graphic is an odd-level graphic, then the lead type corresponding to the odd-level graphic in the nested graphic is determined to be an outer lead, and the lead type corresponding to the even-level graphic is determined to be an inner lead; if the outer layer graphic of each workpiece region in the nested graphic is an even-level graphic, then the lead type corresponding to the odd-level graphic in the nested graphic is determined to be an inner lead, and the lead type corresponding to the even-level graphic is determined to be an outer lead.

[0008] In another exemplary embodiment, the lead type indication information includes a target lead type; determining the lead type of each graphic in the nested graphic based on the lead type indication information and the level of each graphic in the nested graphic includes: determining the lead type of a graphic of a first level type in the nested graphic as the target lead type; determining the lead type of a graphic of a second level type in the nested graphic as a lead type opposite to the target lead type; wherein the difference between the level corresponding to the first level type and the level of the outermost graphic in the nested graphic is an even number, and the difference between the level corresponding to the second level type and the level of the outermost graphic in the nested graphic is an odd number.

[0009] In another exemplary embodiment, determining the level of each graphic in the nested graphic includes: constructing a graphic tree corresponding to the nested graphic based on the inclusion relationship between each graphic in the nested graphic; wherein, in the graphic tree, the graphic corresponding to the first node is the graphic directly included by the graphic corresponding to the second node, and the first node is a child node of the second node; and determining the level of each graphic in the nested graphic in the graphic tree as the level of each graphic in the nested graphic.

[0010] In another exemplary embodiment, obtaining the graphic type corresponding to the target graphic includes: obtaining the graphic positional relationship corresponding to the target graphic; and determining the graphic type corresponding to the target graphic based on the graphic positional relationship corresponding to the target graphic.

[0011] In another exemplary embodiment, the target graphic includes multiple graphics; obtaining the graphic positional relationship corresponding to the target graphic includes: obtaining the bounding boxes corresponding to the multiple graphics respectively, thus obtaining multiple bounding boxes; obtaining and determining the graphic positional relationship corresponding to the target graphic based on the positional relationship between the multiple bounding boxes; determining the graphic type corresponding to the target graphic based on the graphic positional relationship corresponding to the target graphic includes: if there is an inclusion relationship in the determined graphic positional relationship, then the graphic type corresponding to the graphic with the inclusion relationship is determined as a nested graphic; if there is an independence relationship in the determined graphic positional relationship, then the graphic type corresponding to the graphic with the independence relationship is determined as an independent graphic.

[0012] In another exemplary embodiment, determining the graphic positional relationship corresponding to the target graphic based on the positional relationship between the plurality of bounding boxes includes: if the positional relationship between any bounding box and another bounding box is non-intersecting, determining whether all endpoints of the first graphic are within the second graphic; wherein the first graphic is the graphic corresponding to any bounding box, and the second graphic is the graphic corresponding to the other bounding box; if all endpoints of the first graphic are within the second graphic, determining that the graphic positional relationship between the first graphic and the second graphic is an inclusion relationship, then determining that the graphic positional relationship corresponding to the target graphic exists an inclusion relationship; if none of the endpoints of the first graphic are within the second graphic, determining that the graphic positional relationship corresponding to the first graphic is an independent relationship, then determining that the graphic positional relationship corresponding to the target graphic exists an independent relationship.

[0013] In another exemplary embodiment, after generating leads corresponding to the target graphics according to the lead types corresponding to the target graphics respectively, the method further includes: performing processing interference detection on the generated graphic leads; and adjusting the graphic leads if processing interference exists.

[0014] In another exemplary embodiment, processing interference detection is performed on the generated graphic leader, including: if there are other intersection points between the graphic leader and the graphic to which the graphic leader belongs, except for the leader's end point, then it is determined that the graphic leader has processing interference; if there are no other intersection points between the graphic leader and the graphic to which the graphic leader belongs, but there are intersection points with other graphics, then it is determined that the graphic leader has processing interference; if there are no other intersection points between the graphic leader and the graphic to which the graphic leader belongs, and there are no intersection points with other graphics, then it is determined that the graphic leader does not have processing interference.

[0015] In another exemplary embodiment, when there is processing interference with the graphic lead, adjusting the graphic lead includes: adjusting the attribute parameters of the graphic lead until there is no processing interference with the graphic lead; wherein the attribute parameters include at least one of lead length, lead end point position, and lead angle.

[0016] In another exemplary embodiment, after generating the lead wire corresponding to the target graphic according to the lead wire type corresponding to the target graphic, the method further includes: in response to an editing operation on the target graphic, obtaining the target graphic edited based on the editing operation, and displaying the edited target graphic on a display interface; and regenerating the lead wire corresponding to the target graphic on the display interface based on the edited target graphic.

[0017] In another exemplary embodiment, after obtaining the target graphic for which the lead wire is to be generated, the method further includes: in response to an attribute parameter setting operation for the lead wire corresponding to the target graphic, generating the lead wire corresponding to the target graphic on a display interface based on the set attribute parameters; wherein the attribute parameters include at least one of lead wire type, lead wire length, lead wire end point position, and lead wire angle.

[0018] In another exemplary embodiment, after obtaining the target graphic to which the leader is to be generated, the method further includes: in response to a leader drawing mode setting operation for the target graphic, displaying a leader drawing window corresponding to the target graphic on a display interface; and in response to a click operation on the target graphic in the leader drawing window, determining the line segment obtained by the click operation as the leader corresponding to the target graphic.

[0019] According to one aspect of the embodiments of this application, a processing device is provided, comprising: a slide rail; a processing head slidably disposed on the slide rail; a communication component for receiving a lead wire corresponding to a target pattern obtained from the steps of the above method; and a controller for controlling the processing head to move on the slide rail for processing based on the lead wire corresponding to the target pattern.

[0020] According to one aspect of the embodiments of this application, a system is provided, comprising: a processing device, the processing device including a processing device base plate and a processing head, the processing device base plate including a processing area for placing materials, the processing head being used to move on the processing area; and a terminal device communicating with the processing device, the terminal device being used to perform the above-described method for generating graphic leads.

[0021] According to one aspect of the present application, a computer-readable storage medium is provided, wherein the computer program, when executed by a processor, implements the graphic lead generation method as described above.

[0022] In the technical solution provided by the embodiments of this application, on the one hand, by obtaining the graphic type corresponding to the target graphic to be generated, and based on the lead type indication information included in the lead attribute information, the lead type corresponding to the target graphic can be determined more accurately for different graphic types, thereby improving the accuracy of lead generation; on the other hand, the automatic generation of leads can be realized for graphics of different graphic types, without requiring users to manually set the leads, thus ensuring the efficiency of lead setting; thereby simultaneously ensuring the efficiency and accuracy of graphic lead setting.

[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0024] 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. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0025] Figure 1 This is a schematic diagram of the implementation environment involved in this application;

[0026] Figure 2 This is a flowchart illustrating a graphical lead generation method in an exemplary embodiment of this application;

[0027] Figure 3 This is a schematic diagram illustrating the positional relationship of different graphics provided in an exemplary embodiment of this application;

[0028] Figure 4 This is a schematic diagram illustrating the positional relationship of different graphics provided in another exemplary embodiment of this application;

[0029] Figure 5 yes Figure 2 The flowchart of step S230 in the illustrated embodiment is a method for determining the lead type corresponding to a plurality of patterns in an exemplary embodiment;

[0030] Figure 6 This is a schematic diagram illustrating nested graphics in an exemplary embodiment of this application;

[0031] Figure 7 yes Figure 5 The flowchart of step S520 in the illustrated embodiment is a method for determining the lead type of each graphic in a nested graphic in an exemplary embodiment;

[0032] Figure 8 This is a schematic diagram of nested graphics shown in another exemplary embodiment of this application;

[0033] Figure 9 yes Figure 5 The flowchart of step S520 in the illustrated embodiment is a method for determining the lead type of each graphic in a nested graphic in another exemplary embodiment;

[0034] Figure 10 This is a flowchart illustrating a graphical lead generation method in another exemplary embodiment of this application;

[0035] Figure 11 This is a flowchart illustrating a graphical lead generation method in yet another exemplary embodiment of this application;

[0036] Figure 12 This is a schematic diagram of the structure of a pattern lead generation apparatus shown in an exemplary embodiment of this application;

[0037] Figure 13 This is a schematic diagram of the structure of a processing device shown in an exemplary embodiment of this application;

[0038] Figure 14 This is a schematic diagram of the system structure shown in an exemplary embodiment of this application;

[0039] Figure 15 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments identical to those described in this application. Rather, they are merely examples of apparatuses and methods identical to some aspects of this application as detailed in the appended claims.

[0041] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented as application programs, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0042] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0043] It should be noted that "multiple" as mentioned in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0044] First, it should be noted that the embodiments of this application relate to the field of laser technology, and the electronic devices in the embodiments of this application are terminal devices or servers, etc. Specifically, the terminal device is a computer, PC, or mobile phone, etc., with an editor installed.

[0045] The following is an introduction and explanation of several terms and background technology involved in this application:

[0046] The editor is XCS (xTool Creative Space), which integrates design, editing, and machine control functions.

[0047] The editor's design features provide a wealth of design elements and tools, such as a shape library (including borders, plants, animals, holidays, etc.), text editing (supporting text bending, generating barcodes and QR codes, etc.), and image uploading and processing (supporting multiple formats such as XCS, SVG, DXF, PNG, JPG, BMP, etc.). Additionally, the editor supports freehand drawing, allowing users to create designs on tablets and convert bitmaps and sketches into vector paths.

[0048] The editor's editing functions are used for vector editing; the object list function allows users to perform more advanced editing operations; the center alignment function helps users quickly align multiple objects; it also supports multi-layer editing and has added a layer hiding function, making it more efficient when dealing with multi-layer designs.

[0049] The editor's machine control function allows users to directly control laser equipment for processing operations via XCS, achieving a seamless transition from design to manufacturing. Simultaneously, the editor supports wireless connectivity, enabling users to edit and process data from anywhere using mobile devices or computers, improving work efficiency.

[0050] Furthermore, the editor offers community features, allowing users to access projects within the community through XCS, obtaining numerous user-created project ideas, tutorials, and free design files to inspire their creativity. The community may also contain user-shared usage tips, FAQs, and other resources to help users better utilize the XCS editor. By integrating design, editing, and machine control functions, the editor provides users with an efficient and convenient workflow experience. With continuous software updates and iterations, the editor will constantly introduce new features and optimize existing ones to meet evolving user needs. It offers users a one-stop solution from design to processing, helping them achieve efficient and precise laser processing operations through rich design elements, powerful editing tools, and convenient machine control functions.

[0051] A bounding box is the smallest rectangle that can completely enclose a given region of a two-dimensional graphic. This rectangle is commonly used in fields such as graphics processing, computer vision, and game development to simplify the calculation of spatial relationships between graphics and collision detection.

[0052] The bounding box of a two-dimensional graphic can typically be represented by its top-left and bottom-right corner coordinates. By specifying the top-left and bottom-right corner coordinates of the bounding box, a rectangle can be uniquely identified. In this embodiment, the top-left corner coordinate of the graphic's bounding box includes the minimum x-coordinate and the maximum y-coordinate among all endpoints of the graphic; the bottom-right corner coordinate includes the maximum x-coordinate and the minimum y-coordinate among all endpoints of the graphic. For rotatable bounding boxes, their center point, width, height, and rotation angle also need to be specified.

[0053] Leader line: A leader line is an extra cutting line extending from the starting point of the cut to the outside or inside of the outline of the part. Its function is to ensure that the starting point of the laser cut is not on the outline of the part, thereby avoiding any imperfections or defects that may occur at the starting point.

[0054] Inner leader: A leader whose cutting start point is set inside the graphic.

[0055] Outer Leader: A leader that cuts seven points and is placed outside the graphic.

[0056] Nested graphics: Nested graphics refer to graphics that contain or nest one or more smaller graphics within a larger graphic.

[0057] Processing interference detection: Used to identify and prevent defects in the cut workpiece caused by the intersection of the lead wire and the pattern during the laser cutting process.

[0058] Currently, in related technologies, when setting graphic leaders, in order to ensure the efficiency of graphic leader setting, the graphic leaders are usually automatically generated by pre-setting fixed relevant parameters. However, the accuracy of this automated generation method cannot be guaranteed. While the manual setting method can guarantee accuracy, the efficiency of graphic leader setting is poor. Therefore, it is difficult to guarantee both the efficiency and accuracy of graphic leader setting at the same time.

[0059] Based on this, this application proposes a fire extinguishing control method, device, electronic device, and computer storage medium for cutting equipment. The aim is to acquire preset lead wire attribute information when generating graphic leads; the preset lead wire attribute information includes lead wire type indication information, which indicates whether the lead wire is generated inside or outside the graphic; acquire the target graphic to be generated and the corresponding graphic type; determine the lead wire type corresponding to the target graphic based on the graphic type and the lead wire type indication information; and generate the lead wire corresponding to the target graphic based on the lead wire type. This enables accurate and automated lead wire generation for graphics of different types, while ensuring lead wire setting efficiency and accuracy.

[0060] Please see Figure 1 , Figure 1 This is a schematic diagram of an exemplary implementation environment of this application. Figure 1 As shown, the implementation environment includes a terminal device 110 and a server 120. A wired or wireless communication connection is pre-established between the terminal device 110 and the server 120.

[0061] Terminal device 110 can be an electronic device with a front-end interface, such as a mobile phone, computer, or computer, but is not limited to this. Terminal device 110 can refer to one of multiple terminals; this embodiment only uses terminal device 110 as an example. Those skilled in the art will know that the number of terminals can be more or less. For example, there may be only one terminal, or there may be dozens or hundreds of terminals, or even more. In this case, the implementation environment of the above-mentioned graphic lead generation method also includes other terminals. This application embodiment does not limit the number or type of terminal devices. The user can input the image to be processed to the server through the front-end interface of terminal device 110. The server 120 determines multiple graphics in the image to be processed that need to generate leads, determines the positional relationship between the graphics, determines the graphic type corresponding to the graphics based on the positional relationship, determines the lead type corresponding to the graphics based on the graphic type and lead type indication information, and finally generates the lead corresponding to the graphic based on the lead type.

[0062] In another embodiment, the terminal device 110 is equipped with an editor. The terminal device 110 can obtain preset lead wire attribute information and the target graphic to be generated, as well as the graphic type corresponding to the target graphic, through the installed editor. Then, based on the graphic type and lead wire type indication information, the lead wire type corresponding to the target graphic is determined. Finally, the lead wire corresponding to the target graphic is generated based on the lead wire type corresponding to the target graphic.

[0063] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0064] Please see Figure 2 , Figure 2 This is a flowchart illustrating a graphical lead generation method in an exemplary embodiment of this application. This method can be applied to electronic devices, including but not limited to computers, tablets, or mobile phones.

[0065] The following section will describe in detail the graphic lead generation method proposed in the embodiments of this application, using a computer as the specific execution subject.

[0066] like Figure 2 As shown, in an exemplary embodiment, the graphic leader generation method includes at least steps S210 to S240, which are described in detail below:

[0067] Step S210: Obtain preset lead wire attribute information.

[0068] In this embodiment, the preset lead attribute information includes lead type indication information, whereby the lead type indicates whether the lead is generated inside or outside the graphic. That is, the lead type includes outer leads or inner leads.

[0069] In addition, the preset leader attribute information includes not only the leader type indication information, but also information such as the length, angle, and position of the generated leader. The angle of the generated leader refers to the angle between it and the corresponding graphic. The position of the generated leader includes the starting point and ending point. The starting point is the cutting start point, and the ending point is the intersection of the leader and the graphic outline.

[0070] In some embodiments, the lead wire attribute information can be preset by the user in the editor used to control the laser cutting machine, that is, a default lead wire type is set; for example, an external lead wire. In this way, when the positional relationship between the graphics is identified as independent graphics, the corresponding external lead wire is directly generated for the independent graphics according to the length, angle and position in the preset lead wire attribute information.

[0071] Step S220: Obtain the target graphic of the lead wire to be generated, and the graphic type corresponding to the target graphic.

[0072] In this embodiment, a computer can receive an image uploaded by a user through an editor. The image includes at least one graphic, and the at least one graphic in the image is determined as the target graphic for generating a lead. In some embodiments, the target graphic for generating a lead may include only one graphic, or it may include multiple graphics with different positional relationships.

[0073] It is important to understand that when the target graphic to be generated consists of multiple graphics with different positional relationships, the positional relationships between the graphics in this embodiment include independent relationships and inclusion relationships. In the field of laser technology, when cutting the material to be processed using a laser cutting machine, the graphics are usually first arranged in the material to be processed, and then the graphics are used to generate the leads. When arranging the graphics, if the positional relationship between multiple graphics is intersecting, it is necessary to first determine whether the graphics need to be broken up. If it is determined that the graphics need to be broken up, the multiple graphics with intersecting relationships are split into individual graphics, and then the split individual graphics are used as the layout objects for arrangement. If it is determined that the graphics do not need to be broken up, the multiple graphics with intersecting relationships are treated as a whole, and the outermost contour is extracted as the layout object for arrangement. When arranging multiple graphics with inclusion relationships, corresponding reference points are determined on each of the multiple graphics, and then the contour of the outermost graphic among the multiple graphics with inclusion relationships is directly used as the layout object for arrangement. Then, according to the position of the reference points, the other graphics among the multiple graphics are arranged within the outermost graphic.

[0074] Therefore, for intersecting graphics, regardless of whether the graphics are to be broken up, they are all individual layout objects when laying out the layout. Thus, when drawing the graphic leader lines, the positional relationship between the graphics can only have two cases: independent relationship and containment relationship.

[0075] Furthermore, obtaining the graphic type corresponding to the target graphic includes: obtaining the graphic positional relationship corresponding to the target graphic; and determining the graphic type corresponding to the target graphic based on the graphic positional relationship corresponding to the target graphic.

[0076] It is understood that the target graphic to be generated as a lead in this embodiment can be a single graphic or multiple graphics. When multiple graphics exist, the positional relationships between them may differ, resulting in different graphic types. These graphics may be independent, intersecting, or contain each other. Therefore, the positional relationships between the graphics allow for a more accurate determination of the graphic type corresponding to the target graphic.

[0077] For example, when the target graphic to which the leader is to be generated includes multiple graphics, the positional relationship between the corresponding graphics can be obtained in the following way:

[0078] Step S221: Obtain the bounding boxes corresponding to the multiple graphics respectively, and obtain multiple bounding boxes;

[0079] Step S222: Obtain and determine the positional relationship between multiple graphics based on the positional relationship between multiple bounding boxes.

[0080] Furthermore, when the target graphic to be generated includes multiple graphics, the graphic type of the target graphic can be determined based on the positional relationship of the corresponding graphics in the following way:

[0081] Step S223: If there is an inclusion relationship in the determined graphic positional relationship, then the graphic type corresponding to the graphic with the inclusion relationship is determined as a nested graphic.

[0082] Step S224: If there is an independent relationship among the determined graphic positional relationships, then the graphic type corresponding to the graphic with the independent relationship is determined as an independent graphic.

[0083] In some embodiments, if there is an independent relationship among the determined graphic positional relationships, then the graphic type corresponding to the graphic with the independent relationship is determined to be an independent graphic.

[0084] For example, the positional relationship of the target graphic can be determined based on the positional relationship between multiple bounding boxes in the following way: if the positional relationship between any bounding box and another bounding box is non-intersecting, determine whether all endpoints of the first graphic are within the second graphic; wherein, the first graphic is the graphic corresponding to any bounding box, and the second graphic is the graphic corresponding to another bounding box.

[0085] In some embodiments, if all endpoints of the first graphic are within the second graphic, and the graphic positional relationship between the first graphic and the second graphic is determined to be an inclusion relationship, then the graphic positional relationship corresponding to the target graphic is determined to have an inclusion relationship.

[0086] In some embodiments, if all endpoints of the first image are not within the second image, and the positional relationship of the graphics corresponding to the first image is determined to be independent, then the positional relationship of the graphics corresponding to the target image is determined to be independent.

[0087] For example, combining Figure 3 As shown, Figure 3 This is a schematic diagram illustrating the positional relationship between different graphics provided in an exemplary embodiment of this application.

[0088] Figure 3 In the diagram, the bounding boxes of the first and second shapes are non-intersecting. When the first and second shapes are in an containment relationship, as shown in the diagram, all endpoints of the first shape are within the second shape. When the first and second shapes are independent, there are two cases: In the first case, the bounding box of the first shape is outside the bounding box of the second shape, and they do not intersect; in this case, all endpoints of the first shape are outside the second shape. In the second case, the bounding box of the first shape is inside the bounding box of the second shape, and they do not intersect; in this case, all endpoints of the first shape are outside the second shape.

[0089] For example, the positional relationship between graphics can also be determined based on the positional relationship between bounding boxes in the following way: if, among multiple bounding boxes, any bounding box intersects with another bounding box, determine whether there are at least two different intersection points between the first graphic and the second graphic, thereby determining the positional relationship between the first graphic and the second graphic. Here, the first graphic is the graphic corresponding to any bounding box, and the second graphic is the graphic corresponding to another bounding box.

[0090] In some embodiments, if there are no at least two different intersection points between the first graphic and the second graphic, the positional relationship between the first graphic and the second graphic is determined to be an independent relationship.

[0091] For example, combining Figure 4 As shown, Figure 4 This is a schematic diagram of different graphic positional relationships provided by another exemplary embodiment of this application. Figure 4 In the case where the bounding box of the first graphic and the bounding box of the second graphic are intersecting, and the bounding box of the first graphic and the second graphic are independent, there are no at least two distinct intersection points between the first graphic and the second graphic.

[0092] Step S230: Determine the lead type corresponding to the target graphic based on the graphic type and lead type indication information.

[0093] For example, in the embodiments of this application, the lead type corresponding to the target graphic can be determined in the following way: when the graphic type is an independent graphic, if the lead type indication information is that the lead is generated outside the graphic, then the lead type corresponding to the independent graphic is determined to be an external lead.

[0094] For example, it can also be done through Figure 5 The process in determining the lead type corresponding to the target graphic is as follows:

[0095] Please see Figure 5 , Figure 5 yes Figure 2 The flowchart of step S230 in the illustrated embodiment, which describes a method for determining the lead type corresponding to a target pattern in an exemplary embodiment, includes at least steps S510 to S520, as detailed below:

[0096] Step S510: When the graphic type is a nested graphic, determine the level of each graphic in the nested graphic; wherein, the nested graphic includes at least two graphics with an inclusion relationship, and the level is used to characterize the internal and external relationship between each graphic in the nested graphic.

[0097] It is understood that the nested graphics in the embodiments of this application include at least two graphics that have an inclusion relationship. The internal and external relationship between the two can be determined by judging whether one graphic is directly included by another graphic. That is, if one graphic is directly included by another graphic and there are no other graphics between them, then one graphic is inside the other graphic.

[0098] In this embodiment of the application, the hierarchy of each graphic in a nested graphic can be determined in the following way:

[0099] Step S511: Based on the inclusion relationship between the graphics in the nested graphics, construct the graphics tree corresponding to the nested graphics; wherein, in the graphics tree, the graphics corresponding to the first node are the graphics directly contained in the graphics corresponding to the second node, and the first node is a child node of the second node.

[0100] Step S512: Determine the level of each graphic in the nested graphic within the graphic tree as the level of each graphic in the nested graphic.

[0101] It is understood that, in this embodiment of the application, the shape corresponding to the outermost bounding box of each shape in the nested shapes is determined as the root node of the shape tree; if the shape corresponding to the root node directly contains another shape, then the shape directly contained in the shape corresponding to the root node is determined as the child node of the root node, that is, the root node is the second node and the child node is the first node. This process continues, traversing all the shapes corresponding to the bounding boxes from the outside in, until all the shapes corresponding to the bounding boxes have been traversed.

[0102] For example, combining Figure 6 As shown, Figure 6 This is a schematic diagram illustrating nested graphics in an exemplary embodiment of this application; Figure 6 In this nested graph, the first graph directly contains the second, third graph a, and third graph b; the second graph directly contains the fourth graph a, fourth graph b, and fifth graph. The first graph's bounding box is the outermost bounding box of all graphs, therefore the first graph is determined as the root node of the graph tree. Since the first graph directly contains the second, third graph a, and third graph b, the first graph is determined as the second node, and the second, third, and third graph a and third graph b are determined as the first node, i.e., the child nodes of the second node. Similarly, since the second graph directly contains the fourth, fourth, and fifth graphs, the second graph is determined as the second node, and the fourth, fourth, and fifth graphs are determined as the first node, i.e., the child nodes of the second node. After traversal, the graph tree is obtained. In this graph tree, the first level is the first graph, the second level is the child nodes under the first graph, including the second, third, and third graph a, and third graph b; and the third level is the child nodes under the second graph, including the fourth, fourth, and fifth graphs.

[0103] In some embodiments, the level of the graphic corresponding to the outermost bounding box is the first level, the level of the graphics of the child nodes of the first level is the second level, the level of the graphics of the child nodes of the second level is the third level, and so on, until the level of all graphics in the graphic tree is determined. After traversing all graphics in the nested graphics, the graphic tree is constructed based on the determined nodes and the level of the graphics.

[0104] Step S520: Determine the lead type of each graphic in the nested graphic based on the lead type indication information and the level of each graphic in the nested graphic.

[0105] It is understandable that nested graphics are complex because they consist of at least two contained graphics. If the corresponding leader type is generated solely based on the preset leader type indication information, incorrect leader lines may be generated. In this embodiment, in addition to the leader type indication information, the different hierarchical levels of the graphics within the nested graphics are also considered. This allows for a more accurate determination of the leader type of each graphic within the nested graphics, resulting in more accurate leader line generation.

[0106] Step S530: When the graphic type is an independent graphic, the lead type corresponding to the lead type indication information is determined to be the lead type corresponding to the independent graphic.

[0107] It is understandable that if the image type is an independent graphic, then the target graphic is considered to be a simple graphic. In this case, the leader type indicated by the leader type information can be directly determined as the leader type corresponding to the independent graphic.

[0108] Step S240: Generate the lead wire corresponding to the target graphic based on the lead wire type corresponding to the target graphic.

[0109] For example, the preset lead wire attribute information includes, in addition to lead wire type indication information, information such as the length, angle, and position of the generated lead wire. After determining the lead wire type, the lead wire corresponding to the target graphic is generated according to the lead wire length, angle, and position in the preset lead wire attribute information.

[0110] For example, for different shapes, such as nested shapes and independent shapes, the midpoint of a random line segment can be selected as the leader end point, and corresponding leaders can be generated based on the length, angle, and position of the generated leaders. Specifically, for each shape in a nested shape, the midpoint of a random line segment is selected as the leader end point.

[0111] By employing the graphic leader generation method provided in this application embodiment, on the one hand, the graphic type corresponding to each graphic can be obtained more accurately through the positional relationship between the graphics, enabling the recognition of complex graphics; then, based on the graphic type and the corresponding leader type indication information, a more accurate leader type can be determined. When the target graphic includes multiple graphics, it is easier to generate the leaders corresponding to each graphic more accurately, thereby improving the accuracy of leader generation; on the other hand, the automatic generation of leaders can be achieved for graphics of different graphic types, eliminating the need for users to manually set leaders, thus ensuring the efficiency of leader setting; thereby simultaneously ensuring the efficiency and accuracy of graphic leader setting.

[0112] Please see Figure 7 , Figure 7 yes Figure 5 The flowchart of step S520 in the illustrated embodiment, which describes a method for determining the lead type of each graphic in a nested graphic in an exemplary embodiment, includes at least steps S710 to S730, as detailed below:

[0113] Step S710: Obtain the area to which the workpiece belongs, contained in the nested graphic, based on the workpiece area indication information.

[0114] It should be understood that the lead type indication information in the embodiments of this application also includes workpiece area indication information, which is used to characterize the part of the workpiece that the user actually needs in the nested graphics.

[0115] Step S720: If the outer layer graphic of each workpiece region in the nested graphic is an odd-level graphic, then determine that the lead type corresponding to the odd-level graphic in the nested graphic is an outer lead, and the lead type corresponding to the even-level graphic is an inner lead.

[0116] For example, combining Figure 8 As shown, Figure 8 This is a schematic diagram of nested graphics shown in another exemplary embodiment of this application; Figure 8 The nested graphic consists of two concentric circles. If the outer circle is the first level and the inner circle is the second level, the workpiece's area indication information is a ring area, i.e., the shaded area in the nested graphic. In this case, the outer graphic of the ring area in the nested graphic is an odd-level graphic, i.e., the first level. Therefore, in this nested graphic, the lead type corresponding to the odd-level graphic is the outer lead, and the lead type corresponding to the even-level graphic is the inner lead. This ensures that the graphic cut from the material to be processed according to the lead meets the user's requirements, i.e., a complete ring is cut out.

[0117] Step S730: If the outer layer graphic of each workpiece region in the nested graphic is an even-level graphic, then determine that the lead type corresponding to the odd-level graphic in the nested graphic is an inner lead, and the lead type corresponding to the even-level graphic is an outer lead.

[0118] Since hierarchical naming can also start from level zero, that is... Figure 8 In the nested graphics, the outer circle is at level zero, the inner graphic is at level one, and the workpiece's area indication information is a ring area, i.e., the shaded area in the nested graphics. At this time, the outer graphic of the ring area in the nested graphics is an even-level graphic, i.e., level zero. Therefore, in this nested graphics, the lead type corresponding to the odd-level graphics is the inner lead, and the lead type corresponding to the even-level graphics is the outer lead. This allows the graphics cut from the material to be processed according to the lead to meet the user's requirements, i.e., to cut out a complete ring, and also allows for more flexible naming of the graphic levels.

[0119] Please see Figure 9 , Figure 9 yes Figure 5 The flowchart of step S520 in the illustrated embodiment, which is a method for determining the lead type of each graphic in a nested graphic in another exemplary embodiment, includes at least steps S910 to S920, as detailed below:

[0120] Step S910: Determine the leader type of the first-level type of the nested graphics as the target leader type.

[0121] Step S920: Determine that the leader type of the second-level type of the nested graphic is the opposite of the target leader type. Specifically, the difference between the level corresponding to the first-level type and the level of the outermost graphic in the nested graphic is an even number, and the difference between the level corresponding to the second-level type and the level of the outermost graphic in the nested graphic is an odd number.

[0122] It should be understood that the lead type indication information in the embodiments of this application also includes the target lead type; the target lead type is used to characterize the preset default lead type. In some embodiments, the target lead type is an outer lead, and the lead type opposite to the target lead type is an outer lead.

[0123] For example, in this embodiment of the application, the target lead type is an outer lead. The hierarchical naming of each graphic in the nested graphic is ordered from the outside to the inside in order from low to high. For example, the level of the outermost graphic in the nested graphic is the first level, the level of the graphic directly contained by the first level graphic is the second level, the level of the graphic directly contained by the second level graphic is the third level, and so on, until the level of all graphics is determined.

[0124] Please see Figure 10 , Figure 10 This is a flowchart illustrating a graphical lead generation method in another exemplary embodiment of this application; as shown below. Figure 10 As shown, the method is in Figure 2 The illustrated embodiment also includes steps S1010 to S1020, which are described in detail below:

[0125] Step S1010: Perform processing interference detection on the generated graphic leads.

[0126] Understandably, machining interference detection refers to determining whether the generated graphic leaders intersect with other graphics. Since the leaders of different graphics in nested graphics are generated according to fixed leader lengths and angles, and the spacing between different graphics may vary, machining interference detection of graphic leaders can effectively avoid workpiece machining defects caused by leader generation errors, facilitating the acquisition of complete workpieces.

[0127] For example, embodiments of this application can perform processing interference detection on the generated patterned leads through the following process:

[0128] Step S1011: Determine whether there are any intersection points between the graphic leader and the graphic to which the graphic leader belongs, other than the end point of the leader;

[0129] Step S1012: If there are other intersections between the graphic leader and the graphic to which the graphic leader belongs, it is determined that there is processing interference in the graphic leader;

[0130] Step S1013: If there are no other intersections between the graphic leader and the graphic to which the graphic leader belongs, then determine whether there are intersections between the graphic leader and other graphics.

[0131] Step S1014: If there are intersections between the graphic leader and other graphics, it is determined that there is processing interference in the graphic leader;

[0132] Step S1015: If there is no intersection between the graphic leader and other graphics, it is determined that there is no processing interference between the graphic leader and other graphics.

[0133] In this way, by determining whether there are intersections between the graphic leader and its own graphic, as well as other graphics, the processing interference detection of the graphic leader can be achieved more comprehensively, thus ensuring the accuracy of the graphic leader generation.

[0134] For example, to determine whether there are any intersection points between a graphic leader and the graphic to which the leader belongs, other than the leader's endpoint, we can check if the bounding box of the graphic leader intersects with or contains the bounding boxes of the graphic. If the two bounding boxes do not intersect or contain each other, then it is determined that the graphic leader cannot intersect with any other graphic. In this way, by using the positional relationship between the bounding boxes, machining interference detection can be quickly achieved, supporting real-time interference checks on generated leaders, improving leader setup efficiency, and providing users with a better machining experience.

[0135] Step S1020: If there is processing interference in the graphic lead line, adjust the graphic lead line.

[0136] In some embodiments, when machining interference exists in the graphic leader, the graphic leader is adjusted, including: adjusting the attribute parameters of the graphic leader until machining interference is eliminated; wherein the attribute parameters include at least one of leader length, leader end point position, and leader angle. In this way, by adjusting the graphic leader with machining interference, automatic correction of the graphic leader is achieved, which improves the accuracy of generating graphic leaders and thus avoids defects in the machined workpiece caused by errors in graphic leader generation.

[0137] Please see Figure 11 , Figure 11 This is a flowchart illustrating a graphical lead generation method in another exemplary embodiment of this application; as shown below. Figure 11 As shown, the method is in Figure 2 The illustrated embodiment also includes steps S1110 to S1120, which are described in detail below:

[0138] Step S1110: In response to the editing operation on the target graphic, obtain the target graphic after editing based on the editing operation, and display the edited target graphic on the display interface.

[0139] Step S1120: Based on the edited target graphic, regenerate the leader lines corresponding to the target graphic on the display interface.

[0140] Understandably, after generating graphic leaders, users may perform editing operations on a particular graphic, such as inner / outer contour operations, merging operations, welding operations, nesting operations, node editing, or adding / deleting characters. The corresponding leader can be regenerated according to the default parameters, i.e., the preset leader attribute information; alternatively, the leader can be regenerated based on the graphic type of the edited target graphic. In this way, by regenerating the leader of the target graphic based on the edited target graphic, it is possible to support real-time updates of the leader after editing, ensuring the accuracy of the overall graphic leader generation.

[0141] Furthermore, after obtaining the target graphic to be generated as a leader, the graphic leader generation method also includes: responding to the attribute parameter setting operation for the leader corresponding to the target graphic, generating the leader corresponding to the target graphic on the display interface based on the set attribute parameters; wherein, the attribute parameters include at least one of leader type, leader length, leader end point position, and leader angle. In this way, users can directly input the corresponding leader attribute parameters in the editor's display interface, thereby realizing attribute parameter setting and automatically generating leaders based on the set leader attribute parameters, making leader generation more flexible.

[0142] Furthermore, after acquiring the target graphic to be generated as a leader, the graphic leader generation method also includes: in response to the leader drawing mode setting operation for the target graphic, displaying the leader drawing window corresponding to the target graphic on the display interface; and in response to a click operation on the target graphic in the leader drawing window, determining the line segment obtained by the click operation as the leader corresponding to the target graphic. In this way, in addition to the automatic leader generation method, users can also manually draw the corresponding leader on the display interface and confirm it by clicking, directly determining the manually drawn line segment as the leader corresponding to the target graphic, thus improving the flexibility of leader generation.

[0143] Please see Figure 12 , Figure 12This is a schematic diagram of a graphic leader generation device according to an exemplary embodiment of this application. The device includes: a first acquisition module 1210, a second acquisition module 1220, a determination module 1230, and a generation module 1240. The first acquisition module 1210 is configured to acquire preset leader attribute information; the preset leader attribute information includes leader type indication information, whereby the leader type indicates whether a leader is generated inside or outside the graphic. The second acquisition module 1220 is configured to acquire the target graphic for which the leader is to be generated, and the graphic type corresponding to the target graphic. The determination module 1230 is configured to determine the leader type corresponding to the target graphic based on the graphic type and the leader type indication information. The generation module 1240 is configured to generate the leader corresponding to the target graphic based on the leader type corresponding to the target graphic.

[0144] In some embodiments, the determining module 1230 is configured to determine the leader type corresponding to the target graphic based on the graphic type and leader type indication information in the following manner: when the graphic type is a nested graphic, determining the level of each graphic in the nested graphic; wherein, the nested graphic includes at least two graphics with an inclusion relationship, and the level is used to characterize the internal and external relationship between each graphic in the nested graphic; determining the leader type of each graphic in the nested graphic based on the leader type indication information and the level of each graphic in the nested graphic; when the graphic type is an independent graphic, determining the leader type corresponding to the leader type indication information as the leader type corresponding to the independent graphic.

[0145] In some embodiments, the lead type indication information includes workpiece area indication information; the determining module 1230 is configured to determine the lead type of each graphic in the nested graphic based on the lead type indication information and the level of each graphic in the nested graphic in the following manner: obtaining the workpiece area contained in the nested graphic based on the workpiece area indication information; if the outer graphic of each workpiece area in the nested graphic is an odd-level graphic, then the lead type corresponding to the odd-level graphic in the nested graphic is determined to be an outer lead, and the lead type corresponding to the even-level graphic is determined to be an inner lead; if the outer graphic of each workpiece area in the nested graphic is an even-level graphic, then the lead type corresponding to the odd-level graphic in the nested graphic is determined to be an inner lead, and the lead type corresponding to the even-level graphic is determined to be an outer lead.

[0146] In some embodiments, the lead type indication information includes a target lead type; the determining module 1230 is configured to determine the lead type of each graphic in the nested graphic based on the lead type indication information and the level of each graphic in the nested graphic in the following manner: determining that the lead type of the graphic of the first level type in the nested graphic is the target lead type; determining that the lead type of the graphic of the second level type in the nested graphic is the opposite of the target lead type; wherein, the difference between the level corresponding to the first level type and the level of the outermost graphic in the nested graphic is an even number, and the difference between the level corresponding to the second level type and the level of the outermost graphic in the nested graphic is an odd number.

[0147] In some embodiments, the determining module 1230 is further configured to determine the level of each graphic in the nested graphic by: constructing a graphic tree corresponding to the nested graphic based on the inclusion relationship between each graphic in the nested graphic; wherein, in the graphic tree, the graphic corresponding to the first node is the graphic directly contained by the graphic corresponding to the second node, and the first node is a child node of the second node; and determining the level of each graphic in the nested graphic in the graphic tree as the level of each graphic in the nested graphic.

[0148] In some embodiments, the second acquisition module 1220 is configured to acquire the graphic type corresponding to the target graphic in the following ways: acquiring the graphic position relationship corresponding to the target graphic; and determining the graphic type corresponding to the target graphic based on the graphic position relationship corresponding to the target graphic.

[0149] In some embodiments, the target graphic includes multiple graphics; the second acquisition module 1220 is configured to acquire the graphic positional relationship corresponding to the target graphic in the following manner, including: acquiring the bounding boxes corresponding to the multiple graphics respectively to obtain multiple bounding boxes; acquiring and determining the graphic positional relationship corresponding to the target graphic based on the positional relationship between the multiple bounding boxes; determining the graphic type corresponding to the target graphic based on the graphic positional relationship corresponding to the target graphic, including: if there is an inclusion relationship in the determined graphic positional relationship, then the graphic type corresponding to the graphic with the inclusion relationship is determined as a nested graphic; if there is an independence relationship in the determined graphic positional relationship, then the graphic type corresponding to the graphic with the independence relationship is determined as an independent graphic.

[0150] In some embodiments, the second acquisition module 1220 is configured to determine the graphic positional relationship corresponding to the target graphic based on the positional relationship between multiple bounding boxes in the following manner: if the positional relationship between any bounding box and another bounding box is non-intersecting, determine whether all endpoints of the first graphic are within the second graphic; wherein the first graphic is the graphic corresponding to any bounding box, and the second graphic is the graphic corresponding to another bounding box; if all endpoints of the first graphic are within the second graphic, determine that the graphic positional relationship between the first graphic and the second graphic is an inclusion relationship, then determine that the graphic positional relationship corresponding to the target graphic has an inclusion relationship; if all endpoints of the first graphic are not within the second graphic, determine that the graphic positional relationship corresponding to the first graphic is an independent relationship, then determine that the graphic positional relationship corresponding to the target graphic has an independent relationship.

[0151] In some embodiments, the generation module 1240 is further configured to, after generating leads corresponding to the target graphics according to the lead types corresponding to the multiple graphics respectively, perform processing interference detection on the generated graphic leads; and adjust the graphic leads if processing interference exists.

[0152] In some embodiments, the generation module 1240 is configured to perform processing interference detection on the generated graphic leader in the following manner: if there are other intersection points between the graphic leader and the graphic to which the graphic leader belongs, except for the leader end point, then it is determined that the graphic leader has processing interference; if there are no other intersection points between the graphic leader and the graphic to which the graphic leader belongs, but there are intersection points with other graphics, then it is determined that the graphic leader has processing interference; if there are no other intersection points between the graphic leader and the graphic to which the graphic leader belongs, and there are no intersection points with other graphics, then it is determined that the graphic leader does not have processing interference.

[0153] In some embodiments, the generation module 1240 is further configured to adjust the graphic lead when there is processing interference, including: adjusting the attribute parameters of the graphic lead until there is no processing interference in the graphic lead; wherein the attribute parameters include at least one of lead length, lead end point position and lead angle.

[0154] In some embodiments, the generation module 1240 is further configured to, after generating the lead wire corresponding to the target graphic according to the lead wire type corresponding to the target graphic, the method further includes: in response to an editing operation on the target graphic, obtaining the target graphic edited based on the editing operation, and displaying the edited target graphic on a display interface; and regenerating the lead wire corresponding to the target graphic on the display interface based on the edited target graphic.

[0155] In some embodiments, the generation module 1240 is further configured to, after acquiring the target graphic to be generated, generate the corresponding lead on the display interface based on the set attribute parameters of the lead corresponding to the target graphic in response to the attribute parameter setting operation for the lead corresponding to the target graphic; wherein, the attribute parameters include at least one of lead type, lead length, lead end point position and lead angle.

[0156] In some embodiments, the generation module 1240 is further configured to, after acquiring the target graphic to be generated, in response to the leader drawing mode setting operation for the target graphic, display the leader drawing window corresponding to the target graphic on the display interface; and in response to the click operation on the target graphic in the leader drawing window, determine the line segment obtained by the click operation as the leader corresponding to the target graphic.

[0157] It should be noted that the graphic lead generation device and the graphic lead generation method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the graphic lead generation device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0158] Combination Figure 13 As shown, Figure 13 This is a schematic diagram of the structure of a processing device illustrated in an exemplary embodiment of this application. Figure 13 As shown, the processing equipment includes a housing, a processing head 50, a laser tube 30, a slide rail 80, a communication component 20, and a controller 60. The housing includes an upper shell 90 and a bottom shell 70. The processing head 50 is slidably mounted on the slide rail 80. The communication component 20 is used to receive leads corresponding to the target pattern obtained from the steps of the method provided in the above embodiments. Based on the leads corresponding to the target pattern, the controller 60 controls the movement of the processing head 50 on the slide rail 80 to process the surface of the material. The communication component 20 and the controller 60 are installed inside the backplate of the laser tube 30. Figure 13 It is not visible from a mid-range perspective, so it is shown by connecting the boxes with dashed lines.

[0159] In one embodiment, a reflector 10 is provided between the processing head 50 and the laser tube 30. The light beam generated by the laser tube 30 is reflected by the reflector 10 to the processing head 50 and then emitted after reflection and focusing to process the workpiece.

[0160] In one embodiment, the processing head 50 can generate a light spot. In another embodiment, the light spot can be generated by other components, such as the laser tube 30 of a carbon dioxide laser tube, and enter the beam emitting device through the reflector 10, etc., and finally exit through the processing head 50 to process the workpiece. The processing head can emit laser light, but it can do more than just emit laser light.

[0161] In one embodiment, the housing of the computer numerical control machine, i.e., Figure 13 The upper shell 90 and the bottom shell 70 shown together enclose an internal space for accommodating processing materials. The upper shell 90 and the bottom shell 70 can be detachably connected or fixedly connected, or the upper shell 90 and the bottom shell 70 can be integrally formed. In one embodiment, the upper shell 90 is also provided with a rotatable cover plate, which the operator can open or close to open the internal space to insert or remove processing materials.

[0162] The blocking and / or filtering effect of the upper shell 90 and the bottom shell 70 can prevent laser leakage from the processing head 50 during operation, thus preventing personal injury to the operator.

[0163] For example, such as Figure 13 As shown, the slide rail 80 is disposed in the aforementioned internal space, and the processing head 50 is mounted on the slide rail 80. The slide rail 80 can be an X-axis or Y-axis guide rail, which can be a linear guide rail or a guide rail in which an optical axis and a roller slide together, etc., as long as it can drive the processing head 50 to move and process on the X and Y axes. The processing head 50 can also be provided with a Z-axis moving track for focusing by moving in the Z-axis direction before and / or during processing.

[0164] Combination Figure 14 As shown, Figure 14 This is a schematic diagram of the system structure shown in an exemplary embodiment of this application. Figure 14 In this embodiment of the application, the system includes a processing device 130 and a terminal device 110 communicating with the processing device. The processing device includes a base plate and a processing head. The base plate includes a processing area for placing materials, and the processing head is used to move within the processing area. The terminal device includes devices such as computers, tablets, or mobile phones, and is used to execute the aforementioned graphic lead generation method.

[0165] Figure 15 A schematic diagram of a computer system suitable for implementing the terminal device of this application is shown. It should be noted that... Figure 15 The computer system 1500 of the terminal device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0166] like Figure 15As shown, the computer system 1500 includes a Central Processing Unit (CPU) 1501, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1502 or programs loaded from storage portion 1508 into Random Access Memory (RAM) 1503, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1503. The CPU 1501, ROM 1502, and RAM 1503 are interconnected via bus 1504. An Input / Output (I / O) interface 1505 is also connected to bus 1504.

[0167] The following components are connected to I / O interface 1505: an input section 1506 including a keyboard, mouse, etc.; an output section 1507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1508 including a hard disk, etc.; and a communication section 1509 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1509 performs communication processing via a network such as the Internet. A drive 1510 is also connected to I / O interface 1505 as needed. Removable media 1511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1510 as needed so that computer programs read from them can be installed into storage section 1508 as needed.

[0168] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1509, and / or installed from removable medium 1511. When the computer program is executed by central processing unit (CPU) 1501, it performs various functions defined in the system of this application.

[0169] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0170] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0171] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0172] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the graphic lead generation method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0173] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

Claims

1. A method for generating graphic leaders, characterized in that, include: Obtain preset lead attribute information; The preset lead attribute information includes lead type indication information, which indicates whether the lead is generated inside or outside the graphic. Obtain the target graphic of the lead to be generated, and the graphic type corresponding to the target graphic; Based on the graphic type and the lead type indication information, determine the lead type corresponding to the target graphic; Generate the corresponding lead wires for the target graphic based on the lead wire type corresponding to the target graphic.

2. The method according to claim 1, characterized in that, Based on the graphic type and the lead type indication information, the lead type corresponding to the target graphic is determined, including: When the graphic type is a nested graphic, the hierarchy of each graphic in the nested graphic is determined; wherein, the nested graphic includes at least two graphics with an inclusion relationship, and the hierarchy is used to characterize the internal and external relationships between each graphic in the nested graphic; Based on the lead type indication information and the level of each graphic in the nested graphic, determine the lead type of each graphic in the nested graphic; When the graphic type is an independent graphic, the lead type corresponding to the lead type indication information is determined as the lead type corresponding to the independent graphic.

3. The method according to claim 2, characterized in that, The lead type indication information includes workpiece area indication information; based on the lead type indication information and the layer of each graphic in the nested graphic, the lead type of each graphic in the nested graphic is determined, including: Based on the workpiece region indication information, obtain the workpiece region contained in the nested graphic; If the outer layer of the region to which each workpiece belongs in the nested graphics is an odd-level graphics, then the lead type corresponding to the odd-level graphics in the nested graphics is determined to be an outer lead, and the lead type corresponding to the even-level graphics is determined to be an inner lead. If the outer layer of the region to which each workpiece belongs in the nested graphics is an even-numbered layer, then the lead type corresponding to the odd-numbered layer graphics in the nested graphics is determined to be an inner lead, and the lead type corresponding to the even-numbered layer graphics is determined to be an outer lead.

4. The method according to claim 2, characterized in that, The lead type indication information includes the target lead type; based on the lead type indication information and the hierarchy of each graphic in the nested graphic, the lead type of each graphic in the nested graphic is determined, including: The leader type of the first-level type of the nested graphics is determined to be the target leader type; The leader type of the second-level type of the nested graphic is determined to be the opposite of the target leader type; wherein, the difference between the level corresponding to the first-level type and the level of the outermost graphic in the nested graphic is an even number, and the difference between the level corresponding to the second-level type and the level of the outermost graphic in the nested graphic is an odd number.

5. The method according to claim 2, characterized in that, Determining the hierarchy of each graphic in the nested graphics includes: Based on the inclusion relationship between the graphics in the nested graphics, a graphics tree corresponding to the nested graphics is constructed; wherein, in the graphics tree, the graphics corresponding to the first node are graphics directly included by the graphics corresponding to the second node, and the first node is a child node of the second node; The level of each graphic in the nested graphic within the graphic tree is determined as the level at which each graphic in the nested graphic resides.

6. The method according to claim 1, characterized in that, Obtaining the graphic type corresponding to the target graphic includes: Obtain the positional relationship of the graphics corresponding to the target graphic; The graphic type corresponding to the target graphic is determined based on the positional relationship of the graphic corresponding to the target graphic.

7. The method according to claim 6, characterized in that, The target graphic includes multiple graphics; obtaining the positional relationship of the graphics corresponding to the target graphic includes: Obtain the bounding boxes corresponding to the multiple graphics respectively to obtain multiple bounding boxes; Obtain and determine the graphic position relationship corresponding to the target graphic based on the positional relationship between the multiple bounding boxes; Based on the positional relationships of the target graphics, the graphic type corresponding to the target graphic is determined, including: If there is an inclusion relationship among the determined graphic positions, then the graphic type corresponding to the graphic with the inclusion relationship will be determined as a nested graphic. If there is an independent relationship among the determined positional relationships of the graphics, then the graphic type corresponding to the graphics with independent relationships will be determined as an independent graphic.

8. The method according to claim 7, characterized in that, Determining the graphic positional relationship corresponding to the target graphic based on the positional relationship between the multiple bounding boxes includes: If, among the plurality of bounding boxes, the positional relationship between any bounding box and another bounding box is non-intersecting, determine whether all endpoints of the first shape are within the second shape; wherein, the first shape is the shape corresponding to any bounding box, and the second shape is the shape corresponding to the other bounding box; If all endpoints of the first graphic are within the second graphic, and the graphic positional relationship between the first graphic and the second graphic is determined to be an inclusion relationship, then the graphic positional relationship corresponding to the target graphic is determined to have an inclusion relationship. If none of the endpoints of the first image are within the second image, and the positional relationship of the first image is determined to be independent, then the positional relationship of the target image is determined to be independent.

9. The method according to claim 1, characterized in that, After generating the lead wire corresponding to the target graphic based on the lead wire type corresponding to the target graphic, the method further includes: The generated graphic leads are subjected to processing interference detection; If there is processing interference with the graphic lead, the graphic lead shall be adjusted.

10. The method according to claim 9, characterized in that, The generated graphic leads undergo processing interference detection, including: If there are intersection points between the graphic leader and the graphic to which the graphic leader belongs, other than the leader's end point, then it is determined that the graphic leader has processing interference. If there are no other intersections between the graphic leader and the graphic to which the graphic leader belongs, but there are intersections with other graphics, then it is determined that the graphic leader has processing interference. If there are no other intersections between the graphic leader and the graphic to which the graphic leader belongs, and there are no intersections between the graphic leader and the other graphic, then it is determined that the graphic leader does not have processing interference.

11. The method according to claim 9, characterized in that, In the event of processing interference with the graphic lead, adjustments are made to the graphic lead, including: The attribute parameters of the graphic leader are adjusted until there is no processing interference with the graphic leader; wherein, the attribute parameters include at least one of the leader length, leader end point position and leader angle.

12. The method according to claim 1, characterized in that, After generating the lead wire corresponding to the target graphic based on the lead wire type corresponding to the target graphic, the method further includes: In response to an editing operation on the target graphic, the target graphic edited based on the editing operation is obtained, and the edited target graphic is displayed on the display interface; Based on the edited target graphic, the corresponding leader lines are regenerated on the display interface.

13. The method according to claim 1, characterized in that, After obtaining the target pattern for which the leads to be generated, the method further includes: In response to the operation of setting attribute parameters for the lead wire corresponding to the target graphic, the lead wire corresponding to the target graphic is generated on the display interface based on the set attribute parameters; wherein, the attribute parameters include at least one of lead wire type, lead wire length, lead wire end point position and lead wire angle.

14. The method according to claim 1, characterized in that, After obtaining the target pattern for which the leads to be generated, the method further includes: In response to the leader drawing mode setting operation for the target graphic, the leader drawing window corresponding to the target graphic is displayed on the display interface; In response to a click operation on a target graphic in the leader drawing window, the line segment obtained by the click operation is determined as the leader corresponding to the target graphic.

15. A processing equipment, characterized in that, include: Slide rail; A processing head, which is slidably mounted on the slide rail; A communication component, the communication component being configured to receive a lead wire corresponding to a target pattern obtained by the steps of the method according to any one of claims 1 to 14; A controller, based on the lead lines corresponding to the target graphic, controls the movement of the processing head on the slide rail for processing.

16. A system, characterized in that, include: Processing equipment, the processing equipment comprising a base plate and a processing head, the base plate including a processing area for placing materials, the processing head for moving within the processing area; and A terminal device that communicates with the processing equipment, the terminal device being used to perform the graphic lead generation method according to any one of claims 1 to 14.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for generating graphic leads as described in any one of claims 1 to 14.