1. Technical Field
Embodiments of the present disclosure relate to three-dimensional (3D) measurement systems and methods, and particularly to simulation of a measurement path of a probe of a measurement machine.
2. Description of Related Art
Coordinate measurement machines, such as image measuring machines, can be used to perform a variety of measurement and coordinate acquisition tasks. In a coordinate measurement machine, a movable arm can be connected to a probe for measuring various dimensions of workpieces. To obtain precision and accuracy of the measurements, the probe must be calibrated before it can be used in the measurement machine. The probe calibration process is performed along a precision measurement path of the probe to obtain acceptable calibration results. However, this is not the same as constructing the measurement path of the probe, which is time-consuming as the probe needs to be manually manipulated between various measuring positions of the workpiece if the moving path of the probe is not precise.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In the present disclosure, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a program language. In one embodiment, the program language may be Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of a non-transitory computer-readable medium include CDs, DVDs, flash memory, and hard disk drives.
The storage device 11 stores a ball graphics file of a standard ball 2 (shown in
In one embodiment, the probe measurement path simulating system 10 includes a model constructing module 101, a point measuring module 102, a path simulation module 103, and a program generating module 104. The modules 101-104 may comprise computerized instructions in the form of one or more programs that are stored in the storage device 11 and executed by the at least one processor 12. A detailed description of each module will be given in the following paragraphs.
In step S21, the model constructing module 101 obtains a ball graphics file of the standard ball 2 and a probe graphics file of the probe 3 from the storage device 11, obtains a plurality of shell surface points of the standard ball 2 from the ball graphics file, and obtains a plurality of moving points of the probe 3 from the probe graphics file.
In step S22, the model constructing module 101 meshes the shell surface points and the moving points of the probe 3 to construct the standard ball 2 using a curve meshing method. In one embodiment, the curve meshing method is a point fitting process of constructing a geometrical curve using different mesh grids of measurement points of the standard ball 2 (shown in
In step S23, the point measuring module 102 selects a plurality of measurement points from the surface of the standard ball 2 according to user requirements. In the embodiment, N number of measurement points (i.e., Pt1, Pt2, Pt3, . . . Ptn) are selected from the surface of the standard ball 2.
In step S24, the point measuring module 102 calculates a coordinate value of each of the measurement points, and stores all the coordinate values of the measurement points into a data array. In the embodiment, the standard ball 2 is divided into a plurality of surface shells, such as five surface shells, for example. The adjacent angle between two surface shells may be 90 degrees, thus A=90 degrees. The point measuring module 102 calculates a coordinate value of a center point p of the standard ball 2 according to a first measurement point pt1 and a radius R of the standard ball 2, and calculates a center point p1 of each of the surface shells according to the adjacent angle between two surface shells and the center point p of the standard ball 2. The center point p of the standard ball 2 is denoted as p(x1, y1, z1). The center point p1 (p1.x, p1.y, p1.z) of each of the surface shells is calculated according to the following formulas: p1.x=x1+nor.x*sin A*R, p1.y=y1+nor.x*sin A*R, and p1.z=z1+nor.x*sin A*R, where “nor” represents a normal vector of the probe 3 that is defined as a value of nor (0, 0, 1).
The point measuring module 102 calculates the coordinate value of each of the measurement points by performing the following steps:
(a). constructing a first circle according to the value of nor (0, 0, 1) and the center point p1 of each of the surface shells, and selecting a second measurement point pt2 (x2, y2, z2) from the first circle, where x2=p1.x+r, y2=p1.y and z2=p1.z, and r represents a radius of the first circle r=R*cos A.;
(b) rotating the first measurement point pt1 to point to the normal vector of the probe 3, and constructing a second circle according to the radius of the first circle and the center point p1 of each of the surface shells, and selecting a third measurement point pt3 (x3, y3, z3) from the second circle;
(c) determining a secure angle A1 for assuring that the probe 3 does not collide with the standard ball 2, and constructing a data matrix according to the secure angle A1 and the center point p1 of each of the surface shells; and
(d) performing a multiplication of values of the data matrix and the coordinate value of the third measurement point pt3 to obtain the Nth number measurement point Ptn.
In step S25, the point measuring module 102 calculates a coordinate value of each of the moving points of the probe 3 according to two adjacent measurement points and the normal vector of the probe 3, and inserts the coordinate value of each of the moving points of the probe 3 between the two adjacent measurement points into the data array.
(a). selecting an initial point from the surface shell of the standard ball as a first moving point P1 of the probe 3, and obtaining a second moving point P2 of the probe 3 according to the coordinate value of the first moving point P1 and the normal vector of the probe 3;
(b). drawing an arc based on the first moving point P1 and the second moving point P2, and calculating a length of the arc L=R*A1, where R represents the radius of the standard ball 2 and A1 represents a centre angle of the arc;
(c) constructing a point matrix M according to the length L of the arc and the normal vector of the probe 3, i.e. multiplying each value of nor (0, 0, 1) by the length L of the arc to obtain the point matrix M; and
(d) performing a multiplication of values of the point matrix M and the coordinate value of the second moving point P2 to obtain the coordinate value of the Nth number moving point Pn.
In step S26, the path simulation module 103 draws a probe movement path (shown in
In step S27, the path simulation module 103 determines whether the probe 3 collides with the standard ball 2 according to the collision detection. If the probe 3 does not collide with the standard ball 2, step S28 is implemented. If the probe 3 does collide with the standard ball 2, step S29 is implemented.
In step S28, the program generating module 104 generates a probe calibration program according to the probe movement path, and stores the probe calibration program in the storage device 11. In the embodiment, the probe calibration program may be an I++ measurement program that is used to calibrate a measurement path of the probe 3. One example of the I++ measurement program is generated by performing the following steps: obtaining the coordinate value of each point in the data array such as PtMeas (C0001, . . . , C0025), and if the coordinate value of a point is not (0, 0, 0), the program generating module 104 replaces the coordinate value of the point with PtMeas (x, y, z) to generate the I++ measurement program. If the coordinate value of the point is (0, 0, 0), the program generating module 104 replaces IJK(0, 0, 0)with PtMeas (x, y, z) to generate the I++ measurement program.
In step S29, the program generating module 104 generates any collision information indicating that the probe 3 is colliding with the standard ball 2, and displays the collision information on the display device 13.
In step S222, the model constructing module 101 determines a closed boundary curve of the B-spline curved surface in a UV plane, and obtains a plurality of intersection points and UV grids from the B-spline curved surface. The model constructing module 101 further divides the closed boundary curve to obtain a plurality of UV grids (shown in
In step S223, the model constructing module 101 generates two triangles by connecting four vertices of the UV grid in an anti-clockwise direction when one of the UV grids has no intersection point with the closed boundary curve. Referring to
In step S224, the model constructing module 101 creates a data queue Q by using the one or more intersection points, one or more vertices of a UV grid which fall within the closed boundary curve, and boundary points of the closed boundary line, when the UV grid has one or more intersection points with the closed boundary curve.
In step S225, the model constructing module 101 reads a first point q1 and a second point q2 nearest to the first point q1 from the data queue Q, where the first point q1 and the second point q2 construct one side of a triangle, and determines a third point q3 of the triangle according to a determination rule that there is no point of the data queue Q in a circumcircle of the triangle which consists of the first point, the second point and the third point.
In step S226, the model constructing module 101 generates a plurality of triangles in the data queue Q according to the determination rule, and stores information of each of the triangles into a triangle record list T.
In step S227, the model constructing module 101 draws a model of the standard ball 2 according to the triangle record list T, and displays the model of the standard ball 2 on the display device 13.
Although certain disclosed embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201210127583.5 | Apr 2012 | CN | national |