WO2021007935A1 - Vr-based guide plate 3d printing model construction method - Google Patents

Vr-based guide plate 3d printing model construction method Download PDF

Info

Publication number
WO2021007935A1
WO2021007935A1 PCT/CN2019/104404 CN2019104404W WO2021007935A1 WO 2021007935 A1 WO2021007935 A1 WO 2021007935A1 CN 2019104404 W CN2019104404 W CN 2019104404W WO 2021007935 A1 WO2021007935 A1 WO 2021007935A1
Authority
WO
WIPO (PCT)
Prior art keywords
cutting
guide plate
model
mesh
vertices
Prior art date
Application number
PCT/CN2019/104404
Other languages
French (fr)
Chinese (zh)
Inventor
覃文军
林国丛
董智伟
张力
王同亮
杨金柱
栗伟
曹鹏
冯朝路
赵大哲
Original Assignee
东北大学
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 东北大学 filed Critical 东北大学
Publication of WO2021007935A1 publication Critical patent/WO2021007935A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B29WORKING OF PLASTICS; WORKING OF SUBSTANCES IN A PLASTIC STATE IN GENERAL
    • B29CSHAPING OR JOINING OF PLASTICS; SHAPING OF MATERIAL IN A PLASTIC STATE, NOT OTHERWISE PROVIDED FOR; AFTER-TREATMENT OF THE SHAPED PRODUCTS, e.g. REPAIRING
    • B29C64/00Additive manufacturing, i.e. manufacturing of three-dimensional [3D] objects by additive deposition, additive agglomeration or additive layering, e.g. by 3D printing, stereolithography or selective laser sintering
    • B29C64/30Auxiliary operations or equipment
    • B29C64/379Handling of additively manufactured objects, e.g. using robots
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B33ADDITIVE MANUFACTURING TECHNOLOGY
    • B33YADDITIVE MANUFACTURING, i.e. MANUFACTURING OF THREE-DIMENSIONAL [3-D] OBJECTS BY ADDITIVE DEPOSITION, ADDITIVE AGGLOMERATION OR ADDITIVE LAYERING, e.g. BY 3-D PRINTING, STEREOLITHOGRAPHY OR SELECTIVE LASER SINTERING
    • B33Y50/00Data acquisition or data processing for additive manufacturing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/41Medical
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2008Assembling, disassembling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2012Colour editing, changing, or manipulating; Use of colour codes

