1. Technical Field
Embodiments of the present disclosure relate to measurement technology, and particularly to an electronic device and method for measuring an outline of an object using the electronic device.
2. Description of Related Art
Outline-measuring is important in product manufacturing to ensure product quality. For example, an object measurement system (e.g., probe measurement system) is used to measure an object. The probe measurement system measures the object by contacting a large number of points on a surface of the object using a probe.
However, the probe measurement system cannot use the probe to measure an outline of the object. Therefore, a more efficient method for measuring the outline of the object is desired.
All of the processes described below may be embodied in, and fully automated via, functional code modules executed by one or more general purpose electronic devices or processors. The code modules may be stored in any type of non-transitory readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive, or other suitable storage medium.
The display device 20 may be a liquid crystal display (LCD) or a cathode ray tube (CRT) display, and the input device 22 may be a mouse or a keyboard used to input computer readable data. The storage device 23 may be a hard disk or a flash memory.
As shown in
The outline measurement system 24 is used to automatically measure an outline of the object 42, obtain a tolerance of the outline of the object, and generate a measurement report with a graphic user interface. In one embodiment, the outline measurement system 24 may include computerized instructions in the form of one or more programs that are executed by the at least one processor 25 and stored in the storage device 23 (or memory). A detailed description of the outline measurement system 24 will be given in the following paragraphs.
In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, 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 non-transitory computer-readable medium include CDs, DVDs, flash memory, and hard disk drives.
In step S1, the outline obtaining module 240 obtains an outline of the object 42 and points of the outline from the storage device 23. For example, the outline obtaining module 240 obtains an image of the outline of the object 42 and coordinates of the points of the outline from the storage device 23.
In step S2, the point sampling module 241 creates vectors for the points according to adjacent ones of the points, calculates an included angle between every two adjacent vectors, samples points in the outline of the object 42 according to the included angle, and obtains sampled points in the outline of the object 42 and direction vectors (directions of the corresponding vector) of the sampled points. A detailed description is provided in
In step S3, the measurement program creating module 242 obtains reference points corresponding to the sampled points by moving each sampled point with a first preset distance along a direction of the corresponding vector of each sampled point, inserts a point between two adjacent reference points when a connecting line between the two adjacent reference points is overlapping with the outline, and creates a measurement program based on the reference points and inserted points. For example, the first preset distance may be 0.1 millimeters. A detailed description is provided in
In step S4, the tolerance obtaining module 243 obtains measurement points of the outline of the object 42 by controlling movements of the probe 41 using the measurement program. In one embodiment, each reference point in the measurement program generates a corresponding measurement point. The reference points are points need to be measured in the measurement program, and the measurement points are actually points obtained by the probe 41 when the measurement program is executed. Then, the tolerance obtaining module 243 obtains a tolerance of each measurement point by calculating a distance between each measurement point and a corresponding reference point, to obtain tolerances of all the measurement points. The tolerance obtaining module 243 obtains a tolerance of the outline of the object 42 by calculating a difference between a maximum value of the tolerances of all the measurement points (maximum tolerance) and a minimum value of the tolerances of all the measurement points (minimum tolerance). A detailed description is provided in
In step S5, the measurement report generating module 244 draws a reference line, an upper tolerance line, and a lower tolerance line according to the reference points, connects each measurement point and the corresponding reference point in the reference line, displays the tolerance of each measurement point on the display device 20, and sets connecting lines between adjacent measurement points with different colors according to the tolerance of each measurement point. A detailed description is provided in
In step S20, the point sampling module 241 creates a vector between every two adjacent points, calculates an included angle “a” between every two adjacent vectors, and compares the included angle “a” with a first preset value “t1” (e.g., t1=5 degrees). For example, as shown in
In step S21, the point sampling module 241 determines whether the included angle between two adjacent vectors is greater than the first preset value (α>t1). If the included angle between the two adjacent vectors is greater than the first preset value, step S22 is executed. If the included angle between the two adjacent vectors is less than or equal to the first preset value, step S23 is executed.
In step S22, the point sampling module 241 determines a sub-outline between two adjacent points as a curve, and obtains sampled points in the curve according to the included angle. For example, as shown in
In step S23, the point sampling module 241 determines a sub-outline between the two adjacent points as a straight line, and obtains corresponding sampled points by moving the two adjacent points with a second preset distance toward a center position of the straight line. For example, the second preset distance is 0.2 millimeters.
In step S24, the point sampling module 241 obtains coordinates of the sampled points and direction vectors of the sampled points, and stores the coordinates and the direction vectors of the sampled points in a document (e.g. a text file). As shown in
In step S30, the measurement program creating module 242 moves each sampled point with the first preset distance along the direction of the corresponding vector of each sampled point, and obtain a reference point corresponding to each sampled point. The reference points are used to measure the outline of the object 42. The probe 41 does not contact the outline of the object 42 directly, thus, the sampled points in the outline of the object 42 need to be moved with the first preset distance, such that the surface of the object 42 is not damaged by the probe 41 when the outline of the object 42 is measured.
In step S31, the measurement program creating module 242 determines whether a connecting line between each two adjacent reference points is overlapping with the outline of the object 42, and inserts a point between the two adjacent reference points when the connecting line is overlapping with the outline of the object 42, until the connecting line is not overlapping with the outline of the object 42.
For example, as shown in
In step S32, the measurement program creating module 242 stores coordinates and direction vectors of the reference points, and coordinates of the inserted points in a document (e.g., a text file), and obtain a measurement program of the outline of the object 42. An example of the measurement program is shown in
In step S40, the tolerance obtaining module 243 measures the outline of the object 42 by controlling movements of the probe 41 using the measurement program to obtain measurement points of the outline of the object 42.
In step S41, the tolerance obtaining module 243 obtains a tolerance “D” of each measurement point by calculating a distance between each measurement point and the corresponding reference point, and compares the tolerance “D” of each measurement point with a second preset value “t2”. For example, the second preset value is 0.01 millimeters.
In step S42, the tolerance obtaining module 243 determines whether the tolerance of each measurement point is greater than the second preset value (D>t2). If the tolerance of one measurement point is greater than the second preset value, step S43 is executed. If the tolerance of one measurement point is less than or equal to the second preset value, step S44 is executed.
In step S43, the tolerance obtaining module 243 determines that the tolerance of the measurement point is not within a tolerance range, and a sub-outline at the measurement point is unqualified.
In step S43, the tolerance obtaining module 243 determines that the tolerance of the measurement point is within the tolerance range, and the sub-outline at the measurement point is qualified. Then, the tolerance obtaining module 243 obtains a tolerance of the outline of the object 42 by calculating a difference between a maximum tolerance and minimum tolerance of the measurement points. For example, as shown in
In step S50, the measurement report generating module 244 fits a reference line according to the reference points, and determines an upper tolerance line and a lower tolerance line according to the reference line. As shown in
In step S51, the measurement report generating module 244 connects each measurement point and the corresponding reference point in the reference line, and displays the tolerance of each measurement point and the tolerance of the outline of the object 42 in a graphic user interface (refers to
In step S52, the measurement report generating module 244 sets connecting lines of the measurement points with different colors according to the tolerances of the measurement points. In one embodiment, if the tolerance of a first measurement point is within a preset tolerance range, the measurement report generating module 244 determines a second measurement adjacent to the first measurement point, and sets a connecting line between the first measurement point and the second measurement point as a preset color corresponding to the preset tolerance range.
For example, as shown in
In step S52, the measurement report generating module 244 sets connecting lines of the measurement points with different colors according to the tolerances of the measurement points. In one embodiment, if the tolerance of a first measurement point is within a preset tolerance range, the measurement report generating module 244 determines a second measurement adjacent to the first measurement point, and sets a connecting line between the first measurement point and the second measurement point as a preset color corresponding to the preset tolerance range.
For example, as shown in
In other embodiments, the measurement report generating module 244 may set connecting lines between the measurement points and the reference points with different colors according to the tolerances of the measurement points. For example, if the tolerance of a first measurement point is within a preset tolerance range, the measurement report generating module 244 determines a first reference point corresponding to the first measurement point, and sets a connecting line between the first measurement point and the first reference point as a preset color corresponding to the preset tolerance range.
For example, as shown in
In other embodiments, step S52 may be removed from
In step S53, the measurement report generating module 244 outputs a graphic measurement report including the tolerance of each measurement point and the tolerance of the outline of the object 42. An example of the graphic measurement report is shown 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 |
---|---|---|---|
2012103344933 | Sep 2012 | CN | national |