A double-guide-line swept surface modeling method based on orthogonal frame

Through the dual guide line sweep surface modeling method based on the orthogonal frame, the problem in the existing technology that dual guide line sweep is difficult to define complex shapes is solved, and high-precision surface modeling and low torsion effects are achieved.

CN118115697BActive Publication Date: 2024-09-06HEFEI JIUSHAO INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410168640.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-06
Publication Date
2024-09-06
Estimated Expiration
2044-02-06

AI Technical Summary

Technical Problem

The existing technology lacks a dual guide line sweeping surface modeling method, cannot effectively define complex shapes, and has deficiencies in modeling accuracy and surface torsion.

Method used

The dual guide line swept surface modeling method based on the orthogonal frame is used. By matching the inflection points and straight segments on the contour line and the guide line, the guide lines are processed segmentally, and the orthogonal frame and section line are constructed for sampling and setting out. to generate a swept surface.

Benefits of technology

It achieves high-precision surface modeling, with perfect fit between the surface and contour lines and low torsion, which avoids folding caused by too dense sampling points and neglect of geometric features caused by too sparse sampling points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118115697B
    Figure CN118115697B
Patent Text Reader

Abstract

The present invention discloses a double guide line swept surface modeling method based on an orthogonal frame, and relates to the technical field of computer three-dimensional modeling. The method comprises: finding the corresponding nearest points and inflection points on two guide lines respectively; performing two segmentations on the two guide lines, wherein the first segmentation is performed according to the inflection points on the two guide lines, and the second segmentation is performed according to the inflection points and the nearest points on the two guide lines; for the guide line segment group under the second segmentation, corresponding sampling points are respectively selected on two guide line segments in the guide line segment group to form a sampling point group; an orthogonal frame is respectively constructed at two sampling points in each sampling point group; a section line is constructed at each sampling point group according to the contour line and the orthogonal frame; for the guide line segment group under the first segmentation, the section lines at each sampling point group are used for lofting to obtain the final swept surface. The present invention provides a double guide line swept surface modeling method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of computer three-dimensional modeling, in particular to a double-guide-line swept surface modeling method based on an orthogonal frame. Background Art

[0002] Sweeping is a method of constructing a 3D model along a guide path. The input of sweeping consists of two parts: one is the contour line; the other is the path line, i.e. the guide line. The surface that the contour line passes through along the guide line is the swept surface. Multiple contours can make the swept surface have different shapes in different segments.

[0003] Free-form surface modeling is an important part of modern industrial computer-aided design, and has been widely and deeply applied in industries such as aircraft, ships, and automobiles. Sweeping is a very core technology in free-form surface modeling, and designers will use this function extensively during the modeling process.

[0004] The prior art discloses almost all modeling methods of single-track sweeping, and does not mention dual-guide-line sweeping. However, dual-guide-line sweeping can better define the shape. Summary of the invention

[0005] In order to overcome the defects in the above-mentioned prior art, the present invention provides a dual guide line swept surface modeling method based on an orthogonal frame, which supports one or more contour lines containing inflection points and straight line segments, supports guide lines containing inflection points and straight line segments, and has high modeling accuracy.

[0006] To achieve the above object, the present invention adopts the following technical solutions, including:

[0007] A double guide line swept surface modeling method based on an orthogonal frame, wherein a swept surface is obtained according to two guide lines and a plurality of contour lines, and specifically comprises the following steps:

[0008] S1, matching several contour lines, and finding corresponding inflection points on several contour lines;

[0009] S2, find the point closest to each contour line on each guide line, that is, find a number of closest points on each guide line;

[0010] S3, matching the two guide lines, and finding the corresponding turning points on the two guide lines respectively;

[0011] S4, two types of segmentation are performed on the two guide lines:

[0012] The first segmentation: according to the inflection points on the two guide lines, the two guide lines are segmented respectively, each guide line is divided into a number of guide line segments, and the two corresponding guide line segments on the two guide lines constitute a guide line segment group, so that a number of guide line segment groups are formed between the two guide lines;

[0013] The second segmentation: segment the two guide lines according to the inflection points and the nearest points on the two guide lines. Each guide line is divided into a number of guide line segments. The two corresponding guide line segments on the two guide lines constitute a guide line segment group, so that a number of guide line segment groups are formed between the two guide lines.