Definitions

  • the invention relates to the field of 3D technology, in particular to a method for establishing a 3D printing model of a guide plate based on VR.
  • 3D printing technology can not only be customized according to individual needs. For example, in the medical field, it can achieve complete matching of materials and diseased parts, perform in-situ printing of bone defect parts, and print some Free complex structures that are difficult to manufacture by traditional methods.
  • 3D printing has been successfully applied to the field of orthopedics and dentistry on a large scale.
  • a batch of customized osteotomy guides, orthopedic implants and dental implants based on 3D printing for patients have obtained European conformity (CE) certification and the United States. Food and Drug Administration (Food and Drug Administration, referred to as FDA) approved for clinical use.
  • CE European conformity
  • FDA Food and Drug Administration
  • the full name of the surgical guide is the "surgical navigation physical template". It is one of the first batch of 3D printing technology's main application achievements in medical treatment. Its main function is to help accurate fracture reduction, auxiliary screws and other implants or instruments to reach predetermined positions and assist The precise cutting of the scalpel not only improves the convenience of the operation, but also significantly improves the accuracy of the operation.
  • the use of 3D printed guide plates to assist surgery has high accuracy, reduced intraoperative risks, high surgical safety, and satisfactory clinical efficacy. It is an effective, feasible and worthy of promotion technology. However, it is necessary to print out the actual diseased part for observation, which not only wastes printing materials and printing time, but also the printed model cannot be restored after a cutting drill and needs to be printed again.
  • the present invention provides a VR-based guide plate 3D printing model establishment method, which solves the problems of large printing material loss and long printing time during surgical planning and pre-operative training in 3D printing in the prior art.
  • the main technical solutions adopted by the present invention include:
  • An embodiment of the present invention provides a VR-based 3D printing model building method of a guide plate, which includes:
  • the cutting position and the cutting target model are obtained based on the plane cutting of the cut model
  • the cutting position and the cutting target model obtained based on the plane cutting of the cut model includes:
  • the cut model is divided according to the relative position of the mesh vertex of the cut model and the cutting plane to generate model cuts, wherein the cut model is composed of a plurality of triangular faces, and the triangular faces are composed of Composed of three vertices of the grid;
  • the cut of the model is filled by adding a triangular mesh to form the cut target model.
  • the segmenting the cut model according to the relative position of the mesh vertex of the cut model and the cutting plane includes:
  • the judgment is made according to the dot product of the vector formed by the local coordinates of the grid vertex and the local coordinates of a point on the tangent plane and the local coordinate normal vector. If the dot product is greater than or equal to 0, the grid The vertex is added to the first vertex set, and the corresponding label value is set in the label array; if the dot product is less than 0, the mesh vertex is added to the second vertex set , And set the corresponding tag value to 0 in the tag array.
  • the segmenting the cut model according to the relative position of the mesh vertex of the cut model and the cutting plane further includes:
  • the three mesh vertices of the triangle face are all located on one side of the cutting plane, the three mesh vertices of the triangle face are divided into the first triangle face set or the second triangle Face set
  • the triangular face is cut according to the label value corresponding to the vertex index of the triangular face, and the cut triangular faces are added separately To the first set of triangles and the second set of triangles.
  • the cutting the triangular face according to the label value corresponding to the vertex index of the triangular face includes:
  • Two cutting points are formed according to the intersection of the cutting plane and the triangular surface, and the coordinate positions of the two cutting points are obtained, and the two cutting points are connected to form the boundary of the model cut;
  • the two cutting points are added to the first set of vertices and the second set of vertices, respectively.
  • said performing surface mesh extraction according to the mesh information of the cutting target model, and generating a film with a preset thickness on the surface of the cutting target model includes:
  • the cutting points on the edges of the upper surface of the film and the lower surface of the film are connected pair by pair to form a triangle surface to obtain the film.
  • the extraction of the grid information of the cutting target model based on the spherical area grid extraction method includes:
  • the triangle surface of the cutting target model if the three vertex indexes are all in the spherical area, the triangle surface is located in the spherical area;
  • the triangular face is cut according to the cutting plane to obtain two cutting points, which will be located between the three vertex indexes and the two cutting points. Points are generated by cutting and new triangles generated by division after cutting are divided into the spherical area;
  • the step of using a rectangular plate to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface includes:
  • the grid vertices of the guide plate are generated according to the apex coordinates of the rectangular plate, and the grid vertices of the guide plate are connected with the cutting points on the film to form a triangular mesh to form the surface of the guide plate.
  • the construction of 4 planes by using the coordinates of the rectangular plate includes:
  • the rectangular plate After the rectangular plate is translated by the preset thickness distance, it is used as a plane for cutting both ends of the upper surface of the film to obtain the remaining two planes among the four planes.
  • the mesh vertices of the guide plate are connected with the cutting points on the film to form a triangular mesh to form the surface of the guide plate, including:
  • the upper half of the mesh vertices of the mesh vertices of the guide plate are connected with the cutting points of the upper half circle to form a triangular mesh to obtain the upper surface of the guide plate;
  • the lower half of the grid vertices of the grid vertices of the guide plate are connected with the cutting points of the lower half circle to form a triangular mesh to obtain the lower surface of the guide plate;
  • the guide plate surface is formed according to the upper surface of the guide plate and the lower surface of the guide plate.
  • the beneficial effects of the present invention are: the VR-based guide plate 3D printing model establishment method provided by the embodiments of the present invention.
  • the VR-based guide plate 3D printing model establishment method provided by the embodiments of the present invention.
  • by modeling the cutting position and guide plate of the cut model in the VR scene it can be used in virtual reality. Repeat multiple cutting operations on the real surgical object without limitation, and generate a 3D guide plate print model at the cutting position.
  • building a 3D guide plate printing model in virtual reality can reduce the operation difficulty and production time compared with the traditional direct 3D printing guide plate model.
  • FIG. 1 is a flowchart of a method for establishing a 3D printing model of a guide plate based on VR according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a common UI interaction interface provided in an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a UI interaction interface of a VR scene provided in an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of the UI interface in FIG. 3 according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an interface for setting the tool shown in FIG. 4 in an example of the present disclosure
  • Fig. 6 is a flowchart of step S110 in Fig. 1 according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of a model cutting algorithm in an embodiment of the present invention.
  • FIG. 8 is a flowchart of step S120 in FIG. 1 according to an embodiment of the disclosure.
  • FIG. 9 is a schematic diagram of a triangle surface segmentation in an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a cutting target model constructed in a VR scene in an embodiment of the present invention.
  • Fig. 11 is a schematic diagram of the guide plate model when the handle is used to lock the guide plate model in an embodiment of the present invention
  • FIG. 12 is a schematic diagram of the card slot model when the handle is used to lock the card slot model in an embodiment of the present invention
  • FIG. 13 is a schematic diagram of the guide plate model when the handle is used to move the guide plate model in an embodiment of the present invention
  • FIG. 14 is a schematic diagram of generating a double guide plate model in an embodiment of the present invention.
  • Figure 15 is a schematic diagram of generating a semi-guide plate model in an embodiment of the present invention.
  • virtual reality is an emerging technology applied in the medical field in recent years, and its application in combination with traditional medical treatment also has great potential.
  • For the surgical traps found make corresponding preparations for the extraction of the difficulties that may be encountered during the operation, which is more conducive to the determination of the surgical site and the determination of the corresponding guide plate design.
  • 3D printing alone is not only a waste of printing materials and printing time, but the printed model cannot be restored after a cutting drill and needs to be printed again.
  • the real human tissue and organ model can be repeatedly cut multiple times until the optimal model solution is found, which fully reflects the advantages of virtual reality.
  • Fig. 1 is a flowchart of a method for establishing a 3D printing model of a guide plate based on VR according to an embodiment of the present invention. As shown in Fig. 1, the method includes the following steps:
  • step S110 in the virtual reality VR scene, the cutting position and the cutting target model are obtained based on the plane cutting of the cut model;
  • step S120 surface mesh extraction is performed according to the mesh information of the cutting target model, and a film with a preset thickness is generated on the surface of the cutting target model;
  • step S130 a rectangular plate is used to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface;
  • step S140 a 3D printing model of the guide plate in the VR scene is constructed according to the position of the guide plate slot and the guide plate plane.
  • the present invention provides a VR-based 3D printing model establishment method and software system.
  • the innovation of the present invention lies in the combination of virtual reality technology and the use of virtual reality realism and three-dimensionality.
  • it can automatically generate a 3D guide model of the surgical site in virtual reality, or manually perform a personalized design, which is more three-dimensional, immersive and convenient than ordinary 3D printing design software with a computer screen mouse operation, reducing the difficulty of operation And production time.
  • the present invention mainly includes the following three steps in specific implementation:
  • the first step is to construct a virtual workbench scene: construct an operating room workbench environment, and realize real-time import and export of models;
  • the second step is to design the UI interface suitable for the computer display screen and the virtual interactive interface in virtual reality respectively;
  • the third step is to construct various cutting tools, guide generation tools and design corresponding cutting algorithms and guide automatic generation algorithms.
  • Step 1 Build a virtual workbench scene
  • Step 2 Design a user interface (User Interface, UI for short) for virtual interaction
  • FIG. 2 is a schematic diagram of a common UI interaction interface provided in an embodiment of the present invention.
  • the common scene UI interface includes a menu option list and buttons corresponding to different functions.
  • the menu option list includes loading models and Set up and import models.
  • By clicking the "Load Model” button you can pop up the file explorer, select the model file and import it into the system.
  • the model is displayed in the center of the interface. It also includes the rotation operation of the model. For example, you can select the model to rotate up and down or left and right by checking .
  • By clicking the "reset” button you can cancel the import model and return to the initial state; by clicking the "import model” button, confirm the import model and load the VR scene.
  • FIG. 3 is a schematic diagram of a VR scene UI interaction interface provided in an embodiment of the present invention.
  • the VR scene UI needs to design a special interaction interface due to the uniqueness of the input and output device VR helmet and handle.
  • the range of the interface that can be placed is usually determined by the size of the hardware (mobile phone, computer screen). In the virtual world, it has a 360° field of view.
  • the interface can be placed anywhere. If the interface position is fixed, the user It is likely that you need to turn around frequently to interact with the interface. If the position of the interface is not fixed, it is easy to be embedded in objects in the VR scene when the interface moves, which affects the user experience.
  • the system design interface of the present invention is called up by the user clicking the handle menu button, and the interface placement position is specified by the user using the handle.
  • the user can repeatedly click the menu button to reposition the interface position.
  • the console in the foreground and the UI interface in the background includes the console in the foreground and the UI interface in the background.
  • the current mainstream interaction method is to use the handle to emit rays and hover in the scene of the virtual interface.
  • the user does not need to walk, nor does it need to reach out to touch the UI interface, to avoid problems such as touching the wall in reality.
  • the disadvantage is that the interface location needs to be far away from the user, and it is easily blocked by objects in the scene, and the ray operation does not conform to the user's behavior habits. Therefore, considering that the system interface button of the present invention is simple and the pop-up distance from the handle is relatively short, the direct contact interaction method is still adopted, which is simpler and easier to use, and conforms to the behavioral habits in reality.
  • Toolbar menu click the menu button of the handle to open the toolbar.
  • Figure 4 is a schematic diagram of the UI interface in Figure 3 of an embodiment of the present invention. As shown in Figure 4, the interface provides five operating tools for users to use. Use the handle selection key to click "Create” to generate the corresponding tools. Before the interface, click "Clear” to delete the corresponding tools in the scene in order.
  • the 5 operating tools include:
  • 1Cutting tool used to cut the plane of the model imported into the system and the model generated by the system as a whole;
  • 2Partial cutting tool used to cut the model imported into the system and the local mesh of the model generated by the system;
  • 3Single guide plate generation tool Generate a rectangular plate for users to use, and use the rectangular plate to generate a corresponding size guide plate at the cutting position;
  • 4Double guide plate generation tool generate two rectangular plates for users to use, and use rectangular plates to generate two guide plates of corresponding size sharing a grid at the cutting position;
  • Semi-guide plate generation tool Generate a rectangular plate for users to use, and use the rectangular plate to generate a single-sided guide plate of the corresponding size at the cutting position.
  • Model operation menu select the object to be operated, hold down the handle selection button and click the handle menu button to open the related setting menu:
  • FIG. 5 is a schematic diagram of an interface for setting the tool shown in Figure 4 in an example of the present disclosure. As shown in Figure 5, the following settings can be made:
  • 1Set size You can drag the bar in the interface to change the length, width and height of the object by dragging the handle of the customs clearance.
  • the text box on the right displays the corresponding value. Click the text box to manually enter the precise value.
  • 2Set color provide multiple color buttons, click the button to change the object to the color corresponding to the button, click more to change the color of the button in the interface.
  • 3Copy object copy the object.
  • step S110 in the virtual reality VR scene, the cutting position and the cutting target model are obtained based on the plane cutting of the cut model.
  • the cutting tool in this embodiment is a scalpel tool used to cut the model imported into the system and the entire model generated by the system. It can not only cut the human tissue model imported into the system, but also automatically generate the system. Trim the guide plate.
  • Fig. 6 is a flowchart of step S110 in Fig. 1 according to an embodiment of the present invention, which specifically includes the following steps:
  • step S601 the cutting position and cutting plane for the cut model are determined according to the position of the cutting tool.
  • step S602 the cut model is divided according to the relative positions of the mesh vertices of the cut model and the cutting plane to generate model cuts, wherein the cut model is composed of a plurality of triangular faces, and The triangular surface is composed of three mesh vertices.
  • this step includes dividing the vertices of the mesh, which specifically includes:
  • the grid vertex is added to the first vertex set, and the corresponding tag value is set to 1 in the tag array 5) If the dot product is less than 0, add the grid vertices to the second set of vertices, and set the corresponding tag value to 0 in the tag array.
  • this step further includes dividing the triangle surface, which specifically includes:
  • cutting the triangular face according to the label value corresponding to the vertex index of the triangular face further includes:
  • two cutting points are formed according to the intersection of the cutting plane and the triangular plane, and the coordinate positions of the two cutting points are obtained, and the two cutting points are connected to form the boundary of the model cut;
  • the two The coordinate position of the cutting point and the original three mesh vertices of the triangular face form three new triangular faces, and the three new triangular faces are added to the first triangular face set and the second triangular face And add the two cutting points to the first vertex set and the second vertex set respectively.
  • step S603 the model cut is filled by adding a triangular mesh to form the cut target model.
  • the principle of the model cutting algorithm used in step S120 is to determine a plane in space coordinates according to the position of the scalpel, and then calculate the relative position of each mesh vertex of the cut model to the plane, and establish two new vertices
  • the array maps the grid vertices on the left and right respectively.
  • the three triangles with all vertices on one side are assigned to the left and right triangle arrays according to the mapping relationship, and the triangles with not all vertices on one side intersect the cutting plane.
  • After calculating the intersection points divide these triangles and record the division The points are added to the corresponding vertex array, and finally the split points on both sides are connected to stitch the triangles, and the holes exposed by the cut objects are filled.
  • Fig. 7 is a flowchart of a model cutting algorithm in an embodiment of the present invention, which specifically includes the following steps:
  • Step S701 divide the mesh vertices on the left side of the tangent plane into group A, and divide the mesh vertices on the right side into group B;
  • Step S702 traverse the triangle face array
  • Step S703 It is judged whether the three mesh vertices are all in the A group, if yes, then join the A group, if otherwise, go to step S704;
  • Step S704 judge whether the three mesh vertices are in group B, if yes, then join the group B, if not, go to step S705;
  • Step S705 cutting the triangular face
  • Step S706 adding mesh vertices to group A or group B respectively;
  • Step S707 stitch the triangular faces according to the cutting points.
  • the key to dividing the triangular surface is to calculate the space coordinates of the cutting points M1 and M2 of the tangent surface and the triangular surface.
  • the calculation formula is as follows:
  • Scalar1 is the ratio of the distance from M1 to R[xi] to the distance from R[yi] to R[xi].
  • M2 can be calculated in the same way.
  • the original object model grid is divided into two halves, but because the model grids are all surface grids, the interior is empty and there is no grid, so when the model is cut, the interior of the grid is exposed When it comes out, a cavity is formed, and the model with the cavity does not meet the sealing requirements of 3D printing. Therefore, it is necessary to add a triangular mesh to the model cut for stitching, as follows:
  • the first step is to find the vertices of the cut boundary of the model, and from the above step of cutting the mesh vertices, all the M1 and M2 cutting points generated by the cut triangles are connected to form the cut boundary of the model, so only a new one needs to be created in the cutting step Vertex set M, put all the cutting points in pairs into the new vertex set M, and then take the first cutting point in the first pair of cutting points in the set M as the reference, traverse the remaining cutting point pairs, each pair The cutting point is connected with the first cutting point to form a triangular surface, and after the traversal is completed, the cavity is filled by the triangular grid.
  • the model of the surgical guide is constructed. This part is based on the mesh information of the cut part of the human tissue model, and a certain range of film with a certain thickness is automatically generated along the surface of the tissue model. Because the film is completely with the target surface Fit, after 3D printing, it can be used as a surgical aid to support, fix, and accurately position during the operation. In addition, the doctor performs multiple cutting drills on the patient’s tissue and organ model in the VR scene to determine the cutting position during the operation. This technology can also generate diversified guide plates that are exactly the same as the cutting direction at the target cutting site, which plays a key role in the auxiliary cutting of the operation.
  • step S120 surface mesh extraction is performed according to the mesh information of the cutting target model, and a film with a preset thickness is generated on the surface of the cutting target model.
  • the system of the present invention uses a standard rectangular plate in Unity to simulate the guide plate slot, and the corresponding length can be obtained by setting the length, width and height of the rectangular plate.
  • the size of the guide plate In this step, a certain range of surface meshes are extracted from the cutting target model, and after duplication, inversion, displacement, and edge stitching, a film with a preset thickness is obtained.
  • Fig. 8 is a flowchart of step S120 in Fig. 1 of an embodiment of the disclosure, which specifically includes the following steps:
  • step S801 the mesh information of the cutting target model is extracted based on the spherical region mesh extraction method to obtain the lower surface of the film.
  • step S802 the lower surface of the thin film is displaced by the preset thickness in the direction of the normal vector of the lower surface of the thin film, and repeated points are searched for the displaced mesh vertices.
  • step S803 the coordinate after the displacement of the repeated point is calculated, and the displaced repeated point is corrected based on the coordinate to the upper surface of the film.
  • step S804 the cutting points on the edges of the upper surface of the film and the lower surface of the film are connected pair by pair to form a triangle surface to obtain the film.
  • the extraction range of the surface grid is the range of the film. Due to the variety of actual operations and the large differences in the surgical site, there are different requirements for the size and shape of the film, no matter what extraction rule is designed It is difficult to be universally applicable to different surgical sites. Therefore, the system of the present invention adopts a unified spherical area grid extraction method, and provides cutting tools for the doctor, so that the doctor can manually adjust and modify the generated film guide to make it shape And size can meet the diverse needs of surgery.
  • step S801 extracting the mesh information of the cutting target model based on the spherical region mesh extraction method includes:
  • the triangular face is cut according to the cutting plane to obtain two cutting points, which will be located between the three vertex indexes and the Two cutting points are generated by cutting and new triangles generated after cutting are divided into the spherical area;
  • the specific implementation process of the spherical area grid extraction method of the system of the present invention is as follows:
  • the single vertex in the area is Top
  • the outside of the area is L and R
  • the cutting points generated by cutting are LS and RS.
  • RS is the same. Taking LS as an example, the calculation formula is as follows:
  • the surface mesh After the surface mesh is extracted in the previous step, the surface mesh needs to be replicated to produce a film with a preset thickness. A mesh model without thickness cannot be 3D printed.
  • the specific steps for producing the film are as follows:
  • Thickness is the thickness of the film, which can be regarded as a new layer of mesh obtained after each vertex of the mesh is displaced in the direction of its normal vector by Thickness units. This new layer of mesh will be used as the upper surface of the film, the original mesh As the bottom surface of the film.
  • the specific processing method is: first find out the duplicate points, because the number of duplicate points is not consistent with each other, so the set ArrayList structure is used to store the duplicate points; then each set of duplicate points is nested into the record how many sets of duplicate points In the ArrayList collection, finally calculate the coordinates of each set of repeated points after displacement:
  • Rate is the ratio of the average normal vector of the repeated points to the normal vector of the new point
  • vi is the coordinate of any point in the repeated point.
  • step (1) to use the original mesh as the lower surface mesh, it is necessary to reverse the order of the normal vector and the triangle face index, reverse the normal vectors of the original mesh vertices one by one, and reverse the triangle Surface data is fine.
  • step S130 a rectangular plate is used to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface.
  • this step specifically includes:
  • four planes are constructed using the rectangular plate coordinates, and the upper surface of the film and the lower surface of the film are respectively cut based on the four planes, and the position of the cutting is the position of the guide plate slot.
  • the way to obtain four planes is to use the left and right sides of the rectangular plate as the planes for cutting both ends of the lower surface of the film to obtain two of the four planes; translate the rectangular plate to the preset After the thickness distance, the two ends of the upper surface of the film are cut as planes to obtain the remaining two planes among the four planes.
  • the grid vertices of the guide plate are generated according to the coordinates of the vertices of the rectangular plate, and the grid vertices of the guide plate are connected with the cutting points on the film to form a triangular mesh to form the surface of the guide plate.
  • the coordinate information of the rectangular plate is used to construct 4 planes, and the upper and lower surfaces of the film are cut twice to remove the grid in the middle part.
  • the free part is the position of the card slot.
  • This step includes: 1) Obtain the cutting direction according to the coordinates of the upper and lower vertices of the rectangular plate; combine the cutting direction to cut the film 4 times according to the 4 planes to obtain the upper half circle cutting point and the lower half Circle cutting points; 2) The upper half of the mesh vertices of the grid vertices of the guide plate are connected with the upper half circle cutting points to form a triangular mesh to obtain the upper surface of the guide plate; 3) The grid vertices of the guide plate The vertices of the bottom half of the grid in the bottom half are connected with the cutting points of the bottom half circle to form a triangular mesh to obtain the lower surface of the guide plate; 4) The guide plate surface is formed according to the upper surface of the guide plate and the lower surface of the guide plate.
  • the middle part of the film needs to be cut to free the position of the guide plate.
  • the inner surface of the guide plate is connected with the lower surface of the film, and the outer surface of the guide plate is connected with the upper surface of the film. Since the guide plate itself also has thickness, that is, the inner and outer surfaces need to be staggered, the system of the present invention selects the left and right sides of the rectangular plate as the planes at both ends of the lower surface of the cutting film, and translates the two sides by the thickness distance left and right as the upper surface of the cutting film. The plane at both ends.
  • the principle of cutting is basically the same as the above model cutting algorithm, and the part about cutting will not be repeated here.
  • Ci corresponding to the minimum value of Value[i] is the rightmost cutting point, and Ci corresponding to the maximum value of Value[i] is the leftmost cutting point;
  • the cutting point saved in the array is the cutting point of the upper half circle, and the cutting point of the lower half circle can be obtained in the same way.
  • step S140 a 3D printing model of the guide plate in the VR scene is constructed according to the position of the guide plate slot and the guide plate plane.
  • FIG. 10 is the present invention A schematic diagram of a cutting target model constructed in a VR scene in an embodiment.
  • Figures 11 to 13 are schematic diagrams of a process of automatically generating a single guide model in a VR scene in an embodiment of the present invention.
  • Figure 11 is an embodiment of the present invention.
  • Fig. 12 is a schematic diagram of locking the card slot model with the handle in an embodiment of the present invention, and
  • Fig. 13 is a schematic diagram of using the handle to move the guide plate model in an embodiment of the present invention.
  • Double guide plate style The system of the present invention provides two rectangular plates for users to use, which respectively represent the position of the two-cut guide plate. After the first guide plate is generated, only the grid generated by the first guide plate, the upper and lower Information such as the surface grid is transferred to the second guide plate, and the second guide plate executes the guide plate generation method again on the basis of the first generated film.
  • FIG. 14 is a schematic diagram of generating a double guide plate model in an embodiment of the present invention.
  • FIG. 15 is a schematic diagram of generating the semi-guide plate model in an embodiment of the present invention.
  • the above method provided by the embodiments of the present invention, on the one hand, by modeling the cutting position, guide plate, etc. of the cut model in the VR scene, the real surgical object can be unrestricted in virtual reality. Repeat the cutting operation several times to generate a 3D guide plate print model at the cutting position.
  • building a 3D guide plate printing model in virtual reality can reduce the operation difficulty and production time compared with the traditional direct 3D printing guide plate model.
  • modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
  • the technical solution according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) execute the method according to the embodiment of the present invention.
  • a non-volatile storage medium which can be a CD-ROM, U disk, mobile hard disk, etc.
  • a computing device which may be a personal computer, a server, a touch terminal, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Chemical & Material Sciences (AREA)
  • Manufacturing & Machinery (AREA)
  • Materials Engineering (AREA)
  • Architecture (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Optics & Photonics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

A VR-based guide plate 3D printing model construction method, comprising: in a virtual reality (VR) scene, cutting the plane of a cut model to obtain a cutting position and a cutting target model; performing surface grid extraction according to the grid information of the cutting target model, and generating a thin film having a preset thickness on the surface of the cutting target model; using a rectangular plate to cut the surface of the thin film at the cutting position so as to obtain the position of a guide plate clamping groove and form a guide plate surface; and according to the position of the guide plate clamping groove and a guide plate plane, constructing a guide plate 3D printing model under the VR scene. By performing modeling on the cutting position of the cut model, a guide plate and the like in the VR scene, the present invention can repeatedly perform cutting on a real surgical object multiple times in VR without limitation, and the generation of a 3D guide plate printing model at the cutting position can reduce the difficulty of the operation and the time length of manufacturing.

Description

一种基于VR的导板3D打印模型建立方法A VR-based 3D printing model building method for guide plates 技术领域Technical field
本发明涉及3D技术领域,尤其涉及一种基于VR的导板3D打印模型建立方法。The invention relates to the field of 3D technology, in particular to a method for establishing a 3D printing model of a guide plate based on VR.
背景技术Background technique
3D打印技术相对于传统的削材及铸造技术,不仅能根据个性化需求定制,例如,在医疗领域方面可以实现材料与病变部位的完全匹配,进行骨缺损部位的原位打印,还能打印一些通过传统的方法难以制造的自由复杂结构。目前,3D打印已经成功规模化应用于骨科和口腔科领域,一批基于3D打印的患者定制化截骨导板、骨科植入物、种植牙等已经获得欧盟认证(European conformity,简称CE)与美国食品和药物管理局(Food and Drug Administration,简称FDA)批准用于临床。Compared with the traditional cutting and casting technology, 3D printing technology can not only be customized according to individual needs. For example, in the medical field, it can achieve complete matching of materials and diseased parts, perform in-situ printing of bone defect parts, and print some Free complex structures that are difficult to manufacture by traditional methods. At present, 3D printing has been successfully applied to the field of orthopedics and dentistry on a large scale. A batch of customized osteotomy guides, orthopedic implants and dental implants based on 3D printing for patients have obtained European conformity (CE) certification and the United States. Food and Drug Administration (Food and Drug Administration, referred to as FDA) approved for clinical use.
手术导板全称为“手术导航实物模板”,是第一批3D打印技术在医疗中的主要应用成果之一,主要作用是帮助骨折精准复位、辅助螺钉等植入物或器械达到预定的位置、辅助手术刀精准切割,在提高手术操作便利性的同时,使手术操作的准确性明显提高。采用3D打印导板辅助手术准确率高、术中风险降低、手术安全性高、临床疗效满意,是一种有效可行和值得推广的技术。但是需要将病变部位打印出实物才能进行观测,不仅浪费打印材料和打印时间,而且打印出来的模型进行一次切割演练后便无法复原,需要再次打印。The full name of the surgical guide is the "surgical navigation physical template". It is one of the first batch of 3D printing technology's main application achievements in medical treatment. Its main function is to help accurate fracture reduction, auxiliary screws and other implants or instruments to reach predetermined positions and assist The precise cutting of the scalpel not only improves the convenience of the operation, but also significantly improves the accuracy of the operation. The use of 3D printed guide plates to assist surgery has high accuracy, reduced intraoperative risks, high surgical safety, and satisfactory clinical efficacy. It is an effective, feasible and worthy of promotion technology. However, it is necessary to print out the actual diseased part for observation, which not only wastes printing materials and printing time, but also the printed model cannot be restored after a cutting drill and needs to be printed again.
可见,现有技术存在3D打印在手术规划和术前演练期打印材料损耗大、打印时间长等问题。It can be seen that the prior art has problems such as large loss of printing materials and long printing time during surgical planning and pre-operative exercises.
上述缺陷是本领域技术人员期望克服的。The above-mentioned shortcomings are expected to be overcome by those skilled in the art.
发明内容Summary of the invention
(一)要解决的技术问题(1) Technical problems to be solved
为了解决现有技术的上述问题,本发明提供一种基于VR的导板3D 打印模型建立方法,解决现有技术中3D打印在手术规划和术前演练期打印材料损耗大、打印时间长等问题。In order to solve the above-mentioned problems in the prior art, the present invention provides a VR-based guide plate 3D printing model establishment method, which solves the problems of large printing material loss and long printing time during surgical planning and pre-operative training in 3D printing in the prior art.
(二)技术方案(2) Technical solution
为了达到上述目的,本发明采用的主要技术方案包括:In order to achieve the above objectives, the main technical solutions adopted by the present invention include:
本发明一实施例提供一种基于VR的导板3D打印模型建立方法,其包括:An embodiment of the present invention provides a VR-based 3D printing model building method of a guide plate, which includes:
在虚拟现实VR场景中,基于对被切割模型的平面切割得到切割位置和切割目标模型;In the virtual reality VR scene, the cutting position and the cutting target model are obtained based on the plane cutting of the cut model;
根据所述切割目标模型的网格信息进行表面网格提取,在所述切割目标模型的表面生成具有预设厚度的薄膜;Performing surface mesh extraction according to the mesh information of the cutting target model, and generating a film with a preset thickness on the surface of the cutting target model;
利用矩形板在所述切割位置对所述薄膜的表面进行切割,得到导板卡槽位置以及形成导板表面;Use a rectangular plate to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface;
根据所述导板卡槽位置和所述导板平面构建所述VR场景下的导板3D打印模型。Constructing a 3D printing model of the guide plate in the VR scene according to the position of the guide plate slot and the guide plate plane.
本发明的一个实施例中,所述基于对被切割模型的平面切割得到切割位置和切割目标模型包括:In an embodiment of the present invention, the cutting position and the cutting target model obtained based on the plane cutting of the cut model includes:
根据切割工具的位置确定针对所述被切割模型的切割位置和切割平面;Determine the cutting position and cutting plane for the cut model according to the position of the cutting tool;
根据所述被切割模型的网格顶点与所述切割平面的相对位置对所述被切割模型进行分割,产生模型切口,其中所述被切割模型由多个三角面组成,且所述三角面由三个所述网格顶点组成;The cut model is divided according to the relative position of the mesh vertex of the cut model and the cutting plane to generate model cuts, wherein the cut model is composed of a plurality of triangular faces, and the triangular faces are composed of Composed of three vertices of the grid;
对所述模型切口通过添加三角网格进行填充,形成所述切割目标模型。The cut of the model is filled by adding a triangular mesh to form the cut target model.
本发明的一个实施例中,所述根据所述被切割模型的网格顶点与所述切割平面的相对位置对所述被切割模型进行分割包括:In an embodiment of the present invention, the segmenting the cut model according to the relative position of the mesh vertex of the cut model and the cutting plane includes:
根据所述网格顶点建立网格顶点数组、标签数组、用于存放所述网格顶点的第一顶点集合和第二顶点集合,并建立代表旧顶点数组索引与 新顶点集合索引映射关系的整数数组;Establish a grid vertex array, a label array, a first vertex set and a second vertex set for storing the grid vertices according to the grid vertices, and establish an integer representing the mapping relationship between the old vertex array index and the new vertex set index Array
将所述被切割模型的网格顶点以及在所述切割平面上选取的一点从空间坐标转换到局部坐标,得到网格顶点的局部坐标和切面上一点的局部坐标;Transforming the mesh vertices of the cut model and a point selected on the cutting plane from space coordinates to local coordinates to obtain the local coordinates of the mesh vertices and the local coordinates of a point on the tangent plane;
将所述切割平面的法向量从空间坐标转换到局部坐标,得到局部坐标法向量;Transforming the normal vector of the cutting plane from space coordinates to local coordinates to obtain a local coordinate normal vector;
根据所述网格顶点的局部坐标与所述切面上一点的局部坐标形成的向量与所述局部坐标法向量的点积进行判断,如果所述点积大于或等于0,则将所述网格顶点添加到所述第一顶点集合中,并在所述标签数组中设置对应的标签值为1;如果所述点积小于0,则将所述网格顶点添加到所述第二顶点集合中,并在所述标签数组中设置对应的标签值为0。The judgment is made according to the dot product of the vector formed by the local coordinates of the grid vertex and the local coordinates of a point on the tangent plane and the local coordinate normal vector. If the dot product is greater than or equal to 0, the grid The vertex is added to the first vertex set, and the corresponding label value is set in the label array; if the dot product is less than 0, the mesh vertex is added to the second vertex set , And set the corresponding tag value to 0 in the tag array.
本发明的一个实施例中,所述根据所述被切割模型的网格顶点与所述切割平面的相对位置对所述被切割模型进行分割还包括:In an embodiment of the present invention, the segmenting the cut model according to the relative position of the mesh vertex of the cut model and the cutting plane further includes:
针对所述三角面建立用于存放所述三角面的第一三角面集合与第二三角面集合;Establishing a first triangle surface set and a second triangle surface set for storing the triangle surface for the triangle surface;
当所述三角面的三个网格顶点均位于所述切割平面的一侧时,将所述三角面的所述三个网格顶点划分到所述第一三角面集合或所述第二三角面集合中;When the three mesh vertices of the triangle face are all located on one side of the cutting plane, the three mesh vertices of the triangle face are divided into the first triangle face set or the second triangle Face set
当所述三角面的三个网格顶点分别位于所述切割平面的两侧时,按照所述三角面的顶点索引对应的标签值对所述三角面进行切割,将切割后的三角面分别添加到所述第一三角面集合和所述第二三角面集合中。When the three mesh vertices of the triangular face are located on both sides of the cutting plane, the triangular face is cut according to the label value corresponding to the vertex index of the triangular face, and the cut triangular faces are added separately To the first set of triangles and the second set of triangles.
本发明的一个实施例中,所述按照所述三角面的顶点索引对应的标签值对所述三角面进行切割包括:In an embodiment of the present invention, the cutting the triangular face according to the label value corresponding to the vertex index of the triangular face includes:
根据所述切割平面与所述三角面相交形成两个切割点,得到两个切割点的坐标位置,所述两个切割点连接形成所述模型切口的边界;Two cutting points are formed according to the intersection of the cutting plane and the triangular surface, and the coordinate positions of the two cutting points are obtained, and the two cutting points are connected to form the boundary of the model cut;
根据所述两个切割点的坐标位置和所述三角面的原三个网格顶点形成三个新的三角面,将三个所述新的三角面添加到所述第一三角面集合 和所述第二三角面集合中,并将所述两个切割点分别添加到所述第一顶点集合和所述第二顶点集合中。According to the coordinate positions of the two cutting points and the original three mesh vertices of the triangles, three new triangles are formed, and the three new triangles are added to the first set of triangles and all the triangles. In the second set of triangular faces, the two cutting points are added to the first set of vertices and the second set of vertices, respectively.
本发明的一个实施例中,所述根据所述切割目标模型的网格信息进行表面网格提取,在所述切割目标模型的表面生成具有预设厚度的薄膜,包括:In an embodiment of the present invention, said performing surface mesh extraction according to the mesh information of the cutting target model, and generating a film with a preset thickness on the surface of the cutting target model, includes:
基于球形区域网格提取方法对所述切割目标模型的网格信息进行提取,得到薄膜的下表面;Extracting the grid information of the cutting target model based on the spherical area grid extraction method to obtain the lower surface of the film;
对所述薄膜的下表面按照所述薄膜的下表面的法向量的方向进行所述预设厚度的位移,并对位移后的网格顶点查找重复点;Performing the displacement of the preset thickness on the lower surface of the film in the direction of the normal vector of the lower surface of the film, and searching for duplicate points on the vertices of the mesh after the displacement;
计算所述重复点位移后的坐标,基于所述坐标对位移后的重复点进行修正,到薄膜的上表面;Calculate the coordinates of the displaced repeated points, and correct the displaced repeated points to the upper surface of the film based on the coordinates;
对所述薄膜的上表面和所述薄膜的下表面的边缘上的切割点逐对连接成三角面,得到所述薄膜。The cutting points on the edges of the upper surface of the film and the lower surface of the film are connected pair by pair to form a triangle surface to obtain the film.
本发明的一个实施例中,所述基于球形区域网格提取方法对所述切割目标模型的网格信息进行提取,包括:In an embodiment of the present invention, the extraction of the grid information of the cutting target model based on the spherical area grid extraction method includes:
将所述切割目标模型的网格顶点和所述切割平面上选取的点由局部坐标转换为世界坐标,并在所述世界坐标下计算所述切割模型上的网格顶点与所述切割平面上选取的点之间的距离;Convert the mesh vertices of the cutting target model and the selected points on the cutting plane from local coordinates to world coordinates, and calculate the mesh vertices on the cutting model and the cutting plane under the world coordinates The distance between the selected points;
根据所述切割目标模型的网格顶点与所述切割平面之间的距离与预设的球形区域的半径进行比较,得到所述球形区域内的网格顶点;Comparing the distance between the mesh vertex of the cutting target model and the cutting plane with the preset radius of the spherical region to obtain the mesh vertex in the spherical region;
根据所述切割目标模型的三角面的三个顶点索引,如果所述三个顶点索引均在所述球形区域内,则所述三角面位于所述球形区域内;According to the three vertex indexes of the triangle surface of the cutting target model, if the three vertex indexes are all in the spherical area, the triangle surface is located in the spherical area;
如果所述三个顶点索引不是全部在所述球形区域内,则根据所述切割平面对所述三角面进行切割,得到两个切割点,将位于所述三个顶点索引与所述两个切割点因切割产生以及切割后划分产生的新三角面,划分为所述球形区域内;If the three vertex indexes are not all in the spherical area, the triangular face is cut according to the cutting plane to obtain two cutting points, which will be located between the three vertex indexes and the two cutting points. Points are generated by cutting and new triangles generated by division after cutting are divided into the spherical area;
根据所述球形区域内的网格顶点和三角面进行提取,得到所述球形 区域内的表面网格。Extract according to the mesh vertices and triangular faces in the spherical area to obtain the surface mesh in the spherical area.
本发明的一个实施例中,所述利用矩形板在所述切割位置对所述薄膜的表面进行切割,得到导板卡槽位置以及形成导板表面,包括:In an embodiment of the present invention, the step of using a rectangular plate to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface includes:
利用所述矩形板坐标构建4个平面,基于所述4个平面分别对所述薄膜的上表面和所述薄膜的下表面进行切割,切割的位置即为所述导板卡槽位置;Use the rectangular plate coordinates to construct 4 planes, and respectively cut the upper surface of the film and the lower surface of the film based on the 4 planes, and the cutting position is the position of the guide plate slot;
根据所述矩形板的顶点坐标生成导板的网格顶点,并根据所述导板的网格顶点与所述薄膜上的切割点相连构成三角面网格,形成所述导板表面。The grid vertices of the guide plate are generated according to the apex coordinates of the rectangular plate, and the grid vertices of the guide plate are connected with the cutting points on the film to form a triangular mesh to form the surface of the guide plate.
本发明的一个实施例中,所述利用所述矩形板坐标构建4个平面包括:In an embodiment of the present invention, the construction of 4 planes by using the coordinates of the rectangular plate includes:
利用所述矩形板的左右两面作为切割所述薄膜的下表面两端的平面,得到所述4个平面中的2个平面;Using the left and right sides of the rectangular plate as planes for cutting both ends of the lower surface of the film to obtain 2 planes among the 4 planes;
将所述矩形板平移所述预设厚度距离后,作为切割所述薄膜的上表面两端的平面,得到所述4个平面中的剩余2个平面。After the rectangular plate is translated by the preset thickness distance, it is used as a plane for cutting both ends of the upper surface of the film to obtain the remaining two planes among the four planes.
本发明的一个实施例中,所述根据所述导板的网格顶点与所述薄膜上的切割点相连构成三角面网格,形成所述导板表面,包括:In an embodiment of the present invention, the mesh vertices of the guide plate are connected with the cutting points on the film to form a triangular mesh to form the surface of the guide plate, including:
根据所述矩形板的上下两个顶点坐标得到切割方向;Obtaining the cutting direction according to the coordinates of the upper and lower vertices of the rectangular plate;
结合所述切割方向按照所述4个平面对所述薄膜进行4次切割,得到上半圈切割点和下半圈切割点;Cutting the film 4 times according to the 4 planes in combination with the cutting direction to obtain an upper half circle cutting point and a lower half circle cutting point;
所述导板的网格顶点中的上半部分网格顶点与所述上半圈切割点相连形成三角面网格,得到导板上表面;The upper half of the mesh vertices of the mesh vertices of the guide plate are connected with the cutting points of the upper half circle to form a triangular mesh to obtain the upper surface of the guide plate;
所述导板的网格顶点中的下半部分网格顶点与所述下半圈切割点相连形成三角面网格,得到导板下表面;The lower half of the grid vertices of the grid vertices of the guide plate are connected with the cutting points of the lower half circle to form a triangular mesh to obtain the lower surface of the guide plate;
根据所述导板上表面和所述导板下表面形成所述导板表面。The guide plate surface is formed according to the upper surface of the guide plate and the lower surface of the guide plate.
(三)有益效果(3) Beneficial effects
本发明的有益效果是:本发明实施例提供的基于VR的导板3D打印 模型建立方法,一方面,通过在VR场景中对被切割模型的切割位置、导板等进行建模,从而可以在虚拟现实中无限制地对真实的手术对象重复进行多次切割操作,在切割位置生成3D导板打印模型。另一方面,利用虚拟现实的真实感和立体感的优势,在虚拟现实中构建3D导板打印模型,比传统的直接3D打印导板模型可以减少操作难度和制作时长。The beneficial effects of the present invention are: the VR-based guide plate 3D printing model establishment method provided by the embodiments of the present invention. On the one hand, by modeling the cutting position and guide plate of the cut model in the VR scene, it can be used in virtual reality. Repeat multiple cutting operations on the real surgical object without limitation, and generate a 3D guide plate print model at the cutting position. On the other hand, taking advantage of the realism and three-dimensionality of virtual reality, building a 3D guide plate printing model in virtual reality can reduce the operation difficulty and production time compared with the traditional direct 3D printing guide plate model.
附图说明Description of the drawings
图1为本发明一实施例提供的一种基于VR的导板3D打印模型建立方法的流程图;FIG. 1 is a flowchart of a method for establishing a 3D printing model of a guide plate based on VR according to an embodiment of the present invention;
图2为本发明一实施例中提供的普通UI交互界面示意图;2 is a schematic diagram of a common UI interaction interface provided in an embodiment of the present invention;
图3为本发明一实施例中提供的VR场景UI交互界面示意图;3 is a schematic diagram of a UI interaction interface of a VR scene provided in an embodiment of the present invention;
图4为本发明一实施例图3中UI界面的示意图;4 is a schematic diagram of the UI interface in FIG. 3 according to an embodiment of the present invention;
图5为本公开一实例中对图4所示的工具进行设置的界面示意图;5 is a schematic diagram of an interface for setting the tool shown in FIG. 4 in an example of the present disclosure;
图6为本发明一实施例图1中步骤S110的流程图;Fig. 6 is a flowchart of step S110 in Fig. 1 according to an embodiment of the present invention;
图7为本发明一实施例中模型切割算法的流程图;FIG. 7 is a flowchart of a model cutting algorithm in an embodiment of the present invention;
图8为本公开一实施例图1中步骤S120的流程图;FIG. 8 is a flowchart of step S120 in FIG. 1 according to an embodiment of the disclosure;
图9为本发明一实施例中三角面分割示意图;FIG. 9 is a schematic diagram of a triangle surface segmentation in an embodiment of the present invention;
图10为本发明一实施例中在VR场景中构建的切割目标模型的示意图;10 is a schematic diagram of a cutting target model constructed in a VR scene in an embodiment of the present invention;
图11为本发明一实施例中利用手柄锁定导板模型时的示意图;Fig. 11 is a schematic diagram of the guide plate model when the handle is used to lock the guide plate model in an embodiment of the present invention;
图12为本发明一实施例中利用手柄锁定卡槽模型时的示意图;FIG. 12 is a schematic diagram of the card slot model when the handle is used to lock the card slot model in an embodiment of the present invention;
图13为本发明一实施例中利用手柄移动导板模型时的示意图;FIG. 13 is a schematic diagram of the guide plate model when the handle is used to move the guide plate model in an embodiment of the present invention;
图14为本发明一实施例中生成双导板模型的示意图;14 is a schematic diagram of generating a double guide plate model in an embodiment of the present invention;
图15为本发明一实施例中生成半导板模型的示意图。Figure 15 is a schematic diagram of generating a semi-guide plate model in an embodiment of the present invention.
具体实施方式Detailed ways
为了更好的解释本发明,以便于理解,下面结合附图,通过具体实施方式,对本发明作详细描述。In order to better explain the present invention and facilitate understanding, the present invention will be described in detail below with reference to the accompanying drawings and through specific embodiments.
本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“和/或”包括一个或多个相关的所列项目的任意的和所有的组合。All technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the technical field of the present invention. The terms used in the description of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The term "and/or" as used herein includes any and all combinations of one or more related listed items.
在本发明相关实施例中,虚拟现实作为近年来应用于医疗领域的新兴技术,其与传统医疗结合的应用也存在巨大的潜力。在虚拟现实中对与真实患者人体骨头组织的三维模型进行观察,将复杂的骨质情况更直观地展示在临床医生面前,有利于为手术提供明确的手术方案,避免了通过二维影像观察不到的手术陷阱,对手术中可能遇到的困难提取做好相应的准备,更有利于手术部位的确定及相应的导板设计方案确定。由于单纯采用3D打印不仅浪费打印材料和打印时间,而且打印出来的模型进行一次切割演练后便无法复原,需要再次打印。而在虚拟现实中可以无限制地对真实人体组织器官模型进行重复多次切割操作,直到找到最优的模型方案为止,充分体现虚拟现实的优势。In the related embodiments of the present invention, virtual reality is an emerging technology applied in the medical field in recent years, and its application in combination with traditional medical treatment also has great potential. Observe the three-dimensional model of the human bone tissue of the real patient in virtual reality, and display the complex bone condition more intuitively in front of the clinician, which is conducive to providing a clear surgical plan for the operation and avoiding the observation of the two-dimensional image. For the surgical traps found, make corresponding preparations for the extraction of the difficulties that may be encountered during the operation, which is more conducive to the determination of the surgical site and the determination of the corresponding guide plate design. Because 3D printing alone is not only a waste of printing materials and printing time, but the printed model cannot be restored after a cutting drill and needs to be printed again. In virtual reality, the real human tissue and organ model can be repeatedly cut multiple times until the optimal model solution is found, which fully reflects the advantages of virtual reality.
图1为本发明一实施例提供的一种基于VR的导板3D打印模型建立方法的流程图,如图1所示,该方法包括以下步骤:Fig. 1 is a flowchart of a method for establishing a 3D printing model of a guide plate based on VR according to an embodiment of the present invention. As shown in Fig. 1, the method includes the following steps:
如图1所示,在步骤S110中,在虚拟现实VR场景中,基于对被切割模型的平面切割得到切割位置和切割目标模型;As shown in FIG. 1, in step S110, in the virtual reality VR scene, the cutting position and the cutting target model are obtained based on the plane cutting of the cut model;
如图1所示,在步骤S120中,根据所述切割目标模型的网格信息进行表面网格提取,在所述切割目标模型的表面生成具有预设厚度的薄膜;As shown in FIG. 1, in step S120, surface mesh extraction is performed according to the mesh information of the cutting target model, and a film with a preset thickness is generated on the surface of the cutting target model;
如图1所示,在步骤S130中,利用矩形板在所述切割位置对所述薄膜的表面进行切割,得到导板卡槽位置以及形成导板表面;As shown in FIG. 1, in step S130, a rectangular plate is used to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface;
如图1所示,在步骤S140中,根据所述导板卡槽位置和所述导板平面构建所述VR场景下的导板3D打印模型。As shown in FIG. 1, in step S140, a 3D printing model of the guide plate in the VR scene is constructed according to the position of the guide plate slot and the guide plate plane.
基于上述,本发明提供一种基于VR的3D打印模型建立方法及软件***,与传统3D打印模型设计软件相比,本发明的创新在于结合了虚拟 现实技术,利用虚拟现实真实感、立体感的优势,对与真实的人体组织(如骨头)1:1重建的三维模型进行观察和虚拟手术切割,不仅有效解决3D打印在手术规划和术前演练期打印材料损耗大、打印时间长等问题,而且还能在虚拟现实中对手术部位自动生成3D导板模型,也可手动进行个性化设计,比普通3D打印设计软件用电脑屏幕鼠标的操作更具有立体感、沉浸感和便捷性,减少操作难度和制作时长。Based on the above, the present invention provides a VR-based 3D printing model establishment method and software system. Compared with traditional 3D printing model design software, the innovation of the present invention lies in the combination of virtual reality technology and the use of virtual reality realism and three-dimensionality. Advantages, observation and virtual surgical cutting of 3D models reconstructed 1:1 with real human tissues (such as bones), which not only effectively solves the problems of large printing material loss and long printing time during surgical planning and preoperative exercises in 3D printing. Moreover, it can automatically generate a 3D guide model of the surgical site in virtual reality, or manually perform a personalized design, which is more three-dimensional, immersive and convenient than ordinary 3D printing design software with a computer screen mouse operation, reducing the difficulty of operation And production time.
本发明在具体实现中主要包括以下三步:The present invention mainly includes the following three steps in specific implementation:
第一步,构建虚拟工作台场景:构建手术室工作台环境,并实现模型的实时导入与导出;The first step is to construct a virtual workbench scene: construct an operating room workbench environment, and realize real-time import and export of models;
第二步,分别设计适用于电脑显示屏的UI界面和虚拟现实中的虚拟交互界面;The second step is to design the UI interface suitable for the computer display screen and the virtual interactive interface in virtual reality respectively;
第三步,构建各种切割工具、导板生成工具并设计对应的切割算法和导板自动生成算法。The third step is to construct various cutting tools, guide generation tools and design corresponding cutting algorithms and guide automatic generation algorithms.
下面对上述三个步骤进行详细描述:The above three steps are described in detail below:
第一步:构建虚拟工作台场景Step 1: Build a virtual workbench scene
在场景设计方面,针对不同的操作需求应该设计不同的场景去实现。在用户进行3D模型设计时,需要合适的工作室、工作台、操作工具等场景设计,利用Unity的功能模块对场景进行光照渲染,并在场景中加入VR组件,结合Unity的物理引擎与人体组织器官模型进行交互。而在需要导入导出模型文件时,则需要设计常规的电脑桌面界面场景,去掉VR相关组件,利用电脑键盘鼠标进行操作,这是因为导入模型文件需要对电脑的文件资源管理器进行操作,而VR手柄在这方面的操作不如普通的键盘鼠标输入设备的操作快速便捷,因此本发明的***设计普通场景和VR场景,以满足不同的操作需求,例如,用户可以在普通场景下进行文件导入,在VR场景下进行导板3D打印模型的构建。In terms of scenario design, different scenarios should be designed to achieve different operational requirements. When users design 3D models, they need suitable studios, workbenches, operating tools and other scene designs. Use Unity's functional modules to perform lighting rendering of the scene, and add VR components to the scene, combining Unity's physics engine and human tissue The organ model interacts. When you need to import and export model files, you need to design a conventional computer desktop interface scene, remove VR-related components, and use the computer keyboard and mouse to operate. This is because importing model files requires operating the computer’s file explorer, while VR The operation of the handle in this respect is not as fast and convenient as the operation of ordinary keyboard and mouse input devices. Therefore, the system of the present invention designs ordinary scenes and VR scenes to meet different operation requirements. For example, users can import files in ordinary scenes. The 3D printing model of the guide plate is constructed in the VR scene.
第二步:设计用于虚拟交互的用户界面(User Interface,简称UI)Step 2: Design a user interface (User Interface, UI for short) for virtual interaction
在UI交互方面,本发明设计的***针对普通场景和VR场景设计两 套UI界面。图2为本发明一实施例中提供的普通UI交互界面示意图,如图2所示,在普通场景UI界面中包括菜单选项列表和对应不同功能的按钮,例如菜单选项列表下包含加载模型、重置和导入模型。针对每个选项设计用于响应鼠标点击事件的按钮,并且调用文件资源管理器,能实时导入模型文件到***中。通过点击“加载模型”按钮,可以弹出文件资源管理器,选中模型文件后导入***,模型显示在界面中央,还包括对于模型的旋转操作,例如可通过勾选的方式选择模型上下旋转还是左右旋转。通过点击“重置”按钮,可以取消导入模型,回到初始状态;通过点击“导入模型”按钮,确定导入模型,载入VR场景。In terms of UI interaction, the system designed in the present invention designs two sets of UI interfaces for common scenes and VR scenes. Figure 2 is a schematic diagram of a common UI interaction interface provided in an embodiment of the present invention. As shown in Figure 2, the common scene UI interface includes a menu option list and buttons corresponding to different functions. For example, the menu option list includes loading models and Set up and import models. Design a button to respond to mouse click events for each option, and call the file explorer to import the model file into the system in real time. By clicking the "Load Model" button, you can pop up the file explorer, select the model file and import it into the system. The model is displayed in the center of the interface. It also includes the rotation operation of the model. For example, you can select the model to rotate up and down or left and right by checking . By clicking the "reset" button, you can cancel the import model and return to the initial state; by clicking the "import model" button, confirm the import model and load the VR scene.
图3为本发明一实施例中提供的VR场景UI交互界面示意图,VR场景UI由于输入输出设备VR头盔和手柄的独特性,需要设计特殊的交互界面。在非VR端产品里,可放置界面的范围通常由硬件(手机、电脑屏幕)的尺寸决定,而在虚拟世界中具有360°的视野,任何一个地方都可以放置界面,如果界面位置固定则用户很可能需要频繁转身才能与界面进行交互。如果界面位置不固定,则界面移动时容易嵌入到VR场景中的物体里面,影响用户的体验。FIG. 3 is a schematic diagram of a VR scene UI interaction interface provided in an embodiment of the present invention. The VR scene UI needs to design a special interaction interface due to the uniqueness of the input and output device VR helmet and handle. In non-VR products, the range of the interface that can be placed is usually determined by the size of the hardware (mobile phone, computer screen). In the virtual world, it has a 360° field of view. The interface can be placed anywhere. If the interface position is fixed, the user It is likely that you need to turn around frequently to interact with the interface. If the position of the interface is not fixed, it is easy to be embedded in objects in the VR scene when the interface moves, which affects the user experience.
因此本发明的***设计界面由用户点击手柄菜单按钮召出,界面放置位置由用户使用手柄指定,当界面被场景物体遮挡时,用户可重复点击菜单键重新放置界面位置。这样的设计操作简单易用,用户可自由调整界面的位置。Therefore, the system design interface of the present invention is called up by the user clicking the handle menu button, and the interface placement position is specified by the user using the handle. When the interface is blocked by scene objects, the user can repeatedly click the menu button to reposition the interface position. This design is simple and easy to use, and users can freely adjust the position of the interface.
如图3所示,包括位于前景中的操作台和位于后景中的UI界面,在与界面的交互方式上,目前主流的交互方式是通过手柄发射射线与悬停在场景中的虚拟界面进行交互,虽然这样用户无需走动,也不需要伸手去触碰UI界面,避免现实中碰到墙壁等问题。但缺点是界面位置需要离用户较远,容易被场景中的物体遮挡,射线操作也不符合用户的行为习惯。因此考虑到本发明的***界面按钮简单并由手柄弹出距离较近,仍采取直接触碰的交互方式,更加简单易用,符合现实中的行为习惯。As shown in Figure 3, it includes the console in the foreground and the UI interface in the background. In terms of interaction with the interface, the current mainstream interaction method is to use the handle to emit rays and hover in the scene of the virtual interface. Interaction, although in this way, the user does not need to walk, nor does it need to reach out to touch the UI interface, to avoid problems such as touching the wall in reality. But the disadvantage is that the interface location needs to be far away from the user, and it is easily blocked by objects in the scene, and the ray operation does not conform to the user's behavior habits. Therefore, considering that the system interface button of the present invention is simple and the pop-up distance from the handle is relatively short, the direct contact interaction method is still adopted, which is simpler and easier to use, and conforms to the behavioral habits in reality.
虚拟现实UI界面各个元素功能介绍:The function introduction of each element of the virtual reality UI interface:
(1)工具栏菜单,点击手柄的菜单键后打开工具栏,图4为本发明一实施例图3中UI界面的示意图,如图4所示,界面中提供5种操作工具供用户使用,使用手柄选择键点击“创”建时生成对应工具在界面前,点击“清除”时按顺序删除场景中的对应工具,5种操作工具分别包括:(1) Toolbar menu, click the menu button of the handle to open the toolbar. Figure 4 is a schematic diagram of the UI interface in Figure 3 of an embodiment of the present invention. As shown in Figure 4, the interface provides five operating tools for users to use. Use the handle selection key to click "Create" to generate the corresponding tools. Before the interface, click "Clear" to delete the corresponding tools in the scene in order. The 5 operating tools include:
①切割工具:用来对导入***的模型和***生成的模型整体进行平面切割;①Cutting tool: used to cut the plane of the model imported into the system and the model generated by the system as a whole;
②局部切割工具:用来对导入***的模型和***生成的模型局部网格进行切割;②Partial cutting tool: used to cut the model imported into the system and the local mesh of the model generated by the system;
③单导板生成工具:生成一块矩形板供用户使用,使用矩形板可在切割部位生成对应大小的导板;③Single guide plate generation tool: Generate a rectangular plate for users to use, and use the rectangular plate to generate a corresponding size guide plate at the cutting position;
④双导板生成工具:生成两块矩形板供用户使用,使用矩形板可在切割部位生成对应大小的共享一个网格的两个导板;④Double guide plate generation tool: generate two rectangular plates for users to use, and use rectangular plates to generate two guide plates of corresponding size sharing a grid at the cutting position;
⑤半导板生成工具:生成一块矩形板供用户使用,使用矩形板可在切割部位生成对应大小的单面导板。⑤ Semi-guide plate generation tool: Generate a rectangular plate for users to use, and use the rectangular plate to generate a single-sided guide plate of the corresponding size at the cutting position.
(2)模型操作菜单,选中要进行操作的物体按住手柄选择键同时点击手柄菜单键后打开相关设置菜单:(2) Model operation menu, select the object to be operated, hold down the handle selection button and click the handle menu button to open the related setting menu:
图5为本公开一实例中对图4所示的工具进行设置的界面示意图,如图5所示,可以做如下设置:Figure 5 is a schematic diagram of an interface for setting the tool shown in Figure 4 in an example of the present disclosure. As shown in Figure 5, the following settings can be made:
①设置大小:可以通关手柄拖动界面中的长条更改物体的长宽高,右侧文本框显示对应的数值,点击文本框可以手动输入精确的数值。①Set size: You can drag the bar in the interface to change the length, width and height of the object by dragging the handle of the customs clearance. The text box on the right displays the corresponding value. Click the text box to manually enter the precise value.
②设置颜色:提供多种颜色按钮,点击按钮将物体更改为该按钮对应的颜色,点击更多更换界面中的按钮的颜色。②Set color: provide multiple color buttons, click the button to change the object to the color corresponding to the button, click more to change the color of the button in the interface.
③复制物体:对该物体进行复制。③Copy object: copy the object.
④导出模型:将模型导出到本发明的***文件夹下。④Export model: Export the model to the system folder of the present invention.
⑤删除物体:将选中的物体在场景中删除,并关闭该菜单界面。⑤Delete object: delete the selected object in the scene and close the menu interface.
本发明中导板3D打印模型建立的方法主要在第三步中实现,接下来 对图1所示各个步骤的具体实现进行详细阐述:The method for establishing the 3D printing model of the guide plate in the present invention is mainly implemented in the third step. Next, the specific implementation of each step shown in Figure 1 will be described in detail:
在步骤S110中,在虚拟现实VR场景中,基于对被切割模型的平面切割得到切割位置和切割目标模型。In step S110, in the virtual reality VR scene, the cutting position and the cutting target model are obtained based on the plane cutting of the cut model.
本实施例中的切割工具是用来对导入***的模型和***生成的模型整体进行平面切割的手术刀工具,不仅能对导入到***中的人体组织模型进行切割,还能对***自动生成的导板进行修剪。The cutting tool in this embodiment is a scalpel tool used to cut the model imported into the system and the entire model generated by the system. It can not only cut the human tissue model imported into the system, but also automatically generate the system. Trim the guide plate.
图6为本发明一实施例图1中步骤S110的流程图,具体包括以下步骤:Fig. 6 is a flowchart of step S110 in Fig. 1 according to an embodiment of the present invention, which specifically includes the following steps:
在步骤S601中,根据切割工具的位置确定针对所述被切割模型的切割位置和切割平面。In step S601, the cutting position and cutting plane for the cut model are determined according to the position of the cutting tool.
在步骤S602中,根据所述被切割模型的网格顶点与所述切割平面的相对位置对所述被切割模型进行分割,产生模型切口,其中所述被切割模型由多个三角面组成,且所述三角面由三个所述网格顶点组成。In step S602, the cut model is divided according to the relative positions of the mesh vertices of the cut model and the cutting plane to generate model cuts, wherein the cut model is composed of a plurality of triangular faces, and The triangular surface is composed of three mesh vertices.
本发明的一个实施例中,该步骤包括对网格顶点的分割,具体包括:In an embodiment of the present invention, this step includes dividing the vertices of the mesh, which specifically includes:
1)根据所述网格顶点建立网格顶点数组、标签数组、用于存放所述网格顶点的第一顶点集合和第二顶点集合,并建立代表旧顶点数组索引与新顶点集合索引映射关系的整数数组;2)将所述被切割模型的网格顶点以及在所述切割平面上选取的一点从空间坐标转换到局部坐标,得到网格顶点的局部坐标和切面上一点的局部坐标;3)将所述切割平面的法向量从空间坐标转换到局部坐标,得到局部坐标法向量;4)根据所述网格顶点的局部坐标与所述切面上一点的局部坐标形成的向量与所述局部坐标法向量的点积进行判断,如果所述点积大于或等于0,则将所述网格顶点添加到所述第一顶点集合中,并在所述标签数组中设置对应的标签值为1;5)如果所述点积小于0,则将所述网格顶点添加到所述第二顶点集合中,并在所述标签数组中设置对应的标签值为0。1) Establish a mesh vertex array, a label array, a first vertex set and a second vertex set for storing the mesh vertices according to the mesh vertices, and establish a mapping relationship between the index of the old vertex array and the index of the new vertex set An integer array of; 2) Convert the mesh vertices of the cut model and a point selected on the cutting plane from spatial coordinates to local coordinates to obtain the local coordinates of the mesh vertices and the local coordinates of a point on the tangent plane; 3 ) Convert the normal vector of the cutting plane from the space coordinate to the local coordinate to obtain the local coordinate normal vector; 4) The vector formed according to the local coordinate of the grid vertex and the local coordinate of a point on the tangent plane and the local The dot product of the coordinate normal vector is judged. If the dot product is greater than or equal to 0, the grid vertex is added to the first vertex set, and the corresponding tag value is set to 1 in the tag array 5) If the dot product is less than 0, add the grid vertices to the second set of vertices, and set the corresponding tag value to 0 in the tag array.
本发明的一个实施例中,该步骤还包括对三角面的分割,具体包括:In an embodiment of the present invention, this step further includes dividing the triangle surface, which specifically includes:
1)针对所述三角面建立用于存放所述三角面的第一三角面集合与第 二三角面集合;2)当所述三角面的三个网格顶点均位于所述切割平面的一侧时,将所述三角面的所述三个网格顶点划分到所述第一三角面集合或所述第二三角面集合中;3)当所述三角面的三个网格顶点分别位于所述切割平面的两侧时,按照所述三角面的顶点索引对应的标签值对所述三角面进行切割,将切割后的三角面分别添加到所述第一三角面集合和所述第二三角面集合中。1) Establish a first triangle face set and a second triangle face set for storing the triangle face for the triangle face; 2) When the three mesh vertices of the triangle face are all located on one side of the cutting plane When the three mesh vertices of the triangle face are divided into the first triangle face set or the second triangle face set; 3) When the three mesh vertices of the triangle face are located at all When the two sides of the cutting plane are cut, the triangle faces are cut according to the label values corresponding to the vertex indexes of the triangle faces, and the cut triangle faces are added to the first triangle face set and the second triangle respectively. Noodle collection.
本发明的一个实施例中,3)中按照所述三角面的顶点索引对应的标签值对所述三角面进行切割进一步包括:In an embodiment of the present invention, in 3), cutting the triangular face according to the label value corresponding to the vertex index of the triangular face further includes:
首先,根据所述切割平面与所述三角面相交形成两个切割点,得到两个切割点的坐标位置,所述两个切割点连接形成所述模型切口的边界;其次,根据所述两个切割点的坐标位置和所述三角面的原三个网格顶点形成三个新的三角面,将三个所述新的三角面添加到所述第一三角面集合和所述第二三角面集合中,并将所述两个切割点分别添加到所述第一顶点集合和所述第二顶点集合中。Firstly, two cutting points are formed according to the intersection of the cutting plane and the triangular plane, and the coordinate positions of the two cutting points are obtained, and the two cutting points are connected to form the boundary of the model cut; secondly, according to the two The coordinate position of the cutting point and the original three mesh vertices of the triangular face form three new triangular faces, and the three new triangular faces are added to the first triangular face set and the second triangular face And add the two cutting points to the first vertex set and the second vertex set respectively.
在步骤S603中,对所述模型切口通过添加三角网格进行填充,形成所述切割目标模型。In step S603, the model cut is filled by adding a triangular mesh to form the cut target model.
基于上述,步骤S120中采用的模型切割算法的原理是根据手术刀的位置确定一个空间坐标中的平面,然后计算被切割模型的每一个网格顶点与平面的相对位置,建立两个新的顶点数组分别映射左边和右边的网格顶点。将3个顶点全在一侧的三角面根据映射关系分配到左右的三角面数组,而顶点不全在一侧的三角面与切割平面相交,计算出交点后对这些三角面进行分割并记录下分割点添加到对应的顶点数组,最后对两侧的分割点相连缝合三角面,补上被切割物体暴露的孔洞。Based on the above, the principle of the model cutting algorithm used in step S120 is to determine a plane in space coordinates according to the position of the scalpel, and then calculate the relative position of each mesh vertex of the cut model to the plane, and establish two new vertices The array maps the grid vertices on the left and right respectively. The three triangles with all vertices on one side are assigned to the left and right triangle arrays according to the mapping relationship, and the triangles with not all vertices on one side intersect the cutting plane. After calculating the intersection points, divide these triangles and record the division The points are added to the corresponding vertex array, and finally the split points on both sides are connected to stitch the triangles, and the holes exposed by the cut objects are filled.
图7为本发明一实施例中模型切割算法的流程图,具体包括以下步骤:Fig. 7 is a flowchart of a model cutting algorithm in an embodiment of the present invention, which specifically includes the following steps:
步骤S701,将切面左侧的网格顶点分为A组,右侧的网格顶点分为B组;Step S701: divide the mesh vertices on the left side of the tangent plane into group A, and divide the mesh vertices on the right side into group B;
步骤S702,遍历三角面数组;Step S702, traverse the triangle face array;
步骤S703,判断三个网格顶点是否都在A组,如果是,则加入到A组,如果否则转至步骤S704;Step S703: It is judged whether the three mesh vertices are all in the A group, if yes, then join the A group, if otherwise, go to step S704;
步骤S704,判断三个网格顶点是否都在B组,如果是,则加入到B组,如果否则转至步骤S705;Step S704, judge whether the three mesh vertices are in group B, if yes, then join the group B, if not, go to step S705;
步骤S705,对三角面进行切割;Step S705, cutting the triangular face;
步骤S706,分别将网格顶点加入到A组或B组中;Step S706, adding mesh vertices to group A or group B respectively;
步骤S707,根据切割点缝合三角面。Step S707, stitch the triangular faces according to the cutting points.
以下结合实例分别对步骤S602中网格顶点和三角面的分割进行介绍:The following describes the segmentation of mesh vertices and triangles in step S602 with examples:
(1)对于网格顶点的分割(1) Segmentation of mesh vertices
首先确定一个世界坐标中的切面,由于被切割模型网格顶点的坐标是以自身为参考系的(即局部坐标系),如果利用该切面去区分网格顶点则必须在同一坐标系上,因此需要得到切面在局部坐标中的位置信息,获取一个在切面上的点通过空间变换得到局部坐标下的该点P,将切面的法向量经过空间变换得到局部坐标下的法向量n,设局部坐标下任意一点Q(x,y,z),PQ·n=0为该平面的点法式方程。下面是对网格顶点进行区分的具体实现步骤:First, determine a tangent plane in world coordinates. Since the coordinates of the vertices of the cut model mesh are based on itself (that is, the local coordinate system), if the tangent plane is used to distinguish the mesh vertices, they must be in the same coordinate system, so Need to get the position information of the tangent plane in local coordinates, get a point on the tangent plane through space transformation to get the point P in local coordinates, and transform the normal vector of the tangent plane through space transformation to get the normal vector n in local coordinates, let local coordinates At any point Q(x, y, z), PQ·n=0 is the point normal equation of the plane. The following are the specific implementation steps for distinguishing mesh vertices:
(11)对于网格顶点数组R[Count],建立一个对应的标签数组B[Count],建立两个用来放置左右两边顶点的空集合R1、R2,建立一个代表旧顶点数组索引与新顶点集合索引映射关系的整数数组OldToNewMap[Count]。(11) For the grid vertex array R[Count], create a corresponding label array B[Count], create two empty sets R1 and R2 for placing the vertices on the left and right sides, and create an array representing the index of the old vertex and the new vertex The integer array OldToNewMap[Count] of the set index mapping relationship.
(12)每个网格顶点坐标R[i],若(R[i]-P)·n>=0,则R[i]在切面法向量朝向的那一面,B[i]设置为1,添加到集合R1中,并且OldToNewMap[i]=R1.Count-1;若(R[i]-P)·n<0,则R[i]在切面法向量朝向的那一面的反面,B[i]设置为0,添加到集合R2中,并且OldToNewMap[i]=R2.Count–1,从而完成对网格顶点的分割。(12) Each grid vertex coordinate R[i], if (R[i]-P)·n>=0, then R[i] is on the side facing the normal vector of the tangent surface, and B[i] is set to 1. , Added to the set R1, and OldToNewMap[i]=R1.Count-1; if (R[i]-P)·n<0, then R[i] is on the opposite side of the side to which the tangent normal vector faces, B [i] is set to 0, added to the set R2, and OldToNewMap[i]=R2.Count-1, thus completing the segmentation of the grid vertices.
(2)对于三角面的分割(2) For the division of triangles
(21)对于网格三角面数组T,新建两个用来放置左右两边三角面的空集合T1、T2。(21) For the mesh triangle array T, create two empty sets T1 and T2 for placing the left and right triangles.
(22)遍历三角面数组T,每次取出3个顶点索引xi,yi,zi。若B[xi]=1,B[yi]=1,B[zi]=1,则将三个旧顶点索引经过映射转换到新顶点索引添加到T1中,即:OldToNewMap[xi],OldToNewMap[yi],OldToNewMap[zi];若B[xi]=0,B[yi]=0,B[zi]=0,则将三个旧顶点索引经过映射转换到新顶点索引添加到T2中,即:OldToNewMap[xi],OldToNewMap[yi],OldToNewMap[zi];若B[xi]、B[yi]、B[zi]不全为1或不全为0,则需要用切面对该三角面进行切割,并将切割后的三角面分别添加到T1、T2中。(22) Traverse the triangular face array T, and take out 3 vertex indexes xi, yi, zi each time. If B[xi]=1, B[yi]=1, B[zi]=1, then the three old vertex indexes are mapped and converted to new vertex indexes and added to T1, namely: OldToNewMap[xi], OldToNewMap[yi ], OldToNewMap[zi]; if B[xi]=0, B[yi]=0, B[zi]=0, then the three old vertex indexes are mapped to the new vertex index and added to T2, namely: OldToNewMap [xi], OldToNewMap[yi], OldToNewMap[zi]; if B[xi], B[yi], B[zi] are not all 1 or not all 0, you need to cut the triangle with a tangent plane, and Add the cut triangles to T1 and T2 respectively.
(23)分割三角面的关键是要计算出切面与三角面的切割点M1和M2的空间坐标,设B[xi]=1,B[yi]=0,B[zi]=0,M1为边R[xi]R[yi]上的切割点,M2为边R[xi]R[zi]上的切割点,则计算公式如下:(23) The key to dividing the triangular surface is to calculate the space coordinates of the cutting points M1 and M2 of the tangent surface and the triangular surface. Set B[xi]=1, B[yi]=0, B[zi]=0, M1 is The cutting point on edge R[xi]R[yi], and M2 is the cutting point on edge R[xi]R[zi]. The calculation formula is as follows:
Figure PCTCN2019104404-appb-000001
Figure PCTCN2019104404-appb-000001
M1=R[x i]+(R[y i]-R[x i])×Scalar1   (公式2) M1=R[x i ]+(R[y i ]-R[x i ])×Scalar1 (Formula 2)
其中Scalar1为M1到R[xi]的距离与R[yi]到R[xi]的距离的比,M2以同样的方式计算可得。Among them, Scalar1 is the ratio of the distance from M1 to R[xi] to the distance from R[yi] to R[xi]. M2 can be calculated in the same way.
(24)将被分割得到的新三角面R[xi]、M1、M2添加到T1中,M1、M2、R[yi]和R[yi]、M2、R[zi]这两个三角面添加到T2中,切割点M1、M2都添加到新顶点集合R1、R2中,至此三角面都已经分割完毕。(24) Add the divided new triangles R[xi], M1, M2 to T1, and add the two triangles M1, M2, R[yi] and R[yi], M2, R[zi] In T2, the cutting points M1 and M2 are added to the new vertex sets R1 and R2, so far the triangles have been divided.
经过上面的分割后,原物体模型网格被分成了两半,但由于模型网格都是表面网格,内部是空的不存在网格,因此当模型被切开后,网格内部就暴露出来,形成有空洞,带有空洞的模型不满足3D打印的封闭性要求,因此还需要对模型切口添加三角网格进行缝补,具体如下:After the above segmentation, the original object model grid is divided into two halves, but because the model grids are all surface grids, the interior is empty and there is no grid, so when the model is cut, the interior of the grid is exposed When it comes out, a cavity is formed, and the model with the cavity does not meet the sealing requirements of 3D printing. Therefore, it is necessary to add a triangular mesh to the model cut for stitching, as follows:
首先要找到模型切口边界的顶点,而由上面切割网格顶点的步骤可知,所有被切割三角面产生的M1、M2切割点连起来组成模型切口边界, 因此只需要在切割步骤中额外建立一个新顶点集合M,把所有的切割点成对放入新顶点集合M中,然后取集合M中第一对切割点中的第一个切割点为基准,遍历剩下的切割点对,每一对切割点与第一个切割点相连成三角面,遍历结束后完成三角网格对空洞的填充。The first step is to find the vertices of the cut boundary of the model, and from the above step of cutting the mesh vertices, all the M1 and M2 cutting points generated by the cut triangles are connected to form the cut boundary of the model, so only a new one needs to be created in the cutting step Vertex set M, put all the cutting points in pairs into the new vertex set M, and then take the first cutting point in the first pair of cutting points in the set M as the reference, traverse the remaining cutting point pairs, each pair The cutting point is connected with the first cutting point to form a triangular surface, and after the traversal is completed, the cavity is filled by the triangular grid.
上述步骤之后,进行手术导板的模型构建,该部分是根据人体组织模型被切割部位的网格信息,沿着组织模型的表面自动生成一定范围的具有一定厚度的薄膜,由于该薄膜与目标表面完全贴合,在3D打印后可作为手术辅助器材在手术中起到支撑固定、精准定位等作用,并且医生在VR场景中对患者组织器官模型进行多次切割演练,确定手术中的切割部位后,该技术还能在目标切割部位生成与切割方向完全一致的多样化导板,在手术的辅助切割中有着关键的作用。After the above steps, the model of the surgical guide is constructed. This part is based on the mesh information of the cut part of the human tissue model, and a certain range of film with a certain thickness is automatically generated along the surface of the tissue model. Because the film is completely with the target surface Fit, after 3D printing, it can be used as a surgical aid to support, fix, and accurately position during the operation. In addition, the doctor performs multiple cutting drills on the patient’s tissue and organ model in the VR scene to determine the cutting position during the operation. This technology can also generate diversified guide plates that are exactly the same as the cutting direction at the target cutting site, which plays a key role in the auxiliary cutting of the operation.
在步骤S120中,根据所述切割目标模型的网格信息进行表面网格提取,在所述切割目标模型的表面生成具有预设厚度的薄膜。In step S120, surface mesh extraction is performed according to the mesh information of the cutting target model, and a film with a preset thickness is generated on the surface of the cutting target model.
为了生成对称、厚度均匀、卡槽长度宽度高度可设定的导板,本发明的***采用Unity中一个标准矩形板来模拟导板卡槽,通过设定该矩形板的长宽高即可得到对应大小的导板。该步骤中对切割目标模型提取一定范围的表面网格,经过复制、反转、位移、边缘缝合后得到具有预设厚度的薄膜。In order to generate a guide plate with symmetrical, uniform thickness and settable slot length, width and height, the system of the present invention uses a standard rectangular plate in Unity to simulate the guide plate slot, and the corresponding length can be obtained by setting the length, width and height of the rectangular plate. The size of the guide plate. In this step, a certain range of surface meshes are extracted from the cutting target model, and after duplication, inversion, displacement, and edge stitching, a film with a preset thickness is obtained.
图8为本公开一实施例图1中步骤S120的流程图,具体包括以下步骤:Fig. 8 is a flowchart of step S120 in Fig. 1 of an embodiment of the disclosure, which specifically includes the following steps:
在步骤S801中,基于球形区域网格提取方法对所述切割目标模型的网格信息进行提取,得到薄膜的下表面。In step S801, the mesh information of the cutting target model is extracted based on the spherical region mesh extraction method to obtain the lower surface of the film.
在步骤S802中,对所述薄膜的下表面按照所述薄膜的下表面的法向量的方向进行所述预设厚度的位移,并对位移后的网格顶点查找重复点。In step S802, the lower surface of the thin film is displaced by the preset thickness in the direction of the normal vector of the lower surface of the thin film, and repeated points are searched for the displaced mesh vertices.
在步骤S803中,计算所述重复点位移后的坐标,基于所述坐标对位移后的重复点进行修正,到薄膜的上表面。In step S803, the coordinate after the displacement of the repeated point is calculated, and the displaced repeated point is corrected based on the coordinate to the upper surface of the film.
在步骤S804中,对所述薄膜的上表面和所述薄膜的下表面的边缘上 的切割点逐对连接成三角面,得到所述薄膜。In step S804, the cutting points on the edges of the upper surface of the film and the lower surface of the film are connected pair by pair to form a triangle surface to obtain the film.
本发明的一个实施例中,表面网格的提取范围就是薄膜的范围,由于实际手术多种多样,手术部位差异大,对薄膜的范围大小、形状有着不一样的需求,无论设计何种提取规则都难以普遍适用于不同的手术部位,因此本发明的***采用统一的球形区域网格提取法,并且提供给医生切割工具,让医生手动对生成后的薄膜导板进行自定义调整修改,使其形状和大小能够满足手术的多样化需求。In an embodiment of the present invention, the extraction range of the surface grid is the range of the film. Due to the variety of actual operations and the large differences in the surgical site, there are different requirements for the size and shape of the film, no matter what extraction rule is designed It is difficult to be universally applicable to different surgical sites. Therefore, the system of the present invention adopts a unified spherical area grid extraction method, and provides cutting tools for the doctor, so that the doctor can manually adjust and modify the generated film guide to make it shape And size can meet the diverse needs of surgery.
上述步骤S801中基于球形区域网格提取方法对所述切割目标模型的网格信息进行提取包括:In the above step S801, extracting the mesh information of the cutting target model based on the spherical region mesh extraction method includes:
(1)将所述切割目标模型的网格顶点和所述切割平面上选取的点由局部坐标转换为世界坐标,并在所述世界坐标下计算所述切割模型上的网格顶点与所述切割平面上选取的点之间的距离;(1) Convert the mesh vertices of the cutting target model and the selected points on the cutting plane from local coordinates to world coordinates, and calculate the mesh vertices on the cutting model and the The distance between selected points on the cutting plane;
(2)根据所述切割目标模型的网格顶点与所述切割平面之间的距离与预设的球形区域的半径进行比较,得到所述球形区域内的网格顶点;(2) Comparing the distance between the mesh vertex of the cutting target model and the cutting plane with the preset radius of the spherical region to obtain the mesh vertex in the spherical region;
(3)根据所述切割目标模型的三角面的三个顶点索引,如果所述三个顶点索引均在所述球形区域内,则所述三角面位于所述球形区域内;(3) According to the three vertex indexes of the triangle surface of the cutting target model, if the three vertex indexes are all in the spherical area, the triangle surface is located in the spherical area;
(4)如果所述三个顶点索引不是全部在所述球形区域内,则根据所述切割平面对所述三角面进行切割,得到两个切割点,将位于所述三个顶点索引与所述两个切割点因切割产生以及切割后划分产生的新三角面,划分为所述球形区域内;(4) If the three vertex indexes are not all in the spherical area, the triangular face is cut according to the cutting plane to obtain two cutting points, which will be located between the three vertex indexes and the Two cutting points are generated by cutting and new triangles generated after cutting are divided into the spherical area;
(5)根据所述球形区域内的网格顶点和三角面进行提取,得到所述球形区域内的表面网格。(5) Extract according to the mesh vertices and triangular faces in the spherical area to obtain the surface mesh in the spherical area.
由于不同模型的长度单位不一致,有些模型长度单位为毫米,而Unity默认单位为米,因此在导入模型时会自动对模型进行缩放,而模型网格顶点坐标信息却不会因缩放而改变,因此提取网格时需要将顶点的坐标信息转化为统一的世界坐标信息。本发明的***的球形区域网格提取法具体实现过程如下:Since the length units of different models are inconsistent, some models have length units in millimeters, and Unity’s default units are meters. Therefore, the model will be automatically scaled when importing the model, and the model grid vertex coordinate information will not change due to scaling. When extracting the grid, it is necessary to transform the coordinate information of the vertices into unified world coordinate information. The specific implementation process of the spherical area grid extraction method of the system of the present invention is as follows:
(1)获取切割板的中心点世界坐标P,对于每个网格顶点的局部坐标Ei,经过空间坐标变换得到对应的世界坐标Qi,若|P-Qi|<radius(radius为球形区域半径),则设置Qi对应标签为1,否则为0。当标签为1时,把Ei放入新顶点数组V,设数组E的第i个顶点是新数组V的第j个顶点,创建一个数组oldToNewMap记录索引映射关系Ei=Vj,网格顶点法向量同理。(1) Obtain the world coordinate P of the center point of the cutting board. For the local coordinate Ei of each grid vertex, the corresponding world coordinate Qi is obtained through space coordinate transformation, if |P-Qi|<radius (radius is the radius of the spherical area) , Set the corresponding label of Qi to 1, otherwise it is 0. When the label is 1, put Ei into the new vertex array V, let the i-th vertex of the array E be the j-th vertex of the new array V, create an array oldToNewMap to record the index mapping relationship Ei=Vj, the normal vector of the grid vertex The same is true.
(2)遍历三角面数组,对于每个三角面的三个顶点索引Top、L、R,若三个顶点对应标签全为1,则该三角面在球形区域内,将该三角面的索引经过oldToNewMap映射转换到新网格顶点索引后装入新三角数组T;若三个顶点标签全为0,则在提取范围外,不做任何操作;若有的顶点为1而有的顶点为0,说明该三角面处在提取边界,如果简单的舍弃或装入,会导致薄膜边缘出现锯齿形状,不利于3D打印和实际使用,因此下一步需要用球形区域边界对三角面进行分割。(2) Traverse the array of triangles. For the three vertices index Top, L, R of each triangle, if the corresponding labels of the three vertices are all 1, then the triangle is in the spherical area, and the index of the triangle is passed The oldToNewMap map is converted to the new mesh vertex index and then loaded into the new triangle array T; if the labels of the three vertices are all 0, no operation is performed outside the extraction range; if some vertices are 1 and some are 0, This shows that the triangle is at the extraction boundary. If it is simply discarded or loaded, it will cause the edge of the film to appear jagged, which is not conducive to 3D printing and practical use. Therefore, the next step is to divide the triangle with the spherical area boundary.
(3)标签不全为1的情况分为以下两种:1)当有一个顶点标签为1,两个顶点标签为0,说明该三角网格的一个角在提取区域内,添加该角被横切后的三角面即可;2)当两个顶点标签为1,一个顶点标签为0,则在提取区域内的是一个不规则矩形,需要对角相连后得到两个三角面(LS,R,L)(R,LS,RS)添加到新三角面数组。图9为本发明一实施例中三角面分割示意图,如图9所示,设在区域内的单个顶点为Top,区域外的为L、R,切割产生的切割点为LS、RS,进一步通过求解下列方程组来计算LS的坐标值,RS同理,以LS为例,计算公式如下:(3) The cases where the labels are not all 1 are divided into the following two types: 1) When there is a vertex with a label of 1, and two vertices with a label of 0, it means that a corner of the triangle mesh is in the extraction area. The cut triangle is enough; 2) When the label of two vertices is 1, and the label of one vertex is 0, then the extracted area is an irregular rectangle, which needs to be connected diagonally to obtain two triangular faces (LS, R ,L)(R,LS,RS) is added to the new triangle array. Figure 9 is a schematic diagram of the triangular face segmentation in an embodiment of the present invention. As shown in Figure 9, the single vertex in the area is Top, the outside of the area is L and R, and the cutting points generated by cutting are LS and RS. Solve the following equations to calculate the coordinate value of LS. RS is the same. Taking LS as an example, the calculation formula is as follows:
LS=L+(Top-L)·x   (公式3)LS=L+(Top-L)·x (Formula 3)
|LS-P|=radius   (公式4)|LS-P|=radius (Formula 4)
(4)把切割产生的新的顶点和三角面添加到新网格后,成功提取了球形区域内的表面网格。(4) After adding the new vertices and triangular faces produced by cutting to the new mesh, the surface mesh in the spherical area is successfully extracted.
经过上一步提取出表面网格后,还需要将表面网格复制处理产生具有预设厚度的薄膜,没有厚度的网格模型是无法3D打印的。生成薄膜的 实现步骤具体如下:After the surface mesh is extracted in the previous step, the surface mesh needs to be replicated to produce a film with a preset thickness. A mesh model without thickness cannot be 3D printed. The specific steps for producing the film are as follows:
(1)对上面步骤获得的新顶点数组V和顶点法向量数组N的每一个元素进行计算得到对应的新顶点坐标和法向量:(1) Calculate each element of the new vertex array V and the vertex normal vector array N obtained in the above steps to obtain the corresponding new vertex coordinates and normal vector:
v=V i+N i·Thickness   (公式5) v=V i +N i ·Thickness (Equation 5)
n=N i   (公式6) n=N i (Equation 6)
其中Thickness为薄膜的厚度,可以看作将网格每个顶点向自己法向量方向位移Thickness单位后得到新的一层网格,新的这层网格将作为薄膜的上表面,原来的网格作为薄膜的下表面。Thickness is the thickness of the film, which can be regarded as a new layer of mesh obtained after each vertex of the mesh is displaced in the direction of its normal vector by Thickness units. This new layer of mesh will be used as the upper surface of the film, the original mesh As the bottom surface of the film.
需要说明的是,模型网格中经常会出现一种类型的顶点,这些顶点的坐标相同,法向量却不同,这种顶点的出现是为了拟合物体表面凹凸不平的尖锐部位,例如正方体的角点实际上有3个顶点在同一位置,分别具有3个不同的法向量,当用步骤(1)的方法对这些顶点进行平移会导致原来在同一位置的顶点分离,造成模型网格破裂,因此需要对这种重复点进行特殊处理。具体处理方式为:首先要找出重复点,由于重复点的个数不互相一致,因此采用集合ArrayList结构来存储重复点;然后再把每一个重复点集合嵌套装入记录有多少组重复点的ArrayList集合中,最后计算每一组重复点位移后的坐标:It should be noted that there is often a type of vertices in the model mesh. The coordinates of these vertices are the same but the normal vectors are different. The appearance of this kind of vertices is to fit the sharp parts of the surface of the object, such as the corners of a cube. The point actually has 3 vertices at the same position, each with 3 different normal vectors. When the method of step (1) is used to translate these vertices, the original vertices at the same position will separate, causing the model mesh to break, so Special treatment is required for such duplicate points. The specific processing method is: first find out the duplicate points, because the number of duplicate points is not consistent with each other, so the set ArrayList structure is used to store the duplicate points; then each set of duplicate points is nested into the record how many sets of duplicate points In the ArrayList collection, finally calculate the coordinates of each set of repeated points after displacement:
Figure PCTCN2019104404-appb-000002
Figure PCTCN2019104404-appb-000002
其中Count为重复点个数,Rate为重复点平均法向量与新点法向量的比,vi为重复点中任意一个点的坐标,用计算出来的坐标v对位移后的重复点进行修正,以解决上表面网格破裂的问题。Where Count is the number of repeated points, Rate is the ratio of the average normal vector of the repeated points to the normal vector of the new point, and vi is the coordinate of any point in the repeated point. Use the calculated coordinate v to correct the displaced repeated point to Solve the problem of grid cracking on the upper surface.
还需要说明的是,步骤(1)把原来的网格作为下表面网格还需要进行法向量和三角面索引顺序的反转,把原来网格顶点的法向量逐个取反,并反转三角面数据即可。It should also be noted that in step (1) to use the original mesh as the lower surface mesh, it is necessary to reverse the order of the normal vector and the triangle face index, reverse the normal vectors of the original mesh vertices one by one, and reverse the triangle Surface data is fine.
(2)得到上下两层网格表面后,还需要把两层表面的边缘缝合起来,薄膜形成一个封闭的模型,满足3D打印的必要条件。缝合需要记录提取网格时所有对边界三角面进行过切割的切割点,这些切割点构成两层网 格表面的边缘,找到上下层表面边缘切割点逐对连接成三角面,即可完成缝合,得到薄膜。(2) After obtaining the upper and lower mesh surfaces, the edges of the two layers need to be sewn together, and the film forms a closed model, which meets the necessary conditions for 3D printing. Stitching needs to record all the cutting points that have been cut on the boundary triangle when extracting the mesh. These cutting points form the edges of the two-layer mesh surface. Find the upper and lower surface edge cutting points to connect the triangles one by one to complete the stitching. Obtain a film.
在步骤S130中,利用矩形板在所述切割位置对所述薄膜的表面进行切割,得到导板卡槽位置以及形成导板表面。In step S130, a rectangular plate is used to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface.
本发明的一个实施例中,该步骤具体包括:In an embodiment of the present invention, this step specifically includes:
首先,利用所述矩形板坐标构建4个平面,基于所述4个平面分别对所述薄膜的上表面和所述薄膜的下表面进行切割,切割的位置即为所述导板卡槽位置。其中得到4个平面的方式为利用所述矩形板的左右两面作为切割所述薄膜的下表面两端的平面,得到所述4个平面中的2个平面;将所述矩形板平移所述预设厚度距离后,作为切割所述薄膜的上表面两端的平面,得到所述4个平面中的剩余2个平面。First, four planes are constructed using the rectangular plate coordinates, and the upper surface of the film and the lower surface of the film are respectively cut based on the four planes, and the position of the cutting is the position of the guide plate slot. The way to obtain four planes is to use the left and right sides of the rectangular plate as the planes for cutting both ends of the lower surface of the film to obtain two of the four planes; translate the rectangular plate to the preset After the thickness distance, the two ends of the upper surface of the film are cut as planes to obtain the remaining two planes among the four planes.
其次,根据所述矩形板的顶点坐标生成导板的网格顶点,并根据所述导板的网格顶点与所述薄膜上的切割点相连构成三角面网格,形成所述导板表面。Secondly, the grid vertices of the guide plate are generated according to the coordinates of the vertices of the rectangular plate, and the grid vertices of the guide plate are connected with the cutting points on the film to form a triangular mesh to form the surface of the guide plate.
基于上述,该步骤中利用矩形板的坐标信息构建4个平面,分别对薄膜的上下表面进行两次切割,去除中间部分的网格,空出来的部分即是卡槽的位置,最后根据矩形板的顶点坐标生成导板的网格顶点与被切割薄膜的切割点相连构造三角面网格,形成导板表面。该步骤包括:1)根据所述矩形板的上下两个顶点坐标得到切割方向;结合所述切割方向按照所述4个平面对所述薄膜进行4次切割,得到上半圈切割点和下半圈切割点;2)所述导板的网格顶点中的上半部分网格顶点与所述上半圈切割点相连形成三角面网格,得到导板上表面;3)所述导板的网格顶点中的下半部分网格顶点与所述下半圈切割点相连形成三角面网格,得到导板下表面;4)根据所述导板上表面和所述导板下表面形成所述导板表面。Based on the above, in this step, the coordinate information of the rectangular plate is used to construct 4 planes, and the upper and lower surfaces of the film are cut twice to remove the grid in the middle part. The free part is the position of the card slot. Finally, according to the rectangular plate The vertex coordinates of the generated guide plate are connected with the cutting points of the film to be cut to construct a triangular mesh to form the surface of the guide plate. This step includes: 1) Obtain the cutting direction according to the coordinates of the upper and lower vertices of the rectangular plate; combine the cutting direction to cut the film 4 times according to the 4 planes to obtain the upper half circle cutting point and the lower half Circle cutting points; 2) The upper half of the mesh vertices of the grid vertices of the guide plate are connected with the upper half circle cutting points to form a triangular mesh to obtain the upper surface of the guide plate; 3) The grid vertices of the guide plate The vertices of the bottom half of the grid in the bottom half are connected with the cutting points of the bottom half circle to form a triangular mesh to obtain the lower surface of the guide plate; 4) The guide plate surface is formed according to the upper surface of the guide plate and the lower surface of the guide plate.
因此该步骤中为了在薄膜上生成导板的网格,首先需要对薄膜中间部位进行切割以空出导板的位置,导板的内表面与薄膜的下表面相连, 导板的外表面与薄膜的上表面相连,由于导板本身也具有厚度,即内外表面需要错开位置,因此本发明的***选用矩形板的左右两面作为切割薄膜下表面两端的平面,将这两面向左右平移Thickness的距离后作为切割薄膜上表面两端的平面。切割的原理与上面的模型切割算法基本一致,此处不再复述关于切割的部分。Therefore, in order to generate the grid of the guide plate on the film in this step, the middle part of the film needs to be cut to free the position of the guide plate. The inner surface of the guide plate is connected with the lower surface of the film, and the outer surface of the guide plate is connected with the upper surface of the film. Since the guide plate itself also has thickness, that is, the inner and outer surfaces need to be staggered, the system of the present invention selects the left and right sides of the rectangular plate as the planes at both ends of the lower surface of the cutting film, and translates the two sides by the thickness distance left and right as the upper surface of the cutting film. The plane at both ends. The principle of cutting is basically the same as the above model cutting algorithm, and the part about cutting will not be repeated here.
该步骤中首先分别生成对上下表面网格的两端进行切割的4个平面,具体步骤如下:In this step, 4 planes that cut the two ends of the upper and lower surface grids are generated respectively. The specific steps are as follows:
(1)选中矩形板左面的3个坐标不同的顶点A1、A2、A3;(1) Select 3 vertices A1, A2, A3 with different coordinates on the left side of the rectangular plate;
(2)构造向量A1A2、A1A3,则该平面法向量n=A1A2×A1A3,由A1、n得到平面的点法式方程,右平面的构造方法同理;(2) Construct vectors A1A2 and A1A3, then the plane normal vector n=A1A2×A1A3, get the point normal equation of the plane from A1, n, and the right plane is constructed in the same way;
(3)左侧上表面的切割平面可由下表面切割平面平移获得,即取点B1=A1+n·Thickness,法向量同为n,则可得到左侧切割上表面的平面方程,右侧同理可得。(3) The cutting plane of the upper surface on the left side can be obtained by the translation of the cutting plane of the lower surface, that is, take the point B1=A1+n·Thickness, and the normal vector is the same as n, then the plane equation for cutting the upper surface on the left side can be obtained. Reasonable.
其次,寻找每次切割的上、下半圈切割点,经过上述步骤4个面对薄膜的切割后,薄膜网格中间空出了一段,要进行关键的导板网格生成,还需要分别找出4次切割的上、下半圈切割点,具体步骤如下:Secondly, find the upper and lower half circle cutting points of each cutting. After the 4 cuttings facing the film in the above steps, there is a section in the middle of the film grid. To generate the key guide plate grid, you need to find out separately The upper and lower half circle cutting points of 4 cuts, the specific steps are as follows:
(1)首先计算导板辅助切割的切割方向cutVector,切割方向可由矩形板的上下两个顶点坐标A1、A2得到:cutVector=A2-A1;(1) First calculate the cutting direction cutVector of the guide plate assisted cutting. The cutting direction can be obtained by the coordinates A1 and A2 of the upper and lower vertices of the rectangular plate: cutVector=A2-A1;
(2)获取对薄膜网格进行切割的平面的法向量n,然后创建一个向量thwartwiseNormal=cutVector×n,用该向量来寻找所有切割点中的最左点和最右点,对于每个切割点Ci,计算其对应的值(2) Obtain the normal vector n of the plane that cuts the film grid, and then create a vector thwartwiseNormal=cutVector×n, use this vector to find the leftmost point and the rightmost point among all cutting points, for each cutting point Ci, calculate its corresponding value
Value[i]=(C i-Point)·thwartwiseNormal  (公式8) Value[i]=(C i -Point)·thwartwiseNormal (Formula 8)
其中Point是切割平面中的任意一个点,Value[i]最小值对应的Ci为最右边的切割点,Value[i]最大值对应的Ci为最左边的切割点;Where Point is any point in the cutting plane, Ci corresponding to the minimum value of Value[i] is the rightmost cutting point, and Ci corresponding to the maximum value of Value[i] is the leftmost cutting point;
(3)找到左右两个边缘点后,通过顺时针找相邻切割点的方式,分别从两个点出发,找到对方停止,即可找出上下半圈切割点,放入对应的集合中。由于每个三角面被分割时都会产生两个切割点,作为一对切割点放入新 顶点数组中,因此每个三角面的一对切割点中有一个与相邻三角面的切割点坐标一致,根据此原理,从最左点出发遍历切割点队数组,若找到与自身匹配的切割点,则将该切割点队的另一个点放进数组并继续寻找该点的匹配点,直到找到最右点终止循环,则数组中保存的切割点为上半圈切割点,下半圈切割点同理可得。(3) After finding the left and right edge points, find the adjacent cutting points clockwise, start from the two points respectively, find the other side to stop, you can find the upper and lower half circle cutting points, and put them into the corresponding set. Since each triangle is divided, two cutting points will be generated, which are put into the new vertex array as a pair of cutting points, so one of the pair of cutting points of each triangle has the same coordinates as the cutting point of the adjacent triangle. According to this principle, starting from the leftmost point, traverse the cutting point array. If it finds a cutting point that matches itself, put another point of the cutting point group into the array and continue to search for the matching point at this point until the most The right point terminates the loop, the cutting point saved in the array is the cutting point of the upper half circle, and the cutting point of the lower half circle can be obtained in the same way.
(4)计算导板顶点,上半部分导板顶点与上半圈切割点相连,下半部分导板顶点与下半圈切割点相连。(4) Calculate the apex of the guide plate, the apex of the upper part of the guide plate is connected with the cutting point of the upper half circle, and the apex of the lower part of the guide plate is connected with the cutting point of the lower half circle.
在步骤S140中,根据所述导板卡槽位置和所述导板平面构建所述VR场景下的导板3D打印模型。In step S140, a 3D printing model of the guide plate in the VR scene is constructed according to the position of the guide plate slot and the guide plate plane.
本实施例中以单导板且被切割的人体组织为骨头建立模型为例,利用切割工具和多种导板生成工具对该模型进行模拟切割,得到对应切割位置的手术辅助导板,图10为本发明一实施例中在VR场景中构建的切割目标模型的示意图,图11~图13为本发明一实施例中在VR场景中自动生成单导板模型过程的示意图,其中图11为本发明一实施例中利用手柄锁定导板模型时的示意图,图12为本发明一实施例中利用手柄锁定卡槽模型时的示意图,图13为本发明一实施例中利用手柄移动导板模型时的示意图。In this embodiment, a single guide plate and cut human tissue as a bone model is taken as an example, and the model is simulated by cutting tools and a variety of guide plate generation tools to obtain the surgical auxiliary guide plate corresponding to the cutting position. FIG. 10 is the present invention A schematic diagram of a cutting target model constructed in a VR scene in an embodiment. Figures 11 to 13 are schematic diagrams of a process of automatically generating a single guide model in a VR scene in an embodiment of the present invention. Figure 11 is an embodiment of the present invention. Fig. 12 is a schematic diagram of locking the card slot model with the handle in an embodiment of the present invention, and Fig. 13 is a schematic diagram of using the handle to move the guide plate model in an embodiment of the present invention.
需要说明的是,在不同的手术场景中对导板的形状存在多样化的需求,除了普通的卡槽闭合的单个导板外,有些部位需要卡槽不闭合的半导板,有些部位需要两个卡槽闭合的导板相连在同一个薄膜上,因此本发明的***在单导板基础上提供多种样式的导板生成方法,封装在导板生成工具中供用户选择使用。下面简单介绍不同样式导板对上面算法的改变部分:It should be noted that there are diversified requirements for the shape of the guide plate in different surgical scenes. In addition to a single guide plate with a closed card slot, some parts require a semi-guide plate with an unclosed card slot, and some parts require two card slots. The closed guide plates are connected to the same film, so the system of the present invention provides multiple styles of guide plate generation methods on the basis of a single guide plate, which are packaged in a guide plate generation tool for users to choose and use. The following briefly introduces the changes of different style guides to the above algorithm:
(1)双导板样式:本发明的***提供两个矩形板给用户使用,分别代表了两次切割的导板所在部位,在一次导板生成后,只需把第一次导板生成的网格、上下表面网格等信息传递给第二个导板,第二个导板在第一次生成的薄膜基础上再执行一次导板生成方法即可,图14为本发明 一实施例中生成双导板模型的示意图。(1) Double guide plate style: The system of the present invention provides two rectangular plates for users to use, which respectively represent the position of the two-cut guide plate. After the first guide plate is generated, only the grid generated by the first guide plate, the upper and lower Information such as the surface grid is transferred to the second guide plate, and the second guide plate executes the guide plate generation method again on the basis of the first generated film. FIG. 14 is a schematic diagram of generating a double guide plate model in an embodiment of the present invention.
(2)半导板样式:半导板生成在表面网格提取和薄膜生成步骤与普通导板一样,但在薄膜网格切割时不再是用4个平面进行切割,而是用2个平面切割单侧的网格,另外一侧的网格直接舍弃,因此在生成导板顶点和导板顶点与切割点的相连中与单导板有一些细节上的差异,将单导板两侧的网格顶点相连形成三角面,形成只有其中一侧的导板,即得到半导板,图15为本发明一实施例中生成半导板模型的示意图。(2) Semi-guide plate style: The surface grid extraction and film generation steps of the semi-guide plate generation are the same as those of ordinary guide plates, but when the film grid is cut, 4 planes are no longer used for cutting, but 2 planes are used to cut one side The grid on the other side is directly discarded. Therefore, there are some differences in detail between the vertices of the guide plate and the connection between the vertices of the guide plate and the cutting point. The grid vertices on both sides of the single guide plate are connected to form a triangular surface , The guide plate with only one side is formed to obtain the semi-guide plate. FIG. 15 is a schematic diagram of generating the semi-guide plate model in an embodiment of the present invention.
还需要说明的是,除了对导板的形状有着多样化的需求,对导板插槽的宽度、长度、高度和插槽导向切割的角度都有着不同的要求,为了满足个性化导板的设计,所有导板的插槽的长宽高以及角度都由相应的导板生成工具决定,因此可以通过选定工具打开物体操作菜单,在菜单的设置大小中对导板生成工具进行自定义设置来改变生成的导板的相关数值,而插槽导向切割的角度则由用户放置工具的角度决定。导板生成后,还可以使用切割工具对导板进行修剪以去除多余的部分,以方便导出导板模型进行3D打印后能够直接使用。It should also be noted that in addition to the diversified requirements for the shape of the guide plate, there are different requirements for the width, length, height of the guide plate slot and the angle of the slot guiding cutting. In order to meet the design of the personalized guide plate, all the guide plates The length, width, height and angle of the slot are determined by the corresponding guide plate generation tool, so you can open the object operation menu by selecting the tool, and customize the guide plate generation tool in the menu setting size to change the generated guide plate. Value, and the angle of slot-guided cutting is determined by the angle at which the user places the tool. After the guide plate is generated, you can also use a cutting tool to trim the guide plate to remove excess parts, so as to facilitate the export of the guide plate model for 3D printing and then use it directly.
综上所述,本发明实施例提供的上述方法,一方面,通过在VR场景中对被切割模型的切割位置、导板等进行建模,从而可以在虚拟现实中无限制地对真实的手术对象重复进行多次切割操作,在切割位置生成3D导板打印模型。另一方面,利用虚拟现实的真实感和立体感的优势,在虚拟现实中构建3D导板打印模型,比传统的直接3D打印导板模型可以减少操作难度和制作时长。In summary, the above method provided by the embodiments of the present invention, on the one hand, by modeling the cutting position, guide plate, etc. of the cut model in the VR scene, the real surgical object can be unrestricted in virtual reality. Repeat the cutting operation several times to generate a 3D guide plate print model at the cutting position. On the other hand, taking advantage of the realism and three-dimensionality of virtual reality, building a 3D guide plate printing model in virtual reality can reduce the operation difficulty and production time compared with the traditional direct 3D printing guide plate model.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本发明的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present invention, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描 述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本发明实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本发明实施方式的方法。Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) execute the method according to the embodiment of the present invention.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。After considering the specification and practicing the invention disclosed herein, those skilled in the art will easily think of other embodiments of the present invention. This application is intended to cover any variations, uses, or adaptive changes of the present invention. These variations, uses, or adaptive changes follow the general principles of the present invention and include common knowledge or conventional technical means in the technical field not disclosed by the present invention. . The description and the embodiments are to be regarded as exemplary only, and the true scope and spirit of the present invention are pointed out by the following claims.
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.

