Measurement program generation method and three-dimensional coordinate measuring machine

JP2024061276A5Active Publication Date: 2025-09-05TOKYO SEIMITSU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2022169127
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2025-09-05
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

Conventional methods for generating measurement programs for three-dimensional coordinate measuring machines are prone to human error and are complex, especially for users with limited experience, and existing techniques do not allow for fully automated program generation.

Method used

A method and machine that automatically generate a measurement program by setting intermediate points along the probe's movement trajectory, approximating it with straight lines, and adjusting thresholds to detect intersections, allowing for automated path planning without manual intervention.

Benefits of technology

Enables anyone to generate a measurement program free from malfunctions, reducing human error and complexity, and facilitating easy use by users with little knowledge of the machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide a measurement program generation method and a three-dimensional coordinate measuring machine allowing anyone to automatically and easily generate a measurement program without any risk of malfunction.SOLUTION: A measurement program generation method includes: a manual operation step (step S2) to execute measurement element designation operation M1 for bringing a probe 24a into contact with all measurement points P of measurement elements and measurement element determination operation M2 showing completion of measurement element designation operation; a coordinate value acquisition step (step S5) to acquire coordinate values of all the measurement points P on which the probe 24a abut; a first intermediate point setting step (step S6) to set a first intermediate point C1 each time when coordinate values of measurement points are acquired in the coordinate value acquisition step; a second intermediate point setting step (step S8) to set a position of a probe as a second intermediate point C2 when measurement element determination operation is executed; and a third intermediate point setting step (step S3) to set a third intermediate point C3 during movement of a probe in the manual operation step.SELECTED DRAWING: Figure 15
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a measurement program generating method for generating a measurement program for a three-dimensional coordinate measuring machine, and to a three-dimensional coordinate measuring machine. [Background technology]

[0002] Conventionally, there is known a three-dimensional coordinate measuring machine that has a drive unit that displaces the position and attitude of a probe, and performs various measurements such as the dimensions and shape of a measurement element by contacting the probe with each of a plurality of measurement elements (e.g., lines, circular holes, planes, spheres, etc.) formed on a workpiece (object to be measured).

[0003] In such a three-dimensional coordinate measuring machine, there are cases where the measurement of each measurement element of a plurality of workpieces having the same shape is repeatedly performed, and in such cases, there is a demand for ensuring the reproducibility of the measurement results in the quality control process and promoting labor saving. For this reason, the three-dimensional coordinate measuring machine generates a measurement program that indicates the measurement path of the probe based on the measurement order of the plurality of measurement elements and the positions of the measurement points (coordinates of the contact points of the probe) for each measurement element. Then, the three-dimensional coordinate measuring machine measures each measurement element of the workpiece while displacing the position and attitude of the probe based on the measurement program (for example, see Patent Document 1). [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Japanese Patent Application Publication No. 6-213649 Summary of the Invention [Problem to be solved by the invention]

[0005] Conventionally, a measurement program for a three-dimensional coordinate measuring machine is semi-automatically generated by a user manually defining a measurement path of a probe (a measurement order of measurement elements and a measurement point of the measurement elements). Alternatively, a technique is known in which a measurement program is automatically generated based on design information of a workpiece, for example, CAD (Computer Aided Design) data.

[0006] However, the former method has a problem that malfunctions due to human error (such as incorrect setting of the measurement path) may occur, and furthermore, there is a risk of complicated operations. Also, the latter method has a problem that the barrier to introduction is high for users who have just introduced a three-dimensional coordinate measuring machine or users who do not have much time to devote to operating a three-dimensional coordinate measuring machine, that is, users who have little knowledge of three-dimensional coordinate measuring machines.

[0007] Furthermore, Patent Document 1 does not disclose a method for completely automatically generating a measurement program.

[0008] The present invention has been made in consideration of the above circumstances, and has an object to provide a measurement program generation method and a three-dimensional coordinate measuring machine that allow anyone to easily and automatically generate a measurement program that is free from the risk of malfunction. [Means for solving the problem]

[0009] A measurement program generation method for achieving the object of the present invention is a measurement program generation method for generating a measurement program representing a measurement path of a probe in a three-dimensional coordinate measuring machine which uses a probe to measure one or more measurement elements of a workpiece, the measurement program generation method including a manual operation step of manually performing a measurement element designation operation of bringing the probe into contact with all measurement points of the measurement elements and a measurement element confirmation operation indicating the end of the measurement element designation operation for all measurement elements, a coordinate value acquisition step of acquiring coordinate values ​​of all measurement points contacted by the probe, and each time a coordinate value of a measurement point is acquired in the coordinate value acquisition step, a measurement element determination step of acquiring a measurement element coordinate value for each measurement point based on the coordinate value of the measurement point and the contact direction of the probe with respect to the measurement point. the first intermediate point setting step being a first intermediate point setting step for setting the position of the probe when the measurement element determination operation is executed as the second intermediate point; a second intermediate point setting step being a second intermediate point setting step for acquiring a movement trajectory of the probe during the movement of the probe in the manual operation step, approximating the movement trajectory using only a plurality of straight lines, and setting a third intermediate point at an intersection of the different straight lines; and a program generation step for generating a measurement program based on the coordinate values ​​of the measurement point acquired in the coordinate value acquisition step, the coordinate values ​​of the second intermediate point set in the second intermediate point setting step, and the coordinate values ​​of the third intermediate point set in the third intermediate point setting step.

[0010] According to this measurement program generating method, the first to third intermediate points can be automatically set while the user is performing a teaching operation, so that the measurement program can be automatically generated.

[0011] In a measurement program generating method according to another aspect of the present invention, the manual operation step includes a retraction operation for manually retracting the probe from the object to be measured to an exchange position where the probe can be exchanged, and a fourth intermediate point setting step for setting the exchange position as a fourth intermediate point when the retraction operation is executed, and in the program generating step, when the retraction operation is executed, a measurement program is generated based on the coordinate value of the measurement point, the coordinate value of the second intermediate point, the coordinate value of the third intermediate point, and the coordinate value of the fourth intermediate point set in the fourth intermediate point setting step. This makes it possible to automatically set the first to fourth intermediate points while a teaching operation is being executed by a user, and therefore it is possible to automatically generate a measurement program.

[0012] In a measurement program generation method according to another aspect of the present invention, the third intermediate point setting step performs straight-line fitting on the movement trajectory to approximate the movement trajectory using only a plurality of straight lines. This makes it possible to approximate the movement trajectory using only a plurality of straight lines and set the third intermediate point at an intersection of the mutually different straight lines.

[0013] In a measurement program generating method according to another aspect of the present invention, the third intermediate point setting step includes a repeating calculation step for repeatedly calculating a fitting line for a movement trajectory of the probe from an initial position to a current position of the probe during the movement of the probe until the probe reaches the first intersection, and calculating a fitting error which is the error between the fitting line and the movement trajectory, and a determination step for determining whether the probe has passed a new intersection based on whether the fitting error is larger than a predetermined threshold each time the fitting error is calculated in the repeating calculation step, the threshold being changeable, whereby the discrimination strength of a straight section of the movement trajectory of the probe (the allowable range for regarding it as a straight section) can be adjusted.

[0014] In a measurement program generating method according to another aspect of the present invention, the third intermediate point setting step includes a repeating calculation step for repeatedly calculating a fitting line for a movement trajectory from the previous intersection to the current position of the probe while the probe is moving, and calculating a fitting error which is the error between the fitting line and the movement trajectory, and a determination step for determining whether the probe has passed a new intersection each time the fitting error is calculated in the repeating calculation step based on whether the fitting error is larger than a predetermined threshold, the threshold being changeable, whereby the discrimination strength of the straight section of the movement trajectory of the probe (the allowable range for regarding it as a straight section) can be adjusted.

[0015] A three-dimensional coordinate measuring machine for achieving the object of the present invention is a three-dimensional coordinate measuring machine which uses a probe to measure one or more measurement elements of a workpiece, and which includes a manual operation unit which can manually execute, for all measurement elements, a measurement element designation operation which brings the probe into contact with all measurement points of the measurement elements and a measurement element confirmation operation which indicates the end of the measurement element designation operation, a coordinate value acquisition unit which acquires the coordinate values ​​of all measurement points which the probe has contacted, and, each time the coordinate value acquisition unit acquires the coordinate value of a measurement point, an offset from the measurement point in the opposite direction to the contact direction based on the coordinate value of the measurement point and the contact direction of the probe with respect to the measurement point. the coordinate value of the measurement point acquired by the coordinate value acquisition unit, the coordinate value of the second intermediate point set by the second intermediate point setting unit, and the coordinate value of the third intermediate point set by the third intermediate point setting unit.

[0016] In another aspect of the three-dimensional coordinate measuring machine of the present invention, the manual operation unit is capable of performing a retraction operation to manually retract the probe from the object to be measured to an exchange position where the probe can be replaced, and is provided with a fourth intermediate point setting unit that sets the exchange position as a fourth intermediate point when the retraction operation is performed by the manual operation unit, and the program generation unit generates a measurement program based on the coordinate value of the measurement point, the coordinate value of the second intermediate point, the coordinate value of the third intermediate point, and the coordinate value of the fourth intermediate point set by the fourth intermediate point setting unit when the retraction operation is performed by the manual operation unit. Effect of the Invention

[0017] The present invention enables anyone to easily and automatically generate a measurement program that is free from the risk of malfunction. [Brief description of the drawings]

[0018] [Figure 1] FIG. 2 is an external perspective view of a three-dimensional coordinate measuring machine. [Diagram 2] FIG. 2 is a functional block diagram of a computer. [Diagram 3] FIG. 11 is an explanatory diagram showing an example of a measurement program generation start screen displayed on a display unit; [Figure 4] FIG. 11 is an explanatory diagram for explaining a teaching operation for one measurement element of a workpiece. [Diagram 5] 11 is an explanatory diagram for explaining acquisition of coordinate values ​​of a measurement point by a coordinate value acquisition unit during execution of a measurement element designation operation, and setting of a first intermediate point by a first intermediate point setting unit. FIG. [Figure 6] FIG. 11 is an explanatory diagram for explaining setting of a second intermediate point by a second intermediate point setting unit. [Figure 7] FIG. 11 is an explanatory diagram showing an example of a movement trajectory of a probe during a teaching operation. [Figure 8] FIG. 13 is an explanatory diagram for explaining the calculation of a fitting line and the calculation of a fitting error by the third intermediate point setting unit. [Figure 9] 13 is a table showing calculation results of fitting errors by the third intermediate point setting unit. [Figure 10]13 is a table showing calculation results of fitting errors by the third intermediate point setting unit. [Figure 11] Symbol XIA is a diagram showing an example where the result of the fitting error calculation by the third intermediate point setting unit is below the threshold value, and symbol XIB is a diagram showing an example where the result of the fitting error calculation by the third intermediate point setting unit is greater than the threshold value. [Figure 12] FIG. 13 is an explanatory diagram for explaining a threshold change screen displayed on the display unit; [Figure 13] FIG. 11 is an explanatory diagram for explaining setting of a third intermediate point by a third intermediate point setting unit. [Figure 14] FIG. 11 is an explanatory diagram for explaining setting of a fourth intermediate point by a fourth intermediate point setting unit. [Figure 15] 11 is an explanatory diagram for explaining generation of a measurement program by a measurement program generating unit; FIG. [Figure 16] 11 is a flowchart showing a flow of a measurement program generation process performed by the three-dimensional coordinate measuring machine. [Figure 17] 13 is a flowchart showing a flow of a third intermediate point setting process performed by a third intermediate point setting unit. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] [Configuration of 3D coordinate measuring machine] FIG. 1 is an external perspective view of a three-dimensional coordinate measuring machine (CMM) 10. The three-dimensional coordinate measuring machine 10 measures the shapes of all measurement elements (e.g., holes, convex portions, grooves, etc.) of a workpiece W, which is an object to be measured (measurement target), while displacing the position and posture of a probe 24a. Note that the number of measurement elements of the workpiece W (one or more) is not particularly limited, but the following description will be given assuming that there are more than one measurement element. Also, the XYZ axes in FIG. 1 are a machine coordinate system that is determined based on a machine coordinate origin specific to the three-dimensional coordinate measuring machine 10.

[0020] 1, the three-dimensional coordinate measuring machine 10 includes a base 12, a table 14 (base plate) provided on the base 12, a right Y carriage 16R and a left Y carriage 16L provided upright on both ends of the table 14, and an X guide 18 connecting the upper parts of the right Y carriage 16R and the left Y carriage 16L. A gate-shaped frame 26 is formed by the right Y carriage 16R, the left Y carriage 16L, and the X guide 18.

[0021] Sliding surfaces along which the right Y carriage 16R and the left Y carriage 16L slide in the Y-axis direction are formed on the upper surface and side surfaces of both ends of the table 14. In addition, the right Y carriage 16R and the left Y carriage 16L are provided with air bearings (not shown) at positions facing the sliding surfaces of the table 14. This allows the right Y carriage 16R and the left Y carriage 16L to move freely in the Y-axis direction together with the X guide 18.

[0022] An X-carriage 20 is attached to X-guide 18. A sliding surface along the X-axis direction along which X-carriage 20 slides is formed on this X-guide 18. Also, an air bearing (not shown) is provided on X-carriage 20 at a position facing the sliding surface of X-guide 18. This allows X-carriage 20 to move freely along X-guide 18 (X-axis direction).

[0023] A Z carriage (also called a Z spindle) 22 is attached to the X carriage 20. In addition, an air bearing (not shown) for guiding the Z carriage 22 in the Z axis direction is provided to the X carriage 20. This allows the Z carriage 22 to be held by the X carriage 20 so as to be movable in the Z axis direction.

[0024] The probe head 24 is, for example, a five-axis simultaneously controlled probe head equipped with a stepless positioning mechanism, and holds a contact-type touch trigger probe 24a. The probe 24a includes a known stylus and contactor. The type of the probe 24a is not particularly limited.

[0025] The probe head 24 is provided with a probe driver 35 (see FIG. 2), such as a motor that rotates the probe 24a in directions around two mutually perpendicular rotation axes A and B. This makes it possible to continuously adjust the rotation angle θ1 of the probe 24a around the rotation axis A and the rotation angle θ2 of the probe 24a around the rotation axis B, respectively, and as a result, the attitude of the probe 24a can be displaced (rotated) as desired.

[0026] The three-dimensional coordinate measuring machine 10 is also provided with an XYZ driving unit 36 ​​(see FIG. 2) such as a motor including a Y-axis driving unit for moving the gate-shaped frame 26 in the Y-axis direction, an X-axis driving unit for moving the X-carriage 20 in the X-axis direction, and a Z-axis driving unit for moving the Z-carriage 22 in the Z-axis direction. This allows the probe head 24 and the probe 24a to move in three mutually orthogonal axial directions (X, Y, and Z axial directions). The probe driving unit 35 and the XYZ driving unit 36 ​​allow the position and posture of the probe 24a to be freely displaced, and the probe 24a can be displaced (moved and rotated) as desired.

[0027] A Y-axis direction linear scale (not shown) is provided at the end of right Y carriage 16R side of table 14. In addition, an X-axis direction linear scale (not shown) is provided on X guide 18, and a Z-axis direction linear scale (not shown) is provided on Z carriage 22.

[0028] On the other hand, the right Y-carriage 16R is provided with a Y-axis position detection head (not shown) that reads the Y-axis linear scale. The X-carriage 20 is also provided with an X-axis position detection head (not shown) and a Z-axis position detection head (not shown) that read the X-axis linear scale and the Z-axis linear scale, respectively. Furthermore, the probe head 24 is provided with a rotation angle detection unit (not shown) such as a rotary encoder that detects the rotation angles θ1 and θ2 of the probe 24a, respectively. Based on the detection results of the XYZ-axis position detection head and the detection results of the rotation angle detection unit, the coordinate values ​​in the XYZ-axis directions of the measurement point when the tip (contact) of the probe 24a contacts the measurement point (point required to measure the shape of the measurement element) of each measurement element (straight line, circular hole, plane, sphere, etc.) of the workpiece W can be detected.

[0029] The three-dimensional coordinate measuring machine 10 is equipped with a drive controller 28 that controls a probe driving unit 35 and an XYZ driving unit 36 ​​shown in Fig. 2 described later to control the movement of the probe head 24, i.e., the displacement of the position and posture of the probe 24a. Here, the three-dimensional coordinate measuring machine 10 has an automatic measurement mode in which the measurement of each measurement element of the workpiece W is automatically performed, and a manual measurement mode in which the measurement is performed manually. Therefore, in the automatic measurement mode, the drive controller 28 controls the probe driving unit 35 and the XYZ driving unit 36 ​​under the control of a computer 32 described later to displace the position and posture of the probe 24a.

[0030] The drive controller 28 is also provided with a probe operation unit 28a (corresponding to the manual operation unit of the present invention) such as a joystick for manually operating the displacement of the position and attitude of the probe 24a. Therefore, in the manual measurement mode, the drive controller 28 controls the probe drive unit 35 and the XYZ drive unit 36 ​​in response to an operation input to the probe operation unit 28a, thereby displacing the position and attitude of the probe 24a.

[0031] A contact detection sensor (not shown) of the contact touch trigger probe 24a, the XYZ axis direction detection head (not shown) and the rotation angle detection unit (not shown) are connected to the drive controller 28. Then, the moment the contact detection sensor detects that the probe 24a has come into contact with the measurement point of each measurement element of the workpiece W, the drive controller 28 acquires the detection results of the XYZ axis direction detection head and the rotation angle detection unit, and detects the coordinate values ​​(three-dimensional coordinate values) of the measurement point in the XYZ axis directions. The coordinate values ​​of the measurement point in the XYZ axis directions are output from the drive controller 28 to the computer 32.

[0032] The computer 32 is connected to the drive controller 28 via various communication interfaces 30 such as a LAN (Local Area Network) so as to be able to perform data communications with the drive controller 28. The computer 32 functions as a control device for the three-dimensional coordinate measuring machine 10 together with the drive controller 28, and controls the shape measurement of all measurement elements of the workpiece W, the generation of a measurement program 37 (see FIG. 2), and the like.

[0033] A software program 32a is installed in the computer 32. The computer 32 executes the software program 32a to create a measurement program 37 (see FIG. 2) that represents the measurement path of the probe 24a [for example, the measurement order of each measurement element, coordinate values ​​indicating all measurement points for each measurement element, and coordinate values ​​of intermediate points that are movement path points of the probe 24a, etc.]. Then, in the automatic measurement mode of the three-dimensional coordinate measuring machine 10, the computer 32 drives a probe driver 35 and an XYZ driver 36 shown in FIG. 2, which will be described later, via the drive controller 28 based on the measurement program 37, thereby acquiring the coordinate values ​​of all measurement points for each measurement element of the workpiece W by the probe 24a, and performing shape calculations for each measurement element, etc.

[0034] On the other hand, when the three-dimensional coordinate measuring machine 10 is in the manual measurement mode, the computer 32 causes the display unit 38 to display the positions of all the measurement points for each measurement element based on a measurement program 37 (see FIG. 2) described later. This allows the user to operate the probe operation unit 28a in accordance with the display on the display unit 38 to drive the probe drive unit 35 and the XYZ drive unit 36 ​​shown in FIG. 2 described later via the drive controller 28, thereby obtaining the coordinate values ​​of all the measurement points for each measurement element of the workpiece W by the probe 24a. As a result, the computer 32 can execute shape calculations for each measurement element.

