Three-dimensional model adjustment method, device, equipment and storage medium
Through the automated three-dimensional model adjustment method, the adjustment process in the prior art is time-consuming, labor-intensive and inaccurate, and a three-dimensional model adjustment with higher accuracy and efficiency is achieved.
Patent Information
- Application Number
- CN202111413096.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-11-25
AI Technical Summary
In the prior art, the adjustment of the three-dimensional model is too limited, time-consuming and labor-intensive, and it is difficult to accurately determine the adjustment position through naked eyes, resulting in unsatisfactory adjustment results.
A three-dimensional model adjustment method is provided, which automatically adjusts surface segmentation and wiring in the three-dimensional model in response to adjustment type selection and area selection operations to improve adjustment accuracy. The specific steps include determining the adjustment type, determining the target area, adjusting the edges in the target area according to the adjustment type, and determining the adjusted edge position by optimizing the vertex sequence.
The accuracy and efficiency of three-dimensional model adjustment is improved, the time and errors of manual adjustment are reduced, and the adjustment results are more accurate and meet user needs.
Smart Images

Figure CN114092676B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of software tool application, and in particular to a method, device, equipment and storage medium for adjusting a three-dimensional model. Background Art
[0002] Three-dimensional models usually use multiple polygons to simulate smooth surfaces. In order to adjust the smoothness of the surface, it is usually necessary to add or reduce segments on the surface or adjust the position of the edge of the current surface.
[0003] In the prior art, during the adjustment process, a worker usually determines the position of increase, decrease or movement based on naked eye observation, and then manually performs corresponding operations to complete the adjustment.
[0004] However, manual adjustment is too limited and time-consuming and laborious; visual observation to determine the position to be adjusted is not accurate enough, and there may be adjustment errors, and the obtained adjustment results are relatively poor. Summary of the invention
[0005] The purpose of this application is to provide a three-dimensional model adjustment method, device, equipment and storage medium, which can improve the adjustment accuracy and obtain more accurate adjustment results.
[0006] The embodiment of the present application is implemented as follows:
[0007] In one aspect of an embodiment of the present application, a method for adjusting a three-dimensional model is provided, comprising:
[0008] In response to the adjustment type selection operation, determining the adjustment type of the source three-dimensional model, the adjustment types including: surface segment increase, surface segment reduction and surface wiring adjustment;
[0009] In response to a region selection operation on the source three-dimensional model, determining a target region to be adjusted in the source three-dimensional model, wherein the target region includes at least one edge;
[0010] At least one edge in the target area is adjusted according to the adjustment type to obtain an adjusted target three-dimensional model.
[0011] Optionally, the at least one edge includes one or more continuous edges, and the at least one edge in the target area is adjusted according to the adjustment type to obtain an adjusted target three-dimensional model, including:
[0012] If the adjustment type is surface segment increase or surface segment reduction, vertex adjustment is performed on multiple continuous edges in the target area respectively, and a target three-dimensional model is obtained according to the adjusted continuous edges.
[0013] Optionally, vertices of multiple continuous edges in the target area are adjusted respectively, and a target three-dimensional model is obtained according to the adjusted continuous edges, including:
[0014] Determine a continuous edge set according to the target area, wherein the continuous edge set includes at least one continuous edge;
[0015] Get multiple vertices of a target continuous edge in the continuous edge set, where the target continuous edge is any continuous edge in the continuous edge set;
[0016] Arrange multiple vertices in sequence to determine a vertex sequence, where the vertex sequence includes the position coordinates of each vertex;
[0017] Optimize the continuous edges passing through each vertex in the vertex sequence to obtain an optimized vertex sequence;
[0018] Determine the position of the adjusted continuous edge corresponding to the target continuous edge according to the optimized vertex sequence;
[0019] The source three-dimensional model is adjusted according to the positions of the adjusted continuous edges to obtain a target three-dimensional model.
[0020] Optionally, determining the position of the adjusted continuous edge corresponding to the target continuous edge according to the optimized vertex sequence includes:
[0021] Determine the position of each vertex according to the optimized vertex sequence;
[0022] The position of the adjusted continuous edge corresponding to the target continuous edge is determined according to the position of each vertex.
[0023] Optionally, continuous edges passing through each vertex in the vertex sequence are optimized to obtain an optimized vertex sequence, including:
[0024] Determine a set of target vertices based on continuous edges passing through anchor points in the vertex sequence, the anchor points being vertices determined in response to the selection operation;
[0025] Generate a target Bezier curve based on the target vertex set;
[0026] Adjust the control points on the target Bezier curve to determine the adjusted auxiliary curve;
[0027] Based on the adjustment type and the adjusted auxiliary curve, the auxiliary curve is segmented to determine a set of segmentation point coordinates;
[0028] The segmentation point coordinate set is used as the optimized vertex sequence.
[0029] Optionally, adjusting the control points on the target Bezier curve to determine an adjusted auxiliary curve includes:
[0030] Determine the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex according to the target vertex of the target Bezier curve and the control point corresponding to the target vertex;
[0031] Determine the coordinates of the control points based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex;
[0032] Based on the coordinates of the control points, the adjusted auxiliary curve is determined.
[0033] Optionally, based on the adjustment type and the adjusted auxiliary curve, the auxiliary curve is segmented to determine a set of segmentation point coordinates, including:
[0034] If the adjustment type is surface segmentation addition, the coordinates of the vertex to be added and the adjusted vertex in the vertex sequence are determined according to the coordinates of each vertex in the vertex sequence;
[0035] The segmentation point coordinate set is determined according to the coordinates of the vertex to be added and the coordinates of the adjusted vertex.
[0036] Optionally, based on the adjustment type and the adjusted auxiliary curve, the auxiliary curve is segmented to determine a set of segmentation point coordinates, including:
[0037] If the adjustment type is surface segment reduction, the coordinates of the vertices to be deleted and the adjusted vertices in the vertex sequence are determined according to the coordinates of each vertex in the vertex sequence;
[0038] The segmentation point coordinate set is determined according to the coordinates of the vertex to be deleted and the coordinates of the adjusted vertex.
[0039] Optionally, adjusting at least one edge in the target area according to the adjustment type to obtain an adjusted target three-dimensional model includes:
[0040] If the adjustment type is surface routing adjustment, a continuous edge set is determined and an anchor point set is established according to the target area, wherein the continuous edge set includes at least one group of continuous edges, and the anchor point set includes at least two anchor points, each anchor point being a vertex in the target area;
[0041] Arrange the anchor point set in sequence to determine the vertex sequence;
[0042] Adjust the vertex sequence to obtain an adjusted vertex sequence;
[0043] Determine the positions of the adjusted continuous edges according to the adjusted vertex sequence;
[0044] The source three-dimensional model is adjusted according to the positions of the adjusted continuous edges to obtain a target three-dimensional model.
[0045] Optionally, determining a continuous edge set and establishing an anchor point set according to the target area respectively includes:
[0046] Determine continuous edges in the target region;
[0047] Determine a continuous edge set based on the continuous edges;
[0048] Create an anchor point set based on the vertices of continuous edges.
[0049] Optionally, determining positions of adjusted continuous edges according to the adjusted vertex sequence includes:
[0050] generating a target Bezier curve based on the adjusted vertex sequence;
[0051] Adjust the control points of the target Bezier curve to determine the adjusted auxiliary curve;
[0052] Perform curve segmentation on the auxiliary curve and determine the segmentation point coordinate set;
[0053] The positions of the adjusted continuous edges are determined based on the set of segmentation point coordinates.
[0054] Optionally, the control points of the target Bezier curve are adjusted to determine an adjusted auxiliary curve, including:
[0055] Determine the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex according to the target vertex of the target Bezier curve and the control point corresponding to the target vertex;
[0056] Determine the coordinates of the control points based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex;
[0057] Based on the coordinates of the control points, the adjusted auxiliary curve is determined.
[0058] Optionally, the vertex sequence is adjusted to obtain an adjusted vertex sequence, including:
[0059] Determine the target adjustment method according to the sub-adjustment type, which includes: continued extension adjustment and retained side length division;
[0060] The vertex sequence is adjusted based on the target adjustment method to obtain an adjusted vertex sequence.
[0061] In another aspect of an embodiment of the present application, there is provided a three-dimensional model adjustment device, comprising: a response module, an adjustment module;
[0062] A response module, for determining the adjustment type of the source three-dimensional model in response to the adjustment type selection operation, the adjustment types including: surface segment increase, surface segment reduction and surface wiring adjustment;
[0063] The response module is further used to determine a target area to be adjusted in the source three-dimensional model in response to the area selection operation in the source three-dimensional model, wherein the target area includes at least one edge;
[0064] The adjustment module is used to adjust at least one edge in the target area according to the adjustment type to obtain an adjusted target three-dimensional model.
[0065] Optionally, the adjustment module is specifically used to adjust the vertices of multiple continuous edges in the target area respectively if the adjustment type is surface segment increase or surface segment reduction, and obtain the target three-dimensional model according to the adjusted continuous edges.
[0066] Optionally, an adjustment module is specifically used to determine a continuous edge set based on a target area, the continuous edge set including at least one continuous edge; obtain multiple vertices of a target continuous edge in the continuous edge set, the target continuous edge being any continuous edge in the continuous edge set; sequentially arrange the multiple vertices to determine a vertex sequence, the vertex sequence including the position coordinates of each vertex; optimize the continuous edges passing through each vertex in the vertex sequence to obtain an optimized vertex sequence; determine the position of an adjusted continuous edge corresponding to the target continuous edge based on the optimized vertex sequence; and adjust the source three-dimensional model based on the position of the adjusted continuous edge to obtain a target three-dimensional model.
[0067] Optionally, the adjustment module is specifically used to determine the position of each vertex according to the optimized vertex sequence; and determine the position of the adjusted continuous edge corresponding to the target continuous edge according to the position of each vertex.
[0068] Optionally, the adjustment module is specifically used to determine a target vertex set based on continuous edges passing through anchor points in a vertex sequence, where the anchor points are vertices determined in response to a selection operation; generate a target Bezier curve based on the target vertex set; adjust control points on the target Bezier curve to determine an adjusted auxiliary curve; perform curve segmentation on the auxiliary curve based on the adjustment type and the adjusted auxiliary curve to determine a segmentation point coordinate set; and use the segmentation point coordinate set as an optimized vertex sequence.
[0069] Optionally, the adjustment module is specifically used to determine the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex based on the target vertex of the target Bezier curve and the control point corresponding to the target vertex; determine the coordinates of the control point based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex; and determine the adjusted auxiliary curve based on the coordinates of the control point.
[0070] Optionally, the adjustment module is specifically used to determine the coordinates of the vertices to be added and the adjusted vertices in the vertex sequence according to the coordinates of each vertex in the vertex sequence if the adjustment type is surface segmentation addition; and determine the segmentation point coordinate set according to the coordinates of the vertices to be added and the coordinates of the adjusted vertices.
[0071] Optionally, the adjustment module is specifically used to determine the coordinates of the vertices to be deleted and the adjusted vertices in the vertex sequence according to the coordinates of each vertex in the vertex sequence if the adjustment type is surface segmentation reduction; and determine the segmentation point coordinate set according to the coordinates of the vertices to be deleted and the coordinates of the adjusted vertices.
[0072] Optionally, the adjustment module is also used to, if the adjustment type is surface wiring adjustment, determine a continuous edge set and establish an anchor point set according to the target area, the continuous edge set includes at least one group of continuous edges, the anchor point set includes at least two anchor points, and each anchor point is a vertex in the target area; sequentially arrange the anchor point set to determine a vertex sequence; adjust the vertex sequence to obtain an adjusted vertex sequence; determine the positions of the adjusted continuous edges according to the adjusted vertex sequence; and adjust the source three-dimensional model according to the positions of each adjusted continuous edge to obtain a target three-dimensional model.
[0073] Optionally, the adjustment module determines continuous edges in the target area; determines a continuous edge set based on the continuous edges; and establishes an anchor point set based on the vertices of the continuous edges.
[0074] Optionally, the adjustment module is specifically used to generate a target Bezier curve based on the adjusted vertex sequence; adjust the control points of the target Bezier curve to determine the adjusted auxiliary curve; segment the auxiliary curve to determine the segmentation point coordinate set; determine the position of the adjusted continuous edge based on the segmentation point coordinate set.
[0075] Optionally, the adjustment module is specifically used to determine the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex based on the target vertex of the target Bezier curve and the control point corresponding to the target vertex; determine the coordinates of the control point based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex; and determine the adjusted auxiliary curve based on the coordinates of the control point.
[0076] Optionally, the adjustment module is further configured to determine a target adjustment method according to a sub-adjustment type, wherein the sub-adjustment types include: continued extension adjustment and retained edge length division; and adjust the vertex sequence based on the target adjustment method to obtain an adjusted vertex sequence.
[0077] In another aspect of an embodiment of the present application, a computer device is provided, including: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the above-mentioned three-dimensional model adjustment method are implemented.
[0078] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned three-dimensional model adjustment method are implemented.
[0079] The beneficial effects of the embodiments of the present application include:
[0080] In a method, device, equipment and storage medium for adjusting a three-dimensional model provided in an embodiment of the present application, the adjustment type of the source three-dimensional model can be determined in response to an adjustment type selection operation, and the adjustment types include: surface segmentation increase, surface segmentation reduction and surface wiring adjustment; in response to an area selection operation in the source three-dimensional model, the target area to be adjusted in the source three-dimensional model is determined, and the target area includes at least one edge; at least one edge in the target area is adjusted according to the adjustment type to obtain the adjusted target three-dimensional model. Among them, through the user's selection operation of the adjustment type, the three-dimensional model can be adjusted accordingly based on different adjustment methods, and no manual adjustment is required during the adjustment process. Based on the area selection operation in the source three-dimensional model, at least one edge in the area can be adjusted, thereby improving the accuracy of the adjustment, and then a more accurate adjustment result can be obtained under the adjustment of a higher-precision adjustment method. Accordingly, after the adjustment, a three-dimensional model that meets the user's needs can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0082] Figure 1 A schematic diagram of an application interface of a three-dimensional model adjustment method provided in an embodiment of the present application;
[0083] Figure 2 A schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0084] Figure 3 Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0085] Figure 4Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0086] Figure 5 A schematic diagram of increasing and decreasing the curved surface segments in the three-dimensional model adjustment method provided in an embodiment of the present application;
[0087] Figure 6 Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0088] Figure 7 Another schematic diagram of increasing and decreasing the curved surface segments in the three-dimensional model adjustment method provided in an embodiment of the present application;
[0089] Figure 8 Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0090] Fig. 9 Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0091] Fig.10 Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0092] Fig.11 A schematic diagram of surface wiring adjustment in a three-dimensional model adjustment method provided in an embodiment of the present application;
[0093] Fig.12 Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0094] Fig.13 Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0095] Fig.14 Another schematic diagram of a flow chart of a method for adjusting a three-dimensional model provided in an embodiment of the present application;
[0096] Fig.15 Another schematic diagram of adjusting the curved wiring in the three-dimensional model adjustment method provided in an embodiment of the present application;
[0097] Fig.16 A schematic diagram of the result of adding curved surface segments in the three-dimensional model adjustment method provided in an embodiment of the present application;
[0098] Fig.17 A schematic diagram of a surface segment reduction result in a three-dimensional model adjustment method provided in an embodiment of the present application;
[0099] Fig.18 A schematic diagram of a curved wiring adjustment result in a three-dimensional model adjustment method provided in an embodiment of the present application;
[0100] Fig.19 A schematic diagram of the structure of a three-dimensional model adjustment device provided in an embodiment of the present application;
[0101] Fig. 20 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0102] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0103] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0104] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0105] In the description of the present application, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0106] It should be noted that a three-dimensional model is usually a smooth surface simulated by multiple polygons, and then a three-dimensional model is obtained by multiple surfaces. In a three-dimensional model, each polygon is a plane. When the number of polygons is dense enough and the angle between adjacent polygons is changed in a certain pattern, a nearly smooth surface can be simulated. In three-dimensional software such as AutodeskMaya / Autodesk 3ds Max / Blender, taking a quadrilateral as an example, the horizontal edge is called the horizontal edge, and the vertical edge is called the vertical edge. The denser the vertical and horizontal edges are, the smoother the simulated surface is. If they are too sparse, the surface will look angular. However, during the operation of the computer, each polygon will occupy a certain amount of computing resources. Therefore, on a surface with the same curvature, the angle between polygons needs to be as average as possible, that is, the spacing between the vertical and horizontal edges needs to be as average as possible, so as to maximize the use of each polygon and obtain a three-dimensional model that meets user needs.
[0107] In order to achieve the adjustment and optimization of the above three-dimensional model, there are mainly three processing methods:
[0108] (1) Surface segmentation increases
[0109] Specifically, a new longitudinal or transverse edge may be inserted between two adjacent parallel longitudinal or transverse edges in the area to be adjusted, the positions of all longitudinal or transverse edges in the area may be adjusted to make their distribution as even as possible, and the height fluctuations of the surface may be adjusted according to the curvature of the surface.
[0110] (2) Surface segment reduction
[0111] Specifically, a vertical edge or horizontal edge of the surface in the area to be adjusted may be deleted, the positions of all vertical edges or horizontal edges in the area may be adjusted to make their distribution as even as possible, and the height fluctuations of the surface may be adjusted according to the curvature of the surface.
[0112] (3) Surface wiring adjustment
[0113] Specifically, it can be done by moving the vertices on the surface so that the angles between the polygons on the surface tend to be uniform.
[0114] In the prior art, the above three adjustment and optimization methods and their existing defects are specifically as follows:
[0115] (1) For surface segmentation increase
[0116] When adding segments to a surface, it is necessary to add a segment between two adjacent parallel vertical and horizontal edges, which will cause an uneven change in the original polygon density. For example, the spacing between the original four horizontal edges of the surface is 1, 1, 1. If a horizontal edge is added in the middle, the spacing between the five horizontal edges will become 1, 0.5, 0.5, 1. After that, the spacing between each parallel horizontal edge needs to be adjusted to make it as close to 0.75, 0.75, 0.75, 0.75 as possible, and the ups and downs of each curve need to be adjusted by eye to make the surface as close to the original curvature as possible. However, because the adjustment needs to be judged by the naked eye, the smoothness of the surface cannot be ensured, and wavy ups and downs may be caused. In addition, manual operation is extremely inefficient.
[0117] (2) For surface segmentation reduction
[0118] When reducing the segmentation of a surface, it is necessary to delete one of the vertical and horizontal edges, and then move the adjacent vertical and horizontal edges to average the polygon density; or, first move the vertical and horizontal edges adjacent to the vertical and horizontal edges to be deleted closer to the vertical and horizontal edges to be deleted, and then delete the vertical and horizontal edges, and adjust the ups and downs of each curve by eye to make the surface as close to the original curvature as possible. Both of the above adjustment methods will inevitably change the curvature of the original surface and will take a lot of time to make it close to the original surface curvature. Therefore, the existing technology cannot conveniently adjust the number of segments in the surface flexibly, quickly and accurately while maintaining the original surface curvature.
[0119] (3) Adjustment of curved wiring
[0120] It is necessary to use the naked eye to judge the vertices that are undulating or not smooth enough, and then manually adjust the vertices. Because it requires manual operation by the naked eye, it is time-consuming and labor-intensive, and the effect is not ideal.
[0121] In view of the above-mentioned defects in the prior art, the three-dimensional model adjustment method provided in the embodiments of the present application can effectively solve the above-mentioned defects.
[0122] The following is a detailed explanation of the application interface of the three-dimensional model adjustment method provided in the embodiment of the present application.
[0123] Figure 1 For a schematic diagram of the application interface of the three-dimensional model adjustment method provided in the embodiment of the present application, please refer to Figure 1 The interface can be provided by a terminal device, wherein the terminal device can be a computer, a tablet computer, a mobile phone, a dedicated electronic device, and other computer devices, which are not specifically limited here. The interface can be an interface within an application in the terminal device, wherein the application can be an application in a game software, an application in a tool software, etc., which are not specifically limited here.
[0124] Optionally, the interface may include at least controls corresponding to the adjustment type, for example, controls corresponding to increasing surface segments, controls corresponding to decreasing surface segments, and controls corresponding to surface wiring adjustment. The controls corresponding to increasing surface segments and controls corresponding to decreasing surface segments may be the same, for example, both are controls for increasing and decreasing surface segments, just as Figure 1 as shown in .
[0125] Optionally, for each control, there may be multiple optional sub-controls. For example, for the surface segment increase and decrease control and the control corresponding to the surface wiring adjustment, the "continue extension" option can be selected. When adjusting the surface wiring, the "keep edge length" option can also be selected, etc., which is not limited here. In addition, each control can also be associated with a preset example image display. In the surface segment increase and decrease control, sub-controls corresponding to the surface segment increase and surface segment decrease can also be set separately, and no specific restrictions are made here.
[0126] Among them, "Keep side length" can be used to choose whether to keep the ratio of the original side length during the adjustment process; "Continue extension" can be used to continue the angle of the extended side adjacent to the two end points of the selected continuous side.
[0127] It should be noted that Figure 1 The interface shown in is only a feasible example. In actual application, the interface settings and the layout of controls can be set accordingly according to the actual needs of the user, and are not limited to this.
[0128] The specific implementation process of the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0129] Figure 2 For a flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Figure 2 , the adjustment method of the three-dimensional model includes:
[0130] S110: In response to the adjustment type selection operation, determining an adjustment type for the source three-dimensional model.
[0131] Among them, the adjustment types include: surface segment increase, surface segment reduction and surface wiring adjustment.
[0132] Optionally, the selection operation may specifically be a user selection operation on a control corresponding to an adjustment type in the interface, for example, mouse key selection, touch screen selection, etc., or an operation determined according to a preset generation instruction, which is not specifically limited here.
[0133] Optionally, based on a selection operation on an adjustment type, an adjustment type for the source three-dimensional model may be determined, wherein the source three-dimensional model may specifically be a three-dimensional model that has not been adjusted.
[0134] For the above three different adjustment types, the adjustment methods for executing the above three-dimensional model are also different.
[0135] S120: In response to the region selection operation on the source three-dimensional model, determine a target region to be adjusted in the source three-dimensional model.
[0136] The target area includes at least one edge.
[0137] Optionally, the area selection operation may specifically be a user's selection of a certain area of the source three-dimensional model, for example, a specific surface, a polygon, or an edge may be selected, and no specific limitation is made herein.
[0138] Optionally, the target area to be adjusted in the source three-dimensional model determined based on the area selection operation includes at least one edge, which is also a horizontal edge or a vertical edge in the three-dimensional model, which is not limited here.
[0139] S130: adjusting at least one edge in the target area according to the adjustment type to obtain an adjusted target three-dimensional model.
[0140] Optionally, after determining the target area, at least one edge in the target area can be adjusted according to the adjustment type, specifically all the longitudinal edges or all the transverse edges in the area, or one or more of them can be selected for adjustment based on preset rules. No specific restrictions are made here, and the selected edges can be set according to actual needs.
[0141] Optionally, in the actual adjustment process, the adjustment may be performed multiple times in sequence, for example, one edge may be adjusted each time, or multiple edges may be adjusted at one time, so as to obtain an adjusted target three-dimensional model.
[0142] The target three-dimensional model is a three-dimensional model obtained after the source three-dimensional model is adjusted as described above.
[0143] In a method for adjusting a three-dimensional model provided in an embodiment of the present application, the adjustment type of the source three-dimensional model can be determined in response to an adjustment type selection operation, and the adjustment types include: surface segmentation increase, surface segmentation reduction, and surface wiring adjustment; in response to an area selection operation in the source three-dimensional model, the target area to be adjusted in the source three-dimensional model is determined, and the target area includes at least one edge; at least one edge in the target area is adjusted according to the adjustment type to obtain an adjusted target three-dimensional model. Among them, through the user's selection operation of the adjustment type, the three-dimensional model can be adjusted accordingly based on different adjustment methods, and no manual adjustment is required during the adjustment process. Based on the area selection operation in the source three-dimensional model, at least one edge in the area can be adjusted, thereby improving the accuracy of the adjustment, and then under the adjustment of the higher-precision adjustment method, a more accurate adjustment result can be obtained. Accordingly, after the adjustment, a three-dimensional model that meets the user's needs can be obtained.
[0144] Optionally, where at least one edge includes multiple continuous edges, at least one edge in the target area is adjusted according to the adjustment type to obtain an adjusted target three-dimensional model, including: if the adjustment type is an increase in surface segmentation or a decrease in surface segmentation, then vertex adjustments are performed on multiple continuous edges in the target area respectively, and the target three-dimensional model is obtained based on the adjusted continuous edges.
[0145] Optionally, the continuous edge may be a plurality of line segments connected end to end and located on the same edge, and these line segments are connected end to end to form an edge.
[0146] Optionally, when it is determined that the adjustment type is surface segment increase or surface segment reduction, the above-mentioned vertex adjustment can be performed, and after the vertex adjustment, adjusted continuous edges can be obtained, and then the target three-dimensional model is determined according to the adjusted continuous edges.
[0147] The specific implementation process of obtaining the target three-dimensional model by the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0148] Figure 3 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Figure 3 , respectively adjust the vertices of multiple continuous edges in the target area, and obtain the target three-dimensional model according to the adjusted continuous edges, including:
[0149] S210: Determine a continuous edge set according to the target area.
[0150] The continuous edge set includes at least one continuous edge.
[0151] Optionally, in the process of determining the continuous edge set, the corresponding continuous edge set can be determined in the target area according to the selection of the target area. The continuous edge set can specifically be multiple continuous edges contained in the target area, and these continuous edges together constitute the continuous edge set.
[0152] Optionally, the continuous edge set may specifically be an independent continuous edge set.
[0153] Optionally, the specific process of determining the above independent continuous edge set is as follows:
[0154] Determine any one of the multiple vertices in the target area as set K, and repeat the following steps with this vertex as the initial vertex: obtain all adjacent edge sets S connected to set K, take the intersection of S and the initial continuous edge set I (wherein the initial continuous edge set is the continuous edge set determined when the user selects the target area) and record it as set A, then set A is the adjacent edges of the vertex on the two sets of continuous edges, transform and obtain the vertices connected to A, and record them as the new vertex set K (that is, update set K), repeat the above steps until the number of edges in set A no longer increases, then set A contains one of the independent sets of continuous edges separated from the two sets of continuous edges.
[0155] The set A obtained based on the above method is an independent continuous edge set.
[0156] S220: Obtain multiple vertices of the target continuous edge in the continuous edge set.
[0157] The target continuous edge is any continuous edge in the continuous edge set.
[0158] Optionally, after determining the above continuous edge set, all vertices connected to the set A may be traversed by utilizing the property that there is only one adjacent edge in the set connected to the endpoints of the continuous edges.
[0159] Optionally, while determining the vertex, it is also possible to determine whether it is an endpoint (that is, the two vertices on the left and right edges of the edge).
[0160] S230: Arrange the multiple vertices in sequence to determine a vertex sequence.
[0161] The vertex sequence may include the position coordinates of each vertex.
[0162] It should be noted that the vertex sequence may record each vertex and the position coordinates of each vertex, and the position coordinates may be specifically represented in the form of three-dimensional coordinate points in space.
[0163] Optionally, after determining multiple vertices, the vertices may be arranged in sequence, and the specific process is as follows:
[0164] Based on the above S230, the above set A (that is, an independent set of continuous edges) and any endpoint in the set A can be obtained. For example: if one of the endpoints in set A is A1, then A1 can be recorded as the first position in set Ad and the following steps are repeated: transform and obtain the adjacent edges of vertex Ad in set A, transform and obtain the vertices connected to the adjacent edges, remove all existing vertices in set Ad, and add the remaining unique vertex to the end of the existing set Ad. Repeat the above steps until Ad contains all vertices connected to all continuous edges in set A, then all vertices in set Ad will be arranged in order starting from A1, and finally the sorted set Ad is used as the vertex sequence.
[0165] S240: Optimize the continuous edges passing through each vertex in the vertex sequence to obtain an optimized vertex sequence.
[0166] Optionally, after determining the above vertex sequence, the continuous edges corresponding to each vertex in the vertex sequence may be optimized to determine an overall optimized vertex sequence.
[0167] S250: Determine the position of the adjusted continuous edge corresponding to the target continuous edge according to the optimized vertex sequence.
[0168] Optionally, after optimizing the vertex sequence, the specific position of the adjusted continuous edge corresponding to the target continuous edge may be determined.
[0169] The position may specifically be the position of each vertex in the optimized vertex sequence as the specific position of the adjusted continuous edge.
[0170] S260: adjusting the source three-dimensional model according to the positions of the adjusted continuous edges to obtain a target three-dimensional model.
[0171] Optionally, after obtaining the position of the adjusted continuous edge, each vertex in the optimized vertex sequence may be connected, thereby adjusting the source three-dimensional model, and using the adjusted model as the target three-dimensional model.
[0172] It should be noted that, in the process of adjusting the continuous edges, multiple continuous edges can be adjusted in sequence, and when all the continuous edges are adjusted, the target three-dimensional model can be obtained.
[0173] Optionally, determining the position of the adjusted continuous edge corresponding to the target continuous edge according to the optimized vertex sequence includes:
[0174] The position of each vertex is determined according to the optimized vertex sequence; and the position of the adjusted continuous edge corresponding to the target continuous edge is determined according to the position of each vertex.
[0175] Optionally, in the process of determining the position of the adjusted continuous edge, the position of each vertex in the optimized vertex sequence can be first determined according to the position of each vertex, and then the position of the adjusted continuous edge corresponding to the target continuous edge is determined according to the position of each vertex. For example, the set of the position of each vertex on the adjusted continuous edge can be used as the position of the adjusted continuous edge.
[0176] In the adjustment method of the three-dimensional model provided in the embodiment of the present application, a continuous edge set can be determined according to the target area, and the continuous edge set includes at least one continuous edge; multiple vertices of the target continuous edge in the continuous edge set are obtained, and the target continuous edge is any continuous edge in the continuous edge set; multiple vertices are sequentially arranged to determine a vertex sequence; the continuous edges passing through each vertex in the vertex sequence are optimized to obtain an optimized vertex sequence; the position of the adjusted continuous edge corresponding to the target continuous edge is determined according to the optimized vertex sequence; the source three-dimensional model is adjusted according to the position of the adjusted continuous edge to obtain the target three-dimensional model. Among them, by determining the vertex sequence and based on the optimization of the vertex sequence, the adjustment of the source three-dimensional model can be realized more quickly and accurately, and then the target three-dimensional model that meets the requirements can be obtained more quickly and accurately, thereby improving work efficiency.
[0177] The specific implementation process of optimizing the vertex sequence in the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0178] Figure 4 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Figure 4 , optimize the continuous edges passing through each vertex in the vertex sequence to obtain the optimized vertex sequence, including:
[0179] S310: Determine a target vertex set based on continuous edges passing through anchor points in the vertex sequence.
[0180] The anchor point is a vertex determined in response to a selection operation.
[0181] Alternatively, the anchor point may be a point selected from a plurality of vertices based on a selection operation of a user.
[0182] Optionally, the target vertex set can be a set of vertex sequences with the least number of continuous edges between anchor points, for example: taking multiple sets as examples, set A (same as above), and other independent continuous edge sets obtained in the same way as set A, such as set B, set C, set D, set E, and the corresponding optimized vertex sequences, that is, set Ad corresponding to set A (same principle for other sets), etc.
[0183] Optionally, Figure 5 This is a schematic diagram of the increase and decrease of the curved surface segment in the adjustment method of the three-dimensional model provided in the embodiment of the present application. Please refer to Figure 4 and Figure 5 .
[0184] The specific execution process is as follows: Take the first and last vertices of set Ad (taking 7 vertices as an example, i.e. A1-A7), i.e. A1 and A7, obtain the two adjacent edges of the two endpoints in set A, convert the adjacent edges into 4 adjacent faces, and then convert them into all the edges that make up these 4 faces, recorded as set T. Obtain all the adjacent edges of endpoints A1 and A7 and remove all the edges contained in set T, convert the remaining edges into a connected vertex set, add set Ad to it, and remove the designated vertex A1 to be optimized, and obtain set R, which includes vertex O (vertex O is the common continuous edge adjacent vertex of endpoints A1, endpoint B1, endpoint C1, endpoint D1 and endpoint E1) and vertices A2-A7. Set R will be used for subsequent topological structure identification. The designated vertex A1 to be optimized can be recorded as set P, and the vertex can be recorded as the first position of set S. The vertices E1-E7 connected to the continuous edge set E can be recorded as set Q. Repeat the following steps: perform edge expansion and intersection determination on sets P, Q, and R to obtain the two vertices on the only edge that intersects with set Q after passing through the least continuous edges from P and the number of edges passed, record the vertices belonging to set Q as the n+1th position of set S, and record the vertices that do not belong to set Q as the nth position of set S and add Enter the set Q, and start from point A1 through 4 edges to touch points E1 and D1. Since E1 belongs to set Q, it is recorded as the 5th in set S. Since D1 does not belong to set Q, it is recorded as the 4th in set S. Then add D1 to set Q, and touch point D1 through 3 edges. Point C1 is recorded as the 3rd in set S and added to set Q. And so on. Repeat the above steps until the number of edges n returned is equal to 1. Then the recorded set S contains vertices A1, B1, C1, D1, and E1 in order. The vertex set S obtained by the above method can be used as the target vertex set.
[0185] Optionally, the specific process of edge expansion and intersection determination for sets P, Q, and R is as follows:
[0186] Initialize the number of edges passed n to 0, and repeat the following steps: transform all adjacent edges of vertex set P and record them as set T, transform all vertices at the other end of the adjacent edges, add these vertices to set P and increase the number of edges passed n by 1, first remove set R from set P to prevent the shortest continuous edge from being identified as a path outside the specified optimization area, then take the intersection of set P and set Q, if the intersection is an empty set, repeat the above steps, if the intersection obtains a unique vertex, then transform to obtain the adjacent edge of the vertex in set T, and return the two vertices at both ends of the edge and the accumulated number of edges n.
[0187] S320: Generate a target Bezier curve based on the target vertex set.
[0188] Optionally, after the obtained vertex set S is used as the target vertex set, a target Bezier curve can be generated based on the target fixed point set. The specific process is as follows:
[0189] Continue to refer to Figure 4 and Figure 5 , get the three-dimensional coordinates of each vertex in the set S in order, create a Bezier curve, set the number of control points on the curve, the position coordinates of each control point and their order to be consistent with the vertices in the set S. You can create a third-order Bezier curve starting from point A1, passing through points B1, C1, D1 in order and ending at point E1.
[0190] It should be noted that the characteristics of the third-order Bezier curve are as follows: there are two control points between every two adjacent vertices on the curve, which are used to determine the position through which the curve passes. The line connecting each vertex and the control point adjacent to it determines the tangent direction of the curve in the three-dimensional space at the vertex, and the distance between the control point and the vertex determines the degree of change in the curvature of the curve when it is away from the vertex. The smaller the distance between the control point and the vertex, the greater the degree of change in curvature after the same arc length on the curve.
[0191] S330: Adjust the control points of the target Bezier curve to determine the adjusted auxiliary curve.
[0192] Optionally, after determining the target Bezier curve, the control points of the curve can be adjusted. Since the distance between the control point and the vertex determines the degree of change in the curvature of the curve when it is away from the vertex, the smaller the distance between the control point and the vertex, the greater the degree of change in curvature after the same arc length on the curve. The adjusted auxiliary curve can be determined by adjusting the control points.
[0193] It should be noted that the determined adjusted auxiliary curve is only the result of theoretical calculation. Therefore, it is necessary to make actual adjustments to the auxiliary interval based on the calculation result, as follows:
[0194] S340: Segment the auxiliary curve based on the adjustment type and the adjusted auxiliary curve, and determine a set of segmentation point coordinates.
[0195] Optionally, after determining the adjusted auxiliary curve, the total arc length a of the auxiliary curve can be calculated. According to the number of vertices n contained in the set S and the number of segments selected in the add or delete segment option, if the segment needs to be increased, the curve is divided into n segments; if the segment needs to be reduced, the curve is divided into n-2 segments. Then, the three-dimensional coordinates of each segmentation point on the curve except the two end points are obtained in sequence and added to the coordinate set Z, which is the segmentation point coordinate set.
[0196] Optionally, different adjustments can be made for different adjustment types, such as increasing or decreasing surface segments. When increasing surface segments, the segmentation point coordinate set can be increased to obtain an increased segmentation point coordinate set; correspondingly, when decreasing surface segments, the segmentation point coordinate set can be decreased to obtain a decreased segmentation point coordinate set.
[0197] S350: Using the segmentation point coordinate set as an optimized vertex sequence.
[0198] Optionally, continue to combine reference Figure 4 and Figure 5 , move the vertex set S starting from the second position to the corresponding coordinates recorded in the coordinate set Z in sequence, that is, move the nth vertex in the set S to the n-1th group of coordinates recorded in the set Z, until the last vertex recorded in the set S is moved, delete the auxiliary curve, and use the vertex set T as the optimized vertex sequence.
[0199] In the adjustment method of the three-dimensional model provided in the embodiment of the present application, the target vertex set can be determined based on the continuous edges passing through the anchor points in the vertex sequence, and the anchor points are the vertices determined in response to the selection operation; the target Bezier curve is generated based on the target vertex set; the control points on the target Bezier curve are adjusted to determine the adjusted auxiliary curve; the auxiliary curve is segmented based on the adjustment type and the adjusted auxiliary curve to determine the segmentation point coordinate set; the segmentation point coordinate set is used as the optimized vertex sequence. Among them, by determining the Bezier curve and adjusting the Bezier curve control points, the segmentation point coordinate set can be determined more accurately, and then the optimization processing of the vertex sequence can be more accurately realized to obtain a more accurate vertex sequence.
[0200] The specific implementation process of determining the adjusted auxiliary curve in the three-dimensional model adjustment method provided in the embodiment of the present application is explained below.
[0201] Figure 6 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Figure 6 , adjust the control points of the target Bezier curve and determine the adjusted auxiliary curve, including:
[0202] S410: Determine the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex according to the target vertex of the target Bezier curve and the control point corresponding to the target vertex.
[0203] Optionally, Figure 7 Another schematic diagram of the surface segment increase and decrease in the three-dimensional model adjustment method provided in the embodiment of the present application, please refer to Figure 6 and Figure 7 , the generated Bezier curve is as follows Figure 7 The vertices A1, B1, C1, D1, and E1 shown in the figure determine the positions they pass through and are controlled by the control point A1. 0 、B1 0 、C1 0 、D1 0 、E1 0 Determine the direction of the tangent line and the rate of change of curvature of the curve at each vertex.
[0204] During the calculation process, we can first calculate the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex. The specific calculation formula is as follows:
[0205] The tangent direction vector of the target Bezier curve at the target vertex:
[0206]
[0207] in, is the tangent direction vector of the curve at the current vertex, is the direction vector from the previous vertex on the curve to the current vertex, L is the direction vector from the current vertex to the next vertex on the curve. 前 is the spatial distance from the previous vertex to the current vertex, L 后 It is the spatial distance from the current vertex to the next vertex.
[0208] It should be noted that the "front and back" in the formula is only used to distinguish the adjacent vertices on both sides of the current vertex, and no spatial restriction is imposed here.
[0209] For example: Figure 7 Let's take the vertex B1 in the figure as an example to explain. Control point B1 0 Point to vertex B1 or B1 to control point B1 1 The direction vector of is the direction vector from vertex A1 to vertex B1, is the direction vector from vertex B1 to vertex C1, L 前 is the spatial distance from vertex A1 to vertex B1, L 后 is the spatial distance from vertex B1 to vertex C1.
[0210] It should be noted that the square of the difference between the distance between the current vertex and the neighboring points on both sides and the total distance is used as the weight coefficient of the direction vector between a neighboring point and the current vertex. The weight coefficients on both sides are multiplied by their direction vectors and then added together to obtain the tangent direction vector of the curve at the current vertex. That is, the closer the current vertex is to a neighboring point, the closer the tangent direction of the curve is to the direction of the line connecting the neighboring point and the current vertex. In addition to the tangent direction of the curve, the distance between the control point and the vertex also needs to be calculated.
[0211] The distance between each control point and the corresponding vertex:
[0212]
[0213] Among them, L 控 is the spatial distance between the current vertex and its front or back control point, θ rad is the direction vector and or The angle in radians is in the range of [0,π]. k is the shortest distance coefficient between the control point and the vertex. According to experience, when the vertex is at both ends of the curve, the value can be 0.2, and when the vertex is in the middle of the curve, the value can be 0.3. 邻 is the spatial distance L between the current vertex and the previous vertex or the next vertex 前 or L 后 .
[0214] For example: Figure 7 Control point B1 in 0 Take the corresponding vertex B1 as an example to explain, L 控 is the distance to be calculated, θ rad is the direction vector and The angle in radians. The current vertex is in the middle of the curve, so k is 0.3, L 邻 is the spatial distance L from vertex A1 to vertex B1 (vertex A3 to vertex D3) 前 .
[0215] It should be noted that when the direction of the control point pointing to the current vertex is closer to the direction of the adjacent vertex pointing to the current vertex, the distance between the control point and the current vertex is closer to the product of k and the distance from the adjacent vertex to the current vertex. When the two are close to perpendicular, the distance between the control point and the current vertex is closer to the distance from the adjacent vertex to the current vertex. Get the direction vector and distance L 控 After that, the specific coordinates of the control points can be calculated.
[0216] S420: Determine the coordinates of the control point based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex.
[0217] Optionally, get the direction vector and distance L 控 After that, the specific coordinates of the control points can be calculated. The specific calculation formula is as follows:
[0218]
[0219]
[0220] Among them, P 控前(x,y,z) is the spatial coordinate of the control point on the side of the previous neighbor of the current vertex, P 控后(x,y,z) is the spatial coordinate of the control point on the side of the adjacent point behind the current vertex, P 顶(x,y,z) is the spatial coordinate of the current vertex, is the normalized direction vector L 控前 With L 控后 is the distance between the control point and the vertex. and They all point from the front to the back, so when calculating the coordinates of the control point, the relative position direction of the control point and the current vertex can be changed according to the front-to-back relationship.
[0221] S430: Determine the adjusted auxiliary curve based on the coordinates of the control points.
[0222] Optionally, when making adjustments, the specific process is as follows:
[0223] Continue to refer to the above Figure 6 as well as Figure 7 , take the first and second vertices of the set S, that is Figure 7Take the vertices A1 and B1 in the optimization, get the edge connecting the two vertices and record it as AB, get the length from point A to point B and record it as L, transform to get the two faces adjacent to the edge AB, and then transform to all the edges that make up these two faces, record it as a set T. Transform to get all the adjacent edges of the endpoint A1 and remove all the edges included in the set T, get the extended edge of point A1 outside the optimization range, if there are more than one extended edge, select the edge with the smallest angle with the edge AB and record it as ABE. Transform to get the vertex at the other end of ABE as the previous adjacent vertex of the current vertex A1, and let L 前 Set the value to 0, set k to 0.2, and substitute into the above formula to calculate the coordinates P of the back control point of vertex A1 控后(x,y,z) , and move the control point to that coordinate. Take the last and second last vertices of set S, namely E1 and D1, and repeat the above steps to adjust the direction of the other end of the curve.
[0224] Optionally, the coordinates of all control points in the middle of the curve may be calculated and adjusted using the above formula to obtain an adjusted auxiliary curve.
[0225] In the adjustment method of the three-dimensional model provided in the embodiment of the present application, the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex can be determined based on the target vertex of the target Bezier curve and the control point corresponding to the target vertex; the coordinates of the control point are determined based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex; and the adjusted auxiliary curve is determined based on the coordinates of the control point. Among them, the adjusted auxiliary curve can be obtained more accurately and quickly through the above calculation method, which improves processing efficiency and accuracy.
[0226] The specific implementation process of determining the adjusted segmentation point coordinate set in the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0227] Figure 8 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Figure 8 , based on the adjustment type, the segmentation point coordinate set is added or deleted to obtain an adjusted segmentation point coordinate set, including:
[0228] S510: If the adjustment type is segmented surface addition, the coordinates of the vertex to be added and the adjusted vertex in the vertex sequence are determined according to the coordinates of each vertex in the vertex sequence.
[0229] Optionally, after determining that the adjustment type is surface segmentation addition, the last and second-last vertices in set S can be obtained, and the edge connecting the two vertices can be converted and a new vertex can be inserted on this edge. The vertex is recorded as set T and the last vertex in set S is replaced by the vertex. The vertex is used as the vertex to be added, and the corresponding coordinates can be determined.
[0230] S520: Determine a segmentation point coordinate set according to the coordinates of the vertex to be added and the coordinates of the adjusted vertex.
[0231] Optionally, after the coordinates of the vertices to be added are determined, the vertices to be added may be added to the vertex sequence to obtain a set of segmentation point coordinates.
[0232] Another specific implementation process of determining the adjusted segmentation point coordinate set in the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0233] Fig. 9 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Fig. 9 , based on the adjustment type, the segmentation point coordinate set is added or deleted to obtain an adjusted segmentation point coordinate set, including:
[0234] S610: If the adjustment type is surface segment reduction, determine the coordinates of the vertex to be deleted and the adjusted vertex in the vertex sequence according to the coordinates of each vertex in the vertex sequence.
[0235] Optionally, after determining that the adjustment type is surface segmentation reduction, the second-to-last vertex in set S can be recorded as set T, and the last and second-to-last vertices can be removed from set S. Specifically, the vertices to be deleted can be determined based on the coordinates of each vertex in the vertex sequence, and the coordinates of the vertex can be determined.
[0236] S620: Determine a set of segmentation point coordinates according to the coordinates of the vertices to be deleted and the coordinates of the adjusted vertices.
[0237] Optionally, after deleting the vertex to be deleted, the coordinates of the vertex to be deleted may be deleted from the coordinates of the adjusted vertex, and then the segmentation point coordinate set is determined.
[0238] The specific implementation process of adjusting the curved wiring in the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0239] Fig.10 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Fig.10 , adjusting at least one edge in the target area according to the adjustment type to obtain an adjusted target three-dimensional model, including:
[0240] S710: If the adjustment type is surface routing adjustment, determine a continuous edge set and establish an anchor point set according to the target area.
[0241] The continuous edge set includes at least one group of continuous edges, the anchor point set includes multiple anchor points, and each anchor point is a vertex in the target area.
[0242] Alternatively, for example, the first and last endpoints of a continuous edge can be used as anchor points. In this case, if the extension is selected, the direction of the curve can be determined according to the edge outside the two endpoints, and the positions of the two control points adjacent to the two endpoints can be determined according to the distance between the two endpoints. If the extension is not selected, the generated curve will be a straight line passing through the two endpoints. In both cases, the generated curves can ignore the positions of other vertices on the continuous edge except the endpoints.
[0243] Optionally, the anchor point may be a point selected by the user. For example, based on the points, lines, surfaces and other elements selected by the user, the vertices contained in these elements may be determined. These vertices are the anchor points. The anchor point set may be denoted as V.
[0244] Optionally, Fig.11 This is a schematic diagram of the surface wiring adjustment in the adjustment method of the three-dimensional model provided in the embodiment of the present application. Please refer to Fig.10 and Fig.11 , the following combination Fig.11 To explain the specific implementation process of surface wiring adjustment.
[0245] S720: Arrange the anchor point set in sequence to determine a vertex sequence.
[0246] Optionally, the multiple vertices obtained may be specifically as follows Fig.11 The set of vertices A1-G1, A2-G2, A3-G3, A4-G4, and A5-G5 shown in , take an arbitrary vertex and record it as set K, and repeat the following steps with this as the initial vertex: obtain all adjacent edge sets S connected to set K, take the intersection of S and I and record it as A, then A is the adjacent edge of the vertex on the two sets of continuous edges, transform and obtain the vertex connected to A, record it as the new vertex set K, repeat the above steps until the number of edges in set A no longer increases, then set A contains one set of independent continuous edges separated from the two sets of continuous edges. (The steps here are similar to the aforementioned S220, and are not repeated here)
[0247] Optionally, after obtaining the above-mentioned anchor points, they can be arranged in sequence to obtain a vertex sequence; the vertex set Ad arranged in sequence is the above-mentioned vertex sequence, and the vertices that do not belong to the anchor point set V are removed from the set except the first and last vertices in Ad, and the remaining vertices are recorded as the anchor point set S, then S only contains the endpoints at both ends of the continuous edge set A and the anchor points located on the continuous edge A, and the vertices in the set S are still arranged in sequence.
[0248] S730: Adjust the vertex sequence to obtain an adjusted vertex sequence.
[0249] Optionally, the vertex sequence may be adjusted to obtain an adjusted vertex sequence. The adjustment may be an optimization adjustment. The specific process may refer to the aforementioned process of optimizing the vertex sequence, which will not be described in detail here.
[0250] S740: Determine positions of adjusted continuous edges according to the adjusted vertex sequence.
[0251] S750: adjusting the source three-dimensional model according to the positions of the adjusted continuous edges to obtain a target three-dimensional model.
[0252] Optionally, the execution process of S250-S260 is similar to the execution process of the aforementioned S750-S750, and is not repeated here.
[0253] In the adjustment method of the three-dimensional model provided in the embodiment of the present application, when the adjustment type is surface wiring adjustment, if the adjustment type is surface wiring adjustment, the continuous edge set is determined according to the target area and the anchor point set is established, the continuous edge set includes at least one group of continuous edges, the anchor point set includes at least two anchor points, and each anchor point is a vertex in the target area; the anchor point set is sequentially arranged to determine the vertex sequence; the vertex sequence is adjusted to obtain the adjusted vertex sequence; the position of the adjusted continuous edges is determined according to the adjusted vertex sequence; the source three-dimensional model is adjusted according to the position of each adjusted continuous edge to obtain the target three-dimensional model. Among them, by determining the vertex sequence and adjusting the vertex sequence, the adjustment of the source three-dimensional model can be realized more quickly and accurately, and then the target three-dimensional model that meets the requirements can be obtained more quickly and accurately, thereby improving work efficiency.
[0254] The specific implementation process of determining the anchor point set in the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0255] Fig.12 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Fig.12 , determine the continuous edge set and establish the anchor point set according to the target area, including:
[0256] S810: Determine continuous edges in the target area.
[0257] Optionally, after the user selects and determines the target area, a corresponding continuous edge may be determined based on elements in the target area, which may be an edge consisting of multiple vertices selected by the user, or multiple edges directly selected by the user, without specific limitation.
[0258] S820: Determine a continuous edge set according to the continuous edges.
[0259] Optionally, after a plurality of continuous edges are determined, a corresponding continuous edge set may be established based on the continuous edges.
[0260] S830: Establish an anchor point set according to the vertices of the continuous edges.
[0261] Optionally, after determining the above continuous edge set, corresponding anchor points can be selected from the areas where these continuous edges are located based on the user's selection operation in these areas, and these anchor points are added to the set to establish a corresponding anchor point set, that is, the above anchor point set V.
[0262] The specific implementation process of adjusting the continuous edges in the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0263] Fig.13 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Fig.13 , generating the adjusted continuous edges corresponding to the target continuous edges according to the adjusted vertex sequence, including:
[0264] S1010: Generate a target Bezier curve based on the adjusted vertex sequence.
[0265] S1020: Adjust the control points of the target Bezier curve to determine the adjusted auxiliary curve.
[0266] S1030: Segment the auxiliary curve and determine a set of segmentation point coordinates.
[0267] S1040: Determine the position of the adjusted continuous edge based on the segmentation point coordinate set.
[0268] Optionally, the above-mentioned process of S1010-S1040 is similar to the execution process of the aforementioned S310-S360. It should be noted that in S1010, the target Bezier curve is generated based on the adjusted vertex sequence, that is, after the adjusted vertex sequence is obtained after the aforementioned adjustment, the target Bezier curve can be obtained based on the vertex sequence; there is no need to perform the edge extension and intersection determination performed in the aforementioned S310-S320.
[0269] Please refer to Fig.11When performing curve segmentation, the user can choose whether to retain the original continuous edge ratio. If retained, the following can be calculated in sequence: Fig.11 As shown, the ratio of the length of each side between A3-B3, B3-C3, ..., F3-G3 to the total length of all sides is AB%, BC%, ..., FG%, and then the curve is divided into n-1 segments with arc lengths of a×AB%, a×BC%, ..., a×FG% in sequence; if not retained, the curve can be divided into n-1 equal segments.
[0270] Another specific implementation process of determining the adjusted auxiliary curve in the three-dimensional model adjustment method provided in the embodiment of the present application is explained in detail below.
[0271] Fig.14 For another flow chart of the method for adjusting the three-dimensional model provided in the embodiment of the present application, please refer to Fig.14 , adjust the control points of the target Bezier curve and determine the adjusted auxiliary curve, including:
[0272] S1110: Determine the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex according to the target vertex of the target Bezier curve and the control point corresponding to the target vertex.
[0273] S1120: Determine the coordinates of the control point based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex.
[0274] S1130: Determine the adjusted auxiliary curve based on the coordinates of the control points.
[0275] Optionally, Fig.15 Another schematic diagram of the surface wiring adjustment in the adjustment method of the three-dimensional model provided in the embodiment of the present application, please refer to Fig.14 and Fig.15 .
[0276] This process is similar to the aforementioned process of S410 - S430 and will not be described in detail here.
[0277] The specific results of increasing the surface segments, reducing the surface segments, and adjusting the surface wiring in the three-dimensional model adjustment method provided in the embodiment of the present application are explained below.
[0278] Fig.16 A schematic diagram of the result of adding curved surface segments in the three-dimensional model adjustment method provided in an embodiment of the present application, Fig.17 This is a schematic diagram of the surface segment reduction result in the three-dimensional model adjustment method provided in the embodiment of the present application. Please refer to Fig.16 , Fig.17 .
[0279] Optionally, after obtaining the continuous edge sets A, E and the vertex set Ad, repeat the following steps: according to the order of vertices in the vertex set Ad, optimize the vertices one by one together with the sets A, E, and Ad outputs, and after optimizing the continuous edges passing through the vertex in the selected area, obtain the newly added or to-be-deleted vertex set T, add the vertices in set T to the set J, repeat the above steps until all vertices in the set Ad are traversed, and obtain the set J of all newly added vertices or the set J of all to-be-deleted vertices in the area to be optimized.
[0280] Optionally, after obtaining the vertex set J, you can add or delete segments according to your choice by performing the following operations: If you want to add segments, connect all vertices in the set J with continuous edges to obtain Fig.17 The effect shown is shown. If you want to delete segments, then transform and obtain all edges between all vertices in set J and record them as set X, transform and obtain all faces adjacent to set X, and finally transform and obtain all edges that make up these faces and record them as set T. Transform and obtain all edges adjacent to the vertices in set J and remove all edges contained in set T from them, so as to obtain adjacent edges connected to the continuous edges to be deleted outside the selected area to be optimized, add these adjacent edges to set X, and remove them from the surface. Finally, remove the vertices in set J from the surface to obtain the following: Fig.17 The effect shown.
[0281] Fig.18 For a schematic diagram of the surface wiring adjustment result in the adjustment method of the three-dimensional model provided in the embodiment of the present application, please refer to Fig.18 .
[0282] Optionally, after completing the adjustment of the continuous edges, set A can be removed from set I. If set I is an empty set, the optimization is completed. If set I is not empty, the adjustment is repeated until set I is empty. Based on the adjustment result, the current adjustment result can be determined as the final wiring adjustment result in response to the user's end operation. Fig.18 The effect shown.
[0283] Optionally, the vertex sequence is adjusted to obtain an adjusted vertex sequence, including:
[0284] According to the sub-adjustment type, a target adjustment method is determined, and the sub-adjustment types include: continued extension adjustment and retained edge length division; the vertex sequence is adjusted based on the target adjustment method to obtain an adjusted vertex sequence.
[0285] Optionally, when the extension adjustment is continued, the control point positions of the endpoints at both ends of the auxiliary curve can be generated adjacent. When the side length adjustment is retained, when the auxiliary curve is divided, the curve can be divided according to the arc length or according to the side length ratio of the original continuous side.
[0286] Optionally, among the above sub-adjustment types, the extension adjustment is also applicable to the segmented addition or segmented adjustment process; the side length retention adjustment is only applicable to the curve wiring adjustment operation.
[0287] The following describes the devices, equipment, storage media, etc. corresponding to the three-dimensional model adjustment method provided in the present application. The specific implementation process and technical effects are described above and will not be repeated below.
[0288] Fig.19 For a schematic diagram of the structure of the three-dimensional model adjustment device provided in the embodiment of the present application, please refer to Fig.19 , a three-dimensional model adjustment device, comprising: a response module 100, an adjustment module 200;
[0289] A response module 100 is used to determine the adjustment type of the source three-dimensional model in response to the adjustment type selection operation, and the adjustment types include: surface segment increase, surface segment reduction and surface wiring adjustment;
[0290] The response module 100 is further configured to determine a target region to be adjusted in the source three-dimensional model in response to a region selection operation in the source three-dimensional model, wherein the target region includes at least one edge;
[0291] The adjustment module 200 is used to adjust at least one edge in the target area according to the adjustment type to obtain an adjusted target three-dimensional model.
[0292] Optionally, the adjustment module 200 is specifically configured to adjust vertices of a plurality of continuous edges in the target area respectively if the adjustment type is surface segment increase or surface segment decrease, and obtain a target three-dimensional model according to the adjusted continuous edges.
[0293] Optionally, the adjustment module 200 is specifically used to determine a continuous edge set based on the target area, the continuous edge set including at least one continuous edge; obtain multiple vertices of the target continuous edge in the continuous edge set, the target continuous edge is any continuous edge in the continuous edge set; sequentially arrange the multiple vertices to determine a vertex sequence, the vertex sequence including the position coordinates of each vertex; optimize the continuous edges passing through each vertex in the vertex sequence to obtain an optimized vertex sequence; determine the position of the adjusted continuous edge corresponding to the target continuous edge according to the optimized vertex sequence; adjust the source three-dimensional model according to the position of the adjusted continuous edge to obtain the target three-dimensional model.
[0294] Optionally, the adjustment module 200 is specifically configured to determine the position of each vertex according to the optimized vertex sequence; and determine the position of the adjusted continuous edge corresponding to the target continuous edge according to the position of each vertex.
[0295] Optionally, the adjustment module 200 is specifically used to determine a target vertex set based on continuous edges passing through anchor points in a vertex sequence, where the anchor points are vertices determined in response to a selection operation; generate a target Bezier curve based on the target vertex set; adjust control points on the target Bezier curve to determine an adjusted auxiliary curve; perform curve segmentation on the auxiliary curve based on the adjustment type and the adjusted auxiliary curve to determine a segmentation point coordinate set; and use the segmentation point coordinate set as an optimized vertex sequence.
[0296] Optionally, the adjustment module 200 is specifically used to determine the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex based on the target vertex of the target Bezier curve and the control point corresponding to the target vertex; determine the coordinates of the control point based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex; and determine the adjusted auxiliary curve based on the coordinates of the control point.
[0297] Optionally, the adjustment module 200 is specifically used to determine the coordinates of the vertices to be added and the adjusted vertices in the vertex sequence according to the coordinates of each vertex in the vertex sequence if the adjustment type is surface segmentation addition; and determine the segmentation point coordinate set according to the coordinates of the vertices to be added and the coordinates of the adjusted vertices.
[0298] Optionally, the adjustment module 200 is specifically used to determine the coordinates of the vertices to be deleted and the adjusted vertices in the vertex sequence according to the coordinates of each vertex in the vertex sequence if the adjustment type is surface segmentation reduction; and determine the segmentation point coordinate set according to the coordinates of the vertices to be deleted and the coordinates of the adjusted vertices.
[0299] Optionally, the adjustment module 200 is also used to, if the adjustment type is surface wiring adjustment, determine a continuous edge set and establish an anchor point set according to the target area, the continuous edge set includes at least one group of continuous edges, the anchor point set includes at least two anchor points, and each anchor point is a vertex in the target area; sequentially arrange the anchor point set to determine a vertex sequence; adjust the vertex sequence to obtain an adjusted vertex sequence; determine the positions of the adjusted continuous edges according to the adjusted vertex sequence; and adjust the source three-dimensional model according to the positions of each adjusted continuous edge to obtain a target three-dimensional model.
[0300] Optionally, the adjustment module 200 determines continuous edges in the target area; determines a continuous edge set based on the continuous edges; and establishes an anchor point set based on the vertices of the continuous edges.
[0301] Optionally, the adjustment module 200 is specifically used to generate a target Bezier curve based on the adjusted vertex sequence; adjust the control points of the target Bezier curve to determine the adjusted auxiliary curve; segment the auxiliary curve to determine the segmentation point coordinate set; and determine the position of the adjusted continuous edge based on the segmentation point coordinate set.
[0302] Optionally, the adjustment module 200 is specifically used to determine the tangent direction vector of the target Bezier curve at the target vertex and the distance between each control point and the corresponding vertex based on the target vertex of the target Bezier curve and the control point corresponding to the target vertex; determine the coordinates of the control point based on the tangent direction vector of the target vertex and the distance between each control point and the corresponding vertex; and determine the adjusted auxiliary curve based on the coordinates of the control point.
[0303] Optionally, the adjustment module 200 is further configured to determine a target adjustment method according to a sub-adjustment type, where the sub-adjustment types include: continued extension adjustment and retained edge length division; and adjust the vertex sequence based on the target adjustment method to obtain an adjusted vertex sequence.
[0304] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0305] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0306] Fig. 20 For a schematic diagram of the structure of the computer device provided in the embodiment of the present application, please refer to Fig. 20 The computer device includes: a memory 300 and a processor 400. The memory 300 stores a computer program that can be run on the processor 400. When the processor 400 executes the computer program, the steps of the above-mentioned three-dimensional model adjustment method are implemented.
[0307] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned three-dimensional model adjustment method are implemented.
[0308] Optionally, the computer device may specifically be the aforementioned terminal device.
[0309] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0310] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0311] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0312] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0313] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0314] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for adjusting a three-dimensional model, characterized in that: include: In response to the adjustment type selection operation, determining the adjustment type of the source three-dimensional model, the adjustment type including: surface segment increase, surface segment reduction and surface wiring adjustment; In response to a region selection operation on the source three-dimensional model, determining a target region to be adjusted in the source three-dimensional model, wherein the target region includes at least one edge; Adjusting at least one edge in the target area according to the adjustment type to obtain an adjusted target three-dimensional model; The step of adjusting at least one edge in the target area according to the adjustment type to obtain an adjusted target three-dimensional model includes: If the adjustment type is surface routing adjustment, a continuous edge set is determined and an anchor point set is established according to the target area, wherein the continuous edge set includes at least one group of continuous edges, and the anchor point set includes at least two anchor points, each anchor point being a vertex in the target area; Arranging the anchor point set in sequence to determine a vertex sequence; Adjusting the vertex sequence to obtain an adjusted vertex sequence; Determine the positions of the adjusted continuous edges according to the adjusted vertex sequence; The source three-dimensional model is adjusted according to the positions of the adjusted continuous edges to obtain the target three-dimensional model.
2. The method according to claim 1, characterized in that in, The at least one edge includes one or more continuous edges, and the at least one edge in the target area is adjusted according to the adjustment type to obtain an adjusted target three-dimensional model, including: If the adjustment type is surface segment increase or surface segment reduction, vertex adjustment is performed on a plurality of continuous edges in the target area respectively, and the target three-dimensional model is obtained according to the adjusted continuous edges.
3. The method according to claim 2, characterized in that The step of respectively adjusting vertices of a plurality of continuous edges in the target area and obtaining the target three-dimensional model according to the adjusted continuous edges includes: Determine a continuous edge set according to the target area, wherein the continuous edge set includes at least one continuous edge; Acquire multiple vertices of a target continuous edge in the continuous edge set, where the target continuous edge is any continuous edge in the continuous edge set; Arrange the plurality of vertices in sequence to determine a vertex sequence, wherein the vertex sequence includes the position coordinates of each vertex; Optimizing the continuous edges passing through each vertex in the vertex sequence to obtain an optimized vertex sequence; Determine the position of the adjusted continuous edge corresponding to the target continuous edge according to the optimized vertex sequence; The source three-dimensional model is adjusted according to the positions of the adjusted continuous edges to obtain the target three-dimensional model.
4. The method according to claim 3, characterized in that The step of determining the position of the adjusted continuous edge corresponding to the target continuous edge according to the optimized vertex sequence includes: Determine the position of each vertex according to the optimized vertex sequence; The position of the adjusted continuous edge corresponding to the target continuous edge is determined according to the position of each vertex.
5. The method according to claim 3, characterized in that The step of optimizing the continuous edges passing through each vertex in the vertex sequence to obtain an optimized vertex sequence includes: determining a target vertex set based on continuous edges passing through anchor points in the vertex sequence, the anchor points being vertices determined in response to a selection operation; generating a target Bezier curve based on the target vertex set; Adjusting the control points on the target Bezier curve to determine an adjusted auxiliary curve; Performing curve segmentation on the auxiliary curve based on the adjustment type and the adjusted auxiliary curve, and determining a segmentation point coordinate set; The segmentation point coordinate set is used as the optimized vertex sequence.
6. The method according to claim 5, characterized in that The step of adjusting the control points on the target Bezier curve to determine the adjusted auxiliary curve includes: Determine, according to a target vertex of a target Bezier curve and a control point corresponding to the target vertex, a tangent direction vector of the target Bezier curve at the target vertex and a distance between each control point and the corresponding vertex; Determine the coordinates of the control point based on the tangential direction vector of the target vertex and the distance between each control point and the corresponding vertex; Based on the coordinates of the control points, an adjusted auxiliary curve is determined.
7. The method according to claim 5, characterized in that The performing curve segmentation on the auxiliary curve based on the adjustment type and the adjusted auxiliary curve to determine a segmentation point coordinate set includes: If the adjustment type is surface segmentation addition, determining the coordinates of the vertex to be added and the adjusted vertex in the vertex sequence according to the coordinates of each vertex in the vertex sequence; A segmentation point coordinate set is determined according to the coordinates of the vertices to be added and the coordinates of the adjusted vertices.
8. The method according to claim 5, characterized in that The performing curve segmentation on the auxiliary curve based on the adjustment type and the adjusted auxiliary curve to determine a segmentation point coordinate set includes: If the adjustment type is surface segment reduction, determining the coordinates of the vertex to be deleted and the adjusted vertex in the vertex sequence according to the coordinates of each vertex in the vertex sequence; A segmentation point coordinate set is determined according to the coordinates of the vertices to be deleted and the coordinates of the adjusted vertices.
9. The method according to claim 1, characterized in that The step of respectively determining a continuous edge set and establishing an anchor point set according to the target area includes: determining continuous edges in the target area; Determine the continuous edge set according to the continuous edges; The anchor point set is established according to the vertices of the continuous edges.
10. The method according to claim 1, characterized in that The step of determining the positions of the adjusted continuous edges according to the adjusted vertex sequence comprises: generating a target Bezier curve based on the adjusted vertex sequence; Adjusting the control points of the target Bezier curve to determine an adjusted auxiliary curve; Performing curve segmentation on the auxiliary curve to determine a set of segmentation point coordinates; The position of the adjusted continuous edge is determined based on the segmentation point coordinate set.
11. The method according to claim 10, characterized in that The step of adjusting the control points of the target Bezier curve to determine the adjusted auxiliary curve includes: Determine, according to a target vertex of a target Bezier curve and a control point corresponding to the target vertex, a tangent direction vector of the target Bezier curve at the target vertex and a distance between each control point and the corresponding vertex; Determine the coordinates of the control point based on the tangential direction vector of the target vertex and the distance between each control point and the corresponding vertex; Based on the coordinates of the control points, an adjusted auxiliary curve is determined.
12. The method according to claim 1, characterized in that The step of adjusting the vertex sequence to obtain an adjusted vertex sequence includes: Determine the target adjustment method according to the sub-adjustment type, wherein the sub-adjustment type includes: continued extension adjustment and retained edge length division; The vertex sequence is adjusted based on the target adjustment method to obtain an adjusted vertex sequence.
13. A three-dimensional model adjustment device, characterized in that: include: Response module, adjustment module; The response module is used to determine the adjustment type of the source three-dimensional model in response to the adjustment type selection operation, and the adjustment type includes: surface segment increase, surface segment reduction and surface wiring adjustment; The response module is further configured to determine, in response to a region selection operation on the source three-dimensional model, a target region to be adjusted in the source three-dimensional model, wherein the target region includes at least one edge; The adjustment module is used to adjust at least one edge in the target area according to the adjustment type to obtain an adjusted target three-dimensional model; The adjustment module is also used for, if the adjustment type is surface wiring adjustment, determining a continuous edge set and establishing an anchor point set according to the target area, the continuous edge set includes at least one group of continuous edges, the anchor point set includes at least two anchor points, and each anchor point is a vertex in the target area; sequentially arranging the anchor point set to determine a vertex sequence; adjusting the vertex sequence to obtain an adjusted vertex sequence; determining the position of the adjusted continuous edges according to the adjusted vertex sequence; and adjusting the source three-dimensional model according to the position of each adjusted continuous edge to obtain a target three-dimensional model.
14. A computer device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method described in any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of claims 1 to 12.
Citation Information
Patent Citations
A method for repairing defects and holes in three-dimensional mesh model based on characteristic lines
CN109410334A
Curved surface template segmentation method, device, computer equipment and storage medium
CN110363854A