Defect repair method, combined processing device, and computer program

The composite machining apparatus automates defect repair by integrating defect detection and machining processes, ensuring uniform metal application and smooth surfaces through automated target point determination and integrated control.

WO2026140260A1PCT designated stage Publication Date: 2026-07-02YAMAZAKI MAZAK KK

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
YAMAZAKI MAZAK KK
Filing Date
2025-03-11
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

Existing defect repair methods require separate apparatuses for defect inspection, cutting, material supply, and shaping, necessitating manual operation parameter determination and lacking automated integration of processing results.

Method used

A composite machining apparatus and method that integrates defect detection, cutting, and additive manufacturing using a single control device, allowing automated defect repair by determining target points and controlling machining heads for cutting and additive processes.

Benefits of technology

Enables fully automated defect repair with uniform application of molten metal and smooth surface finish, minimizing unnecessary cutting and optimizing process integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025009049_02072026_PF_FP_ABST
    Figure JP2025009049_02072026_PF_FP_ABST
Patent Text Reader

Abstract

This defect repair method includes: controlling, by a control device, a first processing head so as to move a rotary tool, which is rotatably attached to the first processing head around a rotation axis, to a first target point; and controlling, by the control device, the first processing head so as to cut an object to be repaired around a defect and form a recess on a surface to be repaired by moving the first processing head in a first direction from the first target point with the rotation axis oriented in the first direction, which is perpendicular to a first plane, while rotating the rotary tool. The defect repair method includes: determining, by the control device, a second target point located inside the outer periphery of the recess when viewed in the first direction on the basis of the first target point; controlling, by the control device, a second processing head for adding molten metal to the recess so as to move the second processing head to the second target point; and controlling, by the control device, the second processing head so as to perform additive manufacturing in which the molten metal is added to the recess.
Need to check novelty before this filing date? Find Prior Art

Description

Defect Repair Method, Composite Processing Apparatus, Computer Program

[0001] The present invention relates to a defect repair method, a composite processing apparatus for executing the same, and a computer program.

[0002] A defect repair method is known in which the position of a defect in a workpiece is acquired, cutting is performed based on the position of the defect, and then a material is supplied to the location where the cutting was performed. The defect repair method according to Patent Document 1 includes a series of processes of inspecting a defect, forming a depression by scraping off the defective part, supplying a material to the depression, and removing unnecessary portions of the cured part when the supplied material is cured. In this process, the inspection of the defect is performed by various sensors such as a camera, ultrasonic waves, elastic waves, and X-rays. The scraping off of the defect is performed by a cutting mechanism such as a machining center or a removal processing mechanism by laser polishing. The supply of the material to the defective part is performed by a material supply mechanism including a nozzle or the like. The removal of the unnecessary portions of the cured part is performed by a shaping mechanism such as a blade or a file.

[0003] JP 2018-158457

[0004] In the defect repair method according to Patent Document 1, since the above-described series of processes are performed using separate apparatuses, generally, it is necessary to prepare programs for operating these apparatuses respectively. Patent Document 1 does not disclose how to share the processing results of each process among the programs, and generally, there is a problem that the operation parameters of the next process have to be determined manually based on the results of each process.

[0005] A defect repair method according to a first aspect of this disclosure includes detecting a defect on the surface of an object to be repaired using a shape measurement sensor, and determining a first target point, which is the location of the defect on a first plane, using a control device. The defect repair method includes controlling a first processing head with a control device to move a rotary tool, which is rotatably mounted on a rotation axis of the first processing head, to the first target point, and controlling the first processing head with the control device to cut the object to be repaired around the defect in a first direction by rotating the rotary tool and orienting the rotation axis in a first direction perpendicular to the first plane, thereby forming a depression on the surface of the object to be repaired. The defect repair method includes determining a second target point located inside the outer circumference of the depression when viewed in a first direction, using a control device based on the first target point, and controlling a second processing head with a control device to move a second processing head for adding molten metal to the depression to the second target point, and controlling the second processing head with a control device to perform additive manufacturing by adding molten metal to the depression.

[0006] According to a second aspect of this disclosure, in the defect repair method according to the first aspect, the second target point is the same as the first target point.

[0007] According to a third aspect of this disclosure, in the defect repair method according to the first or second aspect, the rotary tool is a ball end mill.

[0008] According to a fourth aspect of this disclosure, in a defect repair method according to the first, third, or fourth aspect, determining a second target point includes calculating the second target point using a control device based on the position of the first target point and the tool diameter of the rotary tool.

[0009] According to a fifth aspect of the present disclosure, a defect repair method according to any of the first to fourth aspects further includes controlling a first machining head with a control device to move a finishing tool attached to the first machining head in order to perform a finishing process to remove molten metal that has overflowed from a depression after additive manufacturing.

[0010] According to a sixth aspect of this disclosure, in a defect repair method according to any of the fifth aspects, controlling the first machining head to move a finishing tool for finishing work includes changing the tool mounted on the first machining head from a cutting rotary tool to a finishing tool.

[0011] According to a seventh aspect of this disclosure, in a defect repair method according to the fifth or sixth aspect, the finishing tool is an end mill having a larger tool diameter than the rotary tool, and controlling the first machining head to move the finishing tool in order to perform finishing work includes moving the finishing tool to a first target point.

[0012] According to the eighth aspect of this disclosure, in the defect repair method according to any of the first to seventh aspects, the shape measurement sensor is interchangeably mounted on the first processing head.

[0013] According to the ninth aspect of this disclosure, in a defect repair method according to any of the first to eighth aspects, the shape measurement sensor is an image sensor, and detecting a defect on the surface of the object to be repaired includes taking a photograph of the surface to be repaired with the image sensor and detecting the area corresponding to the defect in the image detected by the image sensor by image processing. Preferably, detecting a defect includes illuminating the surface to be repaired such that areas without defects are overexposed, and detecting the area corresponding to the defect in the image detected by the image sensor by threshold processing.

[0014] According to the tenth aspect of this disclosure, in the defect repair method according to the ninth aspect, determining the first target point includes determining a reference point within the region when the first plane is considered as the surface to be repaired, and determining the first target point based on the reference point, the line of sight direction of the image sensor, the viewpoint position of the image sensor, and the position and orientation of the first plane.

[0015] According to the eleventh aspect of this disclosure, in a defect repair method according to any of the first to tenth aspects, the depth of the depression in a first direction from the surface to be repaired is predetermined. The defect repair method further includes, before controlling the second machining head by the control device to perform additive manufacturing, determining the volume of the depression based on the tool diameter of the rotary tool and the depth of the depression, and determining the amount of molten metal to be added to the depression by the control device as the amount obtained by adding an offset value to the determined volume.

[0016] According to the twelfth aspect of this disclosure, a defect repair method according to any of the first to eleventh aspects includes: the shape measurement sensor is a 3D scanner; a control device obtains first data relating to a first group of points on the surface to be repaired that are estimated to be located at surface positions from among a group of points detected by the 3D scanner; the control device obtains first parameters representing the surface position of the defect using the obtained first data; and a first target point is determined from the obtained first parameters.

[0017] According to a thirteenth aspect of this disclosure, a defect repair method according to any of the first to twelfth aspects includes a shape measurement sensor being a 3D scanner, wherein a control device obtains first data relating to a first plurality of points on the surface to be repaired that are estimated to be located at a surface position from among a plurality of points detected by the 3D scanner, a control device obtains a second parameter representing the depth of the defect in a first direction from the surface to be repaired using the obtained first data, and a determination of the amount by which the first processing head is moved in a first direction from a first target point to form a depression from the obtained second parameter.

