Method for determining closed curve direction and opening position in curve lofting

By discrete the closed curve into polylines and calculate the vertex pair group and offset values, the opening points and direction of the curve are automatically adjusted, and the problem of cumbersome and error-prone selection of the closed curve opening points and directions in curve lofting is solved, and efficient and accurate three-dimensional modeling is achieved.

CN119579764APending Publication Date: 2025-03-07POWERCHINA HUADONG ENG CORP LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311144602.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In three-dimensional modeling technology, the selection of the opening points and directions of the closed curve during the curve staking process is cumbersome and prone to errors, resulting in incorrect staking results.

Method used

By discrete the two closed curves into polylines, and set the reference line and adaptation line, calculate the vertex pair group and offset values, automatically adjust the opening point and direction of the adaptation line, and find the opening point and direction corresponding to the minimum offset value.

Benefits of technology

The curve staking operation is simplified, the efficiency of three-dimensional modeling is improved, the accuracy of calculation results in various scenarios is ensured, and the designers are provided with quick means.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579764A_ABST
    Figure CN119579764A_ABST
Patent Text Reader

Abstract

The invention provides a method for determining a closed curve direction and an opening position in curve lofting. The method comprises the following steps: S1, dispersing two closed curves into two polylines; s2, the two polylines are set as a datum line and an adaptive line respectively, and the datum line is a polyline with the direction and the opening position unchanged; the adaptive line is a multi-section line of which the direction and the opening position can be changed to adapt to the reference line; s3, calculating a group of vertex pairs according to the percentage positions of the vertexes of the two polylines; s4, calculating an offset value according to the vertex pair group; s5, changing the opening point or direction of the adaptation line, and repeating the steps S3-S4; and S6, finding an opening point and a direction of the adaptation line corresponding to the minimum deviation value. According to the method, the direction and the opening position of the curve can be automatically adjusted, the lofting operation is simplified, the direction and the opening position obtained through calculation in various scenes are accurate, the precision of the opening position can be adjusted according to actual needs, the efficiency of three-dimensional modeling is improved, and a quick means is provided for designers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of three-dimensional modeling, and in particular relates to a method for determining the direction and opening position of a closed curve in curve lofting. Background Art

[0002] With the widespread application of engineering 3D design technology, more and more cases require modeling through lofting. The operations required for lofting are also the most complicated, requiring the selection of closed curves, the opening points of closed curves, and the direction of closed curves.

[0003] Generally speaking, designers hope that the surface after lofting is as smooth as possible without distortion. In this case, the selection of the opening point and direction of the closed curve is fixed, but the designer still needs to manually select the opening point and direction, which makes the operation cumbersome and it is not easy to select the accurate opening point with the mouse.

[0004] At present, although there are methods to automatically calculate the direction and opening position of closed curves in curve lofting, there are still obvious errors in some common scenarios, resulting in incorrect lofting results. Summary of the invention

[0005] The purpose of the present invention is to provide a method for determining the direction and opening position of a closed curve in curve lofting, so as to improve the efficiency of three-dimensional modeling, reduce the workload of modeling in a human-computer interaction mode, and provide a quick means for designers.

[0006] To this end, the above-mentioned purpose of the present invention is achieved through the following technical solutions: A method for determining the direction and opening position of a closed curve in curve lofting, characterized in that the method comprises the following steps: S1: Discretize two closed curves into two polylines; S2: Set two polylines as the baseline and adaptation line respectively. The reference line is: a polyline with constant direction and opening position; Adaptation lines are: polylines whose direction and opening position change to adapt to the baseline; S3: Calculate a set of vertex pairs based on the percentage positions of the vertices of the two polyline segments; S4: Calculate the offset value based on the vertex pair group; S5: changing the opening point or direction of the adaptation line, and repeating steps S3-S4; S6: Find the opening point and direction of the adaptation line corresponding to the minimum offset value.

[0007] While adopting the above technical solutions, the present invention may also adopt or combine the following technical solutions: As a preferred technical solution of the present invention: in step S1, the discrete accuracy is determined according to the accuracy requirement, and the two curves are discretized into multiple lines.