[0014] S5, for each guide line segment group under the first segmentation, record the guide line segment group in which two guide line segments are parallel straight line segments as a parallel straight line group, and project the contour line on the parallel straight line group to the endpoints of the parallel straight line group;

[0015] S6, for each guide line segment group under the second segmentation, respectively select corresponding sampling points on two guide line segments in each guide line segment group, and the two corresponding sampling points on the two guide line segments constitute a sampling point group, so that a plurality of sampling point groups are formed between the two guide lines;

[0016] S7, for each sampling point group, constructing an orthogonal frame at two sampling points in each sampling point group;

[0017] S8, constructing a cross-section line at each sampling point group according to the contour lines on the two guide lines and two orthogonal frames at each sampling point group;

[0018] S9, for each guide line segment group under the first segmentation, using the cross-section lines at each sampling point group to perform lofting in each guide line segment group respectively, to obtain a final swept surface.

[0019] Preferably, in step S5, if there is one contour line on the parallel straight line group, the contour line on the parallel straight line group is projected to the endpoint of the parallel straight line group; if there are multiple contour lines on the parallel straight line group, the contour line closest to the endpoint is projected to the endpoint;

[0020] If two adjacent parallel straight line groups both have contour lines projected at their intersecting endpoints, that is, two contour lines are projected at the intersecting endpoints, the two contour lines are merged to obtain the contour line at the intersecting endpoints.

[0021] Preferably, in step S6, the specific method of selecting the sampling points is as follows:

[0022] If two guide line segments in a guide line segment group are parallel, and there is only one or zero contour lines on the guide line segment group, only the endpoints of the two guide line segments in the guide line segment group are sampled, that is, the endpoints are used as sampling points;

[0023] Otherwise, the corresponding inflection points and nearest points between two guide line segments in the guide line segment group are sampled, the endpoints of the straight line parts of the guide line segments are sampled, and the parts of the guide line segments whose arc length is greater than a% of the total arc length of the guide line are sampled internally.

[0024] Preferably, internal sampling is performed on the portion of the guide line segment whose arc length is greater than a% of the total arc length of the guide line, and the specific method is as follows:

[0025] S61, respectively calculating the ratio of the arc lengths of two guiding line segments in the guiding line segment group to the corresponding total arc length of the guiding line, recording the larger ratio as L2 and the smaller ratio as L1;

[0026] S62, setting the number of internal sampling points to N, and setting an upper limit UB and a lower limit LB of the ratio of the arc length between the sampling points to the total arc length of the guide line;

[0027] S63, calculating the minimum value NL of the number of internal sampling points as the value of L1 / UB rounded up minus 1, and the maximum value NU of the number of internal sampling points as the value of L2 / LB rounded down minus 1;

[0028] S64, if the set number of internal sampling points N is less than the minimum value NL, the number of internal sampling points of the part of the guide line segment is NL; if the set number of internal sampling points N is greater than the maximum value NU, the number of internal sampling points of the part of the guide line segment is NU; otherwise, the number of internal sampling points of the part of the guide line segment is N;

[0029] S65, finally, the internal sampling points are evenly distributed on the part of the guide line segment.

[0030] Preferably, the specific method of step S7 is as follows:

[0031] The two sampling points in the sampling point group are respectively recorded as sampling point a and sampling point b, the orthogonal frame at sampling point a is recorded as frame a, and the orthogonal frame at sampling point b is recorded as frame b;

[0032] The z-axis direction of frame a is the direction from sampling point a to sampling point b, the x-axis direction of frame a is the projection direction of the average direction of the first-order left derivative direction and the first-order right derivative direction at sampling point a on the guide line on the z-axis normal plane, and the y-axis direction of frame a is the direction perpendicular to the z-axis and the x-axis;

[0033] The z-axis direction of frame b is the direction from sampling point b to sampling point a, the x-axis direction of frame b is the projection direction of the average direction of the first-order left derivative and the first-order right derivative at sampling point b on the guide line on the z-axis normal plane, and the y-axis direction of frame b is perpendicular to the z-axis and x-axis.

[0034] Preferably, if the sampling point is the closest point on the guide line, and the z-axis direction of the orthogonal frame at the sampling point is a 0 vector, then the orthogonal frame cannot be constructed at the sampling point;

[0035] If the sampling point is not the nearest point on the guide line, and the z-axis direction at the sampling point is the 0 vector, then the z-axis of the orthogonal frame at the adjacent sampling point is projected onto the x-axis normal plane of the orthogonal frame at the sampling point to obtain the z-axis of the orthogonal frame at the sampling point;

