Method for determining critical polygon, laser plane typesetting device and computing equipment
By traversing and unioning the edges of the laser plane layout graphics, determining their intersection areas to form a parallelogram, the problem of solving critical polygons in the existing technology with large computational complexity and degenerate conditions is solved, and the efficiency and accuracy of laser plane layout are improved.
Patent Information
- Application Number
- CN202310482944.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-04-28
AI Technical Summary
When solving the problem of calculating critical polygons in laser planar typesetting, the existing technology has problems such as large computational complexity, difficulty in handling degenerate situations, and inability to accurately calculate the NFP of concave polygons. In particular, the trajectory method, push method, and slope method cannot effectively solve the problems of cavities and degenerate lines.
By traversing each edge of the first laser plane pattern and the second laser plane pattern, their intersection area is determined to form parallelograms, and these parallelograms are combined to obtain critical polygons. Legal lines and legal points are considered to solve the degenerate situation.
It realizes the rapid determination of the critical polygons of any non-self-intersecting layout graphics, solves the cavity problem, improves the efficiency and utilization of laser plane layout, and can accurately obtain the intersection or tangency position.
Smart Images

Figure CN116523996B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of laser plane typesetting, and in particular to a method for determining a critical polygon, a laser plane typesetting device and a computing device. Background Art
[0002] In laser typesetting applications, it is necessary to determine the critical tangency of two graphics, that is, the critical polygon NFP (no-fit polygon) is required. The critical polygon includes both internal and external conditions. Based on the critical polygon, the intersection, tangency, and separation of the two graphics can be quickly determined, and the tangency position can also be quickly obtained.
[0003] Two-dimensional typesetting requires quickly determining whether polygons overlap and finding tangent points, all of which can be calculated using NFP. Among existing solutions for finding critical polygons, the "trajectory method" requires finding all trajectory lines and then finding inner and outer loops, which is computationally intensive. The "push method" can find the trajectory of the reference point formed by pushing figure A along figure B, but this method cannot find cavities and is difficult to find the NFP internally. The "Minkowski" and "slope methods" cannot find the NFP of two concave polygons. Moreover, none of the above solutions can find the NFP that degenerates into lines and points.
[0004] Therefore, a method for determining a critical polygon is needed to solve the problems existing in the above technical solutions. Summary of the Invention
[0005] To this end, the present invention provides a method for determining a critical polygon and a laser planar typesetting device to solve or at least alleviate the above problems.
[0006] According to one aspect of the present invention, a method for determining a critical polygon is provided, which is executed in a computing device to determine the critical polygon of a first laser plane packing pattern with respect to a second laser plane packing pattern. The method comprises: traversing each first side of the first laser plane packing pattern, and for each first side, traversing each second side of the second laser plane packing pattern; for each first side and each second side, determining the intersection area of the first side and the second side to obtain a parallelogram; and determining the union of all parallelograms to obtain the critical polygon of the first laser plane packing pattern with respect to the second laser plane packing pattern.
[0007] Optionally, in the method for determining a critical polygon according to the present invention, determining the intersection area of the first side and the second side to obtain a parallelogram includes: taking the starting point of the first side as the initial reference point, and taking the starting point of the first laser plane pattern as the predetermined reference point; determining the intersection area of the first side and the second side relative to the initial reference point to obtain an initial quadrilateral; and obtaining a parallelogram based on the predetermined reference point and the initial quadrilateral.
[0008] Optionally, in the method for determining a critical polygon according to the present invention, a parallelogram is obtained based on a predetermined reference point and the initial quadrilateral, including: determining a vector from the predetermined reference point to the initial reference point; reversing the first side to obtain a reverse first side, and translating the reverse first side until the starting point of the reverse first side is aligned with the starting point of the second side; forming an initial quadrilateral based on the translated reverse first side and the second side; and translating the initial quadrilateral based on the vector to obtain the parallelogram.
[0009] Optionally, in the method for determining the critical polygon according to the present invention, after determining the union of all parallelograms, it also includes: determining the legal lines and legal points in all parallelograms; based on the union of all parallelograms, the legal lines and legal points, obtaining the critical polygon of the first laser plane pattern pattern to the second laser plane pattern pattern.
[0010] Optionally, in the method for determining critical polygons according to the present invention, determining the legal lines and legal points in all parallelograms includes: obtaining all sides of all parallelograms to form a line set; obtaining at least two partially overlapping lines from the line set as target lines; determining one or more intersection points formed by all target lines, and dividing each target line into multiple short lines based on one or more intersection points; judging whether the midpoint of each short line is a legal point, and if the midpoint of the short line is a legal point, determining the short line as a legal line.
[0011] Optionally, in the method for determining the critical polygon according to the present invention, determining the legal lines and legal points in all parallelograms also includes: if the midpoint of the short line is not a legal point, judging whether the endpoint of the short line is a legal point; if the endpoint of the short line is a legal point, then obtaining the critical polygon of the first laser plane pattern pattern to the second laser plane pattern pattern based on the union, legal lines and legal points of all parallelograms.
[0012] Optionally, in the method for determining critical polygons according to the present invention, the legal lines and legal points in all parallelograms are determined, including: determining an area that is not contained in all parallelograms as a legal area; determining the lines in the parallelogram located in the legal area as legal lines, and determining the points in the parallelogram located in the legal area as legal points.
[0013] According to one aspect of the present invention, there is provided a laser plane typesetting apparatus, which resides in a computing device and is suitable for determining a critical polygon of a first laser plane typesetting pattern with respect to a second laser plane typesetting pattern. The apparatus comprises: a traversal module, suitable for traversing each first side of the first laser plane typesetting pattern, and for each first side, traversing each second side of the second laser plane typesetting pattern; a first determination module, suitable for determining, for each first side and each second side, an intersection area between the first side and the second side to obtain a parallelogram; and a second determination module, suitable for determining the union of all parallelograms to obtain a critical polygon of the first laser plane typesetting pattern with respect to the second laser plane typesetting pattern.
[0014] According to one aspect of the present invention, a computing device is provided, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be suitable for execution by the at least one processor, and the program instructions include instructions for executing the method for determining a critical polygon as described above.
[0015] According to one aspect of the present invention, a readable storage medium storing program instructions is provided. When the program instructions are read and executed by a computing device, the computing device executes the method for determining a critical polygon as described above.
[0016] According to the technical solution of the present invention, a method for determining critical polygons is provided, which can be applied to the field of laser plane typesetting. By traversing each first side of the first laser plane typesetting pattern, for each first side, traversing each second side of the second laser plane typesetting pattern, and determining the intersection area of the first side and the second side to obtain a parallelogram, a total of multiple parallelograms are obtained. By determining the union of all parallelograms, the critical polygon of the first laser plane typesetting pattern with respect to the second laser plane typesetting pattern can be obtained. In this way, the technical solution of the present invention is applicable to any non-self-intersecting typesetting pattern (including concave / convex polygons) in laser plane typesetting applications. Without considering degeneration, the critical polygon of any two non-self-intersecting typesetting patterns can be calculated, including the case of calculating the critical polygon for both internal and external critical polygons, thereby solving the cavity problem. Based on the critical polygon, the intersection or tangency of the two typesetting patterns can be quickly determined, and the tangency position can be quickly obtained, effectively improving the efficiency and utilization of laser plane typesetting.
[0017] Furthermore, taking into account degenerate situations, after determining the union of all parallelograms, by further determining the legal lines and legal points within all parallelograms, the critical polygon of the first laser plane pattern relative to the second laser plane pattern can be obtained based on the union of all parallelograms, the legal lines, and the legal points. Thus, the critical polygon determination scheme provided by the present invention can also be used to determine the critical polygon that degenerates into a line and a point, in the case where the critical polygon degenerates into a line and a point.
[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein may be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other objects, features, and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout this disclosure, the same reference numerals generally refer to the same parts or elements.
[0020] Figure 1 A schematic diagram of a computing device 100 according to one embodiment of the present invention is shown;
[0021] Figure 2 FIG2 shows a flow chart of a method 200 for determining a critical polygon according to an embodiment of the present invention;
[0022] Figure 3 A schematic diagram showing a first side, a second side, and a predetermined reference point according to an embodiment of the present invention is shown;
[0023] Figure 4 A schematic diagram showing the intersection of a first side and a second side according to an embodiment of the present invention is shown;
[0024] Figure 5 A schematic diagram of an intersection area between a first side and a second side relative to an initial reference point according to an embodiment of the present invention is shown;
[0025] Figure 6 A schematic diagram of an intersection area between a first side and a second side relative to a predetermined reference point according to an embodiment of the present invention is shown;
[0026] Figure 7 A schematic diagram of a vector from a predetermined reference point to an initial reference point according to an embodiment of the present invention is shown;
[0027] Figure 8 A schematic diagram showing a process of reversing a first side and then translating it until the starting point of the first side is aligned with the starting point of the second side according to one embodiment of the present invention is shown;
[0028] Figure 9 A schematic diagram showing an initial quadrilateral obtained by forming a parallelogram based on the translated first and second sides according to one embodiment of the present invention is shown;
[0029] Figure 10 A schematic diagram showing a method of translating an initial quadrilateral based on a vector according to one embodiment of the present invention is shown;
[0030] Figure 11 A schematic diagram showing a critical polygon obtained from the union of multiple parallelograms according to one embodiment of the present invention is shown;
[0031] Figure 12 A schematic diagram showing the result of determining whether each short line is legal according to one embodiment of the present invention;
[0032] Figure 13 A schematic diagram showing the degeneration of critical polygons into points according to one embodiment of the present invention is shown;
[0033] Figure 14 FIG. 1 is a schematic diagram of a laser flat typesetting device 1400 according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0035] Figure 1 FIG. 1 shows a schematic diagram of a computing device 100 according to an embodiment of the present invention. Figure 1 As shown, in a basic configuration, computing device 100 includes at least one processing unit 102 and system memory 104. According to one aspect, depending on the configuration and type of computing device, processing unit 102 can be implemented as a processor. System memory 104 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, system memory 104 includes an operating system 105.
[0036] According to one aspect, operating system 105 is suitable for controlling the operation of computing device 100, for example. Furthermore, examples may be practiced in conjunction with graphics libraries, other operating systems, or any other application programs, and are not limited to any particular application or system. Figure 1 The basic configuration is shown in FIG. 1 by those components within the dashed lines. According to one aspect, the computing device 100 has additional features or functionality. For example, according to one aspect, the computing device 100 includes additional data storage devices (removable and / or non-removable), such as magnetic disks, optical disks, or tapes. Such additional storage Figure 1 1 is illustrated by a removable storage device 109 and a non-removable storage device 110.
[0037] As stated above, according to one aspect, a program module 103 is stored in the system memory 104. According to one aspect, the program module 103 may include one or more application programs, and the present invention is not limited to the type of application program. For example, the application program may include an email and contact application program, a word processing application program, a spreadsheet application program, a database application program, a slide show application program, a drawing or computer-aided application program, a web browser application program, etc.
[0038] According to one aspect, the program module 103 may include a laser plane typesetting device 1400, which includes multiple program instructions suitable for executing the method 200 for determining critical polygons of the present invention. By executing the method 200 for determining critical polygons of the present invention, the intersection or tangency of two plane figures can be quickly determined to improve the efficiency and utilization of laser plane typesetting.
[0039] According to one aspect, examples may be practiced on a circuit comprising discrete electronic components, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or a single chip containing electronic components or a microprocessor. Figure 1Each or many components shown in can be integrated into a system on a chip (SOC) on a single integrated circuit to practice examples. According to one aspect, such an SOC device may include one or more processing units, a graphics unit, a communication unit, a system virtualization unit, and various application functions, all of which are integrated (or "burned") onto a chip substrate as a single integrated circuit. When operated via SOC, the functions described in this article can be operated via dedicated logic integrated with other components of the computing device 100 on a single integrated circuit (chip). Embodiments of the present invention can also be practiced using other technologies capable of performing logical operations (such as AND, OR, and NOT), including but not limited to mechanical, optical, fluid, and quantum technologies. In addition, embodiments of the present invention can be practiced in a general-purpose computer or in any other circuit or system.
[0040] According to one aspect, the computing device 100 may also have one or more input devices 112, such as a keyboard, a mouse, a pen, a voice input device, a touch input device, etc. It may also include an output device 114, such as a display, a speaker, a printer, etc. The aforementioned devices are examples, and other devices may also be used. The computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver, and / or transceiver circuitry; Universal Serial Bus (USB), parallel, and / or serial ports.
[0041] As used herein, the term computer-readable medium includes computer storage media. Computer storage media can include volatile and non-volatile, removable and non-removable media implemented with any method or technology for storing information (e.g., computer-readable instructions, data structures, or program modules 103). System memory 104, removable storage device 109, and non-removable storage device 110 are all examples of computer storage media (i.e., memory storage). Computer storage media can include random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage, cassette tape, magnetic tape, disk storage or other magnetic storage device, or any other product that can be used to store information and can be accessed by computing device 100. According to one aspect, any such computer storage medium can be a part of computing device 100. Computer storage media does not include carrier waves or other propagated data signals.
[0042] According to one aspect, communication media is implemented by computer-readable instructions, data structures, program modules 103, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism), and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.
[0043] In an embodiment according to the present invention, a computing device 100 is configured to execute a method 200 for determining a critical polygon according to the present invention. The computing device 100 includes one or more processors and one or more readable storage media storing program instructions. When the program instructions are configured to be executed by the one or more processors, the computing device 100 executes the method 200 for determining a critical polygon according to an embodiment of the present invention. By executing the method 200 for determining a critical polygon according to the present invention, the computing device 100 can quickly determine the intersection or tangency of two laser planar layout patterns, thereby improving the efficiency and utilization of laser planar layout.
[0044] According to one embodiment of the present invention, the method 200 for determining critical polygons can be applied to laser planar typesetting. A laser planar typesetting apparatus 1400 is deployed in the computing device 100 and configured to execute the method 200 for determining critical polygons according to the present invention. The laser planar typesetting apparatus 1400 includes multiple program instructions for executing the method 200 for determining critical polygons according to the present invention. These program instructions can instruct a processor to execute the method 200 for determining critical polygons according to the present invention, thereby determining the critical polygon of a first laser planar typesetting pattern relative to a second laser planar typesetting pattern by executing the method 200.
[0045] Figure 2 FIG2 is a flow chart of a method 200 for determining a critical polygon according to an embodiment of the present invention. The method 200 for determining a critical polygon is suitable for execution in a computing device (eg, the aforementioned computing device 100).
[0046] It should be noted that, in one application example, the method 200 for determining critical polygons of the present invention can be applied to laser planar layout. Specifically, it can be used to determine the critical polygon of a first laser planar layout pattern relative to a second laser planar layout pattern, so as to quickly determine the intersection or tangency of the two laser planar layout patterns, thereby improving the efficiency and utilization of laser planar layout. Each edge in the first laser planar layout pattern can be defined as a first edge, and each edge in the second laser planar layout pattern can be defined as a second edge.
[0047] like Figure 2 and Figure 3 As shown, method 200 begins at step 210 .
[0048] First, in step 210, each first side of the first laser plane pattern is traversed, and for each traversed first side, each second side of the second laser plane pattern is traversed in a secondary manner.
[0049] In step 220 , for each first side and each second side that has been traversed, an intersection area between the first side and the second side is determined to obtain a parallelogram.
[0050] By executing steps 210 and 220 , the intersection area of any first side of the first laser plane pattern and any second side of the second laser plane pattern can be determined, and a total of multiple parallelograms can be obtained.
[0051] In step 230 , the union of all parallelograms is determined to obtain a critical polygon of the first laser plane pattern with respect to the second laser plane pattern.
[0052] Here, in one embodiment of the present invention, without considering degeneration, by determining the union of all parallelograms obtained above, the union of all parallelograms can be used as the critical polygon of the first laser plane pattern to the second laser plane pattern.
[0053] Figure 3 A schematic diagram showing a first side, a second side, and a predetermined reference point according to an embodiment of the present invention is shown; Figure 4 A schematic diagram showing the intersection of a first side and a second side according to an embodiment of the present invention is shown; Figure 5 A schematic diagram of an intersection area between a first side and a second side relative to an initial reference point according to an embodiment of the present invention is shown; Figure 6 A schematic diagram of an intersection area between a first side and a second side relative to a predetermined reference point according to an embodiment of the present invention is shown.
[0054] According to one embodiment of the present invention, Figures 3 to 6As shown, determining the intersection area of the first side and the second side to obtain a parallelogram can be achieved by the following method.
[0055] First, the starting point of the first side (point 1) can be used as the initial reference point, and the starting point of the first laser plane pattern can be used as the predetermined reference point (point 3).
[0056] Next, the intersection area of the first side and the second side relative to the initial reference point can be determined, and the initial quadrilateral can be obtained based on the intersection area. Here, by determining the intersection of the first side and the second side (see Figure 4 ), then determine the intersection area of the first side and the second side based on the initial reference point (the starting point of the first side), see Figure 5 As shown, the intersection area is a parallelogram, and the initial quadrilateral obtained based on the intersection area is also an initial parallelogram.
[0057] Next, a parallelogram (i.e., the intersection area of the first side and the second side relative to the predetermined reference point) can be obtained based on the predetermined reference point and the initial quadrilateral. In other words, the parallelogram can be obtained by determining the intersection area of the first side and the second side relative to the predetermined reference point based on the predetermined reference point and the initial quadrilateral.
[0058] Figure 7 A schematic diagram of a vector from a predetermined reference point to an initial reference point according to an embodiment of the present invention is shown; Figure 8 A schematic diagram showing a process of reversing a first side and then translating it until the starting point of the first side is aligned with the starting point of the second side according to one embodiment of the present invention is shown; Figure 9 A schematic diagram showing an initial quadrilateral obtained by forming a parallelogram based on the translated first and second sides according to one embodiment of the present invention is shown; Figure 10 A schematic diagram of translating an initial quadrilateral based on a vector according to one embodiment of the present invention is shown.
[0059] In a specific embodiment, Figures 7 to 10 As shown, obtaining a parallelogram based on a predetermined reference point and an initial quadrilateral can be achieved by the following method.
[0060] First, if Figure 7 As shown, a vector (which can be expressed as V) from the predetermined reference point to the initial reference point is determined.
[0061] Then, if Figure 8 As shown, the first side is reversed to obtain a reversed first side, and the reversed first side is translated until the starting point of the reversed first side is aligned with the starting point of the second side.
[0062] Then, if Figure 9As shown, a parallelogram is formed based on the translated reverse first side and the second side to form an initial quadrilateral (the initial quadrilateral can be expressed as parallelogram K).
[0063] Finally, if Figure 10 As shown, based on the vector V from the predetermined reference point to the initial reference point, the initial quadrilateral (K) is translated to obtain a parallelogram (ie, the intersection area of the first side and the second side relative to the predetermined reference point).
[0064] Based on the multiple parallelograms obtained by the above method, in one embodiment of the present invention, without considering degeneration, by determining the union of all parallelograms, the union of all parallelograms can be used as the critical polygon of the first laser plane pattern pattern to the second laser plane pattern pattern. For example, Figure 11 A schematic diagram of obtaining a critical polygon based on the union of multiple parallelograms according to one embodiment of the present invention is shown.
[0065] According to one embodiment of the present invention, considering the case where the critical polygon degenerates into lines and points, in step 230, after determining the union of all parallelograms, the legal lines and legal points in all parallelograms can be further determined, and based on the union of all parallelograms, the legal lines and legal points in all parallelograms, the critical polygon of the first laser plane pattern pattern to the second laser plane pattern pattern is obtained.
[0066] It should be noted that each of the above parallelograms is an illegal area, and the area that is not included in any parallelogram (does not intersect with the union of all parallelograms) is a legal area, the line located in the legal area is a legal line, and the point located in the legal area is a legal point.
[0067] Based on this, when determining the legal lines and legal points in all parallelograms, the area that is not included in all the above parallelograms can be determined as the legal area, and the lines in the parallelogram located in the legal area can be determined as the legal lines, and the points in the parallelogram located in the legal area can be determined as the legal points.
[0068] In other words, by judging whether a line / point is located in a legal area, it is possible to determine whether the line / point is legal. A line / point located in a legal area is a legal line / point.
[0069] In this embodiment, the legal lines and legal points in all parallelograms may be further determined by the following method.
[0070] First, all the sides of all parallelograms can be obtained, and a line set can be formed based on all the sides of all parallelograms.
[0071] Next, at least two partially overlapping lines are obtained from the line set as target lines.
[0072] Next, one or more intersection points formed by all target lines may be determined, and each target line may be split into a plurality of short lines based on the one or more intersection points.
[0073] Then, it is determined whether each short line is legal (whether it is a legal point). Specifically, it is determined whether the midpoint of each short line is a legal point. If the midpoint of the short line is a legal point, the short line can be determined as a legal line. Here, Figure 12 A schematic diagram showing the result of determining whether each short line is legal according to an embodiment of the present invention is shown.
[0074] In addition, if the midpoint of the short line is not a legal point, it is possible to continue to determine whether the endpoints of the short line are legal points. If the endpoints of the short line are legal points, it is determined that there is a situation where it degenerates into a point. For example, Figure 13 A schematic diagram showing the degeneration of a critical polygon into a point (comprising a rectangular area and a point) according to one embodiment of the present invention is shown. In this case, the critical polygon of the first laser plane pattern relative to the second laser plane pattern can be obtained based on the union of all parallelograms, the legal lines in all parallelograms, and the legal points.
[0075] The method for determining critical polygons according to the present invention can be applied to the field of laser plane typesetting. By traversing each first side of the first laser plane typesetting pattern, for each first side, traversing each second side of the second laser plane typesetting pattern, and determining the intersection area of the first side and the second side to obtain a parallelogram, a total of multiple parallelograms are obtained. By determining the union of all parallelograms, the critical polygon of the first laser plane typesetting pattern with respect to the second laser plane typesetting pattern can be obtained. In this way, the technical solution according to the present invention is applicable to any non-self-intersecting typesetting pattern (including concave / convex polygons) in laser plane typesetting applications. Without considering degeneration, the critical polygon of any two non-self-intersecting typesetting patterns can be calculated, including the case of calculating the critical polygon for the inner and outer sides, thereby solving the cavity problem. According to the critical polygon, the intersection or tangency of the two typesetting patterns can be quickly determined, and the tangency position can be quickly obtained, thereby effectively improving the efficiency and utilization of laser plane typesetting.
[0076] Furthermore, taking into account degenerate situations, after determining the union of all parallelograms, by further determining the legal lines and legal points within all parallelograms, the critical polygon of the first laser plane pattern relative to the second laser plane pattern can be obtained based on the union of all parallelograms, the legal lines, and the legal points. Thus, the critical polygon determination scheme provided by the present invention can also be used to determine the critical polygon that degenerates into a line and a point, in the case where the critical polygon degenerates into a line and a point.
[0077] Figure 14 A schematic diagram of a laser planar typesetting apparatus 1400 according to one embodiment of the present invention is shown. The laser planar typesetting apparatus 1400 resides in the computing device 100. The laser planar typesetting apparatus 1400 can be configured to execute the method 200 for determining critical polygons of the present invention, so as to determine the critical polygon of a first laser planar typesetting pattern relative to a second laser planar typesetting pattern by executing the method 200 for determining critical polygons of the present invention.
[0078] like Figure 14 As shown, the laser flat typesetting device 1400 includes a traversal module 1410, a first determination module 1420 and a second determination module 1430 which are communicatively connected in sequence.
[0079] The traversal module 1410 may traverse each first side of the first laser plane pattern and, for each first side, traverse each second side of the second laser plane pattern. The first determination module 1420 may determine the intersection of each first side and each second side to obtain a parallelogram. The second determination module 1430 may determine the union of all parallelograms to obtain a critical polygon of the first laser plane pattern with respect to the second laser plane pattern.
[0080] It should be noted that the traversal module 1410 is used to execute the aforementioned step 210, the first determination module 1420 is used to execute the aforementioned step 220, and the second determination module 1430 is used to execute the aforementioned step 230. Here, the specific execution logic of the traversal module 1410, the first determination module 1420, and the second determination module 1430 can be found in the description of steps 210 to 230 in the method 200 above, and will not be repeated here.
[0081] The various techniques described herein may be implemented in conjunction with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may be implemented in the form of program codes (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, a USB flash drive, a floppy disk, a CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes an apparatus for practicing the present invention.
[0082] When the program code is executed on a programmable computer, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code, and the processor is configured to execute the method for determining a critical polygon according to the instructions in the program code stored in the memory.
[0083] By way of example and not limitation, readable media include readable storage media and communication media. Readable storage media store information such as computer-readable instructions, data structures, program modules, or other data. Communication media typically embody computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and include any information delivery medium. Combinations of any of the above are also included within the scope of readable media.
[0084] In the description provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems may also be used in conjunction with the examples of the present invention. Based on the above description, it is apparent that the structure required for constructing such systems is well understood. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages may be utilized to implement the present invention described herein, and the description of specific languages above is provided for the purpose of disclosing the preferred embodiment of the present invention.
[0085] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0086] Similarly, it should be understood that in order to streamline the disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or description thereof.
[0087] Those skilled in the art will appreciate that the modules, units, or components of the devices in the examples disclosed herein may be arranged in the device described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or further divided into multiple submodules.
[0088] Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and installed in one or more devices different from the embodiments. The modules, units, or components in the embodiments can be combined into one module, unit, or component, and furthermore, they can be divided into multiple submodules, subunits, or subcomponents.
[0089] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features and not other features included in other embodiments, the combination of features from different embodiments is intended to be within the scope of the invention and to form different embodiments.
[0090] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions described. Thus, a processor having the necessary instructions for implementing the method or method element forms a device for implementing the method or method element. Furthermore, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.
[0091] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved and are not intended to imply that the objects so described must have a given order in time, space, ranking, or in any other manner.
[0092] Although the present invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the foregoing description, will appreciate that other embodiments are contemplated within the scope of the invention thus described. Furthermore, it should be noted that the language used in this specification has been selected primarily for readability and instructional purposes and is not selected to explain or limit the subject matter of the present invention.
Claims
1. A method for determining a critical polygon, executed in a computing device, to determine a critical polygon of a first laser plane pattern with respect to a second laser plane pattern, the method comprising: Traverse each first side of the first laser plane pattern, and for each first side, traverse each second side of the second laser plane pattern; For each first side and each second side, determining an intersection area of the first side and the second side to obtain a parallelogram, including: using a starting point of the first side as an initial reference point and a starting point of the first laser plane pattern as a predetermined reference point; determining a vector from the predetermined reference point to the initial reference point; reversing the first side to obtain a reverse first side, translating the reverse first side until the starting point of the reverse first side is aligned with the starting point of the second side; forming an initial quadrilateral based on the translated reverse first side and the second side; and translating the initial quadrilateral based on the vector to obtain the parallelogram; The union of all parallelograms is determined to obtain a critical polygon of the first laser plane pattern with respect to the second laser plane pattern.
2. The method according to claim 1, wherein After determining the union of all parallelograms, also include: Determine all legal lines and legal points in a parallelogram; Based on the union of all parallelograms, the legal lines and the legal points, a critical polygon of the first laser plane pattern pattern to the second laser plane pattern pattern is obtained.
3. The method according to claim 2, wherein: Determine all legal lines and legal points in a parallelogram, including: Get all the edges of all parallelograms to form a line set; Acquire at least two partially overlapping lines from the line set as target lines; determining one or more intersection points formed by all target lines, and dividing each target line into a plurality of short lines based on the one or more intersection points; It is determined whether the midpoint of each short line is a legal point. If the midpoint of the short line is a legal point, the short line is determined to be a legal line.
4. The method according to claim 3, wherein: Determine all legal lines and legal points in a parallelogram, including: If the midpoint of the short line is not a legal point, determine whether the endpoints of the short line are legal points; If the endpoints of the short lines are legal points, a critical polygon of the first laser plane pattern pattern to the second laser plane pattern pattern is obtained based on the union of all parallelograms, legal lines and legal points.
5. The method according to any one of claims 2 to 4, wherein Determine all legal lines and points in a parallelogram, including: The region that is not contained by any parallelogram is determined as a legal region; The lines in the parallelogram located in the legal area are determined as legal lines, and the points in the parallelogram located in the legal area are determined as legal points.
6. A laser planar layout apparatus, resident in a computing device, adapted to determine a critical polygon of a first laser planar layout pattern with respect to a second laser planar layout pattern, the apparatus comprising: a traversal module adapted to traverse each first side of the first laser plane pattern, and for each first side, traverse each second side of the second laser plane pattern; a first determining module adapted to determine, for each first side and each second side, an intersection area of the first side and the second side to obtain a parallelogram, the first determining module further adapted to: use a starting point of the first side as an initial reference point and a starting point of the first laser plane pattern as a predetermined reference point; determine a vector from the predetermined reference point to the initial reference point; reverse the first side to obtain a reverse first side, translate the reverse first side until a starting point of the reverse first side is aligned with a starting point of the second side; and form an initial quadrilateral based on the translated reverse first side and the second side; Based on the vector, the initial quadrilateral is translated to obtain a parallelogram; The second determining module is adapted to determine the union of all parallelograms to obtain a critical polygon of the first laser plane pattern with respect to the second laser plane pattern.
7. A computing device comprising: at least one processor; as well as A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1 to 5.
8. A readable storage medium storing program instructions, wherein when the program instructions are read and executed by a computing device, the computing device executes the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Calculation method suitable for inscribed no-fit polygon between any two polygons
CN107146249A
Bias-based layout optimization method
CN113704841A