[0008] As a preferred technical solution of the present invention: the specific steps of step S3 are as follows: S3-1: Any vertex on the baseline and the vertex with the closest percentage position on the adaptation line form a vertex pair, and the vertex pairs formed by all vertices on the baseline are combined into a vertex pair group 1; S3-2: Any vertex on the adaptation line and the vertex with the closest percentage position on the baseline form a vertex pair, and the vertex pairs formed by all vertices on the adaptation line are combined into a vertex pair group 2; S3-3: Merge vertex pair group 1 and vertex pair group 2, and remove duplicates to obtain the final vertex pair group.

[0009] As a preferred technical solution of the present invention: in step S4, the offset value is obtained by the following steps: The square of the distance between each vertex pair in the vertex pair group obtained in step S3 is calculated and the average value is obtained, that is, the offset value between the baseline and the adaptation line is obtained.

[0010] As a preferred technical solution of the present invention: the specific steps of step S5 are as follows: The opening point of the adaptation line is changed to each vertex on the adaptation line in turn, and steps S3-S4 are repeated to obtain the offset value; Furthermore, after reversing the direction of the adaptation line, the opening point of the adaptation line is changed to each vertex on the adaptation line in sequence again, and steps S3-S4 are repeated to obtain the offset value.

[0011] As a preferred technical solution of the present invention: in step S6, according to the offset values ​​at each opening point and direction of the adaptation line obtained in step S5, the opening point and direction of the adaptation line when the offset value is minimum are found, which are the opening point and direction required for curve lofting.

[0012] The present invention provides a method for determining the direction and opening position of a closed curve in curve lofting, which can automatically adjust the direction and opening position of the curve, simplify the operation during lofting, and the direction and opening position calculated in various scenarios are relatively accurate. The accuracy of the opening position can be adjusted according to actual needs, thereby improving the efficiency of three-dimensional modeling and providing a quick means for designers. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 The present invention provides a flow chart of a method for determining the direction and opening position of a closed curve in curve lofting.

[0014] Figure 2 This is the result diagram after the closed curve is discretized.

[0015] Figure 3 To determine the resulting graph of a certain vertex pair.

[0016] Figure 4 Resulting graph of vertex pairs and offset values ​​determined to fit the line in various directions and opening points.

[0017] Figure 5 The diagram is a model diagram of the lofting after the closed curve direction and opening position are determined by the method provided by the present invention. DETAILED DESCRIPTION

[0018] The present invention is further described below in conjunction with the accompanying drawings and embodiments, but they are not intended to limit the present invention.

[0019] In this embodiment, closed curve 1 is a circle with a radius of 5 (the opening position is in the positive direction of the X-axis), closed curve 2 is a square with a side length of 10, and the distance between the two closed curves is 10.

[0020] According to the method for determining the direction and opening position of a closed curve in curve lofting of the present invention, the method mainly comprises the following steps: S1: Determine the discrete accuracy according to the accuracy requirements and discretize the two closed curves into two polylines; like Figure 2 As shown, the maximum discrete step of closed curve 1 is 1.0, and the maximum angle is Π / 4; The maximum discrete step of closed curve 2 is 1.0, and the maximum angle is Π / 4.

[0021] S2: setting the two polylines in step S1 as the baseline and the adaptation line respectively; The baseline refers to a polyline whose direction and opening position remain unchanged, and the adaptation line refers to a polyline whose direction and opening position change to adapt to the baseline.

[0022] In this embodiment, closed curve 1 is set as the reference line, and closed curve 2 is set as the adaptation line.

[0023] S3: Calculate a set of vertex pairs based on the percentage positions of the vertices of the two polyline segments; Specifically, the steps are as follows: S3-1: Any vertex on the baseline and the vertex with the closest percentage position on the adaptation line form a vertex pair, and the vertex pairs formed by all vertices on the baseline are combined into a vertex pair group 1; S3-2: Similarly, any vertex on the adaptation line and the vertex with the closest percentage position in the baseline form a vertex pair, and the vertex pairs formed by all vertices on the adaptation line are combined into a vertex pair group 2; S3-3: merge vertex pair group 1 and vertex pair group 2, and remove duplicates to obtain the final vertex pair group; In this embodiment, the vertex pairs calculated are as follows: Figure 3 shown.