Claims (10)

  1. 一种基于VR的导板3D打印模型建立方法,其特征在于,其包括:A VR-based method for establishing a 3D printing model of a guide plate is characterized in that it includes:
    在虚拟现实VR场景中,基于对被切割模型的平面切割得到切割位置和切割目标模型;In the virtual reality VR scene, the cutting position and the cutting target model are obtained based on the plane cutting of the cut model;
    根据所述切割目标模型的网格信息进行表面网格提取,在所述切割目标模型的表面生成具有预设厚度的薄膜;Performing surface mesh extraction according to the mesh information of the cutting target model, and generating a film with a preset thickness on the surface of the cutting target model;
    利用矩形板在所述切割位置对所述薄膜的表面进行切割,得到导板卡槽位置以及形成导板表面;Use a rectangular plate to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface;
    根据所述导板卡槽位置和所述导板平面构建所述VR场景下的导板3D打印模型。Constructing a 3D printing model of the guide plate in the VR scene according to the position of the guide plate slot and the guide plate plane.
  2. 如权利要求1所述的基于VR的导板3D打印模型建立方法,其特征在于,所述基于对被切割模型的平面切割得到切割位置和切割目标模型包括:The method for establishing a 3D printing model of a guide plate based on VR according to claim 1, wherein the obtaining the cutting position and the cutting target model based on the plane cutting of the cut model comprises:
    根据切割工具的位置确定针对所述被切割模型的切割位置和切割平面;Determine the cutting position and cutting plane for the cut model according to the position of the cutting tool;
    根据所述被切割模型的网格顶点与所述切割平面的相对位置对所述被切割模型进行分割,产生模型切口,其中所述被切割模型由多个三角面组成,且所述三角面由三个所述网格顶点组成;The cut model is divided according to the relative position of the mesh vertex of the cut model and the cutting plane to generate model cuts, wherein the cut model is composed of a plurality of triangular faces, and the triangular faces are composed of Composed of three vertices of the grid;
    对所述模型切口通过添加三角网格进行填充,形成所述切割目标模型。The cut of the model is filled by adding a triangular mesh to form the cut target model.
  3. 如权利要求2所述的基于VR的导板3D打印模型建立方法,其特征在于,所述根据所述被切割模型的网格顶点与所述切割平面的相对位置对所述被切割模型进行分割包括:The method for establishing a 3D printing model of a guide plate based on VR according to claim 2, wherein the segmenting the cut model according to the relative position of the mesh vertex of the cut model and the cutting plane comprises :
    根据所述网格顶点建立网格顶点数组、标签数组、用于存放所述网格顶点的第一顶点集合和第二顶点集合,并建立代表旧顶点数组索引与新顶点集合索引映射关系的整数数组;Establish a grid vertex array, a label array, a first vertex set and a second vertex set for storing the grid vertices according to the grid vertices, and establish an integer representing the mapping relationship between the old vertex array index and the new vertex set index Array
    将所述被切割模型的网格顶点以及在所述切割平面上选取的一点从 空间坐标转换到局部坐标,得到网格顶点的局部坐标和切面上一点的局部坐标;Transforming the mesh vertices of the cut model and a point selected on the cutting plane from spatial coordinates to local coordinates to obtain the local coordinates of the mesh vertices and the local coordinates of a point on the tangent plane;
    将所述切割平面的法向量从空间坐标转换到局部坐标,得到局部坐标法向量;Transforming the normal vector of the cutting plane from space coordinates to local coordinates to obtain a local coordinate normal vector;
    根据所述网格顶点的局部坐标与所述切面上一点的局部坐标形成的向量与所述局部坐标法向量的点积进行判断,如果所述点积大于或等于0,则将所述网格顶点添加到所述第一顶点集合中,并在所述标签数组中设置对应的标签值为1;如果所述点积小于0,则将所述网格顶点添加到所述第二顶点集合中,并在所述标签数组中设置对应的标签值为0。The judgment is made according to the dot product of the vector formed by the local coordinates of the grid vertex and the local coordinates of a point on the tangent plane and the local coordinate normal vector. If the dot product is greater than or equal to 0, the grid The vertex is added to the first vertex set, and the corresponding label value is set in the label array; if the dot product is less than 0, the mesh vertex is added to the second vertex set , And set the corresponding tag value to 0 in the tag array.
  4. 如权利要求3所述的基于VR的导板3D打印模型建立方法,其特征在于,所述根据所述被切割模型的网格顶点与所述切割平面的相对位置对所述被切割模型进行分割还包括:The VR-based guide plate 3D printing model establishment method of claim 3, wherein the cut model is divided according to the relative position of the mesh vertex of the cut model and the cutting plane. include:
    针对所述三角面建立用于存放所述三角面的第一三角面集合与第二三角面集合;Establishing a first triangle surface set and a second triangle surface set for storing the triangle surface for the triangle surface;
    当所述三角面的三个网格顶点均位于所述切割平面的一侧时,将所述三角面的所述三个网格顶点划分到所述第一三角面集合或所述第二三角面集合中;When the three mesh vertices of the triangle face are all located on one side of the cutting plane, the three mesh vertices of the triangle face are divided into the first triangle face set or the second triangle Face set
    当所述三角面的三个网格顶点分别位于所述切割平面的两侧时,按照所述三角面的顶点索引对应的标签值对所述三角面进行切割,将切割后的三角面分别添加到所述第一三角面集合和所述第二三角面集合中。When the three mesh vertices of the triangular face are located on both sides of the cutting plane, the triangular face is cut according to the label value corresponding to the vertex index of the triangular face, and the cut triangular faces are added separately To the first set of triangles and the second set of triangles.
  5. 如权利要求4所述的基于VR的导板3D打印模型建立方法,其特征在于,所述按照所述三角面的顶点索引对应的标签值对所述三角面进行切割包括:The method for establishing a 3D printing model of a guide plate based on VR according to claim 4, wherein the cutting the triangular face according to the label value corresponding to the vertex index of the triangular face comprises:
    根据所述切割平面与所述三角面相交形成两个切割点,得到两个切割点的坐标位置,所述两个切割点连接形成所述模型切口的边界;Two cutting points are formed according to the intersection of the cutting plane and the triangular surface, and the coordinate positions of the two cutting points are obtained, and the two cutting points are connected to form the boundary of the model cut;
    根据所述两个切割点的坐标位置和所述三角面的原三个网格顶点形成三个新的三角面,将三个所述新的三角面添加到所述第一三角面集合 和所述第二三角面集合中,并将所述两个切割点分别添加到所述第一顶点集合和所述第二顶点集合中。According to the coordinate positions of the two cutting points and the original three mesh vertices of the triangles, three new triangles are formed, and the three new triangles are added to the first set of triangles and all the triangles. In the second set of triangular faces, the two cutting points are added to the first set of vertices and the second set of vertices, respectively.
  6. 如权利要求2所述的基于VR的导板3D打印模型建立方法,其特征在于,所述根据所述切割目标模型的网格信息进行表面网格提取,在所述切割目标模型的表面生成具有预设厚度的薄膜,包括:The VR-based guide plate 3D printing model establishment method of claim 2, wherein the surface mesh extraction is performed according to the mesh information of the cutting target model, and the surface of the cutting target model is generated on the surface of the cutting target model. Set the thickness of the film, including:
    基于球形区域网格提取方法对所述切割目标模型的网格信息进行提取,得到薄膜的下表面;Extracting the grid information of the cutting target model based on the spherical area grid extraction method to obtain the lower surface of the film;
    对所述薄膜的下表面按照所述薄膜的下表面的法向量的方向进行所述预设厚度的位移,并对位移后的网格顶点查找重复点;Performing the displacement of the preset thickness on the lower surface of the film in the direction of the normal vector of the lower surface of the film, and searching for duplicate points on the vertices of the mesh after the displacement;
    计算所述重复点位移后的坐标,基于所述坐标对位移后的重复点进行修正,到薄膜的上表面;Calculate the coordinates of the displaced repeated points, and correct the displaced repeated points to the upper surface of the film based on the coordinates;
    对所述薄膜的上表面和所述薄膜的下表面的边缘上的切割点逐对连接成三角面,得到所述薄膜。The cutting points on the edges of the upper surface of the film and the lower surface of the film are connected pair by pair to form a triangle surface to obtain the film.
  7. 如权利要求6所述的基于VR的导板3D打印模型建立方法,其特征在于,所述基于球形区域网格提取方法对所述切割目标模型的网格信息进行提取,包括:8. The VR-based 3D printing model building method of a guide plate according to claim 6, wherein the extraction method based on the spherical area grid extracting the grid information of the cutting target model comprises:
    将所述切割目标模型的网格顶点和所述切割平面上选取的点由局部坐标转换为世界坐标,并在所述世界坐标下计算所述切割模型上的网格顶点与所述切割平面上选取的点之间的距离;Convert the mesh vertices of the cutting target model and the selected points on the cutting plane from local coordinates to world coordinates, and calculate the mesh vertices on the cutting model and the cutting plane under the world coordinates The distance between the selected points;
    根据所述切割目标模型的网格顶点与所述切割平面之间的距离与预设的球形区域的半径进行比较,得到所述球形区域内的网格顶点;Comparing the distance between the mesh vertex of the cutting target model and the cutting plane with the preset radius of the spherical region to obtain the mesh vertex in the spherical region;
    根据所述切割目标模型的三角面的三个顶点索引,如果所述三个顶点索引均在所述球形区域内,则所述三角面位于所述球形区域内;According to the three vertex indexes of the triangle surface of the cutting target model, if the three vertex indexes are all in the spherical area, the triangle surface is located in the spherical area;
    如果所述三个顶点索引不是全部在所述球形区域内,则根据所述切割平面对所述三角面进行切割,得到两个切割点,将位于所述三个顶点索引与所述两个切割点因切割产生以及切割后划分产生的新三角面,划分为所述球形区域内;If the three vertex indexes are not all in the spherical area, the triangular face is cut according to the cutting plane to obtain two cutting points, which will be located between the three vertex indexes and the two cutting points. Points are generated by cutting and new triangles generated by division after cutting are divided into the spherical area;
    根据所述球形区域内的网格顶点和三角面进行提取,得到所述球形区域内的表面网格。Extraction is performed according to the mesh vertices and triangular faces in the spherical area to obtain the surface mesh in the spherical area.
  8. 如权利要求1所述的基于VR的导板3D打印模型建立方法,其特征在于,所述利用矩形板在所述切割位置对所述薄膜的表面进行切割,得到导板卡槽位置以及形成导板表面,包括:The VR-based 3D printing model building method of a guide plate according to claim 1, wherein the rectangular plate is used to cut the surface of the film at the cutting position to obtain the position of the guide plate slot and form the guide plate surface ,include:
    利用所述矩形板坐标构建4个平面,基于所述4个平面分别对所述薄膜的上表面和所述薄膜的下表面进行切割,切割的位置即为所述导板卡槽位置;Use the rectangular plate coordinates to construct 4 planes, and respectively cut the upper surface of the film and the lower surface of the film based on the 4 planes, and the cutting position is the position of the guide plate slot;
    根据所述矩形板的顶点坐标生成导板的网格顶点,并根据所述导板的网格顶点与所述薄膜上的切割点相连构成三角面网格,形成所述导板表面。The grid vertices of the guide plate are generated according to the apex coordinates of the rectangular plate, and the grid vertices of the guide plate are connected with the cutting points on the film to form a triangular mesh to form the surface of the guide plate.
  9. 如权利要求8所述的基于VR的导板3D打印模型建立方法,其特征在于,所述利用所述矩形板坐标构建4个平面包括:The method for establishing a 3D printing model of a guide plate based on VR according to claim 8, wherein said constructing 4 planes by using the coordinates of the rectangular plate comprises:
    利用所述矩形板的左右两面作为切割所述薄膜的下表面两端的平面,得到所述4个平面中的2个平面;Using the left and right sides of the rectangular plate as planes for cutting both ends of the lower surface of the film to obtain 2 planes among the 4 planes;
    将所述矩形板平移所述预设厚度距离后,作为切割所述薄膜的上表面两端的平面,得到所述4个平面中的剩余2个平面。After the rectangular plate is translated by the preset thickness distance, it is used as a plane for cutting both ends of the upper surface of the film to obtain the remaining two planes among the four planes.
  10. 如权利要求8所述的基于VR的导板3D打印模型建立方法,其特征在于,所述根据所述导板的网格顶点与所述薄膜上的切割点相连构成三角面网格,形成所述导板表面,包括:The VR-based 3D printing model building method of a guide plate according to claim 8, wherein the grid vertices of the guide plate are connected with the cutting points on the film to form a triangular mesh to form the guide plate Surface, including:
    根据所述矩形板的上下两个顶点坐标得到切割方向;Obtaining the cutting direction according to the coordinates of the upper and lower vertices of the rectangular plate;
    结合所述切割方向按照所述4个平面对所述薄膜进行4次切割,得到上半圈切割点和下半圈切割点;Cutting the film 4 times according to the 4 planes in combination with the cutting direction to obtain an upper half circle cutting point and a lower half circle cutting point;
    所述导板的网格顶点中的上半部分网格顶点与所述上半圈切割点相连形成三角面网格,得到导板上表面;The upper half of the mesh vertices of the mesh vertices of the guide plate are connected with the cutting points of the upper half circle to form a triangular mesh to obtain the upper surface of the guide plate;
    所述导板的网格顶点中的下半部分网格顶点与所述下半圈切割点相连形成三角面网格,得到导板下表面;The lower half of the grid vertices of the grid vertices of the guide plate are connected with the cutting points of the lower half circle to form a triangular mesh to obtain the lower surface of the guide plate;
    根据所述导板上表面和所述导板下表面形成所述导板表面。The guide plate surface is formed according to the upper surface of the guide plate and the lower surface of the guide plate.
