Suture simulation method, operation simulator and medium

By obtaining the suture model and calculating the motion parameters using position dynamics, the problem of instability in suture simulation in the prior art is solved, and a more accurate and stable suture simulation effect is achieved.

CN119691958APending Publication Date: 2025-03-25SHENZHEN JINGFENG MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311238975.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-23
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing suture simulation suture solution has the problem of insufficient stability when displaying the suture effect, which leads to the suture being prone to mold penetration and the kinematic solution is not accurate enough.

Method used

By obtaining the suture model, distinguishing the combined morphology between the components, and selecting the corresponding preset iteration method, using position dynamics to calculate the motion parameters of particle points, and displaying the motion process of the suture.

Benefits of technology

The parameter calculation accuracy and stability of the display effect of suture simulated suture are improved, and the instability of suture thread through mold and shedding are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691958A_ABST
    Figure CN119691958A_ABST
Patent Text Reader

Abstract

The invention discloses a suture simulation method, an operation simulator and a medium, the suture simulation method comprises the following steps: obtaining a model of a suture line, the model comprising a plurality of composition units in chain connection, and each composition unit at least comprising a particle point; judging a combination form among the composition units, and selecting a preset iteration mode corresponding to the combination form; based on a selected preset iteration mode, using position dynamics to calculate motion parameters corresponding to at least part of particle points in the model; and displaying the suture line based on the motion parameters. The parameter calculation accuracy of suture line simulation suture and the stability of the follow-up display effect are improved, and the suture line cannot rotate abnormally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of medical devices, and in particular relates to a suturing simulation method, a surgical simulator and a medium. Background Art

[0002] Knotting is an essential part in surgical simulation. The knotting process mainly involves surgical instrument simulation, suture simulation, collision between surgical instruments and sutures, self-collision between sutures and other processes. At present, the method for suture self-collision detection mostly adopts the method of bounding sphere, and each elastic rod unit of the suture corresponds to a spherical bounding box. When the suture is stretched, the directed distance between the two suture elastic rod units will be greater than the detection radius, and the mold penetration phenomenon is prone to occur. At the same time, in order to improve the kinematic solution of the model, iterative calculations based on the calculation results between constraints, such as Gauss-Seidel, are usually used. When there are conflicts among multiple types of motion constraints, the superposition effect of the solutions between the constraints will make the solution results inaccurate, resulting in model rotation and other situations. In short, the existing suture simulation suture solution is not stable enough when displaying the suture effect. Summary of the invention

[0003] In order to solve the problem that the existing suture line simulation suture solution is not stable enough when displaying the suture effect, the present invention proposes the following technical solutions:

[0004] The first aspect of the present invention provides a suturing simulation method, comprising: obtaining a model of a suture line, the model comprising a plurality of chain-connected component units, each of the component units comprising at least one particle point; distinguishing the combination form between the component units, and selecting a preset iteration method corresponding to the combination form, wherein the combination form is used to indicate the non-chain connection relationship between the component units at different suturing stages; based on the selected preset iteration method, using position dynamics to calculate motion parameters corresponding to at least some of the particle points in the model; and displaying the suture line based on the motion parameters.

[0005] Preferably, the combination form includes a first combination form and a second combination form, and the selection of the preset iteration method corresponding to the combination form includes: selecting a first preset iteration method corresponding to the first combination form, or selecting a second preset iteration method corresponding to the second combination form, wherein, when the first preset iteration method is applied to the position dynamics to calculate the uncalculated motion parameters, the referenced calculated motion parameters belong to the same frame number; when the second preset iteration method is applied to the position dynamics to calculate the uncalculated motion parameters, the referenced calculated motion parameters belong to different frame numbers.

[0006] Preferably, the method of using position dynamics to calculate the motion parameters corresponding to at least some of the particle points in the model based on the selected preset iteration method includes: applying a first preset iteration method to position dynamics, and calculating the motion parameters corresponding to at least some of the particle points in the model according to a preset first motion constraint; or, applying a second preset iteration method to position dynamics, and calculating the motion parameters corresponding to at least some of the particle points in the model according to a preset second motion constraint; wherein the first motion constraint includes a constraint for independent motion control of each of the particle points, and the second motion constraint includes a constraint for independent motion control of each of the particle points, and a constraint for overall motion control of at least some of the particle points.

[0007] Preferably, the second motion constraint includes a bending constraint and a collision constraint, and the calculation of the motion parameters corresponding to at least some of the particle points in the model according to the preset second motion constraint includes: referring to the calculated motion parameters, calculating the uncalculated motion parameters according to the bending constraint and the collision constraint, wherein the bending constraint is used to perform independent motion control on each of the particle points, and the collision constraint is used to perform overall motion control on the particle points in the component unit that collides; and weighting processing is performed on the motion parameters calculated according to the bending constraint and the motion parameters calculated according to the collision constraint to obtain the final calculated motion parameters.

[0008] Preferably, the collision constraint includes a speed constraint, and referring to the calculated motion parameters, calculating the uncalculated motion parameters according to the collision constraint includes: calculating the particle point velocity in the component unit where the collision occurs based on the calculated motion parameters; counting the distribution of each of the particle point velocities, and / or counting the difference between the average value of each of the particle point velocities and the velocity of each of the particle point velocities; adjusting each of the particle point velocities based on the distribution and / or the difference, and using the adjusted particle point velocity as the motion parameter calculated according to the collision constraint.

[0009] Preferably, the collision constraint includes a position constraint, and referring to the calculated motion parameters, calculating the uncalculated motion parameters according to the collision constraint includes: calculating the position information of the particle points in the colliding component units based on the calculated motion parameters, and determining the first distance between each two colliding component units based on the position information; based on the first distance, setting the position correction amount between each two colliding component units when they are in a non-chain connection, and adjusting the first distance according to the position correction amount; based on the adjusted first distance, updating the position information, and using the updated position information as the motion parameter calculated according to the collision constraint.

[0010] Optionally, the determining of the combination form between each of the component units includes: performing collision detection at multiple scales between each of the component units to obtain a collision detection result; if the collision detection result is a collision, performing a loop detection on the component units that collided to obtain a loop detection result; if the loop detection result is a loop, the component units are determined to be in the second combination form; if the collision detection result is that no collision occurs, or the loop detection result is that no loop is formed, the component units are determined to be in the first combination form.

[0011] Preferably, performing collision detection at multiple scales between each of the component units to obtain the collision detection result includes: obtaining bounding box information of each of the component units, and mapping each of the bounding box information into a preset array; performing first-scale collision detection between each of the component units according to the mapping of each of the bounding box information in the preset array; if the result of the first-scale collision detection is a preliminary collision, determining a directed distance between each two component units that have initially collided; comparing the directed distance with the radial length and / or axial direction of the component unit; based on the comparison result, performing second-scale collision detection between each two component units that have initially collided; and using the result of the second-scale collision detection as the final collision detection result.

[0012] Optionally, performing collision detection at multiple scales between each of the component units to obtain a collision detection result includes: determining an expansion plane of each of the component units along its own movement direction, and determining an overlapping relationship between each of the expansion planes; performing a third-scale collision detection between each of the component units based on the overlapping relationship; if the result of the third-scale collision detection is a preliminary collision, then among every two component units that have initially collided, segmenting the expansion plane of one of the component units, and determining an expansion boundary of the corresponding expansion plane of the other component unit; determining a relative position relationship between each segmented expansion plane and the expansion boundary, and performing a fourth-scale collision detection between every two component units that have initially collided based on the relative position relationship; and using the result of the fourth-scale collision detection as the final collision detection result.

[0013] Preferably, the segmented expansion plane includes at least two segmentation planes, and determining the relative position relationship between each segmented expansion plane and the expansion boundary includes: determining the distribution of the endpoints of the expansion boundary relative to each segmentation plane, and calculating the intersection between the expansion boundary and each segmentation plane based on the distribution; judging whether the distribution is on the opposite side of at least one segmentation plane among the two segmentation planes, and whether the intersection is inside the at least one segmentation plane; based on the judgment result, obtaining the relative position relationship between each segmented expansion plane and the expansion boundary.

[0014] Preferably, the loop detection is performed on the colliding component units to obtain the loop detection result, which includes: determining the sequential connection relationship between the colliding component units; based on the sequential connection relationship, detecting: the number of particle points without collision, the kink situation, and / or the axial direction in the colliding component units; based on the number of particle points, the kink situation, and / or the axial direction, detecting whether the colliding component units form a loop to obtain the loop detection result.

[0015] Preferably, according to the sequential connection relationship, detecting the kink in the component units that collide includes: obtaining a preset reference point; determining a second distance between the component units that collide and the preset reference point, and comparing the size of the second distance between every two component units that collide; based on the size comparison result, determining the relative lateral relationship between every two component units that collide; according to the sequential connection relationship, detecting the change of each relative lateral relationship, and determining the kink in the component units that collide according to the change.

[0016] Preferably, determining the kink condition in the colliding component units according to the changing conditions includes: determining the number of changes of each relative lateral relationship according to the changing conditions; determining the number of kinks of the colliding component units based on the number of changes to obtain the kink condition.

