Method, device, storage medium and electronic device for generating graphics in layout

By automatically traversing the pixels in the layout to generate the target graphics, the problem of low efficiency and easy errors in manual drawing is solved, and efficient and accurate circular graphics drawing is achieved.

CN115906215BActive Publication Date: 2025-09-16ORIGIN QUANTUM INSTR CO
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211636191.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2025-09-16
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

In integrated circuit layout design, manually drawing target circular graphics is inefficient and prone to errors, especially in large-scale layouts with hundreds of thousands of them.

Method used

By obtaining the pixel points in the layout area, traversing them in a preset order and selecting the pixel points whose distance from other pixel points and generated graphics is greater than the preset threshold as the center point to generate the target graphics, the pixel points are used to automatically draw circles to avoid overlap.

Benefits of technology

It realizes the automatic drawing of target graphics, improves the drawing efficiency, reduces the labor intensity and time cost of designers, and avoids errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115906215B_ABST
    Figure CN115906215B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, storage medium, and electronic device for generating graphics in a layout. The method first obtains a layout area on the layout for generating a target graphic, then sets pixels within the layout area as first pixels, and finally traverses all first pixels to select suitable first pixels to generate the target graphic. Because the target graphic is automatically generated using pixels, the target graphic can be automatically drawn, improving drawing efficiency and avoiding errors, significantly reducing the labor intensity and time cost of designers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated circuit design, and in particular to a method, device, storage medium and electronic equipment for generating graphics in a layout. Background Art

[0002] In integrated circuit layout design, it's often necessary to draw numerous circular target graphics within certain areas. For example, circular vias are needed to electrically connect different layers of a circuit board; circular pads are needed to connect the circuit board to external devices; and circular pillars are needed to support flip-chips. During the target graphics drawing process, it's crucial to ensure that the target graphics don't overlap with each other or with other graphics on the layout.

[0003] The inventors of this application discovered during long-term research and development that the drawing of the target circle needs to be done manually by designers. However, in some large-scale layouts, the number of target graphics can reach hundreds of thousands or even millions. In this case, manual drawing is inefficient and prone to errors. Summary of the Invention

[0004] The purpose of the present invention is to provide a method, device, storage medium and electronic device for generating graphics in a layout, so as to solve the problem of low efficiency and easy error in manual drawing of target graphics in the prior art, and to realize automatic drawing of target graphics, improve drawing efficiency and avoid errors.

[0005] To solve the above technical problems, the present invention provides a method for generating a graphic in a layout, comprising:

[0006] Obtaining a layout area on a layout for generating a target pattern, wherein the target pattern is a circle;

[0007] Setting a pixel point within the layout area as a first pixel point;

[0008] Traverse all the first pixel points in a preset order, select the first pixel point whose distance from other pixel points other than the first pixel point and the generated target graphic is greater than a preset threshold as the center point to generate the target graphic, and the preset threshold is not less than the radius of the target graphic.

[0009] Preferably, the traversing all the first pixel points in a preset order and selecting a first pixel point whose distance from other pixel points other than the first pixel point and the generated target graphic is greater than the radius of the target graphic as the center point to generate the target graphic includes:

[0010] Pixel point acquisition step: selecting an undetected pixel from all the first pixel points according to a preset order as a detection pixel point;

[0011] Detecting whether a circular range with the detection pixel point as the center and a radius of a preset threshold value covers pixel points other than the first pixel point and the generated target graphic;

[0012] If the detection result is no, the detection pixel point is selected as the center point to generate a target graphic, and the process goes to the pixel point acquisition step until all the first pixel points are selected;

[0013] If the detection result is yes, go to the pixel point acquisition step until all the first pixel points are selected.

[0014] Preferably, the step of selecting the detection pixel point as the center point to generate the target graphic further includes:

[0015] The first pixel point within the coverage area of ​​the target graphic is set as the second pixel point.