[0018] A composite machining apparatus according to a fourteenth aspect of this disclosure comprises a control device configured to perform a defect repair method according to any of the first to thirteenth aspects, a first machining head configured to mount a rotary tool, a finishing tool, and a shape measuring sensor, a first actuator configured to move the first machining head, a second machining head, and a second actuator configured to move the second machining head. The control device is configured to control the first actuator and the second actuator to move the first machining head and the second machining head.

[0019] According to a 15th aspect of this disclosure, the composite machining apparatus according to a 14th aspect of this disclosure further comprises a tool changing device for exchanging a rotary tool, a finishing tool, and a shape measuring sensor that are attached to a first machining head.

[0020] The computer program according to the sixteenth aspect of this disclosure includes an instruction to cause the numerical control computer, which is a control device, to execute one of the defect repair methods according to the first to fourteenth aspects when it is executed by the numerical control computer.

[0021] A defect repair method according to the first embodiment, a composite processing apparatus according to the 14th embodiment including a control device configured to execute the defect repair method according to the first embodiment, and a computer program according to the 16th embodiment that includes instructions to cause a numerical control computer to execute the defect repair method according to the first embodiment can provide a fully automated defect repair method by extracting a second target point from a first target point and using it in a program related to additive manufacturing.

[0022] In the defect repair method according to the second embodiment, the composite processing apparatus according to the 14th embodiment which includes a control device configured to execute the defect repair method according to the second embodiment, and the computer program according to the 16th embodiment which includes instructions to cause a numerical control computer to execute the defect repair method according to the second embodiment, by making the second target point coincide with the first target point, the second target point can use the information of the first target point as is, and the process of separately extracting the second target point can be omitted.

[0023] In the defect repair method according to the third embodiment, the composite processing apparatus according to the fourteenth embodiment which includes a control device configured to execute the defect repair method according to the third embodiment, and the computer program according to the sixteenth embodiment which includes instructions to cause a numerical control computer to execute the defect repair method according to the third embodiment, by using a ball end mill as the rotary tool, a depression can be formed so that it expands continuously from the center of the depression toward the outer circumference. As a result, in the automated defect repair method, molten metal is uniformly applied to the depression, and the occurrence of internal defects is suppressed. In particular, when moving from a first target point in a first direction, an automated defect repair method can be realized in which molten metal is uniformly applied to the depression without creating a processing program to generate a specific path.

[0024] In the defect repair method according to the fourth embodiment, the composite processing apparatus according to the fourteenth embodiment which includes a control device configured to execute the defect repair method according to the fourth embodiment, and the computer program according to the sixteenth embodiment which includes instructions to cause a numerical control computer to execute the defect repair method according to the fourth embodiment, molten metal can be reliably applied to the depression by setting the second target point within the range of the tool diameter of the rotating tool from the first target point when viewed in the first direction.

[0025] In the defect repair method according to the fifth embodiment, the composite processing apparatus according to the fourteenth embodiment which includes a control device configured to execute the defect repair method according to the fifth embodiment, and the computer program according to the sixteenth embodiment which includes instructions for a numerical control computer to execute the defect repair method according to the fifth embodiment, the molten metal overflowing from the depression can be removed by the finishing tool attached to the first processing head, so that the surface can be made smooth. Furthermore, when the destinations of the rotary tool and the finishing tool are set to a common first target point, the process of extracting the destination of the finishing tool can be omitted.

[0026] In the sixth embodiment, a defect repair method; a fourteenth embodiment, a composite machining apparatus including a control device configured to execute the defect repair method according to the sixth embodiment; and a sixteenth embodiment, a computer program that includes instructions for a numerical control computer to execute the defect repair method of the sixth embodiment, machining can be performed using both a rotary tool and a finishing tool with the same first machining head, allowing the composite machining apparatus to be made compact. In particular, in the fifteenth embodiment, the rotary tool and the finishing tool can be exchanged using a tool changer, allowing the defect repair method to be fully automated.

[0027] In the defect repair method according to the seventh embodiment, the composite machining apparatus according to the fourteenth embodiment which includes a control device configured to execute the defect repair method according to the seventh embodiment, and the computer program according to the sixteenth embodiment which includes instructions to cause a numerical control computer to execute the defect repair method according to the seventh embodiment, highly accurate defect repair can be performed by aligning the position of the finishing tool with the position of the rotary tool and the position of the head of the composite machining apparatus.

[0028] In the eighth aspect of the defect repair method, the fourteenth aspect of the composite processing apparatus including a control device configured to execute the defect repair method according to the eighth aspect, and the sixteenth aspect of the computer program which includes instructions to cause a numerical control computer to execute the defect repair method of the eighth aspect, the shape measurement sensor can be positioned and oriented to easily detect defects by attaching the shape measurement sensor to the first processing head which is directed to any position and orientation.

[0029] In the defect repair method according to the ninth aspect, the composite processing apparatus according to the fourteenth aspect including a control device configured to execute the defect repair method according to the ninth aspect, and the computer program according to the sixteenth aspect which includes instructions to cause a numerical control computer to execute the defect repair method according to the ninth aspect, a first target point can be determined based on the region corresponding to the defect in the image by defining a first plane.

[0030] In the defect repair method according to the 10th embodiment, the composite processing apparatus according to the 14th embodiment which includes a control device configured to execute the defect repair method according to the 10th embodiment, and the computer program according to the 16th embodiment which includes instructions to cause a numerical control computer to execute the defect repair method according to the 10th embodiment, a first target point can be determined from the position of a reference point in an image using affine transformation.

[0031] In the defect repair method according to the 11th embodiment, the composite processing apparatus according to the 14th embodiment which includes a control device configured to execute the defect repair method according to the 11th embodiment, and the computer program according to the 16th embodiment which includes instructions to cause a numerical control computer to execute the defect repair method according to the 11th embodiment, molten metal is supplied in an amount equal to the volume of the depression plus an offset, so that the depression can be completely filled with molten metal.

[0032] A defect repair method according to the 12th embodiment, a composite processing apparatus according to the 14th embodiment including a control device configured to execute the defect repair method according to the 12th embodiment, and a computer program according to the 16th embodiment that includes instructions to cause a numerical control computer to execute the defect repair method according to the 12th embodiment can use first data relating to a plurality of points detected from a 3D scanner to obtain an equation in the machine coordinates of the first plane and determine a first target point.

[0033] In the defect repair method according to the 13th embodiment, the composite machining apparatus according to the 14th embodiment which includes a control device configured to execute the defect repair method according to the 13th embodiment, and the computer program according to the 16th embodiment which includes instructions to cause a numerical control computer to execute the defect repair method according to the 13th embodiment, the amount to move from the first target point in the first direction is determined from the second parameter, so the amount of cutting can be minimized and unnecessary cutting can be suppressed.

[0034] The defect repair method, machine tool for performing it, and computer program related to this disclosure can provide a fully automated defect repair method in small-scale spot repair by extracting the parameters required for the next process from the results of each process and passing the extracted parameters to a program that operates the next process.

