Sectioning method, device and storage medium of three-dimensional model

By generating smooth cutting surfaces to cut 3D models, the problem of difficult operation caused by jagged surface boundaries is solved, achieving more convenient 3D model processing and resource saving.

CN115239911BActive Publication Date: 2026-01-23SHANGHAI LIANYING ZHIYUAN MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210886228.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-27
Publication Date
2026-01-23
Estimated Expiration
2039-12-27

AI Technical Summary

Technical Problem

The jagged curved surface boundaries caused by the cutting operation of the existing 3D model increase the difficulty of subsequent operations and cause a waste of resources.

Method used

By obtaining the target curve of the 3D model, generating the sectioning connection line based on the mapped coordinate points in the target curve, determining the boundary points of the sectioning surface, and generating a smooth target sectioning surface, the 3D model is sectioned to obtain at least two 3D sub-models.

Benefits of technology

It reduces the computational difficulty of subsequent operations on the 3D model, improves the ease of operation, saves system resources, and makes the cutting angles and shapes more diverse.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115239911B_ABST
    Figure CN115239911B_ABST
Patent Text Reader

Abstract

The application relates to a sectioning method, device and storage medium of a three-dimensional model. The method comprises the following steps: obtaining a target curve of the three-dimensional model; the target curve is a curve on the surface of the three-dimensional model and is generated based on a target point; the three-dimensional model comprises a human body torso model; obtaining a sectioning connecting line based on each mapping coordinate point in the target curve, and determining a sectioning surface boundary point according to the intersection of the sectioning connecting line and the three-dimensional model; generating a target sectioning surface according to the sectioning surface boundary point; and sectioning the three-dimensional model by using the target sectioning surface to obtain at least two three-dimensional sub-models and to perform display. By using the method, a jagged sectioning surface can be avoided, the three-dimensional model is sectioned along a smooth sectioning surface, the processing difficulty of the three-dimensional model is reduced, and system resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present application is a divisional application of the invention patent application "Sectional Method, Device and Storage Medium of Three-dimensional Model", the original application date is December 27, 2019, and the application number is 2019113751637. TECHNICAL FIELD

[0002] The present application relates to the field of computer technology, in particular to a sectional method, device and storage medium of three-dimensional model. BACKGROUND

[0003] With the development of computer science, model simulation has gradually developed from single visual simulation to physical simulation. In three-dimensional surface model reconstruction and visualization, in order to obtain the desired model shape, it is often necessary to perform arbitrary curved surface sectioning operation on the three-dimensional model.

[0004] Generally, a mesh model is an important three-dimensional shape representation method, in which triangular mesh is most widely used. The mesh model can represent any complex curved surface and spatial shape with arbitrary precision. For example, in the medical field, such as the design of bone orthosis and brace, the blood flow analysis of coronary model, etc., human organ or bone model needs to be analyzed, so it has great clinical value and practical significance to realize the sectional operation of the mesh model with arbitrary curved surface and obtain the model with the shape required by the clinic.

[0005] The curved surface boundary obtained by the sectional operation of the triangular mesh model currently adopted will produce wavy sawtooth, thus making the subsequent operation of the three-dimensional model difficult and causing resource waste. SUMMARY

[0006] Therefore, it is necessary to provide a sectional method, device and storage medium of three-dimensional model to solve the above problems.

[0007] In a first aspect, the present application provides a sectional method of three-dimensional model, which comprises:

[0008] obtaining a target curve of the three-dimensional model; the target curve is a curve on the surface of the three-dimensional model generated based on a target point, and the three-dimensional model comprises a human torso model;

[0009] obtaining a sectional connection line based on each mapping coordinate point in the target curve, and determining a sectional curved surface boundary point according to the intersection of the sectional connection line and the three-dimensional model;

[0010] generating a target sectional curved surface according to the sectional curved surface boundary point;

[0011] performing sectional operation on the three-dimensional model by using the target sectional curved surface, obtaining at least two three-dimensional sub-models and displaying them.

[0012] In one of the embodiments, the target point comprises an input coordinate point, and the obtaining of the target curve of the three-dimensional model comprises:

[0013] a plurality of input coordinate points are obtained, the input coordinate points being coordinate points input by a user through an external device;

[0014] a spline interpolation calculation is performed on each input coordinate point in a preset smoothing mode to obtain an interpolation coordinate point corresponding to each input coordinate point;

[0015] a target curve of the three-dimensional model is obtained according to a plurality of mapping coordinate points obtained by mapping each interpolation coordinate point.

[0016] The smoothing mode comprises any one of the following:

[0017] a cubic B-spline processing, a Bezier curve processing, or a Catmull-Rom curve processing.

[0018] In one of the embodiments, the obtaining of a section connection line based on each mapping coordinate point in the target curve comprises:

[0019] each mapping coordinate point in the target curve is projected onto a preset direction straight line to obtain a surface center point corresponding to each mapping coordinate point;

[0020] the section connection line is obtained according to each mapping coordinate point and the surface center point corresponding to each mapping coordinate point.

[0021] In one of the embodiments, the section surface boundary point comprises an inside boundary point and an outside boundary point, and the determining of the section surface boundary point according to the intersection point and the three-dimensional model comprises:

[0022] the intersection point is moved by a first preset distance along the section connection line to the inside of the three-dimensional model to obtain the inside boundary point corresponding to each section connection line;