[0016] Preferably, before traversing all the first pixel points in a preset order, the method further includes:

[0017] Obtain obstacles within the target area;

[0018] Determine an obstacle avoidance boundary outside the obstacle, wherein the shortest distance from each point on the obstacle avoidance boundary to the obstacle is equal;

[0019] The first pixel point within the obstacle avoidance boundary is set as the third pixel point.

[0020] Preferably, the obstacle is a non-closed line, and determining the obstacle avoidance boundary outside the obstacle includes:

[0021] Generating a strip-shaped graphic with a preset width using each line segment of the non-closed line as a center line;

[0022] Generate an extended circle with a diameter of the preset width with each endpoint of the non-closed line as the center;

[0023] The maximum boundary of the combination of the strip pattern and the expanded circle is used as the obstacle avoidance boundary.

[0024] Preferably, the obstacle is a polygon, and determining the obstacle avoidance boundary outside the obstacle includes:

[0025] Generating a strip-shaped graphic with a preset width using each side line of the polygon as a center line;

[0026] Generate an extended circle with a diameter of the preset width with each endpoint of the polygon as the center;

[0027] The outermost maximum boundary of the combination of the strip pattern and the expanded circle is used as the obstacle avoidance boundary.

[0028] Preferably, the preset order is the order of rows first and columns later.

[0029] To solve the above technical problems, the present invention further provides a device for generating a graphic in a layout, comprising:

[0030] An area acquisition module is used to acquire a layout area on the layout for generating a target pattern, wherein the target pattern is a circle;

[0031] A pixel selection module, configured to set a pixel point within the target area as a first pixel point;

[0032] A pixel traversal module is used to traverse all the first pixel points in a preset order, select the first pixel point whose distance from other pixel points other than the first pixel point and the generated target figure is greater than a preset threshold as the center point to generate the target figure, and the preset threshold is not less than the radius of the target figure.

[0033] In order to solve the above technical problems, the present invention also provides a storage medium, in which a computer program is stored. The computer program is configured to execute any of the aforementioned methods for generating graphics in a layout when running.

[0034] To solve the above technical problems, the present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the aforementioned methods for generating graphics in a layout.

[0035] Different from the existing technology, the method for generating graphics in a layout provided by the present invention obtains a layout area on the layout for generating a target graphic, sets the pixel points in the layout area as the first pixel points, and finally traverses all the first pixel points to screen out suitable first pixel points to generate the target graphic. Since the target graphic is automatically generated by using pixel points, the target graphic can be automatically drawn, the drawing efficiency is improved, and errors are avoided, which can greatly reduce the labor intensity and time cost of designers.

[0036] The device, storage medium and electronic device for generating graphics in a layout provided by the present invention belong to the same inventive concept as the method for generating graphics in a layout, and therefore have the same beneficial effects, which will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic flow chart of a method for generating graphics in a layout provided by the first embodiment of the present invention.

[0038] Figure 2 A schematic diagram of generating a target graphic using the method for generating a graphic in a layout provided by the first embodiment of the present invention.

[0039] Figure 3 for Figure 1 Detailed flowchart of step S3 in the method shown.

[0040] Figure 4 A schematic flow chart of a method for generating graphics in a layout provided in a second embodiment of the present invention.

[0041] Figure 5 A schematic diagram of generating a target graphic using the method for generating a graphic in a layout provided by the second embodiment of the present invention.

[0042] Figure 6 This is a schematic diagram of the obstacle avoidance boundary when the obstacle is a non-closed line.

[0043] Figure 7 This is a schematic diagram of the obstacle avoidance boundary when the obstacle is a polygon.

[0044] Figure 8 A partial schematic diagram of the layout after generating the target graphics for a specific application example.

[0045] Figure 9 This is a principle block diagram of an apparatus for generating graphics in a layout provided by the third embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following describes a specific embodiment of the present invention in more detail with reference to schematic diagrams. The advantages and features of the present invention will become more apparent from the following description and claims. It should be noted that the drawings are greatly simplified and not to exact scale, and are intended solely to facilitate and clearly illustrate the embodiments of the present invention.

[0047] In the description of the present invention, it should be understood that the terms "center", "up", "down", "left", "right", etc., indicating directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.

[0048] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0049] Please refer to Figure 1 A first embodiment of the present invention provides a method for generating a graphic in a layout, the method comprising the following steps:

[0050] S1: Obtain a layout area on the layout for generating a target graphic, where the target graphic is a circle.

[0051] In an embodiment of the present application, before generating a target pattern on a layout, a layout area for generating the target pattern must first be obtained. The layout area can be a pre-defined area on the layout, or it can be an area selected in response to a user instruction, such as a box selection instruction, which obtains a boxed area on the layout as the layout area.

[0052] S2: Set a pixel point in the layout area as the first pixel point.

[0053] In the embodiment of the present application, the layout is essentially an image in the computer, and the image is composed of pixels, so the layout contains many pixels. The pixels in the layout area are set as the first pixel, which can be distinguished from the pixels outside the layout area. Figure 2 As shown, the layout area A is a rectangle, and the pixel point P0 on the layout is represented by a square with a cross. After the pixel point P0 in the layout area A is set as the first pixel point P1, the first pixel point P1 is represented by a hollow square.

[0054] S3: Traverse all first pixel points in a preset order, and generate a target graphic at a first pixel point whose distance from other pixel points other than the first pixel point and the generated target graphic is greater than a preset threshold, and the preset threshold is not less than the radius of the target graphic.

[0055] In the embodiment of the present application, the preset order can be any order. Since the pixels are arranged in an array, in order to generate a sufficient number of target graphics, the preset order in this embodiment is preferably row-first, column-later. That is, starting from the first row, the first pixel is traversed in the preset direction. After the first pixel in the first row is traversed, the first pixel is traversed from the second row in the preset direction, and so on, until the last first pixel is traversed. The preset direction can be from left to right or from right to left.

[0056] When traversing each first pixel, it is necessary to determine whether the distance between the currently traversed first pixel and other pixels other than the first pixel, as well as the generated target graphic, is greater than a preset threshold. Only if the distance is greater than the preset threshold will the target graphic be generated at the currently traversed first pixel. It should be noted that the distance between the first pixel, other pixels other than the first pixel, and the generated target graphic is the shortest distance between them.

[0057] Since the distance between the first pixel point used to generate the target graphic and other pixel points other than the first pixel point is greater than the preset threshold, and the distance between the first pixel point and the generated target graphic is also greater than the preset threshold, and the preset threshold is not less than the radius of the target graphic, then after the target graphic is generated at the first pixel point currently traversed, the target graphic will not overlap with other graphics on the layout, and the target graphics will not overlap with each other.

[0058] like Figure 2 As shown, the first row of first pixel points P1 is the first row at the bottom, and the last row of first pixel points P1 is the first row at the top, with the first pixel points P1 in each row ordered from left to right. The first first pixel point P1 in the first row is numbered (1,1), the second first pixel point P1 in the first row is numbered (1,2), ..., the last first pixel point P1 in the first row is numbered (1,10), the first first pixel point P1 in the second row is numbered (2,1), the second first pixel point P1 in the second row is numbered (2,2), ..., and the last first pixel point P1 in the last row is numbered (8,10). Assuming the side length of the first pixel point P1 is 1, the preset threshold is 1.1, and the radius of the target pattern is 1, nine target patterns A1 are ultimately generated within the layout area A. In the figure, the target pattern A1 is represented by a shaded circle.

[0059] The method for generating graphics in a layout provided in an embodiment of the present application first obtains a layout area for generating a target graphic, then sets the pixel points in the layout area as the first pixel points, and finally generates the target graphic by traversing all the first pixel points and screening out suitable first pixel points. Since the target graphic is automatically generated by using pixel points, the target graphic can be automatically drawn, the drawing efficiency is improved, and errors are avoided. The designer only needs to determine the target area, the preset threshold and the radius of the target graphic, which can greatly reduce the labor intensity and time cost of the designer.

[0060] In this embodiment, please refer to Figure 3 , traversing all first pixel points in a preset order, generating a target graphic at a first pixel point whose distance from other pixel points other than the first pixel point and the generated target graphic is greater than a preset threshold, that is, step S3 specifically includes:

[0061] S31: Pixel point acquisition step: selecting an undetected pixel from all first pixel points according to a preset order as a detection pixel point;

[0062] S32: Detect whether a circular range with the detection pixel as the center and a radius of a preset threshold covers pixel points other than the first pixel point and the generated target graphic;

[0063] S33: If the detection result is no, a target pattern is generated at the detection pixel point, and the process goes to the pixel point acquisition step S31 until all first pixel points are selected;

[0064] If the detection result is yes, the process goes to pixel point acquisition step S31 until all first pixel points are selected.

[0065] For example, Figure 2 As shown, when each first pixel point (1,1) in the first row is used as a detection pixel point, since the circular range with the detection pixel point (1,1) as the center and the radius as the preset threshold covers other pixel points P0, the detection pixel point becomes (1,2). Similarly, the circular range with the detection pixel point (1,2) as the center and the radius as the preset threshold covers other pixel points P0. Similarly, after traversing the first pixel point in the first row, the first pixel point in the second row is traversed. When each first pixel point (2,1) in the second row is used as a detection pixel point, since the circular range with the detection pixel point (2,1) as the center and the radius as the preset threshold covers other pixel points P0, the detection pixel point becomes (2,2). The circular range with the detection pixel point (2,2) as the center and the radius as the preset threshold does not cover other pixel points P0, nor does it cover the generated target graphic A1. Therefore, the first target graphic A1 is generated at the detection pixel point (2,2).

[0066] In order to speed up the traversal, further, the target graphics are generated at the detection pixel points, including:

[0067] The first pixel point within the coverage area of ​​the target graphic is set as the second pixel point.

[0068] After the first pixel becomes the second pixel, it will not be selected again and the process will directly traverse to the next first pixel. In this case, the non-first pixel includes not only the pixel P0 but also the second pixel P2.

[0069] like Figure 2As shown in the figure, after the first target shape A1 is generated, the first pixel P1 (numbered (2, 3)) covered by the first target shape A1 becomes the second pixel P2. Therefore, when selecting the next detection pixel, the second pixel P2 (numbered (2, 3)) is skipped and the first pixel P1 (numbered (2, 4)) is selected as the detection pixel. In the figure, the second pixel P2 is represented by a dotted shaded square. Since the number of first pixel P1s traversed is reduced, the traversal speed can be accelerated.

[0070] Please refer to Figure 4 The second embodiment of the present invention provides a method for generating a graphic in a layout. The method of this embodiment is based on the method of the first embodiment. In addition to including all the technical features of the method of the first embodiment, the method of this embodiment further includes the following steps before traversing all first pixel points in a preset order, that is, before step S3:

[0071] S4: Obtain obstacles within the layout area;

[0072] S5: Determine an obstacle avoidance boundary outside the obstacle, where the shortest distance from each point on the obstacle avoidance boundary to the obstacle is the same;

[0073] S6: Set the first pixel point within the obstacle avoidance boundary as the third pixel point.

[0074] In this embodiment, obstacles are shapes that the target shape needs to avoid. Obstacles can be pre-set shapes on the board or selected in response to user instructions. Obstacles can be on the same layer as the target shape or on a different layer.

