1. Technical Field
Embodiments of the present disclosure relate to image measuring techniques, and more particularly to a computing device and a method of measuring surface dimension of an object.
2. Description of Related Art
During the measurement of surface dimension of an object using a three-dimensional (3D) measurement machine, points on the surface are contacted by a probe of the 3D measurement machine. Usually, the 3D measurement machine is controlled by an operator. The operator cannot know vector coordinates of the different points contacted, thus, there may be some mistakes in picking the points, causing inaccurate measurement of the object.
In general, the word “module,” as used hereinafter, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, for example, Java, C, or Assembly. One or more software instructions in the modules may be embedded in firmware. It will be appreciated that modules may comprised connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device.
The surface measurement system 10 includes computerized codes in the form of one or more programs, which are stored in the storage device 11. In present embodiment, the one or more programs of the surface measurement system 10 are described in the form of function modules (see
The storage device 11 may include some type(s) of non-transitory computer-readable storage mediums, such as a hard disk drive, a compact disc, a digital video disc, or a tape drive. In one embodiment, the storage device 11 stores data needed when establishing the coordinate system on the surface of the object being measured.
The data may include, but is not limited to, a computer aided design (CAD) model of the object 3.
The controlling device 12 may be a processor, a microprocessor, an application-specific integrated circuit (ASIC), or a field programmable gate array, (FPGA) for example.
The display device 13 displays visible data such as the CAD model of the object being measured.
Referring to
In step S2, the enclosing box establishing module 101 constructs an enclosing box of the triangular mesh surface, divides the enclosing box into a plurality of sub-boxes according to a number of the triangles in the triangular mesh surface, and labels each of the sub-boxes. In one embodiment, the enclosing box establishing module 101 obtains minimum coordinates (X1, Y1, Z1) and maximum coordinates (X2, Y2, Z2) of border points of the triangular mesh surface, and constructs the enclosing box using vertexes which respectively have coordinates of (X1, Y1, Z1), (X1, Y1, Z2), (X1, Y2, Z1), (X1, Y2, Z2), (X2, Y2, Z2), (X2, Y2, Z1), (X2, Y1, Z2), and (X2, Y1, Z1). Referring to
In step S3, the relating module 102 obtains triangles which intersect with one of the sub-boxes from the triangular mesh surface sequentially, generates a relationship between the triangles and the intersected sub-box, and stores the relationships into the storage device 11. In one embodiment, the relating module 102 stores labels of the triangles and the label of the intersected sub-box into a same storing unit of the storage device 11 to establish the relationship between the triangles and the intersected sub-box.
In step S4, the selecting module 103 selects one of the measuring points, obtains coordinates and a searching vector of the selected measuring point. The searching vector may be directed to an X-axis direction, a Y-axis direction, or a Z-axis direction. The searching vector may also be predetermined by a user.
In step S5, the selecting module 103 determines if the searching vector of the selected measuring point can be obtained. The process as illustrated by
Otherwise, the process as illustrated by
Referring to
In step S7, the first searching module 104 determines if the ray intersects with the enclosing box. Step S13 is implemented if the ray does not intersect with the enclosing box, step S8 is implemented if the ray does intersect with the enclosing box.
In step S8, the first searching module 104 obtains sub-boxes which intersect with the ray sequentially to generate an array of the sub-boxes.
In step S9, the first searching module 104 selects one of the sub-boxes obtained in the array sequentially.
In step S10, the first searching module 104 obtains triangles which intersect with the selected sub-box from the triangular mesh surface according to the relationships stored in the storage device 11.
In step S11, the first searching module 104 determines if the ray has an intersection point with one of the obtained triangles. Step S9 is implemented to select another one of the sub-boxes if the ray has no intersection point with any one of the obtained triangles. Otherwise, step S12 is implemented if the ray does have an intersection point with one of the obtained triangles.
In step S12, the first searching module 104 records the intersection point and a vector of the obtained triangle that has the intersection point into a measuring file.
In step S13, the determining module 106 determines if any one of the measuring points has not been selected. Step S4 in
In step S14, the measuring module 107 implements measurements on the surface of the object according to the measuring file.
Referring to
In step S16, the second searching module 105 determines if the cubic box has an intersection area with the enclosing box. Step S15 is implemented to increase N by 1 unit until the cubic box has an intersection area with the enclosing box. Step S17 is implemented when the cubic box has an intersection area with the enclosing box.
In step S17, the second searching module 105 obtains sub-boxes in the intersection area.
In step S18, the second searching module 105 obtains triangles which intersect with the obtained sub-boxes from the triangular mesh surface according to the relationships stored in the storage device 11.
In step S19, the second searching module 105 computes distances between the selected measuring point and the midpoints of the obtained triangles, and selects a shortest distance from all the computed distances.
In step S20, the second searching module 105 records the middle point and a vector of the obtained triangle that has the shortest distance to the selected measuring point, into the measuring file. After step S20, step S13 and step S14 described in
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure and protected by the following claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 201210132116.1 | Apr 2012 | CN | national |