[0036] If the x-axis direction of the orthogonal frame at the sampling point is the 0 vector or the x-axis is parallel to the z-axis, and the sampling point is an inflection point on the guide line, then the orthogonal frame cannot be constructed at the sampling point;

[0037] If the x-axis direction of the orthogonal frame at the sampling point is the 0 vector or the x-axis is parallel to the z-axis, and the sampling point is not an inflection point on the guide line, the position of the sampling point is moved along the guide line and the x-axis of the orthogonal frame at the sampling point is recalculated until the x-axis direction of the orthogonal frame at the sampling point is not the 0 vector and the x-axis is not parallel to the z-axis. If it still fails after multiple moves, the orthogonal frame cannot be constructed at the sampling point.

[0038] Preferably, the specific method of step S8 is as follows:

[0039] Taking the contour line as the initial section line, for each guide line segment group under the first segmentation, determining whether two guide line segments in the guide line segment group are parallel straight line segments;

[0040] If two guide line segments in the guide line segment group are parallel straight line segments, and there is a cross-section line on the guide line segment group, the sampling point group on the guide line segment group is projected using the adjacent cross-section line to obtain the cross-section line at the sampling point group;

[0041] If two guide line segments in a guide line segment group are parallel straight line segments, and there is no cross-section line on the guide line segment group, first use the cross-section lines on the adjacent guide line segment group to perform rigid transformation of the orthogonal frame and scaling transformation along the z-axis to obtain the cross-section line at a point inside the guide line segment group, and then use the obtained cross-section line at a point inside the guide line segment group to perform projection to obtain the cross-section line at the endpoint of the guide line segment group;

[0042] If two guide line segments in the guide line segment group are not parallel straight line segments, the sampling point group on the guide line segment group uses the adjacent section lines to perform rigid transformation of the orthogonal frame and scaling transformation along the z-axis to obtain the section lines at the sampling point group.

[0043] Preferably, if two cross-sectional lines are obtained at the sampling point group through the left and right adjacent cross-sectional lines respectively, the two cross-sectional lines are merged to obtain a new cross-sectional line as the cross-sectional line at the sampling point group.

[0044] Preferably, the specific method of step S1 is as follows:

[0045] S11, respectively calculating the inflection points and parameters on each contour line; the inflection points refer to points on the contour line where the left derivative and the right derivative are in different directions; the parameters include curve parameters and arc length parameters;

[0046] S12, starting from the contour line with the largest number of inflection points, searching for matching inflection points on adjacent contour lines, recording the contour line with the largest number of inflection points as the first line, and recording the adjacent contour line as the second line;

[0047] First round of matching: According to the arc length parameter and the principle of the closest arc length ratio, the inflection points on the second line are matched with the inflection points on the first line respectively; after the first round of matching, the remaining inflection points on the first line that have not been matched are recorded as the remaining inflection points;

[0048] Second round of matching: according to the arc length ratio of the remaining inflection points on the first line between two adjacent matched inflection points, a new inflection point is added to the two corresponding adjacent matched inflection points on the second line, and the remaining inflection point on the first line is matched with the new inflection point on the second line; after the second round of matching, the first line and the second line are matched, that is, the corresponding inflection point is found between the first line and the second line;

[0049] S13, if the number of corresponding inflection points between the contour lines is greater than 1, re-parameterize the curve parameters of the contour lines according to the corresponding inflection points between the contour lines to ensure that the curve parameters of the corresponding inflection points between the contour lines are the same.

[0050] Preferably, the specific method of step S3 is as follows: each guide line is segmented according to the nearest point on each guide line, so that a corresponding guide line segment group is formed between the two guide lines; for each guide line segment group, in accordance with the method of step S11, the inflection points on the two guide line segments in the guide line segment group are calculated respectively, and in accordance with the method of step S12, the inflection points are matched between the two guide line segments, so that a corresponding inflection point is formed between the two guide line segments, and finally a corresponding inflection point is formed between the two guide lines.

[0051] The advantages of the present invention are:

[0052] (1) The present invention provides a dual guide line swept surface modeling method based on an orthogonal frame, which supports one or more contour lines containing inflection points and straight line segments, and supports guide lines containing inflection points and straight line segments.

