CAD-based irregular plot sprinkler system sprinkler arrangement method

By combining Python and CAD, a minimum rectangle and circle close-packing algorithm was generated, which solved the problem of automatic sprinkler head layout in sprinkler irrigation systems for irregular plots, achieving efficient and economical sprinkler head layout and optimizing sprinkler system design.

CN116822104BActive Publication Date: 2026-07-31CHINA POWER CONSRTUCTION GRP GUIYANG SURVEY & DESIGN INST CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA POWER CONSRTUCTION GRP GUIYANG SURVEY & DESIGN INST CO LTD
Filing Date
2023-06-27
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively solve the problem of automatic sprinkler head placement in sprinkler irrigation systems for irregular plots, resulting in uneven placement and wasted sprinkler heads.

Method used

By combining Python and CAD, the system automatically arranges sprinklers through minimum rectangle generation, dense circle arrangement algorithm, and circle completion algorithm, thereby optimizing sprinkler coverage and reducing the number of sprinklers.

Benefits of technology

It enables automated sprinkler layout for irregular plots, optimizes sprinkler system design, reduces labor costs, saves construction costs, and allows for adjustment of coverage according to needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116822104B_ABST
    Figure CN116822104B_ABST
Patent Text Reader

Abstract

A method for arranging sprinkler heads in an irregular plot of land based on CAD, comprising: Step S1, selecting the polygon boundary of the plot where sprinkler heads need to be arranged in CAD, and returning the polygon boundary as coordinate points to Python; Step S2, using the returned polygon data to generate the smallest rectangle that can completely contain the polygon; Step S3, setting different required coverage rates, and scaling the spray radius r of the sprinkler head using a scaling factor β to obtain the scaling radius r. sf That is, r sf =β×r, using the scaling radius r sf Draw circles and use a close-packing algorithm to fill the area contained in the smallest rectangle, achieving minimum circle coverage of the entire area; record the coordinates of all circle centers after close packing, use geometric intersection calculation to exclude the circle centers not contained inside the plot polygon, and use the remaining circle centers to draw a circle with a water spray radius r; step S4, perform circle completion, the center of the completed circle and the remaining circle centers in step S3 are the layout positions of the sprinkler heads of the irrigation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural sprinkler irrigation system technology, and in particular to a method for arranging sprinkler heads in an irregular plot of land based on CAD. Background Technology

[0002] The construction of sprinkler irrigation systems can reduce the labor costs of plant maintenance and improve plant survival rates, and therefore they are widely used in newly established green areas and high-level farmland. The most labor-intensive part of designing automatic sprinkler irrigation systems lies in the placement of the sprinkler heads in the green areas. This often requires manually drawing the sprinkler heads and their coverage areas on large, irregular plots, which is not only time-consuming and labor-intensive but also results in uneven placement and wasted sprinkler heads.

[0003] In the prior art, such as the patent application with publication number CN115270214A, a method, device, equipment and storage medium for planning sprinkler locations based on CAD is disclosed. The layout method based on an integer linear programming model can comprehensively consider the sprinkler layout specifications and optimize the number of sprinkler locations and the requirements for neatness, so that the automatic layout of sprinkler locations on CAD drawings is reasonable and effective, reducing the cost of manpower and time.

[0004] For example, patent application CN103506237A discloses a method for arranging nozzles in a square spray area. First, a square spray area nozzle is selected as a prototype, and the working pressure range of the nozzle is set to obtain the parameters of the long range 'a' and the short range 'b' of the square spray area. Next, based on the characteristics of the water distribution of the square spray area nozzles and according to the principle of no-missing-spray combination, two parallel pipes are selected. The distance 'l' between two adjacent nozzles on the first pipe is determined, and the distance 'm' between the first pipe and the second pipe is determined. The nozzle on the second pipe is positioned exactly in the middle of two adjacent nozzles on the first pipe.