[0023] the intersection point is moved by a second preset distance along the section connection line to the outside of the three-dimensional model to obtain the outside boundary point corresponding to each section connection line;

[0024] The inside boundary point is located on the inside of the surface of the three-dimensional model, and the outside boundary point is located on the outside of the surface of the three-dimensional model.

[0025] In one of the embodiments, the obtaining of the target curve of the three-dimensional model according to a plurality of mapping coordinate points obtained by mapping each interpolation coordinate point comprises:

[0026] mapping each of the interpolation coordinate points to a model surface of the three-dimensional model to obtain a plurality of mapping coordinate points;

[0027] connecting each of the mapping coordinate points to obtain the target curve.

[0028] In one embodiment, the step of mapping each of the interpolation coordinate points to a model surface of the three-dimensional model to obtain a plurality of mapping coordinate points comprises:

[0029] For each interpolation coordinate point, converting the interpolation coordinate point to a view coordinate system to obtain a corresponding view coordinate point of the interpolation coordinate point in the view coordinate system;

[0030] converting the view coordinate point to a camera coordinate system to obtain a camera coordinate point;

[0031] converting the camera coordinate point to a world coordinate system using a view matrix to obtain a world coordinate point;

[0032] converting the world coordinate point to a model coordinate system and performing ray casting to obtain the mapping coordinate point on the three-dimensional model.

[0033] In one embodiment, before the step of obtaining a plurality of input coordinate points, the method further comprises:

[0034] obtaining a model file corresponding to the three-dimensional model;

[0035] constructing an initial conversion matrix from a model coordinate system to a world coordinate system; the initial conversion matrix is used to perform a front view of the three-dimensional model in the world coordinate system;

[0036] loading the model file according to the initial conversion matrix to obtain a plurality of input coordinate points.

[0037] In one embodiment, the step of cutting the three-dimensional model using the target cutting surface to obtain at least two three-dimensional sub-models and performing display comprises:

[0038] cutting the three-dimensional model using the target cutting surface to obtain at least two three-dimensional sub-models;

[0039] generating model display information corresponding to the at least two three-dimensional sub-models; the model display information is obtained based on the at least two three-dimensional sub-models;

[0040] sending the model display information to a user terminal for display.

[0041] In a second aspect, the present application further provides a three-dimensional model cutting device, the device comprising:

[0042] an object curve obtaining module, configured to obtain an object curve of the three-dimensional model; the object curve is a curve on a surface of the three-dimensional model generated based on an object point; the three-dimensional model comprises a human torso model;

[0043] a sectioned surface boundary point determining module, configured to obtain a sectioned connecting line based on each mapping coordinate point in the object curve, and determine a sectioned surface boundary point according to an intersection of the sectioned connecting line and the three-dimensional model;

[0044] an object sectioned surface generating module, configured to generate an object sectioned surface according to the sectioned surface boundary point;

[0045] a sectioned display module, configured to section the three-dimensional model by using the object sectioned surface, obtain at least two three-dimensional sub-models, and display the at least two three-dimensional sub-models.

[0046] In a third aspect, the present application further provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the three-dimensional model sectioning method.

[0047] The three-dimensional model sectioning method, device and storage medium described above, by obtaining an object curve of the three-dimensional model, the object curve being a curve on a surface of the three-dimensional model generated based on an object point, the three-dimensional model comprising a human torso model, then obtaining a sectioned connecting line based on each mapping coordinate point in the object curve, and determining a sectioned surface boundary point according to an intersection of the sectioned connecting line and the three-dimensional model, further generating an object sectioned surface according to the sectioned surface boundary point, sectioning the three-dimensional model by using the object sectioned surface, obtaining at least two three-dimensional sub-models, and displaying the at least two three-dimensional sub-models. In this way, the problem of high difficulty in subsequent operation of the three-dimensional model caused by a jagged sectioned surface is solved, and by sectioning the three-dimensional model along a smooth sectioned surface, the subsequent calculation difficulty is reduced, the operation and processing of the three-dimensional model are more convenient, and the resources of the system are saved. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 a flowchart of a three-dimensional model sectioning method in an embodiment;

[0049] Figure 2a a schematic diagram of a coordinate mapping point and a surface center point in a three-dimensional model in an embodiment;

[0050] Figure 2b a schematic diagram of a sectioned surface in an embodiment;

[0051] Figure 3a a schematic diagram of a coordinate conversion flow in an embodiment;

[0052] Figure 3b This is a schematic diagram of a three-dimensional model sectioning system in one embodiment;

[0053] Figure 4 This is a flowchart illustrating another method for sectioning a three-dimensional model in one embodiment;

[0054] Figure 5 This is a structural block diagram of a sectioning device for a three-dimensional model in one embodiment;

[0055] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0057] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties; correspondingly, this application also provides a corresponding user authorization entry point for users to choose to authorize or refuse.

[0058] In one embodiment, such as Figure 1 As shown, a method for sectioning a 3D model is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0059] Step 101: Obtain the target curve of the three-dimensional model; the target curve is a curve generated based on the target point and located on the surface of the three-dimensional model, the three-dimensional model including a human torso model;

[0060] As an example, the target point can be a coordinate point based on user input or a feature point obtained by a preset algorithm.