[0035] Figure 1 is an example of a schematic configuration diagram of a composite machining apparatus according to an embodiment. Figure 2 is an example of another schematic configuration diagram of a composite machining apparatus according to an embodiment. Figure 3 is an enlarged view of the connection portion between the shape measurement sensor and the first machining head. Figure 4 is an example of yet another schematic configuration diagram of a composite machining apparatus according to an embodiment. Figure 5 is an example of yet another schematic configuration diagram of a composite machining apparatus equipped with a tool changer according to an embodiment. Figure 6 is a block diagram showing the internal configuration of the control device. Figure 7 is a flowchart relating to a defect repair method realized by the control device executing a repair program. Figure 8 shows the arrangement of the shape measurement sensor and the surface to be repaired. Figure 9 is an example of an image of the surface to be repaired captured by the image sensor. Figure 10 is an example of detecting a reference point of a defect by image processing from the image in Figure 7. Figure 11 is an example of the processing flow of step S3 in Figure 7 when the shape measurement sensor is an image sensor. Figure 12 is an example of the processing flow of step S4 in Figure 7 when the shape measurement sensor is an image sensor. Figure 13 is a diagram showing the approach direction of the rotary tool. Figure 14 is a diagram showing the approach direction of the second machining head. Figure 15 shows the approach direction of the finishing tool. Figure 16 is an example of a schematic configuration diagram of another composite processing apparatus according to the embodiment. Figure 17 is an example of a schematic configuration diagram of another composite processing apparatus according to the embodiment. Figure 18 shows the arrangement of the shape measurement sensor and the surface to be repaired when the shape measurement sensor is a 3D scanner. Figure 19 is a schematic diagram when a laser is applied to a defect CK. Figure 20 is an example of the processing flow of step S3 in Figure 7 when the shape measurement sensor is a 3D scanner. Figure 21 is an example of the processing flow of step S4 in Figure 7 when the shape measurement sensor is an image sensor.

[0036] The present invention will now be described in detail based on the drawings illustrating its embodiments. In the drawings, the same reference numerals indicate corresponding or substantially identical components. <Embodiment> <Configuration of the Combined Machining Apparatus 100> Figure 1 shows a schematic configuration diagram of the combined machining apparatus 100 according to an embodiment of the present invention. The combined machining apparatus 100 in this embodiment is a combined machining apparatus (Combined Machining Apparatus) capable of performing multiple machining operations on a workpiece, and is capable of performing additive manufacturing and cutting operations together. The combined machining apparatus 100 includes a cover (not shown) that covers the equipment for performing additive manufacturing and cutting operations, and an operation panel 102. The operation panel 102 includes an input / output device 103 that receives input from the user and outputs information to the user. The input / output device 103 may also be called a user interface. The input / output device 103 is configured to receive input from the user and output information to the user. Specifically, the input / output device 103 includes a display that shows information to the user as an image, a speaker that provides information to the user as sound, and a touch panel, buttons, and dials for the user to input information. In addition, the operation panel 102 also includes a machine control unit CL for controlling the multi-tasking apparatus 100. The detailed configuration of the machine control unit CL will be described later.

[0037] Referring to Figure 1, the composite machining apparatus 100 comprises a holding mechanism 105, a cutting apparatus 106, an additive manufacturing apparatus 120, a first moving mechanism 107, and a second moving mechanism 108. The holding mechanism 105 is configured to hold the workpiece W. The cutting apparatus 106 is configured to perform cutting on the workpiece W. The additive manufacturing apparatus 120 is configured to perform additive manufacturing on the workpiece W. The first moving mechanism 107 is configured to move the cutting apparatus 106 relative to the workpiece W. The second moving mechanism 108 is configured to move the additive manufacturing apparatus 120 relative to the workpiece W. In this embodiment, the second moving mechanism 108 is a 5-axis robot arm, but other mechanisms may be used. Alternatively, the cutting apparatus 120 and the additive manufacturing apparatus 120 may be configured to move relative to the workpiece W using the same moving mechanism. Examples of these will be described later at the end of this embodiment.

[0038] Figure 1 shows the arrangement of the cutting machine 106 and the additive manufacturing device 120 when the cutting machine 106 processes a workpiece W. The holding mechanism 105 is configured to rotate the workpiece W with respect to a rotation axis parallel to the Z-axis in the figure. The cutting machine 106 includes a first machining head 116. Tools and the like are mounted on the first machining head 116 so as to be rotatable around the rotation axis A1. The cutting process performed by the cutting machine 106 includes turning, in which a turning tool attached to the first machining head 116 is brought into contact with the workpiece W which is rotated by the holding mechanism 105, and milling, in which a milling tool attached to the first machining head 116 is brought into contact with the workpiece W which is stationary by the holding mechanism 105 while rotating. However, the cutting machine 106 may perform cutting processes other than those described above.

[0039] The first moving mechanism 107 can move the first machining head 116 in the X-axis direction and the Y-axis direction, in addition to the Z-axis direction in Figure 2. The X-axis direction is substantially perpendicular to the Z-axis direction and is vertical. The Y-axis direction is substantially perpendicular to the X-axis direction and is horizontal. The first moving mechanism 107 can further rotate the first machining head 116 around a rotation axis A2 that is horizontal to the Y-axis. As shown in Figure 2, the first moving mechanism 107 includes a first actuator ACT1 configured to move the first machining head 116 and a power converter. The first actuator ACT1 is typically a servo motor, but may be a stepping motor. The cutting apparatus 106 further includes a servo motor for rotating the first machining head 116.

[0040] Figure 2 shows the arrangement of the cutting machine 106 and the additive manufacturing machine 120 when inspecting defects present in the workpiece W before processing the workpiece W with the cutting machine 106. A shape measurement sensor SS can also be attached to the first machining head 116. Figure 2 is a schematic configuration diagram of the shape measurement sensor SS when the shape measurement sensor SS is an image sensor SS1. Specifically, the image sensor SS1 is a camera. Figure 3 is an enlarged view of the connection portion between the shape measurement sensor SS and the first machining head 116. Referring to Figure 3, the cutting machine 106 has a common tool interface INT1 on the first machining head 116 for connecting at least a rotary tool T1 and a finishing tool T2, and a connection interface INT2 on the non-rotating part 117 outside the first machining head 116 for connecting at least the shape measurement sensor SS. In this example, the shape measurement sensor SS is shown to have pull studs corresponding to the tool interface INT1 and the connection interface INT2, but it may also have a pull stud corresponding only to the connection interface INT2. This fixes the shape measurement sensor SS in a predetermined orientation around the rotation axis A1. If there are multiple orientations of the shape measurement sensor SS around the rotation axis A1 determined by the connection interface INT2, the orientation of the shape measurement sensor SS around the rotation axis A1 may be determined by calibration from the measurement results of the shape measurement sensor SS based on a measurement standard provided in the machining space where the workpiece W is placed or on the workpiece W. In another embodiment, the shape measurement sensor SS may be connected to the first machining head 116 by the tool interface INT1 only. In this case, it is preferable that the orientation of the shape measurement sensor SS around the rotation axis A1 be determined by calibration from the measurement results of the shape measurement sensor SS based on a measurement standard provided in the machining space where the workpiece W is placed or on the workpiece W.

[0041] As described above, the shape measurement sensor SS is interchangeably mounted on the first machining head 116. The first machining head 116 is configured to mount the rotary tool T1, the finishing tool T2, and the shape measurement sensor SS. A base BE for supporting the image sensor SS1 is connected to the tool interface INT. Note that this configuration of the shape measurement sensor SS is an example, and it is desirable that the structure of the base BE be appropriately changed according to the shape and size of the shape measurement sensor SS. In addition, the shape measurement sensor SS may be a three-dimensional scanner (3D scanner) SS2, but that case will be described later.

