Osteotomy plane boundary control method, electronic device and storage medium
By calculating the distance from the center point of the osteotomy saw to the boundary line during knee replacement surgery, performing step-by-step search and safe position determination, the problems of soft tissue and ligament damage and reduced surgical accuracy caused by the excessive range of motion of the osteotomy saw are solved, and accurate and safe osteotomy operations are achieved.
Patent Information
- Application Number
- CN202311329849.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-10-13
AI Technical Summary
In the prior art, the excessive range of motion of the osteotomy saw during knee replacement surgery can lead to soft tissue and ligament damage and reduced surgical accuracy.
By calculating the distance between the center point of the osteotomy saw and the boundary line of the osteotomy plane, the weighted sum of the inward vectors of the two sides with the shortest distance is selected as the search direction, and a step-by-step search is performed to determine the safe position of the end of the osteotomy saw. The robot arm is then used for precise control to ensure the safe movement of the surgical tool in the irregular plane.
It improves the accuracy and success rate of knee replacement surgery, reduces the burden on doctors, protects patients' soft tissues and ligaments from injury, and ensures the safety and precision of surgery.
Smart Images

Figure CN119818146B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an osteotomy plane boundary control method, electronic equipment and storage medium. Background Art
[0002] The human knee joint, composed of the articular surfaces of the femur, tibia, and patella, connects the femur and tibia and is one of the most heavily stressed joints in the body. When severe knee diseases such as osteoarthritis, rheumatoid arthritis, and traumatic arthritis develop, the knee joint cannot function normally and requires a knee replacement. This procedure replaces the affected area (including the femur, tibia, and meniscus) with an artificial prosthesis to relieve joint pain, correct deformities, restore and improve joint motion, and enhance the patient's quality of life.
[0003] The surface of the human knee joint is covered with cartilage. With age, the cartilage gradually wears away, and the bones and ligaments surrounding the knee joint also degenerate, ultimately causing knee pain, deformity, and mobility problems. Many people misunderstand that knee replacement surgery involves replacing the entire knee. However, this is not the case. Knee replacement surgery primarily replaces the cartilage on the surface of the knee joint, which has become worn and pitted, with a metal prosthesis and a wear-resistant polyethylene gasket.
[0004] Types of knee replacements include total knee arthroplasty (TKA) and unicompartmental knee arthroplasty (UKA).
[0005] Take total knee arthroplasty (TKA) as an example. It refers to the surgery to replace the knee joint deformed by osteoarthritis or rheumatoid arthritis with artificial materials (such as attached Figure 1 It is an effective surgical method for treating end-stage knee osteoarthritis caused by various reasons.
[0006] The steps of a total knee arthroplasty (TKA) typically include patient positioning, skin incision, knee joint exposure, tibial pull-out to remove dislocation, soft tissue release, removal of surrounding osteophytes, femoral osteotomies in five planes (anterior condyle, anterior oblique, distal, posterior oblique, and posterior condyle), tibial osteotomies, femoral prosthesis installation, tibial prosthesis implantation, tibial spacer installation, adjustments, and suturing. Of these steps, femoral and tibial osteotomies require relatively high technical skill from the surgeon, requiring precise osteotomy in the defined position and posture to ensure the resulting joint cross-section conforms to the surgical plan, maintains a well-balanced flexion-extension gap, and restores accurate lower limb force alignment. A perfect osteotomy not only alleviates postoperative pain and improves knee function, but also prevents dislocation of the implant, reduces notching (a common complication after TKA surgery, where the distance between the distal tangent of the anterior femoral cortex and the tangent line of contact between the implant and the femur is greater than 1 mm), and prolongs the lifespan of the implant. Therefore, the femoral and tibial osteotomies are crucial for the success of the entire procedure.
[0007] In traditional knee replacement surgery, osteotomies of the femur and tibia are performed manually using a handheld oscillating osteotomy saw. This manual operation reduces the accuracy of the osteotomy plane, potentially damaging the patient's soft tissue and ligaments, and reducing the overall effectiveness of the surgery. Furthermore, the high cutting reaction force places a significant burden on the surgeon.
[0008] Other methods for ensuring planar osteotomy accuracy and boundary constraints include the use of osteotomy guides or four-in-one guides. After the knee joint is exposed, the osteotomy guide or guide is fixed to the femur or tibia with Kirschner wires, and the osteotomy is performed using a handheld oscillating osteotomy saw. This method requires additional nailing of the patient's bones, making the surgical process more cumbersome. Furthermore, the manually controlled oscillating osteotomy saw cannot completely protect the patient's soft tissues and ligaments.
[0009] In robot-assisted knee replacement surgery, a robotic arm can assist the doctor in interactive osteotomy of the femur and tibial planes. The robotic arm drives the osteotomy oscillating saw, and the doctor triggers the tool power to complete the osteotomy process in a controlled manner. This not only improves the accuracy of plane osteotomy, but also greatly reduces the doctor's physical exertion while improving the surgical effect. However, during the process of osteotomy of the femur and tibial planes in robot-assisted knee replacement surgery, the position of the osteotomy oscillating saw within the osteotomy plane needs to be subject to certain boundary restrictions to prevent soft tissue and ligament damage and reduced surgical accuracy caused by excessive range of motion. In the prior art, since the robot's osteotomy oscillating saw cannot be confined within the osteotomy plane, soft tissue and ligament damage and reduced surgical accuracy are often caused by the excessive range of motion of the osteotomy oscillating saw. Summary of the Invention
[0010] The purpose of the present invention is to overcome the above-mentioned technical deficiencies and provide an osteotomy plane boundary control method, electronic device and storage medium to solve the technical problems in the related art such as soft tissue and ligament damage and reduced surgical accuracy caused by the excessive motion range of the osteotomy oscillating saw.
[0011] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0012] According to a first aspect of the present invention, a method for controlling an osteotomy plane boundary is provided, comprising:
[0013] Step S1, calculating the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, selecting the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and performing a step-by-step search;
[0014] Step S2: after each step search is completed, the search point coordinates are updated, and based on the updated search coordinates, the arc trajectory of the osteotomy saw tip when it is within the boundary line of the osteotomy plane is determined;
[0015] Step S3, determine whether the arc trajectory intersects with the boundary line of the osteotomy plane. If not, complete the search, output the current search coordinate point as the safe coordinate of the center point of the osteotomy saw, and jump to step S4; if so, return to step S1 to recalculate the search direction and perform a step-by-step search;
[0016] Step S4: Calculate the arc trajectory planned for this cycle based on the safety coordinates and the planned direction vector of the osteotomy saw;
[0017] Step S5, determine whether the arc trajectory planned in the previous cycle will intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle. If it intersects, calculate the movement vector of the arc trajectory planned in the previous cycle when it is translated to the intersection position, and output the safety coordinates of the center point of the osteotomy oscillating saw planned in the previous cycle and the sum of the movement vector as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle; if it does not intersect, output the current search coordinate point as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle.
[0018] According to a second aspect of the present invention, there is provided an osteotomy plane boundary control device, comprising:
[0019] A search module is used to calculate the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, select the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and perform a step-by-step search;
[0020] A determination module is used to update the search point coordinates after each step search is completed, and determine the arc trajectory when the end of the osteotomy oscillating saw is within the boundary line of the osteotomy plane based on the updated search coordinate points;
[0021] a judgment module for judging whether the arc trajectory intersects with the boundary line of the osteotomy plane; if not, completing the search and outputting the current search coordinate point as the safe coordinate of the center point of the osteotomy saw to the calculation module; if so, returning to the search module to recalculate the search direction and perform a step-by-step search;
[0022] A calculation module, configured to calculate the arc trajectory planned for this cycle based on the safety coordinates and the planned direction vector of the osteotomy saw;
[0023] The output module is used to determine whether the arc trajectory planned in the previous cycle will intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle. If it intersects, the movement vector of the arc trajectory planned in the previous cycle when it is translated to the intersection position is calculated, and the safety coordinates of the center point of the osteotomy oscillating saw planned in the previous cycle and the sum of the movement vector are output as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle; if they do not intersect, the current search coordinate point is output as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle.
[0024] According to a third aspect of the present invention, there is provided an electronic device, comprising:
[0025] A processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0026] Memory for storing computer programs;
[0027] The processor is used to implement the above method when executing the program stored in the memory.
[0028] According to a fourth aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the above method.
[0029] The technical solutions provided by the embodiments of the present invention may have the following beneficial effects:
[0030] By calculating the distance from the center point of the osteotomy saw to the boundary of the osteotomy plane, the weighted sum of the inward vectors of the two shortest edges is selected as the search direction. A step-by-step search is then performed to quickly find a safe position closest to the plane boundary (i.e., matching the desired motion direction and posture) and within the plane boundary. This safe position is then transmitted to the robotic arm, driving the surgical tool to move, thereby helping the surgeon accurately and safely perform femoral and tibia osteotomies. This solves the technical problem in existing technologies of soft tissue and ligament damage and reduced surgical precision caused by the excessive range of motion of the osteotomy saw.
[0031] When the technical solution provided by the present invention is applied to a knee replacement surgical robot, it can accurately and easily assist doctors in performing osteotomy operations during knee replacement surgery, while ensuring the boundary safety of the oscillating saw, improving the accuracy and success rate of knee replacement surgery, and reducing the burden on doctors.
[0032] By applying the technical solution provided by the present invention, when a doctor performs a planar osteotomy on a patient's femur or tibia, and when the doctor needs to dynamically adjust the position of the osteotomy saw within the plane, the robotic arm can limit the doctor's dynamic adjustment safety area, protecting the patient's posterior cruciate ligament and medial and lateral collateral ligaments from damage, thereby ensuring the safety of the planar osteotomy operation.
[0033] Furthermore, when the osteotomy plane is concave-convex or otherwise irregular, the boundary control method provided by this invention takes into account the physical model of the actual distal end translation during osteotomy operation, minimizing algorithmic error. Not only does the planning layer control the position of the surgical tool within the plane boundary, but it also considers the trajectory during actual execution, further correcting the plan to ensure that the surgical tool remains within the irregular plane boundary during control.
[0034] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flow chart of total knee arthroplasty (TKA) according to background art;
[0036] Figure 2 is a flow chart of a method for controlling an osteotomy plane boundary according to an exemplary embodiment;
[0037] Figure 3 is a schematic diagram of a partial system structure of a knee replacement surgical robot according to an exemplary embodiment;
[0038] Figure 4 is a schematic diagram of a control model of an end portion of an osteotomy oscillating saw according to an exemplary embodiment;
[0039] Figure 5 is a schematic diagram of an osteotomy plane boundary according to an exemplary embodiment;
[0040] Figure 6 is a schematic diagram of osteotomy plane boundary control according to an exemplary embodiment;
[0041] Figure 7 is a schematic diagram of a search process in a screenshot plane boundary control method according to another exemplary embodiment;
[0042] Figure 8 is a schematic diagram showing the calculation of the distance from the center point of an osteotomy oscillating saw to any boundary line and the coordinates of the closest point according to an exemplary embodiment;
[0043] Figure 9 is a schematic diagram of a calculation for determining whether the center point of an osteotomy oscillating saw is located within a boundary line set according to an exemplary embodiment;
[0044] Figure 10 is a schematic diagram of a vector rotation direction calculation algorithm according to an exemplary embodiment;
[0045] Figure 11 is a schematic diagram of an algorithm for intersection of a line segment and a circular arc trajectory according to an exemplary embodiment;
[0046] Figure 12 is a schematic diagram of an algorithm for translating an arc trajectory within a boundary according to an exemplary embodiment;
[0047] Figure 13 is a schematic block diagram of an osteotomy plane boundary control device according to an exemplary embodiment;
[0048] Figure 14 It is a schematic block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0050] As described in the background art above, the related art has technical problems such as soft tissue and ligament damage and reduced surgical accuracy due to the excessive range of motion of the osteotomy oscillating saw.
[0051] In order to effectively solve the problems in the related art, the present invention provides an osteotomy plane boundary control method, electronic device and storage medium, which are described in detail below.
[0052] It should be noted that the “connection lines” mentioned in the following embodiments (such as boundary lines, lines between left and right endpoints) include but are not limited to: line segments, broken lines, curves, etc.
[0053] Example 1
[0054] Figure 2 is a flow chart showing a method for controlling the boundary of an osteotomy plane according to an exemplary embodiment. Figure 2 , the method comprising:
[0055] Step S1, calculating the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, selecting the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and performing a step-by-step search;
[0056] Step S2: after each step search is completed, the search point coordinates are updated, and based on the updated search coordinates, the arc trajectory of the osteotomy saw tip when it is within the boundary line of the osteotomy plane is determined;
[0057] Step S3, determine whether the arc trajectory intersects with the boundary line of the osteotomy plane. If not, complete the search, output the current search coordinate point as the safe coordinate of the center point of the osteotomy saw, and jump to step S4; if so, return to step S1 to recalculate the search direction and perform a step-by-step search;
[0058] Step S4: Calculate the arc trajectory planned for this cycle based on the safety coordinates and the planned direction vector of the osteotomy saw;
[0059] Step S5, determine whether the arc trajectory planned in the previous cycle will intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle. If it intersects, calculate the movement vector of the arc trajectory planned in the previous cycle when it is translated to the intersection position, and output the safety coordinates of the center point of the osteotomy oscillating saw planned in the previous cycle and the sum of the movement vector as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle; if it does not intersect, output the current search coordinate point as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle.
[0060] It should be noted that the technical solution provided in this embodiment, in specific practice, runs in the controller of the medical device, or is loaded into an electronic device connected to the controller and runs. The controller of the medical device executes the corresponding method by calling the program stored in the electronic device.
[0061] Specifically, the medical device can be an orthopedic surgical robot, which can be used in procedures including, but not limited to, knee replacement surgery. The method can be applied to osteotomy plane boundary control in total knee arthroplasty (TKA) and unicompartmental knee arthroplasty (UKA), or can be extended to control the boundary of plane positions in any surgical procedure.
[0062] It is understood that the technical solution provided by this embodiment calculates the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, selects the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and performs a step-by-step search to quickly find a safe position closest to the plane position boundary (i.e., matching the desired movement direction and posture) and within the plane boundary. This safe position is then transmitted to the robotic arm, driving the surgical tool to move, thereby helping the surgeon accurately and safely perform femoral and tibia osteotomies. This solves the technical problem in the prior art of soft tissue and ligament damage and reduced surgical precision caused by the excessive range of motion of the osteotomy saw.
[0063] When the technical solution provided in this embodiment is applied to a knee replacement surgical robot, it can accurately and easily assist doctors in performing osteotomy operations during knee replacement surgery, while ensuring the boundary safety of the oscillating saw, improving the accuracy and success rate of knee replacement surgery, and reducing the burden on doctors.
[0064] In order to further solve the problem of possible jumps in the safe position inside the osteotomy plane during the continuous control cycle, the end model of the pendulum may cross the Figure 6 As shown in the case of the top concave boundary, the algorithm further performs boundary judgment based on the safe position planned in the previous cycle and the safe position obtained in this step search, ensuring that the safe position finally output by the algorithm controls the pendulum end model to always be within the safe boundary of the osteotomy plane during actual execution.
[0065] Furthermore, when the osteotomy plane is concave-convex or otherwise irregular, the boundary control method provided by this invention takes into account the physical model of the actual distal end translation during osteotomy operation, minimizing algorithmic error. Not only does the planning layer control the position of the surgical tool within the plane boundary, but it also considers the trajectory during actual execution, further correcting the plan to ensure that the surgical tool remains within the irregular plane boundary during control.
[0066] See also Figure 3 , a knee replacement surgical robot may include: motion control PC, robotic arm, six-dimensional force sensor, tool (osteotomy oscillating saw) and optical positioning sensor.
[0067] See also Figure 3A six-dimensional force sensor is mounted at the end of the robotic arm, and the sensor's force-sensing end is fixedly connected to the osteotomy saw. During surgery, the surgeon interacts directly with the saw. The motion control PC then senses the surgeon's interaction force based on the six-dimensional force sensor and controls the robotic arm's dynamics based on the specific magnitude of that interaction force, enabling controlled interactive movement of the saw within the osteotomy plane. The optical positioning sensor is responsible for real-time sensing of the relative position of the patient and the tool, enabling the motion control PC to calculate and update the planar pose information in real time.
[0068] It can be understood that, by applying the technical solution provided in this embodiment, when a doctor performs a planar osteotomy on a patient's femur or tibia, when the doctor needs to dynamically adjust the position of the osteotomy saw within the plane, the robotic arm can limit the doctor's dynamic adjustment safety area, protecting the patient's posterior cruciate ligament and medial and lateral collateral ligaments from injury, thereby ensuring the safety of the planar osteotomy operation.
[0069] Figure 4 This is a schematic diagram of the end control model of the osteotomy oscillating saw, see Figure 4 , is the direction vector of the swing saw, is the coordinate of the end point when the swing saw is in the neutral position, The end control model can be regarded as an arc Arc, whose parameter r is the arc radius, and its parameter is the center of the arc, and its parameters The angles between the left and right extreme endpoints of the arc and the X axis are respectively. , direction vector When determining, the arc Arc and its parameters can be uniquely determined according to the mechanical structure of the oscillating saw.
[0070] Figure 5 Schematic diagram of the osteotomy plane boundary, see Figure 5 , in the osteotomy plane, is the boundary point, The starting and ending boundary points extend infinitely backward along the starting and ending boundary segments, connecting at infinity to form a planar position boundary. The polygon formed by the boundary segment can have any concave or convex shape; the method proposed in this embodiment does not impose any restrictions on the concave or convex nature of the boundary.
[0071] Figure 6 This is a schematic diagram of the osteotomy plane boundary control, see Figure 6 , in the osteotomy plane, The position of the osteotomy saw planned by the doctor's operating force (may exceed the boundary), This is the safe position for the osteotomy saw (ensuring it is within the boundaries). This safe position controls the movement of the saw tip within the plane position boundaries in the osteotomy plane, ensuring that the osteotomy task is completed without damaging the patient's posterior cruciate ligament and medial and lateral collateral ligaments, thereby improving surgical safety and the patient's postoperative recovery.
[0072] In practice, see Figure 7 , the step S1 comprises:
[0073] Step S11: Obtain the planned coordinates of the center point of the osteotomy saw , the planned direction vector of the osteotomy saw , the boundary point set of the osteotomy plane , the boundary line set composed of the boundary point set , single step amount ;
[0074] Step S12: traverse the boundary line set For each boundary line in , calculate the center point of the osteotomy saw To each boundary line distance , and, the coordinates of the nearest point ;
[0075] Step S13: Calculate the center point of the osteotomy saw To the boundary line Distance, find the index number of the two boundary lines with the shortest distance ;
[0076] Step S14: Determine the center point of the osteotomy saw Is it located in the boundary line set? If yes, then initialize the search coordinate point to be equal to the planning coordinate of the center point of the osteotomy saw Otherwise, the initial search coordinate point is equal to the coordinate of the nearest point on the boundary line with the shortest distance ;
[0077] Step S15: Calculate search direction ,in Represented by the boundary line set The direction vector (unit vector) pointing to the boundary; Perform normalization operation to normalize it to a unit vector.
[0078] In specific practice, step S2 includes:
[0079] Step S21: Perform step search along the search direction, and after each step search is completed, update the search coordinate point to the sum of the original search coordinate point and the step amount in the search direction. ;
[0080] Step S22: Search the updated coordinate points , the planned direction vector of the osteotomy oscillating saw , determine the arc trajectory when the end of the osteotomy oscillating saw is within the boundary line of the osteotomy plane.
[0081] In specific practice, step S3 includes:
[0082] Step S31: traverse the boundary link set For each boundary line in , calculate the arc trajectory and each boundary line Do they intersect? If not, the search is completed and the current search coordinate point is output as the safe coordinate of the center point of the osteotomy saw. ; If they intersect, proceed to the next step;
[0083] Step S32: traverse the boundary link set For each boundary line in , calculate the current search coordinate point To each boundary line distance , and, the coordinates of the nearest point ;
[0084] Step S33: traverse the current search coordinate point The distance to the boundary line, find the index number of the two boundary lines with the shortest distance , return to step S15.
[0085] In actual practice, the maximum number of step searches can be controlled by adjusting the step size (usually controlling the step size to be greater than 1 / 20 and less than 1 / 10 of the width between the left and right limits of the osteotomy saw) to constrain the search time and ensure the execution time of the algorithm.
[0086] The above-mentioned position boundary control method can ensure that when the position of the surgical tool planned by the doctor's operating force exceeds the boundary, the position is corrected within the boundary range and conforms to the position in the desired direction to control the movement of the robotic arm and adapt to the doctor's operation.
[0087] In practice, see Figure 8 The step S12 calculates the distance from the center point of the osteotomy saw to each boundary line, and the coordinates of the nearest point, including:
[0088] For any boundary line, determine the positional relationship between the center point of the osteotomy saw and the boundary line;
[0089] If the projection of the center point of the osteotomy saw on the boundary line falls on the left extension line of the boundary line (in this case, the position of the center point of the osteotomy saw is as follows Figure 8 The coordinates of the left end point Pa of the boundary line are determined as the coordinates of the closest point, and the distance between the center point P1 of the osteotomy oscillating saw and the left end point Pa is the distance from the center point of the osteotomy oscillating saw to the boundary line;
[0090] If the projection of the center point of the osteotomy saw on the boundary line falls on the right extension line of the boundary line (in this case, the position of the center point of the osteotomy saw is as follows Figure 8 The coordinates of the right end point Pb of the boundary line are determined as the coordinates of the closest point, and the distance between the center point P3 of the osteotomy oscillating saw and the right end point Pb is the distance from the center point of the osteotomy oscillating saw to the boundary line;
[0091] If the projection of the center point of the osteotomy saw falls on the boundary line (in this case, the position of the center point of the osteotomy saw is as follows Figure 8 The distance between the center point P2 of the osteotomy saw and the projection point is the distance from the center point of the osteotomy saw to the boundary line.
[0092] See also Figure 8 For any boundary line, determining the positional relationship between the center point of the osteotomy oscillating saw and the boundary line includes:
[0093] The left endpoint Pa of the boundary line is determined as the starting point of the vector, and the vector direction of the boundary line is from the left endpoint Pa to the right endpoint Pb;
[0094] Calculate the left end point Pa and the center point P of the osteotomy saw (P may be 、 、 The projection of the line vector between the two points in the vector direction of the boundary line;
[0095] If the length of the projection is less than or equal to 0, it is determined that the projection of the osteotomy saw center point P on the boundary line falls on the left extension line of the boundary line;
[0096] If the length of the projection is greater than 0 and less than or equal to the vector length d of the boundary line, it is determined that the projection of the osteotomy saw center point P on the boundary line falls on the boundary line;
[0097] If the length of the projection is greater than the vector length d of the boundary line, it is determined that the projection of the osteotomy saw center point P on the boundary line falls on the right extension line of the boundary line.
[0098] The above is expressed as follows: Assuming the center point of the osteotomy saw is P ( 、 、 ), the boundary line is connected by point 、 The line segments are composed of points The nearest point , calculated using the following formula:
[0099]
[0100] in,
[0101]
[0102]
[0103]
[0104] Point To point 、 The shortest distance of the composed line segments is calculated using the following formula:
[0105]
[0106] In practice, see Figure 9 In step S14, determining whether the center point of the osteotomy saw is located within the boundary line set includes:
[0107] Step S141: Generate a ray from the center point P of the osteotomy saw to infinity along any direction. ;
[0108] Step S142: traverse the boundary point set For each boundary point in , determine the ray Whether it passes through the border point , if yes, return to step S141, otherwise, proceed to the next step;
[0109] Step S143: traverse the boundary link set For each boundary line in , determine the ray Is it connected to the boundary? If yes, return to step S141, otherwise, proceed to the next step;
[0110] Step S144: traverse the boundary link set For each boundary line in Connected to the boundary Number of intersection points ;
[0111] Step S145: If the number of intersections If it is an odd number, it is determined that the center point P of the osteotomy saw is located within the boundary line set. ; If the number of intersections If it is an even number, it is determined that the osteotomy saw center point P is outside the boundary line set. .
[0112] It should be noted that, in practical applications, a ray can be equivalent to a line segment between the ray starting point and a point at infinity in the ray direction, and the ray-line segment intersection calculation in S14 can be converted into line segment intersection detection.
[0113] In specific practice, the step S31 of traversing each boundary line in the boundary line set and calculating whether the arc trajectory intersects each boundary line includes:
[0114] For any boundary line, determine whether the radius of the circle where the arc trajectory is located is greater than the straight-line distance from the center of the circle to the boundary line. If so, determine that the circle where the arc trajectory is located has no intersection with the boundary line; otherwise, determine that the circle where the arc trajectory is located has an intersection with the boundary line;
[0115] If it is determined that the circle where the arc trajectory is located has an intersection with the boundary line, determining whether the intersection is on the boundary line;
[0116] If both intersection points are outside the boundary line, it is determined that the arc trajectory has no intersection with the boundary line; if one intersection point is on the boundary line and the other is outside the boundary line, it is determined that the circle where the arc trajectory is located has one intersection with the boundary line; if both intersection points are on the boundary line, it is determined that the circle where the arc trajectory is located has two intersections with the boundary line;
[0117] If it is determined that the circle where the arc trajectory lies has one intersection with the boundary line, or if it is determined that the circle where the arc trajectory lies has two intersections with the boundary line, for each intersection, calculate the four-quadrant inverse tangent function of the direction vector from the center of the circle to the intersection point;
[0118] If the value of the four-quadrant inverse tangent function is between the left limit angle and the right limit angle of the arc trajectory, it is determined that the arc trajectory intersects the boundary line; otherwise, it is determined that the arc trajectory does not intersect the boundary line.
[0119] See also Figure 11 , assuming that the current boundary line is line segment ab, calculating whether the arc trajectory intersects each boundary line includes:
[0120] 1) Use the following formula to determine whether the circle radius r is greater than the distance from the center of the circle to the straight line :
[0121] The direction vector of the line segment ab is:
[0122] The direction vector from the endpoint a of line segment ab to the center c is:
[0123] The unit vector of line segment ab is:
[0124] The direction vector from the endpoint a of line segment ab to the foot h is:
[0125] The distance between the center c and the foot h of the perpendicular is:
[0126] like If it is greater than the arc radius r, then the arc Arc has no intersection with the line segment ab;
[0127] like If it is smaller than the arc radius r, perform calculation 2).
[0128] 2) Use the following formula to determine whether there is an intersection point f (f represents Figure 11 Any intersection point ):
[0129] The distance between the foot of the perpendicular h and any intersection point f is:
[0130] The endpoint a of line segment ab points to the intersection point The direction vector is:
[0131] The endpoint a of line segment ab points to the intersection point The direction vector is:
[0132] point 、 There are two intersection points between the straight line and the circle. For each intersection point f
[0133]
[0134] If two points 、 If both are outside the line segment ab, then the arc Arc has no intersection with the line segment ab;
[0135] like 、 If one of them is on line segment ab and the other is outside line segment ab, then the circle and line segment ab have an intersection point, and we can proceed to calculation 3);
[0136] like 、 All of them are located on line segment ab, so the circle and line segment ab have two intersection points, and the calculation in 3) is performed.
[0137] 3) Use the following formula to determine whether the intersection point f is on the arc Arc:
[0138] No matter how many intersections the line segment ab has with the circle, for each intersection point f is calculated in the following calculation:
[0139] The direction vector from the center c to the intersection point f:
[0140] The four-quadrant inverse tangent function of the intersection point f:
[0141] in, Represents the four-quadrant inverse tangent function.
[0142] .
[0143] See also Figure 12 In specific practice, step S5 includes:
[0144] Step S51: the arc trajectory planned in the previous cycle and its parameters ( ) to perform uniform n-point interpolation (n ≥ 1) to obtain a uniform point set distributed sequentially on the arc trajectory planned in the previous cycle , storing the uniform point set as a first uniform point set;
[0145] Step S52: Plan the arc trajectory for this cycle And its parameters are uniformly interpolated at n points (n ≥ 1) to obtain a uniform point set distributed sequentially on the arc trajectory of this cycle planning , storing the uniform point set as a second uniform point set;
[0146] Step S53: According to the first uniform point set and the second uniform point set , get the line segment set when the arc trajectory planned in the previous cycle is translated to the arc trajectory position planned in this cycle ;
[0147] Step S54: traverse the boundary link set Each boundary line in ) and the line segment set Each line segment in ), calculate whether the boundary line and the line segment intersect, if so, mark the intersection and calculate the intersection coordinates, and calculate the motion vector of each point in the first uniform point set to the intersection position according to the intersection coordinates and the coordinates of the points in the first uniform point set, and generate a motion vector set (i.e., judge one by one and Do they intersect? If so, set the intersection flag to true and find the intersection point. , calculate the motion vector , get the moving vector set D);
[0148] Step S55: If there is an intersection mark, traverse the motion vector set and determine the motion vector corresponding to the minimum vector module length in the motion vector set as the motion vector when the arc trajectory planned in the previous cycle is translated to the intersection position (i.e., traverse the vector set). ,Pick , find the minimum vector modulus Corresponding serial number , the moving vector to the nearest intersection boundary =true, return );
[0149] Step S56: If there is no intersection mark, it is determined that the arc trajectory planned in the previous cycle will not intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle (that is, if the flag is not set to true, the arc trajectory does not intersect with the boundary line during movement, and the output flag = false).
[0150] In specific practice, the calculation of whether the boundary line and the line segment intersect includes:
[0151] For any boundary line and any line segment, calculate the first rotation direction between the line vector between the right endpoint of the boundary line and the left endpoint of the line segment and the line vector between the right endpoint and the left endpoint of the boundary line;
[0152] Calculate the second rotation direction between the line vector between the right endpoint of the boundary line and the right endpoint of the line segment, and the line vector between the right endpoint and the left endpoint of the boundary line;
[0153] If the product of the first rotation direction and the second rotation direction is greater than 0, it is determined that the boundary line does not intersect the line segment.
[0154] For any boundary line and any line segment, calculate the third rotation direction between the line vector between the right endpoint of the line segment and the left endpoint of the boundary line and the line segment vector;
[0155] Calculate the fourth rotation direction between the line vector between the right endpoint of the line segment and the right endpoint of the boundary line and the line segment vector;
[0156] If the product of the third rotation direction and the fourth rotation direction is greater than 0, it is determined that the boundary line does not intersect the line segment.
[0157] Furthermore, the calculation of the intersection coordinates includes:
[0158] For any boundary line and any line segment, calculate the relative distance between the intersection point and any endpoint on the boundary line according to the first rotation direction, the third rotation direction, and the fourth rotation direction;
[0159] The sum of the endpoint coordinates and the relative distance is determined as the intersection coordinates.
[0160] In order to facilitate understanding of the calculation process of whether the boundary line and the line segment intersect, and the calculation process of the intersection coordinates, now take the left endpoint of any line segment as and the right endpoint of the line segment is , the left endpoint of any boundary line is , the right endpoint is For example, see Figure 9 , the explanation is as follows:
[0161] set up is a function that characterizes the direction of vector rotation, point 、 Composed of line segments, points 、 To form line segments, the following algorithm can be used to quickly determine whether two line segments intersect:
[0162]
[0163] in,
[0164]
[0165]
[0166]
[0167]
[0168]
[0169] See also Figure 10 , The function is defined as:
[0170] Two vectors 、 The direction of rotation is calculated as follows:
[0171]
[0172] in,
[0173]
[0174] It is a floating point number, usually 0.000001.
[0175] When two line segments intersect, the intersection point can be calculated coordinate:
[0176]
[0177] .
[0178] It can be understood that the technical solution provided in this embodiment, through the boundary control of the osteotomy plane, can ensure that when the position of the surgical tool planned by the doctor's operating force exceeds the boundary, the position is corrected to the specified boundary range and in line with the desired direction, thereby improving the success rate of the operation.
[0179] In addition, the boundary control method of the osteotomy plane provided in this embodiment does not impose any restrictions on the concavity and convexity of the boundary, supports customized boundary types based on the patient's anatomical structure, can protect the patient's posterior cruciate ligament and medial and lateral collateral ligaments from damage, and avoid unnecessary excessive cutting of soft tissues and ligaments.
[0180] Furthermore, the technical solution provided by this embodiment calculates the safe position of the surgical tool based on the surgical tool position and surgical safety zone boundaries planned by the surgeon's operating force. This is then transmitted to the robotic arm, which drives the surgical tool to move, thereby accurately and safely performing osteotomies on the femur and tibia. Furthermore, only the desired position, desired direction, and safety boundaries of the osteotomy saw are required, without the need to determine the saw's current position and direction. This reduces the impact of system lag on control and ensures that the given safe direction of the osteotomy saw matches the desired direction.
[0181] Example 2
[0182] According to another exemplary embodiment, a method for controlling an osteotomy plane boundary is shown, the method comprising:
[0183] Step S11: Obtain the planned coordinates of the center point of the osteotomy saw , the planned direction vector of the osteotomy saw , the boundary point set of the osteotomy plane , the boundary line set composed of the boundary point set , single step amount ;
[0184] Step S12: traverse the boundary line set For each boundary line in , calculate the center point of the osteotomy saw To each boundary line distance , and, the coordinates of the nearest point ;
[0185] Step S13: Calculate the center point of the osteotomy saw To the boundary line Distance, find the index number of the two boundary lines with the shortest distance ;
[0186] Step S14: Determine the center point of the osteotomy saw Is it located in the boundary line set? If yes, then initialize the search coordinate point to be equal to the planning coordinate of the center point of the osteotomy saw Otherwise, the initial search coordinate point is equal to the coordinate of the nearest point on the boundary line with the shortest distance ;
[0187] Step S15: Calculate search direction ,in Represented by the boundary line set The direction vector (unit vector) pointing to the boundary; Perform unitization operation to normalize it to a unit vector;
[0188] Step S21: Perform step search along the search direction, and after each step search is completed, update the search coordinate point to the sum of the original search coordinate point and the step amount in the search direction. ;
[0189] Step S22: Search the updated coordinate points , the planned direction vector of the osteotomy oscillating saw , determine the arc trajectory when the end of the osteotomy oscillating saw is within the boundary line of the osteotomy plane;
[0190] Step S31: traverse the boundary link set For each boundary line in , calculate the arc trajectory Do they intersect? If not, the search is completed and the current search coordinate point is output as the safe coordinate of the center point of the osteotomy saw. ; If they intersect, proceed to the next step;
[0191] Step S32: traverse the boundary link set For each boundary line in , calculate the current search coordinate point To each boundary line distance , and, the coordinates of the nearest point ;
[0192] Step S33: traverse the current search coordinate point The distance to the boundary line, find the index number of the two boundary lines with the shortest distance , return to step S15;
[0193] Step S4: According to the safety coordinates and the planned direction vector of the osteotomy saw , calculate the arc trajectory planned for this cycle ;
[0194] Step S51: the arc trajectory planned in the previous cycle and its parameters ( ) to perform uniform n-point interpolation (n ≥ 1) to obtain a uniform point set distributed sequentially on the arc trajectory planned in the previous cycle , storing the uniform point set as a first uniform point set;
[0195] Step S52: Plan the arc trajectory for this cycle And its parameters are uniformly interpolated at n points (n ≥ 1) to obtain a uniform point set distributed sequentially on the arc trajectory of this cycle planning , storing the uniform point set as a second uniform point set;
[0196] Step S53: According to the first uniform point set and the second uniform point set , get the line segment set when the arc trajectory planned in the previous cycle is translated to the arc trajectory position planned in this cycle ;
[0197] Step S54: traverse the boundary link set Each boundary line in ) and the line segment set Each line segment in ), calculate whether the boundary line and the line segment intersect, if so, mark the intersection and calculate the intersection coordinates, and calculate the motion vector of each point in the first uniform point set to the intersection position according to the intersection coordinates and the coordinates of the points in the first uniform point set, and generate a motion vector set (i.e., judge one by one and Do they intersect? If so, set the intersection flag to true and find the intersection point. , calculate the motion vector , get the moving vector set D);
[0198] Step S55: If there is an intersection mark, the minimum value in the movement vector set is determined as the movement vector when the arc trajectory planned in the previous cycle is translated to the intersection position (i.e., the shortest distance between the arc trajectory planned in the previous cycle and the intersection position is calculated). ; Output flag = true, );
[0199] Step S56: If there is no intersection mark, it is determined that the arc trajectory planned in the previous cycle will not intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle (that is, if the flag is not set to true, the arc trajectory does not intersect with the boundary line during movement, and the output flag = false).
[0200] It should be noted that the technical solution provided in this embodiment, in specific practice, runs in the controller of the medical device, or is loaded into an electronic device connected to the controller and runs. The controller of the medical device executes the corresponding method by calling the program stored in the electronic device.
[0201] Specifically, the medical device can be an orthopedic surgical robot, which can be used in procedures including, but not limited to, knee replacement surgery. The method can be applied to osteotomy plane boundary control in total knee arthroplasty (TKA) and unicompartmental knee arthroplasty (UKA), or can be extended to control the boundary of plane positions in any surgical procedure.
[0202] It is understood that the technical solution provided by this embodiment calculates the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, selects the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and performs a step-by-step search to quickly find a safe position closest to the plane position boundary (i.e., matching the desired movement direction and posture) and within the plane boundary. This safe position is then transmitted to the robotic arm, driving the surgical tool to move, thereby helping the surgeon accurately and safely perform femoral and tibia osteotomies. This solves the technical problem in the prior art of soft tissue and ligament damage and reduced surgical precision caused by the excessive range of motion of the osteotomy saw.
[0203] When the technical solution provided in this embodiment is applied to a knee replacement surgical robot, it can accurately and easily assist doctors in performing osteotomy operations during knee replacement surgery, while ensuring the boundary safety of the oscillating saw, improving the accuracy and success rate of knee replacement surgery, and reducing the burden on doctors.
[0204] In addition, the boundary control method of the osteotomy plane provided in this embodiment does not impose any restrictions on the concavity and convexity of the boundary, supports customized boundary types based on the patient's anatomical structure, can protect the patient's posterior cruciate ligament and medial and lateral collateral ligaments from damage, and avoid unnecessary excessive cutting of soft tissues and ligaments.
[0205] Furthermore, the technical solution provided by this embodiment calculates the safe position of the surgical tool based on the surgical tool position and surgical safety zone boundaries planned by the surgeon's operating force. This is then transmitted to the robotic arm, which drives the surgical tool to move, thereby accurately and safely performing osteotomies on the femur and tibia. Furthermore, only the desired position, desired direction, and safety boundaries of the osteotomy saw are required, without the need to determine the saw's current position and direction. This reduces the impact of system lag on control and ensures that the given safe direction of the osteotomy saw matches the desired direction.
[0206] In order to further solve the problem of possible jumps in the safe position inside the osteotomy plane during the continuous control cycle, the end model of the pendulum may cross the Figure 6 As shown in the case of the top concave boundary, the algorithm further performs boundary judgment based on the safe position planned in the previous cycle and the safe position obtained in this step search, ensuring that the safe position finally output by the algorithm controls the pendulum end model to always be within the safe boundary of the osteotomy plane during actual execution.
[0207] Furthermore, when the osteotomy plane is concave-convex or otherwise irregular, the boundary control method provided in this embodiment takes into account the physical model of the actual distal end translation during osteotomy operation, minimizing algorithmic error. Not only does the planning layer control the position of the surgical tool within the plane boundary, but it also considers the actual trajectory during execution, further correcting the plan to ensure that the surgical tool remains within the irregular plane boundary during control.
[0208] Example 3
[0209] Based on the same concept, see Figure 13 According to an exemplary embodiment, an osteotomy plane boundary control device 100 includes:
[0210] Search module 101 is used to calculate the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, select the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and perform step-by-step search;
[0211] The determination module 102 is configured to update the search point coordinates after each step search is completed, and determine the arc trajectory of the osteotomy saw tip when it is within the boundary line of the osteotomy plane based on the updated search coordinate points;
[0212] The judgment module 103 is used to determine whether the arc trajectory intersects with the boundary line of the osteotomy plane. If not, the search is completed and the current search coordinate point is output as the safe coordinate of the center point of the osteotomy saw to the calculation module. If so, the search direction is recalculated by the search module to perform a step-by-step search.
[0213] A calculation module 104 is configured to calculate the arc trajectory planned for this cycle based on the safety coordinates and the planned direction vector of the osteotomy saw;
[0214] The output module 105 is used to determine whether the arc trajectory planned in the previous cycle will intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle. If it intersects, the movement vector of the arc trajectory planned in the previous cycle when it is translated to the intersection position is calculated, and the safety coordinates of the center point of the osteotomy oscillating saw planned in the previous cycle and the sum of the movement vector are output as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle; if they do not intersect, the current search coordinate point is output as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle.
[0215] It should be noted that the implementation methods and beneficial effects of the above modules can be found in the introduction of the relevant steps of the above embodiments, and will not be repeated in this embodiment.
[0216] It is understood that the technical solution provided by this embodiment calculates the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, selects the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and performs a step-by-step search to quickly find a safe position closest to the plane position boundary (i.e., matching the desired movement direction and posture) and within the plane boundary. This safe position is then transmitted to the robotic arm, driving the surgical tool to move, thereby helping the surgeon accurately and safely perform femoral and tibia osteotomies. This solves the technical problem in the prior art of soft tissue and ligament damage and reduced surgical precision caused by the excessive range of motion of the osteotomy saw.
[0217] Example 4
[0218] See also Figure 14 According to an exemplary embodiment, an electronic device includes:
[0219] Processor 701, communication interface 702, memory 703 and communication bus 704, wherein the processor 701, communication interface 702, and memory 703 communicate with each other via the communication bus 704;
[0220] Memory 703, used for storing computer programs;
[0221] The processor 701 is configured to implement the above method when executing a program stored in the memory.
[0222] It is understood that the technical solution provided by this embodiment calculates the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, selects the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and performs a step-by-step search to quickly find a safe position closest to the plane position boundary (i.e., matching the desired movement direction and posture) and within the plane boundary. This safe position is then transmitted to the robotic arm, driving the surgical tool to move, thereby helping the surgeon accurately and safely perform femoral and tibia osteotomies. This solves the technical problem in the prior art of soft tissue and ligament damage and reduced surgical precision caused by the excessive range of motion of the osteotomy saw.
[0223] Example 5
[0224] According to an exemplary embodiment, a non-transitory computer-readable storage medium storing computer instructions is shown, where the computer instructions are used to enable a computer to execute the above method.
[0225] It is understood that the technical solution provided by this embodiment calculates the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, selects the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and performs a step-by-step search to quickly find a safe position closest to the plane position boundary (i.e., matching the desired movement direction and posture) and within the plane boundary. This safe position is then transmitted to the robotic arm, driving the surgical tool to move, thereby helping the surgeon accurately and safely perform femoral and tibia osteotomies. This solves the technical problem in the prior art of soft tissue and ligament damage and reduced surgical precision caused by the excessive range of motion of the osteotomy saw.
[0226] Of course, those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing relevant hardware (such as a processor, controller, etc.) through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a memory, a magnetic disk, an optical disk, etc.
[0227] The specific embodiments of the present invention described above do not limit the scope of protection of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A method for controlling the boundary of an osteotomy plane, characterized in that: include: Step S1, calculating the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, selecting the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and performing a step-by-step search; Step S2: after each step search is completed, the search point coordinates are updated, and based on the updated search coordinates, the arc trajectory of the osteotomy saw tip when it is within the boundary line of the osteotomy plane is determined; Step S3, determine whether the arc trajectory intersects with the boundary line of the osteotomy plane. If not, complete the search, output the current search coordinate point as the safe coordinate of the center point of the osteotomy saw, and jump to step S4; if so, return to step S1 to recalculate the search direction and perform a step-by-step search; Step S4: Calculate the arc trajectory planned for this cycle based on the safety coordinates and the planned direction vector of the osteotomy saw; Step S5, determine whether the arc trajectory planned in the previous cycle will intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle. If it intersects, calculate the movement vector of the arc trajectory planned in the previous cycle when it is translated to the intersection position, and output the safety coordinates of the center point of the osteotomy oscillating saw planned in the previous cycle and the sum of the movement vector as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle; if it does not intersect, output the current search coordinate point as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle.
2. The method according to claim 1, characterized in that The step S1 comprises: Step S11, obtaining the planned coordinates of the center point of the osteotomy oscillating saw, the planned direction vector of the osteotomy oscillating saw, the boundary point set of the osteotomy plane, the boundary line set composed of the boundary point set, and the single step amount; Step S12, traversing each boundary line in the boundary line set, calculating the distance from the center point of the osteotomy saw to each boundary line, and the coordinates of the closest point; Step S13, traversing the distance from the center point of the osteotomy saw to the boundary lines, and finding the index numbers of the two boundary lines with the shortest distance; Step S14, determining whether the center point of the osteotomy oscillating saw is located within the boundary line set; if so, initializing the search coordinate point to be equal to the planned coordinates of the center point of the osteotomy oscillating saw; otherwise, initializing the search coordinate point to be equal to the coordinates of the nearest point on the boundary line with the shortest distance; Step S15, calculating the search direction, which is the weighted sum of the direction vectors of the two boundary lines with the shortest distance, and the weight value of the direction vector of each boundary line is the distance value between the other boundary line and the center point of the osteotomy saw.
3. The method according to claim 2, characterized in that The step S2 comprises: Step S21: performing a step search along the search direction, and after each step search is completed, updating the search coordinate point to the sum of the original search coordinate point and the step amount in the search direction; Step S22: determining the arc trajectory of the end of the osteotomy oscillating saw when it is within the boundary line of the osteotomy plane according to the updated search coordinate point and the planned direction vector of the osteotomy oscillating saw.
4. The method according to claim 3, characterized in that The step S3 comprises: Step S31, traverse each boundary line in the boundary line set, calculate whether the arc trajectory intersects each boundary line, if not, complete the search, output the current search coordinate point as the safe coordinate of the osteotomy saw center point; if intersecting, proceed to the next step; Step S32: traverse each boundary line in the boundary line set, calculate the distance from the current search coordinate point to each boundary line, and the coordinates of the nearest point; Step S33: traverse the distance from the current search coordinate point to the boundary line, find the index numbers of the two boundary lines with the shortest distance, and return to step S15.
5. The method according to claim 2, characterized in that The step S12 calculates the distance from the center point of the osteotomy saw to each boundary line, and the coordinates of the closest point, including: For any boundary line, determine the positional relationship between the center point of the osteotomy saw and the boundary line; If the projection of the center point of the osteotomy saw on the boundary line falls on the left extension line of the boundary line, the coordinates of the left end point of the boundary line are determined as the coordinates of the closest point, and the distance between the center point of the osteotomy saw and the left end point is the distance from the center point of the osteotomy saw to the boundary line; If the projection of the center point of the osteotomy saw on the boundary line falls on the right extension line of the boundary line, the coordinates of the right end point of the boundary line are determined as the coordinates of the closest point, and the distance between the center point of the osteotomy saw and the right end point is the distance from the center point of the osteotomy saw to the boundary line; If the projection of the center point of the osteotomy saw on the boundary line falls on the boundary line, the projection point is determined as the nearest point coordinate, and the distance between the center point of the osteotomy saw and the projection point is the distance from the center point of the osteotomy saw to the boundary line.
6. The method according to claim 5, characterized in that The step of determining the positional relationship between the center point of the osteotomy saw and any boundary line includes: The left end point of the boundary line is determined as the starting point of the vector, and the direction of the vector of the boundary line is from the left end point to the right end point; Calculate the projection of the line vector between the left endpoint and the center point of the osteotomy oscillating saw in the vector direction of the boundary line; If the length of the projection is less than or equal to 0, it is determined that the projection of the center point of the osteotomy saw on the boundary line falls on the left extension line of the boundary line; If the length of the projection is greater than 0 and less than or equal to the vector length of the boundary line, it is determined that the projection of the center point of the osteotomy saw on the boundary line falls on the boundary line; If the length of the projection is greater than the vector length of the boundary line, it is determined that the projection of the center point of the osteotomy oscillating saw on the boundary line falls on the right extension line of the boundary line.
7. The method according to claim 2, characterized in that The step S14 of determining whether the center point of the osteotomy oscillating saw is located within the boundary line set includes: Step S141: Generate a ray from the center point of the osteotomy saw as a starting point and in any direction to infinity; Step S142, traverse each boundary point in the boundary point set, and determine whether the ray passes through the boundary point. If so, return to step S141, otherwise, proceed to the next step; Step S143, traverse each boundary line in the boundary line set to determine whether the ray coincides with the boundary line. If so, return to step S141; otherwise, proceed to the next step. Step S144: traverse each boundary line in the boundary line set and calculate the number of intersection points between the ray and the boundary line; Step S145: If the number of intersections is an odd number, it is determined that the center point of the osteotomy oscillating saw is located within the boundary line set; if the number of intersections is an even number, it is determined that the center point of the osteotomy oscillating saw is located outside the boundary line set.
8. The method according to claim 4, characterized in that The step S31 of traversing each boundary line in the boundary line set and calculating whether the arc trajectory intersects each boundary line includes: For any boundary line, determine whether the radius of the circle where the arc trajectory is located is greater than the straight-line distance from the center of the circle to the boundary line. If so, determine that the circle where the arc trajectory is located has no intersection with the boundary line; otherwise, determine that the circle where the arc trajectory is located has an intersection with the boundary line; If it is determined that the circle where the arc trajectory is located has an intersection with the boundary line, determining whether the intersection is on the boundary line; If both intersection points are outside the boundary line, it is determined that the arc trajectory has no intersection with the boundary line; if one intersection point is on the boundary line and the other is outside the boundary line, it is determined that the circle where the arc trajectory is located has one intersection with the boundary line; if both intersection points are on the boundary line, it is determined that the circle where the arc trajectory is located has two intersections with the boundary line; If it is determined that the circle where the arc trajectory lies has one intersection with the boundary line, or if it is determined that the circle where the arc trajectory lies has two intersections with the boundary line, for each intersection, calculate the four-quadrant inverse tangent function of the direction vector from the center of the circle to the intersection point; If the value of the four-quadrant inverse tangent function is between the left limit angle and the right limit angle of the arc trajectory, it is determined that the arc trajectory intersects the boundary line; otherwise, it is determined that the arc trajectory does not intersect the boundary line.
9. The method according to claim 1, characterized in that The step S5 comprises: Performing uniform n-point interpolation on the arc trajectory planned in the previous cycle to obtain a uniform point set distributed sequentially on the arc trajectory planned in the previous cycle, and storing the uniform point set as a first uniform point set; Performing uniform n-point interpolation on the circular arc trajectory planned in the current cycle to obtain a uniform point set sequentially distributed on the circular arc trajectory planned in the current cycle, and storing the uniform point set as a second uniform point set; Obtaining, based on the first uniform point set and the second uniform point set, a line segment set when the arc trajectory planned in the previous cycle is translated to the position of the arc trajectory planned in the current cycle; Traversing each boundary line in the boundary line set and each line segment in the line segment set, calculating whether the boundary line and the line segment intersect, and if so, marking the intersection and calculating the coordinates of the intersection point, and calculating the motion vector of each point in the first uniform point set translated to the intersection point based on the coordinates of the intersection point and the coordinates of the points in the first uniform point set, thereby generating a motion vector set; If there is an intersection mark, traverse the movement vector set and determine the movement vector corresponding to the minimum vector module length in the movement vector set as the movement vector when the arc trajectory planned in the previous cycle is translated to the intersection position; If there is no intersection mark, it is determined that the arc trajectory planned in the previous cycle will not intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle.
10. The method according to claim 9, characterized in that The calculating whether the boundary line and the line segment intersect includes: For any boundary line and any line segment, calculate the first rotation direction between the line vector between the right endpoint of the boundary line and the left endpoint of the line segment and the line vector between the right endpoint and the left endpoint of the boundary line; Calculate the second rotation direction between the line vector between the right endpoint of the boundary line and the right endpoint of the line segment, and the line vector between the right endpoint and the left endpoint of the boundary line; If the product of the first rotation direction and the second rotation direction is greater than 0, it is determined that the boundary line does not intersect the line segment.
11. The method according to claim 10, characterized in that The calculating whether the boundary line and the line segment intersect includes: For any boundary line and any line segment, calculate the third rotation direction between the line vector between the right endpoint of the line segment and the left endpoint of the boundary line and the line segment vector; Calculate the fourth rotation direction between the line vector between the right endpoint of the line segment and the right endpoint of the boundary line and the line segment vector; If the product of the third rotation direction and the fourth rotation direction is greater than 0, it is determined that the boundary line does not intersect the line segment.
12. The method according to claim 11, characterized in that The calculation of the intersection coordinates includes: For any boundary line and any line segment, calculate the relative distance between the intersection point and any endpoint on the boundary line according to the first rotation direction, the third rotation direction, and the fourth rotation direction; The sum of the endpoint coordinates and the relative distance is determined as the intersection coordinates.
13. An osteotomy plane boundary control device, characterized in that: include: A search module is used to calculate the distance from the center point of the osteotomy saw to the boundary line of the osteotomy plane, select the weighted sum of the inward vectors of the two sides with the shortest distance as the search direction, and perform a step-by-step search; A determination module is used to update the search point coordinates after each step search is completed, and determine the arc trajectory when the end of the osteotomy oscillating saw is within the boundary line of the osteotomy plane based on the updated search coordinate points; A judgment module is used to determine whether the arc trajectory intersects with the boundary line of the osteotomy plane. If not, the search is completed and the current search coordinate point is output as the safe coordinate of the center point of the osteotomy saw to the calculation module; if so, the search direction is recalculated and the step-by-step search is performed by the search module; A calculation module, configured to calculate the arc trajectory planned for this cycle based on the safety coordinates and the planned direction vector of the osteotomy saw; The output module is used to determine whether the arc trajectory planned in the previous cycle will intersect with the boundary line of the osteotomy plane when it is translated to the arc trajectory position planned in this cycle. If it intersects, the movement vector of the arc trajectory planned in the previous cycle when it is translated to the intersection position is calculated, and the safety coordinates of the center point of the osteotomy oscillating saw planned in the previous cycle and the sum of the movement vector are output as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle; if they do not intersect, the current search coordinate point is output as the safety coordinates of the center point of the osteotomy oscillating saw planned in this cycle.
14. An electronic device, characterized in that: include: A processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 12 when executing a program stored in a memory.
15. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
System and method for manipulating an anatomy
CN107635486A
Method and device for generating safe osteotomy prompt information and terminal equipment
CN111700681A