[0061] The target curve can be a spline curve of a 3D model, which can be generated based on the coordinate points input by the user or the feature points obtained by a preset algorithm. The spline curve can be a closed curve located on the surface of the 3D model.

[0062] In actual application, the terminal can take the received user input coordinate points or feature points obtained based on a preset algorithm as target points, and then can perform calculation according to the target points to automatically generate a continuous spline curve on the surface of the three-dimensional model as a target curve.

[0063] Specifically, the user can input coordinate points by observing the three-dimensional model displayed on the screen and operating the terminal, for example, can use a mouse to point to the three-dimensional model to input multiple coordinate points, or can analyze the three-dimensional model based on a preset algorithm to obtain feature points satisfying certain conditions, for example, segmentation points obtained by using a segmentation algorithm.

[0064] In an example, the user input coordinate points can be projected to the surface of the three-dimensional model, and if the user input coordinate points are located on the surface of the three-dimensional model, the coordinate points and the projected points can be the same point, and then each projected point can be connected to form a smooth curve as a spline curve (i.e. a target curve).

[0065] In step 102, a section connection line is obtained based on each mapping coordinate point in the target curve, and a section surface boundary point is determined according to the intersection of the section connection line and the three-dimensional model;

[0066] After obtaining the target curve, each mapping coordinate point on the target curve can be projected to a preset direction straight line, such as a Z-axis direction straight line, to obtain a surface center point corresponding to each mapping coordinate point, and then a section connection line can be obtained according to each mapping coordinate point and the surface center point corresponding to each mapping coordinate point, and a section surface boundary point can be determined according to the intersection of the section connection line and the three-dimensional model.

[0067] Specifically, after obtaining the section connection line based on each mapping coordinate point in the target curve, the section surface boundary point can be generated according to the intersection of the section connection line and the three-dimensional model, for example, the multiple intersection points of the section connection line and the three-dimensional model can be calculated by interpolation to obtain multiple section surface boundary points, and optionally, the size of the granularity for interpolation calculation can be set as needed, which is not specifically limited in this embodiment.

[0068] In step 103, a target section surface is generated according to the section surface boundary point;

[0069] In a specific implementation, the section surface boundary point can be multiple, and a section surface can be generated as a target section surface according to the multiple section surface boundary points, for example, the multiple section surface boundary points can be smoothly connected to obtain a section surface,

[0070] In an optional embodiment, the target section surface can be a closed surface, and the section surface boundary point can be located on the boundary of the surface.

[0071] Step 104: Use the target cutting surface to cut the three-dimensional model to obtain at least two three-dimensional sub-models and display them.

[0072] After obtaining the target cutting surface, the target cutting surface can be used to cut the three-dimensional model to obtain at least two three-dimensional sub-models and display them. For example, by cutting the human torso model along the target cutting surface and displaying the cut three-dimensional sub-models, it is convenient to further process the corresponding images of the cut three-dimensional models and also to make it convenient for users to intuitively view the cut three-dimensional sub-models.

[0073] In one example, taking orthopedic device design as an example, since the design task is large, it is necessary to distribute the model to multiple people to carry out the design task at the same time. This method can be applied to divide the three-dimensional model, that is, to cut the three-dimensional model to obtain at least two three-dimensional sub-models, and then the three-dimensional model can be divided into multiple sub-models for multiple people to design at the same time.

[0074] Specifically, the 3D model can be sectioned along the target sectioning surface. By smoothly dividing the 3D model, a sectioned 3D model with a smooth sectioning surface can be obtained. For example, the clip interface in the Computational Geometry Algorithms Library (CGAL library) can be called to perform clipping on the 3D model according to the target sectioning surface. Then, the point and face information in the clipped Surface Mesh can be extracted, PolyData can be constructed, and rendering can be performed to obtain the sectioned sub-model (i.e., at least two 3D sub-models).

[0075] Compared to traditional methods, the technical solution in this embodiment avoids the problem of difficult subsequent operations on the 3D model caused by the jagged cutting surface obtained by traditional cutting methods. By cutting the 3D model along a smooth cutting surface, the subsequent calculation difficulty is greatly reduced, making the operation and subsequent processing of the 3D model more convenient and greatly saving system resources. At the same time, since the cutting can be based on the coordinate points input by the user, the cutting of the model can be carried out according to the angle and shape desired by the user, resulting in a richer variety of cutting angles and shapes, providing users with a wider range of viewing angles, and making the generated image more angular.

[0076] In the above-described 3D model sectioning method, a target curve of the 3D model is obtained. This target curve is a curve generated based on target points and located on the surface of the 3D model, which includes a human torso model. Then, sectioning lines are obtained based on the mapped coordinate points in the target curve. The boundary points of the sectioning surface are determined according to the intersection of the sectioning lines and the 3D model. Subsequently, a target sectioning surface is generated based on the boundary points of the sectioning surface. The 3D model is sectioned using the target sectioning surface to obtain at least two 3D sub-models, which are then displayed. This solves the problem of the high difficulty of subsequent 3D model operations caused by obtaining a jagged sectioning surface. By sectioning the 3D model along a smooth sectioning surface, the subsequent calculation difficulty can be reduced, making the operation and processing of the 3D model more convenient and saving system resources.

[0077] In one embodiment, the target point may include input coordinate points, and may include the following steps:

[0078] Multiple input coordinate points are obtained; the input coordinate points are coordinate points input by the user through an external device; spline interpolation calculation is performed on each input coordinate point using a preset smoothing method to obtain the interpolated coordinate points corresponding to each input coordinate point; the target curve of the three-dimensional model is obtained based on multiple mapped coordinate points obtained by mapping each interpolated coordinate point.

[0079] The smoothing method can include any of the following:

[0080] Cubic B-spline processing, Bethesda curve processing, and Catmull Rom curve processing.

[0081] In practical applications, multiple input coordinate points can be obtained from external devices, such as the coordinate points clicked by the mouse or entered by the keyboard. Then, spline interpolation calculations can be performed on these multiple input coordinate points using a preset smoothing method to obtain the interpolated coordinate points corresponding to each input coordinate point. These interpolated coordinate points can be interspersed among the input coordinate points.

[0082] For example, any smoothing method among cubic B-spline processing, Bethesda curve processing, and CatmullRom curve processing can be used to perform spline interpolation calculations on multiple input coordinate points, thereby obtaining more smoothly and reasonably arranged interpolated coordinate points, making the resulting section surface smoother and the calculation of the 3D model simpler.

[0083] In one example, each interpolated coordinate point can be mapped to the surface of the 3D model. For example, each interpolated coordinate point can be projected onto the surface of the 3D model to obtain multiple mapped coordinate points. Then, the mapped coordinate points can be closed and connected to form a spline curve, which is the target curve of the 3D model.

[0084] In this embodiment, multiple input coordinate points are acquired, and then spline interpolation calculations are performed on each input coordinate point using a preset smoothing method to obtain the interpolated coordinate points corresponding to each input coordinate point. Then, based on the multiple mapped coordinate points obtained from each interpolated coordinate point, the target curve of the 3D model is obtained. A smooth and reasonable spline curve can be formed based on multiple input coordinate points, providing a data foundation for the subsequent smooth cutting of the 3D model, improving the accuracy and rationality of the 3D model cutting, and making the cut 3D model more convenient to use in subsequent calculations.

[0085] In one embodiment, obtaining the section connection line based on each mapped coordinate point in the target curve may include the following steps:

[0086] Project each mapped coordinate point in the target curve onto a preset direction straight line to obtain the surface center point corresponding to each mapped coordinate point; obtain the section connecting line based on each mapped coordinate point and the surface center point corresponding to each mapped coordinate point.

[0087] As an example, the preset direction line can be a Z-axis direction line, which can be the central axis of the 3D model.

[0088] In practical applications, each mapped coordinate point can be projected onto the Z-axis. For example, by keeping the coordinate values ​​in the Z-axis direction unchanged and changing the coordinate values ​​in the X and Y-axis directions to 0, the center point of the surface corresponding to each mapped coordinate point can be obtained, and the center point of the surface corresponds one-to-one with the mapped coordinate point. Alternatively, the coordinate values ​​in the X and Y-axis directions can be changed to other preset fixed values, such as the line X = a, Y = b.

[0089] In an alternative embodiment, the original coordinate system can be transformed to change the central axis of the 3D model to a new Z-axis. Then, the coordinate points on the spline curve (i.e., the mapped coordinate points in the target curve) can be projected onto the new Z-axis to obtain the center point of the surface. For example, if the original coordinate system is X'Y'Z', the transformed coordinate system XYZ can be obtained through transformation, and then the central axis of the 3D model can be set as the Z-axis.

[0090] In one example, the line connecting each mapped coordinate point and the corresponding surface center point can be used as a sectioning line, thus obtaining multiple sectioning lines that intersect with the 3D model and can have multiple intersection points.

[0091] For example, such as Figure 2a As shown, in Figure 2aIn the diagram, the dotted line at the center represents the Z-axis. Point1, Point2, and Point3 are the mapped coordinate points on the model surface, and Center1, Center2, and Center3 are the surface center points corresponding to Point1, Point2, and Point3. The curves containing Point1, Point2, and Point3 are spline curves (i.e., target curves).

[0092] In this embodiment, by projecting each mapped coordinate point in the target curve onto a preset direction straight line, the surface center point corresponding to each mapped coordinate point is obtained. Then, based on each mapped coordinate point and the surface center point corresponding to each mapped coordinate point, the section connection line is obtained, providing data support for subsequent processing.

[0093] In one embodiment, the boundary points of the section surface may include inner boundary points and outer boundary points. Determining the boundary points of the section surface based on the intersection of the section connection line and the three-dimensional model may include the following steps:

[0094] Move the intersection point along the cutting connection line to the inside of the three-dimensional model by a first preset distance to obtain the inner boundary point corresponding to each cutting connection line; move the intersection point along the cutting connection line to the outside of the three-dimensional model by a second preset distance to obtain the outer boundary point corresponding to each cutting connection line.

[0095] The inner boundary point can be located inside the surface of the 3D model, and the outer boundary point can be located outside the surface of the 3D model. For example, the inner boundary point is located on one side of the inner surface of the 3D model, and the outer boundary point is located on one side of the outer surface of the 3D model.

[0096] As an example, the distance between the first preset distance and the second preset distance can vary depending on the direction of the cutting connection line or the thickness of the inner and outer surfaces of the three-dimensional model. The first preset distance and the second preset distance can be the same or different.