[0053] (2) The surface modeling method of the present invention has very high accuracy, and the obtained surface and contour line fit perfectly.

[0054] (3) The surface torsion obtained by the surface modeling method of the present invention is low.

[0055] (4) For dual guide line sweeping, too dense sampling points can easily lead to folding of the swept surface, while too sparse sampling points can easily lead to the swept surface ignoring some geometric features. When sampling the guide line, the present invention can ensure that the number of sampling points is sufficient and the distance between the sampling points is not too close, thereby avoiding folding. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 The present invention is a flow chart of a method for modeling a double-guide-line swept surface based on an orthogonal frame.

[0057] Figure 2 Schematic diagram of two guide lines and four contour lines in this embodiment.

[0058] Figure 3 Schematic diagram of inflection point matching between four contour lines in this embodiment.

[0059] Figure 4 Schematic diagram of the closest points on two guide lines in this embodiment.

[0060] Figure 5 Schematic diagram of sampling points on two guide lines in this embodiment.

[0061] Figure 6 Schematic diagram of the orthogonal frame at the sampling points on the two guide lines in this embodiment.

[0062] Figure 7 Schematic diagram of cross-section lines at sampling points on two guide lines in this embodiment.

[0063] Figure 8 Schematic diagram of the swept surface finally obtained in this embodiment. DETAILED DESCRIPTION

[0064] 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.

[0065] Depend on Figure 1 As shown in FIG. 1 , a double guide line swept surface modeling method based on an orthogonal frame is used to obtain a swept surface according to two guide lines and several contour lines, such as Figure 2 As shown, Figure 2 Schematic diagram of two guide lines and four contour lines in this embodiment. The present invention specifically includes the following steps:

[0066] S1, matching several contour lines, and finding corresponding turning points on the several contour lines respectively.

[0067] The specific method is as follows:

[0068] S11, respectively calculating the inflection points and parameters on each contour line. The inflection points refer to the points where the left derivative and the right derivative on the contour line are in different directions; the parameters include curve parameters and arc length parameters.

[0069] S12, starting from the contour line with the largest number of inflection points, searching for matching inflection points on adjacent contour lines, recording the contour line with the largest number of inflection points as the first line, and recording the adjacent contour line as the second line;

[0070] First round of matching: According to the arc length parameter and the principle of the closest arc length ratio, the inflection points on the second line are matched with the inflection points on the first line respectively; after the first round of matching, the remaining inflection points on the first line that have not been matched are recorded as the remaining inflection points;

[0071] Second round of matching: according to the arc length ratio of the remaining inflection points on the first line between two adjacent matched inflection points, a new inflection point is added to the two corresponding adjacent matched inflection points on the second line, and the remaining inflection point on the first line is matched with the new inflection point on the second line; after the second round of matching, the first line and the second line are matched, that is, the corresponding inflection point is found between the first line and the second line;

[0072] In this way, the corresponding inflection points are found in the adjacent contour lines in turn, and the corresponding inflection points are formed between the contour lines, such as Figure 3 As shown, Figure 3 Schematic diagram of inflection point matching between four contour lines in this embodiment.

[0073] S13, if the number of corresponding inflection points between the contour lines is greater than 1, re-parameterize the curve parameters of the contour lines according to the corresponding inflection points between the contour lines to ensure that the curve parameters of the corresponding inflection points between the contour lines are the same.

[0074] S2, find the closest point to each contour line on each guide line, that is, find several closest points on each guide line, such as Figure 4 As shown, Figure 4 Schematic diagram of the closest points on two guide lines in this embodiment.

[0075] S3, matching the two guide lines, and finding the corresponding turning points on the two guide lines. The specific method is as follows:

[0076] Each guide line is segmented according to the nearest point on each guide line, so that a corresponding guide line segment group is formed between the two guide lines. For each guide line segment group, the inflection points on the two guide line segments in the guide line segment group are calculated respectively according to the method of step S11, and the inflection points are matched between the two guide line segments according to the method of step S12, so that a corresponding inflection point is formed between the two guide line segments, and finally a corresponding inflection point is formed between the two guide lines.

[0077] S4, two types of segmentation are performed on the two guide lines:

[0078] The first segmentation: according to the inflection points on the two guide lines, the two guide lines are segmented respectively, each guide line is divided into a number of guide line segments, and the two corresponding guide line segments on the two guide lines constitute a guide line segment group, so that a number of guide line segment groups are formed between the two guide lines;

