A graphic offset method for electronic design automation system and electronic design automation system

By fitting and offsetting the arcs in polygons, the problem that the prior art cannot accurately deal with arc-shaped polygons is solved, and a wider and more accurate graphical offset calculation is achieved.

CN115526956BActive Publication Date: 2025-04-25深圳华芯盛软件科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211121413.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2025-04-25
Estimated Expiration
2042-09-15

AI Technical Summary

Technical Problem

Existing graphics offset technology cannot accurately process polygons with arcs, and cannot guarantee the graphics accuracy after offset.

Method used

By fitting the arc in the polygon into a straight line segment, a new polygon is formed, and then offset calculation is performed on the polygon, the offset polygon is generated, and the offset result of the original arc is synchronized with the new polygon to obtain the final offset figure.

Benefits of technology

Accurate offset of arc-shaped polygons is achieved, the range of offset calculation is expanded, and the offset accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115526956B_ABST
    Figure CN115526956B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for graphic offset, comprising the following steps: step S1, fitting the arc in a first polygon with an arc with a straight line segment, and connecting the fitted arc with the straight line segment in the first polygon with an arc to form a second polygon with a straight line; step S2, performing offset calculation on the straight line polygon to form a third polygon after offset; step S3, offsetting the arc in the first polygon to form a gap ring; step S4, performing a joint operation on the gap ring and the third polygon. The present invention can be applied to the accurate calculation of graphic offset calculation in the EDA field, and can extend the applicable scope of the original accurate offset calculation from a simple polygon with a straight line segment to a simple polygon with an arc, thereby making the calculation range of the offset larger and the precision control better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the fields of electronic design automation and computer-aided design, and in particular to an offset method for a polygonal figure with circular arcs. Background Art

[0002] The graphic offset technology refers to inputting an arbitrary legal polygon (for example, a closed simple polygon) and an offset distance parameter d to obtain a new polygon, and making the distance between the offset polygon and the polygon before the offset always greater than or equal to the given offset distance parameter d.

[0003] Graphic offset technology is a very important part in the field of electronic design automation (EDA). For example, the design rule check (DRC) check needs to check the distance between different modules to meet the minimum distance constraint. Once the module cannot meet the minimum distance constraint, the module must be pushed, that is, part or even all of the current module must be subtracted to meet the minimum distance constraint. Graphic offset technology can ensure that as little as possible is subtracted to obtain the best subtracted size.

[0004] The offset of the graphics will generate the offset polygon based on the translation of each edge in the offset direction. After simple translation, the edges cannot be connected to form a complete polygon. Usually, it is necessary to use arc transition to connect the new edges to obtain a polygon with arcs; or by extending the translated edges, find the new intersection between the edges, and then connect them into a complete polygon after controlling the angle size. For example, Cadence's chip design software Allegro Package Designer (APD for short) translates all edges in the direction of their normals by an outward expansion distance d, and then for convex angles, the translated edges are extended to find the intersection points to obtain new endpoints; and for concave angles, the intersection points can be directly found through the translated line segments. After the above operations, a preliminary outward expansion polygon can be obtained. Then APD performs acute angle trim control on the obtained polygon, that is, for all acute angles of the polygon, when the distance between the two sides of the acute angle exceeds a preset threshold, the current distance is connected in a custom form, but it cannot guarantee that the outward expansion distance is always d.

[0005] At present, the graphics computing library CGAL has made theoretically accurate polygon equidistance offset based on Minkowski sum. Given a graph A, B∈R 2 , whose Minkowski sum is defined as: That is, the input is 2 polygons, and then based on all the endpoints of one of the polygons as the center, all the edges of the other polygon are drawn, and then the redundant edges are removed to form the resulting polygon. The offset based on the Minkowski sum is an accurate version of the offset made by adding a circle with a radius of d and an input polygon as the base polygon; and because all the edges of the graphics operation library CGAL need to ensure the characteristics of rational numbers (or rational algebraic numbers), and directly offsetting the arc will directly destroy the rational characteristics, the graphics operation library CGAL currently only supports the offset operation of ordinary straight line segment polygons, and does not support the offset of polygons with arcs; similarly, the graphics library clipper itself only supports ordinary polygons and cannot accept arc polygons as offset input. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the existing graphic offset technology and provide a method for accurately offsetting polygonal graphics with arcs. Not only can the offset of polygons with arcs be supported at the same time, but the offset arcs can also ensure the accuracy of the results.

[0007] In order to achieve the above purpose and other purposes, the present invention is implemented by the following technical scheme: a graphic offset method, comprising the following steps:

[0008] Step S1: Fitting the arc in the first polygon with a straight line segment to form a fitted arc, and connecting the fitted arc with the straight line segment in the first polygon to form a second polygon;

[0009] Step S2 performs offset calculation on the second polygon to form a third polygon after offset;

[0010] Step S3: offset the arc in the first polygon to form a notched ring;

[0011] Step S4 performs a union operation on the notch ring and the third polygon.

[0012] In the above step S1, fitting the arc in the polygon with arc includes the following steps:

[0013] Step S11 determines whether the arc is convex;

[0014] If the result of step S11 is yes, step S12 is executed to select a plurality of endpoints on the arc and connect these endpoints to fit the arc to form a fitted arc;

[0015] If the result of step S11 is no, execute step S13 to select several endpoints on the arc, make tangents passing through these endpoints and tangent to the arc, connect the intersection points of these tangents to fit the arc, and form a fitted arc.

[0016] In the above step S2, the arc is a convex shape, and the offset calculation of the formed fitting arc includes the following steps: making a full circle with the endpoint as the center and the offset distance as the radius on each endpoint of the fitting arc, and the tangents of the two adjacent circles are the offset edges.

[0017] In the above step S2, the arc is a non-convex shape, and the offset calculation of the formed fitting arc includes the following steps: finding the starting point of the connection line on each endpoint of the fitting arc on the whole circle with the endpoint as the center, making a tangent to the whole circle through the starting point, the tangent is tangent to the whole circle at the starting point, and the tangent is parallel to the connected edge of the center of the whole circle; extending this tangent until it intersects with the next tangent and repeating the above steps; continuing the above steps for all other endpoints until a set of many edges and whole circles is obtained.

[0018] The present invention also provides a system, comprising at least one processor; and

[0019] A computer readable storage medium storing instructions that, when executed by the at least one processor, cause the system to:

[0020] A computer readable storage medium storing instructions that, when executed by the at least one processor, cause the system to:

[0021] Fitting the arc in the first polygon, and connecting the fitted arc with the straight line segment in the first polygon to form a second polygon;

[0022] Perform offset calculation on the second polygon to form an offset third polygon;

[0023] The arc in the first polygon is offset to form a notched ring;

[0024] A union operation is performed on the gap ring and the third polygon.

[0025] The above method of fitting an arc in a polygon with an arc includes the following operation instructions:

[0026] Determine whether the arc is convex;

[0027] The result is that a number of endpoints are selected on the arc, and these endpoints are connected to fit the arc to form a fitted arc;

[0028] If the result is no, select several endpoints on the arc, make tangents passing through these endpoints and tangent to the arc, connect the intersection points of these tangents to fit the arc, and form a fitted arc.

[0029] The above-mentioned arc is a convex shape, and the offset calculation of the formed fitting arc includes the following operation instructions: a full circle with the endpoint as the center and the offset distance as the radius is made on each endpoint of the fitting arc, and the tangents of the two adjacent circles are the offset edges.

[0030] The above arc is a non-convex shape, and the offset calculation of the formed fitting arc includes the following operation instructions: find the starting point of the connection line on each endpoint of the fitting arc on the whole circle with the endpoint as the center, make a tangent to the whole circle through the starting point, the tangent is tangent to the whole circle at the starting point, and the tangent is parallel to the connected side of the center of the whole circle; extend this tangent until it intersects with the next tangent and repeats the above steps; continue the above steps for all other endpoints until a collection of many edges and whole circles is obtained.

[0031] Compared with the existing technology, the advantage of the present invention is that all arcs are fitted to form common polygons, the fitted arcs are recorded to generate corresponding offset notch rings, and the common polygons are subjected to an offset algorithm and then combined with the offset notch rings to obtain the final figure, which is also the "accurate value of the Minkowski sum", thereby extending the applicable scope of the original accurate offset operation from simple polygons with straight line segments to simple polygons with arcs, thereby expanding the calculation range of the offset and improving the precision control.

[0032] The present invention will be further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 Shown is a flow chart of the method steps of pattern migration of the present invention.

[0034] Figure 2 Shown is a flow chart of the method steps for fitting circular arcs in a polygon with circular arcs according to the present invention.

[0035] Figure 3 It shows a comparison diagram of the convex shape offset of the arc of the present invention.

[0036] Figure 4 It shows a comparison diagram of the non-convex shape offset of the arc of the present invention.

[0037] Figure 5 It shows a comparison diagram of the operation results of step S1 and step S3 in a specific embodiment of the present invention.

[0038] Figure 6 Shown is a comparison diagram of the operation results of step S2 in a specific embodiment of the present invention.

