Modeling method and electronic device
By determining sampling points based on the coordinates and preset distances of selected points in the digital wax-subtracting shaping method, and using interpolation sampling and curve fitting methods, the problems of morphological breakage and discontinuity in the shaping area are solved, and better shaping effect is achieved.
Patent Information
- Application Number
- CN202411740929.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In existing digital wax-based sculpting methods, the speed at which the user drags the mouse is uncertain, leading to problems such as broken and discontinuous shapes in the sculpted area.
The coordinates of multiple sampling points are determined based on the coordinates of multiple selected points and a first preset distance. The model to be shaped is then shaped based on the coordinates of these sampling points, ensuring that the distance between two adjacent sampling points is equal. Interpolation sampling and curve fitting methods are used to improve the sculpting effect.
It achieves continuity and uniformity in the shape of the shaping area, avoids the problem of discontinuous shaping caused by unequal distances between adjacent selection points, and improves the shaping effect.
Smart Images

Figure CN119673466B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of oral medical treatment, in particular to a model shaping method and an electronic device. BACKGROUND
[0002] In the technical field of oral medical treatment, it is often necessary to wax shaping or wax reducing of dental restorations (such as dentures, bridges and crown restorations, etc.) to match the physiological morphology of the patient's oral cavity.
[0003] With the progress of science and technology, the traditional manual wax shaping or wax reducing method is gradually replaced by a digital wax shaping or wax reducing method. The digital wax shaping or wax reducing method is to obtain a three-dimensional model of a dental restoration through digital scanning and modeling, and then the user shapes the dental restoration model by wax shaping or wax reducing to make a dental restoration that better matches the physiological morphology of the patient's oral cavity. Specifically, the user determines the shaping area on the dental restoration model through a mouse drag event, and then the computer performs real-time shaping.
[0004] However, in the existing digital wax shaping or wax reducing method, the speed of the user dragging the mouse is uncertain, which often leads to the morphology of the shaping area being broken, thus causing the problem of incoherent shaping morphology. SUMMARY
[0005] To solve the above problems, the present application provides a model shaping method and an electronic device. The coordinates of a plurality of sampling points are determined based on the coordinates of a plurality of selection points and a first preset distance, and then the shaping model is obtained by shaping the to-be-shaped model based on the coordinates of the plurality of sampling points. The distance between adjacent two sampling points in the plurality of sampling points is equal, which avoids the problem of incoherent shaping morphology caused by the distance between adjacent two selection points in the plurality of selection points being not equal, thereby improving the shaping effect.
[0006] To solve the above problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a model shaping method, comprising: obtaining a to-be-shaped model, the to-be-shaped model being a dental restoration model; receiving a first control instruction and determining a plurality of selection points on the surface of the to-be-shaped model according to the first control instruction; determining the coordinates of a plurality of sampling points based on the coordinates of the plurality of selection points and a first preset distance; determining a neighborhood point set corresponding to each sampling point based on the coordinates of each sampling point, the coordinates of the vertex of the surface of the to-be-shaped model and the first preset distance; and shaping the to-be-shaped model based on the coordinates of each sampling point and the coordinates of all neighborhood points in the corresponding neighborhood point set to obtain a shaping model.
[0008] In some embodiments, the determining the coordinates of the plurality of sampling points based on the coordinates of the plurality of selection points and the first preset distance comprises: screening the plurality of selection points based on the coordinates of the plurality of selection points and the first preset distance to obtain a plurality of screened points; and determining the coordinates of the plurality of sampling points on the surface of the model to be shaped based on the coordinates of the plurality of screened points and the first preset distance.
[0009] In some embodiments, the screening the plurality of selection points based on the coordinates of the plurality of selection points and the first preset distance to obtain a plurality of screened points comprises: when a distance between an Nth selection point and an N+1th selection point in a perspective direction is greater than a first preset value multiplied by the first preset distance, determining the N+1th selection point as the screened point, where N is a positive integer and the initial value is 1; setting N=N+1, and returning to execute the determining the N+1th selection point as the screened point when the distance between the Nth selection point and the N+1th selection point in the perspective direction is greater than the first preset value multiplied by the first preset distance.
[0010] In some embodiments, the determining the coordinates of the plurality of sampling points based on the coordinates of the plurality of selection points and the first preset distance comprises: when the total number of the plurality of screened points is 2, determining a connecting line segment of the two screened points based on the coordinates of the two screened points; performing interpolation sampling on the connecting line segment according to a sampling interval of a second preset value multiplied by the first preset distance to obtain the coordinates of the sampling points on the surface of the model to be shaped, and determining the first screened point as the sampling point as well to obtain the plurality of sampling points; and when the total number of the plurality of screened points is greater than 2, fitting a curve based on the coordinates of the plurality of screened points, and performing interpolation sampling on the curve according to the sampling interval of the second preset value multiplied by the first preset distance to obtain the plurality of sampling points.
[0011] In some embodiments, the coordinates of the screening points are coordinates of the screening points when the model to be shaped is not shaped, and when the total number of the screening points is greater than 2, fitting a curve based on the coordinates of the screening points, and performing interpolation sampling on the curve according to a sampling interval of the second preset value multiplied by the first preset distance, to obtain the sampling points, includes: when the total number of the screening points is greater than 2, constructing a first queue including an Xth screening point, an X+1th screening point, and an X+Yth screening point, where X is a positive integer and the initial value is 1, Y is a positive integer greater than 1 and is a preset value, and the first queue includes Y+1 screening points; fitting a curve based on the coordinates of all the screening points in the first queue, and performing interpolation sampling on the curve according to a sampling interval of the second preset value multiplied by the first preset distance, to obtain the sampling points including the Xth screening point in the first queue; updating the coordinates of the X+Yth screening point to the coordinates of the nearest sampling point to the X+Yth screening point; setting X=X+1, and returning to perform the construction of the first queue including the Xth screening point, the X+1th screening point, the X+2th screening point, and the X+Yth screening point.
[0012] In some embodiments, fitting a curve based on the coordinates of all the screening points in the first queue, and performing interpolation sampling on the curve according to a sampling interval of the second preset value multiplied by the first preset distance, to obtain the sampling points including the Xth screening point in the first queue, includes: calculating the average coordinates of the X+Y-1th screening point and the X+Yth screening point in the first queue as an interpolation point; fitting the curve based on the coordinates of all the screening points in the first queue and the coordinates of the interpolation point; and performing interpolation sampling on the curve based on the length of the curve and the sampling interval of the second preset value multiplied by the first preset distance, to obtain the sampling points including the Xth screening point in the first queue.
[0013] In some embodiments, the model to be shaped is a mesh model composed of a plurality of polygonal patches, each of the polygonal patches having a plurality of vertices, and the shaping the model to be shaped based on the coordinates of each of the sampling points and the coordinates of all the neighborhood points in the corresponding neighborhood point set to obtain a shaped model comprises: determining a set of neighborhood patches corresponding to each of the sampling points based on the coordinates of all the neighborhood points in the corresponding neighborhood point set of each of the sampling points; calculating a shaping direction vector corresponding to all the neighborhood points in the corresponding neighborhood point set of each of the sampling points based on a normal vector of each of the neighborhood patches in the set of neighborhood patches corresponding to each of the sampling points; selecting a corresponding target calculation mode according to a preset shaping type; determining a shaping height of each of the neighborhood points based on a distance between the sampling point and each of the neighborhood points in the corresponding neighborhood point set of each of the sampling points by using the target calculation mode; and moving each of the neighborhood points based on the corresponding shaping direction vector and the shaping height of each of the neighborhood points in all the neighborhood point sets to shape the model to be shaped to obtain the shaped model.
[0014] In some embodiments, the calculating the shaping direction vector corresponding to all the neighborhood points in the corresponding neighborhood point set of each of the sampling points based on the normal vector of each of the neighborhood patches in the set of neighborhood patches corresponding to each of the sampling points comprises: performing weighted calculation on the normal vectors of all the neighborhood patches to obtain a weighted normal vector corresponding to each of the sampling points according to an area of each of the neighborhood patches in the set of neighborhood patches corresponding to each of the sampling points; and determining the shaping direction vector of all the neighborhood points in the corresponding neighborhood point set of each of the sampling points based on the weighted normal vector corresponding to each of the sampling points and the preset shaping type.
[0015] In some embodiments, the determining the shaping height of each of the neighborhood points based on the distance between the sampling point and each of the neighborhood points in the corresponding neighborhood point set of each of the sampling points by using the target calculation mode comprises: for each of the neighborhood points in the neighborhood point set corresponding to each of the sampling points, when the neighborhood point has not been moved, calculating a first distance between the neighborhood point and the sampling point based on a current coordinate of the neighborhood point and a coordinate of the sampling point; determining the shaping height of the neighborhood point according to the first distance by using the target calculation mode; when the neighborhood point has been moved, calculating a second distance between the neighborhood point and the sampling point based on the current coordinate of the neighborhood point and the coordinate of the sampling point; and updating the shaping height of the neighborhood point according to the second distance by using the target calculation mode.
[0016] In a second aspect, an embodiment of the present application provides an electronic device, which comprises:
[0017] at least one processor; and
[0018] a memory in communication with the at least one processor; wherein
[0019] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the model shaping method according to the first aspect.
[0020] The present application provides a model shaping method and an electronic device. The present application determines the coordinates of a plurality of sampling points based on the coordinates of a plurality of selection points and a first preset distance, and then shapes a to-be-shaped model based on the coordinates of the plurality of sampling points to obtain a shaped model. The distance between two adjacent sampling points in the plurality of sampling points is equal, thereby avoiding the problem of incoherent shaping form caused by the unequal distance between two adjacent selection points in the plurality of selection points, and improving the shaping effect. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 is a flowchart of the model shaping method provided by the embodiment of the present application.
[0022] Figure 2A is a schematic diagram of the result of shaping the to-be-shaped model by using the existing method.
[0023] Figure 2B is a schematic diagram of the result of shaping the to-be-shaped model by using the model shaping method provided by the embodiment of the present application.
[0024] Figure 3 is Figure 1 is a detailed flowchart of step S300 in the embodiment.
[0025] Figure 4 is Figure 3 is a detailed flowchart of step S310 in the embodiment.
[0026] Figure 5 is Figure 3 is a detailed flowchart of step S320 in the embodiment.
[0027] Figure 6 is Figure 5 is a detailed flowchart of step S323 in the embodiment.
[0028] Figure 7 is Figure 1 is a detailed flowchart of step S500 in the embodiment.
[0029] Figure 8 is Figure 7 is a schematic diagram of the principle of steps S510 to S550 in the embodiment.
[0030] Figure 9is a schematic diagram of a morphology curve obtained by using a first target calculation method provided in an embodiment of the present application.
[0031] Figure 10 is a schematic diagram of a morphology curve obtained by using a second target calculation method provided in an embodiment of the present application.
[0032] Figure 11A is a first schematic diagram of a first shaping model obtained by using the first target calculation method for one time of shaping provided in an embodiment of the present application.
[0033] Figure 11B is a schematic diagram of a first transverse cross-sectional profile of the first shaping model provided in an embodiment of the present application.
[0034] Figure 11C is a second schematic diagram of the first shaping model obtained by using the first target calculation method for one time of shaping provided in an embodiment of the present application.
[0035] Figure 11D is a schematic diagram of a first longitudinal cross-sectional profile of the first shaping model provided in an embodiment of the present application.
[0036] Figure 11E is a first schematic diagram of a second shaping model obtained by using the second target calculation method for one time of shaping provided in an embodiment of the present application.
[0037] Figure 11F is a schematic diagram of a second transverse cross-sectional profile of the second shaping model provided in an embodiment of the present application.
[0038] Figure 11G is a second schematic diagram of the second shaping model obtained by using the second target calculation method for one time of shaping provided in an embodiment of the present application.
[0039] Figure 11H is a schematic diagram of a second longitudinal cross-sectional profile of the second shaping model provided in an embodiment of the present application.
[0040] Figure 12A is a first schematic diagram of a third shaping model obtained by using the second target calculation method for two times of shaping provided in an embodiment of the present application.
[0041] Figure 12B is a schematic diagram of a transverse cross-sectional profile of the two times of shaping of the third shaping model provided in an embodiment of the present application.
[0042] Figure 12C is a second schematic diagram of the third shaping model obtained by using the second target calculation method for two times of shaping provided in an embodiment of the present application.
[0043] Figure 12Dis a schematic view of a longitudinal section profile of the second shaping of the third shaping model provided by the embodiment of the present application.
[0044] Figure 13 is a schematic view of the fourth shaping model obtained by multiple shaping using the model shaping method provided by the embodiment of the present application.
[0045] Figure 14 is a schematic view of the fifth shaping model obtained by multiple shaping using the model shaping method provided by the embodiment of the present application.
[0046] Figure 15 is a structural schematic view of the model shaping device provided by the embodiment of the present application.
[0047] Figure 16 is a structural schematic view of the electronic device provided by the embodiment of the present application.
[0048] Figure 17 is a structural block diagram of the computer readable storage medium provided by the embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0050] In addition, the terms “first” and “second” are only used for description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with “first” and “second” can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of “multiple” is two or more, unless otherwise specifically limited.
[0051] The present application provides a model shaping method and an electronic device. The model shaping method includes determining coordinates of a plurality of sampling points based on coordinates of a plurality of selection points and a first preset distance, and shaping a to-be-shaped model based on the coordinates of the plurality of sampling points to obtain a shaped model. The model shaping method can make the distance between two adjacent sampling points in the plurality of sampling points equal, avoid the problem of incoherent shaping form caused by the distance between two adjacent selection points in the plurality of selection points not being equal, and thus improve the shaping effect.
[0052] The model shaping method provided by the present application will be described in detail below with reference to the drawings.
[0053] Please refer to Figure 1 , Figure 1is a flowchart of a model shaping method provided by an embodiment of the present application. As shown in Figure 1 , the model shaping method comprises steps S100 to S500.
[0054] Step S100: Obtain a model to be shaped.
[0055] The model to be shaped is a dental restoration model. For example, the model to be shaped is a denture model, a molar pad model, a bridge model, a base model, or a crown restoration model. The model shaping method can be used to perform wax adding shaping or wax reducing shaping on the fossa region of a denture model or a base model.
[0056] Step S200: Receive a first control instruction and determine a plurality of selection points on the surface of the model to be shaped according to the first control instruction.
[0057] In some embodiments, a mouse drag event is determined according to the first control instruction, and the selection points selected by the mouse on the model to be shaped are determined once every refresh time of the mouse, so as to obtain the plurality of selection points on the surface of the model to be shaped.
[0058] Optionally, the plurality of selection points are sorted according to the process of mouse dragging, so as to obtain the order of each selection point. The selection points passed by the mouse first are in the front.
[0059] In some embodiments, the model shaping method is executed in real time, that is, the shaped model is calculated and generated in real time during the process of mouse dragging.
[0060] Please refer to Figure 2A , Figure 2A is a result diagram of shaping the model to be shaped by using the existing method. As shown in Figure 2A , in some embodiments, the drag trajectory of the mouse on the model to be shaped 1 is a curve L1, and the result of performing wax adding shaping on the model to be shaped according to the mouse drag event corresponding to the curve L1 is displayed in region A1. It can be seen that the shape of the shaped region is broken, and the concave-convex feeling is strong, and the concave-convex is uneven along the curve L1. This is because the speed of mouse dragging is fast at this time, and the existing method cannot achieve a better shaping effect. The shape of the shaped region is broken more seriously in region A2, because the speed of mouse dragging is faster at this time.
[0061] Please refer to Figure 2B , Figure 2B is a result diagram of shaping the model to be shaped by using the model shaping method provided by an embodiment of the present application. As shown in Figure 2BAs shown in some embodiments, the dragging track of the mouse on the model to be shaped 1 is a curve L2. It can be seen that the shape of the shaping area is coherent and the concave-convex is uniform along the curve L2. It is illustrated that the model shaping method can achieve a better shaping effect.
[0062] Step S300: determining the coordinates of the plurality of sampling points based on the coordinates of the plurality of selection points and the first preset distance.
[0063] Referring to Figure 3 , Figure 3 is Figure 1 a detailed flowchart of step S300 in FIG. 3. As shown in some embodiments, step S300 includes steps S310-S320. Figure 3
[0064] Step S310: screening the plurality of selection points based on the coordinates of the plurality of selection points and the first preset distance to obtain a plurality of screened points.
[0065] When the speed of the mouse dragging is slow, the distance between two selection points is short, and the number of selection points is large. By screening the plurality of selection points to obtain a plurality of screened points, the situation of too many selection points can be avoided.
[0066] Referring to Figure 4 , Figure 4 is Figure 3 a detailed flowchart of step S310 in FIG. 3. As shown in some embodiments, step S310 includes steps S311-S312. Figure 4
[0067] Step S311: when the distance between the Nth selection point and the N+1th selection point in the visual angle direction is greater than the first preset value multiplied by the first preset distance, the N+1th selection point is determined as a screened point.
[0068] wherein N is a positive integer and the initial value is 1.
[0069] As described above, optionally, the plurality of selection points are sorted according to the process of the mouse dragging to obtain the order of each selection point. The order of the selection point passed by the mouse first is in front. Therefore, the order of the Nth selection point is before the order of the N+1th selection point.
[0070] When the distance between the Nth selection point and the N+1th selection point in the visual angle direction is greater than the first preset value multiplied by the first preset distance, it is considered that the user has the behavior motivation of continuing to drag the mouse backward, and therefore the N+1th selection point is also determined as a screened point.
[0071] The distance between the Nth selection point and the N+1th selection point in the perspective direction refers to the distance between the projection point of the Nth selection point on an ideal plane and the projection point of the N+1th selection point on the ideal plane in the perspective direction in which the user observes the model to be shaped. The ideal plane is a plane perpendicular to the perspective direction vector.
[0072] Optionally, the first preset distance ranges from 0.2 mm (millimeter) to 5 mm, such as 0.2 mm, 1 mm, 3 mm, or 5 mm, etc.
[0073] Optionally, the first preset value ranges from 0.1 to 0.5, such as 0.1, 0.2, 0.25, or 0.5, etc.
[0074] Step S312: Let N = N + 1, and return to execute step S311.
[0075] Optionally, the model shaping method is executed in real time, and the subsequent steps are executed immediately after the selection point is recorded, so that the model to be shaped is shaped in real time. In step S312, when a mouse dragging event ends, the return execution of step S311 is stopped, and the shaping of the model to be shaped is also stopped.
[0076] Step S320: Determine the coordinates of the plurality of sampling points on the surface of the model to be shaped based on the coordinates of the plurality of selection points and the first preset distance.
[0077] When the speed of mouse dragging is fast, the distance between two selection points is long, and the distance between the corresponding selection points is also long. By determining the coordinates of the plurality of sampling points based on the coordinates of the plurality of selection points and the first preset distance, the situation that the selection points are too sparse can be avoided.
[0078] Please refer to Figure 5 , Figure 5 is Figure 3 the detailed flowchart of step S320 in FIG. 3B. As shown in Figure 5 some embodiments, step S320 includes steps S321 to S323.
[0079] Step S321: When the total number of the plurality of selection points is 2, determine the connecting line segment of the 2 selection points based on the coordinates of the 2 selection points.
[0080] Step S322: Interpolate and sample on the connecting line segment according to the sampling interval of the second preset value multiplied by the first preset distance, obtain the coordinates of the sampling points on the surface of the model to be shaped, and determine the 1st selection point as a sampling point, to obtain the plurality of sampling points.
[0081] Among them, the sampling points other than the 1st selection point are obtained by interpolation sampling.
[0082] In some embodiments, the connection line segment can not strictly adhere to the surface of the model to be shaped, in which case initial sampling points are obtained by interpolating sampling on the connection line segment at a sampling interval of the first preset distance multiplied by the second preset value, and then the final sampling points corresponding to the initial sampling points on the surface of the model to be shaped are found by using the nearest neighbor search method to obtain the coordinates of the final sampling points on the surface of the model to be shaped. The coordinates of the sampling points used for calculation hereinafter are all the coordinates of the final sampling points on the surface of the model to be shaped.
[0083] Optionally, the second preset value ranges from 0.1 to 0.5, for example, the second preset value is 0.1, 0.2, 0.25, or 0.5, etc.
[0084] Step S323: When the total number of the plurality of screening points is greater than 2, a curve is fitted based on the coordinates of the plurality of screening points, and a plurality of sampling points are obtained by interpolating sampling on the curve at a sampling interval of the first preset distance multiplied by the second preset value.
[0085] In some embodiments, the coordinates of the screening points are the coordinates of the screening points when the model to be shaped is not shaped. In this way, when the shaping process is repeatedly performed, the sampling points calculated based on the screening points will adhere to the surface of the model to be shaped, which can make the shaping form effect naturally superimposed.
[0086] Please refer to Figure 6 , Figure 6 is Figure 5 the detailed flowchart of step S323 in FIG. 3B. As shown in Figure 6 some embodiments, step S323 includes steps S3231 to S3234.
[0087] Step S3231: When the total number of the plurality of screening points is greater than 2, a first queue including the Xth screening point, the X+1th screening point, and the X+Yth screening point is constructed.
[0088] Wherein, X is a positive integer and the initial value is 1, Y is a positive integer greater than 1 and is a preset value, and the first queue includes Y+1 screening points. In this way, only Y+1 screening points are used to fit a curve each time, which can make the fitted curve substantially consistent with the trajectory of the user's real-time mouse dragging, thereby improving the correctness of shaping.
[0089] Optionally, the value of Y ranges from 2 to 10, for example, the value of Y is 2, 3, 4, 5, or 10, etc.
[0090] Preferably, the value of Y is 3.
[0091] Step S3232: Fit a curve based on the coordinates of all the screening points in the first queue, and perform interpolation sampling on the curve according to the sampling interval of the second preset value multiplied by the first preset distance to obtain multiple sampling points including the Xth screening point in the first queue.
[0092] Among them, all sampling points except the Xth screening point are obtained through interpolation sampling.
[0093] In some implementations, step S3232 includes steps (3232.1) to (3232.3).
[0094] (3232.1) Calculate the average coordinates of the X+Y-1th and X+Yth screening points in the first queue and use them as interpolation points.
[0095] The (X+Y)th filtering point in the first queue is the last filtering point in the first queue, and the (X+Y-1)th filtering point is the filtering point before the last filtering point.
[0096] (3232.2) Fit curves based on the coordinates of all selected points and interpolation points in the first queue.
[0097] Optionally, the algorithms for fitting the curve include cubic B-spline algorithms, polynomial interpolation algorithms, and K-spline interpolation algorithms.
[0098] (3232.3) Based on the sampling interval of the curve length and the second preset value multiplied by the first preset distance, interpolation sampling is performed on the curve to obtain multiple sampling points including the Xth screening point in the first queue.
[0099] Optionally, the length of the curve is calculated, and interpolation sampling is performed on the curve at sampling intervals of a second preset value multiplied by a first preset distance to obtain multiple sampling points including the Xth screening point in the first queue.
[0100] Step S3233: Update the coordinates of the (X+Y)th filtering point to the coordinates of the sampling point that is closest to the (X+Y)th filtering point.
[0101] like Figure 2B As shown, exemplarily, when constructing a first queue including the first, second, third, and fourth filter points, sampling points A, B, C, and D are calculated based on the coordinates of all filter points in the first queue. Then, the coordinates of the fourth filter point are updated to the coordinates of sampling point D. It is understood that there are multiple other sampling points on curve L2, but... Figure 2B Not shown in the image.
[0102] Step S3234: Let X = X + 1, then return to step S3231.
[0103] Optionally, the model shaping method is executed in real time. After the first queue is built, subsequent steps are executed immediately to shape the model to be shaped in real time. In step S3234, when a mouse drag event ends, the process stops and returns to step S3231, and the shaping of the model to be shaped is stopped.
[0104] In some implementations, the curve on the model to be shaped is the final curve obtained by fitting multiple screening points according to the method described above, and this curve is piecewise fitted. In this way, the curve can be made to be substantially consistent with the trajectory formed by the user dragging the mouse on the model to be shaped in real time, thereby improving the accuracy of sculpting.
[0105] like Figure 2B As shown, exemplarily, after updating the coordinates of the 4th selection point to the coordinates of sampling point D, the distance between sampling point E and sampling point D on curve L2, calculated based on the 5th, 6th, 7th, and 8th selection points, is also a sampling interval equal to the second preset value multiplied by the first preset distance. Among sampling points A, B, C, D, and E, the distance between any two sampling points on curve L2 is also a sampling interval equal to the second preset value multiplied by the first preset distance. In this way, the distance between any two sampling points on the curve can be made the same, avoiding the problem of inconsistent shaping caused by unequal distances between adjacent selection points among multiple selection points, thereby improving the shaping effect.
[0106] In some implementations, the curve may not perfectly fit the surface of the model to be shaped. In this case, interpolation sampling is performed on the curve at a sampling interval equal to a second preset value multiplied by a first preset distance to obtain initial sampling points. Then, a nearest neighbor search method is used to find the final sampling point on the surface of the model to be shaped that corresponds to the initial sampling point, thus obtaining the coordinates of the final sampling point on the surface of the model to be shaped. The coordinates of the sampling points used in subsequent calculations all refer to the coordinates of the final sampling point on the surface of the model to be shaped. The coordinates of the initial sampling point and the final sampling point are generally very close.
[0107] Step S400: Determine the neighborhood point set corresponding to each sampling point based on the coordinates of each sampling point, the coordinates of the vertices of the surface of the model to be shaped, and the first preset distance.
[0108] In some implementations, the model to be shaped is a mesh model composed of multiple polygonal facets, each polygonal facet having multiple vertices.
[0109] In some implementations, for each sampling point, when the distance between a vertex in the neighborhood of the sampling point and the sampling point is less than or equal to a first preset distance, the vertex is determined as a neighboring point in the neighborhood point set corresponding to the sampling point.
[0110] Optionally, vertices in the neighborhood of the sampling point are traversed one by one according to a preset number of traversed vertices, and it is determined whether the distance between the vertex and the sampling point is less than or equal to the first preset distance.
[0111] Optionally, the number of traversed vertices is dynamically adjusted in real time according to the size of the patch and the size of the first preset distance, so as to improve the execution efficiency of the algorithm.
[0112] The isolated point is a vertex in the mesh model which is not contained by any patch, and the isolated point does not form a connection with other vertices. In some embodiments, the vertices included in the neighborhood point set can be isolated points, which will affect the subsequent calculation, and therefore, the isolated point detection is performed on each neighborhood point set to remove the isolated points therefrom.
[0113] Optionally, the vertices in each neighborhood point set are traversed, and it is determined whether the vertex has a neighborhood vertex. If not, the vertex is an isolated point, and the vertex is deleted from the neighborhood point set. If yes, the vertex is not an isolated point, and the vertex is not operated.
[0114] Step S500: shaping the model to be shaped based on the coordinates of each sampling point and the coordinates of all neighborhood points in the corresponding neighborhood point set, to obtain a shaped model.
[0115] Please refer to Figure 7 , Figure 7 is Figure 1 the detailed flowchart of step S500 in FIG. 5. As shown in Figure 7 , in some embodiments, step S500 includes steps S510 to S550.
[0116] Step S510: determining the neighborhood patch set corresponding to the sampling point based on the coordinates of all neighborhood points in the neighborhood point set corresponding to the sampling point.
[0117] In some embodiments, when all vertices of a patch are neighborhood points in the neighborhood point set corresponding to the sampling point, the patch is determined as a neighborhood patch in the neighborhood patch set corresponding to the sampling point.
[0118] Please refer to Figure 8 , Figure 8 is Figure 7 the principle diagram of steps S510 to S550 in FIG. 5. As shown in Figure 8 , exemplarily, the sampling point A corresponds to the neighborhood point set R1, the sampling point B corresponds to the neighborhood point set R2, the sampling point C corresponds to the neighborhood point set R3, the sampling point D corresponds to the neighborhood point set R4, and the sampling point E corresponds to the neighborhood point set R5. Figure 8The neighborhood points and the neighborhood patches included in each neighborhood point set are not shown in the figure, but it can be understood that the neighborhood points and the neighborhood patches included in each neighborhood point set are all located within the closed contour line of the neighborhood point set.
[0119] In some embodiments, before step S520, the method further comprises: performing a mesh optimization process on the model to be shaped.
[0120] Optionally, when the number of neighborhood patches included in the neighborhood point set is greater than the first number threshold, it is determined that the calculation amount is large, and at this time, the model to be shaped is processed by increasing the mesh side length.
[0121] Optionally, when the number of neighborhood patches included in the neighborhood point set is less than the second number threshold, it is determined that there are not enough neighborhood points and neighborhood patches for subsequent calculation, and at this time, the model to be shaped is processed by breaking the long side of the mesh and folding the short side, etc., so that the related topological quality in the neighborhood point set is good, and other areas that do not need to be shaped are not affected.
[0122] Optionally, the first number threshold and the second number threshold are calculated according to the average side length of the neighborhood patches included in the neighborhood point set and the first preset distance.
[0123] Step S520: calculating the shaping direction vector corresponding to all neighborhood points in the neighborhood point set corresponding to each sampling point based on the normal vector of each neighborhood patch in the neighborhood patch set corresponding to each sampling point.
[0124] In some embodiments, step S520 comprises steps S521 to S522.
[0125] Step S521: calculating the normal vector of all neighborhood patches by weighting according to the area of each neighborhood patch in the neighborhood patch set corresponding to each sampling point, to obtain the weighted normal vector corresponding to the sampling point.
[0126] In the mesh model, each patch has a corresponding normal vector.
[0127] In some embodiments, for the neighborhood patch set corresponding to each sampling point, the normal vector of each neighborhood patch in the neighborhood patch set is multiplied by the numerical value of the area of the neighborhood patch to obtain the weighted normal vector of the neighborhood patch, then the weighted normal vectors of all neighborhood patches in the neighborhood patch set are added to obtain a weighted result normal vector, and the weighted result normal vector is unitized. The unitized weighted result normal vector is the weighted normal vector corresponding to the sampling point.
[0128] In other embodiments, the average vector of the normal vectors of all neighborhood patches in the neighborhood patch set corresponding to the sampling point is taken as the normal vector corresponding to the sampling point.
[0129] Step S522: determining the shaping direction vector of all the neighbor points in the neighbor point set corresponding to each sampling point based on the weighted normal vector corresponding to each sampling point and the preset shaping type.
[0130] In some embodiments, the preset shaping type includes a waxing shaping type and a waxing reduction shaping type. According to the shaping degree, the waxing shaping type further includes a smooth waxing shaping type and a sharp waxing shaping type, and the waxing reduction shaping type further includes a smooth waxing reduction shaping type and a sharp waxing reduction shaping type.
[0131] In some embodiments, when the preset shaping type belongs to the waxing shaping type, the weighted normal vector corresponding to the sampling point is determined as the shaping direction vector of all the neighbor points in the neighbor point set corresponding to the sampling point. When the preset shaping type belongs to the waxing reduction shaping type, the inverse vector of the weighted normal vector corresponding to the sampling point is determined as the shaping direction vector of all the neighbor points in the neighbor point set corresponding to the sampling point.
[0132] In some embodiments, when the preset shaping type belongs to the waxing shaping type, the weighted normal vector corresponding to the sampling point is determined as the shaping direction vector of all the neighbor points in the neighbor point set corresponding to the sampling point. When the preset shaping type belongs to the waxing reduction shaping type, the inverse vector of the weighted normal vector corresponding to the sampling point is determined as the shaping direction vector of all the neighbor points in the neighbor point set corresponding to the sampling point.
[0133] Step S530: selecting a corresponding target calculation mode according to the preset shaping type.
[0134] In some embodiments, when the preset shaping type belongs to the smooth shaping type, the first target calculation mode is selected. When the preset shaping type belongs to the sharp shaping type, the second target calculation mode is selected. In the first target calculation mode and the second target calculation mode, the calculation formula of the shaping height of each neighbor point is different.
[0135] Step S540: determining the shaping height of each neighbor point based on the distance between the sampling point and each neighbor point in the neighbor point set corresponding to each sampling point by using the target calculation mode.
[0136] In some embodiments, step S540 includes steps S541 to S544.
[0137] Step S541: for each neighbor point in the neighbor point set corresponding to each sampling point, when the neighbor point has not moved, calculating a first distance between the neighbor point and the sampling point based on the current coordinates of the neighbor point and the coordinates of the sampling point.
[0138] The first distance between the neighbor point and the sampling point is the Euclidean distance.
[0139] Step S542: determining the shaping height of the neighborhood point according to the first distance by using a target calculation mode.
[0140] In some embodiments, in the first target calculation mode, the calculation formula of the shaping height is:
[0141]
[0142] wherein x represents the first distance between the neighborhood point and the sampling point, f(x) represents the shaping height calculated by using the first target calculation mode, a represents the first shaping intensity coefficient, b represents the second shaping intensity coefficient, and R represents the first preset distance.
[0143] Optionally, according to the moving times of the neighborhood point, the shaping height corresponding to the neighborhood point is calculated by using a recursive calculation formula subsequently.
[0144] In some embodiments, in the first target calculation mode, when the neighborhood point has not moved, the calculation formula of the shaping height is:
[0145]
[0146] wherein x1 represents the first distance between the neighborhood point and the sampling point when the neighborhood point has not moved, f(x1) represents the shaping height calculated by using the first target calculation mode for the first time, a represents the first shaping intensity coefficient, b represents the second shaping intensity coefficient, and R represents the first preset distance.
[0147] In some embodiments, in the second target calculation mode, the calculation formula of the shaping height is:
[0148]
[0149] wherein H(x) represents the shaping height calculated by using the second target calculation mode.
[0150] Optionally, according to the moving times of the neighborhood point, the shaping height corresponding to the neighborhood point is calculated by using a recursive calculation formula subsequently.
[0151] In some embodiments, in the second target calculation mode, when the neighborhood point has not moved, the calculation formula of the shaping height is:
[0152]
[0153] wherein H(x1) represents the shaping height calculated by using the second target calculation mode for the first time.
[0154] Step S543: when the neighborhood point has moved, calculating the second distance between the neighborhood point and the sampling point based on the current coordinate of the neighborhood point and the coordinate of the sampling point.
[0155] In some embodiments, in the first target calculation manner and the second target calculation manner, the second distance between the neighborhood point and the sampling point is calculated in a recursive manner when the neighborhood point has moved.
[0156] In some embodiments, in the first target calculation manner, when the neighborhood point has moved once, the calculation formula of the second distance is:
[0157]
[0158] wherein x2 represents the second distance between the neighborhood point and the sampling point when the neighborhood point has moved once, c represents a second preset value, and n represents the number of times of movement of the neighborhood point, and n is 1 at this time.
[0159] In some embodiments, in the first target calculation manner, when the neighborhood point has moved twice, the calculation formula of the second distance is:
[0160]
[0161] wherein x3 represents the second distance between the neighborhood point and the sampling point when the neighborhood point has moved twice, and n is 2 at this time.
[0162] In some embodiments, in the first target calculation manner, when the neighborhood point has moved thrice, the calculation formula of the second distance is:
[0163]
[0164] wherein x4 represents the second distance between the neighborhood point and the sampling point when the neighborhood point has moved thrice, and n is 3 at this time.
[0165] The calculation formula of the second distance after each movement of the neighborhood point is calculated in a recursive manner.
[0166] The calculation formula of the second distance in the second target calculation manner refers to the calculation formula of the second distance in the first target calculation manner.
[0167] Step S544: updating the shaping height of the neighborhood point according to the second distance in the target calculation manner.
[0168] In some embodiments, the shaping height of the neighborhood point is updated based on the target calculation manner in a recursive manner.
[0169] In some embodiments, in the first target calculation manner, when the neighborhood point has moved once, the calculation formula of the shaping height is:
[0170]
[0171] Wherein, f(x2) represents the molding height obtained by the first target calculation method for the second time (i.e. the first updated molding height).
[0172] In some embodiments, in the first target calculation method, when the neighborhood point has been moved for 2 times, the calculation formula of the molding height is:
[0173]
[0174] Wherein, f(x3) represents the molding height obtained by the first target calculation method for the third time (i.e. the second updated molding height).
[0175] In some embodiments, in the first target calculation method, when the neighborhood point has been moved for 3 times, the calculation formula of the molding height is:
[0176]
[0177] Wherein, f(x4) represents the molding height obtained by the first target calculation method for the fourth time (i.e. the third updated molding height). The calculation formula of the molding height updated by the first target calculation method is used in the same way thereafter.
[0178] Please refer to Figure 9 , Figure 9 is a schematic diagram of the morphology curve obtained by the first target calculation method provided by the embodiments of the present application. At this time, the first preset distance is 0.5 mm, and the value of the first molding strength coefficient is 0.3. As shown in Figure 9 , exemplarily, the curve f1 is the morphology curve obtained by the first target calculation method for the first time, the curve f2 is the morphology curve obtained by the first target calculation method for the second time, the curve f3 is the morphology curve obtained by the first target calculation method for the third time, the curve f4 is the morphology curve obtained by the first target calculation method for the fourth time, and the curve f5 is the morphology curve obtained by the first target calculation method for the fifth time. It can be seen that when the number of calculations increases, the fluctuation of the top of the morphology curve tends to be smooth. The morphology deviation of the curve f1 and the curve f5 is the source of the side concave-convex feeling.
[0179] When the molding strength coefficient is constant, the greater the first preset distance, the smaller the fluctuation of the top of the morphology curve, and the more smooth it tends to be. When the first preset distance is constant, the smaller the molding strength coefficient, the smaller the fluctuation of the top of the morphology curve, and the more smooth it tends to be.
[0180] As shown in Figure 8As shown, exemplary, sampling point A corresponds to neighborhood point set R1, sampling point B corresponds to neighborhood point set R2, sampling point C corresponds to neighborhood point set R3, sampling point D corresponds to neighborhood point set R4, and sampling point E corresponds to neighborhood point set R5. For each neighborhood point in neighborhood point set R1, the first calculation is performed to obtain the shaping height using the target calculation method. For each neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2, the second calculation is performed to obtain the shaping height after one update using the target calculation method. For each neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2 and neighborhood point set R3, the third calculation is performed to obtain the shaping height after two updates using the target calculation method. For each neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2, neighborhood point set R3 and neighborhood point set R4, the fourth calculation is performed to obtain the shaping height after three updates using the target calculation method. For each neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2, neighborhood point set R3, neighborhood point set R4 and neighborhood point set R5, the fifth calculation is performed to obtain the shaping height after four updates using the target calculation method, and so on, until the final shaping height of each neighborhood point is obtained. For example, for a neighborhood point that only belongs to neighborhood point set R1, the corresponding shaping height satisfies the curve f1 in Figure 9 For a neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2, the corresponding shaping height satisfies the curve f2 in Figure 9 For a neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2 and neighborhood point set R3, the corresponding shaping height satisfies the curve f3 in Figure 9 For a neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2, neighborhood point set R3 and neighborhood point set R4, the corresponding shaping height satisfies the curve f4 in Figure 9 For a neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2, neighborhood point set R3, neighborhood point set R4 and neighborhood point set R5, the corresponding shaping height satisfies the curve f5 in Figure 9 For a neighborhood point in neighborhood point set R1 that also belongs to neighborhood point set R2, neighborhood point set R3, neighborhood point set R4 and neighborhood point set R5, the corresponding shaping height satisfies the curve f5 in
[0181] It can be understood that in some embodiments, because the model shaping method is performed in real time, i.e., the shaping model is calculated and generated in real time during the mouse dragging process, the neighborhood point set corresponding to each sampling point is determined each time a sampling point is determined, and then the shaping height of the neighborhood point is calculated and the shaping model is generated in real time, rather than generating the shaping model after the final shaping height of the neighborhood point is determined. In each calculation of the shaping height of the neighborhood point, it is determined whether the neighborhood point has been moved and how many times it has been moved according to the calculation record, and then the shaping height is calculated using the corresponding calculation formula.
[0182] In some embodiments, when reshaping the region in the shaping model that has been shaped, the coordinates of the screening point are the coordinates of the screening point when the model to be shaped has not been shaped, and the coordinates of the neighborhood point are the coordinates of the neighborhood point when the model to be shaped has been shaped.
[0183] In some embodiments, in the second target calculation mode, when the neighborhood point has been moved once, the calculation formula of the shaping height is:
[0184]
[0185] wherein H(x2) represents the shaping height obtained by the second calculation in the second target calculation mode (i.e., the shaping height after the first update).
[0186] In some embodiments, in the second target calculation mode, when the neighborhood point has been moved twice, the calculation formula of the shaping height is:
[0187]
[0188] wherein H(x3) represents the shaping height obtained by the third calculation in the second target calculation mode (i.e., the shaping height after the second update).
[0189] In some embodiments, in the second target calculation mode, when the neighborhood point has been moved three times, the calculation formula of the shaping height is:
[0190]
[0191] wherein H(x4) represents the shaping height obtained by the fourth calculation in the second target calculation mode (i.e., the shaping height after the third update). The calculation formula of the shaping height updated by the second target calculation mode is used in the same way thereafter.
[0192] In the second target calculation mode, x1, x2, x3, and x4, etc. are obtained by the calculation formula of the second distance in the first target calculation mode, and the calculation formula of the shaping height in the second target calculation mode.
[0193] Please refer to Figure 10 , Figure 10 is a schematic diagram of the shape curve obtained by the second target calculation mode provided by the embodiments of the present application. At this time, the first preset distance is 0.5 mm, and the value of the first shaping intensity coefficient is 0.3. As shown in Figure 10As shown, the curve f6 is an example of a shape curve obtained by the first calculation using the second target calculation method, the curve f7 is an example of a shape curve obtained by the second calculation using the second target calculation method, the curve f8 is an example of a shape curve obtained by the third calculation using the second target calculation method, the curve f9 is an example of a shape curve obtained by the fourth calculation using the second target calculation method, and the curve f10 is an example of a shape curve obtained by the fifth calculation using the second target calculation method. As can be seen, when the number of calculations increases, the fluctuation of the top of the shape curve tends to be smoother. The shape deviation between the curve f6 and the curve f10 is the source of the side concave-convex feeling.
[0194] When the shaping strength coefficient is constant, the greater the first preset distance, the smaller the fluctuation of the top of the shape curve, and the more smooth the shape curve. When the first preset distance is constant, the smaller the shaping strength coefficient, the smaller the fluctuation of the top of the shape curve, and the more smooth the shape curve.
[0195] The method for recursively updating the shaping height using the second target calculation method is described above.
[0196] By using the first target calculation method or the second target calculation method to calculate the shaping height, the shaping shape can be accurately controlled, so that the shaping shape after the superposition of multiple shaping processes still meets the shape requirements of the user.
[0197] Step S550: Moving the neighborhood points based on the shaping direction vector and the shaping height corresponding to each neighborhood point in all neighborhood point sets to shape the model to be shaped, to obtain a shaped model.
[0198] Optionally, each neighborhood point is moved along the corresponding shaping direction vector and shaping height to shape the model to be shaped, to obtain a shaped model. This process is real-time calculation.
[0199] In some embodiments, after step S500, the method further comprises: performing smoothing processing on the shaped model to obtain a final shaped model.
[0200] In some embodiments, the grid of the shaped model is subjected to Laplace smoothing processing according to a preset smoothing degree and a weight factor. In this way, it can be ensured that the shaping shape is not affected too much by the smoothing processing, and more original shape features are retained, and it can also be ensured that the shape of the neighborhood point set of each sampling point after shaping and the shape of the neighborhood point set of the rest of the sampling points after shaping are uniformly superimposed and transitioned.
[0201] Please refer to Figure 11A and Figure 11B , Figure 11A is a first schematic diagram of a first shaped model obtained by one shaping using the first target calculation method, Figure 11Bis a schematic diagram of a first transverse cross-sectional profile of the first shaping model provided by the embodiment of the present application. At this time, the first preset distance is 0.5 mm, and the value of the first shaping strength coefficient is 0.3. As shown in Figure 11A , the smooth wax adding shaping mode and the smooth wax reducing shaping mode in the first shaping model 2 are both continuous without discontinuity, and there is no abrupt concave-convex feeling on the two sides and the top. Figure 11B As shown in , the cross-sectional profile L3 of the first shaping model 2 at the cross section 21, the partial cross-sectional profile within the region A3 represents the shaping effect of the smooth wax reducing shaping, and the partial cross-sectional profile within the region A4 represents the shaping effect of the smooth wax adding shaping, which further illustrates that the shaping mode has no abrupt concave-convex feeling.
[0202] Figure 11C and Figure 11D , Figure 11C is a second schematic diagram of the first shaping model obtained by adopting the first target calculation mode for 1 time shaping, provided by the embodiment of the present application, Figure 11D is a schematic diagram of a first longitudinal cross-sectional profile of the first shaping model provided by the embodiment of the present application. At this time, the first preset distance is 0.5 mm, and the value of the first shaping strength coefficient is 0.3. As shown in Figure 11C , the smooth wax adding shaping mode in the first shaping model 2 is continuous without discontinuity, and there is no abrupt concave-convex feeling on the two sides and the top. Figure 11D As shown in , the cross-sectional profile L4 of the first shaping model 2 at the cross section 22, the partial cross-sectional profile within the region A5 represents the shaping effect of the smooth wax adding shaping, which further illustrates that the smooth wax adding shaping mode is continuous without discontinuity, and the shaping mode has no abrupt concave-convex feeling.
[0203] Figure 11E and Figure 11F , Figure 11E is a first schematic diagram of the second shaping model obtained by adopting the second target calculation mode for 1 time shaping, provided by the embodiment of the present application, Figure 11F is a schematic diagram of a second transverse cross-sectional profile of the second shaping model provided by the embodiment of the present application. At this time, the first preset distance is 0.5 mm, and the value of the first shaping strength coefficient is 0.3. As shown in Figure 11E , the sharp wax adding shaping mode and the sharp wax reducing shaping mode in the second shaping model 3 are both continuous without discontinuity, and there is no abrupt concave-convex feeling on the two sides and the top. Figure 11F As shown in , the cross-sectional profile L5 of the second shaping model 3 at the cross section 31, the partial cross-sectional profile within the region A6 represents the shaping effect of the sharp wax reducing shaping, and the partial cross-sectional profile within the region A7 represents the shaping effect of the sharp wax adding shaping, which further illustrates that the shaping mode has no abrupt concave-convex feeling.
[0204] Figure 11G and Figure 11H ,Figure 11G This is a second schematic diagram of the second shaping model obtained by performing one shaping operation using the second target calculation method, as provided in the embodiments of this application. Figure 11H This is a schematic diagram of the second longitudinal cross-sectional profile of the second shaping model provided in this application embodiment. At this time, the first preset distance is 0.5 mm, and the value of the first shaping strength coefficient is 0.3. For example... Figure 11G As shown, the sharp, waxed sculpted form in the second model 3 is continuous and unbroken, with no abrupt bumps or depressions on the sides and top. For example... Figure 11H As shown, in the cross-sectional profile L6 at section 32 of the second shaping model 3, the part of the cross-sectional profile in region A8 represents the shaping effect of sharp wax sculpting. This further illustrates that the sharp wax sculpting form is continuous and unbroken, and the sculpted form has no abrupt unevenness.
[0205] Additionally, see Figures 11A-11H It is evident that the sculpting height of sharp sculpting is greater than that of smooth sculpting, resulting in a more pronounced sculpting effect.
[0206] In some implementations, multiple overlapping shaping processes can be performed on a shaping area of the model to be shaped.
[0207] Please see Figure 12A and Figure 12B , Figure 12A This is a first schematic diagram of the third shaping model obtained by performing two shaping operations using the second target calculation method, as provided in the embodiments of this application. Figure 12B This is a superimposed schematic diagram of the transverse cross-sectional profile of the third shaping model provided in this application embodiment, after two shaping processes. At this time, the first preset distance is 0.5 mm, and the value of the first shaping strength coefficient is 0.3. For example... Figure 12A As shown, the sharp, waxed shapes obtained from the two shaping processes in the third model 4 are all continuous and unbroken, with no abrupt bumps or depressions on the sides and top. Figure 12B As shown, in the cross-sectional profile L7 at section 41 of the third shaping model 4, the part of the cross-sectional profile in region A9 represents the shaping effect of two sharp waxing shapings. This shows that by using the second target calculation method to calculate the shaping height, the shaping shape can be precisely controlled, so that the shaping shape after multiple shaping processes are superimposed still has no abrupt unevenness, which meets the user's shape requirements.
[0208] Please see Figure 12C and Figure 12D , Figure 12C This is a second schematic diagram of the third shaping model obtained by performing two shaping operations using the second target calculation method, as provided in the embodiments of this application. Figure 12Dis a superimposed schematic view of a longitudinal cross-sectional profile of the second shaping of the third shaping model provided by the embodiment of the present application. At this time, the first preset distance is 0.5 mm, and the value of the first shaping strength coefficient is 0.3. As shown in Figure 12C , the sharp wax shaping form obtained by the second shaping in the third shaping model 4 is continuous without discontinuity, and there is no abrupt concave-convex feeling on both sides and the top. As shown in Figure 12D , the cross-sectional profile L8 of the third shaping model 4 at the cross section 42, the part of the cross-sectional profile in the region A10 represents the shaping effect of the second sharp wax shaping, which indicates that by using the second target calculation method to calculate the shaping height, the shaping form can be accurately controlled, so that the shaping form after the superposition of multiple shaping processes is still continuous without discontinuity, and there is no abrupt concave-convex feeling, which meets the form requirements of the user.
[0209] The effect diagram of multiple shaping by using the first target calculation method is not shown, but by using the first target calculation method to calculate the shaping height, the shaping form can also be accurately controlled, so that the shaping form after the superposition of multiple shaping processes is still without abrupt concave-convex feeling, which meets the form requirements of the user.
[0210] Please refer to Figure 13 and Figure 14 , Figure 13 is a schematic view of a fourth shaping model obtained by multiple shaping by using the model shaping method provided by the embodiment of the present application, Figure 14 is a schematic view of a fifth shaping model obtained by multiple shaping by using the model shaping method provided by the embodiment of the present application. As shown in Figure 13 , the fourth shaping model 5 is a grid model, and the multiple wax shaping areas and the multiple wax shaping reduction areas are continuous without discontinuity, and there is no abrupt concave-convex feeling on both sides and the top, and the grid is uniform without spikes, and the grid quality is good. As shown in Figure 14 , the multiple wax shaping areas and the multiple wax shaping reduction areas of the fifth shaping model 6 are continuous without discontinuity, and there is no abrupt concave-convex feeling on both sides and the top, which indicates that the shaping effect of the model shaping method provided by the present application is very good.
[0211] In summary, the model shaping method provided by the embodiment of the present application has the following advantages:
[0212] 1. By determining the coordinates of the plurality of sampling points based on the coordinates of the plurality of selection points and the first preset distance, and then shaping the to-be-shaped model based on the coordinates of the plurality of sampling points, a shaped model is obtained, which can make the distance between two adjacent sampling points in the plurality of sampling points equal, avoid the problem of discontinuous shaping form caused by the distance between two adjacent selection points in the plurality of selection points not being equal, and thus improve the shaping effect.
[0213] 2. By calculating the shaping height in the first or second target calculation manner, the shaping form can be accurately controlled, so that the shaping form after multiple shaping processes is still consistent with the user's form requirements.
[0214] 3. By screening the multiple selection points to obtain multiple screened points, the situation of too dense selection points can be avoided.
[0215] 4. By further determining the coordinates of the multiple sampling points based on the coordinates of the multiple screened points and the first preset distance, the situation of too sparse screened points can be avoided.
[0216] 5. By taking the coordinates of the screened points as the coordinates of the screened points on the unshaped model, the sampling points calculated based on the screened points will adhere to the surface of the unshaped model when the shaping process is repeated, so that the shaping form effect is naturally superimposed.
[0217] 6. By fitting a curve according to Y+1 screened points each time, the curve obtained by fitting is basically consistent with the trajectory of the user's real-time mouse dragging, thereby improving the correctness of shaping.
[0218] 7. By calculating the shaping height in the first or second target calculation manner, the shaping form can be accurately controlled, so that the shaping form after multiple shaping processes is still consistent with the user's form requirements.
[0219] Please refer to Figure 15 , Figure 15 is a structural schematic diagram of a model shaping device provided by the embodiment of the present application. As shown in Figure 15 , the model shaping device 300 comprises an acquisition module 310 and a processing module 320.
[0220] In some embodiments, the acquisition module 310 is configured to acquire an unshaped model, and the unshaped model is a dental restoration model.
[0221] In some embodiments, the processing module 320 is configured to receive a first control instruction, determine multiple selection points on the surface of the unshaped model according to the first control instruction, determine the coordinates of multiple sampling points based on the coordinates of the multiple selection points and a first preset distance, determine a neighborhood point set corresponding to each sampling point based on the coordinates of each sampling point, the coordinates of a vertex on the surface of the unshaped model, and the first preset distance, and shape the unshaped model based on the coordinates of each sampling point and the coordinates of all neighborhood points in the corresponding neighborhood point set to obtain a shaped model.
[0222] Please refer to Figure 16 , Figure 16 is a structural schematic diagram of an electronic device provided by the embodiment of the present application. As shown in Figure 16As shown, the electronic device 400 includes one or more processors 410 and a memory 420, Figure 16 In some embodiments, the processor 410 is taken as an example.
[0223] In some embodiments, the processor 410 and the memory 420 can be connected by a bus or other means, Figure 16 In some embodiments, the processor 410 is taken as an example.
[0224] In some embodiments, the processor 410 is configured to obtain a model to be shaped, the model to be shaped being a dental restoration model; receive a first control instruction, determine a plurality of selection points on the surface of the model to be shaped according to the first control instruction; determine the coordinates of a plurality of sampling points based on the coordinates of the plurality of selection points and a first preset distance; determine a neighborhood point set corresponding to each sampling point based on the coordinates of each sampling point, the coordinates of the vertex on the surface of the model to be shaped and the first preset distance; and shape the model to be shaped based on the coordinates of each sampling point and the coordinates of all neighborhood points in the corresponding neighborhood point set, to obtain a shaped model.
[0225] In some embodiments, the memory 420 is a non-volatile computer readable storage medium, and can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules of the model shaping method in the embodiments of the present application. The processor 410 executes the various functions of the electronic device 400 and data processing by running the non-volatile software programs, instructions and modules stored in the memory 420, that is, implements the model shaping method of the above method embodiments.
[0226] In some embodiments, the memory 420 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the electronic device 400, etc. In addition, the memory 420 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 can optionally include a memory remotely arranged with respect to the processor 410, and these remote memories can be connected to the controller through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0227] In some embodiments, one or more modules are stored in the memory 420, and when executed by the one or more processors 410, perform the model shaping method in any of the above method embodiments, for example, perform the method steps S100 to S500 in the above description. Figure 1
[0228] In some embodiments, the electronic device can be a chip, for example, a data processing unit (DPU) chip applied to a data center, or the electronic device can also be a network interface card including a chip and multiple interfaces (for example, a PCI / PCIE interface, a UART interface, a USB interface, and the like), or the electronic device can also be a traditional server, or can also be a server including a network interface card or a chip, the server including a host and a data processor, the data processor being configured to schedule a packet to the host or the data processor itself to process the packet, and the host being configured to process the packet scheduled by the data processor.
[0229] Please refer to Figure 17 , Figure 17 is a structural block diagram of a computer readable storage medium provided by an embodiment of the present application. The computer readable storage medium 500 stores program code 510, and the program code 510 can be invoked by a processor to execute the model shaping method described in the above method embodiments.
[0230] The computer readable storage medium 500 can be an electronic storage such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer readable storage medium includes a non-transitory computer readable storage medium. The computer readable storage medium 500 has a storage space for program code for executing any method step of the above model shaping method. These program codes can be read from or written into one or more computer program products. The program code can be compressed in a suitable form, for example.
[0231] In some embodiments, an embodiment of the present application further provides a computer program product including a computer program, which, when executed by a processor, implements the above model shaping method.
[0232] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in the computer readable storage medium 500, and when executed, can include the processes of the above-mentioned embodiments of each method. Any reference to memory, database or other medium used in each embodiment provided by the present application can include at least one of non-volatile and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in each embodiment provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without limitation. The processor involved in each embodiment provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without limitation.
[0233] To sum up, the application provides a model shaping method and an electronic device. The model shaping method comprises: obtaining a model to be shaped, the model to be shaped being a dental restoration model; receiving a first control instruction, and determining a plurality of selection points on the surface of the model to be shaped according to the first control instruction; determining the coordinates of a plurality of sampling points based on the coordinates of the plurality of selection points and a first preset distance; determining a neighborhood point set corresponding to each sampling point based on the coordinates of each sampling point, the coordinates of a vertex on the surface of the model to be shaped and the first preset distance; and shaping the model to be shaped based on the coordinates of each sampling point and the coordinates of all neighborhood points in the corresponding neighborhood point set, to obtain a shaped model. The application determines the coordinates of a plurality of sampling points based on the coordinates of a plurality of selection points and a first preset distance, and then shapes the model to be shaped based on the coordinates of the plurality of sampling points, to obtain a shaped model. This can make the distance between two adjacent sampling points in the plurality of sampling points equal, avoid the problem of incoherent shaping form caused by the distance between two adjacent selection points in the plurality of selection points not being equal, and thus improve the shaping effect.
[0234] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the application, and not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application.
Claims
1. A model shaping method, characterized in that, include: Obtain the model to be shaped, wherein the model to be shaped is a dental restoration model; Receive a first control command, and determine multiple selection points on the surface of the model to be shaped according to the first control command; The coordinates of multiple sampling points are determined based on the coordinates of the multiple selected points and the first preset distance; The neighborhood point set corresponding to each sampling point is determined based on the coordinates of each sampling point, the coordinates of the vertices of the surface of the model to be shaped, and the first preset distance; The model to be shaped is shaped based on the coordinates of each sampling point and the coordinates of all neighboring points in the corresponding neighborhood point set to obtain the shaped model; The model to be shaped is a mesh model composed of multiple polygonal facets, each polygonal facet having multiple vertices. The shaping of the model to be shaped based on the coordinates of each sampling point and the coordinates of all neighboring points in the corresponding neighborhood point set yields the shaped model, including: The set of neighborhood patches corresponding to each sampling point is determined based on the coordinates of all neighboring points in the neighborhood point set corresponding to each sampling point. The normal vectors of all the neighboring patches are weighted according to the area of each neighboring patch in the set of neighboring patches corresponding to each sampling point to obtain the weighted normal vector corresponding to the sampling point. Based on the weighted normal vector corresponding to each sampling point and the preset shaping type, determine the shaping direction vector of all neighboring points in the neighborhood point set corresponding to the sampling point; Select the corresponding target calculation method based on the preset shaping type; For each neighboring point in the neighborhood point set corresponding to each sampling point, when the neighboring point has not moved, the first distance between the neighboring point and the sampling point is calculated based on the current coordinates of the neighboring point and the coordinates of the sampling point; The shaping height of the neighboring points is determined based on the first distance using the target calculation method described above. When the neighboring point has been moved, a second distance between the neighboring point and the sampling point is calculated based on the current coordinates of the neighboring point and the coordinates of the sampling point; The target calculation method is used to update the shaping height of the neighboring points based on the second distance; Based on the shaping direction vector and shaping height corresponding to each of the neighboring points in the set of all the neighboring points, the neighboring points are moved to shape the model to be shaped, thereby obtaining the shaped model.
2. The model shaping method according to claim 1, characterized in that, The step of determining the coordinates of multiple sampling points based on the coordinates of the multiple selected points and a first preset distance includes: The multiple selection points are filtered based on their coordinates and the first preset distance to obtain multiple filtered points; The coordinates of multiple sampling points on the surface of the model to be shaped are determined based on the coordinates of the multiple screening points and the first preset distance.
3. The model shaping method according to claim 2, characterized in that, The selection points are filtered based on their coordinates and the first preset distance to obtain multiple filtered points, including: When the distance between the Nth selected point and the (N+1)th selected point in the viewing direction is greater than the first preset value multiplied by the first preset distance, the (N+1)th selected point is determined as the filtering point, where N is a positive integer and its initial value is 1; Let N = N+1, and return to the step of determining the N+1th selected point as the filtering point when the distance between the Nth selected point and the N+1th selected point in the viewing direction is greater than the first preset value multiplied by the first preset distance.
4. The model shaping method according to claim 2, characterized in that, The determination of the coordinates of multiple sampling points on the surface of the model to be shaped based on the coordinates of the multiple screening points and the first preset distance includes: When the total number of the plurality of filtering points is 2, the connecting line segment of the 2 filtering points is determined based on the coordinates of the 2 filtering points; Interpolation sampling is performed on the connecting line segment according to the sampling interval of the second preset value multiplied by the first preset distance to obtain the coordinates of the sampling points on the surface of the model to be shaped, and the first screening point is also determined as the sampling point to obtain the plurality of sampling points; When the total number of the plurality of screening points is greater than 2, a curve is fitted based on the coordinates of the plurality of screening points, and interpolation sampling is performed on the curve according to the sampling interval of the second preset value multiplied by the first preset distance to obtain the plurality of sampling points.
5. The model shaping method according to claim 4, characterized in that, The coordinates of the screening point are the coordinates of the screening point when the model to be shaped has not been shaped. When the total number of the multiple screening points is greater than 2, a curve is fitted based on the coordinates of the multiple screening points, and interpolation sampling is performed on the curve according to the sampling interval of the second preset value multiplied by the first preset distance to obtain the multiple sampling points, including: When the total number of the multiple screening points is greater than 2, a first queue is constructed including the Xth screening point, the (X+1)th screening point up to the (X+Y)th screening point, where X is a positive integer with an initial value of 1, Y is a positive integer greater than 1 and a preset value, and the number of screening points included in the first queue is Y+1. Based on the coordinate fitting curve of all the screening points in the first queue, and interpolation sampling is performed on the curve according to the sampling interval of the second preset value multiplied by the first preset distance, a plurality of the sampling points including the Xth screening point in the first queue are obtained. Update the coordinates of the (X+Y)th filtering point to the coordinates of the sampling point that is closest to the (X+Y)th filtering point; Let X = X + 1, and return to the first queue that was constructed, including the Xth filter point, the (X+1)th filter point, the (X+2)th filter point, and so on up to the (X+Y)th filter point.
6. The model shaping method according to claim 5, characterized in that, The method involves fitting a curve based on the coordinates of all the selected points in the first queue, and then interpolating and sampling on the curve at a sampling interval equal to the second preset value multiplied by the first preset distance to obtain a plurality of sampling points including the Xth selected point in the first queue, including: Calculate the average coordinates of the X+Y-1th and X+Yth selection points in the first queue and use them as interpolation points; The curve is fitted based on the coordinates of all the selected points in the first queue and the coordinates of the interpolation points; Based on the length of the curve and the sampling interval of the second preset value multiplied by the first preset distance, interpolation sampling is performed on the curve to obtain a plurality of sampling points including the Xth screening point in the first queue.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the model shaping method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Peeling type laser tooth preparation method, device, and equipment and medium
CN108338848A
Grid model shaping method, terminal and storage medium
CN111523159A