Model cutting area determination method and electronic equipment
By determining the cutting area of the tooth restoration based on all collision point clouds, the high computational complexity and large computational volume problems caused by multiple iterative calculations in the prior art are solved, and a more efficient cutting process and better morphological effects are achieved.
Patent Information
- Application Number
- CN202411727031.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, the cutting process of a tooth restoration requires multiple iterative calculations, with high computational complexity and large overall calculation amounts, and it is difficult for the cutting body model to maintain a normal shape after multiple cuttings.
By determining the cutting area of the cutting model based on all collision point clouds, multiple cuttings of multiple paths are integrated into one cutting for calculation, and the collision point clouds for each cutting are fused to generate a cutting area for one cutting.
It greatly reduces the calculation amount and simplifies the cutting process, making it easier to perform one-time cutting according to the cutting area to achieve better cutting form effects.
Smart Images

Figure CN119523663A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of oral medical technology, and in particular to a method for determining a model cutting area and an electronic device. Background Art
[0002] In the field of oral medical technology, it is often necessary to cut dental restorations (such as dentures, bridges, and crown restorations) to make the dental restorations match the patient's oral physiological morphology.
[0003] In the prior art, a multiple cutting method is usually used. The multiple cutting method simulates multiple collisions between the cutting body model and the cut body model (i.e., the tooth restoration model) to gradually adjust the shape of the cut body model until an ideal occlusal effect is achieved. In the multiple cutting method, each cutting is fine-tuned and optimized based on the result of the previous cutting.
[0004] Although the multiple cutting method can be used to simulate and evaluate the effects of different restoration schemes, it requires multiple iterative calculations, has high computational complexity, and has a large overall amount of calculation. In addition, the cut body model is often difficult to maintain the normal tooth restoration morphology after multiple cutting. Summary of the invention
[0005] In response to the shortcomings of the prior art, the present application provides a model cutting area determination method and electronic device. By determining the cutting area of the cut model based on all collision point clouds, multiple cuts of multiple paths can be integrated into one cut for calculation, and the collision point clouds of each cut are fused to generate a cutting area for one cut, thereby greatly reducing the amount of calculation and facilitating subsequent cutting of the cut model according to the cutting area to achieve better cutting morphological effects.
[0006] To solve the above problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for determining a model cutting area, comprising:
[0008] Acquire a cutting model and a cut model, wherein the cut model is a tooth restoration model;
[0009] Moving the cutting model or the cut model to each of the target positions in sequence based on a displacement matrix corresponding to each of the target positions of the cutting model or the cut model;
[0010] After the cutting model or the cut model is moved to each of the target positions, collision detection is performed on the cutting model and the cut model to obtain a collision point cloud;
[0011] A cutting area of the cut model is determined based on all the collision point clouds.
[0012] In some embodiments, the step of sequentially moving the cutting model or the cut model to each of the target positions of the cutting model or the cut model based on a displacement matrix corresponding to each of the target positions includes:
[0013] When the displacement matrix corresponding to each target position of the cutting model is obtained, the cutting model is sequentially moved to the corresponding target position based on the displacement matrix corresponding to each target position of the cutting model; or
[0014] When the displacement matrix corresponding to each target position of the cut model is obtained, the cut model is sequentially moved to the corresponding target position based on the inverse matrix of the displacement matrix corresponding to each target position of the cut model; or
[0015] When the displacement matrix corresponding to each target position of the cut model is obtained, the cut model is sequentially moved to the corresponding target position based on the displacement matrix corresponding to each target position of the cut model; or
[0016] When the displacement matrix corresponding to each target position of the cutting model is obtained, the cut model is sequentially moved to the corresponding target position based on the inverse matrix of the displacement matrix corresponding to each target position of the cutting model.
[0017] In some embodiments, the cutting model or the cut model is a mesh model composed of a plurality of polygonal patches, each of which has a plurality of vertices, and after the cutting model or the cut model is moved to each of the target positions, a collision detection is performed on the cutting model and the cut model to obtain a collision point cloud, including:
[0018] After the cutting model or the cut model is moved to each of the target positions, a collision patch on the surface of the cutting model intersecting with the surface of the cut model is determined;
[0019] Determine all vertices of each of the collision patches as points in the collision point cloud;
[0020] For each vertex of the cutting model, when it is determined that the vertex of the cutting model is located inside the cut model, determining the vertex as a point in the collision point cloud;
[0021] When all vertices of all the collision patches are determined as points in the collision point cloud, and all vertices of the cutting model located inside the cut model are determined as points in the collision point cloud, a collision point cloud is obtained.
[0022] In some embodiments, determining the cutting area of the cut model based on all the collision point clouds includes:
[0023] Determine the boundary point clouds of all the collision point clouds based on the coordinates of all the points in all the collision point clouds;
[0024] A cutting area of the cut model is determined based on the boundary point cloud.
[0025] In some implementations, determining the boundary point clouds of all the collision point clouds based on the coordinates of all the points in all the collision point clouds includes:
[0026] Generating a plurality of first voxel grids that fill the three-dimensional space occupied by all the collision point clouds based on a preset voxel grid side length;
[0027] Traversing all the first voxel grids one by one, and when the first voxel grid includes at least one point in all the collision point clouds, determining the first voxel grid as a second voxel grid to obtain a plurality of the second voxel grids, otherwise determining the first voxel grid as an empty voxel grid;
[0028] Traversing all the second voxel grids one by one, when the number of empty voxel grids adjacent to the second voxel grid is greater than a preset number, determining the second voxel grid as a boundary voxel grid, and obtaining a plurality of the boundary voxel grids;
[0029] Boundary point clouds of all the collision point clouds are determined based on coordinates of points in the collision point clouds included in all the boundary voxel grids.
[0030] In some embodiments, determining the boundary point clouds of all the collision point clouds based on the coordinates of the points in the collision point clouds included in all the boundary voxel grids comprises:
[0031] Traversing all the boundary voxel grids one by one, and determining the average coordinate point of all the points in the collision point cloud included in each boundary voxel grid as the first calculation point of the boundary voxel grid;
[0032] Determine a second calculation point of each boundary voxel grid based on points in all the collision point clouds included in each boundary voxel grid, a geometric center point of the boundary voxel grid, and geometric center points of all the second voxel grids adjacent to the boundary voxel grid;
[0033] The first calculated points and the second calculated points of all the boundary voxel grids are determined as points in the boundary point cloud to obtain the boundary point cloud.
[0034] In some embodiments, determining the second calculation point of the boundary voxel grid based on all points in the collision point cloud included in each boundary voxel grid, the geometric center point of the boundary voxel grid, and the geometric center points of all the second voxel grids adjacent to the boundary voxel grid comprises:
[0035] For each of the boundary voxel grids, generate a first vector pointing from the geometric center point of the boundary voxel grid to the geometric center point of each of the second voxel grids adjacent to the boundary voxel grid, to obtain a plurality of the first vectors;
[0036] Calculate an average vector of the plurality of first vectors and use the average vector as a protrusion direction vector;
[0037] Generate a second vector pointing from the starting point of the protrusion direction vector to each point in the collision point cloud in the boundary voxel grid, and obtain a plurality of second vectors;
[0038] Perform a dot product of each of the second vectors and the protrusion direction vector to obtain a dot product value corresponding to each of the second vectors;
[0039] The point in the collision point cloud included in the second vector corresponding to the dot product value with the largest value among all the dot product values is used as the second calculation point of the boundary voxel grid.
[0040] In some embodiments, the method further comprises:
[0041] The cut model is cut based on the cut region of the cut model.
[0042] In some implementations, the cut model is a mesh model composed of a plurality of vertices, and cutting the cut model based on the cutting area of the cut model includes:
[0043] Determine a collision area of the cut model and a collision depth of each vertex in the collision area based on the cutting area of the cut model;
[0044] Searching for a plurality of first vertices whose distances from the boundary vertices of the collision area are greater than a first preset distance, and generating a deformation buffer area based on the plurality of first vertices;
[0045] Searching for two neighboring vertices of all boundary vertices of the deformation buffer area to obtain a plurality of the two neighboring vertices, and determining all the two neighboring vertices as fixed anchor points;
[0046] generating a deformation region based on the collision region, the deformation buffer region and the fixed anchor point;
[0047] The cut model is cut with a shape preservation method based on the collision depth of each vertex in the deformation area and the collision area to obtain the cut model after cutting.
[0048] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0049] at least one processor; and,
[0050] a memory communicatively connected to the at least one processor; wherein,
[0051] The memory stores instructions that can be executed 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 cutting area determination method as described in the first aspect.
[0052] The present application provides a method and electronic device for determining a model cutting area. By determining the cutting area of the cut model based on all collision point clouds, the present application can integrate multiple cuts of multiple paths into one cut for calculation, and fuse the collision point clouds of each cut to generate a cutting area for one cut, thereby greatly reducing the amount of calculation and facilitating subsequent cutting of the cut model according to the cutting area to achieve a better cutting morphological effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of the first implementation of the method for determining the model cutting area provided in the embodiment of the present application.
[0054] Figure 2 yes Figure 1 Detailed flowchart of step S300.
[0055] Figure 3 yes Figure 1 Detailed flowchart of step S400.
[0056] Figure 4 It is a schematic diagram of the superimposed display of all collision point clouds provided in the embodiment of the present application.
[0057] Figure 5 yes Figure 3 Detailed flowchart of step S410 in FIG.
[0058] Figure 6 It is a schematic diagram of a portion of the boundary point cloud provided in an embodiment of the present application.
[0059] Figure 7It is a schematic diagram of the cutting area provided in the embodiment of the present application.
[0060] Figure 8 It is a flow chart of the second implementation of the method for determining the model cutting area provided in the embodiment of the present application.
[0061] Fig. 9 yes Figure 8 Detailed flowchart of step S500.
[0062] Fig.10 It is a schematic diagram of the superimposed display of the cut model and the cut model after cutting provided in an embodiment of the present application.
[0063] Fig.11 It is a schematic top view of the cut model after cutting provided in an embodiment of the present application.
[0064] Fig.12 It is a structural schematic diagram of the model cutting area determination device provided in an embodiment of the present application.
[0065] Fig.13 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0066] Fig.14 It is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0068] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0069] The present application provides a model cutting area determination method and electronic device, which can determine the cutting area of the cut model based on all collision point clouds, integrate multiple cuts of multiple paths into one cut for calculation, and fuse the collision point clouds of each cut to generate a cutting area for one cut, thereby greatly reducing the amount of calculation and facilitating subsequent cutting of the cut model according to the cutting area to achieve a better cutting morphological effect.
[0070] The model cutting area determination method provided by the present application will be described in detail below with reference to the accompanying drawings.
[0071] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a first implementation of a method for determining a model cutting area provided in an embodiment of the present application. Figure 1 As shown, the model cutting area determination method includes: step S100 to step S400.
[0072] Step S100: obtaining a cutting model and a cut model.
[0073] The cut model is a tooth restoration model, for example, a denture model, a molar pad model, a bridge model or a crown restoration model.
[0074] Optionally, the cutting model is a three-dimensional model of a cutting piece. The cutting piece is used to cut the tooth restoration.
[0075] In some embodiments, the cutting model or the cut model is a mesh model composed of a plurality of polygonal patches, each of which has a plurality of vertices.
[0076] Step S200: moving the cutting model or the cut model to each target position in sequence based on a displacement matrix corresponding to each target position of the cutting model or the cut model.
[0077] Optionally, the target position of the cutting model is the position of the cutting piece when the cutting piece cuts the dental restoration. The target position of the cut model is the position of the dental restoration when the cutting piece cuts the dental restoration.
[0078] In some implementations, by keeping either the cutting model or the cut model stationary and moving the other model to each target position in sequence, collision detection can be performed to simulate each cutting operation.
[0079] Optionally, the coordinates of each vertex of the model are multiplied by the displacement matrix corresponding to each target position to move the model to each target position in sequence.
[0080] In some embodiments, the cut model is held stationary.
[0081] Optionally, when the displacement matrix corresponding to each target position of the cutting model is acquired, the cutting model is sequentially moved to the corresponding target position based on the displacement matrix corresponding to each target position of the cutting model.
[0082] Optionally, when the displacement matrix corresponding to each target position of the cut model is obtained, the cutting model is sequentially moved to the corresponding target position based on the inverse matrix of the displacement matrix corresponding to each target position of the cut model. At this time, the inverse matrix of the displacement matrix corresponding to each target position of the cut model is the displacement matrix corresponding to each target position of the cutting model.
[0083] In some embodiments, the cutting model is held stationary.
[0084] Optionally, when the displacement matrix corresponding to each target position of the cut model is obtained, the cut model is sequentially moved to the corresponding target position based on the displacement matrix corresponding to each target position of the cut model.
[0085] Optionally, when the displacement matrix corresponding to each target position of the cutting model is obtained, the cut model is sequentially moved to the corresponding target position based on the inverse matrix of the displacement matrix corresponding to each target position of the cutting model. At this time, the inverse matrix of the displacement matrix corresponding to each target position of the cutting model is the displacement matrix corresponding to each target position of the cut model.
[0086] By moving another model to the corresponding target position in sequence according to the inverse matrix of the displacement matrix of one model, the model cutting area determination method can be made compatible with different input information. The next step of calculation can be carried out by simply obtaining the displacement matrix corresponding to each target position of any model.
[0087] Step S300: After the cutting model or the cut model is moved to each target position, a collision detection is performed on the cutting model and the cut model to obtain a collision point cloud.
[0088] As described above, in some embodiments, the cutting model or the cut model is a mesh model composed of a plurality of polygonal patches, each of which has a plurality of vertices.
[0089] See also Figure 2 , Figure 2 yes Figure 1 Detailed flow chart of step S300 in FIG. Figure 2 As shown, step S300 includes steps S310 to S340.
[0090] Step S310: after the cutting model or the cut model is moved to each target position, a collision patch on the surface of the cutting model that intersects with the surface of the cut model is determined.
[0091] In some embodiments, the bounding boxes of all patches in the two models are calculated, and more accurate collision detection is performed on the patch pairs whose bounding boxes intersect. If any one edge of a patch on the surface of the cutting model intersects with a patch on the surface of the cut model, the patch on the surface of the cutting model is determined as a collision patch.
[0092] Optionally, an OBB tree (Oriented Bounding Box Tree) is used to improve the efficiency of collision detection. The OBB tree is a data structure used to accelerate collision detection in three-dimensional space. The OBB tree improves the efficiency of collision detection by decomposing a three-dimensional model into a series of OBBs (Oriented Bounding Boxes) and organizing them into a tree structure.
[0093] Step S320: Determine all vertices of each collision patch as points in the collision point cloud.
[0094] Optionally, some points in the collision point cloud are located inside the cut model. This is because a small number of points are vertices in the collision patch that are not located inside the cut model. In this way, a portion of the cutting area determined based on all collision point clouds will be located outside the cut model, which can ensure that the cut model is cut cleanly.
[0095] Step S330: For each vertex of the cutting model, when it is determined that the vertex of the cutting model is located inside the cut model, the vertex is determined as a point in the collision point cloud.
[0096] In some embodiments, the cut model is a closed surface model.
[0097] Optionally, whether the vertex of the cutting model is located inside the cut model is determined by a ray intersection method. Specifically, a ray is constructed along any direction with a vertex of the cutting model. If the number of intersections between the ray and the cut model is an odd number, the vertex is determined to be inside the cut model, otherwise the vertex is determined to be outside the cut model.
[0098] Step S340: When all vertices of all collision patches are determined as points in the collision point cloud, and all vertices of the cutting model located inside the cut model are determined as points in the collision point cloud, a collision point cloud is obtained.
[0099] Because at least one vertex of the collision patch is inside the cut model, there will be some duplicate vertices in the collision point cloud. It is only necessary to record the coordinates of one of the two duplicate vertices.
[0100] Step S400: determining the cutting area of the cut model based on all collision point clouds.
[0101] See also Figure 3 , Figure 3 yes Figure 1 Detailed flow chart of step S400 in FIG. Figure 3 As shown, step S400 includes steps S410 to S420.
[0102] Step S410: determining the boundary point clouds of all collision point clouds based on the coordinates of all points in all collision point clouds.
[0103] See also Figure 4 , Figure 4 Schematic diagram of all collision point clouds superimposed and displayed in the embodiment of the present application. Figure 4 As shown, in some embodiments, the red points included in area A1 are all points in the collision point cloud. When all collision point clouds are superimposed and displayed, the number of points is too dense, so Figure 4 It is shown as a red area in the figure. Most of the points in the collision point cloud are located inside the cut model 1. A small number of points in the collision point cloud are located outside the cut model 1. This is because a small number of points are vertices in the collision patch that are not located inside the cut model 1.
[0104] See also Figure 5 , Figure 5 yes Figure 3 Detailed flow chart of step S410 in FIG. Figure 5 As shown, step S410 includes steps S411 to S414.
[0105] Step S411: generating a plurality of first voxel grids that fill the three-dimensional space occupied by all collision point clouds based on a preset voxel grid side length.
[0106] Voxel is short for "volume element". A voxel grid is a fixed-size area in three-dimensional space, shaped like a cube. The default side length of a voxel grid is the side length of a cube.
[0107] After a plurality of first voxel grids that fill the three-dimensional space occupied by all collision point clouds are generated, any point in the collision point cloud is located in a first voxel grid.
[0108] In some implementations, a plurality of first voxel grids that fill a preset three-dimensional space region are generated based on a preset voxel grid side length, wherein the preset three-dimensional space region includes all collision point clouds.
[0109] Optionally, the preset three-dimensional space area is a cuboid with a preset length and width.
[0110] In some embodiments, the side length of the voxel grid can be adjusted according to the number of points in all collision point clouds to generate multiple first voxel grids that fill the three-dimensional space occupied by all collision point clouds. For example, when the number of points is large, the side length of the voxel grid can be increased.
[0111] Step S412: traverse all first voxel grids one by one, and when the first voxel grid includes at least one point in all collision point clouds, determine the first voxel grid as the second voxel grid to obtain multiple second voxel grids, otherwise determine the first voxel grid as an empty voxel grid.
[0112] The second voxel grid is a voxel grid that is not empty.
[0113] Step S413: traverse all second voxel grids one by one, and when the number of empty voxel grids adjacent to the second voxel grid is greater than a preset number, determine the second voxel grid as a boundary voxel grid to obtain a plurality of boundary voxel grids.
[0114] Optionally, the preset number ranges from 1 to 10, for example, the preset number is 1, 2, 3, 4, 5 or 10, etc.
[0115] Optionally, the number of voxel grids adjacent to a second voxel grid is 26, including 6 surface-adjacent voxel grids, 12 edge-adjacent voxel grids, and 8 corner-adjacent voxel grids.
[0116] Optionally, all voxel grids adjacent to a second voxel grid are traversed one by one, and when the number of empty voxel grids adjacent to the second voxel grid is greater than a preset number, the second voxel grid is determined as a boundary voxel grid.
[0117] Step S414: determining the boundary point clouds of all collision point clouds based on the coordinates of the points in the collision point clouds included in all boundary voxel grids.
[0118] In some embodiments, step S414 includes steps (414.1) to (414.3).
[0119] (414.1) Traverse all boundary voxel grids one by one, and determine the average coordinate point of all collision point clouds included in each boundary voxel grid as the first calculation point of the boundary voxel grid.
[0120] According to the calculation method of the first calculation point, the first calculation point of the boundary voxel grid is a point close to the geometric center point of the boundary voxel grid. The first calculation point can be used to represent the center position of the boundary voxel grid. In this way, the position of the subsequently generated boundary point cloud will not deviate too much from the position of the collision point cloud.
[0121] (414.2) Determine second calculation points of the boundary voxel grid based on points in all collision point clouds included in each boundary voxel grid, the geometric center point of the boundary voxel grid, and the geometric center points of all second voxel grids adjacent to the boundary voxel grid.
[0122] In some embodiments, step (414.2) includes steps (414.2.1) to step (414.2.5).
[0123] (414.2.1) For each boundary voxel grid, generate a first vector pointing from the geometric center point of the boundary voxel grid to the geometric center point of each second voxel grid adjacent to the boundary voxel grid, and obtain multiple first vectors.
[0124] When the voxel grid is a cube, the geometric center point of the voxel grid is the geometric center point of the cube.
[0125] (414.2.2) Calculate the average vector of the multiple first vectors and use it as the protrusion direction vector.
[0126] (414.2.3) Generate a second vector pointing from the starting point of the protrusion direction vector to each point in the collision point cloud in the boundary voxel grid, and obtain multiple second vectors.
[0127] (414.2.4) Multiply each second vector by the protrusion direction vector to obtain the dot product value corresponding to each second vector.
[0128] (414.2.5) The point in the collision point cloud included in the second vector corresponding to the dot product value with the largest value among all the dot product values is used as the second calculation point of the boundary voxel grid.
[0129] According to the calculation method of the second calculation point, the second calculation point of the boundary voxel grid is the point with the largest projection distance along the protrusion direction vector among all points of the collision point cloud included in the boundary voxel grid. In this way, the second calculation point can be used to calculate the collision depth, so that the collision depth of the subsequently generated boundary point cloud will not deviate too much from the collision depth of the collision point cloud.
[0130] (414.3) The first calculated points and the second calculated points of all boundary voxel grids are determined as points in the boundary point cloud to obtain the boundary point cloud.
[0131] In this way, only the key points used to calculate the cutting area in all collision point clouds can be retained, thereby greatly reducing the amount of calculation.
[0132] See also Figure 6 , Figure 6 Schematic diagram of a portion of the boundary point cloud provided in the embodiment of the present application. Figure 6 As shown, Figure 6The red points in the middle are points in the boundary point cloud. It can be seen that there are almost no points inside the boundary point cloud, and the boundary point cloud is almost hollow.
[0133] Step S420: determining the cutting area of the cut model based on the boundary point cloud.
[0134] Optionally, the cutting area is a three-dimensional mesh model.
[0135] In some embodiments, a surface reconstruction method such as a rolling ball method, a Poisson reconstruction method, an implicit surface reconstruction method, a surface growth method, or a deep learning method is used to determine the cutting area of the cut model based on the boundary point cloud.
[0136] See also Figure 7 , Figure 7 Schematic diagram of the cutting area provided in the embodiment of the present application. Figure 7 As shown, in some embodiments, when the rolling ball method is used to determine the cutting area 2 of the cut model 1 based on the boundary point cloud, the cutting area 2 is relatively smooth. This is because the boundary point cloud only includes the key points used to calculate the cutting area 2 in all collision point clouds, and there are no redundant points affecting the surface morphology of the cutting area 2.
[0137] See also Figure 8 , Figure 8 FIG. 2 is a flow chart of a second implementation of the method for determining a model cutting area provided in an embodiment of the present application. Figure 8 As shown, the model cutting area determination method also includes step S500.
[0138] Step S500: cutting the model to be cut based on the cutting area of the model to be cut.
[0139] In some implementations, the cut model is a mesh model consisting of a plurality of vertices.
[0140] Optionally, the cutting method includes a morphology-preserving cutting method and a direct cutting method.
[0141] See also Fig. 9 , Fig. 9 yes Figure 8 Detailed flow chart of step S500 in FIG. Fig. 9 As shown, when the morphology-preserving cutting method is adopted, step S500 includes steps S510 to S550.
[0142] Step S510: determining a collision area of the cut model and a collision depth of each vertex in the collision area based on the cutting area of the cut model.
[0143] In some embodiments, step S510 includes steps (510.1) to (510.3).
[0144] (510.1) The outer layer and the inner layer of the cutting area are separated to obtain the outer layer of the cutting area.
[0145] The surface of the cutting area far from the cut model is the outer layer, and the surface of the cutting area close to the cut model is the inner layer. In this way, the amount of calculation can be reduced.
[0146] (510.2) A ray is constructed from each vertex of the cut model along the occlusion direction vector. When the ray intersects the outer layer of the cut area, the vertex is determined as the vertex of the collision area, and the distance from the intersection of the ray with the outer layer of the cut area to the vertex is determined as the collision depth of the vertex.
[0147] (510.3) Determine a collision region based on all vertices in the collision region.
[0148] Step S520: searching for a plurality of first vertices whose distances from the boundary vertices of the collision area are greater than a first preset distance, and generating a deformation buffer area based on the plurality of first vertices.
[0149] In some embodiments, step S520 includes step (520.1) to step (520.2).
[0150] (520.1) Use a nearest neighbor query algorithm to search for multiple first vertices whose distances from the boundary vertices of the collision area are greater than a first preset distance.
[0151] The first preset distance is positively correlated with the maximum collision depth of the collision area.
[0152] Optionally, the calculation formula of the first preset distance is: L=a×dm+b, wherein L represents the first preset distance, dm represents the maximum collision depth, and a and b both represent fitting parameters.
[0153] (520.2) De-duplication processing is performed on the plurality of first vertices, and a deformation buffer region is generated based on all the first vertices after the de-duplication processing.
[0154] Step S530: searching for the second neighboring vertices of all the boundary vertices in the deformation buffer area, obtaining a plurality of second neighboring vertices, and determining all the second neighboring vertices as fixed anchor points.
[0155] Step S540: generating a deformation region based on the collision region, the deformation buffer region and the fixed anchor point.
[0156] In some embodiments, the collision area, the deformation buffer area and the fixed anchor point are combined to generate the deformation area. In this way, the fixed anchor point cannot be deformed, which can prevent the non-collision area from being modified.
[0157] Step S550: performing shape-preserving cutting on the cut model based on the collision depth of each vertex in the deformation area and the collision area to obtain the cut model after cutting.
[0158] In some embodiments, step S550 includes step (550.1) to step (550.2).
[0159] (550.1) Performing surface morphology weakening processing on the cut model based on the deformation area to obtain the cut model after the surface morphology weakening processing.
[0160] In some implementations, in order to meet the minimum thickness requirement of the cut model, it is necessary to first perform isometric calculations on the cut model to obtain a minimum thickness layer model.
[0161] In some embodiments, a first collision area between the cutting area and the cut model and a second collision area between the cutting area and the minimum thickness layer model are calculated; a first maximum collision depth between the first collision area and the second collision area is calculated; when the first maximum collision depth is greater than a first preset depth threshold, and the cut model is a molar model and the first collision area or the second collision area contains pit and fissure feature points, pit and fissure pretreatment deformation parameters are constructed according to the deformation area and pit and fissure pretreatment deformation is performed to obtain a first deformation processing result model; surface morphology weakening processing is performed on the first deformation processing result model to obtain a cut model after surface morphology weakening processing.
[0162] (550.2) Calculate the first collision deformation area between the minimum thickness layer model and the cut model after the surface morphology weakening treatment, and the second collision deformation area between the cutting area and the cut model after the surface morphology weakening treatment, and perform deformation processing based on the first collision deformation area and the second collision deformation area to obtain the deformation processing result.
[0163] In some embodiments, a first collision deformation region between the minimum thickness layer model and the cut model after the surface morphology weakening treatment is calculated; a second collision deformation region between the cut model after the surface morphology weakening treatment and the cutting region is calculated; a deformation strategy is selected based on the first collision deformation region and the second collision deformation region to perform deformation treatment on the cut model after the surface morphology weakening treatment to obtain a second deformation treatment result model. The second deformation treatment result model is also the cut model after cutting.
[0164] Optionally, a corresponding calculation formula is used according to the regional surface morphology of each collision deformation area, the collision depth of each vertex in each collision deformation area is calculated according to the collision depth of each vertex in the collision area, and then the deformation vector of each collision deformation area is calculated, and the cut model after the surface morphology weakening processing is deformed based on the deformation vector and collision depth of each vertex in each collision deformation area.
[0165] See also Fig.10 , Fig.10 1 is a schematic diagram of a cut model and a cut model after cutting provided by an embodiment of the present application. Fig.10 As shown, in some embodiments, the cut model 1 is cut in a shape-preserving manner to obtain the cut model 3 after cutting. Fig.10 The medium gray filled area represents the cut model 3 after cutting, and the unfilled grid area represents the cut surface of the cut model 1. It can be seen that the surface morphology of the cut model 3 after cutting is similar to the surface morphology of the cut model 1.
[0166] See also Fig.11 , Fig.11 Schematic diagram of a top view of a cut model after cutting provided in an embodiment of the present application. Fig.11 As shown, in some embodiments, the cut model 3 completely retains the denture morphology after cutting, and both the pits and fissures and the tooth ridges are well preserved.
[0167] In summary, the model cutting area determination method provided in the embodiment of the present application has the following advantages:
[0168] 1. By determining the cutting area of the cut model based on all collision point clouds, multiple cuts of multiple paths can be integrated into one cut for calculation, and the collision point clouds of each cut are fused to generate the cutting area of one cut, which can greatly reduce the amount of calculation and facilitate subsequent cutting of the cut model according to the cutting area to achieve better cutting morphological effects.
[0169] 2. By moving another model to the corresponding target position in sequence according to the inverse matrix of the displacement matrix of one model, the model cutting area determination method can be compatible with different input information. It is only necessary to obtain the displacement matrix corresponding to each target position of any model to proceed to the next step of calculation.
[0170] 3. By using the first calculated point as the average coordinate point of all points in the collision point cloud included in the boundary voxel grid, the first calculated point can be used to represent the center position of the boundary voxel grid, so that the position of the subsequently generated boundary point cloud will not deviate too much from the position of the collision point cloud
[0171] 4. By setting the second calculation point as the point with the largest projection distance along the protrusion direction vector among all points of the collision point cloud included in the boundary voxel grid, the second calculation point can be used to calculate the collision depth, so that the collision depth of the subsequently generated boundary point cloud will not deviate too much from the collision depth of the collision point cloud.
[0172] 5. By determining the boundary point clouds of all collision point clouds based on the coordinates of all points in all collision point clouds, only the key points used to calculate the cutting area in all collision point clouds can be retained, thereby greatly reducing the amount of calculation.
[0173] See also Fig.12 , Fig.12 Schematic diagram of the structure of the model cutting area determination device provided in the embodiment of the present application. Fig.12 As shown, the model cutting area determination device 300 includes an acquisition module 310 and a processing module 320 .
[0174] In some embodiments, the acquisition module 310 is used to acquire a cutting model and a cut model, where the cut model is a tooth restoration model.
[0175] In some embodiments, the processing module 320 is used to move the cutting model or the cut model to each target position in sequence based on the displacement matrix corresponding to each target position among multiple target positions of the cutting model or the cut model; after moving the cutting model or the cut model to each target position, collision detection is performed on the cutting model and the cut model to obtain a collision point cloud; and the cutting area of the cut model is determined based on all collision point clouds.
[0176] See also Fig.13 , Fig.13 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.13 As shown, the electronic device 400 includes: one or more processors 410 and a memory 420, Fig.13 A processor 410 is taken as an example.
[0177] In some implementations, the processor 410 and the memory 420 may be connected via a bus or other means. Fig.13 The example of connecting through bus is taken in the following.
[0178] In some embodiments, the processor 410 is used to obtain a cutting model and a cut model, where the cut model is a dental restoration model; the cutting model or the cut model is moved to each target position in turn based on a displacement matrix corresponding to each target position among multiple target positions of the cutting model or the cut model; after the cutting model or the cut model is moved to each target position, collision detection is performed on the cutting model and the cut model to obtain a collision point cloud; and the cutting area of the cut model is determined based on all collision point clouds.
[0179] In some embodiments, the memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules of the model cutting area determination method in the embodiment of the present application. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the non-volatile software programs, instructions and modules stored in the memory 420, that is, the model cutting area determination method of the above method embodiment is implemented.
[0180] In some embodiments, the memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device 400, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0181] In some embodiments, one or more modules are stored in the memory 420, and when executed by one or more processors 410, the model cutting area determination method in any of the above method embodiments is executed, for example, the above described Figure 1 The method comprises steps S100 to S400.
[0182] In some embodiments, the electronic device may be a chip, such as a data processor (DPU) chip used in a data center, or the electronic device may be a network interface card including a chip and multiple interfaces (such as a PCI / PCIE interface, a UART interface, a USB interface, etc.), or the electronic device may be a traditional server, or a server including a network interface card or a chip, wherein the server includes a host and a data processor, wherein the data processor is used to dispatch messages to the host or the data processor itself for processing, and the host is used to process messages dispatched by the data processor.
[0183] Please refer to Fig.14 , Fig.14 The computer-readable storage medium 500 stores a program code 510, which can be called by a processor to execute the model cutting area determination method described in the above method embodiment.
[0184] The computer readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk or a ROM. Optionally, 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 codes for executing any method steps in the above-mentioned model cutting area determination method. These program codes can be read from or written into one or more computer program products. The program code can be compressed, for example, in an appropriate form.
[0185] In some implementations, the embodiments of the present application further provide a computer program product, including a computer program, which implements the above-mentioned model cutting area determination method when executed by a processor.
[0186] Those of ordinary skill 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, and the computer program can be stored in a computer-readable storage medium 500. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0187] In summary, the present application provides a method for determining a model cutting area and an electronic device, the method for determining a model cutting area includes: obtaining a cutting model and a cut model, the cut model being a dental restoration model; moving the cutting model or the cut model to each target position in turn based on a displacement matrix corresponding to each target position in a plurality of target positions of the cutting model or the cut model; performing collision detection on the cutting model and the cut model after moving the cutting model or the cut model to each target position to obtain a collision point cloud; determining the cutting area of the cut model based on all collision point clouds. The present application determines the cutting area of the cut model based on all collision point clouds, and can integrate multiple cuts of multiple paths into one cut for calculation, and fuses the collision point clouds of each cut to generate a cutting area for one cut, thereby greatly reducing the amount of calculation, and also facilitating subsequent cutting of the cut model according to the cutting area to achieve a better cutting morphological effect.
[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for determining a model cutting area, characterized in that: include: Acquire a cutting model and a cut model, wherein the cut model is a tooth restoration model; Moving the cutting model or the cut model to each of the target positions in sequence based on a displacement matrix corresponding to each of the target positions of the cutting model or the cut model; After the cutting model or the cut model is moved to each of the target positions, collision detection is performed on the cutting model and the cut model to obtain a collision point cloud; A cutting area of the cut model is determined based on all the collision point clouds.
2. The method for determining a model cutting area according to claim 1, characterized in that: The step of sequentially moving the cutting model or the cut model to each of the target positions based on the displacement matrix corresponding to each of the target positions of the cutting model or the cut model comprises: When the displacement matrix corresponding to each target position of the cutting model is obtained, the cutting model is sequentially moved to the corresponding target position based on the displacement matrix corresponding to each target position of the cutting model; or When the displacement matrix corresponding to each target position of the cut model is obtained, the cut model is sequentially moved to the corresponding target position based on the inverse matrix of the displacement matrix corresponding to each target position of the cut model; or When the displacement matrix corresponding to each target position of the cut model is obtained, the cut model is sequentially moved to the corresponding target position based on the displacement matrix corresponding to each target position of the cut model; or When the displacement matrix corresponding to each target position of the cutting model is obtained, the cut model is sequentially moved to the corresponding target position based on the inverse matrix of the displacement matrix corresponding to each target position of the cutting model.
3. The method for determining a model cutting area according to claim 1, characterized in that: The cutting model or the cut model is a mesh model composed of a plurality of polygonal patches, each of which has a plurality of vertices. After the cutting model or the cut model is moved to each of the target positions, collision detection is performed on the cutting model and the cut model to obtain a collision point cloud, including: After the cutting model or the cut model is moved to each of the target positions, a collision patch on the surface of the cutting model intersecting with the surface of the cut model is determined; Determine all vertices of each of the collision patches as points in the collision point cloud; For each vertex of the cutting model, when it is determined that the vertex of the cutting model is located inside the cut model, determining the vertex as a point in the collision point cloud; When all vertices of all the collision patches are determined as points in the collision point cloud, and all vertices of the cutting model located inside the cut model are determined as points in the collision point cloud, a collision point cloud is obtained.
4. The method for determining a model cutting area according to claim 1, characterized in that: The step of determining the cutting area of the cut model based on all the collision point clouds comprises: Determine the boundary point clouds of all the collision point clouds based on the coordinates of all the points in all the collision point clouds; A cutting area of the cut model is determined based on the boundary point cloud.
5. The method for determining a model cutting area according to claim 4, characterized in that: The step of determining the boundary point clouds of all the collision point clouds based on the coordinates of all the points in all the collision point clouds comprises: Generating a plurality of first voxel grids that fill the three-dimensional space occupied by all the collision point clouds based on a preset voxel grid side length; Traversing all the first voxel grids one by one, and when the first voxel grid includes at least one point in all the collision point clouds, determining the first voxel grid as a second voxel grid to obtain a plurality of the second voxel grids, otherwise determining the first voxel grid as an empty voxel grid; Traversing all the second voxel grids one by one, when the number of empty voxel grids adjacent to the second voxel grid is greater than a preset number, determining the second voxel grid as a boundary voxel grid, and obtaining a plurality of the boundary voxel grids; Boundary point clouds of all the collision point clouds are determined based on coordinates of points in the collision point clouds included in all the boundary voxel grids.
6. The method for determining a model cutting area according to claim 5, characterized in that: The step of determining the boundary point clouds of all the collision point clouds based on the coordinates of the points in the collision point clouds included in all the boundary voxel grids comprises: Traversing all the boundary voxel grids one by one, and determining the average coordinate point of all the points in the collision point cloud included in each boundary voxel grid as the first calculation point of the boundary voxel grid; Determine a second calculation point of each boundary voxel grid based on points in all the collision point clouds included in each boundary voxel grid, a geometric center point of the boundary voxel grid, and geometric center points of all the second voxel grids adjacent to the boundary voxel grid; The first calculated points and the second calculated points of all the boundary voxel grids are determined as points in the boundary point cloud to obtain the boundary point cloud.
7. The method for determining a model cutting area according to claim 6, characterized in that: The determining the second calculation point of the boundary voxel grid based on all points in the collision point cloud included in each boundary voxel grid, the geometric center point of the boundary voxel grid, and the geometric center points of all the second voxel grids adjacent to the boundary voxel grid comprises: For each of the boundary voxel grids, generate a first vector pointing from the geometric center point of the boundary voxel grid to the geometric center point of each of the second voxel grids adjacent to the boundary voxel grid, to obtain a plurality of the first vectors; Calculate an average vector of the plurality of first vectors and use the average vector as a protrusion direction vector; Generate a second vector pointing from the starting point of the protrusion direction vector to each point in the collision point cloud in the boundary voxel grid, and obtain a plurality of second vectors; Perform a dot product of each of the second vectors and the protrusion direction vector to obtain a dot product value corresponding to each of the second vectors; The point in the collision point cloud included in the second vector corresponding to the dot product value with the largest value among all the dot product values is used as the second calculation point of the boundary voxel grid.
8. The method for determining a model cutting area according to claim 1, characterized in that: The method further comprises: The cut model is cut based on the cut region of the cut model.
9. The method for determining a model cutting area according to claim 8, characterized in that: The cut model is a mesh model composed of a plurality of vertices, and the cutting of the cut model based on the cutting area of the cut model includes: Determine a collision area of the cut model and a collision depth of each vertex in the collision area based on the cutting area of the cut model; Searching for a plurality of first vertices whose distances from the boundary vertices of the collision area are greater than a first preset distance, and generating a deformation buffer area based on the plurality of first vertices; Searching for two neighboring vertices of all boundary vertices of the deformation buffer area to obtain a plurality of the two neighboring vertices, and determining all the two neighboring vertices as fixed anchor points; generating a deformation region based on the collision region, the deformation buffer region and the fixed anchor point; The cut model is cut with a shape preservation method based on the collision depth of each vertex in the deformation area and the collision area to obtain the cut model after cutting.
10. An electronic device, characterized in that: The electronic device comprises: 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform the model cutting area determination method according to any one of claims 1 to 9.