[0039] Figure 7 Shown is a comparison diagram of the operation results of step S4 in a specific embodiment of the present invention.

[0040] Figure 8A comparison diagram of the first arc polygon D1 and the offset arc polygon D6 of the present invention is shown. DETAILED DESCRIPTION

[0041] like Figure 1 As shown, the present invention provides a method for offsetting a graphic, wherein the graphic is a polygonal graphic with an arc, comprising the following steps:

[0042] Step S1: Fit the arc of the first polygon in the figure with a straight line segment, and connect the fitted arc with the straight line segment in the polygon with arc to form a second polygon. The first polygon is a polygon with arc, please refer to Figure 5 The first polygon D1 with arcs includes 11 arcs such as arcs L11-L111, which are fitted to form fitting arcs L12-L112. The fitting arcs L12-L112 are connected with the straight line segments of the polygon D1 with arcs to form a second polygon D2, which is a straight line polygon.

[0043] like Figure 2 As shown, step S1 specifically includes: step S11 determines whether the arc is convex. This determination is mainly relative to the inside of the figure, please refer to Figure 5 In the first polygon D1, the arc L11 is convex relative to the interior of the first polygon D1, and the arc L61 is non-convex.

[0044] If the result of step S11 is yes, step S12 is executed to select a plurality of endpoints on the arc and connect these endpoints to fit the arc to form a fitted arc.

[0045] like Figure 3 As shown, several endpoints are selected on the arc L11, such as endpoint P11, endpoint P21, etc., and these endpoints are connected to fit the arc to form a fitted arc L11', and arc L12 represents the position where the polygon should exist after the offset; the fitted arc L12' is inscribed with the arc L12.

[0046] At each end point of the fitting arc L11', a full circle is made with the end point as the center and the offset distance as the radius. If the radius of the arc L11 is R and the offset distance is d, under ideal conditions, for the convex arc L11, the radius of the offset arc L12 should be R+d.

[0047] If the result of step S11 is no, execute step S13 to select several endpoints on the arc, make tangents passing through these endpoints and tangent to the arc, connect the intersection points of these tangents to fit the arc, and form a fitted arc.

[0048] like Figure 4As shown, several endpoints are selected on the arc L61, such as endpoint P11, endpoint P21, etc., and tangents are made through these endpoints and tangent to the arc. The intersection points of these tangents are connected to form a fitting arc L61', and arc L62 represents the position where the polygon should be after the offset; the fitting arc L62' is in an external tangent relationship with arc L62.

[0049] The radius of the offset arc L62 should be Rd.

[0050] At each endpoint of the fitted arc L61', find the starting point of the connecting line on the full circle with the endpoint as the center, and draw a tangent to the full circle through the starting point. The tangent is tangent to the full circle at the starting point, and the tangent is parallel to the connected side of the full circle center; extend this tangent until it intersects with the next tangent and repeat the above steps; continue the above steps for all other endpoints until a set of many edges and full circles is obtained, such as Figure 4 The arc L62' is fitted in the middle.

[0051] Set the endpoints of all tangent edges in this process as event points, and store these event points in a priority queue with x coordinates from small to large, and use the scan line algorithm to calculate the new intersection points;

[0052] The scan line algorithm is a commonly used algorithm for scan conversion of polygons. It makes full use of the continuity between adjacent pixels and converts the vertex representation of geometric figures in the computer into a dot matrix representation, avoiding point-by-point judgment and repeated intersection calculations, thereby achieving the purpose of reducing the amount of calculation and improving the efficiency of the algorithm.

[0053] Add legal edges to the result graph and remove other illegal edges to produce the final result graph.

[0054] Legal edges refer to the tangent point and the arcs around it and the offset tangents. The circle with the original arc endpoint as the center and a radius of d is an illegal edge. After adding the legal edges to the result figure, the circle with the original arc endpoint as the center is removed, and the remaining figure is the final result figure.

[0055] Step S2 performs offset calculation on the second polygon to form a third polygon after offset.

[0056] Please refer to Figure 6 The second polygon D2 is offset to form an offset third polygon D4. The offset algorithm uses, for example, the Minkowski algorithm, and the offset third polygon D4 has an arc.

[0057] Step S3 offsets the arc in the polygon with arc to form a notched ring.

[0058] Please refer to Figure 5 , the first polygon D1 is offset to form a notch ring D3.

[0059] For all arcs L11-L111, connect their centers and arc endpoints (i.e., the intersection points of the original fitted line segments) and extend the line segments so that they intersect at the arc that should be formed after the offset, and connect the two new intersection points with the endpoints of the original arc respectively. At the same time, connect the original arc and the arc formed after the offset, that is, offset the position of the original arc upward by a distance d, thereby generating multiple rings L13-L113 and retaining these shapes.

