Computing device, storage medium and method for outputting dimension data using the computing device

In a method for outputting dimension data using a computing device, a dimension file is read and searched for at least one dimension keyword. If there is the at least one dimension keyword in the dimension file, dimension data from the dimension file is extracted and stored as one or more structure variables into a structure array. Each of the one or more structure variables is added into a dimension field of a preset general list. Each dimension field in the preset general list is output into an output report according an output position of each dimension field, and the output report is displayed on a display screen.

BACKGROUND

1. Technical Field

The present disclosure relates to data output devices and methods, and more particularly to a computing device, a storage medium and a method for outputting dimension data using the computing device.

2. Description of Related Art

Dimensional Measuring Interface Specification (DMIS) programs are general dimension programs written according to a DMIS standard. However, because objects (e.g. a workpiece) have become more and more complicated and because large amounts of dimension data needs to be output from the DMIS programs, a report of the dimension data usually has to be output manually. Therefore, it is difficult to manage the dimension data efficiently and conveniently, such as sorting or analyzing the dimension data. Furthermore, the dimension data from the DMIS programs may not be quickly and conveniently output for obtaining desired data according to user preferences and requirements.

DETAILED DESCRIPTION

FIG. 1is a block diagram of one embodiment of a computing device1. The computing device1includes a dimension data output system10, a display screen20, a storage system30, and at least one processor40. The display screen20displays data of the computing device1, such as images of the computing device1. The storage system30stores data of the computing device1. In one embodiment, the storage system30stores a plurality of dimension files relating to different workpieces. The dimension files conform to a Dimensional Measuring Interface Specification (DMIS) standard. In one embodiment, each of the dimension files may include a plurality of codes related to dimension programs. InFIG. 2, partial content of one example of a dimension file is shown. The at least one processor40executes one or more computerized codes and other applications of the computing device1, to provide functions of the dimension data output system10. The dimension data output system10may process the dimension files, extract particular dimension data from the dimension files, and output a user-defined report including the dimension data. The dimension data may relate to dimensions of a workpiece including width and length, for example.

FIG. 3is a block diagram of function modules of one embodiment of the dimension data output system10ofFIG. 1. In one embodiment, the dimension data output system10may include a reading module100, a determination module101, an extraction module102, an addition module103, a management module104, a setting module105, and an output module106. The modules100-106comprise computerized codes in the form of one or more programs that are stored in the storage system30. The computerized codes include instructions that are executed by the at least one processor40to provide functions for the modules. Details of each of the modules are given inFIG. 4andFIG. 5.

FIG. 4is a flowchart of one embodiment of a method for outputting dimension data using the computing devices1ofFIG. 1. Depending on one embodiment, additional blocks may be added, others deleted, and the ordering of the blocks may be changed.

In block S10, the reading module100reads a dimension file from the storage system30, and searches the dimension file for at least one dimension keyword. In one embodiment, the dimension keyword may be determined based on whether the dimension file conforms to a predetermined output format. The predetermined output format governs whether the dimension file includes dimension data that can be output. For example, the dimension keyword may be a string “$$ PCD_SKIP_AND_FORGET”.

In block S11, the determination module101determines whether the dimension file conforms to the predetermined output format, in response to determining whether the dimension file includes the at least one dimension keyword. If the dimension file includes the at least one dimension keyword, the determination module101determines that the dimension file does conform to the predetermined output format, and then the procedure goes to block S12. If the dimension file does not include the at least one dimension keyword, the determination module101determines that the dimension file does not conform to the predetermined output format, and the procedure ends.

In block S12, the extraction module102extracts the dimension data from the dimension file according to the at least one dimension keyword discovered in the dimension file using a predetermined extraction method, and stores the dimension data as one or more structure variables into a structure array in a storage system30. The structure variables are members (or elements) that records information of the structure array, and the structure array is a data type that includes the one or more structure variables having the same structure type that stores the dimension data. The dimension data may include identifier (ID) numbers, nominal values, upper tolerances, and lower tolerances of the workpiece, for example. In one embodiment, each structure variable in the structure array may include one ID number, and one nominal value, one upper tolerance value, and one lower tolerance value corresponding to the ID number.

