B spline curve offset-selfing elimination method based on Legendre polynomial expansion

By using the Legendre polynomial expansion method, the contradiction between approximation accuracy and efficiency and the low efficiency of self-crossing detection in B-spline curve equidistant migration are resolved. This achieves efficient self-crossing elimination and improves the accuracy and speed of B-spline curve migration in computer-aided design and manufacturing systems.

CN122088136APending Publication Date: 2026-05-26HEFEI ARTIFICIAL INTELLIGENCE & BIG DATA RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI ARTIFICIAL INTELLIGENCE & BIG DATA RES INST CO LTD
Filing Date
2026-04-24
Publication Date
2026-05-26

Smart Images

  • Figure CN122088136A_ABST
    Figure CN122088136A_ABST
Patent Text Reader

Abstract

The invention particularly relates to a B spline curve offset-selfing elimination method based on Legendre polynomial expansion. The method comprises the following steps of: obtaining a Legendre coefficient auxiliary matrix on the basis of a Legendre polynomial value and a Gauss-Legendre quadrature node weight; the method comprises the following steps: mapping a Gauss-Legendre quadrature node to a non-zero length node interval to obtain a corresponding normal direction; acquiring a corresponding offset point according to the normal direction and the specified distance; based on the Legendre coefficient auxiliary matrix and the offset point, obtaining a Legendre coefficient; compared with a Taylor expansion method, the Legendre orthogonal basis expansion method has the advantages that the approximation convergence rate is better; and the error can be further controlled through calculation of the truncation error of the Legendre coefficient and subsequent judgment and processing. The Legendre coefficient auxiliary matrix and the Legendre-Bezier transformation matrix are pre-calculated static data, so that global repeated calling for multiple times can be realized, and the approximation efficiency is improved. And when the tangent intersection detection triggered by the adjoint matrix eigenvalue method fails, returning is executed, and real intersection and tangent intersection are distinguished based on a GCD decomposition method, so that the selfing detection efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design and manufacturing technology, and in particular to a B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion. Background Technology

[0002] Curve equidistant offset is a fundamental geometric operation in EDA and CAD / CAM systems. Curve equidistant offset is widely used in integrated circuit layout design, including Design Rule Check (DRC), Etching Compensation, Optical Proximity Correction (OPC), CNC Machining Tool Path Generation, and Printed Circuit Board Routing. Specifically, given a planar parametric curve and an offset distance, the equidistant offset curve is defined as: the new curve obtained by offsetting the planar parametric curve along the normal vector direction by a specified distance.

[0003] As the scale of integrated circuit design continues to expand, the number of curves contained in the layout is growing exponentially. In advanced process EDA workflows, a single layout layer may contain thousands or even tens of thousands of planar parametric curves. However, although B-spline curves, as a type of planar parametric curve, belong to rational polynomial curves, the equidistant offset curves corresponding to B-spline curves are usually not rational because the calculation of the normal vector involves finding the root of the derivative vector length. Therefore, in practical applications, approximation methods must be used to calculate the equidistant offset curves. The calculation of the aforementioned equidistant offset curves usually presents the following technical problems: 1) There is a contradiction between approximation accuracy and approximation efficiency: the accuracy of the discrete sampling method depends on the sampling density, making it difficult to adaptively control the error; the control point offset method is relatively simple but has limited accuracy and requires a lot of subdivision for high curvature regions; the Taylor expansion method has a slow convergence speed. 2) Low efficiency of self-intersection detection: Equidistant offset curves are prone to self-intersection in the high curvature region of the original planar parameter curve; self-intersecting equidistant offset curves may cause serious problems such as design rule violations or overcutting in EDA applications; most existing self-intersection elimination methods are based on dense sampling detection, however, dense sampling detection is inefficient and prone to missing intersection points. To address the aforementioned technical problems, this application proposes a B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion. Summary of the Invention

[0004] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion, which solves the current problem of "how to improve the self-intersection detection efficiency to achieve B-spline curve offset and self-intersection elimination while ensuring approximation accuracy and approximation efficiency".