[0075] like Figure 5 As shown, the layout area A and Figure 2 The difference is that Figure 5 Obstacles B and C exist within layout area A in the example. Obstacle avoidance boundaries B1 and C1 are defined around obstacles B and C, respectively. The first pixel P1 within obstacle avoidance boundaries B1 and C1 is set as the third pixel P3. In the figure, the third pixel P3 is represented by a square filled with horizontal shading. In this case, the non-first pixel includes not only pixel P0 and second pixel P2, but also third pixel P3.

[0076] Obstacles can be of any shape. The more common obstacles are non-closed lines and polygons. Non-closed lines are usually represented as signal lines in the layout, and polygons are the graphics of components in the layout.

[0077] Specifically, when the obstacle is a non-closed line, the obstacle avoidance boundary is determined outside the obstacle, including:

[0078] Generate a strip graphic with a preset width using each line segment of the non-closed line as a center line;

[0079] Generate an extended circle with a preset width in diameter with each endpoint of the non-closed line as the center;

[0080] The maximum boundary of the combination of the strip pattern and the expanded circle is used as the obstacle avoidance boundary.

[0081] like Figure 6 As shown, the non-closed line includes two line segments, and a strip-shaped figure with a preset width d is generated with the two line segments as the center line. An extended circle with a diameter d is generated with the three endpoints as the center. The maximum boundary after combining the strip-shaped figure and the extended circle is the obstacle avoidance boundary B1.

[0082] When the obstacle is a polygon, determine the obstacle avoidance boundary outside the obstacle, including:

[0083] Generate a strip graphic with a preset width using each edge of the polygon as the center line;

[0084] Generate an extended circle with a diameter of the preset width with each endpoint of the polygon as the center;

[0085] The outermost maximum boundary of the combination of the strip pattern and the expanded circle is used as the obstacle avoidance boundary.

[0086] like Figure 7 As shown, the polygon is a rectangle, and a strip graphic with a preset width d is generated with the four side lines as the center line, and an extended circle with a diameter d is generated with the four end points as the center. The outermost maximum boundary after combining the strip graphic and the extended circle is the obstacle avoidance boundary C1.

[0087] The target graphics generated by the method of this embodiment do not overlap with each other, and the target graphics do not overlap with obstacles. Figure 8 As shown in a specific application example, after constructing target graphics within a layout area of ​​a layout using the method of an embodiment of the present invention, each target graphic is spaced a certain distance apart, and each target graphic is also spaced a certain distance away from obstacles within the layout area. In the figure, the shaded circles represent the target graphics, and all other graphics except the target graphics are obstacles. It should be noted that the grid lines in the figure do not represent pixels, but rather the grid lines of the drawing board used to draw graphics on a computer interface.

[0088] See also Figure 9 The third embodiment of the present invention provides a device for generating a graphic in a layout. The device includes:

[0089] Region acquisition module 1 is used to obtain a layout area on the layout for generating a target graphic, where the target graphic is a circle. In an embodiment of the present application, before generating the target graphic on the layout, the layout area for generating the target graphic must first be obtained. The layout area can be a pre-set area on the layout, or it can be an area selected in response to a user instruction, such as a box selection instruction, which obtains a boxed area on the layout as the layout area according to the box selection instruction.

[0090] Pixel selection module 2 is used to set the pixels within the target area as the first pixel. In the embodiment of the present application, the layout is essentially an image in the computer, and the image is composed of pixels, so the layout contains many pixels. Setting the pixels within the layout area as the first pixel can distinguish them from the pixels outside the layout area.

[0091] The pixel traversal module 3 is used to traverse all first pixel points in a preset order, and generate a target graphic at a first pixel point whose distance from other pixel points other than the first pixel point and the generated target graphic is greater than a preset threshold, and the preset threshold is not less than the radius of the target graphic.

[0092] In the embodiment of the present application, the preset order can be any order. Since the pixels are arranged in an array, in order to generate a sufficient number of target graphics, the preset order in this embodiment is preferably row-first, then column-second. That is, the pixel traversal module 3 first traverses the first pixel starting from the first row in the preset direction. After the first pixel in the first row is traversed, the pixel traversal module 3 traverses the first pixel starting from the second row in the preset direction, and so on, until the last first pixel is traversed. The preset direction can be from left to right or from right to left.