[0097] In one example, the intersection point can be moved a first preset distance along the section connection line towards the inside of the 3D model to obtain the inner boundary point of each section connection line located inside the surface of the 3D model. The intersection point can also be moved a second preset distance along the section connection line towards the outside of the 3D model to obtain the outer boundary point of each section connection line located inside the surface of the 3D model. Thus, based on the intersection point of the section connection line and the 3D model, the inner and outer boundary points located on the inner and outer surfaces of the 3D model can be obtained.

[0098] In this embodiment, by moving the intersection point along the cutting connection line to the inside of the three-dimensional model by a first preset distance, the inner boundary point corresponding to each cutting connection line is obtained. Then, by moving the intersection point along the cutting connection line to the outside of the three-dimensional model by a second preset distance, the outer boundary point corresponding to each cutting connection line is obtained. This allows for the accurate and reasonable generation of the cutting surface boundary points on the three-dimensional model based on the intersection point of the cutting connection line and the three-dimensional model. This facilitates the generation of accurate and reasonable cutting surfaces, making the processing of the cut three-dimensional model more convenient in subsequent calculations.

[0099] In one embodiment, generating the target section surface based on the section surface boundary points may include the following steps:

[0100] The inner boundary points and the outer boundary points are connected alternately to obtain multiple triangular faces; the multiple triangular faces are spliced ​​together to generate the target section surface.

[0101] In practical applications, multiple triangular faces can be obtained by alternating the inner and outer boundary points. For example, connecting the inner and outer boundary points alternately will form a triangular face between every two adjacent inner and outer boundary points, and vice versa. Furthermore, multiple triangular faces can be pieced together to form a ring-shaped cutting surface, which serves as the target cutting surface. For instance, a ring-shaped cutting surface composed of triangular faces can be... Figure 2b As shown.

[0102] In this embodiment, multiple triangular faces are obtained by connecting the inner boundary points and the outer boundary points alternately. These multiple triangular faces are then spliced ​​together to generate the target sectioning surface, which enables the process of generating a surface from a point, so as to facilitate the subsequent sectioning of the three-dimensional model.

[0103] In one embodiment, obtaining the target curve of the 3D model from multiple mapped coordinate points obtained by mapping each of the interpolated coordinate points may include the following steps:

[0104] Each interpolated coordinate point is mapped onto the surface of the 3D model to obtain multiple mapped coordinate points; the mapped coordinate points are then closed and connected to obtain the target curve.

[0105] In practical applications, each interpolated coordinate point can be mapped onto the surface of the 3D model. For example, each interpolated coordinate point can be projected onto the surface of the 3D model to obtain multiple mapped coordinate points. Then, the mapped coordinate points can be closed and connected to form a spline curve, which is the target curve of the 3D model.

[0106] In this embodiment, multiple mapped coordinate points are obtained by mapping each interpolation coordinate point to the surface of the 3D model; the mapped coordinate points are then closed and connected to obtain the target curve, which provides a data basis for the subsequent smooth cutting of the 3D model.

[0107] In one embodiment, mapping each of the interpolated coordinate points to the surface of the 3D model to obtain multiple mapped coordinate points may include the following steps:

[0108] For each interpolated coordinate point, the interpolated coordinate point is transformed to the view coordinate system to obtain the view coordinate point corresponding to the interpolated coordinate point in the view coordinate system; the view coordinate point is transformed to the camera coordinate system to obtain the camera coordinate point; the camera coordinate point is transformed to the world coordinate system using the view matrix to obtain the world coordinate point; the world coordinate point is transformed to the model coordinate system and ray projection is performed to obtain the mapped coordinate point located on the three-dimensional model.

[0109] The interpolated coordinate points can be obtained by interpolation calculation based on the screen coordinate points input by the user. The specific process of coordinate transformation can be described as follows: Figure 3a As shown, through this coordinate transformation process, the interpolated coordinate points representing the trajectory of the user-input coordinate points can be converted into mapped coordinate points on the 3D model, which helps to process accurately and improves the accuracy of model sectioning.

[0110] In this embodiment, for each interpolation coordinate point, the interpolation coordinate point is transformed to the view coordinate system to obtain the view coordinate point corresponding to the interpolation coordinate point in the view coordinate system. Then, the view coordinate point is transformed to the camera coordinate system to obtain the camera coordinate point. The camera coordinate point is then transformed to the world coordinate system using the view matrix to obtain the world coordinate point. Finally, the world coordinate point is transformed to the model coordinate system and ray projection is performed to obtain the mapped coordinate point on the 3D model. This helps to process accurately and improves the accuracy of model cutting.

[0111] In one embodiment, prior to the step of obtaining the plurality of input coordinate points, the following steps may be included:

[0112] Obtain the model file corresponding to the 3D model; construct an initial transformation matrix from the model coordinate system to the world coordinate system; the initial transformation matrix is ​​used to display the 3D model in the world coordinate system; load the model file according to the initial transformation matrix to obtain multiple input coordinate points.

[0113] In practical applications, the model file of the 3D model can be read and the camera parameters can be initialized. Then, an initial transformation matrix from the model coordinate system to the world coordinate system can be constructed so that the 3D model can be displayed in the world coordinate system in a frontal view based on the initial transformation matrix, which helps users to observe. Furthermore, the model file can be loaded based on the entire initial transformation matrix, which makes it easy for users to input multiple input coordinate points for the 3D model to achieve accurate sectioning of the 3D model.