[0005] However, none of the aforementioned technologies disclose how to arrange sprinkler heads for irregular plots. Although CAD software has batch generation functions such as "array," these functions are not suitable for irregular plots, and the array arrangement is not optimal, which can lead to wasted sprinkler heads. Summary of the Invention

[0006] The main objective of this invention is to propose a method for arranging sprinkler heads in an irregular plot irrigation system based on CAD, in order to solve the aforementioned technical problems.

[0007] To achieve the above objectives, this invention proposes a method for arranging sprinkler heads in an irregular plot irrigation system based on CAD, comprising the following steps:

[0008] Step S1: Connect Python to CAD and select the polygon boundary of the plot where sprinkler heads need to be placed in CAD. The polygon boundary is returned to Python as coordinate points.

[0009] Step S2: Using the returned polygon data, generate the smallest rectangle that can completely contain the polygon.

[0010] Step S3: Set different desired coverage rates, and use the scaling factor β to scale the spray radius r of the nozzle to obtain the scaling radius r. sf That is, r sf =β×r, using the scaling radius r sf Draw circles and use a close-packing algorithm to fill the area contained in the smallest rectangle, achieving the goal of covering the entire area with the fewest circles; record the coordinates of all circle centers after close packing, use geometric intersection calculation to exclude the center of the circle that is not contained inside the plot polygon, and use the remaining center of the circle to draw a circle with a water spray radius r.

[0011] Step S4: Perform circle completion. Calculate the difference between the polygon of the plot and the circles formed by all the water spray radii r generated within it to obtain multiple independent small shapes. Traverse all small shapes and determine their area size. If the area of ​​a small shape is greater than a set value, add a center point to the centroid of that small shape. The added center point and the remaining center point in step S3 are the locations of the sprinkler heads in the irrigation system.

[0012] Preferably, in step S1, if there are buildings inside the plot, the polygon is considered to have holes in its topology. The building boundary is selected in CAD and returned to Python in the form of coordinate points, and then subtracted from the plot polygon.

[0013] Preferably, in step S3, if the required coverage is set to 100%, then β = 1.

[0014] Preferably, in step S3, if the required coverage rate is set to <100%, then:

[0015]

[0016] In the formula, cov represents the desired coverage rate.

[0017] Preferably, in step S3, if the required coverage rate is set to >100%, encryption processing is required. In this case, β = 1 / cov, where cov is the set required coverage rate.

[0018] Preferably, in the circular close-packed algorithm, the scaling radius r sf In the drawn circle, the lines connecting the centers of any three adjacent circles form an equilateral triangle with a side length of 1.

[0019] Due to the adoption of the above technical solution, the beneficial effects of the present invention are as follows:

[0020] (1) By utilizing the CAD-based sprinkler system nozzle arrangement method for irregular plots provided by the present invention, the automatic arrangement of irregular plots can be achieved by using CAD and Python together, reducing manpower; the present invention can realize the automatic sprinkler arrangement of irregular plots, optimize the sprinkler system design, and achieve efficient water use.

[0021] (2) The present invention adopts a circular dense arrangement algorithm to achieve the minimum number of sprinklers used under the premise of complete coverage of the plot, save construction costs, realize the optimized arrangement of sprinklers in the sprinkler irrigation system for irregular plots, and achieve efficient water use.

[0022] (3) This invention enables customized coverage and provides customers with the service of setting different sprinkler coverage. It can reduce or increase the number of sprinklers according to specific requirements. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0024] Figure 1 This is a schematic diagram of the arrangement method of the circular close-packed algorithm in this invention;

[0025] Figure 2 This is a CAD diagram showing the arrangement of irregular plots of land fully covered by nozzles in this invention.

[0026] Figure 3 This is a CAD diagram showing the arrangement of irregular plots of land covered by 85% of the sprinklers in this invention.

[0027] Figure 4 This is a CAD diagram illustrating the 85% coverage arrangement of sprinklers on irregular plots with internal uncovered areas in this invention.