[0042] Figure 4 shows the arrangement of the cutting machine 106 and the additive manufacturing apparatus 120 when processing a workpiece W using the additive manufacturing apparatus 120. Additive manufacturing performed by the additive manufacturing apparatus 120 is a technique that selectively melts and bonds the additive material to the workpiece W by supplying an additive material to the workpiece W and controlling the heat generation location by concentrating an energy beam such as a laser beam, arc discharge, or plasma. Referring to Figures 2 and 3, the additive manufacturing apparatus 120 includes a second processing head 122 and a transmission mechanism (not shown). The second processing head 122 is configured to output the additive material and an energy beam. The transmission mechanism is configured to transmit the additive material and an energy beam to the second processing head 122. The additive manufacturing apparatus 120 also has other configurations, which will be described later.

[0043] In addition to the Z-axis direction shown in FIGS. 1, 2, and 4, the second moving mechanism 108 can move the second processing head 122 in the X-axis direction and the Y-axis direction. The second moving mechanism 108 can further rotate the additive manufacturing apparatus 120 about a rotation axis horizontal to the Y-axis. As shown in FIGS. 1, 2, and 4, the second moving mechanism 108 includes a second actuator ACT2 configured to move the second processing head 122. The second actuator ACT2 is typically a servo motor, but may also be a stepping motor. When swapping the additive manufacturing apparatus 120 and the cutting apparatus 106, as shown in FIGS. 1 and 2, the second moving mechanism 108 turns the orientation of the robot arm upward (positive X-axis direction). Thereby, the arrangement can be changed so that the additive manufacturing apparatus 120 and the cutting apparatus 106 do not interfere with each other.

[0044] As shown in FIG. 5, the composite machining apparatus 100 may include a tool changer 109. The tool changer 109 is configured to exchange implements mounted on the first processing head 116. In the present embodiment, the implements include a rotary tool T1 used for cutting, a finishing tool T2 used for finishing, and a shape measurement sensor SS. That is, the tool changer 109 is configured to exchange the rotary tool T1, the finishing tool T2, and the shape measurement sensor SS to be mounted on the first processing head 116. Specifically, the tool changer 109 includes a magazine arm 132 and a stocker 134. The magazine arm 132 is rotatable about an axis along the Z-axis direction. The magazine arm 132 is movable in the X-axis direction with respect to the stocker 134. The stocker 134 stores a plurality of implements arranged in the X-axis direction.

[0045] The tool changer 109 performs the following procedure for changing the turning tool. The cutting machine 106 approaches the tool changer 109 in the Z-axis direction with its rotation axis A1 aligned with the Z-axis direction. The magazine arm 132 has a first gripper at one end in the direction in which it extends and a second gripper at the other end in the same direction. The first gripper grips the tool attached to the first machining head 116 in order to remove the tool attached to the first machining head 116. More specifically, when the magazine arm 132 rotates by a predetermined angle around an axis aligned with the Z-axis direction, the first gripper grips the tool, and at the same time, the second gripper grips another tool stored in the stocker 134. When the column 110 moves away from the tool changer 109 in the Z-axis direction, the tool is removed from the tool spindle 114. The magazine arm 132 rotates around an axis along the Z-axis to mount another device on the tool spindle 114, moving the other device held by the second gripper to the tool mounting position. As the column 110 approaches the tool changer 109 in the Z-axis direction, the other device is mounted on the tool spindle 114. <Internal Configuration of Control Device CL> Figure 6 is a block diagram showing the internal configuration of the control device CL. The control device CL is generally composed of a PLC (Programmable Logic Controller), that is, it includes a programmable electronic circuit. The control device CL may also be called a Numerical Control Computer. Specifically, referring to Figure 6, the control device CL comprises a processor 31 such as a CPU (Central Processing Unit), a memory 32, and a power supply (not shown). The control device CL is configured to move the first machining head 116 and the second machining head 122 by controlling the first actuator ACT1 and the second actuator ACT2. The memory 32 is configured to control the shape measurement sensor SS, the first moving mechanism 107, the second moving mechanism 108, the tool changer 109, the cutting machine 106, and the additive manufacturing machine 120, and also stores a repair program PG for performing spot repairs. Note that the tool changer 109 may be omitted.The processor 31 executes the repair program PG, which performs a series of processes including detecting defects in the workpiece W, forming a depression by removing the defective portion, supplying material to the depression, and removing unwanted portions of the hardened material.

[0046] The control device CL further includes a first input / output interface 33, a second input / output interface 34, a bus 35, and a power supply (not shown). The first input / output interface 33 is connected to the input / output device 103. The first input / output interface 33 is, for example, a video output interface, a sound output interface, or various serial and parallel interfaces such as USB. The second input / output interface 34 is connected to the cutting machine 106, the additive manufacturing machine 120, the first moving mechanism 107, the second moving mechanism 108, the tool changer 109, and the shape measurement sensor SS, and receives output signals from these devices. The second input / output interface 34 includes, for example, a serial interface such as USB, a parallel interface such as RS-232C or SCSI, and a video input interface such as HDMI® or DisplayPort. The bus 35 connects the processor 31, the memory 32, the first input / output interface 33, and the second input / output interface 34 to each other. Bus 35 transmits the output signal from the shape measurement sensor SS to the processor 31, transmits signals between the processor 31 and the memory 32, and transmits control signals from the processor 31 to the cutting machine 106, additive manufacturing machine 120, first moving mechanism 107, second moving mechanism 108, and tool changer 109 to the second input / output interface 34. <Operation of the defect repair method by the repair program> The repair program PG includes instructions to the control device CL to execute the defect repair method described below when executed by the control device CL. Figure 7 is a flowchart relating to the defect repair method realized when the control device CL executes the repair program PG. Referring to Figure 7, in this defect repair method, first in step S1, if the composite machining machine 100 does not have a tool changer 109, the operator attaches the shape measurement sensor SS to the first machining head 116. If the multi-tasking machine 100 is equipped with a tool changer 109, the control device CL controls the tool changer 109 to mount the shape measurement sensor SS onto the first machining head 116. In other words, the repair program PG includes instructions to control the tool changer 109 to mount the shape measurement sensor SS onto the first machining head 116 when executed by the control device CL.Next, the control device CL controls the first moving mechanism 107 to position the shape measuring sensor SS in a position and orientation suitable for detecting the repair target surface ROS. In other words, the repair program PG includes instructions to control the first moving mechanism 107 to position the shape measuring sensor SS in a position and orientation suitable for detecting the repair target surface ROS when executed by the control device CL. This repair target surface ROS is the plane of the workpiece W that is the target of defect CK detection by the shape measuring sensor SS.

[0047] Figure 8 shows the arrangement of the shape measurement sensor SS and the surface ROS to be repaired. As shown in Figure 8, when the shape measurement sensor SS is an image sensor SS1 (camera), it is preferable that the position and orientation allow for imaging of the entire surface ROS to be repaired, and to image it as large as possible. If the three-dimensional shape model of the workpiece W and the method of holding the workpiece W by the holding mechanism 105 (information such as which faces of the workpiece W are hidden by the chuck) are known, the control device CL may control the first moving mechanism 107 to position the shape measurement sensor SS in a position and orientation suitable for detecting the surface ROS to be repaired based on these values. Alternatively, the control device CL may accept user input via the input / output device 103 and control the first moving mechanism 107 to position the shape measurement sensor SS in a position and orientation suitable for detecting the surface ROS to be repaired based on that input. The positional relationship between the reference position of the first processing head 116, determined by the control value of the first moving mechanism 107, and the position of the viewpoint VP of the image sensor SS1 (camera) is stored in the memory 32 in advance, and the position of the viewpoint VP of the image sensor SS1 (camera) in the machine coordinate system can be determined from the control value of the first moving mechanism 107. The relationship between the orientation of the first processing head 116, determined by the control value of the first moving mechanism 107, and the vector of the line of sight direction LoS of the image sensor SS1 (camera) is stored in the memory 32 in advance, and the vector of the line of sight direction LoS expressed in the machine coordinate system can be determined from the control value of the first moving mechanism 107. When the shape measurement sensor SS is the image sensor SS1 (camera), the control device CL stores the position of the viewpoint VP of the machine coordinate system of the image sensor SS1 (camera) and the line of sight direction LoS expressed as a vector in the machine coordinate system, which have been determined in this way, in the memory 32.