[0114] In this embodiment, by obtaining the model file corresponding to the 3D model, constructing an initial transformation matrix from the model coordinate system to the world coordinate system, and then loading the model file according to the initial transformation matrix to obtain multiple input coordinate points, the accurate sectioning of the 3D model can be achieved.

[0115] In one embodiment, the step of cutting the three-dimensional model using the target cutting surface to obtain at least two three-dimensional sub-models and displaying them may include the following steps:

[0116] The target sectioning surface is used to section the three-dimensional model to obtain at least two three-dimensional sub-models; model display information corresponding to the at least two three-dimensional sub-models is generated; and the model display information is sent to the user terminal for display.

[0117] The model display information can be obtained by encapsulating at least two 3D sub-models, such as encapsulating the 3D sub-models into a Hypertext Markup Language (HTML) file.

[0118] In one example, a target sectioning surface can be used to section the 3D model to obtain at least two 3D sub-models. The 3D sub-models can then be pushed to the service front-end, so that the service front-end can encapsulate the 3D sub-models into Hypertext Markup Language (HTML) files (i.e. model display information) and return them to the user terminal for display, thereby making it convenient for users on the service front-end to intuitively view the sectioned 3D sub-models.

[0119] In yet another example, the sectioning method for the three-dimensional model provided in this embodiment can be used as follows: Figure 3bThe system shown can include a user terminal, a service front-end, and a service back-end. The user terminal can include a mobile phone, tablet, or PC, and can be used to send requests to the service front-end. The service front-end can be a PC, a server, etc. The service front-end and the user terminal can communicate according to a communication protocol, and initiate an initialization request to the service back-end to obtain the model file of the 3D model, including reading the STL file. Through model positioning and rendering, the 3D model can be displayed on the screen. The service back-end can be a PC or a server, etc. The service back-end can use the method described in the above embodiment to section the 3D model, render the sectioned 3D sub-models, and return them to the service front-end. Then, the service front-end can return the sectioning results to the user terminal in the form of an HTML file to complete the display of the sectioning results.

[0120] In this embodiment, at least two three-dimensional sub-models are obtained by using a target sectioning surface to section the three-dimensional model. Then, model display information corresponding to the at least two three-dimensional sub-models is generated, and the model display information is sent to the user terminal for display, which makes it convenient for users to intuitively view the sectioned three-dimensional sub-models.

[0121] In one embodiment, such as Figure 4 The diagram illustrates another method for sectioning a 3D model. In this embodiment, the method includes the following steps:

[0122] In step 401, multiple input coordinate points are acquired; these are coordinate points input by the user through an external device. In step 402, spline interpolation is performed on each input coordinate point using a preset smoothing method to obtain the interpolated coordinate points corresponding to each input coordinate point. In step 403, the target curve of the 3D model is obtained based on the multiple mapped coordinate points obtained from the interpolated coordinate points. In step 404, each mapped coordinate point in the target curve is projected onto a preset direction straight line to obtain the surface center point corresponding to each mapped coordinate point. In step 405, the sectioning connection line is obtained based on each mapped coordinate point and the corresponding surface center point. In step 406, the boundary points of the sectioning surface are determined based on the intersection of the sectioning connection line and the 3D model; these boundary points include inner and outer boundary points. In step 407, the target sectioning surface is generated based on the sectioning surface boundary points. In step 408, the 3D model is sectioned using the target sectioning surface to obtain at least two 3D sub-models, which are then displayed. It should be noted that the specific limitations of the above steps can be found in the specific limitations of a sectioning method for a three-dimensional model mentioned above, and will not be repeated here.

[0123] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0124] Based on the same inventive concept, this application also provides a 3D model slicing apparatus for implementing the 3D model slicing method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations of one or more 3D model slicing apparatus embodiments provided below can be found in the limitations of the 3D model slicing method described above, and will not be repeated here.

[0125] In one embodiment, such as Figure 5 As shown, a sectionalizing device for a three-dimensional model is provided, comprising:

[0126] The target curve acquisition module 501 is used to acquire the target curve of the three-dimensional model; the target curve is a curve located on the surface of the three-dimensional model generated based on the target point, and the three-dimensional model includes a human torso model;

[0127] The section surface boundary point determination module 502 is used to obtain the section connection line based on each mapped coordinate point in the target curve, and determine the section surface boundary point according to the intersection of the section connection line and the three-dimensional model.

[0128] The target section surface generation module 503 is used to generate a target section surface based on the boundary points of the section surface;

[0129] The sectioning display module 504 is used to section the three-dimensional model using the target sectioning surface to obtain at least two three-dimensional sub-models and display them.

[0130] In one embodiment, the target point includes an input coordinate point, and the target curve acquisition module 501 includes:

[0131] The input coordinate point acquisition submodule is used to acquire multiple input coordinate points; the input coordinate points are coordinate points input by the user through an external device.

[0132] The interpolation coordinate point acquisition submodule is used to perform spline interpolation calculations on each of the input coordinate points using a preset smoothing method to obtain the interpolation coordinate points corresponding to each of the input coordinate points;

[0133] The target curve acquisition submodule is used to obtain the target curve of the three-dimensional model based on multiple mapped coordinate points obtained by mapping each interpolation coordinate point;

[0134] The smoothing method includes any one of the following:

[0135] Cubic B-spline processing, Bethesda curve processing, and Catmull Rom curve processing.

[0136] In one embodiment, the section surface boundary point determination module 502 includes:

[0137] The surface center point acquisition sub-module is used to project each mapped coordinate point in the target curve onto a preset direction straight line to obtain the surface center point corresponding to each mapped coordinate point;

[0138] The section connecting line is used to obtain the section connecting line based on each of the mapped coordinate points and the surface center point corresponding to each of the mapped coordinate points.

[0139] In one embodiment, the boundary points of the sectioning surface may include inner boundary points and outer boundary points, and the sectioning surface boundary point determination module 502 includes:

[0140] The inner boundary point acquisition sub-module is used to move the intersection point along the cutting connection line to the inside of the three-dimensional model by a first preset distance to obtain the inner boundary point corresponding to each cutting connection line;

[0141] The outer boundary point sub-module is used to move the intersection point along the cutting connection line to the outside of the three-dimensional model by a second preset distance to obtain the outer boundary point corresponding to each cutting connection line;

[0142] The inner boundary point is located inside the surface of the three-dimensional model, and the outer boundary point is located outside the surface of the three-dimensional model.

[0143] In one embodiment, the target curve obtaining submodule includes:

[0144] A mapping coordinate point obtaining unit is used to map each of the interpolated coordinate points to the model surface of the three-dimensional model to obtain multiple mapping coordinate points;

[0145] The mapping coordinate point connection unit is used to close and connect the mapping coordinate points to obtain the target curve.

[0146] In one embodiment, the unit for obtaining the mapped coordinate points includes:

[0147] The view coordinate point is obtained as a sub-unit, which is used to transform the interpolation coordinate point to the view coordinate system for each interpolation coordinate point, so as to obtain the view coordinate point corresponding to the interpolation coordinate point in the view coordinate system;

[0148] A sub-unit for obtaining camera coordinate points is used to transform the view coordinate points to the camera coordinate system to obtain camera coordinate points;

[0149] The world coordinate point is obtained as a sub-unit, which is used to transform the camera coordinate point to the world coordinate system using a view matrix to obtain the world coordinate point;

[0150] The ray projection subunit is used to transform the world coordinate point to the model coordinate system and perform ray projection to obtain the mapped coordinate point located on the three-dimensional model.

[0151] In one embodiment, the apparatus further includes:

[0152] The model file acquisition module is used to acquire the model file corresponding to the 3D model.

[0153] An initial transformation matrix construction module is used to construct an initial transformation matrix from the model coordinate system to the world coordinate system; the initial transformation matrix is ​​used to display the 3D model in the world coordinate system.

[0154] The input coordinate point acquisition module is used to load the model file according to the initial transformation matrix to obtain multiple input coordinate points.

[0155] In one embodiment, the cross-sectional display module 504 includes:

[0156] The three-dimensional sub-model is used to cut the three-dimensional model using the target cutting surface to obtain at least two three-dimensional sub-models.

[0157] An encapsulation submodule is used to generate model display information corresponding to the at least two 3D sub-models; the model display information is obtained based on the encapsulation of the at least two 3D sub-models.

[0158] The display submodule is used to send the model display information to the user terminal for display.

[0159] Each module in the above-mentioned 3D model sectioning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0160] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for sectioning a three-dimensional model. The display screen can be an LCD screen or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0161] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0162] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0163] Obtain the target curve of the three-dimensional model; the target curve is a curve located on the surface of the three-dimensional model generated based on the target point, and the three-dimensional model includes a human torso model;

[0164] Based on the mapped coordinate points in the target curve, the sectioning connection line is obtained, and the boundary points of the sectioning surface are determined according to the intersection of the sectioning connection line and the three-dimensional model.

[0165] Generate the target cutting surface based on the boundary points of the cutting surface;

[0166] The target sectioning surface is used to section the three-dimensional model to obtain at least two three-dimensional sub-models, which are then displayed.

[0167] In one embodiment, the processor, when executing the computer program, also implements the steps of the sectioning method for the three-dimensional model in the other embodiments described above.

[0168] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0169] Obtain the target curve of the three-dimensional model; the target curve is a curve located on the surface of the three-dimensional model generated based on the target point, and the three-dimensional model includes a human torso model;

[0170] Based on the mapped coordinate points in the target curve, the sectioning connection line is obtained, and the boundary points of the sectioning surface are determined according to the intersection of the sectioning connection line and the three-dimensional model.

[0171] Generate the target cutting surface based on the boundary points of the cutting surface;

[0172] The target sectioning surface is used to section the three-dimensional model to obtain at least two three-dimensional sub-models, which are then displayed.

[0173] In one embodiment, when the computer program is executed by a processor, it also implements the steps of the sectioning method for the three-dimensional model in the other embodiments described above.

[0174] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0175] Obtain the target curve of the three-dimensional model; the target curve is a curve located on the surface of the three-dimensional model generated based on the target point, and the three-dimensional model includes a human torso model;

[0176] Based on the mapped coordinate points in the target curve, the sectioning connection line is obtained, and the boundary points of the sectioning surface are determined according to the intersection of the sectioning connection line and the three-dimensional model.

[0177] Generate the target cutting surface based on the boundary points of the cutting surface;