[0035] The display unit 38 is connected to the computer 32. The computer 32 displays various information on the three-dimensional coordinate measuring machine 10, such as the coordinate values ​​of the measurement points for each measurement element in the manual measurement mode (also possible in the automatic measurement mode), and operation instructions, on the display unit 38. The computer 32 also displays various menu screens (see, for example, FIGS. 3 and 12) on the display unit 38 when generating a measurement program 37 described later.

[0036] [Computer Functions] 2 is a functional block diagram of the computer 32. As shown in FIG. 2, the computer 32 includes a control unit 40 that controls the overall operation of each unit of the three-dimensional coordinate measuring machine 10.

[0037] The control unit 40 includes an arithmetic circuit configured with various processors and memories, etc. The various processors include a central processing unit (CPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), and a programmable logic device (e.g., simple programmable logic devices (SPLD), complex programmable logic devices (CPLD), and field programmable gate arrays (FPGA)). The various functions of the control unit 40 may be realized by one processor, or may be realized by multiple processors of the same or different types.

[0038] The control unit 40 also includes a storage unit 41 that stores the software program 32a and a measurement program 37 described below. The control unit 40 executes the software program 32a in the storage unit 41 to function as a drive control unit 42, a coordinate value acquisition unit 44, and a shape calculation unit 46 when measuring each measurement element of the workpiece W. The control unit 40 also executes the software program 32a to function as a first intermediate point setting unit 48, a second intermediate point setting unit 50, a third intermediate point setting unit 52, a fourth intermediate point setting unit 54, and a measurement program generation unit 56 in addition to the coordinate value acquisition unit 44 when generating the measurement program 37 that is executed before measuring each measurement element of the workpiece W.

[0039] The drive control unit 42 operates in the automatic measurement mode described above. The drive control unit 42 drives the probe drive unit 35 and the XYZ drive unit 36 ​​via the drive controller 28 based on a measurement program 37 in the storage unit 41, which will be described later, to bring the probe 24a into contact with all measurement points for each measurement element of the workpiece W.

[0040] When measuring each measurement element of the workpiece W (in automatic measurement mode and manual measurement mode), the coordinate value acquisition unit 44 acquires the coordinate value of the measurement point from the drive controller 28 and outputs it to the shape calculation unit 46 each time the probe 24a contacts the measurement point of each measurement element of the workpiece W.

[0041] The shape calculation unit 46 calculates the shape of the measurement element for each measurement element of the workpiece W based on the coordinate values ​​of all measurement points of the measurement element acquired by the coordinate value acquisition unit 44. Note that the specific method of calculating the shape of the measurement element is a known technique, and therefore a detailed description thereof will be omitted here.

[0042] (Measurement program generation) Fig. 3 is an explanatory diagram showing an example of a generation start screen 39 of the measurement program 37 displayed on the display unit 38. As shown in Fig. 3 and the above-mentioned Fig. 2, when a user executes an operation to start generation of the measurement program 37 on the generation start screen 39 displayed on the display unit 38, the control unit 40 functions as a coordinate value acquisition unit 44, a first intermediate point setting unit 48, a second intermediate point setting unit 50, a third intermediate point setting unit 52, a fourth intermediate point setting unit 54, and a measurement program generation unit 56.

[0043] After executing an operation to start generating the measurement program 37, the user operates the probe operation unit 28a to manually execute a teaching operation to acquire the coordinates of all the measurement points for each measurement element of the workpiece W. Then, during the execution of this teaching operation, the coordinate value acquisition unit 44 acquires the coordinate values ​​of each measurement point, and the first intermediate point setting unit 48, the second intermediate point setting unit 50, the third intermediate point setting unit 52, and the fourth intermediate point setting unit 54 automatically set the intermediate points, which are the movement path points of the probe 24a, to optimal positions. As a result, the measurement program generation unit 56 generates the measurement program 37.

[0044] Fig. 4 is an explanatory diagram for explaining a teaching operation for one measurement element of a workpiece W. In Fig. 4, in order to prevent the explanation from becoming complicated, only one of a plurality of measurement points P of the measurement element (here, a planar element) is illustrated as a representative example.

[0045] As shown in FIG. 4, the teaching operation includes at least a measurement element designation operation M1 and a termination operation M2 (corresponding to a measurement element determination operation of the present invention).

[0046] The measurement element designation operation M1 is an operation in which the user operates the probe operation unit 28a to move the probe 24a and bring the probe 24a into contact with all measurement points P of the measurement element. Note that the symbol SP in the drawing indicates the initial position of the probe 24a before the start of the teaching operation.

[0047] The terminate operation M2 is an operation for terminating the measurement element designation operation M1 and finalizing the measurement elements (all of the measurement points P). This terminate operation M2 includes, for example, a movement operation in which the user operates the probe operation unit 28a after the measurement element designation operation M1 is completed to retract the probe 24a from each measurement point P, and an execution operation in which the user inputs execution of the terminate operation M2 to the probe operation unit 28a. Note that the movement operation can be omitted.

[0048] When there are a plurality of measurement elements on the workpiece W, the measurement element designation operation M1 and the termination operation M2 are repeatedly executed for all the measurement elements in accordance with the measurement order of the measurement elements defined by the user.

[0049] Depending on the type of measurement element of the workpiece W, it may be necessary to replace the probe 24a. For this reason, when it is necessary to replace the probe 24a of the probe head 24, a retraction operation M3 is executed as a teaching operation before starting a measurement element designation operation M1 for the next measurement element. This retraction operation M3 is an operation in which the user operates the probe operation unit 28a to retract the probe 24a from the workpiece W to an exchange position EP where the probe 24a can be exchanged.

[0050] When the teaching operation is completed, the user inputs an end operation (completion operation) of the teaching operation to the probe operation unit 28a, although this is not shown in the drawing.

[0051] 5 is an explanatory diagram for explaining the acquisition of the coordinate value of the measurement point P by the coordinate value acquiring unit 44 during execution of the measurement element designation operation M1, and the setting of the first intermediate point C1 by the first intermediate point setting unit 48. As shown in FIG. 5 and the already-described FIG. 2, the coordinate value acquiring unit 44 acquires the coordinate value of the measurement point P from the drive controller 28 and outputs the coordinate value of the measurement point P to the first intermediate point setting unit 48 and the measurement program generating unit 56 every time the probe 24a comes into contact with the measurement point P of the measurement element (here, a planar element) of the workpiece W by the measurement element designation operation M1.

[0052] The first intermediate point setting unit 48 sets the first intermediate point C1 each time the probe 24a contacts the measurement point P by the measurement element designation operation M1. Specifically, when the probe 24a contacts the measurement point P, the first intermediate point setting unit 48 acquires the coordinate value of the measurement point P from the coordinate value acquisition unit 44. In addition, the first intermediate point setting unit 48 continuously acquires movement vector information indicating the movement vector of the probe 24a from the drive controller 28 during the execution of the measurement element designation operation M1. As a result, when the probe 24a contacts the measurement point P, the first intermediate point setting unit 48 can determine the contact direction of the probe 24a with respect to the measurement point P.

[0053] Next, the first intermediate point setting unit 48 sets a first intermediate point C1 at a position offset from the measurement point P in the opposite direction to the contact direction based on the coordinate value of the measurement point P and the contact direction (movement vector) of the probe 24a relative to the measurement point P. For example, when the coordinate value of the measurement point P is (X, Y, Z), the movement vector is (I, J, K), and the set value of the offset amount is L, the first intermediate point setting unit 48 calculates the coordinate value of the first intermediate point C1 by "(X, Y, Z) - L (I, J, K)". Note that the set value of the offset amount (L) can be changed appropriately by the user. Also, the movement vector is a unit vector.

[0054] Fig. 6 is an explanatory diagram for explaining setting of the second intermediate point C2 by the second intermediate point setting unit 50. As shown in Fig. 6 and the already-described Fig. 2, when an execution operation of a terminate operation M2 is executed after the end of a measurement element designation operation M1 for a measurement element (here, a circular hole element) of the workpiece W, the second intermediate point setting unit 50 acquires the coordinate value of the probe 24a from the drive controller 28 or the like, and sets the coordinate value as the second intermediate point C2.

[0055] Fig. 7 is an explanatory diagram for explaining a first intermediate point C1 and a second intermediate point C2 that are set by a measurement element designation operation M1 and a termination operation M2 for one measurement element of a workpiece W. In Fig. 7, in order to prevent the explanation from becoming complicated, only one of a plurality of measurement points P of a measurement element (here, a planar element) is illustrated as a representative example.

[0056] As shown by symbols VIIA and VIIB in Figure 7, when the probe 24a contacts the measurement point P of the measurement element of the workpiece W by the measurement element designation operation M1, the first intermediate point setting unit 48 sets the first intermediate point C1 based on the coordinate value of the measurement point P acquired from the coordinate value acquisition unit 44 and the movement vector information acquired from the drive controller 28.

[0057] Next, after the probe 24a is moved (moved to the position where the terminate operation M2 is to be performed) as shown by symbol VIIC in Figure 7, when the execution operation of the terminate operation M2 is performed as shown by symbol VIID in Figure 7, the second intermediate point setting unit 50 sets the coordinates of the probe 24a at the time of this execution operation as the second intermediate point C2.

[0058] Fig. 8 is an explanatory diagram showing an example of the movement trajectory of the probe 24a during the teaching operation. As shown in Fig. 8, the third intermediate point setting unit 52 continuously detects the movement trajectory of the probe 24a by, for example, continuously acquiring the above-mentioned movement vector information from the drive controller 28 during the movement of the probe 24a according to the teaching operation. Then, the third intermediate point setting unit 52 sets a third intermediate point C3 (see Fig. 13 described later) at a predetermined position on the movement trajectory of the probe 24a.

[0059] Specifically, the third intermediate point setting unit 52 performs straight-line fitting on the movement trajectory of the probe 24a to approximate the movement trajectory with fitting lines SL, which are a plurality of straight lines, and detects an intersection point K of the fitting lines SL that are different from one another. A method for detecting the intersection point K will be specifically described below.

[0060] FIG. 9 is an explanatory diagram for explaining the calculation of the fitting line SL and the calculation of the fitting error by the third intermediate point setting unit 52. As shown in FIG.

[0061] As shown in Fig. 9, the third intermediate point setting unit 52 repeatedly executes calculation of a fitting straight line SL for each point of the movement trajectory of the probe 24a from the reference point RP to the current position of the probe 24a based on the movement vector information continuously acquired from the drive controller 28 during the movement of the probe 24a in response to the teaching operation. Here, the reference point RP is the start point of the straight section of the movement trajectory of the probe 24a. Specifically, the reference point RP is the above-mentioned initial position SP (see Fig. 4) until the probe 24a reaches the first intersection point K, and is the immediately previous intersection point K (see Fig. 8) after the probe 24a reaches the first intersection point K.

[0062] Furthermore, the third intermediate point setting unit 52 calculates the fitting error between the fitting line SL and each point on the movement trajectory of the probe 24a every time the third intermediate point setting unit 52 executes the calculation of the fitting line SL. Specifically, the third intermediate point setting unit 52 first calculates the distance ei (i is a natural number indicating the order of each point on the movement trajectory from the reference point RP) between the fitting line SL and each point on the movement trajectory of the probe 24a. As a result, for example, the distances e1 to e7 of each point on the movement trajectory of the probe 24a are calculated. Note that the distance ei is a vector quantity.

[0063] Fig. 10 is a table showing the calculation results of the fitting error by the third intermediate point setting unit 52. As shown in Fig. 10, the third intermediate point setting unit 52 calculates the square root of the distance ei (deviation) of each point, that is, the standard deviation, as the fitting error based on the calculation results of the distance ei of each point of the movement trajectory of the probe 24a and the total number n of each point, as shown in the following [Equation 1]. As a result, in the example shown in Fig. 10, a fitting error of 1.13457 is obtained.

[0064]

number

[0065] In Figure 11, symbol XIA is a diagram showing an example where the result of the fitting error calculation by the third intermediate point setting unit 52 is below the threshold value, and symbol XIB is a diagram showing an example where the result of the fitting error calculation by the third intermediate point setting unit 52 is greater than the threshold value.

[0066] 11, the third intermediate point setting unit 52 judges whether the fitting error is greater than a predetermined threshold value each time the third intermediate point setting unit 52 executes the calculation of the fitting error. If the fitting error is equal to or smaller than the threshold value, the third intermediate point setting unit 52 judges that the probe 24a has not passed a new intersection point K, that is, the straight line section of the movement trajectory of the probe 24a continues, as shown by the symbol XIA in FIG.

[0067] Conversely, when the fitting error becomes larger than the threshold value, the third intermediate point setting unit 52 determines that the probe 24a has passed a new intersection point K, i.e., that the straight section of the movement trajectory of the probe 24a has changed, as shown by the symbol XIB in Fig. 11. This allows the third intermediate point setting unit 52 to detect the intersection point K on the movement trajectory of the probe 24a, i.e., the change in the straight section.

[0068] Thereafter, the third intermediate point setting unit 52 repeatedly performs calculation of the fitting straight line SL (straight line fitting), calculation of the fitting error, and determination of whether the fitting error is greater than a threshold value until the end operation of the teaching operation is performed, thereby detecting all intersection points K (changes in the straight line section) on the movement trajectory of the probe 24a.

[0069] Fig. 12 is an explanatory diagram for explaining a threshold change screen 58 displayed on the display unit 38. As shown in Fig. 12, the threshold used for the judgment of the third midpoint setting unit 52 can be changed by the user on the change screen 58 displayed on the display unit 38. This makes it possible to adjust the discrimination strength of the straight section of the movement trajectory of the probe 24a (the allowable range considered as a straight section). Note that, although the threshold can be changed in three stages (weak, medium, strong) in Fig. 12, it may be changed in two stages or four stages or more.

[0070] Fig. 13 is an explanatory diagram for explaining the setting of the third intermediate point C3 by the third intermediate point setting unit 52. As shown by reference characters XIIIA and XIIIB in Fig. 13, every time an intersection point K (a change in a straight line section) on the movement trajectory of the probe 24a is detected, the third intermediate point setting unit 52 sets the third intermediate point C3 at the coordinates of the intersection point K. As a result, the third intermediate point C3 is set at all intersection points K of different fitting straight lines SL on an approximated path obtained by approximating the movement trajectory of the probe 24a with a plurality of fitting straight lines SL.

[0071] Fig. 14 is an explanatory diagram for explaining setting of the fourth intermediate point C4 by the fourth intermediate point setting unit 54. As shown in Fig. 14 and already described Fig. 2, when the retraction operation M3 is executed as a teaching operation and the probe 24a is moved to the replacement position EP (see Fig. 4), the fourth intermediate point setting unit 54 acquires the coordinate values ​​of the probe 24a at this replacement position EP from the drive controller 28 etc. Then, the fourth intermediate point setting unit 54 sets the replacement position EP as the fourth intermediate point C4 based on the acquired coordinate values.

[0072] Fig. 15 is an explanatory diagram for explaining generation of the measurement program 37 by the measurement program generation unit 56. In order to prevent the explanation from becoming complicated, Fig. 15 illustrates a representative example (here, a planar element) of a plurality of measurement elements of the workpiece W, and further illustrates only one of a plurality of measurement points P of this measurement element (planar element) as a representative example.

[0073] As shown in Figure 15 and the previously described Figure 2, when the user performs teaching operations (measurement element designation operation M1, terminate operation M2, and retract operation M3) as shown by symbol XVA in Figure 15, and then performs an operation to terminate this teaching operation, the measurement program generation unit 56 starts generating the measurement program 37.

[0074] Specifically, the measurement program generating unit 56 acquires the coordinate value of each measurement point P for each measurement element from the coordinate value acquiring unit 44, as shown by the reference symbol XVB in Fig. 15. In addition, the measurement program generating unit 56 acquires the coordinate value of the first intermediate point C1 set for each measurement point P from the first intermediate point setting unit 48, acquires the coordinate value of the second intermediate point C2 set for each measurement element from the second intermediate point setting unit 50, and acquires the coordinate value of the third intermediate point C3 set for each intersection point K from the third intermediate point setting unit 52. Furthermore, when the retraction operation M3 is executed, the measurement program generating unit 56 acquires the coordinate value of the fourth intermediate point C4 from the fourth intermediate point setting unit 54.

[0075] Then, the measurement program generating unit 56 generates the measurement program 37 based on the coordinate values ​​of each measurement point P for each measurement element, the coordinate values ​​of the first intermediate point C1 for each measurement point P, the coordinate values ​​of the second intermediate point C2 for each measurement element, the coordinate values ​​of the third intermediate point C3 for each intersection point K, and the coordinate values ​​of the fourth intermediate point C4. For example, the measurement program generating unit 56 generates the measurement program 37 indicating a measurement path in which the probe 24a moves to each measurement point P, the second intermediate point C2, the third intermediate point C3, and the fourth intermediate point C4 in accordance with the acquired or set order. In addition, the measurement program generating unit 56 sets the first intermediate point C1 as a movement path point of the probe 24a immediately before moving toward the corresponding measurement point P. This prevents the probe 24a from contacting the measurement point P from an oblique direction.

[0076] [Operation of this embodiment] Fig. 16 is a flow chart showing the flow of the generation process (measurement program generation method) of the measurement program 37 by the three-dimensional coordinate measuring machine 10 configured as described above. As shown in Fig. 16, the user executes an operation to start the generation of the measurement program 37 on a generation start screen 39 displayed on the display unit 38 (step S1). As a result, the control unit 40 functions as a coordinate value acquisition unit 44, a first intermediate point setting unit 48, a second intermediate point setting unit 50, a third intermediate point setting unit 52, a fourth intermediate point setting unit 54, and a measurement program generation unit 56, making it possible to generate the measurement program 37 according to the user's teaching operation.

[0077] Furthermore, the user performs an operation to change the threshold value used in the judgment of the third midpoint setting unit 52 on a change screen 58 displayed on the display unit 38 as necessary.

[0078] When the user operates the probe operation unit 28a to start the teaching operation (measurement element designation operation M1) (step S2, which corresponds to the manual operation step of the present invention), the third intermediate point setting unit 52 starts the setting process of the third intermediate point C3 (step S3, NO in step S4).

[0079] FIG. 17 is a flowchart showing the flow of the setting process of the third intermediate point C3 by the third intermediate point setting unit 52 (corresponding to the third intermediate point setting step of the present invention).

[0080] 17, while the probe 24a is being moved toward the first measurement point P of the first measurement element in response to the measurement element designation operation M1 (step S3A), the third intermediate point setting unit 52 continuously acquires movement vector information of the probe 24a from the drive controller 28. Then, based on the movement vector information of the probe 24a, the third intermediate point setting unit 52 continuously detects the movement trajectory of the probe 24a from the reference point RP to the current position of the probe 24a (step S3B).

[0081] 9 and 10, the third intermediate point setting unit 52 executes the calculation of a fitting straight line SL for each point of the movement trajectory of the probe 24a (straight line fitting) (step S3C), the calculation of a fitting error (step S3D), and the determination of whether the fitting error is greater than a threshold value (step S3E). Note that step S3E corresponds to the determination step of the present invention.

[0082] If the fitting error is equal to or smaller than the threshold, the third intermediate point setting unit 52 determines that the probe 24a has not passed through the new intersection point K, that is, the straight line section of the movement trajectory of the probe 24a continues (NO in step S3E). In this case, the processes of steps S3B and S3C (repeated calculation steps of the present invention) and the process of step S3D are repeatedly executed.

[0083] On the other hand, if the fitting error is greater than the threshold, the third intermediate point setting unit 52 determines that the probe 24a has passed a new intersection point K, i.e., that the straight section of the movement trajectory of the probe 24a has changed (YES in step S3E). This allows the third intermediate point setting unit 52 to detect the intersection point K on the movement trajectory of the probe 24a. Then, the third intermediate point setting unit 52 sets the third intermediate point C3 at the coordinates of the detected intersection point K (step S3F).

[0084] Thereafter, while the movement of the probe 24a continues, that is, while the teaching operation continues, the third intermediate point setting unit 52 repeatedly executes the processes from step S3B to step S3F described above (step S3G), thereby setting the third intermediate point C3 at all intersection points K on the movement trajectory of the probe 24a.

[0085] 16, when the probe 24a comes into contact with the first measurement point P of the first measurement element in response to the measurement element designation operation M1 (YES in step S4), the coordinate value acquisition unit 44 acquires the coordinate value of the measurement point P from the drive controller 28 (step S5, which corresponds to a coordinate value acquisition step of the present invention). Then, the coordinate value acquisition unit 44 outputs the coordinate value of the measurement point P to the first intermediate point setting unit 48 and the measurement program generation unit 56.

[0086] Next, the first intermediate point setting unit 48 sets a first intermediate point C1 at a position offset from the measurement point P in the direction opposite to the contact direction of the probe 24a, based on the coordinate value of the measurement point P acquired from the coordinate value acquiring unit 44 and the movement vector information of the probe 24a acquired from the drive controller 28, as shown in Fig. 5 and other figures (step S6). Note that step S6 corresponds to a first intermediate point setting step of the present invention.

[0087] Thereafter, the measurement element designation operation M1 continues and the above-mentioned processes from step S3 to step S6 are repeatedly executed until the probe 24a comes into contact with all the measurement points P of the first measurement element (NO in step S7).

[0088] When the user brings the probe 24a into contact with all the measurement points P of the first measurement element, the user operates the probe operation unit 28a to execute a terminate operation M2 (movement operation, execution operation) (corresponding to the manual operation step of the present invention). When the execution operation of this terminate operation M2 is executed, the second intermediate point setting unit 50 sets the coordinates of the probe 24a at the time of the execution operation of the terminate operation M2 as the second intermediate point C2, as shown in Fig. 15 and the like (step S8, corresponding to the second intermediate point setting step of the present invention).

[0089] If the workpiece W has one measurement element, the process proceeds to step S16 (NO in step S9), which will be described later.

[0090] Furthermore, when performing the measurement element designation operation M1 for the next measurement element (YES in step S9), if there is no need to replace the probe 24a of the probe head 24 in advance (NO in step S10), the above-mentioned processes from step S2 to step S8 are repeatedly executed.

[0091] On the other hand, if it is necessary to replace the probe 24a of the probe head 24 before the measurement element designation operation M1 for the next measurement element (YES in step S10), the user operates the probe operation unit 28a to execute the retraction operation M3 (step S11). As shown in Fig. 15 and other figures, the probe 24a is moved toward the replacement position EP in response to the retraction operation M3 (step S13), and during this movement, the same third intermediate point setting process as in step S3 (see Fig. 17) is executed (NO in steps S13 and S14).

[0092] Then, when the probe 24a reaches the replacement position EP and the retraction operation M3 is completed (YES in step S14), the fourth intermediate point setting unit 54 acquires the coordinate values ​​of the probe 24a at the replacement position EP from the drive controller 28, etc., as shown in FIG. 14 and other figures, and sets the replacement position EP as the fourth intermediate point C4 based on these coordinate values ​​(step S15). Note that step S15 corresponds to the fourth intermediate point setting step of the present invention. Thereafter, the above-mentioned processes from step S2 to step S8 are repeatedly executed.

[0093] When the teaching operations (measurement element designation operation M1, termination operation M2) for all measurement elements of the workpiece W are completed (NO in step S9), the user operates the probe operation unit 28a to execute an end operation of the teaching operations (step S16).

[0094] When the teaching operation is ended, the measurement program generating unit 56 generates the measurement program 37 as shown in Fig. 15 based on the coordinate values ​​of each measurement point P for each measurement element acquired by the coordinate value acquiring unit 44 and the coordinate values ​​of each intermediate point C1 to C4 set by each intermediate setting unit 48, 50, 52, 54 (step S17). Note that step S17 corresponds to the measurement program generating step of the present invention.

[0095] Then, the measurement program generating unit 56 stores the generated measurement program 37 in the storage unit 41. As a result, when the three-dimensional coordinate measuring machine 10 repeatedly measures each measurement element of a plurality of workpieces W having the same shape, the drive control unit 42 drives the drive controller 28 (the probe driving unit 35 and the XYZ driving unit 36) in accordance with the measurement program 37, thereby bringing the probe 24a into contact with all measurement points P for each measurement element of the workpiece W. As a result, the reproducibility of the measurement results of the measurement elements in the quality control process is ensured, and labor saving is further promoted.

[0096] As described above, in this embodiment, since each of the intermediate points C1 to C4 can be automatically set while the user is performing a teaching operation, the measurement program 37 can be automatically generated. This eliminates the need for the user to manually set the movement path points on the measurement path of the probe 24a, and prevents malfunctions caused by human error. In addition, there is no need to generate the measurement program 37 based on the CAD data of the workpiece W as in the conventional method, and even a user with little knowledge of the three-dimensional coordinate measuring machine 10 can easily generate the measurement program 37. As a result, anyone can easily automatically generate a measurement program 37 that is free from the risk of malfunction.

[0097] [others] In the above embodiment, the gate-moving type three-dimensional coordinate measuring machine 10 has been taken as an example for explanation, but the present invention is applicable to various types of three-dimensional coordinate measuring machines 10, and there is no particular limitation on the type of probe 24a used in the three-dimensional coordinate measuring machine 10. Also, in the above embodiment, the three-dimensional coordinate measuring machine 10, the drive controller 28, and the computer 32 are each separate, but the three-dimensional coordinate measuring machine 10 and at least one of the drive controller 28 and the computer 32 may be integrated together.