[0005] To achieve the above objectives, the main technical solutions adopted by the present invention include: This invention provides a B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion, the B-spline curve offset-self-intersection elimination method comprising: S1. Divide the B-spline curve input to the processing system into node intervals to obtain non-zero length node intervals; the processing system includes: EDA and CAD / CAM systems. S2. Obtain the Legendre coefficient auxiliary matrix based on the Legendre polynomial values ​​and the weights corresponding to each Gauss-Legendre quadrature node; S3. Map the Gauss-Legendre quadrature nodes to non-zero length node intervals to obtain the position and normal of the Gauss-Legendre quadrature nodes corresponding to the B-spline curve; The Gauss-Legendre quadrature nodes are offset along the normal direction by a specified distance to obtain the offset points; the vector formed by the offset points is multiplied by the Legendre coefficient auxiliary matrix to obtain the Legendre coefficients; S4. Initialize the binomial coefficients and use de-Casteljau recursion to obtain the Legendre-Bezier transformation matrix; convert the Legendre coefficients into Bezier control points based on the Legendre-Bezier transformation matrix to obtain the Bezier segments; S5. Replace the shared endpoints of adjacent Bezier segments with the offset points corresponding to the B-spline curves; merge all Bezier segments into offset-B-spline offset curves in the original order.

[0006] Optionally, the B-spline curve offset-self-intersection elimination method further includes: S6. The offset-B spline offset curve is self-intersecting by sequentially performing Bezier segment decomposition, spatial mesh construction and wide phase culling, convex hull intersection test and candidate pair screening, implicit equation construction and precise intersection point solution, and curve trimming and reconstruction.

[0007] Optionally, the Bezier segment decomposition includes: Based on the node vector structure, the three control points and start and end parameter values ​​corresponding to each quadratic Bezier segment of the offset-B spline offset curve are extracted; and the segment offset corresponding to each quadratic Bezier segment is obtained.

[0008] Optionally, the spatial grid construction and wide phase culling include: The axis-aligned bounding box (AABB) is obtained based on all Bezier segments to obtain the average bounding box size; a grid index is constructed using a two-pass scan method based on the CSR compressed sparse row format; the grid cell size involved in the grid index is determined based on the average bounding box size; Get active units that contain more than two Bezier segments.

[0009] Optionally, the convex hull intersection test and candidate pair screening include: Based on the standard cell strategy, adjacent Bezier segments located on the same curve are excluded from the Bezier segment pairs in the active cells; then, the AABB overlap test and the Bezier control point convex hull intersection test are performed on the Bezier segment pairs in the active cells in sequence. The Bezier segments that pass the test will be added to the candidate list.

[0010] Optionally, the implicit equation construction and exact intersection solution include: For a pair of Bezier segments in the candidate list, the two quadratic Bezier curves are represented as parametric polynomials. An implicit equation is constructed by eliminating the parameter of one curve, and the other curve is substituted to obtain a quartic polynomial equation. The quartic polynomial equation is solved using the eigenvalue method of the adjoint matrix. If a near-repeated root is detected, a backtracking is performed, backtracking to the initial state corresponding to the implicit equation construction and the exact intersection solution. A normalization method based on GCD decomposition is selected to distinguish between true intersections and tangent intersections based on the multiplicity of the roots.

[0011] Optionally, the curve clipping and reconstruction includes: The intersection points of the offset-B spline curves are sorted based on the parameters, and the number of intersections is obtained according to the sign of the cross product of the tangents at the intersection points; the retention interval is determined based on the obtained number of intersections. Chain tracing is performed along the reserved interval, jumping from the intersection point to the intersecting curve to extract Bezier control points; the extracted Bezier control points are reparameterized to output independent B-spline offset curves.

[0012] Optionally, the B-spline curve offset-self-intersection elimination method includes: in S1, each non-zero length node interval corresponds to a polynomial segment of the B-spline curve.

[0013] Optionally, the B-spline curve offset-self-intersection elimination method includes: S3 further includes: calculating the truncation error of the Legendre coefficients; if the truncation error is within (0, 0.33X), then execute S4; otherwise, depending on the magnitude of the truncation error, select to bisect or quartet the Legendre coefficients until the truncation error is within (0, 0.33X). Where X is the tolerance; the tolerance is the maximum error between the pre-set offset-B spline offset curve and the actual offset-B spline offset curve.

[0014] The beneficial effects of this application include: 1) In this application, the Legendre coefficient auxiliary matrix is ​​obtained based on the Legendre polynomial values ​​and the Gauss-Legendre quadrature node weights; the normal vector corresponding to the Gauss-Legendre quadrature node is obtained by mapping the Gauss-Legendre quadrature node to a non-zero length node interval; the offset point corresponding to the Gauss-Legendre quadrature node is obtained according to the normal vector and a specified distance; the vector formed by the offset points is multiplied with the Legendre coefficient auxiliary matrix to obtain the Legendre coefficients. Compared with the Taylor expansion method, the aforementioned Legendre orthogonal basis expansion method has a better approximation convergence rate and higher accuracy at the same approximation order. Furthermore, by calculating the truncation error of the Legendre coefficients and subsequent judgment and processing, the error can be further controlled. 2) The Legendre coefficient auxiliary matrix and the Legendre-Bezier transformation matrix in this application are pre-calculated static data, which enables repeated global calls to improve approximation efficiency; 3) In this application, when the tangent intersection detection fails due to the eigenvalue method of the adjoint matrix, a fallback is performed and a normalization method based on GCD decomposition is used to distinguish between real intersections and tangent intersections, thereby further improving the efficiency of self-intersection detection. Attached Figure Description

[0015] Figure 1 A schematic diagram of the B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the equidistant offset curve corresponding to the B-spline curve provided in one embodiment of the present invention; Figure 3 An adaptive subdivision schematic diagram provided for one embodiment of the present invention; Figure 4 This is a schematic diagram of spatial grid construction provided in one embodiment of the present invention; Figure 5 This is a schematic diagram of a convex hull intersection structure provided in one embodiment of the present invention; Figure 6 This is a schematic diagram of a non-intersecting convex hull structure provided in one embodiment of the present invention; Figure 7 This diagram illustrates a performance comparison between the method described in this invention and the Opera-CASCADE offset, as provided in one embodiment of the invention. Detailed Implementation

[0016] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0017] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.

[0018] Example 1 This embodiment proposes a B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion; Figure 1 This is a schematic diagram of the B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion. Figure 2 This is a schematic diagram of the equidistant offset curve corresponding to the B-spline curve; combined with Figure 2 Of the three planar parametric curves, the one located in the middle is the original curve (B-spline); the one located on the innermost side is the offset curve (equidistant) corresponding to the original curve (B-spline) when the specified distance d is 0.6; and the one located on the outermost side is the offset curve (equidistant) corresponding to the original curve (B-spline) when the specified distance d is -0.6.

[0019] In this embodiment, as Figure 1 As shown, the B-spline curve offset-self-intersection elimination method includes: S1. Divide the B-spline curve input to the processing system into node intervals to obtain non-zero length node intervals.

[0020] The processing system mentioned above in S1 includes: EDA and CAD / CAM systems.

[0021] In this embodiment, it should be noted that: node vector traversal is performed on the B-spline curve input to the processing system to find all non-zero length node intervals; each non-zero length node interval corresponds to a polynomial segment of the B-spline curve; the start and end parameter values ​​and node span index corresponding to each non-zero length node interval are recorded.

[0022] S2. Obtain the Legendre coefficient auxiliary matrix based on the Legendre polynomial values ​​and the weights corresponding to each Gauss-Legendre quadrature node.

[0023] In this embodiment, it should be noted that: the Legendre polynomial value and Gauss-Legendre quadrature nodes of a preset order are obtained, and the weight corresponding to each Gauss-Legendre quadrature node is calculated; based on the above, the Legendre coefficient auxiliary matrix is ​​obtained by multiplying the weight corresponding to each Gauss-Legendre quadrature node with the Legendre polynomial value.

[0024] In this embodiment, it should be noted that: based on the obtained Legendre coefficient auxiliary matrix, the calculation of Legendre coefficients can be simplified to matrix-vector multiplication; the Legendre coefficient auxiliary matrix is ​​pre-calculated static data, which only needs to be initialized once, and can be repeatedly called globally to improve approximation efficiency.

[0025] S3. Map the Gauss-Legendre quadrature nodes to non-zero length node intervals to obtain the position and normal of the Gauss-Legendre quadrature nodes corresponding to the B-spline curve; The Gauss-Legendre quadrature nodes are offset along the normal direction by a specified distance to obtain offset points; the vector formed by the offset points is multiplied by the Legendre coefficient auxiliary matrix to obtain the Legendre coefficients. In this embodiment, it should be noted that: For each non-zero length node interval, the Gauss-Legendre quadrature node is mapped to a non-zero length node interval through an affine transformation in order to calculate the position and derivative direction of the B-spline curve corresponding to each Gauss-Legendre quadrature node.