PCT/CN2019/104404 2019-07-12 2019-09-04 Vr-based guide plate 3d printing model construction method WO2021007935A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910630656.4 2019-07-12
CN201910630656.4A CN110341192B (en) 2019-07-12 2019-07-12 Guide plate 3D printing model establishing method based on VR

Publications (1)

Publication Number Publication Date
WO2021007935A1 true WO2021007935A1 (en) 2021-01-21

Family

ID=68175148

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/104404 WO2021007935A1 (en) 2019-07-12 2019-09-04 Vr-based guide plate 3d printing model construction method

Country Status (2)

Country Link
CN (1) CN110341192B (en)
WO (1) WO2021007935A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114722688A (en) * 2022-06-07 2022-07-08 中国城市规划设计研究院(住房和城乡***遥感应用中心) Automatic layering method for three-dimensional building model
WO2024055799A1 (en) * 2022-09-17 2024-03-21 深圳市创必得科技有限公司 Dental implant guide plate orientation method and apparatus, and electronic device and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111376482B (en) * 2020-02-18 2022-11-04 珠海赛纳三维科技有限公司 Operation training model, printing method and printing system thereof
CN111833462B (en) * 2020-07-14 2024-05-17 深圳市瑞立视多媒体科技有限公司 Cutting method, device, equipment and storage medium based on illusion engine
CN112699426A (en) * 2020-12-09 2021-04-23 深圳微步信息股份有限公司 IO baffle plate design method and IO baffle plate
CN112764538A (en) * 2021-01-13 2021-05-07 杭州师范大学 Gesture interaction based space capacity improving method in VR environment
CN113343325B (en) * 2021-05-21 2023-02-28 成都东极六感信息科技有限公司 Mortise and tenon machining simulation system and method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104739513A (en) * 2015-03-12 2015-07-01 徐贵升 Method for producing human tissue simulated operation model and guide plate
CN105105833A (en) * 2015-07-24 2015-12-02 武汉市普仁医院 Device and method for preparing fibula near-end bone tumor focus removing guider
CN105816232A (en) * 2016-05-17 2016-08-03 南方医科大学 Designing and forming method for anatomical bone plate of individuation bone model
CN106388978A (en) * 2016-09-13 2017-02-15 中南大学湘雅医院 Method for preparing acetabulum side model and guide plate based on three-dimensional reconstruction technology
CN107348987A (en) * 2017-05-19 2017-11-17 华南理工大学 A kind of replacement knee in arthroplasty personalized deep guide plate of distal femur and implementation method
WO2018007628A1 (en) * 2016-07-07 2018-01-11 Levels3D Method and system for reconstructing a three-dimensional representation
WO2018093921A1 (en) * 2016-11-16 2018-05-24 Terarecon, Inc. System and method for three-dimensional printing, holographic and virtual reality rendering from medical image processing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108648548A (en) * 2018-04-19 2018-10-12 浙江工业大学 A kind of neuro-surgery virtual operation training system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104739513A (en) * 2015-03-12 2015-07-01 徐贵升 Method for producing human tissue simulated operation model and guide plate
CN105105833A (en) * 2015-07-24 2015-12-02 武汉市普仁医院 Device and method for preparing fibula near-end bone tumor focus removing guider
CN105816232A (en) * 2016-05-17 2016-08-03 南方医科大学 Designing and forming method for anatomical bone plate of individuation bone model
WO2018007628A1 (en) * 2016-07-07 2018-01-11 Levels3D Method and system for reconstructing a three-dimensional representation
CN106388978A (en) * 2016-09-13 2017-02-15 中南大学湘雅医院 Method for preparing acetabulum side model and guide plate based on three-dimensional reconstruction technology
WO2018093921A1 (en) * 2016-11-16 2018-05-24 Terarecon, Inc. System and method for three-dimensional printing, holographic and virtual reality rendering from medical image processing
CN107348987A (en) * 2017-05-19 2017-11-17 华南理工大学 A kind of replacement knee in arthroplasty personalized deep guide plate of distal femur and implementation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114722688A (en) * 2022-06-07 2022-07-08 中国城市规划设计研究院(住房和城乡***遥感应用中心) Automatic layering method for three-dimensional building model
WO2024055799A1 (en) * 2022-09-17 2024-03-21 深圳市创必得科技有限公司 Dental implant guide plate orientation method and apparatus, and electronic device and storage medium

