Defect repair methods, combined processing equipment, computer programs

The integrated composite machining apparatus automates defect repair by seamlessly linking cutting, additive manufacturing, and finishing processes, addressing the inefficiencies of separate apparatuses and manual parameter determination in existing methods.

JP2026115803AActive Publication Date: 2026-07-09YAMAZAKI MAZAK KK

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
YAMAZAKI MAZAK KK
Filing Date
2024-12-27
Publication Date
2026-07-09

AI Technical Summary

Technical Problem

Existing defect repair methods require separate apparatuses for each process, necessitating manual determination of operation parameters and lacking seamless integration of processing results.

Method used

A fully automated defect repair method using a composite machining apparatus with integrated control device, processing heads, and sensors that automatically determine target points and perform cutting, additive manufacturing, and finishing processes, enabling seamless integration and automation.

Benefits of technology

The method achieves fully automated defect repair by extracting parameters from previous processes and passing them to the next process, ensuring efficient and accurate defect repair without manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026115803000001_ABST
    Figure 2026115803000001_ABST
Patent Text Reader

Abstract

We provide an automated defect repair method. [Solution] The defect repair method includes controlling a first processing head with a control device to move a rotary tool, which is rotatably mounted on the first processing head around a rotation axis, to a first target point, and controlling the first processing head with the control device to move 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 a first plane, thereby cutting the object to be repaired around the defect and 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, based on the first target point, controlling a second processing head with 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 with the control device to perform additive manufacturing by adding molten metal to the depression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

Background Art