[0093] When traversing each first pixel, pixel traversal module 3 determines whether the distance between the currently traversed first pixel and other pixels other than the first pixel, as well as the generated target graphic, is greater than a preset threshold. Only if the distance is greater than the preset threshold will the target graphic be generated at the currently traversed first pixel. It should be noted that the distance between the first pixel, other pixels other than the first pixel, and the generated target graphic is the shortest distance between them.

[0094] Since the distance between the first pixel point used to generate the target graphic and other pixel points other than the first pixel point is greater than the preset threshold, and the distance between the first pixel point and the generated target graphic is also greater than the preset threshold, and the preset threshold is not less than the radius of the target graphic, then after the target graphic is generated at the first pixel point currently traversed, the target graphic will not overlap with other graphics on the layout, and the target graphics will not overlap with each other.

[0095] The device for generating graphics in a layout provided in an embodiment of the present application first obtains a layout area for generating a target graphic, then sets the pixel points in the layout area as first pixel points, and finally generates the target graphic by traversing all first pixel points and screening out suitable first pixel points. Since the target graphic is automatically generated by using pixel points, the target graphic can be automatically drawn, the drawing efficiency is improved, and errors are avoided. The designer only needs to determine the target area, the preset threshold and the radius of the target graphic, which can greatly reduce the labor intensity and time cost of the designer.

[0096] Specifically, the pixel traversal module 3 is specifically used to:

[0097] Selecting an undetected pixel from all first pixels in a preset order as a detection pixel;

[0098] Detecting whether a circular range with the detection pixel as the center and a radius of a preset threshold covers pixel points other than the first pixel point and the generated target graphic;

[0099] If the detection result is negative, a target pattern is generated at the detection pixel point, and an undetected pixel is selected from all first pixel points in a preset order as a detection pixel point until all first pixel points are selected;

[0100] If the detection result is yes, the process proceeds to selecting an undetected pixel from all first pixel points in a preset order as a detection pixel point until all first pixel points are selected.

[0101] Furthermore, after detecting the pixel points to generate the target graphic, the pixel traversal module 3 is further configured to set the first pixel point within the coverage range of the target graphic as the second pixel point.

[0102] Optionally, before the pixel traversal module 3 traverses all first pixel points in a preset order, the device further includes:

[0103] Obstacle acquisition module, used to obtain obstacles within the layout area;

[0104] A boundary determination module is used to determine an obstacle avoidance boundary outside the obstacle, wherein the shortest distance from each point on the obstacle avoidance boundary to the obstacle is equal;

[0105] The pixel selection module 2 is further configured to set the first pixel point within the obstacle avoidance boundary as the third pixel point.

[0106] Specifically, the obstacle is a non-closed line, and the boundary determination module is specifically used to:

[0107] Generate a strip graphic with a preset width using each line segment of the non-closed line as a center line;

[0108] Generate an extended circle with a preset width in diameter with each endpoint of the non-closed line as the center;

[0109] The maximum boundary of the combination of the strip pattern and the expanded circle is used as the obstacle avoidance boundary.

[0110] Obstacles are polygonal, and the boundary determination module is specifically used for:

[0111] Generate a strip graphic with a preset width using each edge of the polygon as the center line;

[0112] Generate an extended circle with a preset width in diameter with each endpoint of the polygon as the center;

[0113] The largest outermost boundary of the combination of the strip pattern and the expanded circle is used as the obstacle avoidance boundary.

[0114] The present invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the method for generating graphics in a layout according to any of the aforementioned embodiments when running.

[0115] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0116] The present invention also provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for generating graphics in a layout according to any of the aforementioned embodiments.

[0117] Specifically, the memory and the processor may be connected via a data bus. In addition, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0118] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "example," or "specific example" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments. Furthermore, those skilled in the art may combine and reconcile different embodiments or examples described in this specification.