[0098] The software program 32a for causing the computer 32 described in the above embodiment to function can be recorded on an optical disk, a magnetic disk, or other computer-readable medium (a tangible, non-transitory information storage medium) and the software program 32a can be provided through these. Instead of providing the software program 32a by storing it on such an information storage medium, it is also possible to provide a measurement program signal as a download service using a communication network such as the Internet. [Explanation of symbols]

[0099] 10…3D coordinate measuring machine 12…Frame 14…Table 16L…Left Y carriage 16R…Right Y carriage 18…X Guide 20…X carriage 22…Z carriage 24…Probe head 24a…Probe 26…Gate frame 28...Drive controller 28a…Probe operation unit 30...Communication interface 32. Computer 32a…Software Program 35…Probe drive unit 36...XYZ drive section 37…Measurement Program 38…Display section 39…Generation start screen 40...Control unit 41...Storage section 42...Drive control unit 44... Coordinate value acquisition section 46...Shape calculation section 48…First intermediate point setting section 50...Second intermediate point setting section 52...Third intermediate point setting section 54…Fourth intermediate point setting section 56...Measurement program generation unit 58...Change screen A…Rotation axis B: Rotation axis C1…1st intermediate point C2…Second intermediate point C3…Third midpoint C4: 4th midpoint EP…Exchange position K...intersection M1…Measurement element specification operation M2…Terminate operation M3…Evacuation operation P…Measurement point RP…Reference point SL: Fitting line SP…Initial position W…Work

Claims

1. 1. A measurement program generation method for generating a measurement program representing a measurement path of a probe in a three-dimensional coordinate measuring machine that performs measurement of one or a plurality of measurement elements of a workpiece using a probe, comprising the steps of: a manual operation step of manually executing a measurement element designation operation for bringing the probe into contact with all measurement points of the measurement element and a measurement element confirmation operation indicating the end of the measurement element designation operation for all the measurement elements; a coordinate value acquiring step of acquiring coordinate values ​​of all the measurement points that are in contact with the probe; a first intermediate point setting step of setting a first intermediate point at a position offset from the measurement point in a direction opposite to the contact direction based on the coordinate value of the measurement point and a contact direction of the probe with respect to the measurement point, each time the coordinate value of the measurement point is acquired in the coordinate value acquiring step; a second intermediate point setting step of setting the position of the probe when the measurement element determination operation is executed as a second intermediate point; a third intermediate point setting step of acquiring a movement trajectory of the probe during the movement of the probe in the manual operation step, approximating the movement trajectory using only a plurality of straight lines, and setting a third intermediate point at an intersection of the straight lines that are different from each other; a program generating step of generating the measurement program based on the coordinate values ​​of the measurement points acquired in the coordinate value acquiring step, the coordinate values ​​of the second intermediate points set in the second intermediate point setting step, and the coordinate values ​​of the third intermediate points set in the third intermediate point setting step; A measurement program generating method comprising the steps of:

2. the manual operation step includes a retraction operation of manually retracting the probe from the object to a replacement position where the probe can be replaced, a fourth intermediate point setting step of setting the exchange position as a fourth intermediate point when the retreat operation is performed; having 2. The measurement program generation method according to claim 1, wherein, in the program generation step, when the retraction operation is executed, the measurement program is generated based on the coordinate value of the measurement point, the coordinate value of the second intermediate point, the coordinate value of the third intermediate point, and the coordinate value of the fourth intermediate point set in the fourth intermediate point setting step.

3. 3. The measurement program generating method according to claim 1, wherein in the third midpoint setting step, straight-line fitting is performed on the movement trajectory to approximate the movement trajectory using only a plurality of straight lines.

4. The third intermediate point setting step includes: a repeating calculation step of repeatedly calculating a fitting line for the movement trajectory from the initial position of the probe to the current position of the probe during the movement of the probe until the probe reaches the first intersection point, and calculating a fitting error which is an error between the fitting line and the movement trajectory; a determination step of determining whether or not the probe has passed a new intersection point based on whether or not the fitting error is greater than a predetermined threshold value each time the fitting error is calculated in the repeated calculation step; Including, The measurement program generating method according to claim 3 , wherein the threshold value is variable.

5. The third intermediate point setting step includes: a repeating calculation step of repeatedly calculating a fitting line for the movement trajectory from the immediately previous intersection point to the current position of the probe while the probe is moving, and calculating a fitting error which is an error between the fitting line and the movement trajectory; a determination step of determining whether or not the probe has passed a new intersection point based on whether or not the fitting error is greater than a predetermined threshold value each time the fitting error is calculated in the repeated calculation step; Including, The measurement program generating method according to claim 3 , wherein the threshold value is variable.

6. 1. A three-dimensional coordinate measuring machine that uses a probe to measure one or more measurement elements of a workpiece, a manual operation unit capable of manually executing a measurement element designation operation for bringing the probe into contact with all measurement points of the measurement element and a measurement element confirmation operation indicating completion of the measurement element designation operation for all the measurement elements; a coordinate value acquiring unit that acquires coordinate values ​​of all of the measurement points that are in contact with the probe; a first intermediate point setting unit that sets a first intermediate point at a position offset from the measurement point in a direction opposite to the contact direction, based on the coordinate value of the measurement point and a contact direction of the probe with respect to the measurement point, each time the coordinate value acquisition unit acquires a coordinate value of the measurement point; a second intermediate point setting unit that sets the position of the probe when the measurement element determination operation is executed as a second intermediate point; a third intermediate point setting unit that acquires a movement trajectory of the probe during the movement of the probe in response to the manual operation, approximates the movement trajectory using only a plurality of straight lines, and sets a third intermediate point at an intersection of the straight lines that are different from each other; a program generating unit that generates a measurement program representing a measurement path of the probe based on the coordinate values ​​of the measurement points acquired by the coordinate value acquiring unit, the coordinate values ​​of the second intermediate point set by the second intermediate point setting unit, and the coordinate values ​​of the third intermediate point set by the third intermediate point setting unit; A three-dimensional coordinate measuring machine comprising:

7. the manual operation unit is capable of executing a retraction operation for manually retracting the probe from the object to a replacement position where the probe can be replaced, a fourth intermediate point setting unit that sets the replacement position as a fourth intermediate point when the retreat operation is executed by the manual operation unit, 7. The three-dimensional coordinate measuring machine according to claim 6, wherein when the retraction operation is executed by the manual operation unit, the program generation unit generates the measurement program based on the coordinate value of the measurement point, the coordinate value of the second intermediate point, the coordinate value of the third intermediate point, and the coordinate value of the fourth intermediate point set by the fourth intermediate point setting unit.