[0048] Next, in step S2 of FIG. 7, the control device CL determines a shape model of the first plane PL in which the repair target surface ROS is defined in the machine coordinate system. The shape model of the first plane PL is represented by an equation of a plane in the machine coordinate system where the repair target surface ROS is estimated to exist. FIG. 8 shows an example in which the first plane PL is in a direction parallel to the XY plane of the machine coordinate system. For example, the shape model of the first plane PL can be expressed as Z = a (a is a constant). This plane equation may be calculated by the control device CL from the three-dimensional shape model of the workpiece W and the workpiece W holding method of the holding mechanism 105. Alternatively, the user inputs parameters (for example, when the repair target surface ROS is arranged in a direction parallel to the XY plane of the machine coordinate system in advance, the z coordinate value) for defining the first plane PL based on the arrangement of the workpiece W via the input / output device 103, and the control device CL may determine the shape model of the first plane PL based on the input parameters. Preferably, the user preferably arranges the workpiece W in advance so that the first plane PL is perpendicular to the default direction of the first processing head 116, or the holding mechanism 105 arranges the workpiece W in advance so that the first plane PL is perpendicular to the default direction of the first processing head 116.

[0049] Next, in step S3 of FIG. 7, the control device CL detects a defect CK of the repair target surface ROS in the repair target object (workpiece W) by the shape measurement sensor SS. That is, the repair program PG includes an instruction to detect a defect CK of the repair target surface ROS in the repair target object (workpiece W) by the shape measurement sensor SS when executed by the control device CL. Hereinafter, a detailed example when the shape measurement sensor SS is the image sensor SS1 will be described. The composite processing device 100 has illumination (not shown) capable of applying strong light such that the area without the defect CK in the repair target surface ROS becomes white. FIG. 9 is an example of an image obtained by photographing the repair target surface ROS with the image sensor SS1. Although FIG. 9 shows the image in grayscale due to the constraints of the drawings in the patent specification, it may be a color image. FIG. 10 is an example in which the reference point RP of the defect CK is detected from the image of FIG. 9 by image processing.

[0050] Figure 11 shows an example of the processing flow in step S3 of Figure 7 when the shape measurement sensor SS is the image sensor SS1. Referring to Figure 11, in step S31, the control device CL controls the image sensor SS1 to capture an image of the surface ROS to be repaired. In other words, the repair program PG includes an instruction to control the image sensor SS1 to capture an image of the surface ROS to be repaired when executed by the control device CL. As a result, the control device CL obtains an image as shown in Figure 9.

[0051] Next, in step S32, the control device CL detects the region corresponding to the defective CK in the image detected by the image sensor SS1 through image processing. In other words, the repair program PG includes an instruction by the control device CL to detect the region corresponding to the defective CK in the image detected by the image sensor SS1 through image processing. For example, the control device CL detects pixels that are estimated to be defective CKs using feature quantities such as brightness, hue, saturation, and lightness of each pixel in the image. When using overexposure, typically the control device CL detects pixels that are estimated to be defective CKs if the brightness of each pixel in the image falls below a threshold. The control device CL then labels groups of pixels that represent the same defective CK among the pixels estimated to be defective CKs. Among the labeled groups of pixels, those with a small number of pixels are removed as noise, and the control device CL detects groups of labeled pixels that exceed a predetermined number as regions corresponding to defective CKs. Figure 10 shows each of the multiple defects CK as CK1 to CK3.

[0052] Next, in step S4 of Figure 7, the control device CL determines the first target point TP, which is the location of the defect CK on the first plane PL. In other words, the repair program PG includes an instruction to determine the first target point TP, which is the location of the defect CK on the first plane PL, when executed by the control device CL. Figure 12 is an example of the processing flow in step S4 of Figure 7 when the shape measurement sensor SS is the image sensor SS1. Referring to Figure 12, in step S41, the control device CL finds the reference point RP inside the region corresponding to the defect CK when the first plane PL is considered to be the surface ROS to be repaired. In other words, the repair program PG includes an instruction to find the reference point RP inside the region corresponding to the defect CK when the first plane PL is considered to be the surface ROS to be repaired. In a typical example, the control device CL uses the centroid of the region corresponding to the defect CK as the reference point RP. Alternatively, the control device CL may determine the position of the reference point RP in the image by using the average of the maximum and minimum values ​​of the vertical coordinate of the region corresponding to the defect CK as the vertical coordinate of the reference point RP, and the average of the maximum and minimum values ​​of the horizontal coordinate of the region corresponding to the defect CK as the horizontal coordinate of the reference point RP. In yet another example, the control device CL may determine the reference point RP of the defect CK as the pixel corresponding to the defect CK that is first discovered by scanning sequentially from a predetermined pixel. Figure 10 shows the reference points RP of defects CK1 to CK3 distinguished as RP1 to RP3.

[0053] In step S42, the control device CL determines the first target point TP by utilizing an affine transformation based on the reference point RP, the line of sight direction LoS of the image sensor SS1, the position of the viewpoint VP of the image sensor SS1, and the position and orientation of the first plane PL (the equation for the first plane PL). In other words, the repair program PG, when executed by the control device CL, includes an instruction to determine the first target point TP by utilizing an affine transformation based on the reference point RP, the line of sight direction LoS of the image sensor SS1, the position of the viewpoint VP of the image sensor SS1, and the position and orientation of the first plane PL (the equation for the first plane PL). Figure 13 shows the first target points TP corresponding to the reference points RP1 to RP3, distinguished and represented as first target points TP1 to TP3.

[0054] Next, in step S5 of Figure 7, the control device CL determines the tool diameter of the rotary tool T1 to be used to repair the defect CK. In other words, the repair program PG includes an instruction to determine the rotary tool T1 to be used to repair the defect CK when executed by the control device CL. This rotary tool T1 may be predetermined to have a tool diameter that is sufficiently larger than the expected size of the defect CK. Alternatively, the control device CL detects the pixel (shown as FP for defect CK1 in Figure 10) that is furthest from the reference point RP among the pixels labeled as the same defect CK in the above image, determines the three-dimensional position of that pixel by affine transformation, and estimates the minimum required tool diameter by calculating the distance to the first target point TP. If there are multiple defects CK (defects CK1 to CK3) as shown in Figure 10, the control device CL should determine the pixel furthest from each of the reference points RP1 to RP3 for each of the defects CK1 to CK3, and estimate the minimum required tool diameter to be the maximum distance between the position of those pixels in machine coordinates and the positions of each of the first target points TP1 to TP3. The control device CL should then determine the rotary tool T1 from among the available rotary tools T1 that has a tool diameter longer than this length. It is desirable that this rotary tool T1 be a ball end mill.