[0024] S4: Calculate the offset value based on the vertex pair group; Specifically, the steps are as follows: The square of the distance between each vertex pair in the vertex pair group obtained in step S3 is calculated and the average value is obtained, that is, the offset value between the baseline and the adaptation line is obtained.

[0025] S5: changing the opening point or direction of the adaptation line, and repeating steps S3-S4; Specifically, the steps are as follows: The opening point of the adaptation line is changed to each vertex on the adaptation line in turn, and steps S3-S4 are repeated to obtain the offset value; After reversing the direction of the adaptation line, the opening points of the adaptation line are changed to the vertices on the adaptation line in turn, and steps S3-S4 are repeated to obtain the offset value.

[0026] In this embodiment, the calculated offset value is as follows: Figure 4 shown.

[0027] S6: Finally, when the offset value is the smallest, the opening point and direction of the adaptation line are found, which are the opening point and direction required for curve lofting.

[0028] In the embodiment, the minimum offset value is Figure 4 The part marked by the black frame.

[0029] In this embodiment, the result after lofting the opening point and direction determined by the above method is as follows: Figure 5 shown.

[0030] In summary, after the above steps, the rapid lofting of a closed curve can be achieved without manually setting the opening point and direction. The method provided by the present invention can automatically adjust the direction and opening position of a closed curve, simplify the operation during lofting, and the direction and opening position calculated in various scenarios are relatively accurate. Moreover, the accuracy of the opening position can be adjusted according to actual needs, thereby improving the efficiency of three-dimensional modeling, providing designers with a quick means, and is a powerful tool for three-dimensional design.

[0031] According to the description and drawings of the present invention, designers can easily use the method for determining the direction and opening position of a closed curve in curve lofting of the present invention, and can produce the positive effects recorded in the present invention.

[0032] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for determining the direction and opening position of a closed curve in curve lofting, characterized in that: The determination method comprises the following steps: S1: Discretize two closed curves into two polylines; S2: Set two polylines as the baseline and adaptation line respectively. The reference line is: a polyline with constant direction and opening position; Adaptation lines are: polylines whose direction and opening position change to adapt to the baseline; S3: Calculate a set of vertex pairs based on the percentage positions of the vertices of the two polyline segments; S4: Calculate the offset value based on the vertex pair group; S5: changing the opening point or direction of the adaptation line, and repeating steps S3-S4; S6: Find the opening point and direction of the adaptation line corresponding to the minimum offset value.

2. The method for determining the direction and opening position of a closed curve in curve lofting according to claim 1, characterized in that: In step S1, the discretization accuracy is determined according to the accuracy requirement, and the two curves are discretized into polylines.

3. The method for determining the direction and opening position of a closed curve in curve lofting according to claim 1, characterized in that: The specific steps of step S3 are as follows: S3-1: Any vertex on the baseline and the vertex with the closest percentage position on the adaptation line form a vertex pair, and the vertex pairs formed by all vertices on the baseline are combined into a vertex pair group 1; S3-2: Any vertex on the adaptation line and the vertex with the closest percentage position on the baseline form a vertex pair, and the vertex pairs formed by all vertices on the adaptation line are combined into a vertex pair group 2; S3-3: Merge vertex pair group 1 and vertex pair group 2, and remove duplicates to obtain the final vertex pair group.

4. The method for determining the direction and opening position of a closed curve in curve lofting according to claim 1, characterized in that: In step S4, the offset value is obtained by the following steps: The square of the distance between each vertex pair in the vertex pair group obtained in step S3 is calculated and the average value is obtained, that is, the offset value between the baseline and the adaptation line is obtained.

5. The method for determining the direction and opening position of a closed curve in curve lofting according to claim 1, characterized in that: The specific steps of step S5 are as follows: The opening point of the adaptation line is changed to each vertex on the adaptation line in turn, and steps S3-S4 are repeated to obtain the offset value; After reversing the direction of the adaptation line, the opening points of the adaptation line are changed to the vertices on the adaptation line in turn, and steps S3-S4 are repeated to obtain the offset value.

6. The method for determining the direction and opening position of a closed curve in curve lofting according to claim 1, characterized in that: In step S6, according to the offset values ​​at each opening point and direction of the adaptation line obtained in step S5, the opening point and direction of the adaptation line when the offset value is minimum are found, which are the opening point and direction required for curve lofting.