[0060] Here, the shifting of the original arc position upward by d is just a simple example. In actual graphics, there is no such standardized arc shape, but more irregular graphics composed of arcs and line segments. It is impossible to directly shift the whole up and down in the software.

[0061] Step S4 performs a union operation on the gap ring and the third polygon; thus, the final offset figure and the gap ring will produce jagged edges due to the arc fitting, and finally form a complete version of the offset arc polygon. Figure 7 As shown, the third polygon D4 and the gap ring D3 are combined to form a complete version of the offset arc polygon D6. To better demonstrate the offset effect, please refer to Figure 8 .

[0062] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A pattern offset method for an electronic design automation system, characterized in that: The following steps are involved: Step S1, fitting an arc in a first polygon corresponding to the shape between modules in an electronic design automation system with a straight line segment to form a fitting arc, and connecting the fitting arc with the straight line segment in the first polygon to form a second polygon; Step S2, performing offset calculation on the second polygon to form a third polygon after offset; Step S3, offsetting the arc in the first polygon to form a notched ring; Step S4, performing a union operation on the notched circular ring and the third polygon; The step S1 of fitting the arc in the first polygon with straight line segments to form a fitted arc includes the following steps: Step S11, determining whether the arc is convex; If the result of step S11 is yes, step S12 is executed to select a plurality of endpoints on the arc and connect these endpoints to fit the arc to form a fitted arc; If the result of step S11 is no, execute step S13, select several endpoints on the arc, make tangents passing through these endpoints and tangent to the arc, connect the intersection points of these tangents to fit the arc, and form a fitted arc.

2. A graphic offset method for an electronic design automation system as claimed in claim 1, characterized in that: In step S2, the arc is convex in shape, and the offset calculation of the formed fitting arc includes the following steps: making a full circle with the endpoint as the center and the offset distance as the radius on each endpoint of the fitting arc, and the tangents of the two adjacent circles are the offset edges.

3. A graphic offset method for an electronic design automation system as claimed in claim 2, characterized in that: In step S2, the arc is a non-convex shape, and the offset calculation of the formed fitting arc includes the following steps: finding the starting point of the connection line on each endpoint of the fitting arc on the whole circle with the endpoint as the center, making a tangent to the whole circle through the starting point, the tangent is tangent to the whole circle at the starting point, and the tangent is parallel to the connected edge of the center of the whole circle; extending this tangent until it intersects with the next tangent and repeats the above steps; continuing the above steps for all other endpoints until a collection of many edges and whole circles is obtained.

4. An electronic design automation system, characterized in that: comprising, at least one processor; as well as A computer-readable storage medium storing instructions that, when executed by the at least one processor, cause the system to perform the following operations: fitting arcs in a first polygon corresponding to shapes between modules in an electronic design automation system, and connecting the fitted arcs with straight line segments in the first polygon to form a second polygon; Perform offset calculation on the second polygon to form an offset third polygon; The arc in the first polygon is offset to form a notched ring; Performing a union operation on the gap ring and the third polygon; The step of fitting the arc in the first polygon includes the following operation instructions: Determine whether the arc is convex; The result is that a number of endpoints are selected on the arc, and these endpoints are connected to fit the arc to form a fitted arc; If the result is no, select several endpoints on the arc, make tangents passing through these endpoints and tangent to the arc, connect the intersection points of these tangents to fit the arc, and form a fitted arc.

5. An electronic design automation system as claimed in claim 4, characterized in that: The arc is convex in shape, and the offset calculation of the fitted arc includes the following operation instructions: a full circle with the endpoint as the center and the offset distance as the radius is made on each endpoint of the fitted arc, and the tangents of the two adjacent circles are the offset edges.

6. An electronic design automation system as claimed in claim 5, characterized in that: The arc is a non-convex shape, and the offset calculation of the fitted arc formed includes the following operation instructions: find the starting point of the connection line on each endpoint of the fitted arc on the whole circle with the endpoint as the center, make a tangent to the whole circle through the starting point, the tangent is tangent to the whole circle at the starting point, and the tangent is parallel to the connected side of the center of the whole circle; extend this tangent until it intersects with the next tangent and repeats the above steps; continue the above steps for all other endpoints until a collection of many edges and whole circles is obtained.

Citation Information

Patent Citations

  • Method for realizing robot solid modeling and blade laser detection simulation on basis of MATLAB

    CN103970033A

  • Two-dimensional polygon offset method

    CN109887052A