A lightning rod protection range calculation method based on incremental convex hull construction
Patent Information
- Application Number
- CN202610887309.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-09-11
AI Technical Summary
[0005]针对防雷保护的范围计算适应性差、复杂度大、耗时长,保护效果计算精确度较低的问题,提出了一种基于增量式凸包构建的避雷针防护范围计算方法,能够自动识别单针(N=1)、双针(N=2)、多针(N≥3)等不同保护模式,高效计算多针联合保护范围,通过增量式凸包构建和球心约束优化,生成三维可视化几何体,方便工程设计人员一目了然地查看被保护物是否有效地处于避雷针的防雷保护范围之内,有效提高防雷保护范围计算的精确度和自动化程度
本发明的避雷针防护范围计算方法,通过增量式凸包构建和球心约束优化,实现了防雷保护范围的自动计算和三维展示。通过种子点选择和种子三角形生成机制,能够自动识别单针、双针、多针等不同保护模式,无需人工预先判断,自动化程度提高80%以上。采用增量式凸包构建算法,基于边锁定机制自动识别凸包边界,时间复杂度较低,相较于传统凸包算法,在处理大规模避雷针布置时计算时间缩短约40%。通过球心高度约束和几何约束,确保保护范围的物理合理性,保护范围计算精度达到毫米级,相较于平面保护范围方法,精度提高约30%。同时,通过将计算结果与建筑信息建模软件集成,直接生成可在建模软件中展示的三维几何体,方便设计人员直观查看被保护物是否处于避雷针的防雷保护范围之内,还可以实现防雷保护范围的可视化多角度多维度旋转查看,达到平面图无法完成的保护范围的实时查询效果,减少设计错误约50%。相较于相关技术中使用保护标高对应的平面保护范围方式来说,实现了保护范围的三维展示和智能计算,从而使得保护范围的结果更加精确,这也就有效提高了防雷保护范围模拟的精确度和自动化程度。
Smart Images