[0079] The second segmentation: segment the two guide lines separately according to the turning points and the nearest points on the two guide lines. Each guide line is divided into several guide line segments. The corresponding two guide line segments on the two guide lines constitute a guide line segment group, so that several guide line segment groups are formed between the two guide lines.

[0080] S5, for each guide line segment group under the first segmentation, record the guide line segment group in which two guide line segments are parallel straight line segments as a parallel straight line group, and project the contour line on the parallel straight line group to the endpoints of the parallel straight line group.

[0081] If there is one contour line on the parallel straight line group, the contour line on the parallel straight line group is projected to the endpoint of the parallel straight line group; if there are multiple contour lines on the parallel straight line group, the contour line closest to the endpoint is projected to the endpoint.

[0082] If two adjacent parallel straight line groups both have contour lines projected at the intersection endpoints, that is, two contour lines are projected at the intersection endpoints, the two contour lines are merged to obtain the contour line at the intersection endpoint. In the process of merging the contour lines, twisting processing is required.

[0083] S6, for each guide line segment group under the second segmentation, corresponding sampling points are respectively selected on the two guide line segments in each guide line segment group, and the corresponding two sampling points on the two guide line segments constitute a sampling point group, so that a plurality of sampling point groups are formed between the two guide lines.

[0084] For dual guide line sweeping, too dense sampling points can easily cause the swept surface to fold, and too sparse sampling points can easily cause the swept surface to ignore some geometric features. Therefore, when sampling guide lines, it is necessary to ensure that the number of sampling points is sufficient while avoiding too close distances between sampling points.

[0085] The specific method of selecting sampling points is as follows:

[0086] If two guide line segments in the guide line segment group are parallel straight line segments, and there is only one or zero contour lines on the guide line segment group, only the endpoints of the two guide line segments in the guide line segment group are sampled, that is, the endpoints are used as sampling points;

[0087] Otherwise, the corresponding inflection points and the nearest points between the two guide line segments in the guide line segment group are sampled, the endpoints of the straight line parts of the guide line segments are sampled, and the parts of the guide line segments whose arc length is greater than 3% of the total arc length of the guide line are sampled internally.

[0088] The specific method of internally sampling the portion of the guide line segment whose arc length is greater than a% of the total arc length of the guide line is as follows:

[0089] S61, respectively calculating the ratio of the arc lengths of two guiding line segments in the guiding line segment group to the corresponding total arc length of the guiding line, recording the larger ratio as L2 and the smaller ratio as L1;

[0090] S62, setting the number of internal sampling points to N, and setting an upper limit UB and a lower limit LB of the ratio of the arc length between the sampling points to the total arc length of the guide line;

[0091] S63, calculating the minimum value NL of the number of internal sampling points as the value of L1 / UB rounded up minus 1, and the maximum value NU of the number of internal sampling points as the value of L2 / LB rounded down minus 1;

[0092] S64, if the set number of internal sampling points N is less than the minimum value NL, the number of internal sampling points of the part of the guide line segment is NL; if the set number of internal sampling points N is greater than the maximum value NU, the number of internal sampling points of the part of the guide line segment is NU; otherwise, the number of internal sampling points of the part of the guide line segment is N;

[0093] S65, finally, the internal sampling points are evenly distributed on the part of the guide line segment.

[0094] The sampling results are as follows Figure 5 As shown, Figure 5 Schematic diagram of sampling points on two guide lines in this embodiment.

[0095] S7, for each sampling point group, construct an orthogonal frame at two sampling points in each sampling point group, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the orthogonal frame at the sampling points on the two guide lines in this embodiment. The specific method is as follows:

[0096] The two sampling points in the sampling point group are respectively denoted as sampling point a and sampling point b, the orthogonal frame at sampling point a is denoted as frame a, and the orthogonal frame at sampling point b is denoted as frame b.

[0097] The z-axis direction of frame a is the direction from sampling point a to sampling point b, the x-axis direction of frame a is the projection direction of the average direction of the first-order left derivative and the first-order right derivative at sampling point a on the guide line on the z-axis normal plane, and the y-axis direction of frame a is perpendicular to the z-axis and x-axis.

