Processing program generation assistance device
The machining program generation auxiliary device analyzes the CAD data of the workpiece and checks for erroneous inputs in the machining program manually generated by the operator, thereby improving the efficiency and accuracy of machining program generation and reducing the occurrence of erroneous inputs.
Patent Information
- Application Number
- CN202010863217.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-27
- Filing Date
- 2020-08-25
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2040-08-25
AI Technical Summary
In the prior art, when manually generating machining programs, the operator needs to manually check the CAD drawing of the workpiece, which can lead to input errors, resulting in low efficiency and incomplete checks.
The auxiliary device for generating machining programs for workpieces via a CAD data analysis unit acquires the shape information of the workpiece, matches its relative position with the machining program manually generated by the operator, checks for incorrect inputs, and displays errors.
It improves the efficiency of checking for operator errors, reduces the accuracy of manually generated error displays, and reduces the occurrence of errors.
Smart Images

Figure CN112446103B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a machining program generation assistance device. BACKGROUND
[0002] For example, a technique of generating a machining program for controlling the operation of an industrial machine such as a machine tool or an industrial robot to perform machining of a workpiece (machining target) based on CAD (Computer Aided Design) data of the workpiece is known. As such a machining program generation technique, a CAM (Computer Aided Manufacturing) technique or the like of automatically generating a machining program based on CAD data is known (for example, refer to Patent Document 1).
[0003] Prior Art Documents
[0004] Patent Documents
[0005] Patent Document 1: Japanese Patent Application Publication No. H11-66112 SUMMARY
[0006] Problem to be Solved by the Invention
[0007] On the other hand, in the case of simple machining, CAM is not used, and for example, a CAD drawing is sometimes displayed on a CNC (Computer Numerical Control), and an operator generates a machining program manually while observing the CAD drawing. In this case, when all of the shapes of the workpiece (machining shapes) are manually input, the work efficiency is poor and the number of input errors increases.
[0008] Therefore, a technique of being able to check the input errors of an operator when the operator manually generates a machining program is desired.
[0009] Means for Solving the Problem
[0010] The processing program generation assistance device according to the present disclosure is a processing program generation assistance device that assists in generation of a processing program for a workpiece based on CAD data of the workpiece, and includes: a CAD data analysis section that analyzes the CAD data to obtain shape information of the workpiece, i.e., CAD shape information; a processing program analysis section that analyzes a processing program under production made by an operator to obtain shape information of the workpiece under production, i.e., processing shape information; a relative position matching section that performs relative position matching of shapes between the CAD shape information obtained by the CAD data analysis section and the processing shape information under production obtained by the processing program analysis section to obtain matching shape information, and determines whether there is a portion in the processing shape information in which an operator has made an erroneous input based on the matching shape information; and a display section that displays the processing shape information obtained by the processing program analysis section and performs error display of a portion in the processing shape information in which an erroneous input by the operator is determined by the relative position matching section.
[0011] Effects of the Invention
[0012] According to the present disclosure, it is possible to check an erroneous input by an operator when the operator manually generates a processing program. BRIEF DESCRIPTION OF DRAWINGS
[0013] FIG. 1 FIG. 1 is a diagram showing one embodiment of a processing program generation assistance device.
[0014] FIG. 2A FIG. 2 is a diagram showing one example of an NC program under production made by an operator and shape information of a workpiece under production in the NC program obtained by analysis by an NC program analysis section.
[0015] FIG. 2B FIG. 3 is a flowchart showing an NC program analysis process by the NC program analysis section.
[0016] FIG. 3A FIG. 4 is a diagram showing one example of CAD data and shape information of a workpiece obtained by analysis by a CAD data analysis section.
[0017] FIG. 3B FIG. 5 is a flowchart showing a CAD data analysis process by the CAD data analysis section.
[0018] FIG. 4A FIG. 6 is a diagram showing one example of CAD shape information and NC shape information in hole processing in which relative position matching is performed by a relative position matching section.
[0019] FIG. 4Bis a flowchart showing the relative position matching process (hole position) by the relative position matching section.
[0020] FIG. 5 is a diagram showing an example of the hole position in the relative position matching process (hole position) by the relative position matching section.
[0021] FIG. 6A is a diagram showing an example of the NC shape information and the CAD shape information in the contour machining in which the shape matching is performed by the relative position matching section.
[0022] FIG. 6B is a flowchart showing the relative position matching process (contour shape) by the relative position matching section.
[0023] FIG. 7A is a diagram showing an example of the contour shape in the relative position matching process (contour shape) by the relative position matching section.
[0024] FIG. 7B is a diagram showing another example of the contour shape in the relative position matching process (contour shape) by the relative position matching section.
[0025] FIG. 7C is a diagram showing still another example of the contour shape in the relative position matching process (contour shape) by the relative position matching section.
[0026] FIG. 7D is a diagram showing still another example of the contour shape in the relative position matching process (contour shape) by the relative position matching section.
[0027] FIG. 8A is a diagram showing an example of the NC shape information in the hole machining in which the coordinate matching is performed by the coordinate value checking section and the CAD shape information in the coordinate system set by the coordinate setting section.
[0028] FIG. 8B is a flowchart showing the coordinate value checking process (hole position) by the coordinate value checking section.
[0029] FIG. 9A is a diagram showing an example of the NC shape information in the contour machining in which the coordinate matching is performed by the coordinate value checking section and the CAD shape information in the coordinate system set by the coordinate setting section.
[0030] FIG. 9B is a flowchart showing the coordinate value checking process (contour shape) by the coordinate value checking section.
[0031] FIG. 10 is a flowchart showing the candidate prediction process (hole position) by the candidate prediction section.
[0032] FIG. 11A Fig. 9 is a diagram showing an example of the matching shape information in hole machining, the part where the operator made a misinput, and the candidate shape (lattice) generated by the candidate prediction section.
[0033] FIG. 11B Fig. 10 is a diagram showing another example of the matching shape information in hole machining, the part where the operator made a misinput, and the candidate shape (lattice) generated by the candidate prediction section.
[0034] FIG. 11C Fig. 11 is a diagram showing another other example of the matching shape information in hole machining, the part where the operator made a misinput, and the candidate shape (lattice) generated by the candidate prediction section.
[0035] FIG. 11D Fig. 12 is a diagram showing an example of the matching shape information in hole machining, the part where the operator made a misinput, and the candidate shape (straight line) generated by the candidate prediction section.
[0036] FIG. 11E Fig. 13 is a diagram showing an example of the matching shape information in hole machining, the part where the operator made a misinput, and the candidate shape (arc) generated by the candidate prediction section.
[0037] FIG. 11F Fig. 14 is a diagram showing an example of the matching shape information in hole machining, the part where the operator made a misinput, and the candidate shape (quadrangle) generated by the candidate prediction section.
[0038] FIG. 12 Fig. 15 is a flowchart showing the candidate prediction processing (contour shape) by the candidate prediction section.
[0039] FIG. 13 Fig. 16 is a diagram showing an example of the matching shape information in contour machining, the shape based on the misinput by the operator, and the candidate shape generated by the candidate prediction section.
[0040] FIG. 14 Fig. 17 is a flowchart showing the machining program correction processing (hole position) by the machining program correction section.
[0041] FIG. 15 Fig. 18 is a flowchart showing the machining program correction processing (contour shape) by the machining program correction section.
[0042] FIG. 16 Fig. 19 is a diagram showing an example of the CAD data display (right side) and the program display (left side) of the display section (hole machining).
[0043] FIG. 17 Fig. 20 is a diagram showing an example of the CAD data display (right side) and the program display (left side) of the display section (contour machining).
[0044] Explanation of Reference Numerals
[0045] 1: processing program generation assistance device; 12: NC program analysis section (processing program analysis section); 22: CAD data analysis section; 30: relative position matching section; 41: coordinate system setting section; 50: coordinate value checking section; 60: candidate prediction section; 71: candidate selection section; 72: program correction section; 80: display section. DETAILED DESCRIPTION
[0046] An example of an embodiment of the present application will be described below with reference to the accompanying drawings. In each drawing, the same reference numerals are assigned to the same or equivalent parts.
[0047] FIG. 1 is a drawing showing one embodiment of a processing program generation assistance device. FIG. 1 The processing program generation assistance device 1 shown is mounted on a numerical control device (Computer Numerical Control: CNC) of a machine tool, for example. The numerical control device controls the operation of the machine tool based on a processing program (hereinafter, also referred to as NC program) to perform the processing of a workpiece. In the case of simple processing, a CAM is not used, and a CAD drawing is displayed on the numerical control device, for example, and an operator generates a processing program while observing the CAD drawing. In this way, when the operator generates a processing program manually, the processing program generation assistance device 1 checks for an erroneous input by the operator and assists in the generation of the processing program.
[0048] The processing program generation assistance device 1 is provided with an NC program input section 11, an NC program analysis section 12, an NC shape information storage section 13, a CAD data input section 21, a CAD data analysis section 22, a first CAD shape information storage section 23, a relative position matching section 30, a coordinate system setting section 41, a second CAD shape information storage section 42, a coordinate value checking section 50, a candidate prediction section 60, a candidate selection section 71, a program correction section 72, and a display section 80.
[0049] The NC program input section 11 inputs an NC program made by an operator.
[0050] The NC program analysis section 12 is a processing program analysis section that analyzes an NC program made by an operator in the middle of making to obtain shape information of a workpiece in the middle of making, i.e., NC shape information. The NC program is a processing program input to the NC program input section 11 by the operator.
[0051] The NC shape information is machining shape information. As described later, in the case of hole machining, the NC shape information includes "coordinates of a center point of a hole position", and in the case of contour machining, the NC shape information includes at least one of "coordinates of a start point and coordinates of an end point of a straight line", "coordinates of a center point and a radius of a circle", and "coordinates of a center point, a radius, a start point angle, and an end point angle of a circular arc".
[0052] The NC shape information storage section 13 stores the NC shape information obtained by the analysis by the NC program analysis section 12.
[0053] The CAD data input section 21 inputs CAD data of a workpiece, for example, from CAD.
[0054] The CAD data analysis section 22 analyzes the CAD data to obtain shape information of the workpiece, that is, CAD shape information. As described later, in the case of hole machining, the CAD shape information includes "coordinates of a center point of a hole position", and in the case of contour machining, the CAD shape information includes at least one of "coordinates of a start point and coordinates of an end point of a straight line", "coordinates of a center point and a radius of a circle", and "coordinates of a center point, a radius, a start point angle, and an end point angle of a circular arc".
[0055] The first CAD shape information storage section 23 stores the CAD shape information obtained by the analysis by the CAD data analysis section 22.
[0056] The relative position matching section 30 reads out the NC shape information obtained by the NC program analysis section 12 from the NC shape information storage section 13 and reads out the CAD shape information obtained by the CAD data analysis section 22 from the first CAD shape information storage section 23, and matches the NC shape information and the CAD shape information in shape of relative position. Thus, the relative position matching section 30 obtains relative position matching shape information in which the matching in shape of relative position is performed. At the same time, the relative position matching section 30 determines whether or not there is an operator's misinput of position in the NC shape information, on the basis of the obtained relative position matching shape information. In the case where it is determined by the relative position matching section 30 that there is the operator's misinput of position in the NC shape information, information of a result of the determination relating to a site of the misinput is transmitted to the display section 80.
[0057] The coordinate system setting section 41 reads out the CAD shape information obtained by the CAD data analysis section 22 from the first CAD shape information storage section 23, and sets a coordinate system of the CAD shape information with respect to the CAD shape information. Specifically, the coordinate system setting section 41 sets an XY coordinate system and an origin on the CAD data display section 81 of the display section 80 described later with respect to the CAD shape information.
[0058] The second CAD shape information storage section 42 stores CAD shape information in the coordinate system set by the coordinate system setting section 41.
[0059] The coordinate value checking section 50 reads out the NC shape information obtained by the NC program analysis section 12 from the NC shape information storage section 13, and reads out the CAD shape information in the coordinate system set by the coordinate system setting section 41 from the second CAD shape information storage section 42, matches the coordinates of the NC shape information with the coordinates of the CAD shape information, and obtains matching coordinate information (CAD shape information after matching) in which the coordinates are matched. At the same time, the coordinate value checking section 50 determines whether or not there is an operator's mistake in the coordinate value in the NC shape information, based on the obtained matching coordinate information. In a case where it is determined by the coordinate value checking section 50 that there is an operator's mistake in the coordinate value in the NC shape information, information of the determination result relating to the coordinate value of the mistake is sent to the display section 80.
[0060] The candidate prediction section 60 predicts a candidate shape following the matching coordinate information obtained by the coordinate value checking section 50, based on the CAD shape information in the coordinate system set by the coordinate system setting section 41, thereby predicting a candidate shape following the NC shape information at the middle of the production, and automatically generates candidate shape information including the coordinate value. For example, the prediction of the candidate shape by the candidate prediction section 60 can be performed in a case where it is determined by the coordinate value checking section 50 that there is an operator's mistake in the coordinate value in the NC shape information. The candidate shape information predicted by the candidate prediction section 60 is information in which a supposed correct coordinate value and a position indicated by the coordinate value are expressed in place of the operator's mistake in the coordinate value and a position indicated by the coordinate value in the NC shape information at the middle of the production. The candidate shape information generated by the candidate prediction section 60 is sent to the display section 80.
[0061] The candidate selection section 71 is configured to enable an operator to perform selection input of the candidate shape information generated by the candidate prediction section 60. For example, the candidate selection section 71 can be set on a screen of the display section 80 on which the candidate shape information is displayed. Thus, the operator can directly perform selection input of the candidate shape information displayed on the screen of the display section 80.
[0062] The program correction section 72 automatically corrects the NC program at the middle of the production made by the operator, based on the candidate shape information selected and input by the operator through the candidate selection section 71, and reflects the candidate shape information selected and input by the candidate selection section 71 into the NC program. The corrected NC program in which the correction is performed by the program correction section 72 is sent to the display section 80.
[0063] The display section 80 is a display device such as a liquid crystal display. As described above, the display section 80 displays the NC shape information obtained by the NC program analysis section 12, the CAD shape information in the coordinate system set by the coordinate system setting section 41, the matching coordinate information in which the coordinates are matched, the candidate shape information predicted by the candidate prediction section 60, the corrected NC program in which the correction is performed by the program correction section 72, and the like. FIG. 1As shown, the display section 80 in the present embodiment includes at least a CAD data display section 81, a program display section 82, a relative position error display section 83, a coordinate value error display section 84, and a candidate display section 85.
[0064] Here, the display section 80 will be described with reference to FIG. 16 and FIG. 17 FIG. 16 is a diagram showing an example of CAD data display (right side) and program display (left side) of the display section 80 (hole processing). FIG. 17 is a diagram showing an example of CAD data display (right side) and program display (left side) of the display section 80 (contour processing).
[0065] The CAD data display section 81 is set in a rectangular region on the right half of the screen of the display section 80. The CAD data display section 81 displays CAD data (CAD drawing) of the workpiece obtained by analysis by the CAD data analysis section 22. Thus, the operator can generate the NC program manually while observing the CAD data display section 81.
[0066] The program display section 82 is set in a rectangular region on the left half of the screen of the display section 80. The program display section 82 displays the NC program under production by the operator. In the case where the NC program is corrected by the program correction section 72, the program display section 82 can also display the NC program after the correction.
[0067] The relative position error display section 83 is set on the CAD data display section 81. The relative position error display section 83 error-displays information of the result of the determination in the case where the operator's mis-input of position is determined to exist in the NC shape information by the relative position matching section 30, in a manner of being superimposed on the CAD data displayed in the CAD data display section 81.
[0068] As for the error display by the relative position error display section 83, it is desirable to be performed in a manner that the portion where the operator's mis-input of position exists can be easily discriminated from other portions. The error display by the relative position error display section 83 can be, for example, emphasis display. As a specific method of emphasis display, a method of displaying the color of the portion where mis-input exists as a color different from the color of other portions (e.g., red, yellow, etc.), a method of making the portion where mis-input exists flicker, a method of indicating the portion where mis-input exists with an arrow, and the like can be cited. Thus, the operator can easily recognize on the screen the case where the shape information of the NC program under production has an error in position.
[0069] The coordinate value error display section 84 is provided on the program display section 82. The coordinate value error display section 84 performs error display of the result of determination in the case where the operator's erroneous input of the coordinate value exists in the NC shape information, which is determined by the coordinate value checking section 50, in a manner of overlapping the NC program in the middle of the production displayed on the program display section 82.
[0070] With regard to the error display by the coordinate value error display section 84, it is desirable to be performed in a manner that the portion in which the operator's erroneous input of the coordinate value exists in the NC shape information can be easily discriminated from other portions. For example, the error display by the coordinate value error display section 84 can be emphasized display performed by the same method as the error display by the relative position error display section 83. Thereby, the operator can easily recognize the case where the error exists in the coordinate value of the NC program in the middle of the production on the screen.
[0071] The candidate display section 85 is provided on the CAD data display section 81 and the program display section 82. The candidate display section 85 displays the coordinate value in the candidate shape information generated by the candidate prediction section 60 and the shape represented by the coordinate value in a manner of overlapping the NC shape information in the middle of the production displayed on the program display section 82 and the CAD data displayed on the CAD data display section 81. The candidate shape information predicted by the candidate prediction section 60 is information that represents the assumed correct coordinate value and shape by replacing the coordinate value erroneously input by the operator and the shape represented by the coordinate value in the NC shape information in the middle of the production. As a specific method of the candidate display, a method of displaying the candidate coordinate value or the candidate position representing the candidate shape information by the same method as the above-described exemplified emphasized display can be cited. As shown in Figs. 17 and 18, the candidate display section 85 can also display the candidate display of the coordinate value in a manner of overlapping the CAD data displayed on the CAD data display section 81. FIG. 16 and FIG. 17 As shown in Figs. 17 and 18, the candidate display section 85 can also display the candidate display of the coordinate value in a manner of overlapping the CAD data displayed on the CAD data display section 81.
[0072] As shown in Figs. 17 and 18, the display section 80 can also have, for example, a character string display section 86 in the lower portion of the screen, which displays the case where the operator's erroneous input exists with a character string. FIG. 16 and FIG. 17 As shown in Figs. 17 and 18, the display section 80 can also have, for example, a character string display section 86 in the lower portion of the screen, which displays the case where the operator's erroneous input exists with a character string.
[0073] The processing program generation assistance device 1 (except for the NC shape information storage section 13, the first CAD shape information storage section 23, the second CAD shape information storage section 42, and the display section 80) is constituted by, for example, an arithmetic processor such as a DSP (Digital Signal Processor), an FPGA (Field-Programmable Gate Array), or the like. The various functions of the processing program generation assistance device 1 (except for the NC shape information storage section 13, the first CAD shape information storage section 23, the second CAD shape information storage section 42, and the display section 80) can be realized, for example, by executing a prescribed software (program, application) stored in a storage section. The various functions of the processing program generation assistance device 1 (except for the NC shape information storage section 13, the first CAD shape information storage section 23, the second CAD shape information storage section 42, and the display section 80) can be realized by cooperation of hardware and software, or can be realized by hardware (electronic circuit) alone.
[0074] The NC shape information storage section 13, the first CAD shape information storage section 23, and the second CAD shape information storage section 42 can use a rewritable memory such as an EEPROM (Electrically Erasable Programmable read only memory) or a rewritable disk such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive).
[0075] Next, the operation of the processing program generation assistance device 1 will be described. First, the processing program generation assistance device 1 displays the input CAD data of the workpiece (i.e., the CAD drawing of the workpiece) on the CAD data display section 81 of the display section 80. Then, the operator manually creates (inputs) an NC program through the NC program input section 11 based on the CAD drawing of the workpiece displayed on the CAD data display section 81. The processing program generation assistance device 1 displays the NC program created (input) by the operator halfway through creation on the program display section 82 of the display section 80. The operation of each section in the processing program generation assistance device 1 will be described in detail below.
[0076] (NC program analysis)
[0077] FIG. 2A is a drawing showing an example of the shape information of the workpiece halfway through creation in the NC program created by the operator and the NC program analyzed by the NC program analysis section (hereinafter, also referred to as NC shape information). FIG. 2Bis a flowchart showing NC program analysis processing by the NC program analysis section.
[0078] First, the NC program analysis section 12 analyzes the one program block immediately before the cursor in the NC program under production by the operator and displayed on the program display section 82 (S101). The NC program analysis section 12 determines whether the machining instruction is the start of hole machining or contour machining (e.g., end face roughing cycle) based on the G code instruction, for example (S102). For example, the NC program analysis section 12 determines that the machining instruction is the start of hole machining in the case where the G code instruction is "G81" and determines that the machining instruction is the start of contour machining in the case where the G code instruction is "G72".
[0079] In the case where the machining instruction is neither the start of hole machining nor the start of contour machining in step S102, the NC program analysis section 12 analyzes the one program block immediately before the cursor, i.e., the next one program block (S103), and returns to step S102. In this way, the NC program analysis section 12 analyzes the NC program under production program block by program block.
[0080] In the case where the machining instruction is the start of hole machining or contour machining in step S102, the NC program analysis section 12 determines whether the machining instruction is hole machining (S104). In the case where the machining instruction is hole machining, the NC program analysis section 12 saves the first hole position after the machining instruction as NC shape information in the NC shape information holding section 13 (S105).
[0081] Next, the NC program analysis section 12 analyzes the next line (S106) to determine whether it is the cursor line, i.e., whether the analysis of all shape program blocks has ended (S107). In the case where it is not the cursor line, it returns to step S105 to repeat the processing from step S105 to step S107. On the other hand, in the case where it is the cursor line, the NC program analysis section 12 ends the analysis.
[0082] Thus, in the case of hole machining, the NC program analysis section 12 obtains the hole positions PI, P2, P3...PM produced (input) by the operator as NC shape information. The hole position is the center point, for example. Here, M is an arbitrary integer of two or more and less than N (N will be described later).
[0083] On the other hand, in the case where the machining instruction is not a hole machining, i.e., in the case where the machining instruction is a contour machining, the NC program analysis section 12 stores the first element after the machining instruction in the NC shape information storage section 13 as the NC shape information (S108). The element is a straight line "G01", a circle "G02", a circular arc "G03", or the like. In the case of the straight line "G01", the start point of the straight line and the end point of the straight line are included. In the case of the circle "G02", the center point of the circle and the radius of the circle are included. In the case of the circular arc "G03", the center point of the circular arc, the radius of the circular arc, the start angle of the circular arc, and the end angle of the circular arc are included.
[0084] Next, the NC program analysis section 12 analyzes the next line (S109) to determine whether it is a cursor line, i.e., to determine whether the analysis of all the shape program blocks has ended (S110). In the case where it is not a cursor line, the processing from step S108 to step S110 is repeated. On the other hand, in the case where it is a cursor line, the NC program analysis section 12 ends the analysis.
[0085] Thus, in the case of the contour machining, the NC program analysis section 12 obtains the elements El, E2, E3,... EM made (input) by the operator as the NC shape information. Here, M is an arbitrary integer of 2 or more and less than N (N will be described later). As described above, the element refers to a straight line, a circle, a circular arc, or the like.
[0086] (CAD data analysis)
[0087] FIG. 3A is a diagram showing an example of CAD data (CAD file) and shape information of a workpiece obtained by analysis by the CAD data analysis section (hereinafter, also referred to as CAD shape information). FIG. 3B is a flowchart showing the CAD data analysis processing by the CAD data analysis section.
[0088] First, the CAD data analysis section 22 analyzes the entities section (ENTITIES SECTION) (component object) in the CAD data line by line (S201) to determine whether it is the start of a circle (CIRCLE), i.e., to determine whether it is the start of a circular shape (S202). In the case where it is the start of a circle, the CAD data analysis section 22 analyzes the section in the CAD data line by line (S203) to determine whether it is the end of a circle, i.e., to determine whether it is the end of a circular shape (S204). In the case where it is not the end of a circle, the CAD data analysis section 22 stores the hole position or the contour shape as the CAD shape information in the first CAD shape information storage section 23 (S205). Thereafter, the CAD data analysis section 22 returns to step S203 to repeat the processing from step S203 to step S205.
[0089] Thus, in the case of the hole position, the CAD data analysis section 22 obtains the hole positions C1, C2, C3... CN in the CAD data as the CAD shape information. The hole position is, for example, a center point. Here, N is an arbitrary integer of 2 or more (N > M).
[0090] In the case of the contour shape, the CAD data analysis section 22 obtains the elements V1, V2, V3... VN in the CAD data as the CAD shape information. Here, N is an arbitrary integer of 2 or more (N > M). As described above, the element refers to a straight line, a circle, a circular arc, or the like.
[0091] On the other hand, in the case where the start is not a circle in step S202, that is, in the case where the start is an element other than a circle, the CAD data analysis section 22 analyzes the portion in the CAD data line by line (S206) to determine whether it is the end of an element other than a circle (S207). In the case where it is not the end of an element other than a circle, the CAD data analysis section 22 saves the contour shape as the CAD shape information in the first CAD shape information storage section 23 (S208). Thereafter, the CAD data analysis section 22 returns to step S206 to repeat the processing from step S206 to step S208.
[0092] Thus, the CAD data analysis section 22 obtains the elements V1, V2, V3... VN in the CAD data as the CAD shape information.
[0093] Further, in the case where the end is a circle in step S204, and in the case where the end is an element other than a circle in step S207, the CAD data analysis section 22 determines whether the solid portion in the CAD data is ended (S209). In the case where the solid portion is not ended, the CAD data analysis section 22 returns to step S201 to perform the processing from step S201 to step S209 on the next solid portion. On the other hand, in the case where the solid portion is ended, the CAD data analysis section 22 ends the analysis processing.
[0094] (Relative position matching; hole position)
[0095] FIG. 4A is a diagram showing an example of the NC shape information and the CAD shape information in hole processing in which relative position matching is performed by the relative position matching section. FIG. 4B is a flowchart showing the relative position matching processing (hole position) performed by the relative position matching section. FIG. 5 is a diagram showing an example of the hole position in the relative position matching processing (hole position) performed by the relative position matching section.
[0096] As FIG. 4AAs shown, the hole positions P1, P2, P3,... PM are stored in the NC shape information storage section 13 as the hole positions (center points) made by the operator.
[0097] First, the relative position matching section 30 draws straight lines L connecting the center points of the hole positions from the NC shape information read out from the NC shape information storage section 13 (S301). The processing of drawing the straight lines L is performed for each of the adjacent hole positions. By forming the straight lines L connecting the center points of all the hole positions, a polygon showing the relative positions of the plurality of hole positions is formed as shown in FIG. 5
[0098] Next, the relative position matching section 30 calculates information K from the straight lines L formed in step S301 (S302). The information K is information of the lengths of the straight lines L and information of the angles between the adjacent straight lines L.
[0099] After the information K is calculated, the relative position matching section 30 searches for a point group constituting a set of the hole positions (center points) satisfying the above information K from the CAD shape information read out from the first CAD shape information storage section 23 (S303), and determines whether the same point group exists in the CAD shape information (S304). In the case where the same point group exists in the CAD shape information, the relative position matching section 30 determines that the matching of the relative positions is successful (correct) (S305), and ends the relative position matching processing.
[0100] On the other hand, in the case where the same point group does not exist in the CAD shape information in step S304, the relative position matching section 30 determines that an error caused by the misinput of the operator has occurred in the hole positions in the NC shape information made by the operator during the making. Thereafter, the relative position matching section 30 transmits information relating to the determination result including the information of the hole position in which the misinput exists to the display section 80, and ends the relative position matching processing.
[0101] The shape information of the hole position in which the misinput exists transmitted to the display section 80 is displayed on the display section 80 by the relative position error display section 83 as shown in FIG. 16
[0102] (Relative position matching; contour shape)
[0103] FIG. 6A is a diagram showing an example of the NC shape information and the CAD shape information in the contour processing in which the shape matching by the relative position matching section is performed. FIG. 6B is a flowchart showing the relative position matching process (contour shape) by the relative position matching section. FIG. 7A to FIG. 7D is a diagram showing an example of the contour shape in the relative position matching process (contour shape) by the relative position matching section, respectively.
[0104] First, the relative position matching section 30 calculates the following information relating to each element E of the M elements E based on the NC shape information read from the NC shape information storage section 13 (S401).
[0105] Straight line: length (L) FIG. 7A
[0106] Arc: angle (θ) FIG. 7A
[0107] Circle: radius (R)
[0108] Angle between straight lines (φ) FIG. 7B
[0109] Angle between the intersection connecting line of the center and connecting point of the circle and a straight line (φ) FIG. 7C
[0110] Angle between the intersection connecting lines of the centers and connecting point of two circles (φ) FIG. 7D
[0111] After the above information is calculated, the relative position matching section 30 sets the repetition processing number i to i = 1 (S402). Next, the relative position matching section 30 searches for an element Ki having the same information as the element Ei calculated by the step S401 based on the CAD shape information read from the first CAD shape information storage section 23 (S403), and determines whether or not there is an element Ki having the same information as the element Ei in the CAD shape information (S404). In the case where there is an element Ki having the same information as the element Ei in the CAD shape information, the relative position matching section 30 determines whether or not the element Ei and the element Ki have an intersection point (S405), and in the case where the element Ei and the element Ki have an intersection point, determines whether or not i > M (S406) next. In the case where i > M, the relative position matching section 30 determines that the matching of the relative position is successful (correct) (S407), and ends the relative position matching process.
[0112] In the case where i < M in the step S406, the relative position matching section 30 increases the repetition processing number i (S408), and returns to the step S402. Thereafter, the relative position matching section 30 repeats the processing from the step S402 to the step S408.
[0113] On the other hand, in a case where the element Ki having the same information as the element Ei does not exist in the CAD shape information in step S404, or in a case where the elements Ei and Ki do not have the intersection point in step S405, the relative position matching section 30 determines that the position of the contour shape in the NC shape information at the middle of the production made by the operator has an error caused by the misinput of the operator (S409). Thereafter, the relative position matching section 30 transmits information about the determination result including the position of the contour shape in which the misinput exists to the display section 80, and ends the relative position matching process.
[0114] The information of the contour shape in which the misinput exists transmitted to the display section 80 is displayed on the display section 80 by the relative position error display section 83 as shown in FIG. 8. The relative position error display section 83 performs emphasized display of the contour shape in a manner of being overlaid on the CAD data displayed on the CAD data display section 81, for example. FIG. 17
[0115] Thus, the processing program generation assistance device 1 is able to determine whether or not the hole position, the contour shape in the NC shape information at the middle of the production made by the operator has an error caused by the misinput of the operator by having the relative position matching section 30. The relative position matching section 30 performs the relative position matching of the shape between the CAD shape information obtained by the CAD data analysis section 22 and the NC shape information at the middle of the production obtained by the NC program analysis section 12, thereby determining the misinput of the position by the operator in the NC shape information, and thus, the processing program generation assistance device 1 is able to check the misinput of the operator even without setting the coordinate system.
[0116] (Coordinate value check; hole position)
[0117] FIG. 8A is a diagram showing an example of the CAD shape information in the coordinate system set by the coordinate setting section and the NC shape information in the hole processing in which the coordinate matching is performed by the coordinate value check section. FIG. 8B is a flowchart showing the coordinate value check process (hole position) performed by the coordinate value check section.
[0118] First, the coordinate value check section 50 sets the number of repetition i to i = 1 (S501). Next, the coordinate value check section 50 reads out the CAD shape information in the set coordinate system from the second CAD shape information holding section 42, searches for the hole position having the same coordinate as the hole position Pi coordinate in the NC shape information from the CAD shape information (S502), and determines whether or not the hole position having the same coordinate as the hole position Pi coordinate in the NC shape information exists in the CAD shape information (S503). The information about the CAD shape information related to the hole position having the same coordinate as the hole position Pi in the NC shape information is the matching coordinate information.
[0119] In step S503, in the case where there is a hole position in the CAD shape information which has the same coordinates as the hole position Pi coordinates in the NC shape information, the coordinate value checking section 50 increments the number of repetition processing i, and determines whether i > M (S504). In the case where i ≤ M, the coordinate value checking section 50 returns to step S501, and repeats the processing from step S501 to step S504. In addition, in step S503, in the case where there is no hole position in the CAD shape information which has the same coordinates as the hole position Pi coordinates in the NC shape information, the coordinate value checking section 50 saves the information of the hole position Pi in a prescribed storage area (β) (S505), and proceeds to step S504. The information of the hole position Pi thus saved is information which is assumed to be a hole position which has been erroneously input by the operator.
[0120] In step S504, in the case where i > M, that is, in the case where the determination as to whether there is a hole position having the same coordinates in the CAD shape information has been completed with respect to all of the hole positions P1 to the hole position PM, the coordinate value checking section 50 determines whether β = NULL, that is, whether there is information of the hole position Pi saved in the prescribed storage area (β) (S506). In the case where β = NULL, that is, in the case where there is no information of the hole position Pi saved in the prescribed storage area (β), the coordinate value checking section 50 determines that the coordinate value matching is successful (correct) (S507), and ends the coordinate value checking processing.
[0121] On the other hand, in step S506, in the case where it is not β = NULL, that is, in the case where there is information of the hole position Pi saved in the prescribed storage area (β), the coordinate value checking section 50 determines that the coordinate value of the hole position in the NC shape information which is made by the operator halfway through the making has an error due to the erroneous input by the operator (S508). Thereafter, the coordinate value checking section 50 sends information relating to the determination result of the information including the coordinate value of the hole position in which there is an erroneous input to the display section 80, and ends the coordinate value checking processing.
[0122] The information of the coordinate value of the hole position in which there is an erroneous input which is input to the display section 80 is displayed on the display section 80 by the coordinate value error display section 84 as shown in FIG. 8. The coordinate value error display section 84 is provided in the program display section 82, and performs, for example, emphasized display of the coordinate value of the hole position. As shown in FIG. 9, the coordinate value error display section 84 can also be provided on the CAD data display section 81 in addition to being provided in the program display section 82. FIG. 16 FIG. 16
[0123] (Coordinate Value Checking; Contour Shape)
[0124] FIG. 9A is a view showing an example of NC shape information in profile processing and CAD shape information in the coordinate system set by the coordinate setting section, which are checked by the coordinate value checking section. FIG. 9B is a flowchart showing the coordinate value checking process (profile shape) by the coordinate value checking section.
[0125] As shown in FIG. 9A , the elements El, E2, E3,... EM are stored in the NC shape information storage section 13 as profile shapes made by the operator. The elements are straight lines, circles, circular arcs, etc.
[0126] First, the coordinate value checking section 50 sets the number of repetition i to i = 1 (S601). Next, the coordinate value checking section 50 reads out the CAD shape information in the set coordinate system from the second CAD shape information storage section 42, and searches for an element having the same coordinates as the element Ei in the NC shape information based on the CAD shape information (S602), and determines whether there is an element having the same coordinates as the element Ei in the NC shape information in the CAD shape information (S603). The information in the CAD shape information involved in the element having the same coordinates as the element Ei in the NC shape information is matching coordinate information.
[0127] In the case where there is an element having the same coordinates as the element Ei in the NC shape information in the CAD shape information in step S603, the coordinate value checking section 50 increments the number of repetition i, and determines whether i > M (S604). In the case where i < M, the coordinate value checking section 50 returns to step S601, and repeats the process from step S601 to step S604. In the case where there is no element having the same coordinates as the element Ei in the NC shape information in the CAD shape information in step S603, the coordinate value checking section 50 stores the information of the element Ei in a prescribed storage area (β) (S605), and proceeds to step S604. The information of the element Ei thus stored is information of an element of a profile shape assumed to be input by mistake by the operator.
[0128] In the case where i > M in step S604, i.e., in the case where the determination of whether there is an element having the same coordinates in the CAD shape information has been completed for all the elements El to EM, the coordinate value checking section 50 determines whether β = NULL, i.e., whether there is information of the element Ei stored in the prescribed storage area (β) (S606). In the case where β = NULL, i.e., in the case where there is no information of the element Ei stored in the prescribed storage area (β) at all, the coordinate value checking section 50 determines that the coordinate value matching is successful (correct) (S607), and ends the coordinate value checking process.
[0129] On the other hand, in step S606, in the case where β ≠ NULL, that is, in the case where the information of the element Ei saved in the prescribed storage area (β) exists, the coordinate value checking section 50 determines that the coordinate value of the contour shape in the NC shape information of the work-in-progress made by the operator has an error caused by the misinput of the operator (S608), transmits information about the determination result of the information including the coordinate value of the contour shape in which the misinput exists to the display section 80, and ends the coordinate value checking process.
[0130] The information of the coordinate value of the contour shape in which the misinput exists transmitted to the display section 80 is displayed on the display section 80 by the coordinate value error display section 84 as shown in FIG. 8. The coordinate value error display section 84 is provided in the program display section 82, and performs, for example, emphasized display of the coordinate value of the contour shape. As shown in FIG. 8, the coordinate value error display section 84 can be provided on the CAD data display section 81 in addition to the program display section 82. FIG. 17 FIG. 17
[0131] Thus, the machining program generation assistance device 1 can determine whether the coordinate value of the hole position, the contour shape in the NC shape information of the work-in-progress made by the operator has an error caused by the misinput of the operator by being provided with the coordinate system setting section 41, the second CAD shape information storage section 42, and the coordinate value checking section 50.
[0132] (Candidate prediction; hole position)
[0133] FIG. 10 is a flowchart showing the candidate prediction process (hole position) performed by the candidate prediction section. FIG. 11A to FIG. 11F are diagrams respectively showing an example of the matching shape information in the hole machining, the portion in which the misinput of the operator exists, and the candidate shape generated by the candidate prediction section.
[0134] First, the candidate prediction section 60 acquires the CAD shape information in the coordinate system set from the coordinate value checking section 50, and determines whether the correct input point is on the lattice with respect to the hole position of the CAD shape information checked by the coordinate value checking section 50 (S701). Whether it is a lattice can be determined depending on whether there are six or more hole positions in the CAD shape information. In the example of the lattice shown in FIG. 7, the solid circles arranged on the lattice indicate the correct input points. The solid circles arranged off the lattice are input points assumed to have the misinput of the operator. FIG. 11A to FIG. 11C FIG. 11A to FIG. 11C In the grid, the circles of dashed lines represent the predicted candidate shapes. The information of the candidate shapes generated is then sent to the display unit 80.
[0135] In step S701, if the correct input point is not on a grid, the candidate prediction unit 60 determines whether the correct input point is on the same straight line at the hole position in the CAD shape information (S703). FIG. 11D In the example of the straight lines shown, circles on solid lines arranged on the same straight line represent correct input points. Circles on solid lines that deviate from the same straight line are assumed to be input points where the operator has made a mistake. When the correct input points are on the same straight line, the candidate prediction unit 60 predicts the hole position on the straight line that follows the hole position in the CAD shape information, sets the predicted hole position as a candidate shape, and ends the candidate prediction process (S704). FIG. 11D In the diagram, the circles of dashed lines arranged on the same straight line represent the circles of the predicted candidate shapes. The information of the candidate shapes generated thereby is sent to the display unit 80.
[0136] In step S703, if the correct input points are not on the same straight line, the candidate prediction unit 60 determines whether the correct input point is on the circumference at the hole position in the CAD shape information (S705). FIG. 11E In the example of the arc shown, a circle with a solid line positioned on the circumference represents the correct input point. Circles with solid lines positioned off-circumference are assumed to be input points where the operator has entered incorrectly. When the correct input point is on the circumference, the candidate prediction unit 60 predicts the hole position on the arc following the hole position on the arc in the CAD shape information, sets the predicted hole position as a candidate shape, and ends the candidate prediction process (S706). FIG. 11E In the diagram, the circle marked with a dashed line on the circumference represents the circle of the predicted candidate shape. The information of the candidate shape generated thereby is sent to the display unit 80.
[0137] In step S705, if the correct input point is not located on the circumference, the candidate prediction unit 60 determines whether there are three correct input points at the hole location in the CAD shape information (S707). If there are three correct input points, it can be determined that the input point is located at a vertex of the quadrilateral. FIG. 11F In the example of the quadrilateral shown, the solid-line circles positioned at the vertices of the quadrilateral represent correct input points. Solid-line circles positioned away from the vertices of the quadrilateral are assumed to be input points where the operator has entered incorrectly. When there are three correct input points, the candidate prediction unit 60 predicts the hole positions at the vertices of the quadrilateral that follow the hole positions of the three points in the CAD shape information, sets the predicted hole positions as candidate shapes, and ends the candidate prediction process (S708). FIG. 11FIn this case, the dotted line circle disposed at the vertex of the quadrangle indicates a predicted candidate shape circle. The information of the candidate shape thus generated is sent to the display section 80.
[0138] In step S707, in the case where three correct input points do not exist, the candidate prediction section 60 does not perform candidate prediction of the hole position, and ends the candidate prediction processing.
[0139] By thus predicting using the candidate prediction section 60, the position and coordinate value of the candidate shape of the hole position thus generated are displayed by the candidate display section 85 in a manner superimposed on the CAD data of the CAD data display section 81 in the display section 80, for example, as shown in FIG. 16
[0140] (Candidate prediction; contour shape)
[0141] FIG. 12 is a flowchart showing the candidate prediction processing (contour shape) performed by the candidate prediction section. FIG. 13 is a diagram showing an example of the matching shape information in the contour processing, the shape based on the operator's misinput, and the candidate shape generated by the candidate prediction section.
[0142] First, the candidate prediction section 60 acquires the CAD shape information in the set coordinate system from the coordinate value checking section 50, searches for an element K continuous with the correctly input element in the contour shape of the CAD shape information checked in the coordinate value checking section 50 (S801), and stores this element K in a prescribed storage area (S802).
[0143] That is, as shown in FIG. 13 , in the case where there is an element Ei (the element Ei is a misinput shape assumed to be a misinput by the operator) not continuous with the elements Ei-1, Ei+1 between the correctly input elements Ei-1 and Ei+1, the candidate prediction section 60 searches for and stores the element connected to the elements Ei-1, Ei+1 as shown by the dotted line in FIG. 13 . Thereafter, the candidate prediction section 60 ends the candidate prediction processing.
[0144] By thus predicting using the candidate prediction section 60, the position and coordinate value of the candidate shape of the contour shape thus generated are displayed by the candidate display section 85 in a manner superimposed on the CAD data of the CAD data display section 81 in the display section 80, for example, as shown in FIG. 17
[0145] (Program correction; hole position)
[0146] FIG. 14 is a flowchart showing the machining program correction processing (hole position) performed by the machining program correction section.
[0147] The operator confirms the display of the display section 80, and inputs a candidate shape of the predicted hole position by the candidate selection section 71, for example, on a screen, whereby the operator can correct an erroneous input of the hole position. In a case where a candidate shape of the predicted hole position is input by the candidate selection section 71, the program correction section 72 creates a program of the hole position of the input (S901), and reflects the program in the NC program created by the operator halfway through the creation, whereby the NC program is automatically corrected.
[0148] (Program correction; contour shape)
[0149] FIG. 15 is a flowchart showing a machining program correction process (contour shape) performed by the machining program correction section.
[0150] The operator confirms the display of the display section 80, and inputs a candidate shape of the predicted contour shape by the candidate selection section 71, for example, on a screen, whereby the operator can correct an erroneous input of the contour shape. In a case where a candidate shape of the predicted contour shape is input by the candidate selection section 71, the program correction section 72 creates a program of the element K of the contour shape of the input (S1001), and reflects the program in the NC program created by the operator halfway through the creation, whereby the NC program is automatically corrected.
[0151] As described above, according to the machining program generation assistance device 1 of the present embodiment, the NC program halfway through the creation made by the operator is compared with the CAD data, and the machining program generation assistance device 1 automatically checks an erroneous input of the operator in the NC program halfway through the creation, and visually displays the result to the operator. Thus, the operator can easily confirm the presence of an erroneous input in the program halfway through the creation.
[0152] The above describes an embodiment of the machining program generation assistance device of the present disclosure, but the machining program generation assistance device of the present disclosure is not limited to the above-described embodiment, and various modifications and variations can be made. For example, in the above-described embodiment, a machining program generation assistance device that assists in the generation of an NC program of a numerical control device that controls a machine tool is exemplified. However, the machining program generation assistance device of the present disclosure is not limited to this, and can be applied to various machining program generation assistance devices that assist in the generation of a machining program of various industrial machines.
Claims
1. A machining program generation assistance device that assists generation of a machining program of a workpiece based on computer-aided design data of the workpiece, the machining program generation assistance device comprising: a computer-aided design data analysis section that analyzes the computer-aided design data to obtain shape information of the workpiece, i.e., computer-aided design shape information; a machining program analysis section that analyzes an in-process machining program made by an operator to obtain shape information of the workpiece in process, i.e., machining shape information; a relative position matching section that matches the computer-aided design shape information obtained by the computer-aided design data analysis section and the machining shape information obtained by the machining program analysis section in shape to obtain relative position matching shape information, and determines whether there is an operator's erroneous input of position in the machining shape information based on the relative position matching shape information; a display section that displays the machining shape information obtained by the machining program analysis section, and error displays a portion of the machining shape information in which there is the operator's erroneous input of position, which is determined by the relative position matching section; a coordinate system setting section that sets a coordinate system of the computer-aided design shape information obtained by the computer-aided design data analysis section; a coordinate value checking section that matches a coordinate of the computer-aided design shape information set by the coordinate system setting section and a coordinate of the machining shape information obtained by the machining program analysis section to obtain matching coordinate information in which the coordinates are matched, and determines whether there is an operator's erroneous input of coordinate value in the machining shape information based on the matching coordinate information; and a candidate prediction section that predicts a candidate shape that follows the matching coordinate information obtained by the coordinate value checking section based on the computer-aided design shape information in the coordinate system set by the coordinate system setting section, thereby predicting a candidate shape that follows the machining shape information, and automatically generates candidate shape information, wherein the display section further error displays a portion of the machining shape information in which there is the operator's erroneous input of coordinate value, which is determined by the coordinate value checking section, and displays the candidate shape information generated by the candidate prediction section in a manner that overlaps the machining shape information obtained by the machining program analysis section. The machining program generation assistance device further comprises: a candidate selection section that is used for the operator to input a selection of the candidate shape information generated by the candidate prediction section; and a program correction section that automatically corrects the machining program based on the candidate shape information on which the selection input is made by the candidate selection section, wherein the display section further displays the machining program after the correction made by the program correction section.
3. A machining program generation assistance device that assists generation of a machining program of a workpiece based on computer-aided design data of the workpiece, the machining program generation assistance device comprising: 2. The process program generation assistance device according to Claim 1, characterized by a computer-aided design data analysis section that analyzes the computer-aided design data to obtain shape information of the workpiece, i.e., computer-aided design shape information; a machining program analysis section that analyzes a machining program in the middle of production made by an operator to obtain shape information of the workpiece in the middle of production, i.e., machining shape information; a relative position matching section that matches the computer-aided design shape information obtained by the computer-aided design data analysis section and the machining shape information obtained by the machining program analysis section in shape of relative position to obtain relative position matching shape information, and determines whether there is an operator's error input of position in the machining shape information based on the relative position matching shape information; a display section that displays the machining shape information obtained by the machining program analysis section, and error displays a portion in the machining shape information in which there is an operator's error input of position determined by the relative position matching section; a coordinate system setting section that sets a coordinate system of the computer-aided design shape information obtained by the computer-aided design data analysis section; a coordinate value checking section that matches a coordinate of the computer-aided design shape information set by the coordinate system setting section and a coordinate of the machining shape information obtained by the machining program analysis section to obtain matching coordinate information in which coordinates are matched, and determines whether there is an operator's error input of coordinate value in the machining shape information based on the matching coordinate information; a candidate predicting section that predicts a candidate shape that follows the matching coordinate information obtained by the coordinate value checking section based on the computer-aided design shape information in the coordinate system set by the coordinate system setting section, thereby predicting a candidate shape that follows the machining shape information, and automatically generates candidate shape information; a candidate selecting section that is used for an operator to input a selection of the candidate shape information generated by the candidate predicting section; and a program correcting section that automatically corrects the machining program based on the candidate shape information on which a selection is input by the candidate selecting section wherein the display section further error displays a portion in the machining shape information in which there is an operator's error input of coordinate value determined by the coordinate value checking section, and further displays the machining program after correction by the program correcting section when the machining program is corrected by the program correcting section.
4. The machining program generation assistance device according to any one of claims 1 to 3, wherein the display section emphasizes the error display.
Citation Information
Patent Citations
Method for extracting shape feature from cad data and recording medium where shape feature extracting program is recorded
JP1999066112A
Numerical control device
US20140172151A1
Automated localization for GNSS device
US20150100269A1
Shape examination method and device therefor
US20150362310A1
Control method of profile measuring apparatus
US20170115109A1