[0017] Preferably, based on the sequential connection relationship, detecting the kink situation in the colliding component units includes: determining the preset point vectors between every two colliding component units, and determining the angle between every two preset point vectors corresponding to the sequential connection relationship; detecting whether the angle meets the preset angle condition to determine the kink situation in the colliding component units.

[0018] Preferably, according to the sequential connection relationship, detecting the axial direction in the component units that collide includes: extracting at least two groups of chain-connected component units in the component units that collide according to the sequential connection relationship; fitting the main axis directions of the at least two groups of component units respectively, and using the main axis directions as the axial direction in the component units that collide.

[0019] Preferably, the stitching simulation method also includes: adding each two component units that collide with each other to a collision group, and determining whether there are identical particle points in each of the collision groups; if so, merging at least two collision groups with identical particle points, and the fused collision group includes a group of at least some of the component units that collided.

[0020] The second aspect of the present invention provides a suturing simulation device, comprising: an acquisition module, used to acquire a model of a suture line, the model comprising a plurality of chain-connected component units, each of the component units comprising at least one particle point; an iteration selection module, used to distinguish the combination form between the component units, and select a preset iteration method corresponding to the combination form, wherein the combination form is used to indicate the non-chain connection relationship between the component units at different suturing stages; a calculation module, used to calculate the motion parameters corresponding to at least some of the particle points in the model using position dynamics based on the selected preset iteration method; and a display module, used to display the suture line based on the motion parameters.

[0021] A third aspect of the present invention provides a surgical simulator, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, a suturing simulation method as in any embodiment of the present application is implemented.

[0022] A fourth aspect of the present invention provides a readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above suture simulation method when executed by a processor.

[0023] The beneficial effects of the present invention are as follows: the present invention determines which stage the suture simulation process has entered based on the combination form by distinguishing the combination form of each component unit in the suture line model; then, under different combination forms, a pre-set iteration method is selected to perform iterative operations on the motion parameter solution of the position kinematics. For example, before knotting, the associated iteration based on the calculation results between constraints is still used to improve the efficiency of the iterative operation, and then after knotting, the unrelated iteration method of the calculation results between constraints is used to perform the operation, so as to avoid model rotation caused by conflicts between constraints, improve the parameter solution accuracy of the suture line simulation suturing, and the stability of the subsequent display effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a schematic diagram of a first embodiment of the suturing simulation method of the present invention;

[0025] Figure 2 It is a schematic diagram of a preferred embodiment of the suturing simulation method of the present invention;

[0026] Figure 3 is a schematic diagram of a second embodiment of the suturing simulation method of the present invention;

[0027] Figure 4 is a schematic diagram of a third embodiment of the suturing simulation method of the present invention;

[0028] Figure 5 is a schematic diagram of a first embodiment of suture line collision detection in the present invention;

[0029] Figure 6 is a schematic diagram of a fourth embodiment of the suturing simulation method of the present invention;

[0030] Figure 7 is a schematic diagram of a second embodiment of suture line collision detection in the present invention;

[0031] Figure 8 is a schematic diagram of a third embodiment of suture line collision detection in the present invention;

[0032] Fig. 9 is a schematic diagram of a fourth embodiment of suture line collision detection in the present invention;

[0033] Fig.10 is a schematic diagram of a fifth embodiment of suture line collision detection in the present invention;

[0034] Fig.11 It is a schematic diagram of an embodiment of knot tightness detection in the present invention;

[0035] Fig.12 It is a schematic diagram of an embodiment of the detection of knot kink in the present invention;

[0036] Fig.13 is a schematic diagram of another embodiment of the detection of knot kinks in the present invention;

[0037] Fig.14 It is a schematic diagram of an embodiment of knot authenticity detection in the present invention;

[0038] Fig.15 is a schematic diagram of an embodiment of a suturing simulation device in the present invention;

[0039] Fig.16 It is a schematic diagram of an embodiment of a surgical simulator in the present invention. DETAILED DESCRIPTION

[0040] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. Preferred embodiments of the present invention are provided in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.

[0041] It should be noted that, unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those understood by a person skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For example, the term "plurality" includes two or more.

[0042] In the field of computer graphics, the common physical method for simulating object deformation in real time generally updates the acceleration through external forces first, and then integrates to obtain the velocity and position. However, PBD (Position Based Dynamic) directly corrects the position through constraint functions, and then updates the velocity through the position. The system equations in the PBD algorithm are constructed by a set of constraint function equations, which include multiple constraint function equations (referred to as constraint functions).

[0043] In PBD, the model of an object includes multiple particle points that make up the object, also called mass points. The parameters of the particle points include their position, velocity and mass. The parameters of the constraint function include the position of these particle points, and the velocity and mass of the particle points are calculated based on the position. The constraint function is used to describe the relationship between the particle points that make up the object.

[0044] The PBD algorithm mainly includes the initial stage and the real-time simulation stage. In the initial stage, the parameters of all the particle points that make up the object are initialized according to the preset parameters of the object, such as the initial position, initial posture, number of particle points, etc. Then it enters the real-time simulation stage, which executes the process of simulating the deformation of the object according to the effect of the environment (including possible operation instructions from the user) in a loop in frames, which can specifically include three parts: prediction, constraint correction and variable update.

[0045] In the prediction part of the current frame, the external environment force of the current frame is converted into displacement as much as possible, and the external force that cannot be directly converted into displacement (such as gravity) is retained. Based on the position of each particle point in the previous frame, the position of each particle point in the current frame is predicted by combining the displacement obtained by conversion and the external force that cannot be directly converted.

[0046] The above prediction part often only uses integrals (such as explicit Euler integrals) to directly predict the position of each particle point in the current frame, without considering the mechanical properties of the object and the interaction with the environment. Therefore, it cannot be directly used as the simulation result of the current frame, but the position of the particle point must be corrected using the constraint function. Constraint functions are used to limit the relationship between particle points. There are two main types of constraint functions: one is a temporary constraint function, which is generally generated temporarily when the object is detected to interact with external objects in the environment; the other is a conventional constraint function, which is determined by the mechanical properties of the object itself. According to the constraint function and the current position, the corrected position that satisfies the constraint function as much as possible is calculated. This process is called constraint projection and is the core process of PBD. Constraint correction is essentially an iterative optimization of the position of the particle point based on the constraint function equation group. The specific implementation is generally an iterative execution of the process of using the constraint functions in the constraint function equation group to perform constraint projection in turn until the set number of iterations is reached, so as to find the particle point position that satisfies all the constraint functions in the constraint function equation group as much as possible.

[0047] The result obtained after constraint correction is the position of each particle point in the current frame, based on which the speed of each particle point in the current frame can be calculated, and then the corresponding variables are updated for display and calculation of the next frame. The Δt used in PBD is generally the default frame spacing, that is, the duration between two adjacent frames under normal circumstances.

[0048] In the process of PBD constraint correction, when the position of the particle point is iteratively optimized based on the constraint function equation group, the iterative method used can be Jacobi iteration method and Gauss-Seidel iteration method. The constraint function equation group includes "F1, F2, ..., F n "The particle point will solve the constraint function equations frame by frame as it moves, and determine the motion parameters of the particle point in real time. The Jacobi iteration method will calculate the constraint function of the i-th frame based on the calculation result of the constraint function of the i-1th frame, and so on. The Gauss-Seidel method is based on the j-1th constraint function F j-1 Calculate the j-th constraint function F j The solution is j∈n.

[0049] Since the Gauss-Seidel iteration method uses the solution of the previous constraint function to calculate the solution of the next constraint function each time, its iteration efficiency is higher than that of the Jacobi iteration method and its convergence speed is faster. Therefore, when performing stitching simulation, the Gauss-Seidel iteration method is often used to iteratively optimize the position of the particle point.

[0050] See also Figure 1 , the first embodiment of the suturing simulation method in the present invention is described below.

[0051] 11. Obtain a model of a suture line, wherein the model includes a plurality of component units connected in a chain manner, and each of the component units includes at least one particle point;

[0052] 12. Identify the combination form between the component units, and select a preset iteration mode corresponding to the combination form, wherein the combination form is used to indicate the non-chain connection relationship between the component units at different stitching stages;

[0053] 13. Based on the selected preset iteration method, using position dynamics to calculate motion parameters corresponding to at least some of the particle points in the model;

[0054] 14. Displaying the stitching line based on the motion parameters.

[0055] For ease of understanding, the application scenario of the suturing simulation method in the present invention is first described. The suturing simulation system for doctor suture line suturing training includes at least a main console and a virtual response device. The doctor generates an operation instruction for clamping the medical instrument by performing surgical suturing operations on the main console, and inputs it into the virtual response device; the virtual response device includes at least a processor and a display, and the display at least displays a model of a suture line (hereinafter referred to as a suture line) and a model of a clamping surgical instrument (hereinafter referred to as a clamping surgical instrument). The processor is configured to: according to the input operation instruction, control the clamping surgical instrument to clamp the suture line to perform the suturing operation, so that the posture of the suture line changes and presents a flexible motion state; the clamping surgical instrument and the suture line are rendered on the display in real time as the posture changes, so that the doctor can observe the suturing state.

[0056] In this embodiment, when the motion of the suture is controlled, the suture is divided into a plurality of chain-connected segments, each of which is a combined unit. The combined unit can be specifically set as a flexible rod, which serves as a skeleton structure for controlling the motion of the suture, presenting a flexible motion state of the suture. Each component unit can include at least one particle point, which carries the motion parameters calculated by the PBD solution to move, changes the posture of the component unit, and finally presents the overall motion form of the suture.

[0057] In this embodiment, in response to the control command input by the main console, the model of the suture line is obtained; by distinguishing the combination form between each component unit, the suture stage in the control process of the suture line is determined, such as the insertion stage, knotting stage, tensioning stage, cyclic suture stage, etc.; in different suture stages, the associated preset iteration method is selected for iterative optimization of the position of the particle point during the PBD operation, at least based on the constraint function equation group; it is ensured that in different suture stages, the position of each particle point can be correctly calculated, the movement process of the suture line is accurately presented, and it is ensured that the abnormal phenomenon of suture line penetrating the mold or suture falling off will not occur, thereby improving the authenticity of suture fitting.

[0058] Specifically, according to the combination form between each component unit, the non-chain connection relationship between each component unit is determined, and based on the non-chain connection relationship, the suture stage of the suture line is determined. Among them, the non-chain connection mode is a connection mode between component units other than the chain connection mode, such as the connection mode between component units at the self-collision position when the suture line collides with itself, and the non-chain connection relationship includes the non-chain connection mode between component units and the non-chain connection mode.

[0059] In this embodiment, each suturing stage between each component unit in different combination forms includes a PBD constraint function equation group, which is used to update the moving position of each particle point under the control instruction; in some suturing stages, the PBD constraint function equation group alone cannot cover all motion constraints. For example, in the tensioning stage, the sutures themselves will generate additional friction between each other, so that the sutures can maintain a tighter shape after being tightened. For example, in the insertion stage, additional friction is also generated between the sutures and the tissue, which makes the sutures longer and the radial distance shorter. Therefore, it is necessary to add additional motion constraints and apply these additional forces to the sutures, so that the control during the suturing process is more precise and the visualization effect is more realistic.

[0060] In response to these additional forces, corresponding additional motion constraints are preset, and together with the constraint function equations of PBD, the positions of each particle point are iteratively optimized. However, when performing iterative optimization using the Gauss-Seidel iteration method with higher iteration efficiency and faster convergence, since the additional motion constraints are calculated based on the calculation results of the constraint function equations of PBD, the additional motion constraints will conflict with the constraint function equations of PBD, resulting in a superposition effect between the two on the position updates of each particle point, resulting in instability caused by the particle point continuously moving in one direction, such as rotation.

[0061] In one embodiment, in response to the aforementioned instability phenomenon and in order to ensure the iterative efficiency of the entire stitching process, in the presence of additional motion constraints, the positions of the particle points can be iteratively optimized using an iterative method that does not produce a superposition effect. For example, the calculation of the j-th motion constraint will not depend on the calculation result of the j-1-th motion constraint, such as the Jacobi iteration method, although the iterative efficiency will be reduced in the stitching stage; in the absence of additional motion constraints, a Gauss-Seidel iteration method can be used.

[0062] In another embodiment, in the case of additional motion constraints, an iterative method that produces a superposition effect can be applied to the calculation of the constraint function equation group of the PBD, and the position of the particle point can be iteratively optimized to obtain the initial motion parameters; then an iterative method that does not produce a superposition effect can be applied to the calculation of the additional motion constraints to obtain a position correction, and the initial motion parameters can be updated based on the position correction to obtain the final motion parameters.

[0063] In this embodiment, the position of the particle point is updated based on the selected iteration method to obtain the motion parameters of all or part of the particle points, and the motion parameters include the position, speed and mass of the particle point. As the doctor performs the surgical suturing operation at the console, the particle point performs the PBD calculation based on the selected iteration method, and updates the aforementioned motion parameters of the particle point in real time.

[0064] Specifically, according to the motion parameters of the particle points and the chain connection relationship between the various component units, the posture of the component units is updated, and the component units after the updated posture are smoothed. The processed component units are converted into corresponding normal maps, combined with the appearance map of the seam line, and the dynamic effect of the seam line sewing process is rendered frame by frame and displayed on the monitor.

[0065] In one embodiment, if Figure 2 As shown, a preferred embodiment of the stitching fitting method is provided:

[0066] Initialization 21. When starting the suture simulation program, the position, posture, number of component units, number of particle points, iteration method, etc. of the suture line are initialized to the preset zero position parameters so that the suture line presents the initial posture.

[0067] PBD constraint 22. Based on the iterative method of the initial setting, the constraint function equation group of PBD is calculated to obtain the initial motion parameters of each particle point.

[0068] Combination morphology detection and response 23: Detect the combination morphology between each combination unit to determine the current stitching stage, and select the iteration method of the current stitching stage as a response.

[0069] Position constraint update 24: Calculate the position correction based on the existing additional position motion constraints in an iterative manner according to the response, and update the position information in the initial motion parameters based on the position correction.

[0070] Speed ​​constraint update 25: According to the selected iteration method, the existing additional speed motion constraints are calculated again to obtain the speed correction, and the speed information in the initial motion parameters is updated based on the speed correction.

[0071] Stitching effect rendering 26: According to the initial motion parameters or the updated motion parameters, combined with the appearance map of the stitching line, the stitching line model rendering is performed, and the rendering result is presented on the display.

[0072] Exit suturing operation 27: If the control command from the main console is continuously received, the motion parameters are continuously updated and the dynamic effect of suturing the suture line is displayed. When the preset exit condition is met, such as no control command from the main console is received or an exit command is received, the suturing simulation program is terminated.

[0073] See also Figure 3 , the second embodiment of the suturing simulation method in the present invention is described below.

[0074] 31. Obtain a model of a suture line, wherein the model includes a plurality of component units connected in a chain manner, and each of the component units includes at least one particle point;

[0075] 32. Determine the combination form between the component units, and select a first preset iteration method corresponding to the first combination form, or select a second preset iteration method corresponding to the second combination form;

[0076] 33. Applying the first predetermined iteration method to the position dynamics, and calculating the uncalculated motion parameters of the same frame with reference to the calculated motion parameters of each particle point in the model; or,

[0077] 34. Applying a second preset iteration method to the position dynamics, and calculating uncalculated motion parameters of the next frame with reference to the calculated motion parameters of at least some of the particle points in the model;

[0078] 35. Display the suture line based on the motion parameters.

[0079] In this embodiment, the combination form includes a first combination form and a second combination form, which are respectively associated with a first iteration method and a second iteration method; when the first preset iteration method is applied to the position dynamics to calculate the uncalculated motion parameters, the referenced calculated motion parameters belong to the same frame number; when the second preset iteration method is applied to the position dynamics to calculate the uncalculated motion parameters, the referenced calculated motion parameters belong to different frame numbers.

[0080] In this embodiment, the different combination forms of the aforementioned component units correspond to different stitching stages, and different iteration methods are selected in different stitching stages. The first combination form or the second combination form is determined according to whether there are other additional motion constraints in addition to the PBD constraint function equation group in different stitching stages; the combination form of each component unit in the stitching stage without additional motion constraints is defined as the first combination form, and the combination form of each component unit in the stitching stage with additional motion constraints is defined as the second combination form.

[0081] In this embodiment, according to the source of the calculated motion parameters referred to by the PBD algorithm, the first preset iteration method or the second iteration method is used; if the source of the calculated motion parameters belongs to the same frame number, the iterative optimization method is preset to the first iteration method, if the source of the calculated motion parameters belongs to different frame numbers, the iterative optimization method is preset to the second iteration method.

[0082] Specifically, for the first combination form without additional motion constraints, when iteratively optimizing the motion parameters such as the position, velocity, and mass of the particle point, the first iteration method is used to calculate the uncalculated motion parameters of the j-1 PBD motion constraint according to the calculated motion parameters of the j-1 PBD motion constraint in the same frame number. For example, the iterative optimization of motion parameters is performed using the Gauss-Seidel iteration method, so that the iteration efficiency is improved and the iterative optimization of motion parameters converges quickly while the stitching simulation process remains stable, ensuring the real-time and smoothness of the animation display during the stitching simulation process.

[0083] Specifically, for the second combination form with additional motion constraints, when iteratively optimizing the motion parameters such as the position, velocity, and mass of the particle points, the second iteration method is used to calculate the uncalculated motion parameters of the jth PBD motion constraint / additional motion constraint of the i-th frame based on the calculated motion parameters of the jth PBD motion constraint / additional motion constraint of the i-th frame. For example, the Jacobi iteration method is used to perform iterative optimization of motion parameters, so that the suture simulation process will not have unstable phenomena such as mold penetration and knot shedding, and the authenticity of the animation display during the suture simulation process is guaranteed.

[0084] In a preferred embodiment, the first combined state includes a combined state of a knotting stage; and the second combined state includes a combined state of an insertion stage, a tensioning stage, and a loop suturing stage.

[0085] See also Figure 4 , the third embodiment of the suturing simulation method in the present invention is described below.

[0086] 41. Obtain a model of a suture line, wherein the model includes a plurality of component units connected in a chain manner, and each of the component units includes at least one particle point;

[0087] 42. Identify the combination form between the component units, and select a preset iteration mode corresponding to the combination form, wherein the combination form is used to indicate the non-chain connection relationship between the component units at different stitching stages;

[0088] 43. Applying a first preset iteration method to position dynamics, and calculating motion parameters corresponding to at least some of the particle points in the model according to a preset first motion constraint; or,

[0089] 44. Applying a second preset iteration method to position dynamics, and calculating motion parameters corresponding to at least some of the particle points in the model according to a preset second motion constraint;

[0090] 45. Displaying the suture line based on the motion parameters.

[0091] In this embodiment, the first motion constraint includes a constraint for independent motion control of each particle point, and the second motion constraint includes a constraint for independent motion control of each particle point and a constraint for overall motion control of at least some of the particle points.

[0092] In this embodiment, the selection of the first iterative method and the second iterative method depends on the combination form of each component unit. The combination form determines the stitching stage and whether there are other additional motion constraints outside the PBD motion constraint. Based on this, the first motion constraint includes the PBD motion constraint, and the first iterative method is used for iterative optimization. The second motion constraint includes the PBD motion constraint and the additional motion constraint, and the second iterative method is used for iterative optimization.

[0093] In addition, if each component unit is in the second combination form, the PBD motion constraint can be iteratively optimized using the first iterative method, and then the additional motion constraint can be iteratively optimized using the second iterative method.

[0094] In one embodiment, the second motion constraint includes a bending constraint and a collision constraint, and the calculation of the motion parameters corresponding to at least some of the particle points in the model according to the preset second motion constraint includes: referring to the calculated motion parameters, calculating the uncalculated motion parameters according to the bending constraint and the collision constraint, wherein the bending constraint is used to perform independent motion control on each of the particle points, and the collision constraint is used to perform overall motion control on the particle points in the component unit that collides; weighted processing is performed on the motion parameters calculated according to the bending constraint and the motion parameters calculated according to the collision constraint to obtain the final calculated motion parameters.

[0095] In this embodiment, the bending constraint may be defined as the aforementioned PBD motion constraint, and the collision constraint may be defined as the aforementioned additional motion constraint, such as the stretching constraint when the suture collides with the tissue in the insertion phase, the friction constraint of the suture itself in the tensioning phase, and the friction constraint caused to the previous knotted suture during the next suturing process in the cyclic suturing phase. The following describes the process of solving the uncalculated motion parameters, taking the second motion constraint including the bending constraint and the friction constraint of the suture itself in the tensioning phase as an example.

[0096] In this embodiment, each particle point is regarded as an independent individual, and the motion parameters calculated based on the PBD motion constraint are used to control the motion of each particle point. After the suture is knotted, in the tensioning stage, the additional friction force acts on the part that constitutes the knot, so the friction constraint is added to the particle points of the knot part, and the particle points of the knot part are regarded as a whole, and the motion parameters calculated based on the friction constraint are used to control the motion of the knot.

[0097] In this embodiment, for some particles in the knot part, when calculating the motion parameters based on the friction constraint, the calculation is not performed based on the calculation result of the PBD motion constraint; instead, the motion parameters are calculated one by one based on the calculation result of the friction constraint of the previous frame, so that the PBD motion constraint and the friction constraint will not have a superposition effect on the control of the particle points of this part, resulting in a conflict between the two and rotation. By weighting the calculation results of the PBD motion constraint and the friction constraint, the final motion parameters of the particle points of this part are calculated in parallel, and compared with the motion parameters calculated by superposition in the previous frame, the abnormal phenomenon of suture line rotation will not occur.

[0098] Specifically, when weighted processing is performed on the PBD motion constraint and the friction constraint, the weights of the two can be determined based on the degree of tension, which can be divided into three weight setting stages based on the degree of tension. The first stage is during the early stage of tensioning. When the degree of tension is large, the weight of the friction constraint is larger, indicating that the friction between the sutures of the knot part is greater, and vice versa. The second stage is the mid-term tensioning stage. The weight increases with the increase in the degree of tension, which is smaller than the first stage, indicating that the tight combination of the knot part is approaching the limit and the adjustable range is reduced. The third stage is the late holding stage. At this time, as the degree of tension increases, the weight will not increase, and the tight combination of the knot part is almost at the limit and cannot be tightened any further.

[0099] In one embodiment, the collision constraint includes a speed constraint, and referring to the calculated motion parameters, calculating the uncalculated motion parameters according to the collision constraint includes: calculating the particle point speed in the component unit where the collision occurs based on the calculated motion parameters; counting the distribution of each of the particle point speeds, and / or counting the difference between the average value of each of the particle point speeds and each of the particle point speeds; adjusting each of the particle point speeds based on the distribution and / or the difference, and using the adjusted particle point speed as the motion parameter calculated according to the collision constraint.

[0100] This embodiment is still explained by taking the friction constraint as an example. When the knot is tightened, due to the friction force generated, each particle point contained in the knot will have a lower speed response, so a speed constraint is set, and the speed constraint includes at least the following two items: 1) maximum speed constraint, 2) speed correction constraint. For the first item, in the process of updating the particle point speed when the knot is tightened, in order to prevent the knot speed from being too fast and causing penetration, the maximum speed of the entire knot is limited. In addition, in order to prevent the force calculation of the knot tightening from being untimely (such as using the Jacobi iteration method) or uneven force feedback, which causes the knot movement to shake, the speed of the entire knot is corrected and constrained.

[0101] Specifically, the velocity correction constraint includes: accumulating the velocities Vn (v1, v2, ..., vn) of all particle points in the knot and averaging them to obtain the average velocity v_rel. The velocity of the particle point in the knot is calculated as follows:

[0102] vi=(vi-v_rel)*a+v_rel*(1-a);

[0103] Among them, when a is 0, vi = v_rel, the individual speed of the particle point does not work, only the overall speed. When a is 1, vi = vi-v_rel, the individual speed of the particle point has the largest weight, that is, the correction amplitude of the individual speed is the smallest, i∈n.

[0104] Specifically, the distribution of the speed Vn of all particle points and / or the difference between the speed Vn of all particle points and the average speed v_rel are evaluated; the value of a is set based on the evaluation result to determine the importance of the individual speed and average speed of the particle points.

[0105] Among them, when the distribution situation is that the particle point distribution range is larger, more uneven, and / or the difference is larger, the a value is set smaller, and the speed of the output particle point tends to the average speed, preventing the knot movement from shaking too much, and the knot movement is smoother; when the distribution situation is that the particle point distribution range is smaller, more uniform, and / or the difference is smaller, the a value is set larger, making the responsiveness of the knot tightening better. Based on the distribution and / or difference of the particle point speed, the speed of the output particle point tends to its own theoretical speed, making the knot tightening stage more realistic, and no abnormal phenomena such as shaking during the knot tightening process will occur.

[0106] In one embodiment, the collision constraint includes a position constraint, and referring to the calculated motion parameters, calculating the uncalculated motion parameters according to the collision constraint includes: calculating the position information of the particle points in the colliding component units based on the calculated motion parameters, and determining the first distance between each two colliding component units based on the position information; based on the first distance, setting the position correction amount between each two colliding component units when they are in a non-chain connection, and adjusting the first distance according to the position correction amount; based on the adjusted first distance, updating the position information, and using the updated position information as the motion parameter calculated according to the collision constraint.

[0107] This embodiment still takes friction constraint as an example for explanation. When the knot is tightened, due to the friction force generated by the non-chain connection of each two component units by collision, the knot will not loosen with the PBD motion constraint, and will remain in a position close to that when tightened during the tightening process. Therefore, a position constraint is set and the position correction amount is adjusted to simulate the friction force generated.

[0108] Based on the motion parameters calculated in the previous frame, the position information of the particle points in the component units that collide in this frame is calculated, and according to the position information, the spatial coordinates of each particle point that is not under the action of friction are obtained; the first distance between every two component units that collide is calculated, and the first distance refers to the shortest distance between every two component units that collide; since the larger the first distance, the smaller the tensioning degree is, and the smaller the first distance, the greater the tensioning degree is, the magnitude of the friction force can be determined according to the magnitude of the first distance; based on the magnitude of the friction force, the distance between every two component units after tensioning close to the tensioning position is determined, and according to the distance close to the tensioning position, the position information is updated, wherein the larger the first distance is, the amplitude of the position information is adjusted, presenting a trend of smaller-larger-smaller, for example, presenting a normal distribution.

[0109] Specifically, Figure 5 As shown in (a) of FIG. 1 , the first distance d between the closest path Pi-Pj between the components C1 and C2 that collide is calculated, specifically, the distance between the central axis lines between the two. Usually, the first distance d is greater than the detection diameter 2*r, which is prone to mold penetration. Figure 5 As shown in (b) in FIG. 1 , the component unit is an elastic rod. During the suture simulation, axial stretching and radial compression will occur, which will cause the radius of the component unit to be compressed. At this time, it is detected that the radius r1 of the component unit is too small. When it is determined that the first distance d is less than 2*r1, it means that there is no collision between the component units. In fact, the original radius will be used when the suture line is rendered and displayed on the display, as shown in FIG. Figure 5 As shown in (c), the first distance d>2*r2, so that the suture line will penetrate the mold.

[0110] Therefore, the pop-up margin α is set as the position correction amount. By changing the pop-up margin α of the collision response of the particle point in the knot, the knotting degree and friction of the suture are simulated, and the penetration phenomenon is avoided. Among them, if the particle point is in the knot, the pop-up margin α is a negative number, so that the component C1 and the component C2 are far away from each other; if the particle point is outside the knot, the pop-up margin α is a positive number, so that the component C1 and the component C2 are close to each other; that is, the pop-up margin is adjusted according to the difference between the first distance d and 2r.

[0111] Exemplarily, when calculating the correction amount △p of the position information, the response distance is corrected by d`=d*(1+α), where the range of α is (-1, 0). Finally, the position information is updated based on the correction amount △p, and the colliding component units C1 and C2 are slightly embedded in each other, so that the overall display of the knot is tighter, and the naturally falling knot will not slip off, and the mold penetration phenomenon will not occur.

[0112] See also Figure 6, the fourth embodiment of the suturing simulation method in the present invention is described below.

[0113] 61. Obtain a model of a suture line, wherein the model includes a plurality of component units connected in a chain manner, and each of the component units includes at least one particle point;

[0114] 62. Perform collision detection at multiple scales between the component units to obtain collision detection results;

[0115] 63. If the collision detection result is that a collision occurs, a loop detection is performed on the component units where the collision occurs to obtain a loop detection result;

[0116] 64. If the loop detection result is a loop, the component units are judged to be in a second combination form;

[0117] 65. If the collision detection result is that no collision occurs, or the loop detection result is that no loop is formed, the component units are judged to be in the first combination form;

[0118] 66. Select a preset iteration method corresponding to the combination form;

[0119] 67. Based on the selected preset iteration method, use position dynamics to calculate the motion parameters corresponding to at least some of the particle points in the model;

[0120] 68. Display the suture line based on the motion parameter.

[0121] In this embodiment, when detecting whether each component unit belongs to the first combination form or the second combination form, it is mainly to detect which suturing stage the current stage is in. For each suturing stage such as the insertion stage, the knotting stage, the tensioning stage, and the circular suturing stage, each suturing stage can be divided into a first type stage and a second stage according to whether other additional forces occur between the component units; based on the two types of stages, collision detection and loop detection are performed in sequence for judgment; wherein, the first stage includes at least the knotting stage, and the second type stage includes at least the insertion stage, the tensioning stage, and the circular suturing stage.

[0122] Specifically, when performing collision detection between each component unit, a discrete collision detection method (DCD) can be performed based on the shortest directed distance between the component units, and the component units that collide can be searched out from large scale to small scale in sequence to achieve collision detection at multiple scales; the DCD method can avoid the problem of large amount of calculation and time-consuming caused by the continuous collision detection (CCD) method, save the time of collision detection, and improve the efficiency of collision detection. Collision detection can be preliminarily divided into a first type stage in which no component unit collision occurs, and a second type stage in which a component unit collision occurs.

[0123] Specifically, when loop detection is performed between the components that collide, the purpose is to detect whether the composition of each component unit meets the existing loop form of each second type stage, and to distinguish different second type stages to avoid misjudgment. For example, for a component unit that passes the collision detection, if the knot is loose, it will not be judged as entering the tightening stage. Therefore, loop detection related to the tightness of the knot, the degree of entanglement between the components, and the closure between the components can be performed accordingly.

[0124] In one embodiment, collision detection can be performed by: obtaining bounding box information of each of the component units, and mapping each of the bounding box information to a preset array; performing a first-scale collision detection between each of the component units according to the mapping of each of the bounding box information in the preset array; if the result of the first-scale collision detection is a preliminary collision, determining a directed distance between each two component units that have initially collided; comparing the directed distance with the radial length and / or axial direction of the component unit; based on the comparison result, performing a second-scale collision detection between each two component units that have initially collided; and using the result of the second-scale collision detection as the final collision detection result.

[0125] In this embodiment, multi-scale collision detection includes detection at at least two scales. The first-scale collision detection belongs to a larger-scale collision detection, which can be called a coarse detection, and screens out component units that may collide with a smaller amount of calculation; the second-scale collision detection belongs to a smaller-scale collision detection, which can be called a fine detection, and identifies the component units that actually collide.

[0126] Specifically, the bounding box information of each component unit can be a bounding box of a preset shape containing the component unit, or a bounding box obtained by expanding a preset distance outward along the outline of the component unit; the preset shape of the bounding box can be a cube, a cuboid, a cylinder, a sphere, etc.; the component unit can be a cylindrical elastic rod unit, and the elastic rod unit bends or undergoes deformation during movement. In this case, the outer contour of the deformed cylinder is determined as the contour of the component unit, and the bounding box is obtained by expanding the contour size. Therefore, the bounding box is also the deformed cylinder with an increased size.

[0127] Exemplarily, the preset shape of the bounding box is an AABB bounding box, which encompasses the area of ​​the deformed cylinder; a spatial hash matrix is ​​constructed and associated with a corresponding hash storage array, and according to the position of the AABB bounding box in the spatial hash matrix, the position is mapped to the storage space corresponding to the hash storage array; based on whether each storage space stores conflicting hash values ​​(each storage space stores the mapping values ​​of more than two AABB bounding boxes), it can be determined whether a preliminary collision occurs between the constituent units, thereby completing a rough detection at the first scale.

[0128] like Figure 7 As shown, a spatial hash matrix 71 is constructed and associated with a corresponding hash storage array 72, and each component unit of the seam line 73 is represented by an AABB bounding box; the position of the spatial hash matrix 71 where the seam line 73 is located is determined, such as the combination unit 731 is in the cell area 711 of the spatial hash matrix 71, the combination unit 732 is in the cell area 712, and the combination unit 733 is in the cell area 713; then the cell area is mapped to the hash storage array 72, and it can be seen that the combination unit 731 is mapped to the storage space 721 and the storage space 722, the combination unit 732 is mapped to the storage space 722 and the storage space 723, and the combination unit 733 is mapped to the storage space 724 and the storage space 725; because the storage space 722 stores the mapping values ​​of the combination unit 731 and the combination unit 732 at the same time, it can be determined that the two have initially collided, while the combination unit 733 has not initially collided.

[0129] In another optional implementation, the collision detection may also be performed by: determining the expansion plane of each component unit along its own movement direction, and determining the overlapping relationship between each expansion plane; performing a third-scale collision detection on each component unit according to the overlapping relationship; if the result of the third-scale collision detection is a preliminary collision, then in every two component units that have initially collided, the expansion plane of one of the component units is segmented, and the expansion boundary of the corresponding expansion plane of the other component unit is determined; determining the relative position relationship between each segmented expansion plane and the expansion boundary, and performing a fourth-scale collision detection on every two component units that have initially collided according to the relative position relationship; and using the result of the fourth-scale collision detection as the final collision detection result.

[0130] In this embodiment, starting from the expansion plane of the component unit, the rough detection and fine detection of the collision between multiple component units are realized. The expansion plane of the component unit along its own motion direction represents the trajectory area that the component unit will pass through in this frame to reach the target position; whether the expansion planes between each component unit overlap, and the overlapping relationship is obtained. If the overlapping relationship is overlapped, it is determined that at least two overlapping component units may collide, and the rough detection of the collision is completed.

[0131] Among them, when two component units move from a position where collision occurs or no collision occurs to a position where collision occurs, there must be a component in the movement direction of one of the component units that is in the direction of the other component unit. Therefore, it is only necessary to perform collision detection on the extended plane along the movement direction between the two to determine whether a collision occurs between the two.

[0132] For example, Figure 8 As shown, the line segment ab used to represent a component unit is extended along its own motion direction 81 to obtain an extended plane aba'b', and the line segment cd used to represent another component unit is extended along its own direction 82 to obtain an extended plane cdc'd'; if the extended plane aba'b' overlaps with the extended plane cdc'd', the corresponding two component units are determined to have initially collided. Among them, the extended plane aba'b' and the extended plane cdc'd' can be in the same plane or in different planes.

[0133] In this embodiment, the component units that initially collided are judged on a two-dimensional plane (first scale). At this time, the judgment range is further narrowed and the judgment dimension is increased to determine whether the component units that initially collided actually collided. By cross-judging the relative position relationship between the expansion boundary of one of the component units and the expansion plane of another component unit in three-dimensional space, the judgment range is narrowed and the judgment dimension is increased to achieve fine detection of collision. Among them, the expansion plane is divided to make fine detection simpler. Among them, the expansion boundary refers to the position where the component unit is about to reach in this frame, indicating the position of the expansion plane where the component unit is located.

[0134] For example, Fig. 9 As shown, the extended boundary is still represented by the line segment c'd', and the divided extended plane is divided into two triangles aa'b and a'b'b; when detecting the position of the line segment c'd' relative to the two triangles aa'b and a'b'b, it is extended to the upper space 91 and the lower space 92 relative to the plane where the two triangles aa'b and a'b'b are located, and the position information of the line segment c'd' relative to the space (upper space 91 and lower space 92) based on the triangles aa'b and a'b'b is obtained, and the collision detection between the two on the three-dimensional plane (the second scale) is completed.

[0135] Specifically, the segmented expansion plane includes at least two segmentation planes, and determining the relative position relationship between each segmented expansion plane and the expansion boundary includes: determining the distribution of the endpoints of the expansion boundary relative to each segmentation plane, and calculating the intersection between the expansion boundary and each segmentation plane based on the distribution; judging whether the distribution is on the opposite side of at least one segmentation plane among the two segmentation planes, and whether the intersection is inside the at least one segmentation plane; based on the judgment result, obtaining the relative position relationship between each segmented expansion plane and the expansion boundary.

[0136] In this embodiment, when determining the relative positional relationship between the extended boundary and the extended plane, at least two parameter determinations are included: whether the two endpoints of the extended boundary are located on the opposite sides of one of the split planes, for example, one endpoint is located on the upper side of the extended plane and the other endpoint is located on the lower side of the extended plane; and whether the intersection of the extended boundary and the extended plane is located on the split plane. When the above two parameter determinations are met, it is determined that the two component units collide.

[0137] Specifically, the distribution of the endpoints of the extended boundary relative to each split plane includes: two endpoints are located on different sides of the split plane, and two endpoints are located on the same side of the split plane. The extended plane is split into a preset shape, such as a triangle, so that each split plane presents a triangle, which is convenient for subsequent distribution and intersection calculation.

[0138] Exemplarily, a schematic diagram of the relative position between the expansion boundary and the expansion plane under three judgment results is provided. Fig.10 As shown, the two endpoints of the extended boundary 101 are neither located on the opposite sides of the two triangles aa'b and a'b'b, nor have any intersection with the extended plane, so it is determined that the extended boundary 101 has not collided with the extended plane; although the two endpoints of the extended boundary 102 are located on the opposite sides of the two triangles aa'b and a'b'b, the intersection point 103 with the extended plane is not located inside the two triangles aa'b and a'b'b, so it is determined that the extended boundary 102 has not collided with the extended plane; the two endpoints of the extended boundary 104 are located on the opposite sides of the two triangles aa'b and a'b'b, and the intersection point 105 with the extended plane is also located inside the triangle a'b'b, so it is determined that the extended boundary 104 has collided with the extended plane.

[0139] In one embodiment, loop detection can be performed by: determining the sequential connection relationship between the colliding component units; based on the sequential connection relationship, detecting: the number of particle points without collision, the kink situation, and / or the axial direction in the colliding component units; based on the number of particle points, the kink situation, and / or the axial direction, detecting whether the colliding component units form a loop to obtain a loop detection result.

[0140] In this embodiment, the sequential connection relationship refers to the connection relationship between the constituent units in the colliding constituent units, according to the chain connection sequence from the two ends of the suture to the middle, or according to the chain connection sequence from the middle to the two ends of the suture. The constituent unit may include multiple particle points, and the collision fit degree of the two constituent units that collide is determined according to the number of particle points without collision, so as to determine the tightness of the knot; the kink situation of the constituent units includes: each two constituent units that collide with each other are approximately parallel to each other, or twisted and fit together like a twist, so as to determine the degree of entanglement between the constituent units in the knot. Specifically, it can be judged in two ways, one is the kink shape of each constituent unit that collides, and the other is the relative side relationship between the constituent units that collide; the axial direction indicates: the axial direction of the two groups of chain-connected constituent units that form the knot, and the mutual entanglement direction between the two groups of constituent units is determined based on the axial direction, including the coaxial winding direction and the different axial winding direction, and the closure of the knot is determined based on the winding direction, wherein the coaxial direction indicates that the knot is not closed, and the different axial directions indicate that the knot is closed.

[0141] For example, the tightness of the knot is determined by detecting the number of particle points that do not collide in the constituent units that collide. Fig.11As shown in (a) in the figure, there are a large number of particle points in the knot that have not collided with the constituent units, which means that there are a large number of particle points in the knot that have not collided, indicating that the current state of the knot is relatively loose and has not reached the state of being tightened into a knot. Fig.11 As shown in (b), there are fewer particle points in the knot that have not collided with the constituent units, which means that there are fewer or no particle points in the knot that have not collided, which means that the current state of the knot is relatively tight, that is, it has reached the state of being tightened into a knot.

[0142] In one embodiment of kink detection, a preset reference point is obtained; a second distance between the component unit that collides with the preset reference point is determined, and the size of the second distance between each two component units that collide is compared; based on the size comparison result, the relative lateral relationship between each two component units that collide is determined; according to the sequential connection relationship, the change of each relative lateral relationship is detected, and the kink condition in the component unit that collides is determined according to the change.

[0143] In this embodiment, a reference point is preset outside the suture line to assist in detecting the kink of the colliding component units. The reference point is set at the side of the suture line, such as the sides around the knot; the second distance between each two colliding component units and the reference point is calculated, and in each of the two second distances, the larger distance is defined as the outer side and the smaller distance is defined as the inner side, so as to determine the inner or outer side of one component unit relative to the other unit in each of the colliding component units, that is, the relative lateral relationship between the two.

[0144] Specifically, each two component units that collide are divided into two groups of component units connected head to tail, and then according to the sequential connection relationship, it is determined whether one group of component units changes from the inside to the outside, or from the outside to the inside relative to the other group of component units that collide, and based on whether the change occurs and / or the number of changes, the change of the relative lateral relationship can be obtained. Based on the change, it can be determined whether each two component units that collide with each other are adjacent to each other in a nearly parallel manner, or are twisted and fitted together like a twist, obtaining a kink such as "the two are adjacent to each other" or "twisted and fitted together".

[0145] For example, Fig.12As shown, every two colliding components are divided into a first group of components {a, b, c, d, e, f} connected head to tail, and a second group of components {A, B, C, D, E, F}; for the colliding components b and component C, the second distances d1 and d2 between the two relative to the reference point P are calculated; since d1<d2, it can be determined that the component b in the first group of components is located on the inner side of the component C in the second group of components; for the colliding components d and component E, the second distances d3 and d4 between the two relative to the reference point P are calculated; since d3>d4, it can be determined that the component d in the first group of components is located on the outer side of the component E in the second group of components; since the component b is on the inner side of the component C, it is transformed into the component d being on the outer side of the component E, and it is determined that the relative side relationship has changed, indicating that the colliding components are in a kink situation of "twisting and fitting together".

[0146] Specifically, determining the kink condition in the component unit that collides according to the change condition includes: determining the number of changes of each relative lateral relationship according to the change condition; determining the number of kinks of the component unit that collides based on the number of changes to obtain the kink condition.

[0147] Furthermore, the two groups of constituent units are indexed according to a sequential connection relationship, and the relative side relationship between the constituent unit with the smallest index and the occurring constituent unit is fixed. The relative side relationship corresponding to the smallest index and the relative side relationships corresponding to other indexes are sequentially judged whether a change has occurred and the number of changes. Based on the judgment result, it is determined whether the degree of entanglement between the constituent units in the knot meets the preset requirements.

[0148] In another embodiment of kink condition detection, a preset point vector is determined between each two component units that collide, and an angle between each two preset point vectors corresponding to the sequential connection relationship is determined; and it is detected whether the angle satisfies a preset angle condition to determine the kink condition in the component units that collide.

[0149] In this embodiment, the preset points of each two component units that collide are determined. The preset points can be any one of the following: center point, endpoint, center of gravity, etc. The vector between the two preset points is determined to obtain the preset point vector. Each two preset point vectors form an angle. By judging whether the size of the angle meets the preset angle condition, the kink of the component units that collide is determined. The preset angle condition is, for example, a preset angle threshold. Preferably, the preset angle condition is an obtuse angle, that is, the angle is greater than 90°, then the preset angle condition is met.

[0150] Among them, the direction of the preset point vector can be determined in the following way: divide every two component units that collide into two groups, preset the preset point of one group of component units as the starting point, and the preset point of the other group of component units as the ending point, and the direction of the preset point vector of every two component units that collide is from the starting point to the ending point.

[0151] For example, Fig.13 As shown, the knot includes a first group of components {a, b, c, d, e, f}, and a second group of components {A, B, C, D, E, F}, and the direction of the preset point vector is set: the preset point of the first group of components faces the preset point of the second group of components; the preset point vector b'-C' and the preset point vector d'-E' are determined; the two groups of components are observed from the perspective 131, and a view 132 of the preset point vector b'-C' and the preset point vector d'-E' can be obtained, and the angle C'O E' between the two is an obtuse angle greater than 90°, so the preset angle condition is met, and it is determined that a kink occurs between the first group of components and the second group of components, and the colliding components belong to the kink situation of "twisting each other and fitting together".

[0152] Furthermore, the two groups of components are indexed according to the sequential connection relationship, the preset point vector between the component with the minimum index and the component with the collision is fixed, and the preset point vector corresponding to the minimum index and the preset point vectors corresponding to other indexes form an angle, and each angle is sequentially determined to meet the angle condition. When there is an angle greater than 90°, it is determined that a kink occurs between the two groups of components, and the other indexes constituting the angle are set as the minimum index, and the above process is re-executed.

[0153] In one implementation of axial direction detection, at least two groups of chain-connected component units in the colliding component units are extracted based on the sequential connection relationship; the main axis directions of the at least two groups of component units are fitted respectively, and the main axis directions are used as the axial directions in the colliding component units.

[0154] In this embodiment, two groups of constituent units are indexed according to a sequential connection relationship, and the indexes of the constituent units are from the smallest to the largest. It is judged whether the shape formed by the AABB bounding box of the constituent units is closed to determine whether the previously determined knot is a real knot, which can prevent the occurrence of false knots during the knotting process.

[0155] For example, Fig.14As shown in (a), the sequential connection relationship is set from the middle of the suture to the two ends of the component unit connection relationship; the index of the two groups of component units from the smallest to the largest axial direction 141 and axial direction 142 are different, so it is determined that the AABB bounding box of the component unit is closed, and the previously determined knot is a real knot. Fig.14 As shown in (b), the indexes of the two groups of constituent units are the same in the axial direction 143 and the axial direction 144 from the smallest to the largest, so it is determined that the shape of the AABB bounding box of the constituent units is not closed, and the previously determined knot is a false knot.

[0156] In one embodiment, the stitching simulation method also includes: adding each two component units that collide with each other to a collision group, and determining whether there are identical particle points in each of the collision groups; if so, merging at least two collision groups with identical particle points, and the fused collision group includes a group of at least some of the component units that collided.

[0157] In this embodiment, the suture line is composed of a chain structure of multiple particle points, and every two adjacent particle points form a component unit. Every two component units that collide with each other are regarded as a collision pair, and each collision pair is added to a different collision group; if one of the collision units in a collision group is adjacent to one of the collision units in another collision group, the two collision groups will have a common particle point, and the two collision groups will be merged into one collision group; and so on, the collision groups corresponding to the adjacent collision units are merged, and the final merged collision group includes at least part of the adjacent and collided component units.

[0158] Furthermore, when the number of the finally fused collision groups is detected, it is determined whether at least some of the collision pairs meet the preset number; one or more collision groups that meet the preset number are used for subsequent looping detection, and the subsequent stitching simulation process is completed. For the collision groups that do not meet the preset number, they are classified as the first combination form.

[0159] See also Fig.15 As shown, the first embodiment of the suturing simulation device provided by the present application includes:

[0160] An acquisition module 151 is used to acquire a model of a suture line, wherein the model includes a plurality of chain-connected components, each of which includes at least one particle point; an iteration selection module 152 is used to identify the combination form between the components and select a preset iteration method corresponding to the combination form, wherein the combination form is used to indicate the non-chain connection relationship between the components at different suture stages; a calculation module 153 is used to calculate the motion parameters corresponding to at least some of the particle points in the model using position dynamics based on the selected preset iteration method; and a display module 154 is used to display the suture line based on the motion parameters.

[0161] Preferably, the combination form includes a first combination form and a second combination form, and the iteration selection module 152 is further used to: select a first preset iteration method corresponding to the first combination form, or select a second preset iteration method corresponding to the second combination form, wherein when the first preset iteration method is applied to the position dynamics to calculate the uncalculated motion parameters, the referenced calculated motion parameters belong to the same frame number; when the second preset iteration method is applied to the position dynamics to calculate the uncalculated motion parameters, the referenced calculated motion parameters belong to different frame numbers.

[0162] Preferably, the calculation module 153 is also used to: apply a first preset iterative method to the position dynamics, and calculate the motion parameters corresponding to at least some of the particle points in the model according to the preset first motion constraint; or, apply a second preset iterative method to the position dynamics, and calculate the motion parameters corresponding to at least some of the particle points in the model according to the preset second motion constraint; wherein the first motion constraint includes a constraint for independent motion control of each of the particle points, and the second motion constraint includes a constraint for independent motion control of each of the particle points, and a constraint for overall motion control of at least some of the particle points.

[0163] Preferably, the second motion constraint includes a bending constraint and a collision constraint, and the calculation module 153 is further used to: refer to the calculated motion parameters, calculate the uncalculated motion parameters according to the bending constraint and the collision constraint, wherein the bending constraint is used to perform independent motion control on each of the particle points, and the collision constraint is used to perform overall motion control on the particle points in the component unit that collides; perform weighted processing on the motion parameters calculated according to the bending constraint and the motion parameters calculated according to the collision constraint to obtain the final calculated motion parameters.

[0164] Preferably, the calculation module 153 is also used to: calculate the particle point velocity in the component unit where the collision occurs based on the calculated motion parameters; count the distribution of each particle point velocity, and / or count the difference between the average value of each particle point velocity and each particle point velocity; adjust each particle point velocity based on the distribution and / or the difference, and use the adjusted particle point velocity as the motion parameter calculated according to the collision constraint.

[0165] Preferably, the calculation module 153 is also used to: calculate the position information of the particle points in the colliding component units based on the calculated motion parameters, and determine the first distance between each two colliding component units based on the position information; based on the first distance, set the position correction amount between each two colliding component units when they are in a non-chain connection, and adjust the first distance according to the position correction amount; based on the adjusted first distance, update the position information, and use the updated position information as the motion parameter calculated according to the collision constraint.

[0166] Preferably, the iterative selection module 152 is also used for: performing collision detection at multiple scales between each of the component units to obtain a collision detection result; if the collision detection result is a collision, performing a loop detection on the component units that collided to obtain a loop detection result; if the loop detection result is a loop, then the component units are judged to be in the second combination form; if the collision detection result is that no collision occurs, or the loop detection result is that no loop is formed, then the component units are judged to be in the first combination form.

[0167] Preferably, the iterative selection module 152 is also used to: obtain the bounding box information of each of the component units, and map the bounding box information of each of the component units to a preset array; perform a first-scale collision detection between each of the component units according to the mapping of the bounding box information of each of the component units in the preset array; if the result of the first-scale collision detection is a preliminary collision, determine the directed distance between each two component units that have initially collided; compare the directed distance with the radial length and / or axial direction of the component unit; based on the comparison result, perform a second-scale collision detection between each two component units that have initially collided; and use the result of the second-scale collision detection as the final collision detection result.

[0168] Optionally, the iterative selection module 152 is also used to: determine the expansion plane of each component unit along its own movement direction, and determine the overlapping relationship between each expansion plane; according to the overlapping relationship, perform third-scale collision detection between each component unit; if the result of the third-scale collision detection is a preliminary collision, then in every two component units that have initially collided, the expansion plane of one of the component units is segmented, and the expansion boundary of the corresponding expansion plane of the other component unit is determined; determine the relative position relationship between each segmented expansion plane and the expansion boundary, and according to the relative position relationship, perform fourth-scale collision detection between every two component units that have initially collided; and use the result of the fourth-scale collision detection as the final collision detection result.

[0169] Preferably, the segmented expansion plane includes at least two segmentation planes, and the iterative selection module 152 is also used to: determine the distribution of the endpoints of the expansion boundary relative to each of the segmentation planes, and calculate the intersection between the expansion boundary and each of the segmentation planes based on the distribution; determine whether the distribution is on the opposite side of at least one of the two segmentation planes, and whether the intersection is inside at least one of the segmentation planes; based on the determination result, obtain the relative position relationship between each segmented expansion plane and the expansion boundary.

[0170] Preferably, the iterative selection module 152 is also used to: determine the sequential connection relationship between the colliding component units; based on the sequential connection relationship, detect: the number of particle points without collision, the kink situation, and / or the axial direction in the colliding component units; based on the number of particle points, the kink situation, and / or the axial direction, detect whether the colliding component units form a ring to obtain a ring detection result.

[0171] Preferably, the iterative selection module 152 is also used to: obtain a preset reference point; determine the second distance between the colliding component unit and the preset reference point, and compare the size of the second distance between each two colliding component units; based on the size comparison result, determine the relative lateral relationship between each two colliding component units; according to the sequential connection relationship, detect the change of each relative lateral relationship, and determine the kink in the colliding component unit according to the change.

[0172] Preferably, the iterative selection module 152 is further used to: determine the number of changes of each relative lateral relationship according to the change situation; determine the number of kinks of the component units that collide based on the number of changes to obtain the kink situation.

[0173] Preferably, the iterative selection module 152 is also used to: determine the preset point vectors between every two component units that collide, and determine the angle between every two preset point vectors corresponding to the sequential connection relationship; detect whether the angle meets the preset angle condition to determine the kink situation in the component units that collide.

[0174] Preferably, the iterative selection module 152 is also used to: extract at least two groups of chain-connected component units from the colliding component units according to the sequential connection relationship; respectively fit the main axis directions of the at least two groups of component units, and use the main axis directions as the axial directions in the colliding component units.

[0175] Preferably, the suturing simulation device also includes a fusion module 155, which is used to: add each two component units that collide with each other to a collision group, and determine whether there are identical particle points in each of the collision groups; if so, merge at least two collision groups with identical particle points, and the fused collision group includes a group of at least some of the component units that collided.

[0176] See also Fig.16 1 is a schematic diagram of the structure of a surgical simulator provided according to an embodiment of the present application. The surgical simulator provided in the embodiment of the present application includes a memory 161 and a processor 162. The memory 161 stores a computer program executable by the processor 162. When the computer program is executed by the processor 162, a suturing simulation method as in any embodiment of the present application is implemented.

[0177] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0178] It should be noted that other sorting schemes that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should also be within the protection scope of the present invention and will not be described in detail here.

[0179] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the mobile terminal can be divided into different functional units or modules to complete all or part of the functions described above. The functional modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the modules in the above-mentioned mobile terminal can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0180] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0181] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0182] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0183] As used in the specification of this application and the appended claims, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if the described condition or event is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce the described condition or event is detected" or "in response to detecting the described condition or event" depending on the context.

[0184] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0185] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0186] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0187] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0188] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design motion constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0189] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0190] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0191] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A suture simulation method, characterized in that: The suturing simulation method comprises: Acquire a model of a suture line, wherein the model includes a plurality of component units connected in a chain manner, and each of the component units includes at least one particle point; Determining the combination form between the component units, and selecting a preset iteration mode corresponding to the combination form, wherein the combination form is used to indicate the non-chain connection relationship between the component units at different stitching stages; Based on the selected preset iteration method, using position dynamics to calculate motion parameters corresponding to at least some of the particle points in the model; The suture line is displayed based on the motion parameter.

2. The suturing simulation method according to claim 1, characterized in that: The combination form includes a first combination form and a second combination form, and the preset iteration method corresponding to the selection of the combination form includes: Selecting a first preset iteration method corresponding to the first combination form, or selecting a second preset iteration method corresponding to the second combination form; Among them, when the first preset iteration method is applied to the position dynamics to calculate the uncalculated motion parameters, the referenced calculated motion parameters belong to the same frame number; when the second preset iteration method is applied to the position dynamics to calculate the uncalculated motion parameters, the referenced calculated motion parameters belong to different frame numbers.

3. The suturing simulation method according to claim 1, characterized in that: The method of calculating the motion parameters corresponding to at least some of the particle points in the model using position dynamics based on the selected preset iteration method includes: Applying a first preset iteration method to position dynamics, and calculating motion parameters corresponding to at least some of the particle points in the model according to a preset first motion constraint; or, Applying a second preset iteration method to the position dynamics, and calculating motion parameters corresponding to at least some of the particle points in the model according to a preset second motion constraint; The first motion constraint includes a constraint for independent motion control of each particle point, and the second motion constraint includes a constraint for independent motion control of each particle point and a constraint for overall motion control of at least some of the particle points.

4. The suturing simulation method according to claim 3, characterized in that: The second motion constraint includes a bending constraint and a collision constraint, and the calculation of the motion parameters corresponding to at least some of the particle points in the model according to the preset second motion constraint includes: Referring to the calculated motion parameters, the uncalculated motion parameters are calculated according to the bending constraint and the collision constraint, wherein the bending constraint is used to independently control the motion of each particle point, and the collision constraint is used to control the overall motion of the particle points in the component unit where the collision occurs; The motion parameters calculated according to the bending constraint and the motion parameters calculated according to the collision constraint are weighted to obtain the final calculated motion parameters.

5. The suturing simulation method according to claim 4, characterized in that: The collision constraint includes a velocity constraint, and referring to the calculated motion parameters, calculating the uncalculated motion parameters according to the collision constraint includes: Based on the calculated motion parameters, the particle point velocities in the component units where the collision occurs are calculated; Counting the distribution of the particle point velocities, and / or counting the difference between the average value of the particle point velocities and the particle point velocities; Based on the distribution and / or the difference, the velocity of each particle point is adjusted, and the adjusted particle point velocity is used as a motion parameter calculated according to the collision constraint.

6. The suturing simulation method according to claim 4, characterized in that: The collision constraint includes a position constraint, and referring to the calculated motion parameters, calculating the uncalculated motion parameters according to the collision constraint includes: Calculate the position information of the particle points in the component units where the collision occurs based on the calculated motion parameters, and determine the first distance between every two component units where the collision occurs based on the position information; Based on the first distance, setting a position correction amount between each two component units that collide when they are in a non-chain connection, and adjusting the first distance according to the position correction amount; Based on the adjusted first distance, the position information is updated, and the updated position information is used as the motion parameter calculated according to the collision constraint.

7. The suturing simulation method according to claim 1, characterized in that: The determining of the combination form between the component units comprises: Performing collision detection at multiple scales between the component units to obtain collision detection results; If the collision detection result is that a collision occurs, a loop detection is performed on the component units where the collision occurs to obtain a loop detection result; If the loop detection result is a loop, the component units are judged to be in a second combination form; If the collision detection result is that no collision occurs, or the loop detection result is that no loop is formed, the component units are determined to be in the first combination form.

8. The suturing simulation method according to claim 7, characterized in that: The performing collision detection at multiple scales between the component units to obtain the collision detection results includes: Obtaining bounding box information of each of the component units, and mapping each of the bounding box information into a preset array; According to the mapping of each of the bounding box information in the preset array, performing first-scale collision detection between each of the component units; If the result of the first scale collision detection is that a preliminary collision occurs, determining a directed distance between each two component units that have initially collided; comparing the directed distance with the radial length and / or axial direction of the constituent unit; Based on the comparison result, performing a second-scale collision detection between each two component units that have initially collided; The result of the second-scale collision detection is taken as the final collision detection result.

9. The suturing simulation method according to claim 7, characterized in that: The performing collision detection at multiple scales between the component units to obtain the collision detection results includes: Determine the expansion plane of each component unit along its own movement direction, and determine the overlapping relationship between the expansion planes; According to the overlapping relationship, performing a third-scale collision detection between the component units; If the result of the third scale collision detection is that a preliminary collision occurs, then in every two component units that have initially collided, the expansion plane of one component unit is split, and the expansion boundary of the corresponding expansion plane of the other component unit is determined; Determine the relative position relationship between each segmented extended plane and the extended boundary, and perform fourth-scale collision detection between each two component units that initially collide according to the relative position relationship; The result of the fourth-scale collision detection is taken as the final collision detection result.

10. The suturing simulation method according to claim 9, characterized in that: The divided extended plane includes at least two divided planes, and the determining of the relative position relationship between each divided extended plane and the extended boundary includes: Determining the distribution of the endpoints of the extended boundary relative to each of the segmentation planes, and calculating the intersection points between the extended boundary and each of the segmentation planes according to the distribution; Determine whether the distribution is on the opposite side of at least one of the two segmentation planes, and whether the intersection point is inside the at least one segmentation plane; Based on the result of the discrimination, the relative position relationship between each segmented extended plane and the extended boundary is obtained.

11. The suturing simulation method according to claim 8, characterized in that: The loop detection is performed on the colliding component units to obtain the loop detection result, which includes: Determine the sequential connection relationship between the components that collide; According to the sequential connection relationship, detecting the number, kink condition, and / or axial direction of particle points without collision in the component units where collision occurs; Based on the number of the particle points, the kink condition, and / or the axial direction, it is detected whether the colliding component units form a ring, and a ring detection result is obtained.

12. The suturing simulation method according to claim 11, characterized in that: According to the sequential connection relationship, detecting the kink in the colliding component units includes: Get preset reference points; Determine a second distance between the component unit that collides and the preset reference point, and compare the second distance between every two component units that collide; Based on the comparison result of the sizes, determining the relative lateral relationship between each two component units that collided; According to the sequential connection relationship, the change of each relative lateral relationship is detected, and the kink condition in the component unit where the collision occurs is determined according to the change.

13. The suturing simulation method according to claim 12, characterized in that: Determining the kink condition in the component unit where the collision occurs according to the change condition comprises: Determining the number of changes of each of the relative lateral relationships according to the change conditions; The kink times of the component units that collide are determined based on the number of changes to obtain the kink situation.

14. The suturing simulation method according to claim 11, characterized in that: According to the sequential connection relationship, detecting the kink in the colliding component units includes: Determine the preset point vector between every two component units that collide, and determine the angle between every two preset point vectors corresponding to the sequential connection relationship; It is detected whether the angle meets a preset angle condition to determine the kink condition in the component unit where the collision occurs.

15. The suturing simulation method according to claim 11, characterized in that: According to the sequential connection relationship, detecting the axial direction in the component unit where the collision occurs includes: According to the sequential connection relationship, extract at least two groups of chain-connected component units from the colliding component units; The main axis directions of the at least two groups of component units are fitted respectively, and the main axis directions are used as the axial directions in the component units where the collision occurs.

16. The suturing simulation method according to any one of claims 5 to 15, characterized in that: The suture simulation method also includes: Each two component units that collide with each other are added to a collision group, and it is determined whether there are the same particle points in each collision group; If so, at least two collision groups with the same particle points are merged, and the merged collision group includes at least part of the component units that collided.

17. A surgical simulator, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores computer program instructions, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the suture simulation method according to any one of claims 1 to 16.

18. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the suture simulation method according to claims 1-16 are implemented.