In one embodiment, the predetermined extraction method may include following steps: when the reading module100reads a first dimension keyword in the dimension file, the extraction module102obtains a dimension block in the dimension file by extracting lines of codes between the first dimension keyword and a blank line in the dimension file if only one dimension keyword exists. If there is a second dimension keyword after the first dimension keyword, the extraction module102obtains one or more dimension blocks by extracting the lines of codes between the first dimension keyword and the second dimension keyword in the dimension file. In one embodiment, the dimension block is a block of code in the dimension file that represents the lines of codes between the first dimension keyword and a blank line, or between the first dimension keyword and the second dimension keyword in the dimension file.

The extraction module102further extracts the dimension data of each of the dimension blocks by reading codes in a line of an equal symbol (“=”) string in each of the dimension blocks. For example, the extraction module102obtains the ID number after the “DIST” string before the “=” string, and obtains the nominal value, the upper tolerance, and the lower tolerance by reading three strings separated by commas after the “NOMIL” string. The extraction module102further converts formats of the dimension data from string types to float types, and stores each of the dimension blocks as one of the structure variables into the structure array.

As shown inFIG. 2, a first dimension block and a second dimension block are obtained as following: “T(DIST3)=TOL/DISTB,NOMINL,215.9,−0.01,0.01,XAXIS; OUTPUT/F(LIN3),F(LIN4),T(DIST3); OUTPUT/FA(LIN3),FA(LIN4),TA(DIST3)” and “T(DIST4)=TOL/DISTB,NOMINL,0,−0.01,0.01,XAXIS; OUTPUT/F(LIN4),F( ),T(DIST4); OUTPUT/FA(LIN4),FA( ),TA(DIST4)”. The extraction module102obtains the ID number “3” after the “DIST” string in the first dimension block, and obtains the nominal value “215.9”, the upper tolerance “−0.01”, and the lower tolerance “0.01”. The extraction module102converts the formats of the above-mentioned dimension data, and stores the dimension data of “the ID number 3, the nominal value 215.9, the upper tolerance −0.01, and the lower tolerance 0.01” of the first dimension block as a first structure variable into the structure array. The extraction module102further obtains the dimension data of “the ID number 4, the nominal value 0, the upper tolerance −0.01, and the lower tolerance 0.01” of the second dimension block as a second structure variable into the structure array.

In block S13, the addition module103adds each of the one or more structure variables into dimension fields in a preset general list. The dimension fields in the preset general list may include a field of the ID number, a field of the nominal, a filed of the upper tolerance, and a field of the lower tolerance. That is, each row of the preset general list includes the dimension data in each of the structure variables. For example, the addition module103adds the ID numbers in each of the structure variables into the field of ID number, and adds other dimension data in each of the structure variable into corresponding dimension fields.

In block S14, the management module104displays the preset general list with the added dimension data on the display screen20, and manages the dimension data in the preset general list. In one embodiment, the management module104may delete one of at least two rows of the dimension data having same ID numbers, sort and/or edit the dimension data in the preset general list according to user preferences.

FIGS. 5A,5B and5C provides an example of managing the preset general list.FIG. 5Ais the preset general list having the added dimension data. The preset general list includes a plurality of ID numbers, the nominal value, the upper tolerance, and the lower tolerance corresponding to each of the ID numbers. There are two rows having the same ID number “10” inFIG. 5A. As shown inFIG. 5B, the management module104may delete one of the two “10” rows of the dimension data according to user preference. The management module104may sort the dimension data of the preset general list in a descending or an ascending order according to the ID number, the nominal values, the upper tolerance values, or the lower tolerance values. AsFIG. 5Cshows, the dimension data of the preset general list are sorted in the ascending order according the ID numbers.

In block S15, the setting module105sets an output position in an output report of each dimension field, and sets a storage path of the output report. The output report may be a spreadsheet format for displaying the dimension data. In one embodiment, the setting module105may set the output position of the ID numbers to be “A4” position of the output report, that is, the ID numbers are displayed starting at column 1 and row 4.

In block S16, the output module106outputs each of the dimension fields in the preset general list into the output report and displays the output report on the display screen20, and stores the output report in the storage system30according the storage path. The output module106outputs each of the dimension fields according the output position of each dimension field.

All of the processes described above may be embodied in, and be fully automated via, functional code modules executed by one or more general-purpose 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 one 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 described embodiments are merely possible examples of implementations, and have been set forth for a clear understanding of the principles of the present disclosure. Many variations and modifications may be made without departing substantially from the spirit and principles of the present disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the described inventive embodiments, and the present disclosure is protected by the following claims.