[0055] Subsequently, the control device CL controls the tool changer 109 to mount the determined rotary tool T1 onto the first machining head 116. In other words, the repair program PG includes instructions to control the tool changer 109 to mount the determined rotary tool T1 onto the first machining head 116 when executed by the control device CL.

[0056] Next, in step S6 of Figure 7, the control device CL controls the first machining head 116 to move the rotary tool T1, which is rotatably mounted on the first machining head 116 around the rotation axis A1, to the first target point TP. In other words, the repair program PG includes instructions to control the first machining head 116 to move the rotary tool T1, which is rotatably mounted on the first machining head 116 around the rotation axis A1, to the first target point TP when executed by the control device CL. Figure 13 shows the approach direction (first direction D1) in which the rotary tool T1 approaches the first target point TP in this manner.

[0057] Subsequently, in step S7 of Figure 7, the control device CL controls the first machining head 116 to move from the first target point TP to the first direction D1 by rotating the rotary tool T1 and orienting the rotation axis A1 in a first direction D1 perpendicular to the first plane PL, thereby cutting the object to be repaired (workpiece W) around the defect CK and forming a depression REC on the repair target surface ROS. In other words, the repair program PG includes instructions to control the first machining head 116 when executed by the control device CL to move from the first target point TP to the first direction D1 by rotating the rotary tool T1 and orienting the rotation axis A1 in a first direction D1 perpendicular to the first plane PL, thereby cutting the object to be repaired (workpiece W) around the defect CK and forming a depression REC on the repair target surface ROS. Here, if the shape measurement sensor SS is the image sensor SS1, the amount of movement from the first target point TP to the first direction D1 is predetermined. In other words, the depth of the depression REC in the first direction D1 from the surface to be repaired ROS (first plane PL) is predetermined. As shown in Figure 13, if there are multiple defects CK (defects CK1 to CK3), the operations of steps S6 and S7 are repeated for each of the defects CK1 to CK3. Figure 14 shows the depressions REC generated in this way as depressions REC1 to REC3.

[0058] Subsequently, in step S8 of Figure 7, the control device CL moves the cutting device 106 away from the workpiece W and brings the second machining head 122 closer to the workpiece W, as shown in Figure 4. Furthermore, as shown in Figure 14, the control device CL determines a second target point TAP located inside the outer circumference (circumference) CIR of the recess REC, with the second machining head 122 for adding molten metal to the recess REC, viewed in the first direction D1, based on the first target point TP, and controls the second machining head 122 to move to the second target point TAP for adding molten metal to the recess REC. In other words, the repair program PG, when executed by the control device CL, determines a second target point TAP located inside the outer circumference CIR of the recess REC when the second processing head 122 for adding molten metal to the recess REC is viewed in the first direction D1, based on the first target point TP, and provides instructions to control the second processing head 122 to move to the second target point TAP for adding molten metal to the recess REC.

[0059] Preferably, the second target point TAP is the same as the first target point TP. This is because, if the rotary tool T1 is a ball end mill, the deepest point DPP of the recess REC is a point that overlaps with the first target point TP when viewed in the first direction D1. However, if the second target point TAP is located inside the outer circumference CIR of the recess REC, molten metal can be added to the recess REC. If the second target point TAP is shifted from the first target point TP, the second target point TAP is a point on the first plane PL that is within the radius of the rotary tool T1 from the first target point TP, or a point shifted in the first direction D1 from that point. Therefore, determining the second target point TAP includes calculating the second target point TAP by the control device CL based on the position of the first target point TP and the tool diameter of the rotary tool T1. Figure 12 shows the second target point TAP as a point on the first plane PL that is within the radius of the rotary tool T1 from the first target point TP.

[0060] Subsequently, in step S9 of Figure 7, the control device CL determines the amount of molten metal to be added to the depression REC. The repair program PG includes an instruction to determine the amount of molten metal to be added to the depression REC when executed by the control device CL. As described above, the depth of the depression REC in the first direction D1 from the surface to be repaired ROS (first plane PL) is predetermined, so the control device CL calculates the volume of the depression REC based on the tool diameter of the rotary tool T1 and the depth of the depression REC. The control device CL determines the amount of molten metal to be added to the depression REC by adding an offset value to the calculated volume. In other words, the repair program PG includes an instruction to calculate the volume of the depression REC based on the tool diameter of the rotary tool T1 and the depth of the depression REC when executed by the control device CL. The repair program PG includes an instruction to determine the amount of molten metal to be added to the depression REC by adding an offset value to the calculated volume.

[0061] Subsequently, in step S10 of Figure 7, the control device CL controls the second processing head 122 to perform additive manufacturing by adding molten metal to the depressions REC. In other words, the repair program PG includes an instruction to control the second processing head 122 to perform additive manufacturing by adding molten metal to the depressions REC when executed by the control device CL. Specifically, the control device CL controls the second processing head 122 and the energy line transmission device, etc., to output energy lines such as a laser beam, arc discharge, or plasma while supplying molten metal to the workpiece W. Figure 15 shows the solidified molten metal added by additive manufacturing as a bump (bulge) BUL. Furthermore, the solidified molten metal added to each of the depressions REC1 to REC3 in Figure 14 is shown as bumps BUL1 to BUL3.

[0062] After additive manufacturing, in step S11 of Figure 7, the control device CL controls the first machining head 116 to move the finishing tool T2 attached to the first machining head 116 in order to perform finishing work to remove molten metal that has overflowed from the recess REC. In other words, the repair program PG includes instructions to control the first machining head 116 to move the finishing tool T2 attached to the first machining head 116 in order to perform finishing work to remove molten metal that has overflowed from the recess REC when executed by the control device CL. Preferably in this step, before moving the finishing tool T2, the control device CL controls the tool changer 109 to change the tool mounted on the first machining head 116 from the rotary tool T1 to the finishing tool T2. In other words, the repair program PG includes instructions to control the tool changer 109 to change the tool mounted on the first machining head 116 from the rotary tool T1 to the finishing tool T2. If the multi-tasking machine 100 is not equipped with a tool changer 109, the change from the rotary tool T1 to the finishing tool T2 may be performed manually.

[0063] Preferably, the finishing tool T2 is an end mill with a larger tool diameter than the rotary tool T1. However, the finishing tool T2 may be an end mill with a smaller tool diameter than the rotary tool T1 or with the same tool diameter. If the finishing tool T2 is an end mill with a larger tool diameter than the rotary tool T1, the control device CL may control the first machining head 116 to move the finishing tool T2 to the first target point TP. In other words, the repair program PG includes an instruction to control the first machining head 116 to move the finishing tool T2 to the first target point TP when executed by the control device CL. This efficiently removes the raised BUL. If the finishing tool T2 is an end mill with a smaller tool diameter than the rotary tool T1 or with the same tool diameter, the control device CL may control the first machining head 116 to move the finishing tool T2 along the circumference of a circle centered on the first target point TP on the first plane PL. In other words, the repair program PG includes instructions to control the first machining head 116 to move the finishing tool T2 on a circle centered on the first target point TP on the first plane PL when executed by the control device CL. <Operation and Effects of the Embodiment> In the defect repair method, composite machining apparatus 100, and repair program PG according to this embodiment, the control device CL determines the first target point TP, which is the position of the defect CK on the first plane PL, then controls the first machining head 116 to move the rotary tool T1, which is rotatably mounted on the first machining head 116 around the rotation axis A1, to the first target point TP, then determines the second target point TAP, which is located inside the outer circumference CIR of the depression REC when viewed in the first direction D1, based on the first target point TP, and controls the second machining head 122 to move the second machining head 122 for adding molten metal to the depression REC to the second target point TAP. Therefore, by extracting the second target point TAP from the first target point TP and using it in the repair program PG related to additive manufacturing, a fully automated defect repair method can be provided. <Modification> Figure 16 shows a modified example 100A of the composite processing apparatus in which a different moving mechanism is used instead of the second moving mechanism 108. The composite processing apparatus 100A is equipped with a second moving mechanism 108a instead of the second moving mechanism 108. The second moving mechanism 108a can move the additive manufacturing apparatus 120 in the X-axis direction and the Y-axis direction, in addition to the Z-axis direction in Figure 2.The second moving mechanism 108a can further rotate the additive manufacturing device 120 around a rotation axis horizontal to the Y-axis. When swapping the additive manufacturing device 120 with the cutting device 106, the second moving mechanism 108a lifts the additive manufacturing device 120 above the cutting device 106 (in the positive X-axis direction). This allows the additive manufacturing device 120 and the cutting device 106 to be rearranged so that they do not interfere with each other.

