Geometric shape filling method based on shape priority ranking and recursive placement algorithm

Through geometric shape filling methods based on shape priority sorting and recursive placement algorithms, combined with parallel computing, the problem of low efficiency of traditional methods when processing complex shapes and large-scale data is solved, and efficient space utilization and intelligent graphics filling are achieved. operate.

CN119205987APending Publication Date: 2024-12-27SHANGHAI GLORYSOFT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411301194.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Traditional shape segmentation methods are difficult to deal with complex and diverse geometric shapes, and are less efficient when processing large-scale data, which cannot effectively improve space utilization and ability to process complex shapes.

Method used

The geometric shape filling method based on shape priority sorting and recursive placement algorithm is adopted. Through the recursive and backtracking method, combined with the parallel computing framework, efficient space utilization is achieved and parallel processing of large-scale geometric data is supported.

Benefits of technology

It significantly improves space utilization, can effectively process complex shapes, reduces dependence on manual experience, improves data processing efficiency and algorithm robustness, and realizes intelligent graphics filling operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205987A_ABST
    Figure CN119205987A_ABST
Patent Text Reader

Abstract

The invention relates to a geometrical shape filling method based on shape priority ranking and a recursive placement algorithm. The geometrical shape filling method comprises the following steps: creating a polygonal object and a basic graph; shape placement judgment and shape priority ranking; determining an optimal graph and trying to place the optimal graph in the basic polygon; successfully placing and updating the basic polygon, and skipping the current graph if the placement fails; recursively processing the remaining graphs until all the graphs cannot be continuously placed; performing batch processing on the large-scale geometric data; and performing visual output. According to the geometric shape filling method based on the shape priority ranking and the recursive placement algorithm, efficient space utilization is achieved through a recursive and backtracking method, and parallel processing of large-scale geometric data is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of semiconductor manufacturing, and in particular to a geometric shape filling method based on shape priority sorting and recursive placement algorithm. Background Art

[0002] In many industries, such as manufacturing, architectural design, packaging, and logistics, how to efficiently place objects of various shapes in a limited space to maximize space utilization is an important issue. Traditional shape segmentation methods often rely on manual experience or simple heuristic algorithms, which are difficult to handle complex and diverse geometric shapes and are less efficient when processing large-scale data. Summary of the invention

[0003] In order to solve the technical problems existing in the prior art, the present invention provides a geometric shape filling method based on shape priority sorting and recursive placement algorithm, which realizes efficient space utilization and supports parallel processing of large-scale geometric data through recursion and backtracking methods.

[0004] To achieve the above object, the technical solution of the present invention is as follows:

[0005] A geometric shape filling method based on shape priority sorting and recursive placement algorithm comprises the following steps:

[0006] Step 1: Create polygon objects and basic graphics;

[0007] Step 2: shape placement judgment and shape priority sorting;

[0008] Step 3, determine the optimal shape and try to place the optimal shape within the basic polygon;

[0009] Step 4: If the basic polygon is successfully placed and updated, the current shape is skipped if the placement fails.

[0010] Step 5: Recursively process the remaining graphics until all graphics cannot be placed any further;

[0011] Step 6: batch process large-scale geometric data;

[0012] Step 7: Visual output.

[0013] As a preferred technical solution, in step 2, the shape placement judgment is to determine whether the shape can be placed within the basic polygon by judging whether the basic polygon completely contains the shape to be placed.

[0014] As a preferred technical solution, in step 2, the shapes are prioritized according to their area, perimeter, internal angle and attributes.

[0015] As a preferred technical solution, shapes with high priority are placed first, and the shape with the highest priority is the optimal shape.

[0016] As a preferred technical solution, in step six, the large-scale geometric data is divided into multiple batches, and the shape generation, priority sorting and recursive placement functions are called for each batch of geometric data.

[0017] As a preferred technical solution, the geometric data is distributed to different computing nodes in batches, the shape segmentation algorithm is executed in parallel, and the data processing results are recorded.

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] (1) Improvement of space utilization: The present invention uses an innovative priority sorting strategy to intelligently sort shapes according to their attributes such as area, perimeter, and sum of internal angles, ensuring that high-priority shapes are placed first, thereby significantly improving space utilization and reducing waste.

[0020] (2) Ability to process complex shapes: Traditional methods often have difficulty processing complex or irregular shapes, while the present invention can effectively process a variety of polygons (such as rectangles and triangles) and supports dynamic addition of new shapes, with strong adaptability.

[0021] (3) Efficient large-scale data processing: By combining geometric data batch processing and parallel computing, the present invention can maintain high efficiency when processing large amounts of geometric data. By using a parallel computing framework (such as PySpark), algorithms are executed in batches on different computing nodes, greatly improving the speed and efficiency of data processing.

[0022] (4) Recursion and backtracking strategy: The introduction of a recursive algorithm combined with backtracking technology enables dynamic adjustment of the strategy during shape placement, ensuring that effective backtracking and other possibilities can be tried when placement fails, thereby improving the robustness and flexibility of the algorithm.

[0023] (5) Automation and intelligence: The present invention provides an automated solution that reduces the reliance on manual experience. Intelligent graphics filling operations are achieved through programmed shape generation, placement judgment, and priority sorting. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flow chart of a geometric shape filling method based on shape priority sorting and recursive placement algorithm of the present invention;

[0025] Figure 2 It is a schematic diagram of the visual output of the filling result of the geometric shape filling method based on shape priority sorting and recursive placement algorithm of the present invention.

[0026] In the figure: Shape PlacementVisualization represents shape placement visualization, and Base Polygon represents the base polygon. DETAILED DESCRIPTION