[0026] Based on the calculated derivative direction, the normal direction (i.e., the normal vector direction) of the B-spline curve corresponding to each Gauss-Legendre quadrature node is calculated; specifically, the normal direction is the direction corresponding to the derivative direction rotated 90° clockwise.

[0027] In this embodiment, it should be noted that after obtaining the Legendre coefficients, the truncation error E of the Legendre coefficients is calculated; if the truncation error E is within (0, 0.33X), then S4 is executed; otherwise, based on the magnitude of the truncation error E, the Legendre coefficients are divided into two or four equal parts until the truncation error E is within (0, 0.33X); where X is the tolerance; the tolerance is the maximum error between the pre-set offset-B spline offset curve and the actual offset-B spline offset curve. Figure 3 This is a schematic diagram of adaptive subdivision. The preset range corresponding to the truncation error E is that E is no greater than 1. Figure 3 When the truncation error of the Legendre coefficients is calculated to be E=18, the Legendre coefficients are divided into four equal parts. The truncation errors corresponding to the Legendre coefficients after the four equal parts are 0.3, 5.2, 0.8 and 0.1, respectively. The Legendre coefficient with a truncation error of 5.2 is divided into two equal parts. The truncation errors corresponding to the Legendre coefficients after the two equal parts are 0.6 and 0.9, respectively.

[0028] In this embodiment, offset approximation is performed based on the aforementioned S1 to S3.

[0029] S4. Initialize the binomial coefficients and use de-Casteljau recursion to obtain the Legendre-Bezier transformation matrix; convert the Legendre coefficients into Bezier control points based on the Legendre-Bezier transformation matrix to obtain the Bezier segments.

[0030] In this embodiment, the Legendre-Bezier transformation matrix is ​​pre-computed static data that only needs to be initialized once. It can then be repeatedly called globally to improve approximation efficiency.

[0031] In this embodiment, the Legendre coefficients corresponding to each non-zero length node interval are converted into corresponding Bezier control points through the Legendre-Bezier transformation matrix; adjacent Bezier control points constitute the corresponding Bezier segments.

[0032] S5. Replace the shared endpoints of adjacent Bezier segments with the offset points corresponding to the B-spline curves; merge all Bezier segments into offset-B-spline offset curves in the original order.

[0033] In this embodiment, C0 continuity can be ensured by replacing the shared endpoints of adjacent Bezier segments with the offset points corresponding to the B-spline curves.

[0034] In this embodiment, a basis conversion is performed based on the aforementioned S4 and S5.

[0035] S6. The offset-B spline offset curve is self-intersecting by sequentially performing Bezier segment decomposition, spatial mesh construction and wide phase culling, convex hull intersection test and candidate pair screening, implicit equation construction and precise intersection point solution, and curve trimming and reconstruction.

[0036] In this embodiment, for the aforementioned S6, the Bezier segment decomposition includes: Based on the node vector structure, the three control points and start and end parameter values ​​corresponding to each quadratic Bezier segment of the offset-B spline offset curve are extracted; and the segment offset corresponding to each quadratic Bezier segment is obtained so as to quickly locate the curve to which it belongs through the global segment index.

[0037] In this embodiment, Figure 4 A schematic diagram of spatial grid construction; for the aforementioned S6, combined with Figure 4 , The spatial grid construction and wide-phase culling include: Obtain axis-aligned bounding boxes (AABBs) based on all Bezier segments to obtain the average bounding box size; construct a grid index using a two-pass scan method based on the CSR compressed sparse line format; determine the grid cell size involved in the grid index based on the average bounding box size; and obtain active cells containing more than two Bezier segments.

[0038] In this embodiment, Figure 5 This is a schematic diagram of a convex hull intersection structure. Figure 6 This is a schematic diagram of a non-intersecting convex hull structure; for the aforementioned S6, the convex hull intersection test and candidate pair screening include: Based on the standardized cell strategy, adjacent Bezier segments located on the same curve within active cells are excluded from Bezier segment pairs. Subsequently, AABB overlap tests and Bezier control point convex hull intersection tests are performed sequentially on Bezier segment pairs within active cells. Finally, Bezier segment pairs that pass the tests are added to the candidate list. Figure 5 and Figure 6 , Figure 5 The Bezier segment pair shown is added to the candidate list. Figure 6 The Bezier segments shown are not added to the candidate list.