[0028] Figure 5 This is a CAD diagram illustrating the dense coverage arrangement of sprinkler heads on irregular plots in this invention. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0030] As shown in the attached figures, a method for arranging sprinkler heads in a sprinkler irrigation system for irregular plots based on CAD includes the following steps:

[0031] Step S1: Connect Python to CAD and select the polygon boundary of the plot where sprinkler heads need to be placed in CAD. The polygon boundary is returned to Python as coordinate points.

[0032] Step S2: Using the returned polygon data, generate the smallest rectangle that can completely contain the polygon.

[0033] Step S3: Set different desired coverage rates, and use the scaling factor β to scale the spray radius r of the nozzle to obtain the scaling radius r. sf That is, r sf =β×r, using the scaling radius r sf Draw circles and use a close-packing algorithm to fill the area contained in the smallest rectangle, achieving the goal of covering the entire area with the fewest circles; record the coordinates of all circle centers after close packing, use geometric intersection calculation to exclude the center of the circle that is not contained inside the plot polygon, and use the remaining center of the circle to draw a circle with a water spray radius r.

[0034] Step S4: Perform circle completion. Due to the irregularity of the plot, some spaces will not be covered by the sprinklers after using the close-packing algorithm, requiring circle completion for larger spaces. Specifically, the difference between the plot polygon and the circle formed by all the generated sprinkler radii r is calculated to obtain multiple independent small shapes; all small shapes are traversed, and their area is determined. If the area of ​​a small shape is greater than a set value, a new circle is added at the centroid of that small shape; the added circle center and the remaining circle center in step S3 are the locations of the sprinkler heads in the irrigation system.

[0035] In this embodiment, the coverage rate is defined as follows: each nozzle sprays water at a fixed radius, resulting in a coverage area. The ratio of the union of the coverage areas of many nozzles (excluding overlapping areas) to the plot is the coverage rate of the water spray.

[0036] Combination Figure 4As shown, in step S1, if there are buildings inside the plot, the polygon is considered to have holes in the topology. The building boundary is selected in CAD and returned to Python in the form of coordinate points. It is then subtracted from the plot polygon, so that these buildings can be avoided when arranging sprinklers.

[0037] In step S3, if the desired coverage is set to 100%, then β = 1. When β = 1, the final coverage is close to the set 100%.

[0038] In step S3, if the required coverage rate is set to <100%, then:

[0039]

[0040] In the formula, cov represents the desired coverage rate.

[0041] When the required coverage rate is set to <100%, the above scaling factor β is used to perform the circle dense arrangement algorithm and circle completion in steps S3 and S4. After obtaining the coordinates of all circle centers, the actual spray radius r of the sprinkler head is used to draw the plot. Finally, the plot coverage rate is slightly greater than the set value.

[0042] In step S3, if the required coverage rate is set to >100%, encryption processing is required. In this case, β = 1 / cov, where cov is the set required coverage rate.

[0043] Combination Figure 1 This mainly demonstrates the arrangement method of the circular close-packed algorithm. In the circular close-packed algorithm, the scaling radius r... sf In the drawn circle, the lines connecting the centers of any three adjacent circles form an equilateral triangle with a side length of 1. The circular dense-layout algorithm is not a simple array, but rather an interleaved arrangement. This relationship minimizes the overlapping area of ​​the circles. As shown in the triangle diagram, the three circles intersect at a single point; if the distance between them were greater, that point would become an uncovered area. Furthermore, this triangle is equilateral, so the specific arrangement of the sprinklers can be determined using the mathematical properties of equilateral triangles. When laying circles using the circular dense-layout algorithm, due to the irregularity of the plot, the coverage area after completing a row may vary depending on the starting point. To maximize the coverage area, the optimal starting point needs to be used.