[0027] The technical solution of the present invention is further described below in conjunction with specific implementation methods:

[0028] like Figure 1 As shown, a geometric shape filling method based on shape priority sorting and recursive placement algorithm includes the following steps:

[0029] Step 1: Create polygon objects and basic graphics;

[0030] Shape Generation: Generates usable geometric shapes, which include various polygons such as rectangles and triangles, and more shapes can be added as needed.

[0031] Step 2: shape placement judgment and shape priority sorting;

[0032] Shape placement judgment is to determine whether the shape can be placed within the basic polygon by judging whether the basic polygon completely contains the shape to be placed.

[0033] Shape prioritization is performed based on the shape’s area, perimeter, and interior angles and attributes, with shapes with higher priority being placed first to optimize space utilization.

[0034] Step 3, determine the optimal shape and try to place the optimal shape within the basic polygon;

[0035] The shape with the highest priority is the optimal shape.

[0036] Step 4: If the basic polygon is successfully placed and updated, the current shape is skipped if the placement fails.

[0037] Try to place each shape inside the base polygon. Sort the shapes by priority and try to place each one in turn, updating the base polygon.

[0038] Step 5, recursively process the remaining graphics;

[0039] Continue trying to place the remaining shapes until all shapes are placed or no more can be placed.

[0040] Step 6: batch process large-scale geometric data;

[0041] Divide large-scale geometric data into multiple batches, call shape generation, priority sorting, and recursive placement functions on each batch of geometric data, process the geometric data, and record the results.

[0042] Use parallel computing frameworks (such as PySpark) to process large-scale geometric data. Distribute geometric data in batches to different computing nodes, and execute shape segmentation algorithms in parallel to improve processing efficiency.

[0043] Step 7: Visual output.

[0044] Example

[0045] The basic shapes are 5x5 rectangle, 2x2 rectangle, isosceles right triangle, and the shape to be filled is a trapezoid.

[0046] Step 1: Create three polygon objects. Create a 5x5 rectangle with a vertex list of [[(0,0),(5,0),(5,5),(0,5)]]; create a 2x2 rectangle with a vertex list of [[(0,0),(2,0),(2,2),(0,2)]]; create an isosceles right triangle with a vertex list of [[(0,0),(1,0),(0,1)]].

[0047] Create a figure to be filled, the point list is [[(0,0),(10,10),(90,10),(100,0)]].

[0048] Step 2: Define a shape judgment function to determine whether a given shape can be placed within a basic polygon and check whether the basic polygon completely contains the shape to be placed.

[0049] Define a feature priority function, sort the three polygons according to their area, sum of internal angles, and perimeter, and select the best one for placement. Usually, the most complex one is selected, such as the one with the largest area, perimeter, and sum of internal angles.

[0050] Step 3: Start with the shape with the highest priority and try to place the shape within the basic polygon. In this embodiment, a 5x5 rectangle is placed first, followed by a 2x2 rectangle, and finally an isosceles right triangle.

[0051] Step 4: Use the geometry library to translate the shape to different locations and check if it can be placed. If it can be placed, subtract the shape from the base polygon and update the base polygon.

[0052] Step 5: Recursively repeat the above steps for the remaining shapes and new base polygons until all shapes are placed or no further placement is possible.

[0053] Step 6: Divide the large-scale geometric data into multiple batches, and process a certain amount of geometric data in each batch. Call the shape generation, priority sorting, and recursive placement functions for each batch of data to process the geometric data and record the results.

[0054] Use parallel computing framework to process large-scale geometric data. Allocate geometric data to different computing nodes in batches, execute shape segmentation algorithms in parallel, and improve processing efficiency.

[0055] Step 7: If Figure 2 As shown, the visual output.

[0056] This embodiment is only a further explanation of the invention rather than a limitation of the invention. After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed. However, as long as they are within the scope of the claims of the invention, they are protected by the patent law.

Claims

1. A geometric shape filling method based on shape priority sorting and recursive placement algorithm, characterized in that: The following steps are involved: Step 1: Create polygon objects and basic graphics; Step 2: shape placement judgment and shape priority sorting; Step 3, determine the optimal shape and try to place the optimal shape within the basic polygon; Step 4: If the basic polygon is successfully placed and updated, the current shape is skipped if the placement fails. Step 5: Recursively process the remaining graphics until all graphics cannot be placed any further; Step 6: batch process large-scale geometric data; Step 7: Visual output.

2. The geometric shape filling method based on shape priority sorting and recursive placement algorithm according to claim 1, characterized in that: In the step 2, the shape placement judgment is to determine whether the shape can be placed within the basic polygon by judging whether the basic polygon completely contains the shape to be placed.

3. The geometric shape filling method based on shape priority sorting and recursive placement algorithm according to claim 1, characterized in that: In the step 2, the shapes are prioritized according to their areas, perimeters, internal angles and attributes.

4. The geometric shape filling method based on shape priority sorting and recursive placement algorithm according to claim 3 is characterized in that: Shapes with higher priority are placed first, and the shape with the highest priority is the optimal shape.

5. The geometric shape filling method based on shape priority sorting and recursive placement algorithm according to claim 1, characterized in that: In step six, the large-scale geometric data is divided into multiple batches, and the functions of shape generation, priority sorting and recursive placement are called for each batch of geometric data.

6. The geometric shape filling method based on shape priority sorting and recursive placement algorithm according to claim 5, characterized in that: The geometric data are distributed to different computing nodes in batches, the shape segmentation algorithm is executed in parallel, and the data processing results are recorded.