[0039] In this embodiment, for the aforementioned S6, the implicit equation construction and precise intersection point solution include: For a pair of Bezier segments in the candidate list, the two quadratic Bezier curves are represented as parametric polynomials. An implicit equation is constructed by eliminating the parameter of one curve, and the other curve is substituted to obtain a quartic polynomial equation. Furthermore, the quartic polynomial equation is solved based on the eigenvalue method of the adjoint matrix; if a near-multiple root is detected, a backtracking is performed, backtracking to the initial state corresponding to the implicit equation construction and the exact intersection solution, and a normalization method based on GCD decomposition is selected to distinguish between true intersections and tangent intersections based on the multiplicity of the root.

[0040] In this embodiment, for the aforementioned S6, the curve clipping and reconstruction includes: The intersection points of the offset-B spline curves are sorted based on the parameters, and the number of intersections is obtained according to the sign of the cross product of the tangents at the intersection points; the retention interval is determined based on the obtained number of intersections. Additionally, a chain tracing is performed along the reserved interval, jumping from the intersection point to the intersecting curve to extract Bezier control points; the extracted Bezier control points are then reparameterized to output independent B-spline offset curves.

[0041] In this embodiment, Figure 7 This diagram illustrates the performance comparison between our method and the Opera-CASCADE offset method; where, Figure 7 The horizontal axis in the graph represents the number of B-spline curves to be processed. Figure 7 The vertical axis in the graph represents: computation time (ms); combined with Figure 7 It is readily apparent that: when the number of B-spline curves to be processed is 42, the processing time of this method is 2.31 ms, while the processing time of the Opera-CASCADE migration method is 15.41 ms, meaning the speedup of this method relative to the Opera-CASCADE migration method is 6.6; when the number of B-spline curves to be processed is 4200, the processing time of this method is 17.56 ms, while the processing time of the Opera-CASCADE migration method is 2172.2 ms, meaning the speedup of this method relative to the Opera-CASCADE migration method is 123.7; when the number of B-spline curves to be processed is 420000, the processing time of this method is 1912.2 ms, while the processing time of the Opera-CASCADE migration method exceeds 60000 ms, meaning the speedup of this method relative to the Opera-CASCADE migration method is greater than 31. In summary, this method has a superior processing speed compared to the Opera-CASCADE migration method.

[0042] Based on the B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion described in Embodiment 1 above, the Legendre coefficient auxiliary matrix is ​​obtained based on the Legendre polynomial values ​​and Gauss-Legendre quadrature node weights. The normal vector corresponding to the Gauss-Legendre quadrature node is obtained by mapping the Gauss-Legendre quadrature node to a non-zero length node interval. The offset point corresponding to the Gauss-Legendre quadrature node is obtained based on the normal vector and a specified distance. The vector formed by the offset points is multiplied by the Legendre coefficient auxiliary matrix to obtain the Legendre coefficients. Compared to the Taylor expansion method, the aforementioned Legendre orthogonal basis expansion method has a better approximation convergence rate and achieves higher accuracy at the same approximation order. Furthermore, by calculating the truncation error of the Legendre coefficients and subsequent judgment and processing, the error can be further controlled. Based on the B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion described in the first embodiment above, the Legendre coefficient auxiliary matrix and the Legendre-Bezier transformation matrix are pre-calculated static data, which can then be repeatedly called globally to improve approximation efficiency. Based on the B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion described in the first embodiment above, when the tangent intersection detection fails due to the adjoint matrix eigenvalue method, a backtracking and normalization method based on GCD decomposition is executed to distinguish between real intersections and tangent intersections, thereby further improving the self-intersection detection efficiency.

[0043] It should be noted that any reference numerals placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The words "a" or "an" preceding a component do not exclude the presence of a plurality of such components. The use of the terms first, second, third, etc., is for convenience only and does not indicate any order. These terms can be understood as part of the component names.

[0044] Furthermore, it should be noted that in the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0045] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the claims should be interpreted to include both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0046] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, then this invention should also include these modifications and variations.

Claims