[0064] Figure 17 shows a modified example 100B of a composite machining apparatus in which a different movement mechanism is used to move the cutting machine 120 and the additive manufacturing machine 120 relative to the workpiece W by the same movement mechanism, instead of the first movement mechanism 107 and the second movement mechanism 108. The composite machining apparatus 100B includes a base 111, a saddle 112, and a column 113 instead of the first movement mechanism 107 and the second movement mechanism 108. The saddle 112 is supported so as to be movable in the left-right direction (Z direction in Figure 17) relative to the base 11. The column 113 is supported so as to be movable in the front-back direction (Y direction in Figure 17) relative to the saddle 112. The cutting machine 120 and the additive manufacturing machine 120 are supported so as to be movable in the up-down direction (X direction in Figure 17) relative to the column 113. In other words, the cutting machine 120 and the additive manufacturing machine 120 are supported so as to be movable in three directions perpendicular to each other relative to the base 111. The multi-tasking apparatus 10 includes a holding mechanism 105 that is rotatably supported around an axis horizontal in the front-rear direction relative to the base 20 (axis A2 in Figure 17) and an axis perpendicular to the said axis (axis A1 in Figure 17). The workpiece W held by the holding mechanism 105 is held rotatably in two directions relative to the base 111. Although the configuration of the moving mechanism differs between the multi-tasking apparatus 100A and the multi-tasking apparatus 100B, the control shown in Figure 7 can be performed in accordance with the moving mechanism. Therefore, this defect repair method and repair program PG are not limited to the multi-tasking apparatus 100, but are also applicable to the multi-tasking apparatus 100A and the multi-tasking apparatus 100B.

[0065] Next, a modified example will be described in which the shape measurement sensor SS is a three-dimensional scanner (3D scanner) SS2. This modified example will mainly describe the processing that differs from the processing when the shape measurement sensor SS is an image sensor SS1. Processing that is not described in this modified example can be considered to be the same as the processing when the shape measurement sensor SS is an image sensor SS1. Figure 18 shows the arrangement of the shape measurement sensor SS and the surface to be repaired ROS when the shape measurement sensor SS is a 3D scanner SS2. As shown in Figure 18, a typical 3D scanner SS2 has a laser output unit EM that emits lasers in a cross shape in the center, and two image sensors on either side of the laser output unit EM. In Figure 18, the viewpoints of these image sensors are shown as VP1 and VP. The intersection point P of the two linear lasers (shown as a dashed line and a dotted line in Figure 18) can be scanned on the surface to be repaired ROS by changing the optical system of the laser output unit EM. By utilizing the parallax between the two cameras at this intersection point P, the shape measurement sensor SS can detect the three-dimensional position of the intersection point P in its local coordinate system Xr-Yr-Zr.

[0066] The positional relationship between the reference point Or in the local coordinate system Xr-Yr-Zr and the reference position of the first processing head 116, which is determined by the control value of the first movement mechanism 107, is stored in memory 32 beforehand, and the position of the reference point Or in the machine coordinate system can be determined from the control value of the first movement mechanism 107. Furthermore, since the 3D scanner SS2 is also mounted on the first processing head 116 so as to be fixed in orientation around the rotation axis A1 as shown in Figure 3, rotation parameters for converting from the local coordinate system Xr-Yr-Zr to the machine coordinate system X-Y-Z can be determined from the control value of the first movement mechanism 107. Therefore, if the position of the intersection point P in the local coordinate system Xr-Yr-Zr is known, the position in the machine coordinate system can be determined. Figure 19 is a schematic diagram when a laser is shone on a defect CK. As shown in Figure 19, the laser position fluctuates in the defect CK area. By utilizing this fluctuation, it is possible to determine whether the ROS of the surface to be repaired is defective (CK) or not.

[0067] Figure 20 shows an example of the processing flow in step S3 of Figure 7 when the shape measurement sensor SS is a 3D scanner SS2. Referring to Figure 20, in step S33, the control device CL obtains first data relating to a first set of points on the repair target surface ROS that are estimated to be located at the surface position, from among the multiple points detected by the 3D scanner SS2. In other words, the repair program PG includes an instruction by the control device CL to obtain first data relating to a first set of points on the repair target surface ROS that are estimated to be located at the surface position, from among the multiple points detected by the 3D scanner SS2. This first data is three-dimensional position data relating to the portion shown on a roughly straight line in the schematic diagram of Figure 19. One detection method is, for example, to use the fact that the equation of the first plane PL is known and obtain the data using thresholding or the like based on the distance between the first plane PL and the three-dimensional position of the detected machine coordinates. Furthermore, since the shape model of the first plane PL is planar, the control device CL can determine the equation of the plane of the first plane PL by statistical estimation such as the least squares method from the three-dimensional positions of multiple points detected from the 3D scanner SS2, and determine the points whose distance from that plane does not exceed a predetermined threshold as the first multiple points estimated to be located on the surface. In step S34, the control device CL can consider points not included in the obtained first data as defects.

[0068] Figure 21 shows an example of the processing flow in step S4 of Figure 5 when the shape measurement sensor SS is a 3D scanner SS2. Referring to Figure 21, in step S43, the control device CL uses the obtained first data to determine a first parameter representing the surface position of the defect CK. That is, the repair program PG includes an instruction by the control device CL to obtain first data relating to a first set of points on the repair target surface ROS that are estimated to be located at the surface position from among the multiple points detected by the 3D scanner SS2. For example, the control device CL can use labeling from the first data to obtain a set of mechanical coordinates of points around the defect CK. The average value of these mechanical coordinates can be considered as the centroid position of the defect CK on the first plane PL. Therefore, the control device CL may, for example, obtain the average value of the mechanical coordinates of points around the defect CK as the first parameter. In step S34, the control device CL determines the first target point TP from the obtained first parameter. In other words, the repair program PG includes instructions for determining the first target point TP from the obtained first parameter. Specifically, the first parameter may be the machine coordinates of the first target point TP.