[0044] In the above close-packed circular algorithm, the inscribed regular hexagon can achieve a perfect close packing without overlap. Therefore, if the area of ​​the small circle inside a regular hexagon is exactly the proportion of the hexagon's area, the overall coverage will be close to that coverage. Thus, if the required coverage is set to <100%, a virtual radius can be calculated using the coverage. The area of ​​the inscribed regular hexagon generated by this virtual radius is exactly 1 / cov times the area of ​​the circle, where cov is the set required coverage. The calculation method for the virtual radius is as follows:

[0045]

[0046] r vir Let r be the virtual radius, and r be the spray radius of the nozzle.

[0047] In this embodiment, the main operation process for deploying sprinklers on irregular plots using both CAD and Python is as follows:

[0048] (1) First, determine if there are any areas on the selected plot where sprinklers cannot be installed, i.e., whether there are any holes in a topological sense. If so, input 1; otherwise, input 0. Figure 2 and Figure 3 If the plot of land has no holes, enter 0. Figure 4 If a hole exists, enter 1.

[0049] (2) Select the plot of land to be arranged in CAD; if there are holes, then select the boundary of the holes. This step connects the objects in CAD with Python and proceeds to the next step.

[0050] (3) In Python, input the spray radius r of the nozzle and set the required coverage, and use the scaling factor β to scale the spray radius r of the nozzle to obtain the scaled radius r. sf That is, r sf =β×r, using the scaling radius r sf Draw circles and use a close-packing algorithm to fill the area contained in the smallest rectangle, achieving the goal of covering the entire area with the fewest circles; record the coordinates of all circle centers after close packing, use geometric intersection calculation to exclude the center of the circle that is not contained inside the plot polygon, and use the remaining center of the circle to draw a circle with a water spray radius r.

[0051] (4) Calculate the difference between the polygon of the plot and the circle of all the water spray radius r generated inside it to obtain multiple independent small shapes; traverse all the small shapes and determine the area of ​​the small shape. If the area of ​​a small shape is greater than the set value, add a circle center at the centroid of the small shape; the added circle center and the remaining circle center in step S3 are the layout positions of the sprinkler heads of the sprinkler system.

[0052] Combination Figure 2 The image shown is a CAD drawing of an irregularly shaped plot of land fully covered by sprinklers (i.e., the required coverage rate is set to 100%). The Python execution process is as follows:

[0053] Does the graphic have a hole? Enter 1 to indicate yes, 0 to indicate no: 0

[0054] Please select the outer boundary in CAD:

[0055] Please enter the nozzle radius, ensuring the unit matches the area to be covered: 100

[0056] Please enter the coverage percentage: 100

[0057] Coverage rate: 99.9121%

[0058] Total number of nozzles used: 46.

[0059] With the required coverage rate set at 100%, the actual coverage rate was 99.9121%, and a total of 46 nozzles were used.

[0060] Combination Figure 3 The image shown is a CAD drawing of an irregularly shaped plot of land covered by sprinklers at 85% coverage. The Python execution process for this plot is as follows:

[0061] Does the graphic have a hole? Enter 1 to indicate yes, 0 to indicate no: 0

[0062] Please select the outer boundary in CAD:

[0063] Please enter the nozzle radius, ensuring the unit matches the area to be covered: 100

[0064] Please enter the coverage percentage: 85

[0065] Coverage rate: 86.712%

[0066] Total number of nozzles used: 29.

[0067] With the required coverage rate set at 85%, the actual coverage rate was 86.712%, and a total of 29 nozzles were used.

[0068] Combination Figure 4 The image shown is a CAD drawing illustrating an 85% coverage arrangement of sprinklers on an irregular plot of land with uncovered internal areas. The Python execution process for this layout is as follows:

[0069] Does the graphic have a hole? Enter 1 to indicate yes, 0 to indicate no: 1

[0070] Please select the outer boundary in CAD:

[0071] Please enter the nozzle radius, ensuring the unit matches the area to be covered: 100

[0072] Please enter the coverage percentage: 85

[0073] Coverage rate: 83.857%

