Polygon straight skeleton based building or road plan centerline extraction method
By employing polygonal skeleton processing and filtering strategies, the problems of polygonal width gradients and vertical connections in architectural floor plans are solved, achieving high-precision and aesthetically pleasing centerline extraction, applicable to various architectural areas.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANHUA ARCHITECTURE DESIGN COMPANY
- Filing Date
- 2022-10-12
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies struggle to handle situations where polygon widths gradually change and the line connecting the endpoints of the centerlines of adjacent wall segments is perpendicular to the wall segments in architectural floor plans. This results in insufficient accuracy in centerline extraction, affecting the layout of electrical equipment and the wiring of lighting circuits.
A polygonal straight skeleton processing method is adopted. By processing the architectural floor plan data with polygonal straight skeletons, centerline segments are filtered and connected. The filtering strategy of polygonal straight skeletons is optimized to ensure the accuracy and aesthetics of the centerlines.
It improves the accuracy and efficiency of extracting building centerlines, is applicable to common buildings and areas with curved walls, and meets the wiring needs of electrical equipment and lighting circuits.
Smart Images

Figure CN115578443B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of architectural design technology, and specifically to a method for extracting the center line of a building or road plan based on a polygonal straight skeleton. Background Technology
[0002] like Figure 1 , Figure 2 As shown, existing methods for automatically generating indoor map spatial data from architectural floor plans primarily focus on extracting the standardized representation of walls from complex architectural floor plans. To restore the connectivity of walls with columns, the approximate orientation of the wall polygons must be extracted. Since this technology only addresses walls conforming to the "Unified Standard for Architectural Drawings," it only considers wall segments formed by two parallel line segments or concentric circular arcs with opposite center positions as basic units, connecting adjacent wall segments with the bisectors of the two endpoints. This method can only handle polygons with parallel line segments on both sides (i.e., those with the same edge), and struggles to handle polygons with varying widths (i.e., those with different edge lines). Furthermore, when the line connecting the endpoints of the centerlines of adjacent wall segments is perpendicular to the wall segment, the supplementary line will be collinear with the line connecting the endpoints of the centerlines of adjacent wall segments. And when the thickness ratio of adjacent wall segments exceeds 2, the resulting centerline will coincide with the edge of the wall. Figure 3 The DE segment in the diagram is not suitable for tasks such as electrical equipment layout and lighting circuit wiring. The centerline extraction accuracy of the building is insufficient, which affects the operation results and efficiency. Summary of the Invention
[0003] The purpose of this invention is to address the above-mentioned problems by providing a method for extracting the centerline of a building or road plan based on a polygonal straight skeleton, which offers high accuracy in extracting the centerline of a building.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: This method for extracting the centerline of a building or road plan based on a polygonal straight skeleton includes the following steps:
[0005] S1. Input the building floor plan data;
[0006] S2. Perform polygonal skeleton processing on the architectural floor plan data;
[0007] S3. Filter the centerline segments of the polygonal straight skeleton;
[0008] S4. Traverse the selected polygonal skeletons and replace each discarded polygonal skeleton edge with a polyline to connect the centerline segments of all polygonal skeletons 1 into a complete polygonal skeleton diagram.
[0009] This method processes the building's floor plan data into a polygonal skeleton and "extrudes" the side walls inward at the same speed to obtain the trajectory of the "intersection points" of the wall segments, i.e., the skeleton. Then, based on the shape distribution characteristics of the walls on both sides of the trajectory, the trajectory segments are filtered and trimmed to obtain a centerline that is aesthetically pleasing and more in line with the building's design requirements. This not only effectively reflects the orientation of the floor plan, but also ensures that the points on the centerline cover the entire polygon with the smallest radius, improving the accuracy and efficiency of centerline extraction. This method is applicable to the centerline extraction of common orthogonal buildings and can also support the extraction of centerlines for areas containing curved walls by setting whether to prefer orthogonal turns when filtering trajectory segments.
[0010] In the above-mentioned method for extracting the center line of a building or road plan based on a polygonal straight skeleton, in step S1, the input building plan data is represented by a simple polygon with holes. For curved walls, a polyline is obtained by sampling on the curve. The selection of an orthogonal polyline or a smooth polyline when connecting the center line is controlled by a switch option.
[0011] This can achieve better results for floor plans that mostly enclose narrow areas with parallel walls.
[0012] In the above-mentioned method for extracting the center line of a building or road plan based on a polygonal straight skeleton, in step S2, the polygonal straight skeleton is formed by continuously translating the straight lines containing each side inward along the normal direction at the same speed. When non-adjacent contour edges collide, the edge is split into two segments. Then, the connection order of the two polygonal contour edges is changed and skeleton vertices are generated until all contour edges are squeezed to a length of 0. The motion trajectory of the endpoints of all edges obtained in the above process is the polygonal straight skeleton.
[0013] Among them, the circumferential edge of the simple polymorphic shape is the contour edge;
[0014] The vertices on a simple polygon are the contour vertices;
[0015] The sides of a simple polygon formed by the sides and the angle bisectors of those sides are called skeleton sides.
[0016] The point formed by the intersection of skeleton edges is the skeleton vertex;
[0017] The angle bisector between two adjacent vertices of the contour is the contour bisector;
[0018] The line connecting the points located inside a simple polygon and used to connect the bisectors of the outline is called the internal bisector;
[0019] The internal bisector and the outline bisector form the skeleton edge described above.
[0020] In the above-mentioned method for extracting centerlines from building or road plans based on polygonal skeletons, in step S3, during the filtering of centerline segments, the polygonal skeleton is filtered according to the relationship between the two contour edges that generate each line segment; the detailed steps are as follows:
[0021] S31. Define the direction of the outline edge as a counterclockwise direction surrounding the inner region of the polygon;
[0022] S32. Define the angle between the direction of the next contour edge along this direction and the direction of the current contour edge as the angle between the contour vertices.
[0023] S33. Determine concave and convex points and retain the skeleton edges that meet the conditions as centerline segments;
[0024] The condition for determining a convex point is: if the next contour edge turns to the left, the angle is positive, and the vertex is a convex point.
[0025] The condition for determining a concave point is: if the next contour edge turns to the right, the angle is negative, and the vertex is a concave point;
[0026] The skeleton edges that meet the retention criteria are those whose included angle between the two corresponding contour edges is positive and greater than 90 degrees.
[0027] In the problem of extracting the centerline of an architectural floor plan, what is needed is a centerline that can reflect the direction of the floor plan and is aesthetically pleasing. However, architectural floor plans contain concave and convex vertices, which will form a large number of "forks" in the straight skeleton, which does not meet the requirements of the centerline. Therefore, the polygonal straight skeleton segments are filtered according to the relationship between the two contour edges of each line segment generated in the polygonal straight skeleton.
[0028] In the above-mentioned method for extracting the centerline of a building or road plan based on a polygonal straight skeleton, in step S4, a vector list is maintained for each skeleton vertex to represent the direction of all centerlines that are currently connected to that skeleton vertex. All skeleton vertices are enumerated in the order in which they were formed, and skeleton line segments that are discarded for each skeleton vertex that is not on the contour edge are enumerated and the discarded skeleton line segments are replaced.
[0029] In the above method for extracting the centerline of a building or road plan based on a polygonal straight skeleton, if the option to not require orthogonal polylines is selected in the input options, the original skeleton line segments are still used for connection; otherwise, the connection method is determined according to the vector list of the two endpoints of the edge.
[0030] In the above method for extracting the centerline of a building or road plan based on a polygonal straight skeleton, if the vector list of the target point on the edge is empty, the direction v of each direction v in the vector list of the starting point is scored with the direction vector base_v of the edge, and the direction with the highest score is selected for connection.
[0031] In the above method for extracting the centerline of a building or road plan based on a polygonal straight skeleton, the scoring method is as follows:
[0032] If v is parallel or orthogonal to base_v, the score is 1, and the original skeleton line segment is directly selected for connection; if the absolute value of the angle between the two contour sides does not exceed 90 degrees, the cosine value of the angle between the two sides is set to c, and max(1-c^2,c^2 / 2) is taken as the score. If the value of 1-c^2 is large, it means that the two sides are biased to be orthogonal, and v is directly extended to the foot of the perpendicular from the target point to v.
[0033] If the value of c^2 / 2 is large, it means that the two sides are biased in the same direction. In this case, the original skeleton line segment is directly selected for connection. If the absolute value of the included angle between the two sides exceeds 90 degrees, the score is d and d < 0. The original skeleton line segment is directly used for connection.
[0034] In the above method for extracting the centerline of a building or road plan based on a polygonal straight skeleton, if the vector list of the target point on the edge is not empty, then for all combinations v0 and v1 of the vector lists of the two endpoints, a score is calculated with base_v, and the direction with the highest score is selected for connection. The scoring method is as follows: let the cosine of the angle between vector v0 and the base vector base_v be c0, and let the sine of the angle between vector v0 and the base vector base_v be s0; let the cosine of the angle between vector v1 and the base vector base_v be c1, and let the sine of the angle between vector v1 and the base vector base_v be s1. If c0 or c1 is close to 1, the score is 4, and the original skeleton line segment is directly selected for connection.
[0035] In the above method for extracting the center line of a building or road plan based on a polygonal straight skeleton, if there is an angle between the two with an absolute value greater than or equal to 90 degrees, the perpendicular line of the corresponding vector can be used to replace the corresponding vector to ensure that c0 and c1 are both greater than 0, but the corresponding score is halved.
[0036] If s0 and s1 have opposite signs, the midpoint of the original skeleton line segment can be directly taken as the perpendicular line of the side with the smaller cosine value to the extension of the other side, and the score is the square of the cosine value of the angle between v1 and v0.
[0037] If s0 and s1 have the same sign, the angle between v0 and v1 determines the score. If the absolute angle between them exceeds 120 degrees, the score is ((2c0^2-1)^2+(2c1^2-1)^2) / 2, which can be directly connected using the original skeleton line segments. Otherwise, the extensions of v0 and v1 can be directly connected by intersecting at a point, with the corresponding score being 2sin^2( angle(v0,v1)). After replacing the current skeleton line segments, update the vector list of the two endpoints.
[0038] Compared with existing technologies, the advantages of this invention are as follows: by processing architectural plan data with polygonal skeletons and optimizing the selection strategy of polygonal skeletons, the center line is corrected by the segment connection algorithm of polygonal skeletons, ensuring that the extracted building center line is more accurate and more aesthetically pleasing, effectively improving the running efficiency and the stability of the running results, and better meeting the architectural design requirements. It is applicable to the extraction of center lines of various common building areas and buildings containing curved walls. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of a polygon in the background technology where the same edge lines exist;
[0040] Figure 2 This is a schematic diagram of a polygon with different edge lines in the background technology;
[0041] Figure 3 This is a schematic diagram of the background technology when the centerline coincides with the edge of the wall;
[0042] Figure 4 This is a schematic diagram of the polygonal straight skeleton structure in this invention;
[0043] Figure 5 This is a schematic diagram illustrating the direction of the defined contour edge in this invention;
[0044] Figure 6 This is a flowchart of the method in this invention;
[0045] In the diagram: polygonal straight skeleton 1, contour edge 11, contour vertex 12, skeleton edge 13, skeleton vertex 14, contour bisector 15, internal bisector 16. Detailed Implementation
[0046] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0047] like Figure 4-6 As shown, a method for extracting the centerline of a building or road plan based on a polygonal straight skeleton is presented. This method includes the following steps:
[0048] S1. Input the building floor plan data;
[0049] S2. Process the architectural floor plan data using polygonal straight skeleton 1;
[0050] S3. Filter the centerline segments of polygonal straight skeleton 1;
[0051] S4. Traverse the selected polygonal skeleton 1 and replace each discarded polygonal skeleton 1 edge with a polyline to connect the centerline segments of all polygonal skeleton 1 to form a complete polygonal skeleton 1 diagram.
[0052] When processing the building floor plan data into polygonal straight skeleton 1, the wall planes and curved surfaces in the building floor plan data are classified and processed. The center line segments are filtered according to the relationship between two adjacent contour edges 11. The replacement of the polygonal straight skeleton 1 edges is achieved by calculating the bisection to obtain the optimal replacement method, ensuring the accuracy of the center line segment connection.
[0053] In step S1, the input architectural floor plan data is represented as a simple polygon with holes. For curved walls, a polyline is obtained by sampling along the curve. The selection of an orthogonal polyline or a smooth polyline when connecting the center line is controlled by a switch option. Choosing the appropriate polyline based on the actual situation of the architectural floor plan data is more consistent with reality.
[0054] In step S2, the polygonal straight skeleton 1 is to continuously translate the straight lines containing each side inward along the normal direction at the same speed. When non-adjacent contour edges 11 collide, the edge is split into two segments. Then, the connection order of the two polygonal contour edges 11 is changed and skeleton vertices 14 are generated until all contour edges 11 are squeezed to a length of 0.
[0055] The motion trajectories of all the endpoints of the edges obtained in the above process are the polygonal straight skeleton 1.
[0056] Among them, the circumferential edge of the simple polymorphic shape is the contour edge 11;
[0057] The vertex on the simple polymorph is the contour vertex 12;
[0058] The sides of a simple polygon formed by the sides and the angle bisectors of those sides constitute the skeleton sides (13).
[0059] The point formed by the intersection of the fixed frame edges is the skeleton vertex 14;
[0060] The angle bisector of two adjacent contour vertices 12 is the contour bisector 15;
[0061] The line connecting the points located inside the simple polygon and used to connect the outline bisector 15 is the internal bisector 16.
[0062] The internal bisector 16 and the outline bisector 15 together form the skeleton edge 13 mentioned above.
[0063] like Figure 5 As shown, in step S3, during the screening of centerline segments, the polygonal skeleton 1 is screened based on the relationship between the two contour edges 11 of each line segment generated in the polygonal skeleton 1; the detailed steps are as follows:
[0064] S31. Define the direction of the outline edge 11 as a counterclockwise direction surrounding the inner region of the polygon;
[0065] S32. Define the angle between the direction of the next contour edge 11 along this direction and the direction of the current contour edge 11 as the angle between the contour vertex 12.
[0066] S33. Determine the concave and convex points and retain the skeleton edge 13 that meets the conditions as the center line segment;
[0067] The condition for determining a convex point is: if the next contour edge 11 turns to the left, the angle is positive, and the vertex is a convex point.
[0068] The condition for determining a concave point is: if the next contour edge 11 turns to the right, the angle is negative, and the vertex is a concave point;
[0069] The skeleton edge 13 that meets the retention criteria is the two corresponding contour edges 11 with a positive angle greater than 90 degrees.
[0070] In the problem of extracting the centerline of a building plan, a centerline that can reflect the direction of the plan and is aesthetically pleasing is needed. However, there are concave vertices and convex vertices with large angles in the building plan. Such vertices will form a lot of "forks" in the polygonal straight skeleton 1, which does not meet the requirements of the centerline. Therefore, here we filter the straight skeleton segments according to the relationship between the two contour edges of each line segment generated in the polygonal straight skeleton to avoid generating concave and convex vertices.
[0071] In step S4, a vector list is maintained for each skeleton vertex 14 to represent the direction of all center lines that are currently connected to the skeleton vertex 14. All skeleton vertices 14 are enumerated in the order of their formation, and each skeleton line segment discarded by a skeleton vertex 14 that is not on the contour edge 11 is enumerated and replaced.
[0072] If the input options do not require orthogonal polylines, the original skeleton segments will still be used for connection; otherwise, the connection method will be determined based on the vector list of the two endpoints of the edge.
[0073] Specific Implementation Plan 1
[0074] If the vector list of the target point is empty, then calculate the score between each direction v in the vector list of the starting point and the direction vector base_v of the edge, and select the direction with the highest score to connect.
[0075] The calculation method for the score is as follows:
[0076] If v is parallel or orthogonal to base_v, the score is 1, and the original skeleton line segment is directly selected for connection; if the absolute value of the angle between the two contour sides 11 does not exceed 90 degrees, the cosine value of the angle between the two sides is c, and max(1-c^2,c^2 / 2) is taken as the score. If the value of 1-c^2 is large, it means that the two sides are biased to be orthogonal, and v is directly extended to the foot of the perpendicular from the target point to v.
[0077] If the value of c^2 / 2 is large, it means that the two sides are biased in the same direction. In this case, the original skeleton line segment is directly selected for connection. If the absolute value of the included angle between the two sides exceeds 90 degrees, the score is d and d < 0. The original skeleton line segment is directly used for connection.
[0078] When both sides are biased in the same direction, if a perpendicular line is drawn from the target point to v, it will differ too much from the original side, affecting the aesthetics of the center line. Therefore, the original skeleton line segment should be selected directly for connection. If the absolute value of the included angle between the two sides exceeds 90 degrees, a perfect connection method cannot be obtained no matter how the sides are biased. Therefore, the score is d.
[0079] Specific Implementation Plan Two
[0080] If the vector list of the target point is not empty, then for all combinations v0 and v1 of the vector lists of the two endpoints, calculate the score with base_v respectively, and select the direction with the highest score to connect.
[0081] The scoring method is as follows: Let the cosine of the angle between vector v0 and the reference vector base_v be c0, and let the sine of the angle between vector v0 and the reference vector base_v be s0; let the cosine of the angle between vector v1 and the reference vector base_v be c1, and let the sine of the angle between vector v1 and the reference vector base_v be s1. If c0 or c1 is close to 1, the score is 4, and the original skeleton line segment is directly selected for connection.
[0082] If there is an angle between the two with an absolute value greater than or equal to 90 degrees, the corresponding vector can be replaced by the perpendicular line of the corresponding vector to ensure that c0 and c1 are both greater than 0, but the corresponding score will be halved.
[0083] If s0 and s1 have opposite signs, the midpoint of the original skeleton line segment can be directly taken as the perpendicular line of the side with the smaller cosine value to the extension of the other side, and the score is the square of the cosine value of the angle between v1 and v0.
[0084] If s0 and s1 have the same sign, the angle between v0 and v1 determines the score. If the absolute angle between them exceeds 120 degrees, the score is ((2c0^2-1)^2+(2c1^2-1)^2) / 2, which can be directly connected using the original skeleton line segments. Otherwise, the extensions of v0 and v1 can be directly connected by intersecting at a point, with the corresponding score being 2sin^2(angle(v0,v1)). After replacing the current skeleton line segments, update the vector list of the two endpoints.
[0085] Here, you can apply the preference for orthogonal turning points to any area in the diagram, which will result in better centerline extraction for architectural drawings that have both orthogonal and curved areas.
[0086] In summary, the principle of this embodiment is as follows: after inputting the graphic data of the building, it is processed using a polygonal straight skeleton, and the center line segments of the polygonal straight skeleton are filtered. During the filtering process, the relationship of the contour edge 11 is used for filtering. After the filtering is completed, the skeleton vertices 14 and the discarded skeleton line segments are enumerated. After the enumeration is completed, the discarded skeleton line segments are replaced by calculating the score and the replaced skeleton line segments are connected to form a polygonal straight skeleton diagram.
[0087] This method considers "squeezing" the two walls inward at the same speed to obtain the trajectory of the "intersection point" of the wall line segments. Then, based on the shape distribution characteristics of the walls on both sides of the trajectory, the trajectory line segments are calculated, scored, filtered, and replaced to obtain a center line that is aesthetically pleasing and more in line with the architectural design requirements. That is, it can reflect the direction of the plan, and the points on the center line can cover the entire polygon with the smallest possible radius.
[0088] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
Claims
1. A method for extracting the centerline of a building or road plan based on a polygonal straight skeleton, characterized in that, This method includes the following steps: S1. Input the building floor plan data; In step S1, the input building floor plan data is represented as a simple polygon with holes. For curved walls, samples are taken on the curve to obtain polylines. The selection of orthogonal polylines or smooth polylines when connecting the center lines is controlled by the switch option. S2. Perform polygonal straight skeleton processing on the building floor plan data (1); In step S2, the polygonal straight skeleton (1) is made by continuously translating the straight lines containing each side inward along the normal direction at the same speed. When non-adjacent contour edges (11) collide, the edge is split into two segments. Then the connection order of the two polygonal contour edges (11) is changed and skeleton vertices (14) are generated until all contour edges (11) are squeezed to a length of 0. The motion trajectory of the endpoints of all the edges obtained in the above process is the polygonal straight skeleton (1). Among them, the circumferential edge of the simple polygon is the contour edge (11). The vertices on the simple polygon are the contour vertices (12). The sides of a simple polygon formed by the sides and the angle bisectors of the sides are called skeleton sides (13). The point formed by the intersection of the skeleton edges (13) is the skeleton vertex (14). The angle bisector of two adjacent contour vertices (12) is the contour bisector (15); The line connecting the points located inside the simple polygon and used to connect the contour bisector (15) is the internal bisector (16). The internal bisector (16) and the outline bisector (15) form the skeleton edge (13) mentioned above. S3. Perform centerline segment filtering on the polygonal straight skeleton (1); S4. Traverse the selected polygonal straight skeleton (1) and replace each discarded skeleton edge (13) with a polyline to connect the center line segments of all polygonal straight skeletons (1) into a complete polygonal straight skeleton (1) diagram. In step S3, during the screening of centerline segments, the polygonal straight skeleton (1) is screened according to the relationship between the two contour edges (11) of each line segment generated in the polygonal straight skeleton (1); the detailed steps are as follows: S31. Define the direction of the outline edge (11) as a counterclockwise direction around the inner region of the polygon; S32. Define the angle between the direction of the next contour edge (11) along this direction and the direction of the current contour edge (11) as the angle between the contour vertex (12); S33. Determine the concave and convex points and retain the skeleton edge (13) that meets the conditions as the center line segment; The condition for determining a convex point is: if the next contour edge (11) turns to the left, the angle is positive, and the vertex is a convex point; The condition for determining a concave point is: if the next contour edge (11) turns to the right, the angle is negative, and the vertex is a concave point; The skeleton edge (13) that meets the retention conditions is the two corresponding contour edges (11) with a positive angle greater than 90 degrees; In step S4, a vector list is maintained for each skeleton vertex (14) to represent the direction of all center lines that are connected to the skeleton vertex (14) at the current time. All skeleton vertices (14) are enumerated in the order of their formation, and each skeleton vertex (14) that is not on the contour edge (11) is enumerated and the skeleton edge (13) that is discarded is replaced. If the input options do not require orthogonal polylines, the original skeleton edge (13) will still be used for connection; otherwise, the connection method will be determined according to the vector list of the two endpoints of the skeleton edge (13). If the vector list of the target point of the skeleton edge (13) is empty, then calculate the score of each direction v in the vector list of the starting point and the direction vector base_v of the skeleton edge (13), and select the direction with the highest score to connect; The calculation method for the aforementioned score is as follows: If v is parallel or orthogonal to base_v, the score is 1, and the original skeleton edge (13) is directly selected for connection; if the absolute value of the angle between the two contour edges (11) does not exceed 90 degrees, the cosine value of the angle between the two contour edges (11) is set to c, and max(1-c^2,c^2 / 2) is taken as the score. If the value of 1-c^2 is large, it means that the two contour edges (11) are biased to be orthogonal, and v is directly extended to the foot of the perpendicular from the target point to v; If the value of c^2 / 2 is large, it means that the two contour edges (11) are biased in the same direction. At this time, the original skeleton edge (13) is directly selected to connect them. If the absolute value of the angle between the two contour edges (11) exceeds 90 degrees, remember to divide it into c and c < 0, and directly use the original skeleton edge (13) to connect them. If the vector list of the target point of the skeleton edge (13) is not empty, then all combinations of vector lists of the two endpoints v0 and v1 are scored with base_v respectively, and the direction with the highest score is selected for connection; the scoring method is as follows: let the cosine of the angle between vector v0 and the base vector base_v be c0, let the sine of the angle between vector v0 and the base vector base_v be s0; let the cosine of the angle between vector v1 and the base vector base_v be c1, let the sine of the angle between vector v1 and the base vector base_v be s1, if c0 or c1 is close to 1, the score is 4, and the original skeleton edge (13) is directly selected for connection; If there is an angle between the two with an absolute value greater than or equal to 90 degrees, the corresponding vector can be replaced by the perpendicular line of the corresponding vector to ensure that c0 and c1 are both greater than 0, but the corresponding score will be halved. If the signs of s0 and s1 are opposite, the midpoint of the original skeleton side (13) can be directly taken as the perpendicular line of the side with the smaller cosine value and intersect the extension line of the other side at a point. Remember to divide it into the square of the cosine value of the included angle between v1 and v0. If s0 and s1 have the same sign, then the angle between v0 and v1 is used to determine the score. If the absolute angle between the two exceeds 120 degrees, then the score is ((2c0^2-1)^2+(2c1^2-1)^2) / 2, and the original skeleton edge (13) is used to connect them directly. Otherwise, the extensions of v0 and v1 are connected at one point, and the corresponding score is 2sin^2(angle(v0,v1)). After the current skeleton edge (13) is replaced, the vector list of the two endpoints is updated.
Citation Information
Patent Citations
Roof modeling method and device
CN110598331A