1. A B-spline curve offset-self-intersection elimination method based on Legendre polynomial expansion, characterized in that, The B-spline curve offset-self-intersection elimination method includes: S1. Divide the B-spline curve input to the processing system into node intervals to obtain non-zero length node intervals; the processing system includes: EDA and CAD / CAM systems. S2. Obtain the Legendre coefficient auxiliary matrix based on the Legendre polynomial values ​​and the weights corresponding to each Gauss-Legendre quadrature node; S3. Map the Gauss-Legendre quadrature nodes to non-zero length node intervals to obtain the position and normal of the Gauss-Legendre quadrature nodes corresponding to the B-spline curve; The Gauss-Legendre quadrature nodes are offset along the normal direction by a specified distance to obtain the offset points; the vector formed by the offset points is multiplied by the Legendre coefficient auxiliary matrix to obtain the Legendre coefficients; S4. Initialize the binomial coefficients and use de-Casteljau recursion to obtain the Legendre-Bezier transformation matrix; convert the Legendre coefficients into Bezier control points based on the Legendre-Bezier transformation matrix to obtain the Bezier segments; S5. Replace the shared endpoints of adjacent Bezier segments with the offset points corresponding to the B-spline curves; merge all Bezier segments into offset-B-spline offset curves in the original order.

2. The B-spline curve offset-self-intersection elimination method according to claim 1, characterized in that, The B-spline curve offset-self-intersection elimination method further includes: S6. The offset-B spline offset curve is self-intersecting by sequentially performing Bezier segment decomposition, spatial mesh construction and wide phase culling, convex hull intersection test and candidate pair screening, implicit equation construction and precise intersection point solution, and curve trimming and reconstruction.

3. The B-spline curve offset-self-intersection elimination method according to claim 2, characterized in that, The Bezier segment decomposition includes: Based on the node vector structure, the three control points and start and end parameter values ​​corresponding to each quadratic Bezier segment of the offset-B spline offset curve are extracted; and the segment offset corresponding to each quadratic Bezier segment is obtained.

4. The B-spline curve offset-self-intersection elimination method according to claim 3, characterized in that, The spatial grid construction and wide-phase culling include: The axis-aligned bounding box (AABB) is obtained based on all Bezier segments to obtain the average bounding box size; a grid index is constructed using a two-pass scan method based on the CSR compressed sparse row format; the grid cell size involved in the grid index is determined based on the average bounding box size; Get active units that contain more than two Bezier segments.

5. The B-spline curve offset-self-intersection elimination method according to claim 4, characterized in that, The convex hull intersection test and candidate pair screening include: Based on the standard cell strategy, adjacent Bezier segments located on the same curve are excluded from the Bezier segment pairs in the active cells; then, the AABB overlap test and the Bezier control point convex hull intersection test are performed on the Bezier segment pairs in the active cells in sequence. The Bezier segments that pass the test will be added to the candidate list.

6. The B-spline curve offset-self-intersection elimination method according to claim 5, characterized in that, The implicit equation construction and exact intersection solution include: For a pair of Bezier segments in the candidate list, the two quadratic Bezier curves are represented as parametric polynomials. An implicit equation is constructed by eliminating the parameter of one curve, and the other curve is substituted to obtain a quartic polynomial equation. The quartic polynomial equation is solved using the eigenvalue method of the adjoint matrix. If a near-repeated root is detected, a backtracking is performed, backtracking to the initial state corresponding to the implicit equation construction and the exact intersection solution. A normalization method based on GCD decomposition is selected to distinguish between true intersections and tangent intersections based on the multiplicity of the roots.

7. The B-spline curve offset-self-intersection elimination method according to claim 6, characterized in that, The curve clipping and reconstruction includes: The intersection points of the offset-B spline curves are sorted based on the parameters, and the number of intersections is obtained according to the sign of the cross product of the tangents at the intersection points; the retention interval is determined based on the obtained number of intersections. Chain tracing is performed along the reserved interval, jumping from the intersection point to the intersecting curve to extract Bezier control points; the extracted Bezier control points are reparameterized to output independent B-spline offset curves.

8. The B-spline curve offset-self-intersection elimination method according to claim 1, characterized in that, The B-spline curve offset-self-intersection elimination method includes: in S1, each non-zero length node interval corresponds to a polynomial segment of the B-spline curve.

9. The B-spline curve offset-self-intersection elimination method according to claim 1, characterized in that, The B-spline curve offset-self-intersection elimination method includes: S3 further includes: calculating the truncation error of the Legendre coefficients; if the truncation error is within (0, 0.33X), then execute S4; otherwise, depending on the magnitude of the truncation error, select to bisect or quartet the Legendre coefficients until the truncation error is within (0, 0.33X). Where X is the tolerance; the tolerance is the maximum error between the pre-set offset-B spline offset curve and the actual offset-B spline offset curve.