Also Published As

Publication number Publication date
CN110341192A (en) 2019-10-18
CN110341192B (en) 2020-07-17

Similar Documents

Publication Publication Date Title
WO2021007935A1 (en) Vr-based guide plate 3d printing model construction method
JP6883177B2 (en) Computerized visualization of anatomical items
US20210132687A1 (en) Device and system for volume visualization and interaction in a virtual reality or augmented reality environment
US7672822B2 (en) Automated three-dimensional alternative position viewer
US20140324400A1 (en) Gesture-Based Visualization System for Biomedical Imaging and Scientific Datasets
WO2017020580A1 (en) Medical tissue slice image 3d reconstruction method and apparatus
KR20140142470A (en) Method for generating a tree model and a forest model and apparatus for the same
Mirhosseini et al. Benefits of 3D immersion for virtual colonoscopy
US20120223945A1 (en) Calibrated natural size views for visualizations of volumetric data sets
CN105225272B (en) A kind of tri-dimensional entity modelling method based on the reconstruct of more contour line triangulation networks
Zachow et al. Draw and cut: intuitive 3D osteotomy planning on polygonal bone models
TWI241533B (en) Methods and systems for interaction with three-dimensional computer models
Jung et al. Using X3D for medical training simulations
Sørensen et al. A new virtual reality approach for planning of cardiac interventions
US20230054394A1 (en) Device and system for multidimensional data visualization and interaction in an augmented reality virtual reality or mixed reality image guided surgery
Mills et al. IMEX: A tool for image display and contour management in a windowing environment
CN108428230B (en) Method, device, storage medium and equipment for processing curved surface in three-dimensional virtual organ
Krapichler et al. Physicians in virtual environments—multimodal human–computer interaction
Chen et al. Computer-aided liver surgical planning system using CT volumes
CN114267219A (en) Virtual operation simulation device and simulation system
Williams A method for viewing and interacting with medical volumes in virtual reality
JP2018504164A (en) Virtual interactive definition of volume shape
Monclús et al. Data-aware picking for medical models
Reitinger Virtual liver surgery planning: simulation of resections using virtual reality techniques
Li et al. Object-in-hand feature displacement with physically-based deformation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19937376

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19937376

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19937376

Country of ref document: EP

Kind code of ref document: A1