[0098] The z-axis direction of frame b is the direction from sampling point b to sampling point a, the x-axis direction of frame b is the projection direction of the average direction of the first-order left derivative and the first-order right derivative at sampling point b on the guide line on the z-axis normal plane, and the y-axis direction of frame b is perpendicular to the z-axis and x-axis.

[0099] There are four situations that may occur when constructing an orthogonal frame:

[0100] If the sampling point is the nearest point on the guide line, and the z-axis direction of the orthogonal frame at the sampling point is the 0 vector, that is, the two sampling points at the sampling point group coincide, then the orthogonal frame cannot be constructed at the sampling point;

[0101] If the sampling point is not the nearest point on the guide line, and the z-axis direction of the sampling point is the 0 vector, then the z-axis of the orthogonal frame at the adjacent sampling point is projected onto the x-axis normal plane of the orthogonal frame at the sampling point to obtain the z-axis of the orthogonal frame at the sampling point;

[0102] If the x-axis direction of the orthogonal frame at the sampling point is the 0 vector or the x-axis is parallel to the z-axis, and the sampling point is an inflection point on the guide line, then the orthogonal frame cannot be constructed at the sampling point;

[0103] If the x-axis direction of the orthogonal frame at the sampling point is the 0 vector or the x-axis is parallel to the z-axis, and the sampling point is not an inflection point on the guide line, the position of the sampling point is slightly moved along the guide line and the x-axis of the orthogonal frame at the sampling point is recalculated until the x-axis direction of the orthogonal frame at the sampling point is not the 0 vector and the x-axis is not parallel to the z-axis. If it still fails after multiple moves, the orthogonal frame cannot be constructed at the sampling point.

[0104] S8, construct the section line at each sampling point group according to the contour line and the two orthogonal frames at each sampling point group, such as Figure 7 As shown, Figure 7 This is a schematic diagram of the cross-section line at the sampling points on the two guide lines in this embodiment. The specific method is as follows:

[0105] Taking the contour line as the initial section line, for each guide line segment group under the first segmentation, determining whether two guide line segments in the guide line segment group are parallel straight line segments;

[0106] If two guide line segments in the guide line segment group are parallel straight line segments, and there is a cross-section line on the guide line segment group, the sampling point group on the guide line segment group is projected using the adjacent cross-section line to obtain the cross-section line at the sampling point group;

[0107] If two guide line segments in a guide line segment group are parallel straight line segments, and there is no cross-section line on the guide line segment group, first use the cross-section lines on the adjacent guide line segment group to perform rigid transformation of the orthogonal frame and scaling transformation along the z-axis to obtain the cross-section line at a point inside the guide line segment group, and then use the obtained cross-section line at a point inside the guide line segment group to perform projection to obtain the cross-section line at the endpoint of the guide line segment group;

[0108] If two guide line segments in the guide line segment group are not parallel straight line segments, the sampling point group on the guide line segment group uses the adjacent section lines to perform rigid transformation of the orthogonal frame and scaling transformation along the z-axis to obtain the section lines at the sampling point group.

[0109] In the process of constructing the cross-section line, if two cross-section lines are obtained at the sampling point group through the cross-section lines adjacent to the left and right, the two cross-section lines are merged to obtain a new cross-section line as the cross-section line at the sampling point group. The cross-section line merging process needs to be twisted.

[0110] S9, for each guide line segment group under the first segmentation, the cross-section lines at each sampling point group are used to perform lofting in each guide line segment group to obtain the final swept surface, such as Figure 8 shown.