[0069] Furthermore, in step S7 described above, the amount of movement from the first target point TP to the first direction D1 is predetermined. However, if the shape measurement sensor SS is a 3D scanner SS2, the amount of movement can be determined based on the depth of the defect CK. In this case, the control device CL uses the plane equation of the first plane PL obtained in step S33 to determine the distance from the point corresponding to the defect CK to the first plane PL from the three-dimensional coordinates of the point. The control device CL can then determine the maximum value of this distance as a second parameter representing the depth of the defect CK in the first direction D1 from the surface ROS to be repaired. The control device CL then determines the amount by which the first processing head 116 is moved from the first target point TP to the first direction D1 in order to form the depression REC, based on the obtained second parameter. For example, the amount by which the first processing head 116 is moved from the first target point TP to the first direction D1 may be the second parameter plus a predetermined offset. In other words, the repair program PG, when executed by the control device CL, includes an instruction to determine the distance from the first plane PL to the three-dimensional coordinates of the point corresponding to the defect CK, using the plane equation of the first plane PL obtained in step S33. The repair program PG includes an instruction to determine the maximum value of this distance as a second parameter representing the depth of the defect CK in the first direction D1 from the surface to be repaired ROS. The repair program PG includes an instruction to determine the amount by which the first machining head 116 is moved from the first target point TP in the first direction D1 to form a depression REC, based on the obtained second parameter.

[0070] In the above embodiment, an example is shown where the surface ROS to be repaired is planar (first planar PL), but if the shape measurement sensor SS is a 3D scanner SS2, it may be other shapes. For example, it may be a cylindrical surface. In that case, it is preferable to prepare an equation for the shape model of the surface ROS to be repaired in advance, and the control device CL should use the least squares method or the like to find statistically plausible coefficient values ​​for the above equation. The first target point TP is a point on the shape model of the surface ROS to be repaired obtained in this way. The first direction D1 is preferably set in a direction perpendicular to the shape model of the surface ROS to be repaired at the first target point TP obtained in this way. Otherwise, the defect repair method according to the above embodiment can be applied similarly.

[0071] Some or all of the logic functions of the repair program PG described above may be implemented by a dedicated processor or integrated circuit. The repair program PG described above may not only be stored in memory 32, but may also be recorded on a storage medium that is removable from the computer and readable by the computer, such as a floppy disk, optical disk, CD-ROM and magnetic disk, SD card, USB memory, or external hard disk. Furthermore, although the hardware configuration diagram in Figure 6 shows an example in which one memory 32 stores the repair program PG and one processor 31 executes the repair program PG, the number of processors 31 and memories 32 in the control device CL is not limited to one. In addition, the repair program PG may have multiple program modules, and these multiple program modules may be stored in multiple different memories 32, and the multiple program modules may be executed by multiple different processors 32.

[0072] In this application, “equipped with” and its derivatives are non-restrictive terms that describe the existence of a component and do not exclude the existence of other components not described. This also applies to “having,” “including,” and their derivatives.

[0073] The terms "component," "part," "element," "body," and "structure" can have multiple meanings, such as a single part or multiple parts.

[0074] Ordinal numbers such as "first" and "second" are simply terms used to identify components and do not carry any other meaning (such as a specific order). For example, the existence of a "first element" does not implicitly mean the existence of a "second element," nor does the existence of a "second element" implicitly mean the existence of a "first element."

[0075] Unless otherwise specifically stated in the embodiments, terms such as "substantially," "about," and "approximately" can mean a reasonable deviation that does not significantly alter the final result. All numerical values ​​described in this application may be interpreted as including terms such as "substantially," "about," and "approximately."

[0076] In this application, the phrase "at least one of A and B" should be interpreted to include A only, B only, and both A and B.

[0077] Based on the above disclosure, it is clear that various changes and modifications to the present invention are possible. Therefore, the present invention may be implemented in a manner different from the specific disclosures of this application, without departing from the spirit of the invention.

Claims

1. A defect repair method comprising: detecting a defect on the surface of an object to be repaired using a shape measurement sensor; determining a first target point, which is the location of the defect on a first plane, using a control device; controlling a first processing head using the control device to move a rotary tool, which is rotatably mounted on a first processing head around a rotation axis, to the first target point; controlling the first processing head using the control device to cut the object to be repaired around the defect and form a depression on the surface of the object to be repaired by moving the first processing head from the first target point in a first direction while rotating the rotary tool and orienting the rotation axis in a first direction perpendicular to the first plane; determining a second target point located inside the outer circumference of the depression when viewed in the first direction, using the control device based on the first target point; controlling a second processing head using the control device to move a second processing head for adding molten metal to the depression to the second target point; and controlling the second processing head using the control device to perform additive manufacturing by adding the molten metal to the depression.

2. The defect repair method according to claim 1, wherein the second target point is the same as the first target point.

3. The defect repair method according to claim 1 or 2, wherein the rotating tool is a ball end mill.

4. The defect repair method according to claim 1, 3, or 4, wherein determining the second target point includes calculating the second target point using the control device based on the position of the first target point and the tool diameter of the rotating tool.

5. The defect repair method according to any one of claims 1 to 4, further comprising controlling the first machining head by the control device to move a finishing tool attached to the first machining head in order to perform a finishing process to remove the molten metal that has overflowed from the depression after the additive manufacturing process.

6. The defect repair method according to claim 5, wherein controlling the first machining head to move the finishing tool in order to perform the finishing work includes changing the tool attached to the first machining head from the rotary tool to the finishing tool.

7. The defect repair method according to any one of claims 1 to 6, wherein the shape measuring sensor is interchangeably mounted on the first processing head.

8. The defect repair method according to any one of claims 1 to 7, wherein the shape measuring sensor is an image sensor, and detecting the defect on the surface of the object to be repaired includes controlling the image sensor to photograph the surface to be repaired, and detecting the region corresponding to the defect in the image detected by the image sensor by image processing.

9. The defect repair method according to claim 8, wherein determining the first target point includes determining a reference point within the region when the first plane is considered to be the surface to be repaired, and determining the first target point based on the reference point, the line of sight direction of the image sensor, the viewpoint position of the image sensor, and the position and orientation of the first plane.

10. A defect repair method according to any one of claims 1 to 9, further comprising: the depth of the depression in the first direction from the surface to be repaired is predetermined; the control device determines the volume of the depression based on the tool diameter of the rotary tool and the depth of the depression before controlling the second processing head by the control device to perform the additive manufacturing; and the control device determines the amount of molten metal to be added to the depression by adding an offset value to the determined volume.

11. The defect repair method according to any one of claims 1 to 10, wherein the shape measurement sensor is a 3D scanner, and the control device obtains first data relating to a first plurality of points on the surface to be repaired that are estimated to be located at the surface position from among a plurality of points detected from the 3D scanner, the control device obtains first parameters representing the surface position of the defect using the obtained first data, and the control device determines the first target point from the obtained first parameters.

12. A defect repair method according to any one of claims 1 to 11, wherein the shape measurement sensor is a 3D scanner, and the control device obtains first data relating to a first plurality of points on the surface to be repaired that are estimated to be located at the surface position from among a plurality of points detected by the 3D scanner, the control device obtains a second parameter representing the depth of the defect in a first direction from the surface to be repaired using the obtained first data, and the amount by which the first processing head is moved in a first direction from a first target point to form the depression from the obtained second parameter.

13. A composite machining apparatus comprising: a control device configured to perform a defect repair method according to any one of claims 1 to 12; a first machining head configured to mount the rotary tool, the finishing tool, and the shape measuring sensor; a first actuator configured to move the first machining head; a second machining head; and a second actuator configured to move the second machining head, wherein the control device is configured to control the first actuator and the second actuator to move the first machining head and the second machining head.

14. The composite machining apparatus according to claim 13, further comprising a tool changing device configured to exchange the rotary tool, the finishing tool, and the shape measuring sensor that are mounted on the first machining head.

15. A computer program that, when executed by a numerical control computer which is a control device, includes an instruction to cause the numerical control computer to execute any of the defect repair methods described in claims 1 to 12.