[0074] Total number of nozzles used: 26.

[0075] With a target coverage rate of 85% and areas in the plot where sprinkler heads could not be installed, the actual coverage rate was 83.857%, and a total of 26 sprinkler heads were used.

[0076] As can be seen from the above, the difference between the set required coverage rate and the actual coverage rate is not significant.

[0077] Combination Figure 5 The image shown is a CAD drawing illustrating the dense coverage arrangement of sprinklers on an irregular plot of land. The Python execution process for this is as follows:

[0078] Does the graphic have a hole? Enter 1 to indicate yes, 0 to indicate no: 0

[0079] Please select the outer boundary in CAD:

[0080] Please enter the nozzle radius, ensuring the unit matches the area to be covered: 100

[0081] Please enter the coverage percentage: 110

[0082] Coverage rate: 99.9701%

[0083] Total number of nozzles used: 51.

[0084] With the required coverage rate set at 110%, the coverage areas of each nozzle overlapped more significantly, and the number of nozzles used also increased.

[0085] The method for arranging sprinkler heads for irregular plots of land based on CAD provided by this invention, from automatic calculation to automatic drawing, takes no more than 10 seconds to arrange the example plots, which greatly improves work efficiency while minimizing construction costs, and can provide high-level design services for the layout of automatic sprinkler systems.

[0086] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A method for arranging sprinkler heads in a sprinkler irrigation system for irregular plots based on CAD, characterized in that, Includes the following steps: Step S1: Connect Python to CAD and select the polygon boundary of the plot where sprinkler heads need to be placed in CAD. The polygon boundary is returned to Python as coordinate points. Step S2: Using the returned polygon data, generate the smallest rectangle that can completely contain the polygon. Step S3: Set different desired coverage rates, and use the scaling factor β to scale the spray radius r of the nozzle to obtain the scaling radius r. sf That is, r sf =β×r, using the scaling radius r sf Draw circles and use a close-packing algorithm to fill the area contained in the smallest rectangle, achieving the goal of covering the entire area with the fewest circles; record the coordinates of all circle centers after close packing, use geometric intersection calculation to exclude the center of the circle that is not contained inside the plot polygon, and use the remaining center of the circle to draw a circle with a water spray radius r. Step S4: Perform circle completion. Calculate the difference between the polygon of the plot and the circles formed by all the water spray radii r generated within it to obtain multiple independent small shapes. Traverse all small shapes and determine their area size. If the area of ​​a small shape is greater than a set value, add a center point to the centroid of that small shape. The added center point and the remaining center point in step S3 are the locations of the sprinkler heads in the irrigation system.

2. The method for arranging sprinkler heads in a CAD-based sprinkler irrigation system for irregular plots as described in claim 1, characterized in that, In step S1, if there are buildings inside the plot, the polygon is considered to have holes in its topology. The building boundary is selected in CAD and returned to Python as coordinate points, and then subtracted from the plot polygon.

3. The method for arranging sprinkler heads in a CAD-based sprinkler irrigation system for irregular plots as described in claim 1, characterized in that, In step S3, if the required coverage is set to 100%, then β = 1.

4. The method for arranging sprinkler heads in a CAD-based sprinkler irrigation system for irregular plots as described in claim 1, characterized in that, In step S3, if the required coverage rate is set to <100%, then: In the formula, cov represents the desired coverage rate.

5. The method for arranging sprinkler heads in a CAD-based sprinkler irrigation system for irregular plots as described in claim 1, characterized in that, In step S3, if the required coverage rate is set to >100%, encryption processing is required. In this case, β = 1 / cov, where cov is the set required coverage rate.

6. The method for arranging sprinkler heads in a CAD-based sprinkler irrigation system for irregular plots as described in claim 1, characterized in that, In the circular close-packed algorithm, the scaling radius r sf In the drawn circle, the lines connecting the centers of any three adjacent circles form an equilateral triangle with a side length of 1.