Figure CN122735237A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a building lightning protection technology, and more particularly to a method for calculating the protection range of a lightning rod based on an incremental convex hull structure. Background Technology
[0002] Since its invention in the 18th century, the lightning rod has played a vital role in lightning protection, making a significant contribution to the safety of people's lives and property. Direct lightning strikes into the power grid can cause backflashovers, damaging electrical equipment, causing power outages, and resulting in substantial economic losses. With the development of Building Information Modeling (BIM) technology, the accurate calculation and visualization of lightning protection ranges in 3D design software has become an urgent need.
[0003] Therefore, calculating the lightning protection range is crucial in substation engineering and building lightning protection design. Traditional rolling sphere lightning protection design uses formulas to calculate the number, height, and location of lightning rods, and the protection range is mainly represented by a series of abstract data or by drawing a plan view. Existing related technologies mainly employ the following methods: traditional geometric methods calculate the protection range of a single rod through simple geometric relationships, but cannot accurately handle the situation of multiple rods providing joint protection; finite element analysis has high calculation accuracy, but its computational complexity is high and time-consuming, making it unsuitable for rapid engineering design; while the existing rolling sphere method has a sound theoretical basis, it has shortcomings in the automatic identification and optimization of multi-rod collaborative protection, requiring manual pre-judgment of the protection mode.
[0004] In related technologies, the plane protection range corresponding to the protection elevation is usually used to judge the lightning protection effect. However, this method has the following problems: (1) It cannot automatically identify different protection modes such as single-needle, double-needle, and triple-needle, and manual pre-classification is required; (2) The calculation efficiency of the multi-needle joint protection range is low, and there is a lack of an effective convex hull boundary identification mechanism; (3) The point set management and optimization are not intelligent enough, and there is redundant calculation; (4) The design sense is not strong, the intuitiveness is poor, and the manpower investment is large. This makes the accuracy of the lightning protection effect low and cannot meet the lightning protection design requirements of complex buildings. Summary of the Invention
[0005] To address the problems of poor adaptability, high complexity, long time consumption, and low accuracy in calculating the protection range of lightning protection, a method for calculating the protection range of lightning rods based on incremental convex hull construction is proposed. This method can automatically identify different protection modes such as single-needle (N=1), double-needle (N=2), and multi-needle (N≥3), and efficiently calculate the joint protection range of multiple needles. Through incremental convex hull construction and sphere center constraint optimization, a three-dimensional visual geometry is generated, which allows engineering designers to easily check whether the protected object is effectively within the lightning protection range of the lightning rod, effectively improving the accuracy and automation of lightning protection range calculation.
[0006] The technical solution of this invention is as follows:
[0007] A method for calculating the protection range of a lightning rod based on incremental convex hull construction includes the following steps: S1: Data preprocessing steps: Obtain the lightning rod element set, extract the three-dimensional coordinates of each lightning rod tip, convert them into absolute coordinates relative to the reference height, and initialize the point set; wherein, the point set includes the current point set to be processed, the original point set, the checked point set, and the single-rod protection point set; S2: Multi-needle protection identification steps: Select the point with the largest height from the current set of points to be processed as the seed point, and search for a seed triangle in the remaining set of points that forms a rolling sphere condition with the seed point. The remaining set of points is the set of points formed after excluding the seed point from the current set of points to be processed. If the seed triangle is found, incremental convex hull expansion is performed; if not found, the seed point is marked as single-needle protection. The rolling sphere condition means that the radius of the circumcircle formed by the three lightning rod tips in the plane of the three points is less than or equal to the rolling sphere radius determined according to the lightning protection level, and the height of the sphere's center is greater than the rolling sphere radius. S3: Incremental convex hull expansion steps: Initialize the sphere center set, add the sphere center coordinates corresponding to the seed triangle to the sphere center set; add the three edges of the seed triangle to the seed edge list, for each edge in the seed edge list, search for an expansion point in the original point set that satisfies the rolling ball condition; if an expansion point is found, generate a new edge and record the sphere center, and add the sphere center to the sphere center set; if not found, mark it as a locked edge, and repeat until all edges are processed; wherein, the selection of the expansion point is based on the principle that the sphere center height is the largest and greater than the rolling ball radius; S4: Convex hull boundary identification step: Arrange the locking edges in a head-to-tail order to form a closed convex hull boundary; S5: Ground Projection Calculation Steps: Calculate the projected polygon of the convex hull boundary on the ground. For each edge in the convex hull boundary, generate a ground projection point, a ground projection edge, and an auxiliary sphere center. The ground projection point is obtained by calculating the intersection of two ground protection circles. The ground protection circle is a circle formed with the corresponding lightning rod tip projection point on the ground as its center and the ground protection radius as its radius. The ground protection radius is calculated based on the lightning rod height and the rolling sphere radius.
[0008] S6: Internal point identification step: Identify the lightning rod tip inside the convex hull boundary, remove it from the current set of points to be processed, and take the lightning rod tip that constitutes the convex hull boundary as the convex hull boundary point and mark it as a candidate point for double-needle protection. S7: Double needle protection determination step: Traverse the checked point set and the convex hull boundary point, determine whether the distance between the two points is less than the sum of the ground protection radii. If the condition is met and there is no conflict between the sphere centers, then generate a double needle protection area. S8: Single-needle protection identification steps: For the remaining unprocessed lightning rod points in the single-needle protection point set, calculate the single-needle protection range; where, if the height of the lightning rod is greater than the rolling sphere radius, the effective height is limited to the rolling sphere radius; S9: Geometry Generation Steps: Based on the protection area data for single-needle, double-needle, and multi-needle needles, generate three-dimensional geometry. Single-needle protection uses a surface of revolution; double-needle protection uses the Boolean union of an extruded body and a spherical virtual entity; multi-needle protection uses the Boolean union of a ground-projected extruded body and a spherical virtual entity. The spherical virtual entity is a hollow spherical shear body, an auxiliary sphere used for combined Boolean operations with the ground-projected extruded body, and not the final output entity representing the protection range.
[0009] Preferably, in step S2, the method for generating the seed triangle includes: S2.1. Traverse all candidate point pairs in the remaining point set, wherein the remaining point set is the set of lightning rod tip points in the current point set to be processed excluding the seed point, and the candidate point pair is a point pair formed by any two different lightning rod tip points in the remaining point set; S2.2 Calculate the radius of the circumcircle formed by the seed point and the candidate point with respect to the three points; S2.3 If the radius of the circumscribed circle is less than or equal to the radius of the rolling ball, calculate the coordinates of the ball's center; S2.4 Check if other points are inside the sphere. If the sphere contains other points, reject the triangle. S2.5 Select the triangle with the largest center height that is greater than the radius of the rolling ball as the seed triangle; S2.6 Ensure that the vertices of the triangle are arranged in counterclockwise order, and determine this by the cross product sign.
[0010] Preferably, in step S3, the method for selecting the extension point includes: S3.1 Check whether the candidate point is on the extended side of the edge, where the extended side refers to the side that does not contain the seed triangle among the two sides divided by the current edge as the dividing line. S3.2 Calculate the radius of the circumcircle formed by the candidate point and the two endpoints of the edge; S3.3 If the radius is smaller than the radius of the rolling ball, calculate the coordinates of the ball's center; S3.4 Select the point with the largest center height that is greater than the radius of the rolling ball as the expansion point; S3.5. Generate two new edges based on the starting point, ending point, and extension point of the current processing edge. The first new edge is a directed edge from the starting point of the current processing edge to the extension point, and the second new edge is a directed edge from the extension point to the ending point of the current processing edge. Check whether the reverse edges of the two new edges already exist in the seed edge list. The reverse edge refers to the directed edge formed by swapping the starting point and the ending point.
[0011] S3.6 If the reverse edge of the first new edge does not exist in the seed edge list, then add the first new edge to the seed edge list; if the reverse edge of the second new edge does not exist in the seed edge list, then add the second new edge to the seed edge list.
[0012] Preferably, the method for calculating the coordinates of the sphere's center is as follows: Step 1: Calculate the circumcenter and radius of the three points; Step 2: Calculate the normal vector and ensure it points upwards. If the normal vector points downwards, take the opposite vector. Step 3: Use the Pythagorean theorem to calculate the distance from the center of the sphere to the center of the circle; Step 4: The coordinates of the sphere's center are equal to the distance offset from the center of the circle along the direction of the normal vector. Step 5: If the radius of the circumscribed circle is greater than or equal to the radius of the rolling ball, return to the invalid ball center.
[0013] Preferably, in step S5, the method for calculating the ground projection point is as follows: S5.1 Calculate the ground protection radius at the start and end points of the convex hull boundary edge, where the ground protection radius is related to the lightning rod height and the rolling sphere radius; S5.2 Calculate the centers of the two ground protection circles, wherein the center of the first ground protection circle is located at the projection position of the starting point of the convex hull boundary edge on the ground, and the center of the second ground protection circle is the projection position of the ending point of the convex hull boundary edge on the ground. S5.3 Calculate the candidate intersection point using the two-circle intersection formula. Select a candidate intersection point located outside the convex hull boundary as the intersection point according to the directed order of the convex hull boundary edges. S5.4 Generate two ground projection edges, including the edge formed by connecting the center of the first ground protection circle and the intersection point, and the edge formed by connecting the intersection point and the center of the second ground protection circle.
[0014] Preferably, in step S7, the determination condition for dual-needle protection is: S7.1 The distance between two points is less than the sum of the two ground protection radii; S7.2 Calculate the two intersection points of the two ground protection circles; S7.3 Calculate the two auxiliary sphere centers, wherein each sphere center is calculated through the two lightning rod tips and the intersection point mentioned above; S7.4 Check whether the distance between each auxiliary ball center and all other lightning rod points is greater than or equal to the rolling ball radius; S7.5 If all distance checks pass, a double-needle protection area is generated, and the ground projection quadrilateral consists of two centers and two intersections.
[0015] Preferably, in step S8, the method for calculating the protection range of a single needle is as follows: S8.1 If the height of the lightning rod is greater than the radius of the rolling sphere, the effective height shall be set to the radius of the rolling sphere; S8.2 Calculate the ground protection radius using the standard formula of the rolling sphere method; S8.3 Generate a rotation curve, including vertical line segments, horizontal line segments, and circular arcs; S8.4. Rotate the rotation curve 360 degrees around the vertical axis to generate a rotation solid.
[0016] Preferably, in step S9, the geometry generation method includes: Single needle protection: A rotating entity is generated by rotating a curve around a vertical axis; Dual-needle protection: Create a ground quadrilateral extruded body and two spherical virtual bodies, and use Boolean union to combine them; specifically: create a ground quadrilateral extruded body with a height equal to the higher of the two lightning rods, create two spherical virtual bodies with their centers as auxiliary centers and their radii equal to the radius of the rolling sphere, and use Boolean union to combine the extruded body and the two spherical virtual bodies, so that the spherical virtual bodies perform a Boolean union with the ground quadrilateral extruded body to generate the dual-needle protection geometry; Multi-needle protection: Create a ground polygonal extrusion body and multiple spherical virtual solids, and use Boolean union to merge them. Specifically: Create a ground polygonal extrusion body with a height equal to the height of the highest point among the convex hull boundary points. Arrange the sphere centers in descending order of height. Create a spherical virtual solid for each sphere center with a radius equal to the radius of the rolling sphere. Use Boolean union to merge all the geometries sequentially, so that the spherical virtual solids sequentially perform Boolean union on the ground polygonal extrusion body to generate multi-needle protection geometry.
[0017] A lightning rod protection range calculation system based on incremental convex hull construction includes a data preprocessing module, a seed point selection module, a seed triangle generation module, a convex hull expansion module, a convex hull boundary identification module, a ground projection calculation module, an internal point identification module, a dual-needle protection determination module, a single-needle protection identification module, and a geometry generation module connected in a data processing flow. The data preprocessing module is configured to acquire a set of lightning rod elements, extract three-dimensional coordinates and height parameters, and initialize the current set of points to be processed, the original set of points, the set of points already checked, and the set of single-needle protected points.
[0018] The seed point selection module is configured to select the point with the largest height from the current set of points to be processed as the seed point.
[0019] The seed triangle generation module is configured to find triangles in the remaining point set that form a rolling ball condition with the seed point.
[0020] The convex hull expansion module is configured to perform incremental convex hull expansion, generating locked edges and a set of sphere centers. The set of sphere centers refers to the set of coordinates of all valid rolling sphere centers within the currently constructed incremental convex hull region.
[0021] The convex hull boundary recognition module is configured to accept the locked edges and arrange the locked edges in a head-to-tail order to form a closed convex hull boundary.
[0022] The ground projection calculation module, internal point identification module, dual-needle protection judgment module, single-needle protection identification module, and geometry generation module are configured to perform corresponding calculation and judgment functions, respectively.
[0023] The designations such as "first" and "second" are merely reference markers and do not imply any priority in terms of structure, function, or order. As long as the description is clear and consistent, the labels can be interchanged without changing the essence of the technical solution.
[0024] The beneficial effects of this invention are as follows: The lightning rod protection range calculation method of this invention achieves automatic calculation and 3D display of the lightning protection range through incremental convex hull construction and sphere center constraint optimization. Through seed point selection and seed triangle generation mechanisms, it can automatically identify different protection modes such as single-needle, double-needle, and multi-needle configurations without manual pre-judgment, increasing automation by over 80%. The incremental convex hull construction algorithm, based on an edge-locking mechanism, automatically identifies the convex hull boundary, resulting in lower time complexity. Compared to traditional convex hull algorithms, it reduces calculation time by approximately 40% when handling large-scale lightning rod deployments. Through sphere center height constraints and geometric constraints, the physical rationality of the protection range is ensured, achieving millimeter-level calculation accuracy, which is approximately 30% higher than planar protection range methods. Furthermore, by integrating the calculation results with building information modeling software, it directly generates 3D geometry that can be displayed in the modeling software. This allows designers to intuitively check whether the protected object is within the lightning rod's protection range and enables multi-angle, multi-dimensional rotational visualization of the lightning protection range, achieving real-time query effects of protection range that cannot be achieved with planar drawings, reducing design errors by approximately 50%. Compared to related technologies that use a planar protection range corresponding to the protection elevation, this method achieves three-dimensional display and intelligent calculation of the protection range, making the protection range result more accurate. This effectively improves the accuracy and automation of lightning protection range simulation. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of the overall process of the method of the present invention; Figure 2 This is a schematic diagram of the seed triangle generation process of the present invention; Figure 3This is a schematic diagram of the incremental convex hull expansion process of the present invention; Figure 4 This is a three-dimensional schematic diagram of the single-needle protection range of the present invention; Figure 5 This is a three-dimensional schematic diagram of the double-needle protection range of the present invention; Figure 6 This is a three-dimensional schematic diagram of the multi-needle protection range of the present invention. Detailed Implementation
[0026] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0027] refer to Figures 1 to 6 As shown, this invention discloses a method for calculating the protection range of lightning rods based on incremental convex hull construction. This method automatically identifies different protection modes such as single-needle, double-needle, and triple-needle protection through seed point selection and seed triangle generation mechanisms; it employs an incremental convex hull expansion algorithm to automatically identify the convex hull boundary based on an edge-locking mechanism; it calculates the ground projection polygon to determine the double-needle and single-needle protection areas; and it generates a three-dimensional protection range geometry. Through incremental convex hull construction and sphere center constraint optimization, compared to traditional methods that require manual pre-judgment of the protection mode and only support the generation of lightning protection ranges for three-needle or fewer lightning rods, this method achieves intelligent identification and automatic calculation of protection modes under any number of needles, thus making the calculation of lightning protection range more efficient and accurate. This effectively improves the automation level and computational efficiency of lightning protection design. This invention is applicable to fields such as building lightning protection design and substation lightning protection planning, and can be integrated with building information modeling software to achieve three-dimensional visualization of the protection range. The method of this invention can automatically identify different protection modes such as single-needle (N=1), double-needle (N=2), and multi-needle (N≥3). Through incremental convex hull construction and sphere center constraint optimization, it can efficiently calculate the joint protection range of multi-needle and generate a three-dimensional visualization geometry, which makes it easy for engineering designers to see at a glance whether the protected object is effectively within the lightning protection range of the lightning rod.
[0028] Preferably, such as Figure 1 As shown, the implementation steps of the lightning rod protection range calculation method based on incremental convex hull construction are as follows: (1) Data preprocessing Obtain the lightning rod element set. For each lightning rod element: obtain the reference height and location coordinates of the lightning rod; read the height parameter of the lightning rod; calculate the three-dimensional coordinates of the lightning rod tip based on the location coordinates, height parameter, and reference height, where the height of the lightning rod tip is equal to the location height plus the lightning rod height minus the reference height; add the coordinates of the lightning rod tip to the lightning rod tip list.
[0029] Initialize the following point sets: the current point set to be processed, initially set to the list of lightning rod tips; the original point set, which remains the list of lightning rod tips and will remain unchanged in subsequent calculations; the checked point set, initially empty; and the single-needle protection point set, initially set to the list of lightning rod tips.
[0030] It should be noted that the reference height is usually set as the ground elevation, and the rolling sphere radius can be selected according to the lightning protection level of the building, usually 30 meters, 45 meters or 60 meters.
[0031] (2) Seed point selection Select the lightning rod tip with the highest height from the current set of points to be processed as the seed point. Algorithm implementation: Initialize the seed point as the first point in the current set of points to be processed; traverse each point in the current set of points to be processed, and if the height of that point is greater than the height of the current seed point, update the seed point to that point.
[0032] (3) Seed triangle generation like Figure 2 As shown, the seed point is removed from the current set of points to be processed, resulting in a set of remaining points. Then, a triangle is found in the set of remaining points that forms a triangle with the seed point, satisfying the rolling sphere condition. It should be noted that the rolling sphere condition means that the radius of the circumcircle formed by the three points is less than or equal to the radius of the rolling sphere, and the height of the sphere's center is greater than the radius of the rolling sphere.
[0033] The specific steps include: initializing the optimal sphere center to a minimum value; traversing all candidate point pairs in the remaining point set, wherein the candidate point pair is a point pair formed by any two distinct lightning rod tips in the remaining point set; creating an arc passing through two points in the candidate point pair and the seed point; if the arc radius is less than or equal to the sphere radius: calculating the sphere center coordinates; if the sphere center height is greater than the current optimal sphere center height: checking whether other points are inside the sphere; if there is no conflict, updating the optimal sphere center and the optimal candidate point pair; if a valid triangle is found: ensuring that the vertices are arranged in counterclockwise order; returning the seed triangle and its sphere center; if not found: adding the seed point to the checked point set; deleting the seed point from the current unprocessed point set; and continuing to the next iteration.
[0034] (4) Incremental convex hull expansion like Figure 3As shown, if the seed triangle is successfully generated, convex hull expansion is performed: Initialization: The seed edge list contains the three edges of the seed triangle, the locked edge list is empty, the sphere center set contains the sphere centers of the seed triangle, and the used point set contains the three vertices of the seed triangle.
[0035] For each edge in the seed edge list: initialize the mark indicating no expansion point found; traverse each candidate point in the original point set: check if the candidate point is to the left of the currently processed edge (cross product greater than zero); if so, calculate the radius of the circumcircle; if the radius of the circumcircle is less than the radius of the rolling sphere, calculate the center of the sphere; if the height of the center of the sphere is the largest and greater than the radius of the rolling sphere, record the candidate point as an expansion point; if an expansion point is found, generate two new edges based on the start and end points of the currently processed edge and the expansion point, where the first new edge is a directed edge from the start point of the currently processed edge to the expansion point, and the second new edge is a directed edge from the expansion point to the end point of the currently processed edge; check if the reverse edges of the two new edges already exist in the seed edge list; if the first new edge and its reverse edge do not exist in the seed edge list, add the first new edge to the seed edge list; if the second new edge and its reverse edge do not exist in the seed edge list, add the second new edge to the seed edge list; record the center of the sphere and the used points, and delete the expansion point from the current unprocessed point set; if no expansion point is found, add the currently processed edge to the locked edge list.
[0036] (5) Convex Hull Boundary Recognition Arrange the edges in the locked edge list in a head-to-tail order: Initialize the convex hull boundary list, which includes the starting edge of the locked edge list. Any edge in the locked edge list can be added to the convex hull boundary list as a starting edge. Remove the starting edges added to the convex hull boundary list from the locked edge list. Loop through the locked edges to find the locked edge whose starting point is equal to the ending point of the last edge in the convex hull boundary list. Add the found locked edge to the convex hull boundary list and remove the edge from the locked edge list. Repeat this process until the locked edge list is empty, resulting in an ordered convex hull boundary list.
[0037] (6) Ground projection calculation For each edge of the convex hull boundary: calculate the ground projection point, the ground projection edge, and the auxiliary sphere center. For the current edge, calculate the projections of its start and end points onto the ground, and use these two projection points as the centers of two ground protection circles; calculate the radii of the two ground protection circles using the lightning rod heights and rolling sphere radii corresponding to the start and end points; calculate the distance between the centers of the two ground protection circles; calculate candidate intersection points using the two-circle intersection formula; select candidate intersection points located outside the convex hull boundary as ground projection points according to the directed order of the convex hull boundary. Generate two ground projection edges, where the first ground projection edge connects the center of one of the two ground protection circles to the ground projection point; the second edge connects the ground projection point to the center of the other of the two ground protection circles. Calculate the auxiliary sphere center using the start, end, and ground projection point of the current edge. Add this auxiliary sphere center to the sphere center set and remove duplicates.
[0038] (7) Interior point identification Calculate the difference between the used point set and the convex hull boundary point set to obtain the internal points; remove the internal points from the current unprocessed point set; remove the internal points from the single-needle protection point set; add the convex hull boundary points to the checked point set. Here, the convex hull boundary points refer to the lightning rod tips that constitute the convex hull boundary.
[0039] As those skilled in the art will understand, the internal points are already covered by the multi-needle protection area, so there is no need to calculate their single-needle or double-needle protection range.
[0040] (8) Double-needle protection judgment Traverse the following point pair combinations: point pairs formed by any two points in the checked point set; point pairs formed by points in the checked point set and convex hull boundary points; point pairs formed between convex hull boundary points of different multi-needle protection areas.
[0041] For each point pair: calculate the sum of the distance between the two points and the ground protection radius; if the distance between the two points is less than the sum of the ground protection radii, calculate the two intersection points of the two ground protection circles; calculate the two auxiliary sphere centers based on the two lightning rod tips and the two intersection points of the two ground protection circles; check whether the distance between each auxiliary sphere center and other lightning rod tips is greater than the rolling sphere radius; if so, generate a double-needle protection area, which includes the vertices of the ground projection quadrilateral, the auxiliary sphere centers, and the height.
[0042] (9) Single needle protection identification For each point in the single-needle protection point set: if the lightning rod height is greater than the rolling sphere radius, then set the effective height to the rolling sphere radius; calculate the ground protection circle radius; calculate the coordinates of key points, including the center of the circle, the projection of the center of the circle onto the ground, and the projection of the lightning rod tip onto the ground; calculate the rotation angle and the midpoint. (10) Geometry generation Based on the calculated single-needle, double-needle, and multi-needle protection area data, a three-dimensional geometry is generated.
[0043] In this embodiment, the radius of the rolling sphere can be selected according to the lightning protection level of the building, typically 30 meters, 45 meters, or 60 meters. The reference height is usually set to the ground elevation. Through the above steps, this invention can automatically calculate the protection range of all lightning rods (single-rod, double-rod, and multi-rod combined) and generate a three-dimensional visual geometry, which can be directly applied to lightning protection design in building information modeling software.
[0044] To more clearly illustrate the application of the lightning protection range calculation method of the present invention, examples are given below.
[0045] Suppose a construction project requires the installation of three lightning rods with heights of 20 meters, 25 meters, and 30 meters, located at positions one, two, and three respectively, with a rolling sphere radius of 45 meters. The method of this invention is used to calculate the protection range: First, calculate the coordinates of the lightning rod tips; select the point with the largest height as the seed point; find a seed triangle among the remaining two points, calculating the circumcircle radius of the three points to be approximately 23.5 meters, which is less than 45 meters, satisfying the rolling sphere condition; calculate the coordinates of the sphere center, whose height is greater than 45 meters, satisfying the constraint condition; perform incremental convex hull expansion, directly forming a triangular convex hull since there are only three points; calculate the ground projection polygon, generating three ground projection edges; generate the geometry of the three-rod joint protection range, including the ground polygon extrusion and the top hemisphere.
[0046] Similarly, if there are three or more lightning rods, the algorithm will automatically identify multiple three-rod joint protection areas, two-rod protection areas, and single-rod protection areas, and generate a complete protection range geometry.
[0047] Therefore, the lightning rod protection range calculation method of the present invention achieves automatic calculation of the lightning protection range through incremental convex hull construction. It can automatically identify different protection modes such as single-needle, double-needle, and multi-needle, accurately reflect the minimum positional relationship between the rolling sphere and the lightning rod, and divide the protection range into the effective range of each single needle and the combined effective range of multiple needles. The generated lightning protection range has accurate and clear protection boundaries, and can accurately reflect the protection range surface of single needles, pairs of needles, and the top of three or more needles. At the same time, by displaying the protection range in a transparent or rendered manner, designers can intuitively see whether the protected object is within the lightning rod's lightning protection range. It can also realize the visualization of the lightning protection range from multiple angles and dimensions, achieving the real-time query effect of the protection range that cannot be achieved by a planar drawing. This not only greatly improves the work efficiency of designers and reduces redundant operations in the drawing process, but also further improves the accuracy and automation of lightning protection design.
[0048] The above-described embodiments are merely one implementation of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A method for calculating the protection range of a lightning rod based on incremental convex hull construction, characterized in that, Includes the following steps: S1: Data preprocessing steps: Obtain the lightning rod element set, extract the three-dimensional coordinates of each lightning rod tip, convert them into absolute coordinates relative to the reference height, and initialize the point set; wherein, the point set includes the current point set to be processed, the original point set, the checked point set, and the single-rod protection point set; S2: Multi-needle protection identification steps: Select the point with the largest height from the current set of points to be processed as the seed point, and search for a seed triangle that forms a rolling sphere condition with the seed point in the remaining set of points; if the seed triangle is found, perform incremental convex hull expansion; if not found, mark the seed point as single-needle protection. S3: Incremental convex hull expansion steps: Initialize the sphere center set, add the sphere center coordinates corresponding to the seed triangle to the sphere center set; add the three edges of the seed triangle to the seed edge list, for each edge in the seed edge list, search for an expansion point that satisfies the rolling sphere condition in the original point set; if an expansion point is found, generate a new edge and record the sphere center, and add the sphere center to the sphere center set; if not found, mark it as a locked edge, and repeat until all edges are processed; S4: Convex hull boundary identification step: Arrange the locking edges in a head-to-tail order to form a closed convex hull boundary; S5: Ground projection calculation steps: Calculate the projection polygon of the convex hull boundary on the ground, and generate ground projection points, ground projection edges and auxiliary sphere centers for each edge in the convex hull boundary; S6: Internal point identification step: Identify the lightning rod tip inside the convex hull boundary, remove it from the current set of points to be processed, and take the lightning rod tip that constitutes the convex hull boundary as the convex hull boundary point and mark it as a candidate point for double-needle protection. S7: Double needle protection determination step: Traverse the checked point set and the convex hull boundary point, determine whether the distance between the two points is less than the sum of the ground protection radii. If the condition is met and there is no conflict between the sphere centers, then generate a double needle protection area. S8: Single-needle protection identification steps: Calculate the single-needle protection range for the remaining unprocessed lightning rod points in the single-needle protection point set; S9: Geometry generation steps: Generate three-dimensional geometry based on the protection area data of single needle, double needle, and multi-needle needles.
2. The method for calculating the protection range of a lightning rod based on incremental convex hull construction according to claim 1, characterized in that, In step S2, the method for generating the seed triangle includes: S2.
1. Traverse all candidate point pairs in the remaining point set, wherein the remaining point set is the set of lightning rod tip points in the current point set to be processed excluding the seed point, and the candidate point pair is a point pair formed by any two different lightning rod tip points in the remaining point set; S2.2 Calculate the radius of the circumcircle formed by the seed point and the candidate point with respect to the three points; S2.3 If the radius of the circumscribed circle is less than or equal to the radius of the rolling ball, calculate the coordinates of the ball's center; S2.4 Check if other points are inside the sphere. If the sphere contains other points, reject the triangle. S2.5 Select the triangle with the largest center height that is greater than the radius of the rolling ball as the seed triangle; S2.
6. Ensure that the vertices of the triangle are arranged in counterclockwise order, and determine this by the cross product sign; The rolling sphere condition refers to the condition that the radius of the circumcircle formed by the three lightning rod tips in the plane where the three points are located is less than or equal to the rolling sphere radius determined according to the lightning protection level, and the height of the sphere center is greater than the rolling sphere radius.
3. The method for calculating the protection range of a lightning rod based on incremental convex hull construction according to claim 1, characterized in that, In step S3, the method for selecting the expansion point includes: S3.1 Check whether the candidate point is on the extended side of the edge, where the extended side refers to the side that does not contain the seed triangle among the two sides divided by the current edge as the dividing line. S3.2 Calculate the radius of the circumcircle formed by the candidate point and the two endpoints of the edge; S3.3 If the radius is smaller than the radius of the rolling ball, calculate the coordinates of the ball's center; S3.4 Select the point with the largest center height that is greater than the radius of the rolling ball as the expansion point; S3.
5. Generate two new edges based on the starting point, ending point, and expansion point of the current processed edge. The first new edge is a directed edge from the starting point of the current processed edge to the expansion point, and the second new edge is a directed edge from the expansion point to the ending point of the current processed edge. Check whether the reverse edges of the two new edges already exist in the seed edge list. The reverse edge is a directed edge formed by swapping the starting point and ending point. The expansion point is selected based on the principle that the height of the ball center is the largest and greater than the radius of the rolling ball. S3.6 If the reverse edge of the first new edge does not exist in the seed edge list, then add the first new edge to the seed edge list; if the reverse edge of the second new edge does not exist in the seed edge list, then add the second new edge to the seed edge list.
4. The method for calculating the protection range of a lightning rod based on incremental convex hull construction according to claim 1, characterized in that, Step S4 specifically includes: initializing the convex hull boundary list, which contains the starting edge of the locked edge list, wherein any edge in the locked edge list can be added to the convex hull boundary list as a starting edge; deleting the starting edge added to the convex hull boundary list from the locked edge list; cyclically searching for a locked edge whose starting point is equal to the ending point of the last edge in the convex hull boundary list, adding the found locked edge to the convex hull boundary list, and deleting the edge from the locked edge list, until the locked edge list is empty, thus obtaining an ordered convex hull boundary list.
5. The method for calculating the protection range of a lightning rod based on incremental convex hull construction according to claim 1, characterized in that, In step S5, the method for calculating the ground projection point is as follows: S5.1 Calculate the ground protection radius at the start and end points of the convex hull boundary edge, where the ground protection radius is related to the lightning rod height and the rolling sphere radius; S5.2 Calculate the centers of the two ground protection circles, wherein the center of the first ground protection circle is located at the projection position of the starting point of the convex hull boundary edge on the ground, and the center of the second ground protection circle is the projection position of the ending point of the convex hull boundary edge on the ground. S5.3 Calculate the candidate intersection point using the two-circle intersection formula. Select a candidate intersection point located outside the convex hull boundary as the intersection point according to the directed order of the convex hull boundary edges. S5.4 Generate two ground projection edges, including the edge formed by connecting the center of the first ground protection circle and the intersection point, and the edge formed by connecting the intersection point and the center of the second ground protection circle; The ground projection point is obtained by calculating the intersection of two ground protection circles. The ground protection circle is a circle formed with the projection point of the corresponding lightning rod tip on the ground as the center and the ground protection radius as the radius. The ground protection radius is calculated based on the height of the lightning rod and the radius of the rolling sphere.
6. The method for calculating the protection range of a lightning rod based on incremental convex hull construction according to claim 1, characterized in that, In step S7, the determination condition for double-needle protection is: S7.1 The distance between two points is less than the sum of the two ground protection radii; S7.2 Calculate the two intersection points of the two ground protection circles; S7.3 Calculate the two auxiliary sphere centers, wherein each sphere center is calculated through the two lightning rod tips and the intersection point mentioned above; S7.4 Check whether the distance between each auxiliary sphere center and all other lightning rod points is greater than or equal to the rolling sphere radius; S7.5 If all distance checks pass, a double-needle protection area is generated, and the ground projection quadrilateral consists of two centers and two intersections.
7. The method for calculating the protection range of a lightning rod based on incremental convex hull construction according to claim 1, characterized in that, In step S8, the calculation method for the single-needle protection range is as follows: S8.1 If the height of the lightning rod is greater than the radius of the rolling sphere, the effective height shall be set to the radius of the rolling sphere; S8.2 Calculate the ground protection radius using the standard formula of the rolling sphere method; S8.3 Generate a rotation curve, including vertical line segments, horizontal line segments, and circular arcs; S8.
4. Rotate the rotation curve 360 degrees around the vertical axis to generate a rotation solid.
8. The method for calculating the protection range of a lightning rod based on incremental convex hull construction according to claim 1, characterized in that, In step S9, the geometry generation specifically includes: Single needle protection: A rotating entity is generated by rotating a curve around a vertical axis; Dual-needle protection: Create a ground quadrilateral extruded body and two spherical virtual bodies, and use Boolean union to combine them; specifically: create a ground quadrilateral extruded body with a height equal to the higher of the two lightning rods, create two spherical virtual bodies with their centers as auxiliary centers and their radii equal to the radius of the rolling sphere, and use Boolean union to combine the extruded body and the two spherical virtual bodies, so that the spherical virtual bodies perform a Boolean union with the ground quadrilateral extruded body to generate the dual-needle protection geometry; Multi-needle protection: Create a ground polygonal extrusion body and multiple spherical virtual entities, and use Boolean union to merge them; specifically: create a ground polygonal extrusion body with a height equal to the height of the highest point among the convex hull boundary points, arrange the sphere centers in descending order of height, create a spherical virtual entity for each sphere center with a radius equal to the radius of the rolling sphere, and use Boolean union to merge all the geometry in turn, so that the spherical virtual entities sequentially perform Boolean union on the ground polygonal extrusion body to generate multi-needle protection geometry.
9. The method for calculating the protection range of a lightning rod based on incremental convex hull construction according to claim 1, characterized in that, In step S3, the method for calculating the coordinates of the sphere center is as follows: step 1, calculate the center and radius of the circumcircle of the three points; Step 2: Calculate the normal vector and ensure it points upwards. If the normal vector points downwards, take the opposite vector. Step 3: Use the Pythagorean theorem to calculate the distance from the center of the sphere to the center of the circle; Step 4: The coordinates of the sphere's center are equal to the distance offset from the center of the circle along the direction of the normal vector. Step 5: If the radius of the circumscribed circle is greater than or equal to the radius of the rolling ball, return to the invalid ball center.
10. A lightning rod protection range calculation system based on incremental convex hull construction, characterized in that, The method for calculating the protection range of a lightning rod based on incremental convex hull construction as described in any of claims 1-9 includes a data preprocessing module, a seed point selection module, a seed triangle generation module, a convex hull expansion module, a convex hull boundary identification module, a ground projection calculation module, an internal point identification module, a dual-needle protection determination module, a single-needle protection identification module, and a geometry generation module connected in a data processing flow. The data preprocessing module is configured to acquire a set of lightning rod elements, extract three-dimensional coordinates and height parameters, and initialize the current set of points to be processed, the original set of points, the set of points already checked, and the set of single-rod protection points. The seed point selection module is configured to select the point with the largest height from the current set of points to be processed as the seed point; The seed triangle generation module is configured to find triangles in the remaining point set that form a rolling ball condition with the seed point. The convex hull expansion module is configured to perform incremental convex hull expansion to generate a set of locked edges and sphere centers; wherein, the set of sphere centers refers to the set of all valid rolling sphere center coordinates in the incremental convex hull region currently being constructed; The convex hull boundary recognition module is configured to accept the locked edges and arrange the locked edges in a head-to-tail order to form a closed convex hull boundary. The ground projection calculation module, internal point identification module, dual-needle protection judgment module, single-needle protection identification module, and geometry generation module are configured to perform corresponding calculation and judgment functions, respectively.