Automatic generation method of slope roof panel in any shape
Through the automatic generation method, the existing slope roof design is solved, the problems of time-consuming, error-prone and lack of flexibility are achieved, efficient and accurate roof panel generation is achieved, design efficiency and construction support are improved, and complex shapes and structural needs are met.
Patent Information
- Application Number
- CN202411565630.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-01-07
AI Technical Summary
The existing slope roof design methods are time-consuming, error-prone, lack flexibility and intelligence, making it difficult to quickly adapt to complex shapes and structural needs, and lack visualization and interactivity, which affects design efficiency and construction support.
Using an automatic generation method of any shape sloped roof panel, the polygon direction and vertex relationship are determined through initialization operations, polygon shrinkage and recursive processing are performed, the roof line is extracted and the adjacency table is generated, and the vertex overlap and redundancy checks are performed to ensure the generated house. Panel accuracy and connectivity.
It improves the efficiency and accuracy of roof panel generation, enhances the flexibility and reliability of design, supports personalized architectural design, simplifies communication between designers and customers, and reduces construction costs and construction periods.
Smart Images

Figure CN119272385A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of panel model generation, and in particular relates to an automatic generation method for a slope roof panel of any shape. Background Art
[0002] Sloped roof is a common roof form in architectural design. Its unique appearance and good drainage performance make it widely used in residential, commercial and industrial buildings. With the increasing diversification and personalized needs of architectural design, the traditional slope roof design method has gradually revealed some shortcomings and urgently needs innovation and improvement. First of all, the existing slope roof design usually relies on manual drawing or the use of traditional CAD software. This method is not only time-consuming, but also requires a high level of skill from the designer. Human errors are prone to occur in the manual design process, resulting in insufficient accuracy and consistency of the design drawings, affecting subsequent construction and use. Secondly, traditional design methods are difficult to quickly adapt to the needs of slope roofs of different shapes and complex structures. With the diversification of architectural styles, customers have higher requirements for the shape and function of the roof. Existing technologies often lack flexibility and cannot efficiently respond to these changes, resulting in a longer design cycle and affecting the overall progress of the construction project.
[0003] Furthermore, existing slope roof design tools usually lack intelligent functions and cannot automatically generate slope roof models according to design parameters. Designers often need to manually calculate and adjust various parameters, which increases the complexity and workload of the design. Many tools perform poorly when dealing with complex geometric shapes, making it difficult to achieve precise roof curvatures and lines, resulting in the final effect not fully meeting the designer's original intention. In addition, when designing slope roofs, existing technologies often ignore the coordination with structures, materials and construction processes, making the design difficult to implement in actual construction and increasing the cost and construction period of later modifications.
[0004] At the same time, the traditional slope roof design method lacks visualization and interactivity, and the communication between designers and customers often relies on static drawings, which makes it difficult to intuitively display the design effect. This way of information transmission may lead to inaccurate understanding of customer needs, resulting in rework and modification. Finally, the existing design tools are insufficient in terms of automatic generation of construction drawings and calculation of material consumption, and cannot provide sufficient support for construction, which increases the complexity and uncertainty of project management. Therefore, it is particularly important to develop an automatic generation method for slope roof panels of arbitrary shapes. This new method should be able to make full use of modern computer technology to automatically generate slope roof designs that meet customer needs and improve design efficiency and accuracy. By introducing intelligent algorithms and modeling techniques, this method can quickly respond to design changes and flexibly adapt to different shapes and structural requirements. At the same time, it enhances the coordination with structure, materials and construction technology, provides comprehensive design support for designers, and helps to achieve high-quality architectural design. In addition, through visualization tools, designers can more intuitively display the design effect, enhance communication with customers, and make the design scheme easier to understand and accept. In general, this innovative automatic generation method of slope roof panels will promote the intelligent and automated process of architectural design, improve design efficiency and quality, and provide strong support for the development of the modern construction industry. Therefore, there is an urgent need for an automatic generation method for arbitrarily shaped slope roof panels. Summary of the invention
[0005] The present invention proposes an automatic generation method of a slope roof panel of any shape. The existing slope roof panel modeling method in the quantity calculation software can only trim the CAD line segment and draw it into the ridge line. The process is very complicated. After the ridge line is drawn into the platform, the roof panel is drawn according to the ridge line, and finally the slope of the roof panel is adjusted. The modeling process of this method is very time-consuming and prone to errors. This time, based on the modeling of slope roof panels in engineering quantity calculation software, according to the characteristics of slope roof panels in actual projects, a method for automatically generating slope roof panels is proposed.
[0006] The technical solution of the present invention is implemented as follows: a method for automatically generating a sloping roof panel of any shape, the method comprising the following steps:
[0007] S1: Perform initialization operation:
[0008] After determining the direction of the polygon and the adjacency relationship between the vertices, the adjacency relationship between the polygon vertices is established, and the slope normal vector at each vertex is calculated;
[0009] S2: Polygon contraction and recursive processing:
[0010] The polygon shrinking process is realized through recursion, and the corresponding behavior is selected for processing each time the shrinking occurs;
[0011] S3: Ridge line extraction and roof panel analysis:
[0012] When all the areas are shrunk to form a ridge line, all the ridge lines are analyzed and arranged, all the roof panels are found and the three-dimensional geometric coordinates of each roof panel are obtained;
[0013] S4: Algorithm for obtaining roof panels through ridge lines
[0014] Obtaining vertices from the vertex array generated by the ridge line and generating an adjacency list based on the obtained vertices, wherein the adjacency list is used to record adjacent vertex information of each vertex;
[0015] Starting from each vertex, traverse according to the adjacency list, connect the vertices of each edge in order until returning to the starting point to form a polygon; then repeat the check of the generated polygon, if the same polygon already exists, do not add it;
[0016] Calculate the direction of the polygon through the coordinates of the polygon vertices, determine the concavity and convexity of each vertex according to the polygon direction, and record the concave or convex properties of each vertex;
[0017] Check the generated polygons for vertex overlap. If there are any overlapping vertices, delete them to one. Check each polygon separately to check for redundant vertices and delete them.
[0018] Calculate the area of each polygon. If the area is less than the set threshold, the polygon is considered invalid and deleted. Use a recursive algorithm to determine whether non-adjacent vertices in the polygon are connected. If they are connected, further check whether the midpoint of the connecting line is inside the polygon. If so, delete the polygon.
[0019] According to the vertices of the polygon, add spatial edges and update the adjacency list, check whether the newly added vertices already exist, if not, add them to the vertex array and update the adjacency list; after each polygon analysis is completed, clean up the vertex array, adjacency list, and plane vertex set, and reset related parameters;
[0020] For each point, determine whether it is inside the polygon. If any vertex is inside the polygon, the polygon is not a valid roof panel. If it is on the boundary, it is considered not inside the polygon.
[0021] Compared with the existing technology, the automatic generation method of arbitrary-shaped sloping roof panels has several significant innovations and advantages. First, the method determines the direction of the polygon and the adjacency relationship between vertices through initialization operations, and calculates the slope normal vector at each vertex. This step lays the foundation for subsequent processing. Compared with traditional methods, the existing technology usually lacks sufficient analysis of polygon geometric features, resulting in the inability to accurately capture the shape changes and normal vector information of the sloping roof during subsequent processing, thus affecting the accuracy and stability of the final generated results.
[0022] The polygon contraction and recursive processing steps in the method achieve fine control and processing of polygons through a recursive algorithm. This design is flexible and efficient, and can effectively deal with complex polygonal shapes. Traditional methods often rely on simple linear processing and cannot flexibly respond to changing design requirements, resulting in the complexity and diversity of the generated roof panels being limited. The steps of ridge line extraction and roof panel analysis achieve accurate analysis and arrangement of the final ridge line, so that the three-dimensional geometric coordinates of each roof panel can be accurately extracted. This process often lacks systematic processing in the prior art, resulting in the extracted ridge line being unclear, affecting the accuracy and effect of subsequent design.
[0023] This method obtains the adjacency list through the vertex array generated by the ridge line, ensuring that the adjacent relationship of each vertex is accurately recorded. The use of this adjacency list is more efficient than the simple array storage in the traditional method, which can be quickly retrieved and operated, and enhances the system's ability to handle complex geometric structures. Traditional methods often lack such structured storage, resulting in complex operations and low efficiency.
[0024] The duplicate checking and redundant vertex deletion steps in this method effectively avoid redundant data in the generation process and ensure that each polygon is unique. This meticulous processing is relatively rare in the prior art. Many traditional methods fail to effectively handle redundancy when generating polygons, resulting in possible duplication or unnecessary complexity in the final result. Through area calculation and connectivity judgment, the method can effectively filter invalid polygons to ensure that the final generated roof panels have practical application value. The prior art often lacks such an effective screening mechanism, resulting in the possibility of inapplicable elements in the generated roof panels, affecting subsequent construction and use. The spatial edge addition and adjacency table update design of the method ensure that the generated polygons are structurally coherent, further enhancing the integrity and reliability of the model. Traditional methods usually do not take into account such structured updates, resulting in possible problems in the spatial connectivity of the generated model.
[0025] Through step-by-step analysis and cleaning, the method ensures the accuracy of the judgment of whether each point is within the polygon. This meticulous inspection mechanism is often overlooked in existing technologies, which may cause problems in the actual application of the final generated roof panels. In general, this method of automatic generation of sloping roof panels based on the self-attention mechanism overcomes the various shortcomings of traditional technologies in the polygon generation process through its systematicity, flexibility and accuracy. It not only improves the efficiency and accuracy of roof panel generation, but also provides strong technical support for the personalized development of architectural design.
[0026] As a preferred implementation, in the step S2, when selecting the corresponding behavior, any one of the following behaviors is selected for processing: reducing edges, splitting, reducing horizontal vectors, common points, triangles, and flattening.
[0027] As a preferred implementation, the edge reduction is to remove an edge of a polygon to reduce the number of vertices of the polygon; the splitting is to split an edge of a polygon into two new edges to form a new geometric structure; the horizontal vector reduction is to adjust the length of the horizontal vector in the polygon; the common pointization is to merge adjacent vertices in the polygon into one point to simplify the geometric structure; the triangle is to form a new triangle area, and the flattening is to flatten the polygon to make it reach a flat state of a specified height.
[0028] As a preferred embodiment, when judging the concavity of each vertex according to the direction of the polygon, by traversing each vertex of the polygon, it is judged whether the vertex is a convex point or a concave point, and the judgment is based on the direction of the polygon and the relative position of the vertex and its two adjacent vertices.
[0029] As a preferred implementation, in step S1, when calculating the slope normal vector at each vertex, a line vector is calculated for each vertex, and the intersection points between the vertices are calculated and the splitting events are processed through the line vectors.
[0030] After adopting the above technical solution, the beneficial effect of the present invention is that in the process of constructing and verifying polygons, the adjacency list data structure is cleverly used in conjunction with the recursive algorithm, so that complex polygon data can be processed quickly and accurately. The adjacency list, with its efficient space utilization and fast adjacency query capabilities, lays a solid foundation for the efficient generation of polygons. The recursive algorithm, with its powerful decomposition and combination capabilities, deeply analyzes the internal structure of the polygon to ensure that each step of the operation can be performed in the most optimized way. This efficient combination not only greatly shortens the processing time, but also improves the performance of the overall algorithm, making polygon processing easy and fast.
[0031] In the field of graphics processing, accuracy is the bottom line that cannot be compromised. Therefore, after the polygons are generated, a multiple verification mechanism is used to strictly check each polygon. Through multiple checks and verifications, it is ensured that each polygon reaches a perfect state without duplication and redundant vertices. At the same time, the connectivity and validity of the polygons are fully evaluated to ensure that they are not only perfect in form, but also fully functional. Such strict control makes the polygon generation algorithm reach the industry-leading level in accuracy.
[0032] In order to meet the diverse needs of different scenarios, the polygon processing algorithm was designed with full consideration of flexibility and scalability. It is particularly worth mentioning that the function of independently setting the slope angle is provided for all edges. This innovative design makes the polygons more colorful in form. Whether it is a strong line that needs a 90° vertical slope, or a soft transition of flattening the roof at any height, the algorithm can easily cope with it. This high degree of applicability not only broadens the application scope of polygons, but also provides users with a more personalized choice space. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0034] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] Example:
[0037] like Figure 1 As shown, a method for automatically generating a sloping roof panel of any shape comprises the following steps:
[0038] S1: Perform initialization operation:
[0039] After determining the direction of the polygon and the adjacency relationship between the vertices, the adjacency relationship between the polygon vertices is established, and the slope normal vector at each vertex is calculated;
[0040] S2: Polygon contraction and recursive processing:
[0041] The polygon shrinking process is realized through recursion, and the corresponding behavior is selected for processing each time the shrinking occurs;
[0042] S3: Ridge line extraction and roof panel analysis:
[0043] When all the areas are shrunk to form a ridge line, all the ridge lines are analyzed and arranged, all the roof panels are found and the three-dimensional geometric coordinates of each roof panel are obtained;
[0044] S4: Algorithm for obtaining roof panels through ridge lines
[0045] Obtaining vertices from the vertex array generated by the ridge line and generating an adjacency list based on the obtained vertices, wherein the adjacency list is used to record adjacent vertex information of each vertex;
[0046] Starting from each vertex, traverse according to the adjacency list, connect the vertices of each edge in order until returning to the starting point to form a polygon; then repeat the check of the generated polygon, if the same polygon already exists, do not add it;
[0047] Calculate the direction of the polygon through the coordinates of the polygon vertices, determine the concavity and convexity of each vertex according to the polygon direction, and record the concave or convex properties of each vertex;
[0048] Check the generated polygons for vertex overlap. If there are any overlapping vertices, delete them to one. Check each polygon separately to check for redundant vertices and delete them.
[0049] Calculate the area of each polygon. If the area is less than the set threshold, the polygon is considered invalid and deleted. Use a recursive algorithm to determine whether non-adjacent vertices in the polygon are connected. If they are connected, further check whether the midpoint of the connecting line is inside the polygon. If so, delete the polygon.
[0050] According to the vertices of the polygon, add spatial edges and update the adjacency list, check whether the newly added vertices already exist, if not, add them to the vertex array and update the adjacency list; after each polygon analysis is completed, clean up the vertex array, adjacency list, and plane vertex set, and reset related parameters;
[0051] For each point, determine whether it is inside the polygon. If any vertex is inside the polygon, the polygon is not a valid roof panel. If it is on the boundary, it is considered not inside the polygon.
[0052] Compared with the existing technology, this method provides detailed steps in polygon initialization and adjacency relationship establishment. By clearly determining the orientation of polygons and the adjacency relationship between vertices, this method can lay a solid foundation for subsequent geometric calculations and analysis. This process not only improves the accuracy of calculations, but also provides the necessary geometric information for subsequent roof panel generation, which is often vague or lacks systematicity in the existing technology.
[0053] In the steps of polygon contraction and recursive processing, the method realizes effective contraction of polygons through recursion, allowing fast processing and simplification of shapes in the case of complex shapes. This design makes full use of the advantages of recursive algorithms, making the processing process more efficient and flexible, while the iterative or linear processing methods commonly used in the prior art may increase the computational complexity and reduce the efficiency. In addition, the mechanism of selecting the corresponding behavior for processing at each contraction provides higher flexibility and adaptability, and can optimize the processing for specific geometric features.
[0054] In the process of ridge line extraction and roof panel analysis, this method emphasizes the arrangement of ridge lines and the acquisition of three-dimensional geometric coordinates of roof panels. The biggest difference from the existing technology is that many existing methods only focus on plane analysis and ignore the acquisition of three-dimensional geometric features. This method clearly extracts the ridge line, so that the final generated pitched roof panel not only has an accurate outline, but also can be reasonably expressed in three-dimensional space, which is of great significance in architectural design and engineering applications.
[0055] The method particularly emphasizes the establishment and application of the adjacency list in the algorithm for generating the roof panel. By recording the adjacent information of each vertex through the adjacency list, the subsequent polygon formation and analysis become more efficient. The application of this data structure is not common in the prior art, especially when processing complex polygons, it can greatly improve the processing speed and accuracy of the algorithm. At the same time, the method also introduces a number of detailed inspection mechanisms such as polygon overlap, redundant vertex inspection and validity judgment, which are rarely mentioned in the prior art. Through strict screening of polygons, it is ensured that the final generated roof panel meets the design requirements, and the reliability and practicality of the generated results are improved.
[0056] The technical problem solved by this method is mainly how to efficiently and accurately generate sloping roof panels of arbitrary shapes. The existing technologies in this regard have many problems such as high algorithm complexity, long processing time, and inaccurate generation results. This method significantly improves the generation efficiency and accuracy of sloping roof panels through systematic steps and strict geometric calculations. In addition, for the processing of complex polygons, through the establishment of adjacency relationships and the application of adjacency tables, the algorithm can be more comfortable in processing complex shapes, which directly solves the limitations of traditional methods in processing polygons.
[0057] In the step S2, when selecting the corresponding behavior, any one of the following behaviors is selected for processing: reducing edges, splitting, reducing horizontal vectors, common points, triangles, and flattening.
[0058] The corresponding behaviors selected in step S2, such as edge reduction, splitting, horizontal vector reduction, co-pointing, triangulation, and flattening, provide a variety of flexible geometric processing options, which significantly improve the accuracy and adaptability of the automatic generation of sloping roof panels. First, edge reduction and splitting behaviors can effectively simplify complex polygonal structures, ensuring that the shape of the final generated roof panel is more concise and meets the design requirements. Secondly, horizontal vector reduction allows the optimization of the inclination and curvature of the roof panel, ensuring that it has good functionality and drainage performance while meeting aesthetics. Co-pointing and triangulation promote the reasonable connection of vertices, ensuring that the generated structure is more stable in physical properties. Flattening can adjust the flatness of the surface and improve the construction adaptability of the roof panel, which is crucial for subsequent construction. The flexible combination of these behaviors enables designers to make personalized adjustments according to specific needs, thereby improving the overall efficiency and design quality of the system, and ensuring the optimal balance between functionality and aesthetics of the final generated sloping roof panel. In general, this flexible geometric processing selection mechanism greatly enhances the practicality of the automatic generation method of sloping roof panels, improves the freedom and operability of design, and provides a more efficient and accurate solution for architectural design.
[0059] The edge reduction is to remove one edge of a polygon to reduce the number of vertices of the polygon; the splitting is to split one edge of a polygon into two new edges to form a new geometric structure; the horizontal vector reduction is to adjust the length of the horizontal vector in the polygon; the common point is to merge adjacent vertices in the polygon into one point to simplify the geometric structure; the triangle is to form a new triangle area, and the flattening is to flatten the polygon to make it reach a flat state of a specified height.
[0060] The working principle and operation steps of this method mainly revolve around the flexible adjustment and optimization of polygonal geometric structures to achieve the automatic generation of arbitrarily shaped pitched roof panels. First, the edge reduction operation reduces the number of vertices of a polygon by removing one of its edges. The purpose of this operation is to simplify the geometric shape so that subsequent calculations and processing are more efficient. Reducing the complexity of polygons not only helps to improve the operation speed, but also avoids unnecessary details when generating the roof, ensuring the integrity and consistency of the roof design. Secondly, the splitting operation splits one edge of the polygon into two new edges to form a new geometric structure. This operation can introduce more flexibility in the design, allowing designers to fine-tune the shape of the polygon as needed, increase the complexity or details of the design, and meet specific aesthetic and functional requirements.
[0061] Next, the horizontal vector reduction operation adjusts the length of the horizontal vector in the polygon in order to optimize the inclination and drainage performance of the roof. A reasonable horizontal vector length can ensure that water can be discharged smoothly under the influence of rainfall or other environmental factors, avoiding water accumulation problems, thereby improving the practicality and durability of the roof. The common point operation merges adjacent vertices in the polygon into one point. This process can not only simplify the geometric structure, but also reduce the computational complexity and reduce resource consumption in subsequent processing. In architectural design, simplifying the structure can often improve the convenience of construction, reduce material waste, and increase overall economic benefits.
[0062] Triangulation is the process of forming new triangular areas, which is a common step in computer graphics and CAD design. Because triangles are the simplest polygons, their calculation and processing efficiency is much higher than other complex shapes. The combination of triangles can make subsequent surface generation and modeling easier. In the design of sloping roofs, the use of triangles can effectively improve the stability and reliability of the roof. Finally, the flattening operation flattens the polygons to a flat state of a specified height, in order to ensure that the roof can meet the actual use requirements while being beautiful. A flat roof is not only easy to construct and maintain, but also improves the structural safety of the building and ensures good performance under various environmental conditions.
[0063] The settings and steps of this series of operations are designed to achieve flexibility, adjustability and efficiency in the automatic generation of pitched roof panels. Through fine control of polygonal geometry, designers can quickly adapt to different design requirements and environmental conditions, and improve the accuracy and aesthetics of roof design. This method not only reduces the workload of manual design, but also improves the overall design efficiency through automation, providing strong technical support for modern architectural design. Through these precise operation steps, the resulting pitched roof not only meets the functional requirements, but also meets the aesthetic standards of modern architecture in appearance, contributing to the sustainable development of the construction industry.
[0064] When judging the concavity of each vertex according to the direction of the polygon, each vertex of the polygon is traversed to judge whether the vertex is a convex point or a concave point, and the judgment is based on the direction of the polygon and the relative position of the vertex and its two adjacent vertices.
[0065] When judging the convexity of each vertex based on the direction of the polygon, the system adopts an analysis method based on geometric features. The working principle mainly revolves around traversing each vertex of the polygon and using the positional relationship of adjacent vertices to determine whether each vertex is convex or concave. First, the operation steps begin by traversing all the vertices of the polygon. The system visits each vertex in turn to determine the current vertex and its two adjacent vertices. The selection of adjacent vertices is based on the order of the vertices of the polygon, usually the previous vertex and the next vertex, so that a local structure can be formed for analysis.
[0066] When judging the concavity of a vertex, the system needs to first determine the direction of the polygon. This can be judged by the order in which the vertices are arranged, for example, in a counterclockwise or clockwise order. If the vertices are arranged in a counterclockwise order, the polygon is an outer enclosure shape; if it is clockwise, it is an inner enclosure shape. Next, by calculating the vector method, the system can judge the concavity of the vertex. Specifically, set the current vertex to A, the previous vertex to B, and the next vertex to C. The system calculates the cross product of vector BA and vector CA. When the cross product is positive, vertex A is a concave point; when the cross product is negative, vertex A is a convex point; when the cross product is zero, vertex A is on a straight line.
[0067] Such settings and operation steps are of great significance. First, the process of judging concavity and convexity is a basic and critical step in polygon analysis. The determination of concave and convex points directly affects the subsequent polygon processing, such as meshing, triangulation, etc. By accurately identifying concave and convex points, reliable basic data can be provided for further geometric processing. Secondly, using the vector cross product method to judge concavity and convexity is an efficient and accurate algorithm. This method can quickly obtain results through simple mathematical calculations, avoiding complex geometric operations and improving overall calculation efficiency.
[0068] The flexibility of this method is also worth noting. By independently judging each vertex, the system can adaptively process polygons of arbitrary shapes without being restricted by the complexity of the shape. This flexibility provides powerful tool support for fields such as architectural design, computer graphics, and engineering drawing. Finally, the judgment mechanism based on the direction and relative position of the polygon makes this method widely applicable to various practical scenarios, such as graphics processing in CAD software and object collision detection in game engines.
[0069] In the step S1, when calculating the slope normal vector at each vertex, a line splitting vector is calculated for each vertex, and the intersection points between the vertices are calculated and the splitting events are processed through the line splitting vectors.
[0070] In step S1, the process of calculating the slope normal vector at each vertex is a key geometric analysis operation, the purpose of which is to determine the orientation of the polygon surface and the geometric characteristics of each vertex. The working principle is mainly based on the analysis of the line vectors of the polygon vertices. Through the intersection calculation and split event processing of these vectors, the slope normal vector can be effectively extracted to ensure the accuracy and efficiency of the subsequent shape generation and processing process.
[0071] The operation begins by traversing each vertex of the polygon. During the traversal process, the system calculates the line vector for each vertex. The line vector is a vector formed by connecting the vertex to its two adjacent vertices. These vectors play a vital role in geometric shape analysis. By calculating the line vector of each vertex, the system can identify the geometric features of the local structure, thereby providing basic data for subsequent normal vector calculations.
[0072] Next, using the line splitting vectors, the system calculates the intersection points between the vertices. This process usually involves linear algebra operations, and the system determines the location of the intersection points by solving the system of equations for the line splitting vectors. The calculation of the intersection points not only helps to understand the shape of the polygon, but also provides a basis for subsequent polygon splitting events. During the polygon processing process, complex geometric changes may occur, such as crossing, overlapping, or splitting. Calculating the intersection points in advance can effectively predict and handle these events, ensuring that the shape changes of the polygons meet expectations.
[0073] When encountering a split event, the system will perform corresponding geometric operations based on the intersection information. Split events often mean that polygons need to be subdivided into multiple parts, which is a common requirement in architectural design and computer graphics. Through precise split processing, the system can generate more complex and detailed geometric shapes, providing richer basic data for subsequent pitch roof generation.
[0074] The significance of this setting and operation is that it provides an accurate geometric basis for the subsequent slope normal vector calculation. The calculation of the normal vector is crucial to determine the orientation, inclination angle and position of the slope roof in three-dimensional space. Accurate normal vectors not only affect the water discharge and structural stability of the roof, but also have a direct impact on the subsequent rendering and visual effects.
[0075] The flexibility and adaptability of this method are also worth noting. Through line vector calculation and intersection processing, the system can adaptively process polygons of arbitrary shapes without being restricted by complexity. This flexibility provides powerful tool support for fields such as architectural design, computer graphics, and engineering drawing.
[0076] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for automatically generating a sloped roof panel of any shape, characterized in that: The method comprises the following steps: S1: Perform initialization operation: After determining the direction of the polygon and the adjacency relationship between the vertices, the adjacency relationship between the polygon vertices is established, and the slope normal vector at each vertex is calculated; S2: Polygon contraction and recursive processing: The polygon shrinking process is realized through recursion, and the corresponding behavior is selected for processing each time the shrinking occurs; S3: Ridge line extraction and roof panel analysis: When all the areas are shrunk to form a ridge line, all the ridge lines are analyzed and arranged, all the roof panels are found and the three-dimensional geometric coordinates of each roof panel are obtained; S4: Algorithm for obtaining roof panels through ridge lines Obtaining vertices from the vertex array generated by the ridge line and generating an adjacency list based on the obtained vertices, wherein the adjacency list is used to record adjacent vertex information of each vertex; Starting from each vertex, traverse according to the adjacency list, connect the vertices of each edge in order until returning to the starting point to form a polygon; then repeat the check of the generated polygon, if the same polygon already exists, do not add it; Calculate the direction of the polygon through the coordinates of the polygon vertices, determine the concavity and convexity of each vertex according to the polygon direction, and record the concave or convex properties of each vertex; Check the generated polygons for vertex overlap. If there are any overlapping vertices, delete them to one. Check each polygon separately to check for redundant vertices and delete them. Calculate the area of each polygon. If the area is less than the set threshold, the polygon is considered invalid and deleted. Use a recursive algorithm to determine whether non-adjacent vertices in the polygon are connected. If they are connected, further check whether the midpoint of the connecting line is inside the polygon. If so, delete the polygon. According to the vertices of the polygon, add spatial edges and update the adjacency list, check whether the newly added vertex already exists, if not, add it to the vertex array and update the adjacency list; After each polygon analysis is completed, the vertex array, adjacency list, and plane vertex set are cleaned up and related parameters are reset; For each point, determine whether it is inside the polygon. If any vertex is inside the polygon, the polygon is not a valid roof panel. If it is on the boundary, it is considered not inside the polygon.
2. The method for automatically generating a sloping roof panel of any shape according to claim 1, characterized in that: In the step S2, when selecting the corresponding behavior, any one of the following behaviors is selected for processing: reducing edges, splitting, reducing horizontal vectors, common points, triangles, and flattening.
3. The method for automatically generating a sloping roof panel of any shape according to claim 1, characterized in that: The edge reduction is to remove one edge of a polygon to reduce the number of vertices of the polygon; the splitting is to split one edge of a polygon into two new edges to form a new geometric structure; the horizontal vector reduction is to adjust the length of the horizontal vector in the polygon; the common point is to merge adjacent vertices in the polygon into one point to simplify the geometric structure; the triangle is to form a new triangle area, and the flattening is to flatten the polygon to make it reach a flat state of a specified height.
4. The method for automatically generating a sloping roof panel of any shape according to claim 1, characterized in that: When judging the concavity of each vertex according to the direction of the polygon, each vertex of the polygon is traversed to judge whether the vertex is a convex point or a concave point, and the judgment is based on the direction of the polygon and the relative position of the vertex and its two adjacent vertices.
5. The method for automatically generating a sloping roof panel of any shape according to claim 1, characterized in that: In the step S1, when calculating the slope normal vector at each vertex, a line splitting vector is calculated for each vertex, and the intersection points between the vertices are calculated and the splitting events are processed through the line splitting vectors.