[0111] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A double-guide-line swept surface modeling method based on an orthogonal frame, characterized in that: The swept surface is obtained according to two guide lines and several contour lines, which specifically includes the following steps: S1, matching several contour lines, and finding corresponding inflection points on several contour lines; S2, find the point closest to each contour line on each guide line, that is, find a number of closest points on each guide line; S3, matching the two guide lines, and finding the corresponding turning points on the two guide lines respectively; S4, two types of segmentation are performed on the two guide lines: The first segmentation: according to the inflection points on the two guide lines, the two guide lines are segmented respectively, each guide line is divided into a number of guide line segments, and the two corresponding guide line segments on the two guide lines constitute a guide line segment group, so that a number of guide line segment groups are formed between the two guide lines; The second segmentation: segment the two guide lines according to the inflection points and the nearest points on the two guide lines. Each guide line is divided into a number of guide line segments. The two corresponding guide line segments on the two guide lines constitute a guide line segment group, so that a number of guide line segment groups are formed between the two guide lines. S5, for each guide line segment group under the first segmentation, record the guide line segment group in which two guide line segments are parallel straight line segments as a parallel straight line group, and project the contour line on the parallel straight line group to the endpoints of the parallel straight line group; S6, for each guide line segment group under the second segmentation, respectively select corresponding sampling points on two guide line segments in each guide line segment group, and the two corresponding sampling points on the two guide line segments constitute a sampling point group, so that a plurality of sampling point groups are formed between the two guide lines; S7, for each sampling point group, constructing an orthogonal frame at two sampling points in each sampling point group; S8, constructing a cross-section line at each sampling point group according to the contour lines on the two guide lines and two orthogonal frames at each sampling point group; S9, for each guide line segment group under the first segmentation, using the cross-section lines at each sampling point group to perform lofting in each guide line segment group, to obtain a final swept surface; In step S6, the specific method of selecting the sampling points is as follows: If two guide line segments in a guide line segment group are parallel, and there is only one or zero contour lines on the guide line segment group, only the endpoints of the two guide line segments in the guide line segment group are sampled, that is, the endpoints are used as sampling points; Otherwise, the corresponding inflection points and the nearest points between the two guide line segments in the guide line segment group are sampled, the endpoints of the straight line portion of the guide line segment are sampled, and the portion of the guide line segment whose arc length is greater than a% of the total arc length of the guide line is sampled internally; Internal sampling is performed on the portion of the guide line segment whose arc length is greater than a% of the total arc length of the guide line. The specific method is as follows: S61, respectively calculating the ratio of the arc lengths of two guiding line segments in the guiding line segment group to the corresponding total arc length of the guiding line, recording the larger ratio as L2 and the smaller ratio as L1; S62, setting the number of internal sampling points to N, and setting an upper bound UB and a lower bound LB of the ratio of the arc length between the sampling points to the total arc length of the guide line; S63, calculating the minimum value NL of the number of internal sampling points as the value of L1 / UB rounded up minus 1, and the maximum value NU of the number of internal sampling points as the value of L2 / LB rounded down minus 1; S64, if the set number of internal sampling points N is less than the minimum value NL, the number of internal sampling points of the part of the guide line segment is NL; if the set number of internal sampling points N is greater than the maximum value NU, the number of internal sampling points of the part of the guide line segment is NU; otherwise, the number of internal sampling points of the part of the guide line segment is N; S65, finally, the internal sampling points are evenly distributed on the part of the guide line segment; The specific method of step S1 is as follows: S11, respectively calculating the inflection point and parameters on each contour line; the inflection point refers to a point on the contour line where the left derivative and the right derivative are in different directions; the parameters include curve parameters and arc length parameters; S12, starting from the contour line with the largest number of inflection points, searching for matching inflection points on adjacent contour lines, recording the contour line with the largest number of inflection points as the first line, and recording the adjacent contour line as the second line; First round of matching: According to the arc length parameter and the principle of the closest arc length ratio, the inflection points on the second line are matched with the inflection points on the first line respectively; after the first round of matching, the remaining inflection points on the first line that have not been matched are recorded as the remaining inflection points; Second round of matching: according to the arc length ratio of the remaining inflection points on the first line between two adjacent matched inflection points, a new inflection point is added to the two corresponding adjacent matched inflection points on the second line, and the remaining inflection point on the first line is matched with the new inflection point on the second line; after the second round of matching, the first line and the second line are matched, that is, the corresponding inflection point is found between the first line and the second line; S13, if the number of corresponding inflection points between the contour lines is greater than 1, re-parameterizing the curve parameters of the contour lines according to the corresponding inflection points between the contour lines to ensure that the curve parameters of the corresponding inflection points between the contour lines are the same; The specific method of step S3 is as follows: each guide line is segmented according to the nearest point on each guide line, so that a corresponding guide line segment group is formed between the two guide lines; for each guide line segment group, according to the method of step S11, the inflection points on the two guide line segments in the guide line segment group are calculated respectively, and according to the method of step S12, the inflection points are matched between the two guide line segments, so that a corresponding inflection point is formed between the two guide line segments, and finally a corresponding inflection point is formed between the two guide lines.