[0002] There is known a defect repair method in which the position of a defect in a workpiece is acquired, cutting is performed based on the position of the defect, and then material is supplied to the portion where the cutting has been 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 portion, supplying material to the depression, and removing unnecessary portions of the cured portion when the supplied material is cured. In this process, inspection of the defect is performed by various sensors such as a camera, ultrasonic waves, elastic waves, and X-rays. Scraping off the defect is performed by a cutting mechanism such as a machining center or a removal processing mechanism by laser polishing. Supply of material to the defective portion is performed by a material supply mechanism including a nozzle or the like. Removal of unnecessary portions of the cured portion is performed by a shaping mechanism such as a blade or a file.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[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 manually determined based on the results of each process.

Means for Solving the Problems

[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 measuring 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, 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 rotating 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 a 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 the seventh aspect of this disclosure, in the 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 set of points on the surface to be repaired that are estimated to be located at surface positions from among a set 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 the 13th aspect of this disclosure, in a defect repair method according to any of the 1st to 12th aspects, 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 a 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 in order to form a depression is determined from the obtained second parameter.

[0018] A composite machining apparatus according to a 14th aspect of this disclosure comprises a control device configured to perform a defect repair method according to any of the 1st to 13th aspects, a first machining head configured to be fitted with 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 the 15th aspect of this disclosure, the composite machining apparatus according to the 14th aspect of this disclosure further comprises a tool changer for exchanging a rotary tool, a finishing tool, and a shape measuring sensor that are mounted on a first machining head.

[0020] The computer program according to the 16th 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 1st to 14th 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 aspect, the composite machining apparatus according to the fourteenth aspect including a control device configured to execute the defect repair method according to the third aspect, and the computer program according to the sixteenth aspect including an instruction to cause a numerical control computer to execute the defect repair method according to the third aspect, by using a ball end mill as the rotary tool, it is possible to form the depression so that the depression continuously expands from the center of the depression toward the outer periphery. Thereby, in the automated defect repair method, molten metal is uniformly added to the depression, and the occurrence of internal defects and the like is suppressed. In particular, when moving in the first direction from the first target point, it is possible to realize an automated defect repair method in which molten metal is uniformly added to the depression without creating a machining program for generating a specific path.

[0024] In the defect repair method according to the fourth aspect, the composite machining apparatus according to the fourteenth aspect including a control device configured to execute the defect repair method according to the fourth aspect, and the computer program according to the sixteenth aspect including an instruction to cause a numerical control computer to execute the defect repair method according to the fourth aspect, by determining the second target point within the tool diameter range of the rotary tool from the first target point when viewed in the first direction, it is possible to surely add molten metal to the depression.

[0025] In the defect repair method according to the fifth aspect, the composite machining apparatus according to the fourteenth aspect including a control device configured to execute the defect repair method according to the fifth aspect, and the computer program according to the sixteenth aspect including an instruction to cause a numerical control computer to execute the defect repair method according to the fifth aspect, since the molten metal overflowing from the depression can be removed by the finishing tool attached to the first machining head, the surface can be smoothed. Further, when the moving destinations of the rotary tool and the finishing tool are the common first target point, the process of extracting the moving destination of the finishing tool can be omitted.

[0026] In the defect repair method according to the sixth aspect, the composite machining apparatus according to the fourteenth aspect including a control device configured to execute the defect repair method according to the sixth aspect, and the computer program according to the sixteenth aspect including an instruction to cause a numerical control computer to execute the defect repair method according to the sixth aspect, since machining can be performed by a rotary tool and a finishing tool using the same first machining head, the composite machining apparatus can be formed compactly. In particular, in the composite machining apparatus according to the fifteenth aspect, since the rotary tool and the finishing tool can be exchanged by a tool changing device, the defect repair method can be fully automated.

[0027] In the defect repair method according to the seventh aspect, the composite machining apparatus according to the fourteenth aspect including a control device configured to execute the defect repair method according to the seventh aspect, and the computer program according to the sixteenth aspect including an instruction to cause a numerical control computer to execute the defect repair method according to the seventh aspect, highly accurate defect repair can be performed by matching 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 defect repair method according to the eighth aspect, the composite machining apparatus according to the fourteenth aspect including a control device configured to execute the defect repair method according to the eighth aspect, and the computer program according to the sixteenth aspect including an instruction to cause a numerical control computer to execute the defect repair method according to the eighth aspect, by attaching a shape measurement sensor to the first machining head that can be oriented in any position and posture, the shape measurement sensor can be adjusted to a position and orientation where it is easy to detect defects.

[0029] In the defect repair method according to the ninth aspect, the composite machining 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 including an instruction to cause a numerical control computer to execute the defect repair method according to the ninth aspect, by defining a first plane, a first target point can be obtained based on the region corresponding to the defect in the image.

[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, the first target point can be determined from the position of the reference point in the 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 multiple points detected from a 3D scanner to obtain an equation in the machine coordinates of the first plane and determine the 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. [Effects of the Invention]

[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. [Brief explanation of the drawing]

[0035] [Figure 1] Figure 1 is an example of a schematic configuration diagram of a composite processing apparatus according to the present invention. [Figure 2] Figure 2 is an example of another schematic configuration diagram of the composite processing apparatus according to the present invention. [Figure 3] Figure 3 is an enlarged view of the connection between the shape measurement sensor and the first processing head. [Figure 4] Figure 4 is an example of yet another schematic configuration diagram of the composite processing apparatus according to the embodiment. [Figure 5] Figure 5 is an example of yet another schematic configuration diagram of a composite machining apparatus equipped with a tool changing device according to the embodiment. [Figure 6] Figure 6 is a block diagram showing the internal configuration of the control device. [Figure 7] Figure 7 is a flowchart relating to a defect repair method implemented by the control device executing a repair program. [Figure 8] Figure 8 shows the arrangement of the shape measurement sensor and the surface to be repaired. [Figure 9] Figure 9 shows an example of an image of the surface to be repaired, captured by an image sensor. [Figure 10] Figure 10 shows an example of detecting a defect reference point from the image in Figure 7 using image processing. [Figure 11] Figure 11 shows an example of the processing flow in step S3 of Figure 7 when the shape measurement sensor is an image sensor. [Figure 12] Figure 12 shows an example of the processing flow in step S4 of Figure 7 when the shape measurement sensor is an image sensor. [Figure 13]Figure 13 shows the approach direction of the rotary tool. [Figure 14] Figure 14 shows the approach direction of the second machining head. [Figure 15] Figure 15 shows the approach direction of the finishing tool. [Figure 16] Figure 16 is an example of a schematic configuration diagram of another composite processing apparatus according to the embodiment. [Figure 17] Figure 17 is an example of a schematic configuration diagram of another composite processing apparatus according to the embodiment. [Figure 18] 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] Figure 19 is a schematic diagram of what happens when a laser is shone on a defective CK. [Figure 20] Figure 20 shows an example of the processing flow in step S3 of Figure 7 when the shape measurement sensor is a 3D scanner. [Figure 21] Figure 21 shows an example of the processing flow in step S4 of Figure 7 when the shape measurement sensor is an image sensor. [Modes for carrying out the invention]

[0036] The present invention will be described in detail below with reference to the drawings illustrating its embodiments. In the drawings, the same reference numerals indicate corresponding or substantially identical components. <Embodiment> <Configuration of the composite processing machine 100> Figure 1 shows a schematic configuration diagram of a 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 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 that performs 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, a touch panel, buttons, and a dial that the user uses to input information. In addition, the operation panel 102 also includes a machine control unit CL for controlling the combined machining 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 operations performed by the cutting machine 106 include turning operations 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 operations in which a milling tool attached to the first machining head 116 is brought into contact with the workpiece W, which is held stationary by the holding mechanism 105, while rotating. However, the cutting machine 106 may perform cutting operations other than those described above.

[0039] The first moving mechanism 107 can move the first machining head 116 in the X-axis and Y-axis directions, 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 and Z-axis directions 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 and a power converter configured to move the first machining head 116. 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 mounted on 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 as defined by the connection interface INT2, the orientation of the shape measurement sensor SS around the rotation axis A1 may be determined by calibration based on the measurement results of the shape measurement sensor SS, using a measurement standard provided in or on the workpiece W within the machining space where the workpiece W is placed. Alternatively, the shape measurement sensor SS may be connected to the first machining head 116 only by the tool interface INT1. In this case, the orientation of the shape measurement sensor SS around the rotation axis A1 may be determined by calibration based on the measurement results of the shape measurement sensor SS, using a measurement standard provided in or on the workpiece W within the machining space where the workpiece W is placed.

[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 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] The second moving mechanism 108 can move the second machining head 122 in the X-axis and Y-axis directions, in addition to the Z-axis direction as shown in Figures 1, 2, and 4. The second moving mechanism 108 can further rotate the additive manufacturing apparatus 120 around a rotation axis horizontal to the Y-axis. As shown in Figures 1, 2, and 4, the second moving mechanism 108 includes a second actuator ACT2 configured to move the second machining 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, the second moving mechanism 108 orients the robot arm upward (positive X-axis direction), as shown in Figures 1 and 2. This allows the additive manufacturing apparatus 120 and the cutting apparatus 106 to be rearranged so that they do not interfere with each other.

[0044] The composite machining apparatus 100 may also include a tool changer 109, as shown in Figure 5. The tool changer 109 is configured to change implements attached to the first machining head 116. In this embodiment, implements include a rotary tool T1 used for cutting, a finishing tool T2 used for finishing, and a shape measuring sensor SS. In other words, the tool changer 109 is configured to change the rotary tool T1, the finishing tool T2, and the shape measuring sensor SS attached to the first machining head 116. Specifically, the tool changer 109 includes a magazine arm 132 and a stocker 134. The magazine arm 132 is rotatable around an axis along the Z-axis. The magazine arm 132 is movable in the X-axis direction relative 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 onto the tool spindle 114, moving the other device, which is gripped 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 onto the tool spindle 114. <Internal configuration of the control unit 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 programmable electronic circuits. 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 unit (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 / 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 output 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 using the repair program> The repair program PG includes instructions for 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 apparatus 100 does not have a tool changer 109, the operator attaches the shape measurement sensor SS to the first machining head 116. If the composite machining apparatus 100 does have a tool changer 109, the control device CL controls the tool changer 109 to attach the shape measurement sensor SS to the first machining head 116. In other words, the repair program PG includes instructions for the control device CL to control the tool changer 109 to attach the shape measurement sensor SS to 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 measurement sensor SS in a position and orientation suitable for detecting the ROS on the surface to be repaired. In other words, the repair program PG includes instructions to control the first moving mechanism 107 so that, when executed by the control device CL, the shape measurement sensor SS is positioned in a location and orientation suitable for detecting the surface ROS to be repaired. This surface ROS to be repaired is the plane of the workpiece W that is the target of defect detection CK by the shape measurement 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 machining head 116, determined by the control value of the first movement mechanism 107, and the position of the viewpoint VP of the image sensor SS1 (camera) is stored in 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 movement mechanism 107. The relationship between the orientation of the first machining head 116, determined by the control value of the first movement mechanism 107, and the vector of the line of sight direction LoS of the image sensor SS1 (camera) is stored in 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 movement 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 memory 32.

[0048] Next, in step S2 of Figure 7, the control device CL determines the shape model of the first plane PL defined in the machine coordinate system for the surface ROS to be repaired. The shape model of the first plane PL is expressed by the equation of a plane in the machine coordinate system where the surface ROS to be repaired is presumed to exist. Figure 8 shows an example where the first plane PL is oriented parallel to the XY plane of the machine coordinate system, and for example, the shape model of the first plane PL can be expressed as Z=a (where a is a constant). This equation of the plane may be calculated by the control device CL from the three-dimensional shape model of the workpiece W and the method of holding the workpiece W by the holding mechanism 105. Alternatively, the user may input parameters for defining the first plane PL based on the arrangement of the workpiece W (for example, the z-coordinate value if the surface ROS to be repaired is previously oriented parallel to the XY plane of the machine coordinate system) 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 pre-positions the workpiece W so that the first plane PL is perpendicular to the default orientation of the first machining head 116, or the holding mechanism 105 pre-positions the workpiece W so that the first plane PL is perpendicular to the default orientation of the first machining head 116.

[0049] Next, in step S3 of Figure 7, the control device CL detects a defect CK in the ROS surface of the object to be repaired (workpiece W) using the shape measurement sensor SS. In other words, the repair program PG includes an instruction to detect a defect CK in the ROS surface of the object to be repaired (workpiece W) using the shape measurement sensor SS when executed by the control device CL. A detailed example of the case where the shape measurement sensor SS is an image sensor SS1 will be described below. The composite processing apparatus 100 has lighting (not shown) that can shine strong light on the ROS surface to be repaired such that areas without defects CK are overexposed. Figure 9 is an example of an image of the ROS surface to be repaired captured by the image sensor SS1. Figure 9 is displayed in grayscale due to the limitations of the drawings in the patent specification, but it may be a color image. Figure 10 is an example of detecting the reference point RP of the defect CK from the image in Figure 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 defect 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 defect 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 defect 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 defect 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 defect CK. 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 defect CKs. Figure 10 shows each of the multiple defect CKs distinguished 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 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 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 defect CK as the pixel corresponding to 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 (equation for the first plane PL). In other words, the repair program PG, when executed by the control device CL, includes instructions 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 (equation for the first plane PL). Figure 13 shows the first target points TP corresponding to the reference points RP1 to RP3, distinguished as first target points TP1 to TP3, respectively.

[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 furthest from the reference point RP among the pixels labeled as the same defect CK in the above image (shown as FP for defect CK1 in Figure 10), determines the three-dimensional position of that pixel using 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 the 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 surface ROS to be repaired. 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 the 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 surface ROS to be repaired. Here, if the shape measurement sensor SS is an 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), 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 CIR of the recess REC when the second machining head 122 is 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, includes instructions to determine a second target point TAP located inside the outer circumference CIR of the recess REC when the second machining head 122 is viewed in the first direction D1, based on the first target point TP, and to control the second machining 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 the 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 either 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 involves calculating the second target point TAP using 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 instructions for determining 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 instructions for calculating 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 instructions for determining 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 depression REC. In other words, the repair program PG includes instructions to control the second processing head 122 to perform additive manufacturing by adding molten metal to the depression REC when executed by the control device CL. Specifically, the control device CL supplies molten metal to the workpiece W and 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. Figure 15 shows the solidified molten metal added by additive manufacturing as bulges (BUL). Furthermore, the solidified molten metal added to each of the depressions REC1 to REC3 in Figure 14 is shown as bulges 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 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 to perform finishing work to remove molten metal that has overflowed from the recess REC when executed by the control device CL. In this step, preferably, 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. That is, the repair program PG includes instructions 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 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 so that the finishing tool T2 moves along a circle centered on the first target point TP on the first plane PL when executed by the control device CL. <Effects and Effects of the Embodiment> In the defect repair method, composite processing apparatus 100, and repair program PG according to this embodiment, the control device CL determines a first target point TP, which is the position of defect CK on a first plane PL. Then, the control device CL controls the first processing head 116 to move a rotary tool T1, which is rotatably mounted on the first processing head 116 around a rotation axis A1, to the first target point TP. Based on the first target point TP, the control device CL determines a second target point TAP, which is located inside the outer circumference CIR of the depression REC when viewed in a first direction D1. The control device CL controls the second processing head 122 to move the second processing head 122 to the second target point TAP for adding molten metal to the depression REC. 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. <Variation> Figure 16 shows a modified example 100A of the composite machining apparatus in which a different movement mechanism is used instead of the second movement mechanism 108. The composite machining apparatus 100A is equipped with a second movement mechanism 108a instead of the second movement mechanism 108. The second movement 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 movement mechanism 108a can further rotate the additive manufacturing apparatus 120 around a rotation axis horizontal to the Y-axis. When swapping the additive manufacturing apparatus 120 and the cutting apparatus 106, the second movement mechanism 108a lifts the additive manufacturing apparatus 120 above the cutting apparatus 106 (in the positive X-axis direction). This allows the additive manufacturing apparatus 120 and the cutting apparatus 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 3D scanner SS2. This modified example will focus on 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 ROS to be repaired 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 ROS to be repaired 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 machining 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 machining head 116 so that its orientation around the rotation axis A1 as shown in Figure 3 is fixed relative to the first machining head 116, rotation parameters for converting from the local coordinate system Xr-Yr-Zr to the machine coordinate system XYZ 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. This fluctuation can be used to determine whether the ROS surface to be repaired is a defect 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 based on the distance between the first plane PL and the three-dimensional position of the detected machine coordinates using thresholding or the like. 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. That is, the repair program PG includes an instruction to determine 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 to the defect CK to the first plane PL from the 3D 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 to be repaired ROS. The control device CL then determines the amount by which the first machining 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 machining 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 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 determined 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. Each of the repair programs 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 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 "~member," "~part," "~element," "~body," and "~structure" can have multiple meanings, such as a single part or multiple parts.

[0074] Ordinal numbers such as "1st" and "2nd" 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 "1st element" does not implicitly mean the existence of a "2nd element," nor does the existence of a "2nd element" implicitly mean the existence of a "1st 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 shape measurement sensor detects defects on the surface of the object to be repaired. The control device determines the first target point, which is the location of the defect on the first plane. The control device controls the first machining head so as to move a rotary tool, which is rotatably mounted on the first machining head around a rotation axis, to the first target point. The control device controls the first machining head so as to move the first machining head from the first target point in the first direction while rotating the rotary tool, with the rotation axis directed in a first direction perpendicular to the first plane, thereby cutting the object to be repaired around the defect and forming a depression on the surface of the object to be repaired. Based on the first target point, the control device determines a second target point located inside the outer circumference of the recess when viewed in the first direction, and the control device controls the second processing head to move the second processing head for adding molten metal to the recess to the second target point. The control device controls the second processing head to perform additive manufacturing by adding the molten metal to the depression. Including, Defect repair methods.

2. The second target point is the same as the first target point. The defect repair method described in claim 1.

3. The aforementioned rotating tool is a ball end mill. The defect repair method described in claim 1.

4. Determining the second target point involves the control device calculating the second target point based on the position of the first target point and the tool diameter of the rotating tool. Including, The defect repair method described in claim 1.

5. The control device further includes controlling the first machining head 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 recess after the additive manufacturing process, The defect repair method described in claim 1.

6. Controlling the first machining head to move the finishing tool in order to perform the finishing process includes changing the tool mounted on the first machining head from the rotary tool to the finishing tool. The defect repair method described in claim 5.

7. The defect repair method according to claim 1, wherein the shape measuring sensor is interchangeably mounted on the first processing head.

8. The shape measuring sensor is an image sensor, Detecting the defect on the surface of the object to be repaired is, The image sensor is controlled to capture an image of the surface to be repaired. The region corresponding to the defect in the image detected by the image sensor is detected by image processing. Including, The defect repair method described in claim 1.

9. Determining the first target point is When the first plane is considered to be the surface to be repaired, a reference point is determined within the region. Based on the aforementioned 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, the first target point is determined. Including, The defect repair method according to claim 8.

10. The depth of the depression in the first direction from the surface to be repaired is predetermined. Before controlling the second processing head by the control device to perform the additive manufacturing, Based on the tool diameter of the rotating tool and the depth of the recess, the control device determines the volume of the recess. The control device determines, by adding an offset value to the calculated volume, the amount of molten metal to be added to the depression. This further includes, The defect repair method described in claim 1.

11. The shape measurement sensor is a 3D scanner, The control device obtains first data relating to a first set of points on the surface to be repaired that are estimated to be located at the surface position among the multiple 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 the control device determines the first target point from the obtained first parameters. The defect repair method described in claim 1.

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

13. A control device configured to perform any defect repair method according to claim 1 to 12, The first machining head is configured to be equipped with the rotary tool, the finishing tool, and the shape measuring sensor, A first actuator configured to move the first machining head, The second processing head and, A second actuator configured to move the second machining head, Equipped with, 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. Composite processing equipment.

14. The system further comprises 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. The composite processing apparatus according to claim 13.

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.