[0119] The above description is merely a preferred embodiment of the present invention and does not limit the present invention in any way. Any person skilled in the art who, without departing from the scope of the present invention, makes any equivalent substitution, modification, or other changes to the technical solution and technical content disclosed in the present invention shall be deemed to be within the scope of the present invention and still fall within the scope of protection of the present invention.

Claims

1. A method for generating a graphic in a layout, characterized in that: include: Obtaining a layout area on a layout for generating a target pattern, wherein the target pattern is a circle; Setting a pixel point within the layout area as a first pixel point; Traverse all the first pixel points in a preset order, generate a target graphic at the first pixel point whose distance from other pixel points other than the first pixel point and the generated target graphic is greater than a preset threshold, and set the first pixel point within the coverage range of the target graphic as the second pixel point, and the preset threshold is not less than the radius of the target graphic.

2. The method according to claim 1, characterized in that The step of traversing all the first pixel points in a preset order, generating a target pattern at a first pixel point whose distance from other pixel points other than the first pixel point and the generated target pattern is greater than a preset threshold, and setting the first pixel point within the coverage area of ​​the target pattern as the second pixel point includes: Pixel point acquisition step: selecting an undetected pixel from all the first pixel points according to a preset order as a detection pixel point; Detecting whether a circular range with the detection pixel point as the center and a radius of a preset threshold value covers pixel points other than the first pixel point and the generated target graphic; If the detection result is negative, a target pattern is generated at the detection pixel point, a first pixel point within the coverage range of the target pattern is set as a second pixel point, and the process proceeds to the pixel point acquisition step until all the first pixel points are selected; If the detection result is yes, go to the pixel point acquisition step until all the first pixel points are selected.

3. The method according to claim 1 or 2, characterized in that Before traversing all the first pixel points in a preset order, the method further includes: Obtaining obstacles within the layout area; Determine an obstacle avoidance boundary outside the obstacle, wherein the shortest distance from each point on the obstacle avoidance boundary to the obstacle is equal; The first pixel point within the obstacle avoidance boundary is set as the third pixel point.

4. The method according to claim 3, characterized in that The obstacle is a non-closed line, and determining an obstacle avoidance boundary outside the obstacle includes: Generating a strip-shaped graphic with a preset width using each line segment of the non-closed line as a center line; Generate an extended circle with a diameter of the preset width with each endpoint of the non-closed line as the center; The maximum boundary of the combination of the strip pattern and the expanded circle is used as the obstacle avoidance boundary.

5. The method according to claim 3, characterized in that The obstacle is a polygon, and determining an obstacle avoidance boundary outside the obstacle includes: Generating a strip-shaped graphic with a preset width using each side line of the polygon as a center line; Generate an extended circle with a diameter of the preset width with each endpoint of the polygon as the center; The outermost maximum boundary of the combination of the strip pattern and the expanded circle is used as the obstacle avoidance boundary.

6. The method according to claim 1, characterized in that The preset order is the order of rows first and columns later.

7. A device for generating a graphic in a layout, characterized in that include: An area acquisition module is used to acquire a layout area on the layout for generating a target pattern, wherein the target pattern is a circle; A pixel selection module, configured to set a pixel point within the layout area as a first pixel point; A pixel traversal module is used to traverse all the first pixel points in a preset order, generate a target graphic at a first pixel point whose distance from other pixel points other than the first pixel point and the generated target graphic is greater than a preset threshold, and set the first pixel point within the coverage range of the target graphic as the second pixel point, and the preset threshold is not less than the radius of the target graphic.

8. A storage medium, characterized in that: The storage medium stores a computer program, and the computer program is configured to execute the method for generating graphics in a layout according to any one of claims 1 to 6 when running.

9. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method for generating a graphic in a layout according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for constructing PAD graph, storage medium and electronic equipment

    CN115392185A