2. The method for modeling a double-guide-line swept surface based on an orthogonal frame according to claim 1, characterized in that: In step S5, if there is one contour line on the parallel straight line group, the contour line on the parallel straight line group is projected to the endpoint of the parallel straight line group; if there are multiple contour lines on the parallel straight line group, the contour line closest to the endpoint is projected to the endpoint; If two adjacent parallel straight line groups both have contour lines projected at their intersecting endpoints, that is, two contour lines are projected at the intersecting endpoints, the two contour lines are merged to obtain the contour line at the intersecting endpoints.

3. The method for modeling a double-guide-line swept surface based on an orthogonal frame according to claim 1, characterized in that: The specific method of step S7 is as follows: The two sampling points in the sampling point group are respectively recorded as sampling point a and sampling point b, the orthogonal frame at sampling point a is recorded as frame a, and the orthogonal frame at sampling point b is recorded as frame b; The z-axis direction of frame a is the direction from sampling point a to sampling point b, the x-axis direction of frame a is the projection direction of the average direction of the first-order left derivative direction and the first-order right derivative direction at sampling point a on the guide line on the z-axis normal plane, and the y-axis direction of frame a is the direction perpendicular to the z-axis and the x-axis; The z-axis direction of frame b is the direction from sampling point b to sampling point a, the x-axis direction of frame b is the projection direction of the average direction of the first-order left derivative and the first-order right derivative at sampling point b on the guide line on the z-axis normal plane, and the y-axis direction of frame b is perpendicular to the z-axis and x-axis.

4. The method for modeling a double-guide-line swept surface based on an orthogonal frame according to claim 3, characterized in that: If the sampling point is the nearest point on the guide line, and the z-axis direction of the orthogonal frame at the sampling point is the 0 vector, then the orthogonal frame cannot be constructed at the sampling point; If the sampling point is not the nearest point on the guide line, and the z-axis direction at the sampling point is the 0 vector, then the z-axis of the orthogonal frame at the adjacent sampling point is projected onto the x-axis normal plane of the orthogonal frame at the sampling point to obtain the z-axis of the orthogonal frame at the sampling point; If the x-axis direction of the orthogonal frame at the sampling point is the 0 vector or the x-axis is parallel to the z-axis, and the sampling point is an inflection point on the guide line, then the orthogonal frame cannot be constructed at the sampling point; If the x-axis direction of the orthogonal frame at the sampling point is the 0 vector or the x-axis is parallel to the z-axis, and the sampling point is not an inflection point on the guide line, the position of the sampling point is moved along the guide line and the x-axis of the orthogonal frame at the sampling point is recalculated until the x-axis direction of the orthogonal frame at the sampling point is not the 0 vector and the x-axis is not parallel to the z-axis. If it still fails after multiple moves, the orthogonal frame cannot be constructed at the sampling point.

5. The method for modeling a double-guide-line swept surface based on an orthogonal frame according to claim 1, characterized in that: The specific method of step S8 is as follows: Taking the contour line as the initial section line, for each guide line segment group under the first segmentation, determining whether two guide line segments in the guide line segment group are parallel straight line segments; If two guide line segments in the guide line segment group are parallel straight line segments, and there is a cross-section line on the guide line segment group, the sampling point group on the guide line segment group is projected using the adjacent cross-section line to obtain the cross-section line at the sampling point group; If two guide line segments in a guide line segment group are parallel straight line segments, and there is no cross-section line on the guide line segment group, first use the cross-section lines on the adjacent guide line segment group to perform rigid transformation of the orthogonal frame and scaling transformation along the z-axis to obtain the cross-section line at a point inside the guide line segment group, and then use the obtained cross-section line at a point inside the guide line segment group to perform projection to obtain the cross-section line at the endpoint of the guide line segment group; If two guide line segments in the guide line segment group are not parallel straight line segments, the sampling point group on the guide line segment group uses the adjacent section lines to perform rigid transformation of the orthogonal frame and scaling transformation along the z-axis to obtain the section lines at the sampling point group.

6. The method for modeling a double-guide-line swept surface based on an orthogonal frame according to claim 5, characterized in that: If two cross-sectional lines are obtained at the sampling point group through the left and right adjacent cross-sectional lines, the two cross-sectional lines are merged to obtain a new cross-sectional line as the cross-sectional line at the sampling point group.

Citation Information

Patent Citations

  • Individualized realistic virtual character modeling method based on images

    CN101515374A

  • Free-form surface scanning path planning method based on adaptive sampling

    CN116009477A

  • Curved surface generating method in cad device

    JP1993151319A