[0178] The target sectioning surface is used to section the three-dimensional model to obtain at least two three-dimensional sub-models, which are then displayed.

[0179] In one embodiment, when the computer program is executed by a processor, it also implements the steps of the sectioning method for the three-dimensional model in the other embodiments described above.

[0180] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0181] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0182] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for sectioning a three-dimensional model, characterized in that, The method includes: Obtain the target curve of the three-dimensional model; the target curve is a curve located on the surface of the three-dimensional model generated based on the target point, and the three-dimensional model includes a human torso model; Based on the mapped coordinate points in the target curve, the sectioning connection line is obtained, and the boundary points of the sectioning surface are determined according to the intersection of the sectioning connection line and the three-dimensional model. Generate the target cutting surface based on the boundary points of the cutting surface; The target cutting surface is used to cut the three-dimensional model to obtain at least two three-dimensional sub-models, which are then displayed. The sectioning surface boundary points include inner boundary points and outer boundary points. Generating the target sectioning surface based on the sectioning surface boundary points includes: By connecting the inner boundary points and the outer boundary points alternately, multiple triangular faces are obtained. These multiple triangular faces are then spliced ​​together to generate the target section surface.

2. The method according to claim 1, characterized in that, The target point includes the input coordinate point, and obtaining the target curve of the 3D model includes: Acquire multiple input coordinate points; the input coordinate points are coordinate points input by the user through an external device; A preset smoothing method is used to perform spline interpolation calculations on each of the input coordinate points to obtain the interpolated coordinate points corresponding to each of the input coordinate points; The target curve of the three-dimensional model is obtained by mapping multiple mapped coordinate points based on the interpolated coordinate points; The smoothing method includes any one of the following: Cubic B-spline processing, Bethesda curve processing, and Catmull Rom curve processing.

3. The method according to claim 1, characterized in that, The step of obtaining the section connection line based on each mapped coordinate point in the target curve includes: Project each mapped coordinate point in the target curve onto a preset direction straight line to obtain the surface center point corresponding to each mapped coordinate point; The section connection line is obtained based on each of the mapped coordinate points and the corresponding surface center point.

4. The method according to claim 1, characterized in that, Determining the boundary points of the section surface based on the intersection of the section connection line and the three-dimensional model includes: Move the intersection point along the cutting connection line to the inside of the three-dimensional model by a first preset distance to obtain the inner boundary point corresponding to each cutting connection line; The intersection point is moved a second preset distance outward along the cutting connection line to obtain the outer boundary point corresponding to each cutting connection line; The inner boundary point is located inside the surface of the three-dimensional model, and the outer boundary point is located outside the surface of the three-dimensional model.

5. The method according to claim 2, characterized in that, The process of obtaining the target curve of the 3D model from multiple mapped coordinate points obtained by mapping each of the interpolated coordinate points includes: Each of the interpolated coordinate points is mapped to the surface of the 3D model to obtain multiple mapped coordinate points; By connecting the mapped coordinate points in a closed loop, the target curve is obtained.

6. The method according to claim 5, characterized in that, The process of mapping each interpolated coordinate point to the surface of the 3D model to obtain multiple mapped coordinate points includes: For each interpolated coordinate point, the interpolated coordinate point is transformed to the view coordinate system to obtain the view coordinate point corresponding to the interpolated coordinate point in the view coordinate system; Transform the view coordinate points to the camera coordinate system to obtain the camera coordinate points; The camera coordinate points are transformed to the world coordinate system using a view matrix to obtain the world coordinate points; The world coordinate points are transformed to the model coordinate system and ray projection is performed to obtain the mapped coordinate points located on the three-dimensional model.

7. The method according to claim 2, characterized in that, Prior to the step of acquiring multiple input coordinate points, the method further includes: Obtain the model file corresponding to the 3D model; Construct an initial transformation matrix from the model coordinate system to the world coordinate system; the initial transformation matrix is ​​used to display the 3D model in the world coordinate system. The model file is loaded based on the initial transformation matrix to obtain multiple input coordinate points.

8. The method according to any one of claims 1 to 7, characterized in that, The step of cutting the three-dimensional model using the target cutting surface to obtain at least two three-dimensional sub-models and displaying them includes: The target cutting surface is used to cut the three-dimensional model to obtain at least two three-dimensional sub-models; Generate model display information corresponding to the at least two 3D sub-models; the model display information is obtained by encapsulating the at least two 3D sub-models. The model display information is sent to the user terminal for display.

9. A cutting device for a three-dimensional model, characterized in that, The device includes: The target curve acquisition module is used to acquire the target curve of the three-dimensional model; the target curve is a curve located on the surface of the three-dimensional model generated based on the target point, and the three-dimensional model includes a human torso model; The section surface boundary point determination module is used to obtain the section connection line based on each mapped coordinate point in the target curve, and determine the section surface boundary points according to the intersection of the section connection line and the three-dimensional model; the section surface boundary points include inner boundary points and outer boundary points; The target section surface generation module is used to connect the inner boundary points and the outer boundary points alternately to obtain multiple triangular faces, and to splice the multiple triangular faces to generate the target section surface; The sectioning display module is used to section the three-dimensional model using the target sectioning surface to obtain at least two three-dimensional sub-models and display them.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Determination method and device of sectioning plane of three-dimensional model

    CN108171804A

  • System and method for separating three-dimensional models

    US20020055081A1