CN110880180B - Virtual cutting algorithm of deformable object based on grid optimization - Google Patents

Virtual cutting algorithm of deformable object based on grid optimization Download PDF

Info

Publication number
CN110880180B
CN110880180B CN201911147478.6A CN201911147478A CN110880180B CN 110880180 B CN110880180 B CN 110880180B CN 201911147478 A CN201911147478 A CN 201911147478A CN 110880180 B CN110880180 B CN 110880180B
Authority
CN
China
Prior art keywords
grid
tetrahedron
edge
optimization
cutting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911147478.6A
Other languages
Chinese (zh)
Other versions
CN110880180A (en
Inventor
王沫楠
马玉政
刘峰杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin University of Science and Technology
Original Assignee
Harbin University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin University of Science and Technology filed Critical Harbin University of Science and Technology
Priority to CN201911147478.6A priority Critical patent/CN110880180B/en
Publication of CN110880180A publication Critical patent/CN110880180A/en
Application granted granted Critical
Publication of CN110880180B publication Critical patent/CN110880180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

The invention provides a virtual cutting algorithm of a deformable object based on grid optimization, which is suitable for cutting operation in virtual surgery and relates to the technical field of virtual surgery. The algorithm comprises a grid division algorithm and a grid optimization algorithm, wherein the grid division algorithm respectively executes different operations on a surface grid unit and an internal grid unit, the operations comprise inserting nodes, inserting edges, inserting planes and constructing a cutting plane, the grids are used for being separated, a notch is generated, the grid optimization algorithm comprises a selected optimization area, geometric optimization and topological optimization, the abnormal units generated after grid division are eliminated, and a good grid environment is provided for the next cutting. The invention eliminates the malformed units generated during cutting by using a local grid optimization algorithm, can ensure the cutting instantaneity and the stability of the next cutting, and realizes partial cutting and continuous cutting.

Description

Virtual cutting algorithm of deformable object based on grid optimization
Technical Field
The invention relates to the technical field of virtual operation simulation, in particular to a virtual cutting algorithm of a deformable object based on grid optimization.
Background
The virtual operation provides a virtual operation environment and an interactive operation platform for doctors, and can be used for operation planning, operation training, operation simulation teaching and the like. Compared with the traditional operation training and operation teaching, the virtual operation has low cost and can be repeatedly operated. With the continuous development of virtual reality technology and the continuous improvement of computer hardware performance, virtual surgery has been studied more and more widely. Cutting simulation of a deformable object is a basic and key technology in virtual surgery, and the virtual surgery requires high accuracy and real-time cutting simulation of the deformable object.
The current cutting simulation of deformable objects is mostly a mesh-based method, while the tetrahedral mesh-based cutting simulation method is the most widely used method at present. The tetrahedral grids can be subdivided into models with almost any shape, but pathological units can appear in the grid generation and grid division processes, so that the calculation efficiency and stability of deformation simulation can be greatly reduced by the pathological units, the grid division can greatly increase the number of grids, the calculation load is overlarge, and the simulation accuracy and instantaneity are affected. Thus, the processing of grids has been a research hotspot for cutting simulation, and how to effectively control the quantity and quality of grids has remained a challenging problem so far.
The invention provides a virtual cutting algorithm of a deformable object based on grid optimization, which is suitable for cutting operation in virtual surgery and relates to the technical field of virtual surgery. The algorithm comprises a grid division algorithm and a grid optimization algorithm, wherein the grid division algorithm respectively executes different operations on a surface grid unit and an internal grid unit, the operations comprise inserting nodes, inserting edges, inserting planes and constructing a cutting plane, the grids are used for splitting and generating cuts, the grid optimization algorithm comprises a selected optimization area, geometric optimization and topological optimization, the geometric optimization and topological optimization are used for eliminating malformed units generated after grid division, and a good grid environment is provided for the next cutting. The invention eliminates the malformed units generated during cutting by using a local grid optimization algorithm, can ensure the cutting instantaneity and the stability of the next cutting, and realizes partial cutting and continuous cutting.
Disclosure of Invention
The invention aims to solve the problem of a pathological unit in the cutting simulation of a deformable object in a virtual operation, improve the grid quality of a model, and improve the efficiency and stability of the cutting simulation.
A virtual cutting algorithm of deformable objects based on grid optimization, characterized in that the method comprises the following steps:
step one, performing grid division on all tetrahedron units intersected with a cutting track to generate a cutting surface;
Step two, grid optimization operation is carried out on the grid model, and deformed units after grid division are eliminated;
Step one, performing grid division on tetrahedral units, wherein the specific operation sequentially comprises constructing and maintaining a data structure for storing a grid model, inserting points, inserting edges and inserting faces, constructing a cutting face to split the grid, and forming a notch;
step two, grid optimization, namely performing size control on the whole tetrahedron unit, selecting an optimization area, and performing geometric optimization and topological optimization on the selected local grid;
the operation of constructing and maintaining a data structure of a storage grid model according to the step one, wherein:
for the read grid data, the grid data is stored according to a half-side structure and a half-side structure so as to be convenient for searching the adjacent relation of grid elements, and one unionfind is maintained so as to be convenient for recording the communication relation between grid nodes, and the data structures are required to be updated correspondingly every time the grid structure is changed;
the tetrahedral unit meshing insertion point operation according to step one, characterized in that:
For an internal tetrahedral mesh, if more than two sides of the tetrahedron to be cut intersect the cutting trajectory, the intersection points may constitute a polygon, a node v_inner is inserted at the center of gravity of the polygon, four points connecting v_inner with the tetrahedron, and 1-4 splitting is performed on the tetrahedron by the node v_inner; if the number of intersecting sides of the cut tetrahedron and the cutting track is not more than two, the cutting track is extended so that the number of the intersecting sides of the cutting track and the tetrahedron is more than two, the intersecting points can form a polygon, a node v_inner is inserted at the center of gravity of the polygon, the node v_inner is connected with four points of the tetrahedron, and 1-4 splitting is performed on the tetrahedron through the node v_inner;
judging whether the surface tetrahedron grid is completely cut or not, if so, inserting a node v_boundary at the midpoint of the intersection point of the cutting track and the surface triangle, connecting the v_boundary with three points positioned on the surface in the tetrahedron, and executing 1-3 splitting on the surface body through the node v_boundary; if the cutting track is a partial cutting, inserting a node v_boundary at the end point of the cutting track intersecting with the surface triangle, connecting the v_boundary with three points positioned on the surface of the tetrahedron, and executing 1-3 splitting on the surface tetrahedron through the node v_boundary;
the operation of inserting edges of the tetrahedral unit meshing described in the first step is characterized in that:
For the internal tetrahedral mesh, after 1-4 splitting is performed, each face of the original tetrahedron becomes a face f of the new tetrahedron, for the adjacent tetrahedron taking the face f as a common face, connecting the insertion point v_inner of the adjacent tetrahedron, if one of the adjacent tetrahedrons is a surface tetrahedron, connecting the insertion points v_inner and v_boundary, inserting an edge e_inner, and performing 2-3 flipping on the two adjacent tetrahedrons with the edge e_inner as a common edge, wherein a closed polygon ply composed of n points v_inner or v_boundary exists around each edge e intersecting the cutting track, and two vertices of each edge in the polygon ply and two vertices of e form one tetrahedron, namely each edge e intersecting the cutting track is a common edge of n tetrahedrons;
for a surface tetrahedral mesh, after 1-3 splitting is performed, judging whether model features need to be reserved, if the model features do not need to be reserved, the three faces of the original tetrahedron except the surface triangular face are all one face f of a new tetrahedron, for an adjacent tetrahedron taking the face f as a common face, connecting the inserting points v_inner and v_boundary of the adjacent tetrahedron, inserting a side e_boundary, and performing 2-3 overturning on the two adjacent tetrahedrons by taking the side e_boundary as a common side; if the model features need to be reserved, connecting an insertion point v_boundary of the adjacent tetrahedron, inserting a point v_mid at the intersection point of the edge with f, respectively connecting the v_boundary and the v_mid of the adjacent tetrahedron to construct an edge e_ bisection, splitting each adjacent tetrahedron into two new tetrahedrons through the edge e_ bisection to realize 2-4 splitting, wherein a closed polygon ply formed by n points v_inner or v_boundary exists around each edge e intersected with the cutting track, and two vertexes of each edge in the polygon ply and two vertexes of e form a tetrahedron, namely, each edge e intersected with the cutting track is a common edge of n tetrahedrons;
the tetrahedral unit meshing insertion and construction cutting face operation according to step one, characterized in that:
performing optimal triangulation on each edge e intersected with the cutting track, constructing a cutting surface S formed by (n-2) triangles, deleting two vertexes of the edge e and the (n-2) triangles to form 2 (n-2) tetrahedrons, namely replacing the original n tetrahedrons with the 2 (n-2) tetrahedrons, and splitting the newly generated 2 (n-2) tetrahedrons along the cutting surface S to form a notch;
the tetrahedral unit size control according to step two, wherein:
after the grid data are read, setting a value interval for the side length of the tetrahedron unit in the grid, if the length of the side in the tetrahedron unit is greater than the interval, inserting a new node at the midpoint of the side, and splitting the tetrahedron containing the side into a plurality of tetrahedrons through the node; if the length of the edge in the tetrahedral unit is smaller than the interval, performing an edge contraction operation on the edge, contracting the edge into a point, and updating all the tetrahedral units containing the edge;
The selected optimization area of step two, characterized by:
for each tetrahedron intersected with the cutting track, namely a central tetrahedron, taking the vertex of each central tetrahedron as the center, expanding outwards, searching a corresponding tetrahedron area through the vertex, fully wrapping the central tetrahedron, expanding outwards by one layer if the number of the central tetrahedrons is smaller than a threshold value, taking the newly expanded tetrahedron area as a new central tetrahedron area, and continuing searching outwards by one layer on the basis of expanding outwards by one layer if the number of the central tetrahedron areas is smaller than the threshold value;
The geometric optimization and the topological optimization in the second step are characterized in that:
The geometric optimization comprises LAPLACIAN SMOOTHING and optimization based on an objective function, namely, the position of the vertex in the tetrahedron grid is moved to improve the overall quality of the grid; the topology optimization comprises operations such as edge overturning, edge deleting, multi-face deleting, edge shrinking, face shrinking, body shrinking, multi-face shrinking and the like, namely, the improvement of the grid quality is realized by changing the connection relation among grid vertices or reconstructing four sides of a local area, when the local optimization is executed, the local grid to be processed is duplicated, the optimization operation is executed on the copy without changing the original grid structure, and only when the grid quality is improved, the copy of the local grid is used for replacing the original local grid;
The surface contraction is characterized in that a low-quality grid unit e_ illshape is searched according to the grid quality standard, three vertexes of f_ illshape are acquired for each surface f_ illshape of e_ illshape and are tried to contract into one point, then all tetrahedrons connected with the vertexes of f_ illshape are updated, smoothing operation is carried out on the contracted points, if the quality of a new grid is improved, the operation is reserved, the new local grid is used for replacing the original local grid, unionfind is updated, otherwise, local grid copies are deleted and surface contraction is carried out on the next surface;
The body contraction is characterized in that a low-quality grid unit e_ illshape is searched according to the grid quality standard, four vertexes of e_ illshape are acquired and are tried to be contracted into one point, then all tetrahedrons connected with the vertexes of e_ illshape are updated, smoothing operation is carried out on the contracted points, if the quality of a new grid is improved, the operation is reserved, the new local grid is used for replacing the original local grid, unionfind is updated, otherwise, local grid copies are deleted and body contraction is carried out on the next tetrahedron;
The multi-face contraction is characterized in that a low-quality grid cell e_ illshape is searched according to a grid quality standard, an adjacent cell which has a public plane with e_ illshape can be obtained, for two points O 1 and O 2 on two sides of a public plane, a middle area between the two points, namely a plurality of triangular patches, is obtained, all triangular patches which are mutually communicated and at least have two common points are called a component, and if the middle area of O 1 and O 2 only has one component and meets the requirement of multi-face deletion, multi-face deletion is executed; however, in the actual operation of grid optimization, the intermediate plane obtained in many cases does not meet the requirement of multi-face deletion, if there is a node in this component, then the operations of smoothing and deleting the node O and connecting O 1O2 are respectively tried to be performed on the internal point O, so as to obtain a new local tetrahedral grid, the quality of the local grid after the two operations are respectively compared with that of the original grid, if the quality of the new local grid is improved, the operation is reserved, the original local grid is replaced by the new local grid and unionfind is updated, otherwise, the original grid is reserved and other local grid copies are deleted; if there is only one component in the middle of O 1 and O 2 and there are multiple nodes in the middle, then try to shrink the nodes to one node, then perform smoothing operation on the node to get a new local tetrahedral mesh, if the quality of the new local mesh is improved, keep the operation, replace the original local mesh with the new local mesh and update unionfind, otherwise delete the shrunk nodes, connect O 1 and O 2 with surrounding edges to form tetrahedron, thus get a new local tetrahedral mesh, keep the operation if the quality of the new local mesh is improved, replace the original local mesh with the new local mesh and update unionfind, otherwise keep the original local mesh; if a plurality of components exist between O 1 and O 2, attempting to perform operations such as edge flipping, edge deletion, multi-face deletion, edge contraction, face contraction, body contraction and multi-face contraction on each component independently, performing optimal operations for each component, and if the quality of the obtained new local grid is improved compared with that of the original grid, reserving the new local grid, otherwise, reserving the original local grid; if only one component exists in the middle of O 1 and O 2, but only one node exists at a certain connection, processing according to a plurality of components for the condition that only one point is connected, and attempting to independently execute operations such as edge turning, edge deleting, multi-face deleting, edge shrinking, face shrinking, body shrinking and multi-face shrinking on each component, executing optimal operations for each component, and if the quality of the obtained new local grid is improved compared with that of the original grid, reserving the new local grid, otherwise, reserving the original local grid;
The grid optimization follows a hill climbing method, namely that only the operation capable of improving the grid quality is allowed to change the grid structure, the whole flow is that firstly dimension control is carried out on the whole tetrahedral units, then geometric optimization is carried out on each internal node, namely Laplacian smoothing is carried out firstly, if the grid quality can be improved through smoothing, next operation is carried out on the point, otherwise, optimization based on an objective function is carried out on the point, then the pathological units are searched according to the grid quality standard, edge deletion is carried out on each pathological unit, change is reserved if the grid quality is improved, otherwise multi-face shrinkage is carried out, change is reserved if the grid quality is improved, otherwise, surface shrinkage and volume shrinkage are carried out, and smoothing operation is carried out on the changed point.
Drawings
Fig. 1: flow chart of virtual cutting algorithm of deformable object based on grid optimization
Fig. 2: schematic diagram of grid performing local operations
Fig. 3: schematic of surface contraction operation
Fig. 4: schematic diagram of body contraction operation
Fig. 5: schematic of multi-sided shrink operation
Detailed Description
FIG. 1 presents a flowchart of a virtual cutting algorithm for a deformable object based on mesh optimization, and the present invention is further described in connection with the detailed description below.
The invention provides a virtual cutting algorithm of a deformable object based on grid optimization, which is characterized by comprising the following steps of:
step one, performing grid division on all tetrahedron units intersected with a cutting track to generate a cutting surface;
Step two, grid optimization operation is carried out on the grid model, and deformed units after grid division are eliminated;
Step one, performing grid division on tetrahedral units, wherein the specific operation sequentially comprises constructing and maintaining a data structure for storing a grid model, inserting points, inserting edges and inserting faces, constructing a cutting face to split the grid, and forming a notch;
step two, grid optimization, namely performing size control on the whole tetrahedron unit, selecting an optimization area, and performing geometric optimization and topological optimization on the selected local grid;
the operation of constructing and maintaining a data structure of a storage grid model according to the step one, wherein:
For the read grid data, the grid data is stored according to a half-side structure and a half-side structure so as to conveniently find the adjacent relation of grid elements, and one unionfind is maintained so as to conveniently record the communication relation among grid nodes, thereby judging whether the grid units are cut or not, and correspondingly updating the data structures when changing the grid structures each time;
the tetrahedral unit meshing insertion point operation according to step one, characterized in that:
For an internal tetrahedral mesh, if more than two sides of the tetrahedron to be cut intersect the cutting trajectory, the intersection points may constitute a polygon, a node v_inner is inserted at the center of gravity of the polygon, four points connecting v_inner with the tetrahedron, and 1-4 splitting is performed on the tetrahedron by the node v_inner; if the number of intersecting sides of the cut tetrahedron and the cutting track is not more than two, the cutting track is extended so that the number of the intersecting sides of the cutting track and the tetrahedron is more than two, the intersecting points can form a polygon, a node v_inner is inserted at the center of gravity of the polygon, the node v_inner is connected with four points of the tetrahedron, and 1-4 splitting is performed on the tetrahedron through the node v_inner;
judging whether the surface tetrahedron grid is completely cut or not, if so, inserting a node v_boundary at the midpoint of the intersection point of the cutting track and the surface triangle, connecting the v_boundary with three points positioned on the surface in the tetrahedron, and executing 1-3 splitting on the surface body through the node v_boundary; if the cutting track is a partial cutting, inserting a node v_boundary at the end point of the cutting track intersecting with the surface triangle, connecting the v_boundary with three points positioned on the surface of the tetrahedron, and executing 1-3 splitting on the surface tetrahedron through the node v_boundary;
the operation of inserting edges of the tetrahedral unit meshing described in the first step is characterized in that:
For the internal tetrahedral mesh, after 1-4 splitting is performed, each face of the original tetrahedron becomes a face f of the new tetrahedron, for the adjacent tetrahedron taking the face f as a common face, connecting the insertion point v_inner of the adjacent tetrahedron, if one of the adjacent tetrahedrons is a surface tetrahedron, connecting the insertion points v_inner and v_boundary, inserting an edge e_inner, and performing 2-3 flipping on the two adjacent tetrahedrons with the edge e_inner as a common edge, wherein a closed polygon ply composed of n points v_inner or v_boundary exists around each edge e intersecting the cutting track, and two vertices of each edge in the polygon ply and two vertices of e form one tetrahedron, namely each edge e intersecting the cutting track is a common edge of n tetrahedrons;
for a surface tetrahedral mesh, after 1-3 splitting is performed, judging whether model features need to be reserved, if the model features do not need to be reserved, the three faces of the original tetrahedron except the surface triangular face are all one face f of a new tetrahedron, for an adjacent tetrahedron taking the face f as a common face, connecting the inserting points v_inner and v_boundary of the adjacent tetrahedron, inserting a side e_boundary, and performing 2-3 overturning on the two adjacent tetrahedrons by taking the side e_boundary as a common side; if the model features need to be reserved, connecting an insertion point v_boundary of the adjacent tetrahedron, inserting a point v_mid at the intersection point of the edge with f, respectively connecting the v_boundary and the v_mid of the adjacent tetrahedron to construct an edge e_ bisection, splitting each adjacent tetrahedron into two new tetrahedrons through the edge e_ bisection to realize 2-4 splitting, wherein a closed polygon ply formed by n points v_inner or v_boundary exists around each edge e intersected with the cutting track, and two vertexes of each edge in the polygon ply and two vertexes of e form a tetrahedron, namely, each edge e intersected with the cutting track is a common edge of n tetrahedrons;
the tetrahedral unit meshing insertion and construction cutting face operation according to step one, characterized in that:
performing optimal triangulation on each edge e intersected with the cutting track, constructing a cutting surface S formed by (n-2) triangles, deleting two vertexes of the edge e and the (n-2) triangles to form 2 (n-2) tetrahedrons, namely replacing the original n tetrahedrons with the 2 (n-2) tetrahedrons, and splitting the newly generated 2 (n-2) tetrahedrons along the cutting surface S to form a notch;
the tetrahedral unit size control according to step two, wherein:
after the grid data are read, setting a value interval for the side length of the tetrahedron unit in the grid, if the length of the side in the tetrahedron unit is greater than the interval, inserting a new node at the midpoint of the side, and splitting the tetrahedron containing the side into a plurality of tetrahedrons through the node; if the length of the edge in the tetrahedral unit is smaller than the interval, performing an edge contraction operation on the edge, contracting the edge into a point, and updating all the tetrahedral units containing the edge;
The selected optimization area of step two, characterized by:
for each tetrahedron intersected with the cutting track, namely a central tetrahedron, taking the vertex of each central tetrahedron as the center, expanding outwards, searching a corresponding tetrahedron area through the vertex, fully wrapping the central tetrahedron, expanding outwards by one layer if the number of the central tetrahedrons is smaller than a threshold value, taking the newly expanded tetrahedron area as a new central tetrahedron area, and continuing searching outwards by one layer on the basis of expanding outwards by one layer if the number of the central tetrahedron areas is smaller than the threshold value;
The geometric optimization and the topological optimization in the second step are characterized in that:
The geometric optimization comprises LAPLACIAN SMOOTHING and optimization based on an objective function, namely, the position of the vertex in the tetrahedron grid is moved to improve the overall quality of the grid; the topology optimization comprises operations such as edge overturning, edge deleting, multi-face deleting, edge shrinking, face shrinking, body shrinking, multi-face shrinking and the like, namely, the improvement of the grid quality is realized by changing the connection relation among grid vertices or reconstructing four sides of a local area, when the local optimization is executed, the local grid to be processed is duplicated, the optimization operation is executed on the copy without changing the original grid structure, the copy of the local grid is used for replacing the original local grid only when the grid quality is improved, as shown in fig. 2, the upper left corner is a polyhedron O 1O2 CDEJL and is the original local grid, the upper right corner is the copy of the local grid, the lower right corner is the modified local grid, and the lower left corner is the grid after the local operation;
the surface contraction is characterized in that a low-quality grid unit e_ illshape is searched according to a grid quality standard, three vertexes of f_ illshape are acquired for each surface f_ illshape of e_ illshape and are tried to contract the surface into one point, then all tetrahedrons connected with the vertexes of f_ illshape are updated, as shown in fig. 3, a surface O 1O2O3 is a surface to be processed in a pathological unit, the surface contraction is to contract three points of O 1O2O3 into a point O, surrounding vertexes are reconnected with the point O, a grid structure is updated, a smoothing operation is performed on the contracted points, if the quality of a new grid is improved, the operation is reserved, the original local grid is replaced by the new local grid, the local grid copy is updated unionfind, and otherwise, the local grid copy is deleted and the surface contraction is performed on the next surface;
The body shrinkage is characterized in that a low-quality grid unit e_ illshape is searched according to a grid quality standard, four vertexes of e_ illshape are acquired and are shrunk to one point, all tetrahedrons connected with the vertexes of e_ illshape are updated, as shown in fig. 4, a surface O 1O2O3O4 is a pathological unit, the body shrinkage is that four points of O 1O2O3O4 are shrunk to a point O 2, surrounding vertexes are reconnected with the point O 2, a grid structure is updated, a smoothing operation is performed on the shrunk points, if the quality of a new grid is improved, the operation is reserved, the original local grid is replaced by the new local grid, unionfind is updated, otherwise, a local grid copy is deleted and the body shrinkage is performed on the next tetrahedron;
The multi-face contraction is characterized in that a low-quality grid cell e_ illshape is searched according to a grid quality standard, an adjacent cell which has a public plane with e_ illshape can be obtained, for two points O 1 and O 2 on two sides of a public plane, a middle area between the two points, namely a plurality of triangular patches, is obtained, all triangular patches which are mutually communicated and at least have two common points are called a component, and if the middle area of O 1 and O 2 only has one component and meets the requirement of multi-face deletion, multi-face deletion is executed; however, in the actual operation of grid optimization, the intermediate plane obtained in many cases does not meet the requirement of multi-face deletion, as shown in fig. 5, if there is a node in this component, as shown in fig. 5a, then the operations of smoothing and deleting the node O and connecting O 1O2 are respectively attempted to be performed on the internal point O, so as to obtain a new local tetrahedral grid, the quality of the local grid and the quality of the original grid after the two operations are respectively compared, if the quality of the new local grid is improved, the operation is reserved, the original local grid is replaced by the new local grid and unionfind is updated, otherwise, the original grid is reserved and other local grid copies are deleted; if there is only one component in the middle of O 1 and O 2 and there are multiple nodes inside, as shown in fig. 5b, then try to shrink the nodes to one node, then perform a smoothing operation on the node to get a new local tetrahedral mesh, if the quality of the new local mesh is improved, keep the operation, replace the original local mesh with the new local mesh and update unionfind, otherwise delete the shrunk nodes, connect O 1 and O 2 with surrounding edges to form a tetrahedron, thus get a new local tetrahedral mesh, keep the operation if the quality of the new local mesh is improved, replace the original local mesh with the new local mesh and update unionfind, otherwise keep the original local mesh; if there are multiple components between O 1 and O 2, as shown in FIG. 5c, then an attempt is made to perform operations such as edge flipping, edge deletion, multi-face deletion, edge contraction, face contraction, body contraction, multi-face contraction, etc. on each component individually, and perform the optimal operation for each component, if the quality of the obtained new local grid is improved compared with that of the original grid, then the new local grid is retained, otherwise the original local grid is retained; if there is only one component in the middle of O 1 and O 2, but as shown in fig. 5D, the polygons ABCDEF and DNMG are connected by means of only point D, then for this case of only one point connection, the polygon area ABCDEF is treated as one single component, the polygon DNMG is treated as one single component, and the operations of edge flipping, edge deletion, multi-face deletion, edge contraction, face contraction, volume contraction and multi-face contraction are attempted to be performed individually for each component, and an optimal operation is performed for each component, and if the quality of the resulting new local mesh is improved compared to the quality of the original mesh, then the new local mesh is reserved, otherwise the original local mesh is reserved;
The grid optimization follows a hill climbing method, namely that only the operation capable of improving the grid quality is allowed to change the grid structure, the whole flow is that firstly dimension control is carried out on the whole tetrahedral units, then geometric optimization is carried out on each internal node, namely Laplacian smoothing is carried out firstly, if the grid quality can be improved through smoothing, next operation is carried out on the point, otherwise, optimization based on an objective function is carried out on the point, then the pathological units are searched according to the grid quality standard, edge deletion is carried out on each pathological unit, change is reserved if the grid quality is improved, otherwise multi-face shrinkage is carried out, change is reserved if the grid quality is improved, otherwise, surface shrinkage and volume shrinkage are carried out, and smoothing operation is carried out on the changed point.

Claims (2)

1. A virtual cutting method of a deformable object based on grid optimization is applicable to cutting operation in virtual surgery, relates to the technical field of virtual surgery, and is characterized by comprising the following steps:
step one, performing grid division on all tetrahedron units intersected with a cutting track to generate a cutting surface;
Step two, grid optimization operation is carried out on the grid model, and deformed units after grid division are eliminated;
Step one, performing grid division on tetrahedral units, wherein the specific operation sequentially comprises constructing and maintaining a data structure for storing a grid model, inserting points, inserting edges and inserting faces, constructing a cutting face to split the grid, and forming a notch;
step two, grid optimization, namely performing size control on the whole tetrahedron unit, selecting an optimization area, and performing geometric optimization and topological optimization on the selected local grid;
the operation of constructing and maintaining the data structure of the storage grid model according to the first step comprises the following detailed steps:
for the read grid data, the grid data is stored according to a half-side structure and a half-side structure so as to be convenient for searching the adjacent relation of grid elements, and one unionfind is maintained so as to be convenient for recording the communication relation between grid nodes, and the data structures are required to be updated correspondingly every time the grid structure is changed;
according to the operation of the insertion points of the tetrahedral unit meshing described in the step one, the detailed steps are as follows:
For an internal tetrahedral mesh, if more than two sides of the tetrahedron to be cut intersect the cutting trajectory, the intersection points may constitute a polygon, a node v_inner is inserted at the center of gravity of the polygon, four points connecting v_inner with the tetrahedron, and 1-4 splitting is performed on the tetrahedron by the node v_inner; if the number of intersecting sides of the cut tetrahedron and the cutting track is not more than two, the cutting track is extended so that the number of the intersecting sides of the cutting track and the tetrahedron is more than two, the intersecting points can form a polygon, a node v_inner is inserted at the center of gravity of the polygon, the node v_inner is connected with four points of the tetrahedron, and 1-4 splitting is performed on the tetrahedron through the node v_inner;
judging whether the surface tetrahedron grid is completely cut or not, if so, inserting a node v_boundary at the midpoint of the intersection point of the cutting track and the surface triangle, connecting the v_boundary with three points positioned on the surface in the tetrahedron, and executing 1-3 splitting on the surface body through the node v_boundary; if the cutting track is a partial cutting, inserting a node v_boundary at the end point of the cutting track intersecting with the surface triangle, connecting the v_boundary with three points positioned on the surface of the tetrahedron, and executing 1-3 splitting on the surface tetrahedron through the node v_boundary;
according to the operation of inserting edges of the tetrahedral unit meshing described in the first step, the detailed steps are as follows:
For the internal tetrahedral mesh, after 1-4 splitting is performed, each face of the original tetrahedron becomes a face f of the new tetrahedron, for the adjacent tetrahedron taking the face f as a common face, connecting the insertion point v_inner of the adjacent tetrahedron, if one of the adjacent tetrahedrons is a surface tetrahedron, connecting the insertion points v_inner and v_boundary, inserting an edge e_inner, and performing 2-3 flipping on the two adjacent tetrahedrons with the edge e_inner as a common edge, wherein a closed polygon ply composed of n points v_inner or v_boundary exists around each edge e intersecting the cutting track, and two vertices of each edge in the polygon ply and two vertices of e form one tetrahedron, namely each edge e intersecting the cutting track is a common edge of n tetrahedrons;
for a surface tetrahedral mesh, after 1-3 splitting is performed, judging whether model features need to be reserved, if the model features do not need to be reserved, the three faces of the original tetrahedron except the surface triangular face are all one face f of a new tetrahedron, for an adjacent tetrahedron taking the face f as a common face, connecting the inserting points v_inner and v_boundary of the adjacent tetrahedron, inserting a side e_boundary, and performing 2-3 overturning on the two adjacent tetrahedrons by taking the side e_boundary as a common side; if the model features need to be reserved, connecting an insertion point v_boundary of the adjacent tetrahedron, inserting a point v_mid at the intersection point of the edge with f, respectively connecting the v_boundary and the v_mid of the adjacent tetrahedron to construct an edge e_ bisection, splitting each adjacent tetrahedron into two new tetrahedrons through the edge e_ bisection to realize 2-4 splitting, wherein a closed polygon ply formed by n points v_inner or v_boundary exists around each edge e intersected with the cutting track, and two vertexes of each edge in the polygon ply and two vertexes of e form a tetrahedron, namely, each edge e intersected with the cutting track is a common edge of n tetrahedrons;
according to the operation of the inserting surface and the constructing and cutting surface of the tetrahedron unit meshing in the first step, the detailed steps are as follows:
And (3) for each edge e intersected with the cutting track, performing optimal triangulation on the polygon ply surrounding the edge e, constructing a cutting surface S formed by n-2 triangles, deleting two vertexes of the edge e and the n-2 triangles to form 2 (n-2) tetrahedrons respectively, namely replacing the original n tetrahedrons with the 2 (n-2) tetrahedrons, and splitting the newly generated 2 (n-2) tetrahedrons along the cutting surface S to form a notch.
2. A method for virtually cutting a deformable object based on mesh optimization according to claim 1, wherein the tetrahedral unit size control in the second step:
after the grid data are read, setting a value interval for the side length of the tetrahedron unit in the grid, if the length of the side in the tetrahedron unit is greater than the interval, inserting a new node at the midpoint of the side, and splitting the tetrahedron containing the side into a plurality of tetrahedrons through the node; if the length of the edge in the tetrahedral unit is smaller than the interval, performing an edge contraction operation on the edge, contracting the edge into a point, and updating all the tetrahedral units containing the edge;
according to the selected optimized region in the second step, the detailed steps are as follows:
for each tetrahedron intersected with the cutting track, namely a central tetrahedron, taking the vertex of each central tetrahedron as the center, expanding outwards, searching a corresponding tetrahedron area through the vertex, fully wrapping the central tetrahedron, expanding outwards by one layer if the number of the central tetrahedrons is smaller than a threshold value, taking the newly expanded tetrahedron area as a new central tetrahedron area, and continuing searching outwards by one layer on the basis of expanding outwards by one layer if the number of the central tetrahedron areas is smaller than the threshold value;
According to the geometric optimization and the topological optimization in the second step, the detailed steps are as follows:
The geometric optimization comprises LAPLACIAN SMOOTHING and optimization based on an objective function, namely, the position of the vertex in the tetrahedron grid is moved to improve the overall quality of the grid; the topology optimization comprises edge overturning, edge deleting, multi-face deleting, edge shrinking, face shrinking, body shrinking and multi-face shrinking operations, namely, the improvement of the grid quality is realized by changing the connection relation among grid vertices or reconstructing four sides of a local area, when the local optimization is executed, the local grid to be processed is duplicated, the optimization operation is executed on the copy without changing the original grid structure, and only when the grid quality is improved, the copy of the local grid is used for replacing the original local grid;
Searching a low-quality grid unit e_ illshape according to a grid quality standard, acquiring three vertexes of f_ illshape for each surface f_ illshape of e_ illshape, attempting to shrink the vertexes into one point, updating all tetrahedrons connected with the vertexes of f_ illshape, performing smoothing operation on the shrunk points, if the quality of a new grid is improved, reserving the operation, replacing the original local grid with the new local grid, updating unionfind, otherwise deleting local grid copies and performing surface shrinkage on the next surface;
Searching a low-quality grid unit e_ illshape according to a grid quality standard, acquiring four vertexes of e_ illshape, attempting to shrink the four vertexes into one point, updating all tetrahedrons connected with the vertexes of e_ illshape, performing smoothing operation on the shrunk points, if the quality of a new grid is improved, reserving the operation, replacing the original local grid with the new local grid, updating unionfind, otherwise deleting a local grid copy and performing body shrinkage on the next tetrahedron;
Searching a low-quality grid cell e_ illshape according to a grid quality standard, acquiring an adjacent cell which has a public plane with e_ illshape, obtaining a middle area between two points O 1 and O 2 on two sides of a public plane, namely, a plurality of triangular patches, wherein all triangular patches which are mutually communicated and at least have two common points are called a component, and executing multi-surface deletion if only one component exists in the middle area of O 1 and O 2 and the requirement of multi-surface deletion is met; however, in the actual operation of grid optimization, the intermediate plane obtained in many cases does not meet the requirement of multi-face deletion, if there is a node in this component, then the operations of smoothing and deleting the node O and connecting O 1O2 are respectively tried to be performed on the internal point O, so as to obtain a new local tetrahedral grid, the quality of the local grid after the two operations are respectively compared with that of the original grid, if the quality of the new local grid is improved, the operation is reserved, the original local grid is replaced by the new local grid and unionfind is updated, otherwise, the original grid is reserved and other local grid copies are deleted; if there is only one component in the middle of O 1 and O 2 and there are multiple nodes in the middle, then try to shrink the nodes to one node, then perform smoothing operation on the node to get a new local tetrahedral mesh, if the quality of the new local mesh is improved, keep the operation, replace the original local mesh with the new local mesh and update unionfind, otherwise delete the shrunk nodes, connect O 1 and O 2 with surrounding edges to form tetrahedron, thus get a new local tetrahedral mesh, keep the operation if the quality of the new local mesh is improved, replace the original local mesh with the new local mesh and update unionfind, otherwise keep the original local mesh; if a plurality of components exist between O 1 and O 2, attempting to perform edge flipping, edge deletion, multi-face deletion, edge contraction, face contraction, body contraction and multi-face contraction operations on each component individually, performing optimal operations for each component, and if the quality of the obtained new local grid is improved compared with that of the original grid shocking, retaining the new local grid, otherwise retaining the original local grid; if there is only one component in the middle of O 1 and O 2, but there is only one node at a certain junction, then processing according to multiple components for the case of only one point connection, and attempting to perform edge flipping, edge deletion, multi-face deletion, edge contraction, face contraction, body contraction and multi-face contraction operations on each component individually, performing the optimal operation for each component, and if the quality of the obtained new local grid is improved compared with that of the original grid, retaining the new local grid, otherwise retaining the original local grid;
The grid optimization follows a hill climbing method, namely that only the operation capable of improving the grid quality is allowed to change the grid structure, the whole flow is that firstly dimension control is carried out on the whole tetrahedral units, then geometric optimization is carried out on each internal node, namely Laplacian smoothing is carried out firstly, if the grid quality can be improved through smoothing, next operation is carried out on the point, otherwise, optimization based on an objective function is carried out on the point, then the pathological units are searched according to the grid quality standard, edge deletion is carried out on each pathological unit, change is reserved if the grid quality is improved, otherwise multi-face shrinkage is carried out, change is reserved if the grid quality is improved, otherwise, surface shrinkage and volume shrinkage are carried out, and smoothing operation is carried out on the changed point.
CN201911147478.6A 2019-11-21 2019-11-21 Virtual cutting algorithm of deformable object based on grid optimization Active CN110880180B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911147478.6A CN110880180B (en) 2019-11-21 2019-11-21 Virtual cutting algorithm of deformable object based on grid optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911147478.6A CN110880180B (en) 2019-11-21 2019-11-21 Virtual cutting algorithm of deformable object based on grid optimization

Publications (2)

Publication Number Publication Date
CN110880180A CN110880180A (en) 2020-03-13
CN110880180B true CN110880180B (en) 2024-05-14

Family

ID=69729225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911147478.6A Active CN110880180B (en) 2019-11-21 2019-11-21 Virtual cutting algorithm of deformable object based on grid optimization

Country Status (1)

Country Link
CN (1) CN110880180B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833452B (en) * 2020-07-21 2024-01-30 武汉大势智慧科技有限公司 Cutting method and system for polyhedral cutting triangular net

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19621434A1 (en) * 1995-05-29 1996-12-12 Nec Corp Generation of triangular or tetrahedral mesh for finite difference analysis
CN108537886A (en) * 2018-04-09 2018-09-14 哈尔滨理工大学 High quality mesh generation and optimization method in a kind of cutting of virtual operation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19621434A1 (en) * 1995-05-29 1996-12-12 Nec Corp Generation of triangular or tetrahedral mesh for finite difference analysis
CN108537886A (en) * 2018-04-09 2018-09-14 哈尔滨理工大学 High quality mesh generation and optimization method in a kind of cutting of virtual operation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郁松 ; 樊晓平 ; 廖志芳.虚拟手机中顶点复制切割算法的设计研究.小型微型计算机***.2010,第31卷(第5期),全文. *

Also Published As

Publication number Publication date
CN110880180A (en) 2020-03-13

Similar Documents

Publication Publication Date Title
Fang et al. Delaunay triangulation using a uniform grid
US5553206A (en) Method and system for producing mesh representations of objects
KR100233972B1 (en) Compression of simple geotric models using spanning trees
CN112561788B (en) Two-dimensional unfolding method of BIM model and texture mapping method and device
CN114529633B (en) Method for supporting continuous LOD (level of detail) drawing of GIS (geographic information system) line object and surface object
JP3034483B2 (en) Object search method and apparatus using the method
CN109461209B (en) Novel structural grid generation method
CN110880180B (en) Virtual cutting algorithm of deformable object based on grid optimization
CN115222806B (en) Polygon processing method, device, equipment and computer readable storage medium
CN113868476A (en) Octree point cloud preprocessing method based on local density
CN109712227B (en) Voxel terrain management method
Pai et al. New aspects of the CISAMR algorithm for meshing domain geometries with sharp edges and corners
CN115047825A (en) Method for displaying numerical control machining milling in real time
Danilov Unstructured tetrahedral mesh generation technology
US6577308B1 (en) Data processing method and apparatus and information furnishing medium
Miranda et al. Surface mesh regeneration considering curvatures
CN109827585B (en) Method for rapidly filling concave area in grid map
Gold Spatial data structures—the extension from one to two dimensions
CN116912457A (en) Topology reconstruction method and system based on external memory octree STL model
CN109359224B (en) Material data processing method and device, electronic equipment and storage medium
CN115330971A (en) Geometric model lightweight method for rendering performance optimization
JP3286213B2 (en) Method and system for compressing and decompressing geometric models
CN115087983A (en) Method and system for hybrid modeling using geometric patches
CN117390775B (en) Viscous Cartesian grid generation method, viscous Cartesian grid generation equipment, viscous Cartesian grid medium and viscous Cartesian grid generation system
CN112381950B (en) Grid hole repairing method, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant