Control device and control method
The control device addresses axis alignment issues between product shape data and NC program systems by aligning and correcting shape data within a specific error range, ensuring accurate production of designed shapes in machine tools.
Patent Information
- Application Number
- PCT/JP2024/002018
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2025-07-31
AI Technical Summary
Existing control devices for machine tools fail to accurately produce a designed product shape due to differences between the axis settings in geometric information of the product shape data and the program coordinate system of the NC program, leading to errors in the machining process.
A control device that includes a coordinate setting unit to align the product shape data with the program coordinate system, a difference detection unit to identify discrepancies, and a shape correction unit to adjust the product shape data within a specific geometric error range, ensuring accurate alignment and production of the intended product shape.
The control device ensures that the machine tool can produce a product with the desired shape by correcting discrepancies between the product shape data and the program coordinate system, improving the accuracy and success rate of machining programs.
Smart Images

Figure JP2024002018_31072025_PF_FP_ABST
Abstract
Description
Control device and control method
[0001] The present disclosure relates to a control device and a control method for controlling a machine tool.
[0002] Machine tools that cut products by turning materials are controlled by a control device such as a numerical control device. It is desirable for this control device to control the machine tool so as to manufacture products with the shape intended by the operator, i.e., the shape as designed. Machine tools equipped with a numerical control device execute an NC (Numerical Control) program to machine a workpiece into the desired product shape. When an NC creation program is generated to create this NC program, product shape data representing the product shape, such as CAD (Computer-Aided Design) data, is imported and defined in the NC creation program. However, various factors can cause discrepancies between the designed product shape and the product shape defined in the NC creation program.
[0003] To address this problem, the self-interfering solid correction device described in Patent Document 1 separates all faces of a three-dimensional solid corresponding to the product shape data into thin plates, checks the self-interference of all thin plates, and uses the results of the check to reconstruct the three-dimensional solid, thereby correcting the self-interfering solid.
[0004] Japanese Patent Application Publication No. 4-213168
[0005] However, when the technology of Patent Document 1 is applied to the creation of an NC creation program, although it is possible to correct the self-interfering product shape data itself, various processes such as format conversion of the product shape data may cause errors in the geometric information of each shape element included in the product shape data, and differences that the operator cannot anticipate may arise between the axes set in the geometric information of each shape element of the product shape data and the axes set in the program coordinate system of the NC program. This difference cannot be corrected, and there is a problem in that it is not possible to make the machine tool manufacture a product with the shape as designed.
[0006] The present disclosure has been made in consideration of the above, and aims to obtain a control device that can cause a machine tool to manufacture a product with a shape as designed, even if there is a difference between the axes set in the geometric information of each shape element included in the product shape data and the axes set in the program coordinate system of the NC program.
[0007] In order to solve the above-mentioned problems and achieve the object, a control device disclosed herein includes a coordinate setting unit that sets a program coordinate system so that a first direction set in product shape data representing the product shape coincides with a second direction set in the program coordinate system. The control device also includes a difference detection unit that detects a difference between the coordinates and first direction of the placed product shape and the coordinates and second direction of the program coordinate system, and a shape correction unit that corrects the product shape data if the difference is not within a specific range equal to or greater than a geometric allowable error, which is a geometrically allowable error amount.
[0008] The control device according to the present disclosure has the effect of being able to cause a machine tool to manufacture a product having a shape as designed, even if there is a difference between the axis set in the geometric information of each shape element included in the product shape data and the axis set in the program coordinate system of the NC program.
[0009]
[0010] Hereinafter, a control device and a control method according to an embodiment of the present disclosure will be described in detail with reference to the accompanying drawings.
[0011] 1 is a diagram showing the configuration of a numerical control device according to an embodiment. A numerical control device 100, which is a control device, is a computer that automatically creates a machining program PM (not shown), which is an NC program for numerically controlling a machine tool (not shown), and controls the machine tool using the machining program PM. The numerical control device 100 generates the machining program PM based on product shape data that indicates the shape of the product. The machine tool performs cutting, in which a workpiece, which is a material, is fixed and a tool is rotated, or turning, in which a tool is fixed and the workpiece is rotated.
[0012] When a difference occurs between an axis (first axis) of a specific portion of the product shape and an axis (second axis) set in the program coordinate system due to format conversion of the product shape data, the numerical control device 100 corrects this difference to generate the machining program PM. In other words, the numerical control device 100 corrects the product shape to be advantageous for generating the machining program PM, and then generates the machining program PM.
[0013] The numerical control device 100 may be mounted on a machine tool, or may be an external device connected to the machine tool. The numerical control device 100 numerically controls the operation of the machine tool in accordance with a created machining program PM. The machining program PM is used to cut a workpiece, i.e., a target object, from its raw material state to carve out the product shape of the machined product.
[0014] The product shape is the finished shape of a machined product. The material shape is the shape of the workpiece before machining. Examples of material shapes include a cylindrical shape or a rectangular parallelepiped shape that contains the product shape. Note that the material shape does not necessarily have to contain the product shape, and may be a shape in which any face of the product shape is thickened, or a shape in which holes in the product shape are removed. Examples of machine tools include machining centers, lathes, and multi-purpose lathes. The following describes the case in which the machine tool is a multi-purpose lathe.
[0015] The numerical control device 100 includes a machining program generation device 10, a machine learning device 20, an interactive operation processing unit 30, an instruction input unit 40, a display unit 50, and a control unit 60. In the example shown in FIG. 1 , the machining program generation device 10 and the machine learning device 20 are mounted on the numerical control device 100, but the embodiment is not limited to this example. For example, at least one of the machining program generation device 10 and the machine learning device 20 may be a device different from the numerical control device 100. That is, at least one of the machining program generation device 10 and the machine learning device 20 may be provided independently outside the numerical control device 100. Furthermore, the machining program generation device 10 and the machine learning device 20 may be configured as separate devices or as a single device.
[0016] The machining program generating device 10 generates a machining program PM including a plurality of cutting processes for cutting a machined product from a workpiece (material) by numerical control. The machining program generating device 10 receives shape data Fd and shape correction examples Fc from an external device. The shape correction examples Fc may be stored within the numerical control device 100 or in a device external to the numerical control device 100.
[0017] The shape correction example Fc is data of multiple shape correction examples created in the past. The shape correction example Fc is an example of correction of a product shape that was previously performed on the product shape. The shape correction example Fc may include data of shape correction performed by the numerical control device 100. Furthermore, the shape correction example Fc may include data of shape correction performed by another device.
[0018] The shape correction case Fc includes information on the correction method for the product shape data, the corrected product shape (product shape data after correction), product shape placement data, the position (coordinates) of the workpiece origin, and information on the direction vectors of each axis of the program coordinate system.
[0019] The machining program generator 10 generates a machining program PM based on shape data Fd input to the machining program generator 10 from outside the numerical control device 100. The shape data Fd includes material shape data, which is data on the object to be machined, and product shape data, which is data on the product shape.
[0020] The product shape data may include product material information indicating the material of the product shape, and the material shape data may include material material information indicating the material of the material shape. Furthermore, the shape data Fd may include assembly data of the material shape. In this case, the assembly data of the material shape is made up of a plurality of material shape data. Furthermore, the shape data Fd may include assembly data of the product shape. In this case, the assembly data of the product shape is made up of a plurality of product shape data.
[0021] The material shape data is data that defines the material shape, which is the shape of the workpiece before machining. The product shape data is data that defines the product shape, which is the shape of the workpiece after machining. The material shape data and product shape data are, for example, CAD data. Note that the product shape data and material shape data are not limited to CAD data, and may be any data that can be interpreted by the machining program generation device 10.
[0022] Upon receiving the product shape data, the machining program generation device 10 corrects the product shape using the shape correction data that is the inference result of the machine learning device 20. The shape correction data is data (such as a correction method) related to shape correction of the product shape corresponding to the product shape data.
[0023] The machining program generating device 10 of the embodiment generates a machining program PM based on product shape data after the product shape has been corrected and material shape data. The machining program generating device 10 generates a machining program PM including information on machining units (hereinafter referred to as machining unit information) based on placement data (placement positions of the material shape data and the product shape data), a workpiece origin, and a program coordinate system.
[0024] The workpiece origin is the origin set for the workpiece, which is the object to be machined. The workpiece origin is the origin of the program coordinate system and is the reference point used when generating the machining program PM. The workpiece origin is used to define the position and posture of the object to be machined. For example, the origin of the coordinate system of the machine tool is set as the workpiece origin. The machining program PM calculates the machining position and tool movement path based on the workpiece origin. For example, if the workpiece origin is set at X = 0, Y = 0, Z = 0, the machining program PM calculates the machining position and tool movement path based on this position.
[0025] A machining unit is a unit of machining in which continuous machining is performed using the same spindle and the same tool. Machining unit information is data on the machining process. Specifically, the machining unit information includes machining data including information on the machining method (hole machining, facing machining, etc.), tool data including information on the tool used for machining and information on the cutting conditions, and shape information that defines a machining shape consisting of a single shape.
[0026] Examples of machining units include a turning unit, a stepped hole machining unit, a surface machining unit, an R-chamfering machining unit, and a C-chamfering machining unit. The turning unit is a machining unit that performs turning, and the stepped hole machining unit is a machining unit that performs stepped hole machining (machining of holes with a step). The surface machining unit is a machining unit that performs surface machining, the R-chamfering machining unit is a machining unit that performs R-chamfering, and the C-chamfering machining unit is a machining unit that performs C-chamfering. Note that the shape information that defines the machining shape may include information such as the surface roughness of the workpiece.
[0027] The tool information includes the type of tool, the shape of the tool, etc. The tool information may also include tool holder information. The tool holder information includes the type of tool holder, the shape of the tool holder, etc. The cutting condition information includes the cutting speed, rotation speed, feed amount, etc. when the machine tool performs machining.
[0028] The machine learning device 20 generates a learning model Mx (not shown), which is a machine learning model used for correcting the shape of a product, based on a plurality of shape correction examples included in the shape correction example Fc.
[0029] The machine learning device 20 extracts product shape information (product shape, workpiece origin, program coordinate system) and a correction method, which is shape correction data, from the multiple shape correction examples included in the shape correction case Fc. Hereinafter, the product shape information including the product shape, workpiece origin, and program coordinate system may be referred to as product shape information.
[0030] The machine learning device 20 generates a learning model Mx based on the correspondence between the extracted product shape information and the correction method. In the embodiment, the correction method (shape correction data) corresponds to a first parameter described later, and the product shape information corresponds to a second parameter described later.
[0031] The learning model Mx is a model for inferring a correction method from product shape information. When product shape information is input, the learning model Mx infers and outputs a correction method corresponding to the product shape information. The machine learning device 20 infers a correction method from the product shape information using the generated learning model Mx, and sends the inferred correction method to the machining program generation device 10.
[0032] The interactive operation processing unit 30 is an interface between the numerical control device 100 and the operator, and also an interface between the machining program generating device 10 or the machine learning device 20 and the operator.
[0033] The interactive operation processing unit 30 transmits instruction information input by the worker via the instruction input unit 40 to the machining program generation device 10 or the machine learning device 20. The interactive operation processing unit 30 also displays the instruction information input by the worker via the instruction input unit 40 on the display unit 50. Note that the connection line between the interactive operation processing unit 30 and the machine learning device 20 is omitted in FIG. 1 .
[0034] The instruction input unit 40 is configured using input devices such as a mouse, a keyboard, etc. The instruction input unit 40 receives instruction information from the operator and transmits the instruction information to the dialogue operation processing unit 30.
[0035] The display unit 50 is a display device such as a liquid crystal monitor. The display unit 50 displays the machining program PM, shape correction examples Fc, shape data Fd which is CAD data, instruction information input by the operator via the instruction input unit 40, etc. The display unit 50 also displays various information related to the processing executed by the numerical control device 100. The control unit 60 controls the machine tool using the machining program PM generated by the machining program generation device 10.
[0036] The machining program generation device 10 has a shape input unit 11, a product shape memory unit 12, a material shape memory unit 13, a shape placement unit 14, a program coordinate setting unit 15, a difference detection unit 16, a shape correction unit 17, and a machining program generation unit 18.
[0037] The shape input unit 11 receives product shape data and material shape data input from an external device as shape data Fd. Note that the shape input unit 11 may receive the product shape data and material shape data separately from the external device.
[0038] The product shape storage unit 12 stores product shape data from the shape data Fd input to the shape input unit 11. The material shape storage unit 13 stores material shape data from the shape data Fd input to the shape input unit 11.
[0039] The shape placement unit 14 places the product shape of the product shape data stored in the product shape memory unit 12 and the material shape of the material shape data stored in the material shape memory unit 13. The shape placement unit 14 places the product shape and the material shape so that the product shape, which is the shape of the workpiece after machining, is contained within the material shape, which is the shape of the workpiece before machining. The shape placement unit 14 stores the product shape data of the placed product shape in the product shape memory unit 12, and stores the material shape data of the placed material shape in the material shape memory unit 13. The product shape data in which the product shape is placed includes information on the coordinates of the product shape (coordinates set in the product shape data) and the program coordinate system. Furthermore, the material shape data in which the material shape is placed includes information on the coordinates of the material shape and the program coordinate system.
[0040] The product shape storage unit 12 stores identification information (hereinafter referred to as shape identification information) for identifying a combination of the arranged product shape and material shape, in association with the product shape data. The material shape storage unit 13 stores the shape identification information of the arranged product shape and material shape, in association with the material shape data.
[0041] The shape placement unit 14 does not necessarily need to place the material shape and the product shape at a position where the material shape encloses the product shape. Alternatively, the shape placement unit 14 may place at least one of the product shape and the material shape at a position instructed by the operator via the interactive operation processing unit 30.
[0042] The program coordinate setting unit 15 places a workpiece origin and a program coordinate system at an arbitrary position from either the product shape or the material shape placed by the shape placement unit 14. The program coordinate setting unit 15 sets the workpiece origin and the program coordinate system so that the position and direction (first direction) set in the product shape coincide with the position and direction (second direction) set in the program coordinate system. That is, the program coordinate setting unit 15 aligns the product shape data with the program coordinate system. The first direction (first axis) corresponds to the first direction vector, and the second direction (second axis) corresponds to the second direction vector. The program coordinate setting unit 15 stores the coordinate values of the workpiece origin and the direction vectors of each axis of the program coordinate system in association with shape identification information.
[0043] The program coordinate setting unit 15 may place a workpiece origin and a program coordinate system designated at a position of the operator's choosing. In this case, the program coordinate setting unit 15 stores the coordinate values of the workpiece origin designated at a position of the operator's choosing and the direction vectors of the axes of the program coordinate system.
[0044] The program coordinate setting unit 15 also sets an initially set direction (for example, the Z-axis direction) as the turning direction and stores the set turning direction. Alternatively, the program coordinate setting unit 15 may set a direction designated by an operator at an arbitrary position as the turning direction and store the set turning direction.
[0045] The workpiece origin is the origin for creating the machining program PM, and is set, for example, at a specific position (center, corner, etc.) on the material shape. The program coordinate system is a coordinate system with the workpiece origin as its origin, and is set, for example, as a world coordinate system having X-, Y-, and Z-axes. Note that the workpiece origin does not have to be set at the center or corner of the surface, and may be set at any position by the operator.
[0046] The difference detection unit 16 reads out the product shape data arranged by the shape arrangement unit 14 and stored in the product shape storage unit 12 from the product shape storage unit 12. The difference detection unit 16 also reads out the program coordinate system stored in the program coordinate setting unit 15 from the program coordinate setting unit 15.
[0047] The difference detection unit 16 detects a difference between a position or direction (first direction) set in the product shape and a position or direction (second direction) set in the program coordinate system based on the product shape data and the program coordinate system. The difference detection unit 16 sends the product shape data, the program coordinate system, and the detected difference to the shape correction unit 17. The shape correction unit 17 corrects the product shape data based on the product shape data, the program coordinate system, and the difference.
[0048] The shape correction unit 17 stores a correction method for the product shape data as shape correction data. The shape correction unit 17 stores the shape identification information and the shape correction data in association with each other. Note that the shape correction data may be stored in an area other than the shape correction unit 17.
[0049] Furthermore, the shape correcting unit 17 stores the corrected product shape data in the product shape storage unit 12. That is, the shape correcting unit 17 overwrites the pre-correction product shape data stored in the product shape storage unit 12 with the corrected product shape data.
[0050] The product shape storage unit 12 stores the shape identification information and the corrected product shape data in association with each other. Note that the shape correction unit 17 may store both the product shape data before correction and the corrected product shape data in the product shape storage unit 12. The corrected product shape data includes information such as product shape layout data and product shape dimensions.
[0051] Information including the corrected product shape, the workpiece origin, and the program coordinate system is product shape information. The correction method used by the shape correction unit 17 is shape correction data. The combination of the product shape information and the shape correction data is a shape correction case Fc.
[0052] The machining program generation unit 18 reads out the product shape data and shape identification information arranged by the shape placement unit 14 and corrected by the shape correction unit 17 from the product shape storage unit 12. Furthermore, the machining program generation unit 18 reads out the material shape data arranged by the shape placement unit 14 from the material shape storage unit 13 based on the shape identification information. Furthermore, the machining program generation unit 18 reads out the program coordinate system from the program coordinate setting unit 15 based on the shape identification information.
[0053] The machining program generation unit 18 generates a machining program PM based on the product shape data arranged by the shape placement unit 14 and corrected by the shape correction unit 17, the material shape data arranged by the shape placement unit 14, and the program coordinate system.
[0054] The machine learning device 20 generates a learning model Mx for inferring a correction method from product shape information, using the shape correction example Fc generated by the machining program generation device 10 or the shape correction example Fc read from an external device. Furthermore, the machine learning device 20 infers a correction method by inputting the product shape information generated by the machining program generation device 10 into the learning model Mx.
[0055] The following describes a case where the machine learning device 20 generates a learning model Mx for inferring a correction method from product shape information using a shape correction example Fc generated by the machining program generation device 10.
[0056] The machine learning device 20 includes a shape correction method analysis unit 21, a machine learning unit 22, a learning model storage unit 23, and an inference unit 24. The shape correction method analysis unit 21 reads out, from the product shape storage unit 12, the product shape data and shape identification information that have been arranged by the shape arrangement unit 14 and corrected by the shape correction unit 17 and that are stored in the product shape storage unit 12.
[0057] The shape correction method analysis unit 21 extracts a first parameter and a second parameter from the product shape data read from the product shape storage unit 12, the program coordinate system stored in the program coordinate setting unit 15, and the shape correction data stored in the shape correction unit 17. That is, the shape correction method analysis unit 21 extracts a first parameter (a correction method for the product shape data) from the shape correction data, and extracts a second parameter (product shape, workpiece origin, and program coordinate system) from the corrected product shape, product shape placement data, workpiece origin position, and direction vectors of each axis of the program coordinate system.
[0058] The methods for correcting product shape data include the following: - Correction method for turned surfaces (cylinder, cone, ring) - Correction method for hole surfaces and stepped hole surfaces in stepped hole surfaces - Correction method for flat surfaces with XY planes - Correction method for the relationship between the Z-axis direction and flat surfaces that become walls during surface machining and cylindrical surfaces - Correction method for the R-chamfering amount between adjacent round fillets - Correction method for the C-chamfering amount between adjacent chamfer fillets
[0059] The first parameter and the second parameter are parameters used in the machining program generation device 10. The first parameter is a parameter to be adjusted in the machining program generation device 10. The second parameter is a parameter that is not to be adjusted in the machining program PM and is used to adjust the first parameter. The parameter adjustment process is a process of determining the value of the parameter.
[0060] The value of the first parameter is generated when the product shape of the product shape data stored in the product shape storage unit 12 is corrected. The first parameter is, for example, a parameter that indicates a method for correcting the product shape in the shape correction example Fc, and is data necessary for correcting the product shape.
[0061] The second parameters are fixed-length data that are not adjusted. The second parameters are, for example, data generated based on the product shape and dimensions of the product shape. The second parameters are, for example, product dimensions (height, width, length, etc.) extracted from the product shape, the position coordinates of the workpiece origin, and the direction vectors of each axis of the program coordinate system. The second parameters may also be image data of the three-dimensional shape of the product shape, voxel data of the three-dimensional shape of the product shape, inside / outside determination data of the product shape in a three-dimensional lattice space, etc.
[0062] The inside / outside determination data is data on a grid space obtained by dividing a three-dimensional space into a grid. Data is assigned to each grid point, and the inside / outside data is classified into two types: data that exists within the grid space (inside data) and data that exists outside the grid space (outside data). The inside data is data within the grid space and can represent, for example, the shape of an object or the distribution of physical quantities. On the other hand, the outside data is data outside the grid space and can represent, for example, inputs from outside the object or boundary conditions.
[0063] Each first parameter is associated with a second parameter. The shape correction method analysis unit 21 adjusts the first parameter based on the second parameter corresponding to the first parameter. The shape correction method analysis unit 21 determines a second parameter to be extracted for each first parameter and extracts the determined second parameter. The shape correction method analysis unit 21 inputs the extracted first parameter and second parameter to the machine learning unit 22.
[0064] The machine learning unit 22 generates a learning model Mx by learning using a data set including the extracted first parameter and second parameter. That is, the machine learning unit 22 generates a learning model Mx for inferring the first parameter from the second parameter set by the operator. In the embodiment, the machine learning unit 22 performs, for example, supervised learning to generate the learning model Mx. The machine learning unit 22 inputs the generated learning model Mx to the learning model storage unit 23.
[0065] The learning algorithm used by the machine learning unit 22 may be any algorithm. An example of the learning algorithm used by the machine learning unit 22 is a neural network. The neural network may be a deep learning with a multi-layer structure. The learning algorithm used by the machine learning unit 22 may also be genetic programming, inductive logic programming, SVM (Support Vector Machine), or the like. Machine learning is a process of optimizing parameters such as the weights or biases of a neural network.
[0066] The learning model storage unit 23 stores a learning model Mx, which is the learning result of the machine learning unit 22. The learning model Mx outputs optimal first parameters for input second parameters. In other words, the learning model Mx is a model for deriving, from the second parameters, the first parameters that are optimal for the second parameters.
[0067] Input data including a second parameter is input to the inference unit 24 as input data. The inference unit 24 infers a first parameter from the second parameter using the learning model Mx. The inference unit 24 inputs the second parameter to the learning model Mx and causes the learning model Mx to output a first parameter, which is an inference result. The inference unit 24 sends the inference result to the shape correction unit 17. That is, the inference unit 24 returns the first parameter, which is an inference result, to the shape correction unit 17 in response to the second parameter sent from the shape correction unit 17. The inference unit 24 outputs the first parameter, which is an inference result, to the shape correction unit 17.
[0068] The numerical control device 100 may determine the first parameter (correction method) from the second parameter using the machine learning device 20, or may determine the first parameter from the second parameter without using the machine learning device 20. When determining the first parameter without using the machine learning device 20, the numerical control device 100 determines the correction method, which is the first parameter, based on the shape of the region (surface) to be machined, etc.
[0069] Next, a description will be given of the operation of the numerical control device 100. The processing executed by the numerical control device 100 includes a machining program generation processing executed by the machining program generation device 10, a learning model generation processing executed by the machine learning device 20, and an inference processing executed by the machine learning device 20.
[0070] 2 is a flowchart showing a processing procedure of a machining program generation process executed by the machining program generation device according to the embodiment. The machining program generation device 10 corrects the product shape using an inference result obtained using a learning model Mx, which is the learning result of the machine learning device 20, and generates a machining program PM for the shape-corrected product shape.
[0071] The shape input unit 11 reads product shape data from an external device or a storage area (not shown) in the numerical control device 100 (step S1). The shape input unit 11 stores the product shape data in the product shape storage unit 12.
[0072] The shape input unit 11 reads material shape data from an external device or a storage area (not shown) in the numerical control device 100 (step S2). The shape input unit 11 stores the material shape data in the material shape storage unit 13. The machining program generation device 10 may generate a material shape based on the product shape data stored in the product shape storage unit 12, and store the generated material shape data in the material shape storage unit 13. The machining program generation device 10 may execute the process of step S1 and the process of step S2 in any order.
[0073] 3 is a diagram showing an example of a product shape corresponding to product shape data stored in a product shape storage unit of the machining program generation device according to the embodiment. The product shape data 101 stored in the product shape storage unit 12 includes a three-sided view and a perspective view Pv1 of the product shape SA1. The three-sided view of the product shape SA1 is a front view Fv1, a left side view Ls1, and a plan view Gp1 of the product shape. A program coordinate system AX1 is set for the three-sided view and the perspective view Pv1 of the product shape SA1.
[0074] 4 is a diagram showing an example of a material shape corresponding to material shape data stored in a material shape storage unit of the machining program generation device according to the embodiment. The material shape data 102 stored in the material shape storage unit 13 includes a three-view drawing and a perspective view Pv2 of the material shape SB2. The three-view drawing of the material shape SB2 is a front view Fv2, a left side view Ls2, and a plan view Gp2 of the material shape SB2. A program coordinate system AX2 is set for the three-view drawing and the perspective view Pv2 of the material shape SB2. FIG. 4 shows a case where the program coordinate system AX2 is equal to the program coordinate system AX1.
[0075] The shape placement unit 14 places each of the product shape and the material shape (step S3). That is, the shape placement unit 14 generates placement data for the product shape and the material shape. In other words, the shape placement unit 14 generates placement data indicating the placement positions of the product shape and the material shape. The placement data is data that indicates the position and orientation of the product shape and the material shape on the three-dimensional coordinate system. At the time the placement data is generated, the product shape and the material shape are not necessarily placed in positions that are easy to process.
[0076] Therefore, the shape placement unit 14 rearranges the product shape data and the material shape data based on the generated placement data. That is, the shape placement unit 14 rearranges the product shape and the material shape by rotating and moving them in accordance with the placement data. The shape placement unit 14 rearranges the product shape and the material shape, for example, so that the direction of the axis (first axis) of the machining shape (machining area) included in the product shape data matches the direction of the axis (second axis) set in the program coordinate system. Note that at least one of the product shape data and the material shape data may be placed at any position by the operator using the interactive operation processing unit 30, the instruction input unit 40, and the display unit 50.
[0077] The program coordinate setting unit 15 places the coordinate values of the workpiece origin and the program coordinate system at an arbitrary position from either the product shape or the blank shape placed by the shape placement unit 14 (step S4). The program coordinate setting unit 15 sets, for example, a position on the central axis of the product shape or the blank shape as the workpiece origin. The program coordinate setting unit 15 also places the program coordinate system so that, for example, the direction of the cutting axis coincides with the axial direction of the program coordinate system. The program coordinate setting unit 15 stores the coordinate values of the workpiece origin and the direction vectors of each axis of the program coordinate system.
[0078] The workpiece origin and the program coordinate system may be placed at any position and in any direction by the operator using the interactive operation processing unit 30, the instruction input unit 40, and the display unit 50. When the program coordinate system is the world coordinate system, the machining program generation device 10 may omit the processing of step S4. In other words, when the program coordinate system is the world coordinate system, the machining program generation device 10 does not need to set the coordinate values of the workpiece origin and the program coordinate system.
[0079] 5 is a diagram illustrating an example of a product shape and a material shape arranged by the shape arrangement unit 14 of the machining program generation device according to the embodiment. The shape arrangement unit 14 arranges the product shape and the material shape to combine the product shape and the material shape.
[0080] The product shape and workpiece shape placement data 103 generated by the shape placement unit 14 placing the product shape and workpiece shape includes a three-view drawing and a perspective view Pv3 of the placement shape SC3 in which the product shape SA1 and workpiece shape SB2 are placed. The three-view drawing of the placement shape SC3 is a front view Fv3, a left side view Ls3, and a plan view Gp3 of the placement shape SC3. A program coordinate system AX3 is set for the placement shape SC3. Figure 5 shows a case where the program coordinate system AX3 is equal to the program coordinate systems AX1 and AX2.
[0081] A product is formed by cutting a material. Therefore, Fig. 5 shows a case where a product shape SA1 is arranged inside a material shape SB2.
[0082] The shape correction unit 17 analyzes all the shape data of the product shape arranged by the shape arrangement unit 14 and corrects the product shape based on the workpiece origin and the program coordinate system (step S5). The machining program generation unit 18 develops a machining shape indicating the area (shape) to be machined. Specifically, the machining program generation unit 18 generates machining shape data from the product shape data stored in the product shape memory unit 12, the shape of which has been corrected by the shape correction unit 17, and the material shape data stored in the material shape memory unit 13.
[0083] The machining shape data corresponds to the difference between the product shape data and the material shape data. In other words, the machining shape data is data on the shape (area) to be machined on the material. The machining program generation unit 18 generates turning data, facing data, chamfering data, and hole machining data from the machining shape data.
[0084] The turning data indicates a turning area in which the material is rotated. The facing data indicates an area to be faced, the chamfering data indicates an area to be chamfered, and the drilling data indicates an area to be drilled. The facing, chamfering, and drilling are all processes in which the tool is rotated.
[0085] Next, the machining program generation unit 18 assigns machining units to the developed machining shape. That is, the machining program generation unit 18 determines the machining method, tool, and cutting conditions for the generated machining shape. The machining program generation unit 18 generates machining unit information by assigning information on the machining method, tool, and cutting conditions to the machining shape. Then, the machining program generation unit 18 generates a machining program PM based on the generated machining unit information, machining method, tool, cutting conditions, machining shape, and the result of the interference check (step S6). The interference check is a process of confirming whether the tool interferes with the non-machining area.
[0086] 6 is a schematic diagram showing an example of machining shape data generated by the machining program generation unit of the machining program generation device according to the embodiment. The machining shape data 201 in FIG. 6 shows material shape data, turning shape data, facing shape data, and hole machining shape data.
[0087] The diagram of machining shape data shown on the left side of Figure 6 shows a schematic perspective view of the material shape Sx1, a turning hole machining shape SH1 which is an example of a shape indicated by the turning machining shape data for the front side process, turning machining shapes SH2 and SH3, and a hole machining shape SH4 which is an example of a shape indicated by the hole machining shape data.
[0088] The diagram of machining shape data shown on the right side of Figure 6 shows, in a schematic perspective view, the material shape Sx1, turning shapes SH5 to SH7 which are example shapes indicated by the turning shape data for the back side process, surface machining shapes SH8 to SH15, and hole machining shape SH16 which is an example shape indicated by the hole machining shape data.
[0089] The hole machining shape SH4 is a hole machining shape made up of four hole machining shapes, each of which is subjected to the same hole machining. The hole machining shape SH16 is a hole machining shape made up of two hole machining shapes, each of which is subjected to the same hole machining.
[0090] 7 is a diagram showing an example of a machining program generated by a machining program generation unit of a machining program generation device according to an embodiment. Fig. 7 shows a list of machining steps in the machining program PM. Here, the front side machining step HD1 of the machining program PM includes Uno. 1 to Uno. 4. The back side machining step HD2 of the machining program PM includes Uno. 5 to Uno. 16.
[0091] "Uno1. Turning Drill...SH1" indicates that the machine tool processes the turning hole machining shape SH1 as a turning drill unit. "Uno2. End Face...SH2" indicates that the machine tool processes the turning hole machining shape SH2 as a turning end face unit. "Uno3. Bar...SH3" indicates that the machine tool processes the turning hole machining shape SH3 as a turning bar unit. "Uno4. C-Axis Drill...SH4" indicates that the machine tool processes four hole machining shapes SH4 as C-Axis drill units. Note that in Uno1. to Uno4., the machine tool holds the material on the first spindle side and processes it from the front side. The first spindle is one of the spindles facing in opposite axial directions. The first spindle and second spindle are the central axes of the material shape Sx1 shown in Figure 6.
[0092] "Uno5. End face...SH5" indicates that the machine tool processes the turning shape SH5 as a turning end face unit. "Uno6. Bar...SH6" and "Uno7. Bar...SH7" indicate that the machine tool processes the turning shapes SH6 and SH7 as a turning bar unit. "Uno8. Face mill...SH8", "Uno9. Face mill...SH9", "Uno10. Face mill...SH10", and "Uno11. Face mill...SH11" indicate that the machine tool processes the face milling shapes SH8, SH9, SH10, and SH11 as face milling units. "Uno12. Pocket mill...SH12," "Uno13. Pocket mill...SH13," "Uno14. Pocket mill...SH14," and "Uno15. Pocket mill...SH15" indicate that the machine tool processes the surface machining shapes SH12, SH13, SH14, and SH15 as a pocket mill unit. "Uno16. C-axis drill...SH16" indicates that the machine tool processes two hole machining shapes SH16 as a C-axis drill unit.
[0093] In the Uno5 to Uno16 models, the material machined by the first spindle of the machine tool is re-held by the second spindle and machined from the back side. The first and second spindles are both turning spindles, called the main spindle and the sub-spindle, respectively, and are located opposite each other. In the case of machine tools that do not have a second spindle, after the machine tool has machined the front side, the material being machined is removed from the first spindle, the machined material is turned over, and the first spindle re-grabs the material, and the machine tool then machines the back side.
[0094] The turning drill unit is a machining unit that uses a turning drill to drill holes in the center of a material. The turning end face unit is a machining unit that cuts off protruding parts from the end face (front or back) of a material. The turning bar unit is a machining unit that uses a turning tool to turn the outer periphery, inner periphery, front or back of a round bar material. The face mill unit is a machining unit that uses a face mill tool to flatten the surface of a workpiece (object to be machined). In a face mill unit, machining is performed so that the part extends beyond the machining shape range. The pocket mill unit is a machining unit that uses an end mill tool to machine a pocket shape. In a pocket mill unit, machining is performed so that the part does not extend beyond the machining shape range. The C-axis drill is a machining unit that uses a drill tool to machine holes, and C-axis machining is performed by clamping the C-axis during positioning. The C-axis is an axis that rotates around the Z-axis.
[0095] Fig. 8 is a flowchart showing the processing procedure of a first example of shape correction processing executed by the shape correction unit 17 of the machining program generation device according to the embodiment. The processing in Fig. 8 corresponds to the processing of step S5 in Fig. 2. The first example of shape correction processing executed by the shape correction unit 17 is processing for correcting a cylindrical surface, a conical surface, and a torus surface.
[0096] The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the direction (first direction) and position coordinates of the central axis of the cylindrical, conical, or toric surface coincide with the direction (second direction) and position coordinates of the turning axis. The first direction and second direction here are the directions of the turning axis. In other words, the first direction and second direction are the directions of the vector (0,0,1) or the vector (0,0,-1).
[0097] The difference detection unit 16 acquires all surfaces of the product shape arranged by the shape arrangement unit 14 and stored in the product shape storage unit 12 (step S11). The difference detection unit 16 references the geometric information of the acquired surfaces and extracts cylindrical surfaces, conical surfaces, and toric surfaces from the acquired surfaces (step S12). A cylindrical surface is an inner wall surface of a cylindrical hole shape, and a conical surface is an inner wall surface of a conical hole shape. A toric surface is an inner wall surface of a circular ring-shaped hole shape.
[0098] The difference detection unit 16 and the shape correction unit 17 calculate the difference between the central axes of the extracted surfaces and the turning axis set in the program coordinate system (step S13). That is, the difference detection unit 16 compares the position coordinates and direction vectors of the central axes of the extracted cylindrical, conical, and toric surfaces with the position coordinates and direction vectors of the turning axes stored by the program coordinate setting unit 15, and calculates the difference amounts of the position coordinates and direction vectors. The position coordinates of the central axes are the coordinates of a specific point on the central axes, and the position coordinates of the turning axes are the coordinates of a specific point on the turning axes.
[0099] The shape correction unit 17 determines whether or not correction of the product shape is necessary based on the position coordinate difference amount and the directional vector difference amount (step S14). The shape correction unit 17 determines that correction is necessary when the position coordinate difference amount and the directional vector difference amount are within a specific range and a specific range, respectively. That is, the shape correction unit 17 determines that correction is necessary when the position coordinate difference amount and the directional vector difference amount are equal to or greater than the geometric tolerance (geometric accuracy) and less than the set error amount set by the operator. The set error amount may be a fixed value or may be arbitrarily set by the operator. When the set error amount is set by the operator, a difference equal to or greater than the set error amount is a difference intentionally set by the operator, and a product shape having such a difference is not subject to correction. That is, a difference set in design is a difference necessary to realize the product shape as designed, and a determination is made that this difference is not subject to correction.
[0100] The shape correction unit 17 determines that correction is necessary when one of the difference amount of the position coordinates and the difference amount of the direction vector is less than the geometric allowable error amount, and the other is equal to or greater than the geometric allowable error amount and less than the set error amount.
[0101] Furthermore, the shape corrector 17 determines that correction is unnecessary when either the difference amount of the position coordinates or the difference amount of the direction vector is equal to or greater than the set error amount, and also determines that correction is unnecessary when both the difference amount of the position coordinates and the difference amount of the direction vector are less than the geometric allowable error amount.
[0102] That is, the shape correction unit 17 determines that correction is necessary when at least one of the difference in position coordinates and the difference in direction vector is equal to or greater than the geometric tolerance, and both the difference in position coordinates and the direction vector are less than the set tolerance.
[0103] The geometric tolerance is the amount of error that is geometrically allowed, and errors greater than the geometric tolerance are not geometrically allowed. The geometric tolerance corresponds to the linear accuracy and angular accuracy of the system. If the difference in position coordinates is less than the linear accuracy, the distance (error amount) that is the difference in position coordinates is treated as zero, and if the difference in distance is smaller than the linear accuracy, it is treated as the same position.
[0104] If the difference in the direction vectors is less than the angular precision, the angle, which is the difference in the direction vectors, is treated as zero, and if the angle difference is smaller than the angular precision, the vectors are treated as the same direction vectors with the same angle.
[0105] The set error amount set by the operator refers to linear accuracy and angular accuracy that are set separately from the geometric allowable error amount. The operator sets the set error amount to a value equal to or greater than the geometric allowable error amount, taking into account inaccurate shape data. The set error amount is the error amount assumed by the operator. Errors greater than the set error amount assumed by the operator are permitted, but errors less than the set error amount are not permitted. In other words, errors greater than the error intended by the operator are permitted, but errors not intended by the operator are not permitted. Errors not assumed by the operator are inconvenient for those creating the machining program, and the shape correction unit 17 corrects the product shape to reduce these errors to errors less than the set error amount. In other words, if the error (difference) is not within a specific range equal to or greater than the geometric allowable error amount, which is the geometrically allowable error amount, the shape correction unit 17 corrects the product shape so that the error falls within the specific range. In this way, the shape correction unit 17 only corrects errors within the specific range assumed by the operator.
[0106] If the shape correction unit 17 determines that correction is necessary (step S14, necessary), it corrects the surface determined to require correction (step S15). If correction is necessary for the position coordinate of the central axis of a cylindrical surface, a conical surface, or a toric surface, the shape correction unit 17 corrects the position coordinate of the central axis so that it matches the position coordinate of the turning axis. If correction is necessary for the direction vector of the central axis of a cylindrical surface, a conical surface, or a toric surface, the shape correction unit 17 corrects the direction vector of the central axis so that it matches the direction vector of the turning axis. The shape correction unit 17 recalculates and corrects the intersection lines and points between the surface corrected in step S15 and adjacent surfaces (step S16). If the shape correction unit 17 determines that correction is unnecessary (step S14, unnecessary), it does not perform correction.
[0107] 9 is a diagram for explaining a first example of shape correction processing executed by the shape correcting unit of the machining program generating device according to the embodiment. Here, a conical surface formed on a product shape 81 will be explained.
[0108] The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the central axis of the surface SF4 included in the product shape 81 coincides with the vector (0,0,1) or vector (0,0,-1), which is the direction of the turning axis set in the program coordinate system. In this case, for example, it is assumed that the geometric information of the surface SF4, which is a conical surface formed in the product shape 81, has the following information. This geometric information is information that has been rewritten due to some factor, for example, during format conversion, resulting in a deviation.
[0109] Surface SF4: Conical surface Position coordinates of the central axis (0.00001, 0, 0) Direction vector of the central axis (0.0001, 0.0001, 0.99999999) Radius = 0.025 Half apex angle = 2.86 degrees
[0110] The difference detection unit 16 calculates the difference in position coordinates and direction vectors between the center axis of the surface SF4 and the turning axis.
[0111] If the turning axis to be compared has position coordinates (0,0,0) and direction vector (0,0,1), the difference between the position coordinates of the turning axis and the position coordinates of the central axis of surface SF4 is 0.00001, and the difference between the direction vector of the turning axis and the direction vector of the central axis of surface SF4 is 0.000141.
[0112] The direction vector of the turning axis and the direction vector of the central axis of surface SF4 are both unit vectors. Therefore, in the embodiment, the difference between the two direction vectors is the magnitude of the difference in direction vectors, but the difference in direction vectors may also be the angle between the direction vector of the turning axis and the direction vector of the central axis of surface SF4.
[0113] If the geometric tolerance of the position coordinates is 1.0e-8, the geometric tolerance of the direction vector is 1.0e-10, the set error of the position coordinates set by the operator is 1.0e-3, and the set error of the direction vector is 1.0e-6, the shape correction unit 17 performs shape correction of surface SF4.
[0114] The shape correction unit 17 corrects the geometric information of the surface SF4 of the conical surface as follows: Position coordinates of the central axis (0,0,0) Direction vector of the central axis (0,0,1)
[0115] That is, the shape correcting unit 17 corrects the geometric information of the surface SF4 so that the position coordinates and direction vector of the central axis of the surface SF4 coincide with the position coordinates (0,0,0) and direction vector (0,0,1) of the turning axis. In addition, the shape correcting unit 17 recalculates the intersection lines and points between the surface SF4 and the surfaces adjacent to the surface SF4 in accordance with the corrected surface SF4.
[0116] Fig. 10 is a flowchart showing the processing procedure of a second example of shape correction processing executed by the shape correction unit of the machining program generation device according to the embodiment. The processing in Fig. 10 corresponds to the processing of step S5 in Fig. 2. The second example of shape correction processing executed by the shape correction unit 17 is processing for correcting adjacent cylindrical surfaces, conical surfaces, and toric surfaces in a stepped hole.
[0117] The shape placement unit 14 places the product shape so that the directions of the central axes of stepped holes, which are holes with a step included in the product shape, coincide. The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the direction (first direction) and position coordinates of the central axes of stepped holes, which are holes with a step included in the product shape, coincide with the direction (second direction) and position coordinates of the turning axis. That is, the program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the directions of the central axes of the cylindrical, conical, and toric surfaces of the stepped hole coincide with the direction of the turning axis. The first direction and second direction here are the directions of the turning axis. That is, the first direction and second direction are the directions of the vector (0, 0, 1) or the vector (0, 0, -1).
[0118] The difference detection unit 16 acquires all faces of the product shape arranged by the shape arrangement unit 14 and stored in the product shape storage unit 12 (step S21). The difference detection unit 16 refers to the geometric information of the acquired faces and extracts cylindrical faces, conical faces, and toric faces that are hole-shaped (empty inside) from the acquired faces (step S22).
[0119] The difference detection unit 16 selects adjacent surfaces from the acquired surfaces by referring to the geometric information of the surfaces. That is, the shape correction unit 17 selects a combination of adjacent surfaces (hole surfaces) from the extracted cylindrical surfaces, conical surfaces, and toric surfaces (step S23).
[0120] The difference detection unit 16 calculates the difference (axis difference) between the central axes of adjacent surfaces (hole surfaces) (step S24). That is, the difference detection unit 16 acquires the position coordinates and direction vectors of the central axes of the selected adjacent cylindrical, conical, and toric surfaces, and calculates the difference amounts of the position coordinates and direction vectors between the acquired adjacent surfaces. In this way, the difference detection unit 16 calculates the difference amount indicating the amount of deviation between the central axes of the adjacent surfaces.
[0121] The shape correction unit 17 determines whether or not correction of the product shape is necessary based on the difference amount of the position coordinates and the difference amount of the direction vector (step S25). The shape correction unit 17 determines whether or not correction is necessary by a determination method similar to the determination method in the shape correction process of the first example (the determination method in step S14).
[0122] If the shape correction unit 17 determines that correction is necessary (step S25, necessary), it corrects the surface determined to require correction (step S26). If correction is necessary for the position coordinates of the central axis of a cylindrical surface, a conical surface, or a torus surface, the shape correction unit 17 corrects the position coordinates of the central axis of one of the adjacent surfaces so that the position coordinates of the central axis of one surface coincide with the position coordinates of the central axis of the other surface.
[0123] Furthermore, when the direction vector of the central axis of a cylindrical surface, a conical surface, or a torus surface needs to be corrected, the shape corrector 17 corrects the direction vector of the central axis of one of the adjacent surfaces so that the direction vector of the central axis of one surface coincides with the direction vector of the central axis of the other surface. In other words, the shape corrector 17 corrects the position coordinates and direction vector of the central axis of one of the adjacent surfaces so that the position coordinates and direction vectors of the central axes of both the adjacent surfaces coincide.
[0124] The shape correction unit 17 may correct the position coordinates and direction vectors of the central axes of both adjacent faces so that the position coordinates and direction vectors of the central axes of both adjacent faces coincide. The shape correction unit 17 recalculates and corrects the intersection lines and points between the face corrected in step S26 and the adjacent face (step S27). If the shape correction unit 17 determines that correction is unnecessary (step S25, unnecessary), it does not perform the correction.
[0125] 11 is a diagram for explaining a second example of shape correction processing executed by the shape correction unit of the machining program generation device according to the embodiment. Here, a stepped hole formed in a product shape 82 will be explained. For example, the stepped hole formed in the product shape 82 includes a conical surface SF5, a cylindrical surface SF6, and a cylindrical surface SF7.
[0126] The shape placement unit 14 places the product shape 82 so that the central axes of the surfaces SF5 to SF7 included in the product shape 82 coincide. The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the central axes of the surfaces SF5 to SF7 coincide with the direction of the turning axis. In this case, it is assumed that the geometric information of the conical surface SF5, the cylindrical surface SF6, and the cylindrical surface SF7 has the following information. This geometric information is the result of misalignment caused by rewriting due to some factor, for example, during format conversion.
[0127] Surface SF5: Conical surface Position coordinates of the central axis (0,0,0.029) Direction vector of the central axis (0,0,1) Radius = 0.0075 Half apex angle = 45 degrees
[0128] Surface SF6: Cylindrical surface Position coordinates of the central axis (0,0,0.03) Direction vector of the central axis (0,0,1) Radius = 0.0075
[0129] Surface SF7: Cylindrical surface - Position coordinates of the central axis (0.00001, 0.0001, 0.03) - Direction vector of the central axis (0.0001, 0.0001, 0.99999999) - Radius = 0.005
[0130] The difference detection unit 16 calculates the differences in the position coordinates and direction vectors of the faces SF5 to SF7. That is, the difference detection unit 16 calculates the difference between the central axis of the face SF5 and the central axis of the face SF6 adjacent to the face SF5, and calculates the difference between the central axis of the face SF7 adjacent to the face SF6 and the central axis of the face SF6.
[0131] The difference in position coordinates between the conical surface SF5 and the cylindrical surface SF6 is 0.001, and the difference in the direction vectors of the central axes is 0. Furthermore, the difference in position coordinates between the cylindrical surface SF6 and the cylindrical surface SF7 is 0, and the difference in the direction vectors of the central axes is 0.000141.
[0132] If the geometric tolerance of the position coordinate is 1.0e-8, the geometric tolerance of the direction vector is 1.0e-10, the set error of the position coordinate set by the operator is 1.0e-3, and the set error of the direction vector is 1.0e-6, the shape correction unit 17 performs shape correction of surface SF7.
[0133] The shape correction unit 17 corrects the geometric information of the cylindrical surface SF7 as follows: Position coordinates of the central axis (0, 0, 0.03) Direction vector of the central axis (0, 0, 1)
[0134] That is, the shape corrector 17 corrects the geometric information of the surface SF7 so that the position coordinates and direction vector of the central axis of the surface SF7 coincide with the position coordinates (0,0,0.03) and direction vector (0,0,1) of the central axis of the surface SF6. The shape corrector 17 also recalculates the intersection lines and points between the surface SF7 and the surfaces adjacent to the surface SF7 in accordance with the corrected surface SF7. The shape corrector 17 does not correct the geometric information of the cylindrical surfaces SF5 and SF6.
[0135] In addition, the shape correction unit 17 may correct the geometric information of surface SF7 so that the position coordinates and direction vector of the central axis of surface SF7 match the position coordinates (0,0,0.029) and direction vector (0,0,1) of the central axis of surface SF5.
[0136] In addition, if both the difference in position coordinates and the difference in direction vectors on surfaces SF5 and SF6 are equal to or greater than the geometric tolerance, and at least one of the difference in position coordinates and the direction vectors is less than the set tolerance, the shape correction unit 17 determines that correction of either surface SF5 or SF6 is necessary.
[0137] When correcting two of the surfaces SF5 to SF7, the shape corrector 17 corrects the geometric information of the surfaces SF5 and SF7 so that the position coordinates and direction vectors of the central axes of the surfaces SF5 and SF7 coincide with the position coordinates and direction vector of the central axis of the surface SF6 adjacent to the surfaces SF5 and SF7. This allows the shape corrector 17 to reduce the amount of correction.
[0138] Fig. 12 is a flowchart showing the processing procedure of a third example of shape correction processing executed by the shape correction unit of the machining program generation device according to the embodiment. The processing in Fig. 12 corresponds to the processing of step S5 in Fig. 2. The third example of shape correction processing executed by the shape correction unit 17 is processing for correcting a plane perpendicular to the turning direction. In the third example of shape correction processing, for example, a plane included in the product shape whose normal vector is near the vector (0,0,1) or near the vector (0,0,-1) is corrected.
[0139] The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the direction (first direction) of the normal vector of a plane included in the product shape and its position coordinates coincide with the specific direction (second direction) and its position coordinates. The first direction and second direction here are the directions of the turning axis. In other words, the first direction and second direction are the directions of the vector (0,0,1) or the vector (0,0,-1).
[0140] The difference detection unit 16 acquires all faces of the product shape arranged by the shape arrangement unit 14 and stored in the product shape storage unit 12 (step S31). The difference detection unit 16 refers to the geometric information of the acquired faces and extracts planes from among the acquired faces (step S32).
[0141] The difference detection unit 16 refers to the geometric information of the acquired planes and selects, from the extracted planes, planes whose normal vectors are close to the vector (0,0,1) or close to the vector (0,0,-1) (step S33). Specifically, the difference detection unit 16 selects planes whose difference between the normal vector of the acquired plane and the vector (0,0,1) or the vector (0,0,-1) is within a specific range.
[0142] The difference detection unit 16 calculates the difference between the normal vector of the selected plane and the vector (0,0,1) or the vector (0,0,-1) (step S34). The difference detection unit 16 calculates the difference in the magnitude of the vector as the difference between the normal vector of the selected plane and the vector (0,0,1) or the vector (0,0,-1). In this way, the difference detection unit 16 determines the difference indicating how much the normal vector of the selected plane deviates from the vector (0,0,1) or the vector (0,0,-1).
[0143] The shape correction unit 17 determines whether or not correction of the product shape is necessary based on the difference between the normal vector of the selected plane and the vector (0,0,1) or the vector (0,0,-1) (step S35). The shape correction unit 17 determines whether or not correction is necessary using a determination method similar to the determination method in the shape correction process of the first example (the determination method in step S14).
[0144] If the shape correction unit 17 determines that correction is necessary (step S35, necessary), it corrects the plane determined to require correction (step S36). If correction is necessary for the plane, the shape correction unit 17 corrects the plane so that the normal vector of the plane coincides with the vector (0, 0, 1) or the vector (0, 0, -1). The shape correction unit 17 recalculates and corrects the intersection lines and points between the plane corrected in step S36 and the adjacent plane (step S37). If the shape correction unit 17 determines that correction is not necessary (step S35, unnecessary), it does not perform the correction.
[0145] FIG. 13 is a diagram illustrating a third example of shape correction processing executed by the shape correction unit of the machining program generation device according to the embodiment. Here, the planar surface of a pocket formed in a product shape 83 will be described. For example, the pocket formed in the product shape 83 includes planar surfaces SF8, SF9, SF11, SF13, and SF15, and surfaces SF10, SF12, SF14, and SF16, which are portions of a cylindrical surface (hereinafter referred to as cylindrical partial surfaces). Surface SF8 is the planar surface of the pocket bottom, surfaces SF9, SF11, SF13, and SF15 are planar surfaces of the pocket side surfaces, and surfaces SF10, SF12, SF14, and SF16 are cylindrical partial surfaces at the corners of the pocket side surfaces. FIG. 13 illustrates the case where surface SF8 is corrected.
[0146] The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the direction of the normal vector of the surface SF8 included in the product shape 83 coincides with the vector (0,0,1) or vector (0,0,-1), which is the direction of the turning axis. In this case, it is assumed that the geometric information of the surface SF8 has the following information. This geometric information is the result of misalignment caused by rewriting due to some factor during format conversion, for example.
[0147] Surface SF8: Plane Position coordinates (0,0,0.02) Normal vector (0.0001,0.0001,0.99999999)
[0148] The difference detection unit 16 calculates the difference between the central axis of the surface SF8 and the Z-axis direction vector set in the program coordinate system. The Z-axis direction vector is the vector (0, 0, 1) or the vector (0, 0, -1) described with reference to FIG.
[0149] When the geometric information of surface SF8 is the above information, the difference between the Z-axis direction vector (0,0,1), which is the vector to be compared, and the normal vector of surface SF8 is 0.000141. When the geometric tolerance of the direction vector is 1.0e-10 and the setting error of the direction vector set by the operator is 1.0e-6, the shape correction unit 17 performs shape correction of surface SF8.
[0150] The shape correction unit 17 corrects the geometric information of the plane surface SF8 as follows: Normal vector (0,0,1)
[0151] That is, the shape correcting unit 17 corrects the geometric information of the surface SF8 so that the normal vector of the surface SF8 coincides with the normal vector (0, 0, 1) of the XY plane. The shape correcting unit 17 also recalculates the intersection lines and points between the surface SF8 and the surfaces adjacent to the surface SF8 in accordance with the corrected surface SF8.
[0152] Fig. 14 is a flowchart showing the processing procedure of a fourth example of shape correction processing executed by the shape correction unit of the machining program generation device according to the embodiment. The processing in Fig. 14 corresponds to the processing of step S5 in Fig. 2. The fourth example of shape correction processing executed by the shape correction unit 17 is processing to correct a plane where the angle formed by the normal vector of a face included in the product shape and the normal vector (0,0,1) of the XY plane is close to 90 degrees.
[0153] The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the direction (first direction) and position coordinate of the normal vector of the surface included in the product shape coincide with a specific direction (second direction) perpendicular to the direction of the turning axis set in the program coordinate system and its position coordinate. The first and second directions here are the Y-axis direction. That is, the first and second directions are the direction of the vector (0, 1, 0) or the direction of the vector (0, -1, 0). The direction of the turning axis is the Z-axis direction.
[0154] The difference detection unit 16 acquires (step S41) all faces of the product shape arranged by the shape arrangement unit 14 and stored in the product shape storage unit 12. The difference detection unit 16 refers to the geometric information of the acquired faces and extracts planes from among the acquired faces (step S42).
[0155] The difference detection unit 16 refers to the geometric information of the acquired planes and selects, from the extracted planes, planes perpendicular to the vicinity of the vector (0,0,1), whose normal vector is a Z-axis vector (step S43). Specifically, the difference detection unit 16 selects planes whose difference between the normal vector of the acquired plane and a vector perpendicular to the vector (0,0,1) is within a specific range. A plane perpendicular to the vicinity of the vector (0,0,1) is an XY plane, and a vector perpendicular to the vector (0,0,1) is a Y-axis vector or an X-axis vector. Here, the difference detection unit 16 selects planes SF9, SF11, SF13, and SF15 of the planes shown in FIG. 13.
[0156] The difference detection unit 16 calculates the difference between the angle formed by the normal vector of the selected plane and the vector (0,0,1) and 90 degrees (step S44). In this way, the difference detection unit 16 obtains the amount of difference indicating how much the angle formed by the normal vector of the selected plane and the normal vector (0,0,1) of the XY plane deviates from a right angle.
[0157] The shape correction unit 17 determines whether or not correction of the product shape is necessary based on the difference between the angle between the normal vector of the selected plane and the vector (0,0,1) and 90 degrees (step S45). The shape correction unit 17 determines whether or not correction is necessary using a determination method similar to the determination method in the shape correction process of the first example (the determination method in step S14).
[0158] If the shape correction unit 17 determines that correction is necessary (step S45, necessary), it corrects the plane determined to require correction (step S46). If correction is necessary for the plane, the shape correction unit 17 corrects the normal vector of the plane so that the angle between the normal vector of the plane and the vector (0,0,1) becomes 90 degrees. The shape correction unit 17 recalculates and corrects the intersection lines and points between the plane corrected in step S46 and the adjacent plane (step S47). If the shape correction unit 17 determines that correction is not necessary (step S45, unnecessary), it does not perform the correction.
[0159] 13, a fourth example of shape correction processing executed by the shape correcting unit 17 will be described. Here, a case where the shape correcting unit 17 corrects a surface SF9 that is a surface perpendicular to the direction of the turning axis will be described.
[0160] The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the direction of the normal vector of the surface SF9 included in the product shape 83 coincides with the direction (here, the Y-axis direction) perpendicular to the axial direction of a specific axis (here, the Z-axis direction) set in the program coordinate system. That is, the program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the normal vector of the surface SF9 coincides with the vector (0, 1, 0) or the vector (0, -1, 0), which is the direction perpendicular to the turning axis set in the program coordinate system. The direction of the turning axis is the Z-axis direction. In this case, it is assumed that the geometric information of the surface SF9 has the following information. This geometric information is the result of misalignment caused by some factor, for example, during format conversion.
[0161] Surface SF9: Plane Position coordinates (0.04, -0.04, 0.02) Normal vector (0.0001, 0.99999999, 0.0001)
[0162] The difference detection unit 16 calculates the difference between the normal vector of the surface SF9 and the Y-axis direction vector perpendicular to the Z-axis set in the program coordinate system.
[0163] When the geometric information of surface SF9 is the above-described information, the difference between the normal vector of surface SF9 and the Y-axis direction vector perpendicular to the Z-axis, which is the vector to be compared, is 0.000141. When the geometric tolerance of the direction vector is 1.0e-10 and the error amount of the direction vector set by the operator is 1.0e-6, the shape correction unit 17 performs shape correction of surface SF9.
[0164] The shape correction unit 17 corrects the geometric information of the plane surface SF9 as follows: Normal vector (0, 1, 0)
[0165] That is, the shape correcting unit 17 corrects the geometric information of the surface SF9 so that the angle between the normal vector of the surface SF9 and the normal vector (0,0,1) of the XY plane becomes 90 degrees. The shape correcting unit 17 also recalculates the intersection lines and points between the surface SF9 and the surfaces adjacent to the surface SF9 in accordance with the corrected surface SF9.
[0166] When correcting the plane surface SF13, the shape corrector 17 corrects the geometric information of the surface SF13 as follows so that the angle between the normal vector of the surface SF13 and the Z-axis direction vector (0, 0, 1), which is the normal vector of the XY plane, becomes 90 degrees. Normal vector (0, -1, 0)
[0167] Furthermore, when correcting the plane surface SF11, the shape corrector 17 corrects the geometric information as follows so that the angle between the normal vector of the surface SF11 and the Z-axis direction vector (0,0,1), which is the normal vector of the XY plane, becomes 90 degrees. Normal vector (1,0,0)
[0168] Furthermore, when correcting the plane surface SF15, the shape corrector 17 corrects the geometric information as follows so that the angle between the normal vector of the surface SF15 and the Z-axis direction vector (0,0,1), which is the normal vector of the XY plane, becomes 90 degrees. Normal vector (-1,0,0)
[0169] The shape correction unit 17 may correct not only planes whose normal vectors coincide with a specific axial direction, such as surfaces SF9, SF11, SF13, and SF15, but also planes tilted with respect to a specific axial direction. In this case, the shape correction unit 17 corrects the tilted plane so that there is no difference between the normal vector (an ideal normal vector corresponding to a design value) set for the tilted plane included in the product shape and the geometric information of the actual plane. For example, if the normal vector set for the tilted plane included in the product shape is (A, B, C) and the normal vector of the actual plane is (A + a, B + b, C + c), the shape correction unit 17 corrects the normal vector of the plane to (A, B, C).
[0170] Fig. 15 is a flowchart showing the processing procedure of a fifth example of shape correction processing executed by the shape correction unit of the machining program generation device according to the embodiment. The processing of Fig. 15 corresponds to the processing of step S5 in Fig. 2. The fifth example of shape correction processing executed by the shape correction unit 17 is processing for correcting a cylindrical partial surface in the same axial direction as the turning direction.
[0171] The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the direction (first direction) and position coordinates of the central axis of the cylindrical partial surface coincide with the direction (second direction) and position coordinates of the turning axis. The first direction and the second direction here are the directions of the turning axis. That is, the first direction and the second direction are the directions of the vector (0,0,1) or the vector (0,0,-1). That is, in the shape correction process of the fifth example, for example, a cylindrical partial surface whose central axis vector is near the vector (0,0,1) or the vector (0,0,-1) is corrected.
[0172] The difference detection unit 16 acquires all faces of the product shape arranged by the shape arrangement unit 14 and stored in the product shape storage unit 12 (step S51). The difference detection unit 16 refers to the geometric information of the acquired faces and extracts cylindrical partial faces from the acquired faces (step S52).
[0173] The difference detection unit 16 refers to the geometric information of the acquired surfaces and selects, from the extracted cylindrical partial surfaces, cylindrical partial surfaces whose central axis vectors are near the vector (0,0,1) or near the vector (0,0,-1) (step S53). Specifically, the difference detection unit 16 selects cylindrical partial surfaces whose differences between the central axis vectors of the acquired cylindrical partial surfaces and the vector (0,0,1) or vector (0,0,-1) are within a specific range. Here, the difference detection unit 16 selects the plane surfaces SF10, SF12, SF14, and SF16 shown in FIG. 13.
[0174] The difference detection unit 16 calculates the difference in the angle between the central axis vector of the selected cylindrical partial surface and the vector (0,0,1) or the vector (0,0,-1) (step S54). In this way, the difference detection unit 16 determines the amount of difference that indicates how much the central axis vector of the selected cylindrical partial surface deviates from the vector (0,0,1) or the vector (0,0,-1), which is the normal vector of the XY plane.
[0175] The shape correction unit 17 determines whether or not correction of the product shape is necessary based on the difference between the central axis vector of the selected cylindrical partial surface and the vector (0,0,1) or the vector (0,0,-1) (step S55). The shape correction unit 17 determines whether or not correction is necessary using a determination method similar to the determination method in the shape correction process of the first example (the determination method in step S14).
[0176] If the shape correction unit 17 determines that correction is necessary (step S55, necessary), it corrects the cylindrical partial surface determined to require correction (step S56). If correction is necessary for the cylindrical partial surface, the shape correction unit 17 corrects the central axis vector of the cylindrical partial surface so that the central axis vector of the cylindrical partial surface coincides with the vector (0,0,1) or the vector (0,0,-1). The shape correction unit 17 recalculates and corrects the intersection lines and points between the surface corrected in step S56 and the adjacent surfaces (step S57). If the shape correction unit 17 determines that correction is not necessary (step S55, unnecessary), it does not perform the correction.
[0177] 13, a fifth example of shape correction processing executed by the shape correction unit 17 will be described. Here, a case where the shape correction unit 17 corrects a surface SF10 having a central axis parallel to the direction of the turning axis will be described.
[0178] The program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the direction of the center axis vector of the surface SF10 included in the product shape 83 coincides with the axial direction of a specific axis (here, the Z-axis direction) set in the program coordinate system. That is, the program coordinate setting unit 15 sets the workpiece origin, the program coordinate system, and the direction of the turning axis so that the center axis vector of the surface SF10 coincides with the vector (0,0,1) or vector (0,0,-1), which is the direction of the turning axis set in the program coordinate system. In this case, it is assumed that the geometric information of the surface SF10 has the following information. This geometric information is information that results from a deviation caused by rewriting due to some factor, for example, during format conversion.
[0179] Surface SF10: Cylindrical partial surface Position coordinates of the central axis (-0.03, -0.03, 0.02) Direction vector of the central axis (0.0001, 0.0001, 0.999999)
[0180] The difference detection unit 16 calculates the difference between the direction vector of the central axis of the surface SF10 and the Z-axis direction vector set in the program coordinate system.
[0181] When the geometric information of surface SF10 is the above-described information, the difference between the direction vector of the central axis of surface SF10 and the axial direction vector of the specific axis to be compared (here, the Z-axis vector (0,0,1)) is 0.000141. When the geometric tolerance of the direction vector is 1.0e-10 and the set error of the direction vector set by the operator is 1.0e-6, the shape correction unit 17 performs shape correction of surface SF10.
[0182] The shape correction unit 17 corrects the geometric information of the surface SF10 of the cylindrical portion surface as follows: Direction vector (0, 0, 1) of the central axis
[0183] That is, the shape corrector 17 corrects the geometric information of the surface SF10 so that the central axis vector of the surface SF10 coincides with the Z-axis direction vector (0, 0, 1), which is the normal vector of the XY plane. The shape corrector 17 also recalculates the intersection lines and points between the surface SF10 and the surfaces adjacent to the surface SF10 in accordance with the corrected surface SF10.
[0184] Fig. 16 is a flowchart showing the processing procedure of a sixth example of shape correction processing executed by the shape correction unit 17 of the machining program generation device according to the embodiment. The processing of Fig. 16 corresponds to the processing of step S5 in Fig. 2. The sixth example of shape correction processing executed by the shape correction unit 17 is processing to correct an R-chamfered surface.
[0185] The shape placement unit 14 places the product shape so that a series of R-chamfered surfaces included in the product shape have the same radius value (R value) as a specific value (reference radius value). The difference detection unit 16 acquires all surfaces of the product shape placed by the shape placement unit 14 and stored in the product shape storage unit 12 (step S61). The difference detection unit 16 references the geometric information of the acquired surfaces and extracts R-chamfered surfaces from the acquired surfaces (step S62). R-chamfered surfaces are surfaces consisting of cylindrical surfaces, toric surfaces, or free-form surfaces, and the corners of the shape are rounded by the curved surfaces.
[0186] The difference detection unit 16 refers to the geometric information of the acquired faces and selects, from the extracted R-chamfered faces, R-chamfered faces whose radius values are close to the reference radius value (step S63). Specifically, the difference detection unit 16 selects R-chamfered faces whose difference (radius difference) between the radius value of the acquired R-chamfered face and the reference radius value is within a specific range.
[0187] The difference detection unit 16 calculates the difference between the radius value of the selected R-chamfered surface and the reference radius value (step S64). In this way, the difference detection unit 16 obtains the difference amount indicating how much the radius value of the selected R-chamfered surface deviates from the reference radius value.
[0188] The shape correction unit 17 determines whether or not correction of the product shape is necessary based on the difference between the radius value of the selected R-chamfered surface and the reference radius value (step S65). The shape correction unit 17 determines whether or not correction is necessary using a determination method similar to the determination method in the shape correction process of the first example (the determination method in step S14).
[0189] If the shape correction unit 17 determines that correction is necessary (step S65, necessary), it corrects the R-chamfered surface determined to require correction (step S66). If correction is necessary for the R-chamfered surface, the shape correction unit 17 corrects the R-chamfered surface so that the radius value of the R-chamfered surface matches the reference radius value. The shape correction unit 17 recalculates and corrects the intersection lines and points between the R-chamfered surface corrected in step S66 and the adjacent surface (step S67). If the shape correction unit 17 determines that correction is not necessary (step S65, unnecessary), it does not perform the correction.
[0190] FIG. 17 is a diagram illustrating a sixth example of shape correction processing executed by the shape correction unit of the machining program generation device according to the embodiment. Here, the R-chamfered surface of a pocket formed in a product shape 84 will be described. For example, the pocket formed in the product shape 84 includes R-chamfered surfaces SF17, SF18, SF19, and SF20. The shape placement unit 14 places the product shape 84 so that the radius values of surfaces SF17 to SF20, which are a series of R-chamfered surfaces included in the product shape 84, match the reference radius value. In this case, it is assumed that the geometric information of surfaces SF17 to SF20 includes the following information. This geometric information is information resulting from misalignment caused by rewriting due to some factor, for example, during format conversion.
[0191] ・Surface SF17: R-chamfered surface ・Radius value = 2
[0192] ・Surface SF18: R-chamfered surface ・Radius value = 2.00016
[0193] ・Surface SF19: R-chamfered surface ・Radius value = 2
[0194] ・Surface SF20: R-chamfered surface ・Radius value = 2
[0195] The difference detection unit 16 calculates the difference between the radius values of surfaces SF17 to SF20 and the reference radius value. If the geometric information of surfaces SF17 to SF20 is the information described above and the reference radius value to be compared is 2, the difference between the radius value of surface SF18 and the reference radius value is 0.00016. If the allowable error in the radius value is 1.0e-3 and the setting error in the radius value set by the operator is 1.0e-6, the shape correction unit 17 performs shape correction on surface SF18.
[0196] The shape correction unit 17 corrects the geometric information of the R-chamfered surface SF18 as follows: Radius value=2
[0197] That is, the shape correcting unit 17 corrects the geometric information of the surface SF18 so that the radius value of the surface SF18 matches the reference radius value. Furthermore, the shape correcting unit 17 recalculates the intersection lines and points between the surface SF18 and the surfaces adjacent to the surface SF18 in accordance with the corrected surface SF18.
[0198] Fig. 18 is a flowchart showing a processing procedure of a seventh example of shape correction processing executed by the shape correction unit 17 of the machining program generation device according to the embodiment. The processing of Fig. 18 corresponds to the processing of step S5 in Fig. 2. The seventh example of shape correction processing executed by the shape correction unit 17 is processing to correct a C-chamfered surface.
[0199] The shape placement unit 14 places the product shape so that a series of C-chamfered faces included in the product shape have a C-chamfered face width equal to a specific value (reference width). The difference detection unit 16 acquires all faces of the product shape placed by the shape placement unit 14 and stored in the product shape storage unit 12 (step S71). The difference detection unit 16 references the geometric information of the acquired faces and extracts C-chamfered faces from the acquired faces (step S72). A C-chamfered face is a face consisting of a plane, a conical face, or a free-form surface, and the corners of the shape are beveled off by the plane.
[0200] The difference detection unit 16 refers to the geometric information of the acquired faces and selects, from the extracted C-chamfered faces, C-chamfered faces whose C-chamfered widths are close to the reference width (step S73). Specifically, the difference detection unit 16 selects C-chamfered faces whose differences (width differences) between the acquired C-chamfered faces and the reference widths are within a specific range. The C-chamfered width generally does not represent the width of the C-chamfered face but represents the length rounded from the corner, but may also be the width of the C-chamfered face.
[0201] The difference detection unit 16 calculates the difference between the C-chamfering width of the selected C-chamfered surface and the reference width (step S74). In this way, the difference detection unit 16 obtains the difference amount indicating how much the C-chamfering width of the selected C-chamfered surface deviates from the reference width.
[0202] The shape correction unit 17 determines whether or not correction of the product shape is necessary based on the difference between the C-chamfer width of the selected C-chamfered surface and the reference width (step S75). The shape correction unit 17 determines whether or not correction is necessary using a determination method similar to the determination method in the shape correction process of the first example (the determination method in step S14).
[0203] If the shape correction unit 17 determines that correction is necessary (step S75, necessary), it corrects the C-chamfered surface determined to require correction (step S76). If correction is necessary for the C-chamfered surface, the shape correction unit 17 corrects the C-chamfered surface so that the C-chamfered width of the C-chamfered surface matches the reference width. The shape correction unit 17 recalculates the intersection lines and points between the C-chamfered surface corrected in step S76 and the adjacent surface to perform the correction (step S77). If the shape correction unit 17 determines that correction is not necessary (step S75, unnecessary), it does not perform the correction.
[0204] 19 is a diagram illustrating a seventh example of shape correction processing executed by the shape correction unit of the machining program generation device according to the embodiment. Here, a C-chamfered surface of a pocket formed in a product shape 85 will be described. For example, the pocket formed in the product shape 85 includes C-chamfered surfaces SF21, SF22, SF23, and SF24. The shape placement unit 14 places the product shape 85 so that the C-chamfered widths of the series of surfaces SF21 to SF24 included in the product shape 85 match the reference width. In this case, it is assumed that the geometric information of surfaces SF21 to SF24 includes the following information. This geometric information is information resulting from misalignment caused by rewriting due to some factor, for example, during format conversion.
[0205] ・Surface SF21: C-chamfered surface ・C-chamfer width = 2
[0206] ・Surface SF22: C-chamfered surface ・C-chamfer width = 2.00016
[0207] ・Surface SF23: C-chamfered surface ・C-chamfer width = 2
[0208] ・Surface SF24: C-chamfered surface ・C-chamfer width = 2
[0209] The difference detection unit 16 calculates the difference between the C-chamfer width of faces SF21 to SF24 and the reference width. If the geometric information of faces SF21 to SF24 is the information described above and the reference width to be compared is 2, the difference between the C-chamfer width of face SF22 and the reference width is 0.00016. If the allowable error of the C-chamfer width is 1.0e-3 and the set error of the C-chamfer width set by the operator is 1.0e-6, the shape correction unit 17 performs shape correction on face SF22.
[0210] The shape correcting unit 17 corrects the geometric information of the C-chamfered surface SF22 as follows: C-chamfer width=2
[0211] That is, the shape correcting unit 17 corrects the geometric information of the surface SF22 so that the C-chamfer width of the surface SF22 coincides with the reference width. The shape correcting unit 17 also recalculates the intersection lines and points between the surface SF22 and the surfaces adjacent to the surface SF22 in accordance with the corrected surface SF22.
[0212] Fig. 20 is a flowchart showing the processing procedure of an eighth example of shape correction processing executed by the numerical control device according to the embodiment. The processing in Fig. 20 corresponds to the processing of step S5 in Fig. 2. The eighth example of shape correction processing executed by the numerical control device 100 is processing in which a correction method, which is a first parameter, is inferred and the product shape is corrected in accordance with the inferred correction method.
[0213] In the process of inferring the first parameter, the machine learning device 20 infers the first parameter using a learning model Mx generated based on the shape correction example Fc, with the second parameter extracted by the machining program generation device 10 as input. That is, the machine learning device 20 infers the first parameter by inputting the second parameter to the learning model Mx.
[0214] Specifically, the shape correction unit 17 extracts second parameters of the product shape (product shape, work origin, and program coordinate system) based on the product shape data arranged by the shape arrangement unit 14 and stored by the product shape memory unit 12, and the work origin and program coordinate system stored by the program coordinate setting unit 15, and inputs the second parameters of the product shape to the machine learning device 20 (step S81).
[0215] Here, it is assumed that the shape correction unit 17 has designated "a method for correcting a turned surface of a product shape," "a method for correcting a stepped hole of a product shape," "a method for correcting a bottom plane of a product shape," "a method for correcting a wall surface of a product shape," "a method for correcting an R-chamfered surface of a product shape," and "a method for correcting a C-chamfered surface of a product shape" as first parameters of inference candidates. In this case, the shape correction unit 17 acquires, from the product shape memory unit 12, the material of the product shape, dimensional values of the product shape, and the like as second parameters for inferring the first parameters. The dimensional values of the product shape are the length, width, depth, and the like of the product shape. The shape correction unit 17 inputs the types of the first parameters designated as inference candidates and the acquired second parameters to the inference unit 24 of the machine learning device 20.
[0216] The first parameter of the inference candidate may be set in advance in the shape correction unit 17 or may be set in the shape correction unit 17 by the operator via the instruction input unit 40 .
[0217] The inference unit 24 of the machine learning device 20 infers the first parameter using the second parameter (step S82). Specifically, the shape correction unit 17 inputs the generated second parameter to the inference unit 24 of the machine learning device 20, and the inference unit 24 infers the first parameter based on the second parameter. The inference unit 24 infers the first parameter from the second parameter acquired from the shape correction unit 17 using a learning model Mx for inferring the first parameter from the second parameter. As a result, the inference unit 24 acquires multiple values of the first parameter as the inference result. The inference unit 24 sends the multiple values of the first parameter to the shape correction unit 17.
[0218] The shape correction unit 17 corrects the product shape in accordance with the acquired first parameters (step S83). Specifically, the shape correction unit 17 corrects the product shape data arranged by the shape arrangement unit 14 and stored in the product shape storage unit 12 using the correction method of the first parameters so that there is no difference from the comparison target.
[0219] 21 is a flowchart showing the processing steps of a learning model generation process executed by the machine learning device according to the embodiment. In the learning model generation process, a learning model Mx for generating shape correction data is generated based on the correction method, product shape, workpiece origin, and program coordinate system included in the shape correction example Fc. Here, a case will be described in which the shape correction example Fc is the product shape data before correction stored in the product shape storage unit 12, the workpiece origin and program coordinate system stored in the program coordinate setting unit 15, and the correction method stored in the shape correction unit 17.
[0220] The machine learning device 20 reads the pre-correction product shape data stored in the product shape storage unit 12 of the machining program generation device 10 (step S91). The machine learning device 20 reads the workpiece origin and the program coordinate system stored in the program coordinate setting unit 15 of the machining program generation device 10 (step S92). The machine learning device 20 may execute the process of step S91 and the process of step S92 in any order.
[0221] The shape correction unit 17 extracts multiple first parameters used in any of the post-placement product shape data, workpiece origin, and program coordinate system from the product shape data, workpiece origin, and program coordinate system (step S93). The shape correction unit 17 extracts second parameters for each of the extracted multiple first parameters (step S94). That is, the shape correction unit 17 determines the second parameters to extract for each first parameter and extracts the determined second parameters. The shape correction unit 17 extracts second parameters corresponding to the first parameters based on the shape identification information. The shape correction unit 17 inputs the extracted first parameters and second parameters to the machine learning unit 22.
[0222] The machine learning unit 22 executes a machine learning process using the input first parameter and second parameter (step S95). Specifically, the machine learning unit 22 generates a dataset based on the first parameter and the second parameter, and executes machine learning in accordance with the generated dataset. The dataset is a set of data that associates a first parameter to be adjusted with a second parameter, which is a parameter not to be adjusted and is used to determine the value of the first parameter. The machine learning unit 22 generates an optimized model as a learning model Mx using predetermined criteria. In this way, the machine learning unit 22 generates a learning model Mx, which is a learning result.
[0223] The learning model storage unit 23 stores the generated learning model Mx (step S96), and the machine learning device 20 then ends the learning model generation process.
[0224] In the embodiment, the processing has been described as leaving a concave shape after processing, but the shape after processing may also be convex.
[0225] In this way, the machining program generation device 10 corrects only the portions whose shape difference is equal to or greater than the geometric tolerance and less than the set error amount, thereby making it possible to correct only the portions whose difference is within the range desired by the operator. The range desired by the operator is the range in which the difference from the comparison target is equal to or greater than the geometric tolerance and less than the set error amount.
[0226] When product shape data is created, various processes such as format conversion can degrade the accuracy of the product shape data. For example, various processes on the product shape data can cause the position coordinates and axial direction vectors to not match between the product shape and the turning axis. That is, various processes such as format conversion of the product shape data can cause errors in the geometric information of each shape element included in the product shape data, resulting in unexpected differences between the axes set in the geometric information of each shape element in the product shape data and the axes set in the program coordinate system of the machining program. In this case, when attempting to generate a machining program corresponding to the product shape data, there may be parts for which the machining program cannot be generated, or the accuracy of the machining program may be degraded, making it impossible to have the machine tool manufacture a product with the designed shape.
[0227] The numerical control device 100 according to the embodiment corrects the product shape data when there is a difference in shape between the product and the comparison target, thereby preventing the accuracy of the machining program from deteriorating. As a result, the numerical control device 100 can improve the success rate of generating machining programs and the accuracy of the machining programs.
[0228] Furthermore, by having the operator set a set error amount, the numerical control device 100 can correct product shape data whose shape difference with a comparison target is within a specific range and exclude product shape data that is outside the specific range from the correction target. This allows the numerical control device 100 to correct product shape data whose shape difference with a comparison target is within a range desired by the operator.
[0229] Furthermore, when there is a part of the product shape where the central axis of the cylindrical surface, conical surface, or toric surface in the product shape data does not coincide with the turning axis and the part shape portion cannot be developed into the machining program as a turning unit, the numerical control device 100 corrects the central axis of the product shape data to eliminate the difference between the central axis and the turning axis, thereby enabling the numerical control device 100 to generate a turning unit that can be developed into the machining program.
[0230] Furthermore, when there is a part of the product shape in which the central axis of a cylindrical surface, a conical surface, or a torus in the product shape data does not coincide with the central axis of an adjacent cylindrical surface, a conical surface, or a torus, and the part is not developed into a machining program as a single stepped hole machining unit, the numerical controller 100 corrects the central axis of the product shape data to eliminate the difference between the central axes. This allows the numerical controller 100 to generate a single stepped hole machining unit that can be developed into a machining program. In other words, even in a situation in which the central axes of the holes do not coincide due to the difference between the central axes and the parts are developed into separate hole machining units, the numerical controller 100 can generate a single stepped hole machining unit that can be developed into a machining program by correcting the central axis.
[0231] Furthermore, when the plane of the product shape data is not parallel to the XY plane and there is a part of the product shape that is not developed in the machining program as a surface machining unit, the numerical control device 100 corrects the normal vector of the product shape data to eliminate the difference between the normal vector of the product shape data and the Z-axis direction vector. That is, when the plane of the product shape data is determined to be inclined with respect to the XY plane and is not determined to be the bottom surface of the surface machining unit, the numerical control device 100 corrects the normal vector of the product shape data. This allows the numerical control device 100 to generate a surface machining unit that can be developed in the machining program. That is, the numerical control device 100 can develop the part that is not determined to be the bottom surface of the surface machining unit and is not developed as a surface machining unit.
[0232] Furthermore, when there is a part of the product shape that is not developed into the machining program as a surface machining unit because the angle between the normal vector of the plane of the product shape data and the vector (0,0,1) is not 90 degrees, the numerical controller 100 corrects the normal vector of the product shape data to eliminate the difference in angle between the normal vector of the product shape data and the Z-axis direction vector. That is, when the normal vector of the plane of the product shape data is determined to be inclined rather than parallel to the XY plane and is not determined to be a wall surface of a surface machining unit, the numerical controller 100 corrects the normal vector of the product shape data. This allows the numerical controller 100 to generate a surface machining unit that can be developed into the machining program. That is, the numerical controller 100 can develop, as a surface machining unit, a part that is not determined to be a side wall surface of a surface machining unit and therefore is not developed.
[0233] Furthermore, when the central axis of a cylindrical surface in the product shape data is not perpendicular to the XY plane and there is a part of the product shape that is not expanded in the machining program, the numerical controller 100 corrects the central axis of the product shape data to eliminate the difference between the central axis of the product shape data and the Z-axis direction vector. That is, when the central axis of a cylindrical surface that is perpendicular to the XY plane is not perpendicular to the XY plane due to the inclination of the cylindrical surface and is not determined as a wall surface of a surface machining unit, the numerical controller 100 corrects the central axis of the product shape data. This allows the numerical controller 100 to generate a surface machining unit that can be expanded in the machining program. That is, the numerical controller 100 can expand a portion that is not determined as a cylindrical surface of a surface machining unit and is therefore not expanded as a surface machining unit.
[0234] Furthermore, when there is a part of the product shape where the radius value of the R-chamfered surface in the product shape data does not match the reference radius value and the R-chamfered surface is expanded into the machining program as multiple chamfering machining units, the numerical controller 100 corrects the radius value of the R-chamfered surface in the product shape data to eliminate the difference between the radius value in the product shape data and the reference radius value. That is, even if the radius value of some of a series of multiple R-chamfered surfaces does not match the reference radius value, the numerical controller 100 corrects the radius value of the R-chamfered surface that does not match the reference radius value to the reference radius value. This allows the numerical controller 100 to generate a series of R-chamfered surface machining units that can be expanded into the machining program for a series of multiple R-chamfered surfaces. That is, the numerical controller 100 can expand the parts that are not determined to be a series of R-chamfered surfaces and are not expanded into a series of R-chamfered surface machining units.
[0235] Furthermore, when there is a part of the product shape where the C-chamfer width of the C-chamfered surface in the product shape data does not match the reference width and the C-chamfered surface is expanded in the machining program as multiple chamfering machining units, the numerical controller 100 corrects the C-chamfer width of the C-chamfered surface in the product shape data to eliminate the difference between the C-chamfer width of the product shape data and the reference width. That is, even if the radial width of some of a series of multiple C-chamfered surfaces does not match the reference width, the numerical controller 100 corrects the radial width of the C-chamfered surface that does not match the reference width to the reference width. This allows the numerical controller 100 to generate C-chamfered surface machining units that can be expanded in the machining program as a series of C-chamfered surface machining units. That is, the numerical controller 100 can expand parts that are not determined to be a series of C-chamfered surfaces and are not expanded as a series of C-chamfered surface machining units.
[0236] Furthermore, the numerical control device 100 can improve the accuracy of the shape correction method to be inferred by machine learning the shape correction data.
[0237] Next, a description will be given of the hardware configuration of the numerical control device 100. Fig. 22 is a block diagram showing the hardware configuration of the numerical control device according to the embodiment.
[0238] The numerical control device 100 shown in FIG. 22 comprises, as functional units, a processor 71, a memory 72 used by the processor 71 as a work area, a storage device 73 that stores computer programs (control programs, machining programs) that describe each function of the numerical control device 100, an input device 74 that is an input interface with an operator, a display device 75 that is an output device that displays information to the operator, and a communication device 76 that has a communication function with controlled equipment (such as a machine tool) or other numerical control devices.
[0239] The processor 71 , memory 72 , storage device 73 , input device 74 , display device 75 , and communication device 76 are connected to one another by a data bus 77 .
[0240] The processor 71 is a processing device, an arithmetic unit, a microprocessor, a microcomputer, a CPU (Central Processing Unit), a DSP (Digital Signal Processor), or the like.
[0241] The memory 72 may be a non-volatile or volatile semiconductor memory such as a RAM (Random Access Memory), a ROM (Read Only Memory), a flash memory, an EPROM (Erasable Programmable ROM), or an EEPROM (Electrically EPROM), a magnetic disk, a flexible disk, an optical disk, a compact disk, a minidisk, or a DVD (Digital Versatile Disc).
[0242] The shape input unit 11, shape placement unit 14, program coordinate setting unit 15, difference detection unit 16, shape correction unit 17, and machining program generation unit 18 of the numerical control device 100 can be realized by the processor 71 reading and executing a computer program stored in the memory 72.
[0243] Similarly, the shape correction method analysis unit 21, the machine learning unit 22, and the inference unit 24 of the machine learning device 20 can be realized by the processor 71 reading and executing a computer program stored in the memory 72.
[0244] The functions of the product shape memory unit 12, the material shape memory unit 13, and the shape placement unit 14 are realized by the storage device 73. Similarly, the function of the learning model memory unit 23 is realized by the storage device 73. Furthermore, the function of the program coordinate setting unit 15 to store the coordinate values of the workpiece origin and the direction vectors of each axis of the program coordinate system, and the function of the shape correction unit 17 to store shape correction data are realized by the storage device 73.
[0245] In the numerical control device 100, a plurality of processors 71 and a plurality of memories 72 may cooperate to realize each function of the numerical control device 100. Also, some of the functions of the shape input unit 11, the shape placement unit 14, the program coordinate setting unit 15, the difference detection unit 16, the shape correction unit 17, the machining program generation unit 18, the shape correction method analysis unit 21, the machine learning unit 22, and the inference unit 24 may be implemented as electronic circuits, and the remaining functions may be realized using the processors 71 and the memories 72.
[0246] The processor 71 and memory 72 for realizing the machining program generation device 10 may be the same as the processor 71 and memory 72 for realizing the machine learning device 20, or may be a processor 71 and memory 72 different from the processor 71 and memory 72 for realizing the machine learning device 20. That is, the processor 71 and memory 72 for realizing the functions of the shape input unit 11, the shape placement unit 14, the program coordinate setting unit 15, the difference detection unit 16, the shape correction unit 17, and the machining program generation unit 18 may be the same as or different from the processor 71 and memory 72 for realizing the shape correction method analysis unit 21, the machine learning unit 22, and the inference unit 24. The hardware configuration of the machining program generation device 10 or the machine learning device 20 may be the hardware configuration of FIG.
[0247] In this way, the numerical control device 100 of the embodiment corrects the product shape data so that the difference between the position coordinates and direction of the placed product shape and the coordinates and direction of the program coordinate system falls within a specific range when the difference is not within the specific range, thereby preventing a deterioration in the accuracy of the machining program. Therefore, the numerical control device 100 can cause the machine tool to manufacture a product with the shape desired by the operator.
[0248] The configurations shown in the above embodiments are merely examples, and may be combined with other known technologies, and parts of the configurations may be omitted or modified without departing from the spirit of the invention.
[0249] 10 Machining program generation device, 11 Shape input unit, 12 Product shape memory unit, 13 Material shape memory unit, 14 Shape placement unit, 15 Program coordinate setting unit, 16 Difference detection unit, 17 Shape correction unit, 18 Machining program generation unit, 20 Machine learning device, 21 Shape correction method analysis unit, 22 Machine learning unit, 23 Learning model memory unit, 24 Inference unit, 30 Dialogue operation processing unit, 40 Instruction input unit, 50 Display unit, 60 Control unit, 71 Processor, 72 Memory, 73 Storage device, 74 Input device, 75 Display device, 76 Communication device, 77 Data bus, 81 to 85 Product shape, 100 Numerical control device, 101 Product shape data, 102 Material shape data, 103 Placement data, 201 Machining shape data, AX1 to AX3 Program coordinate system, Fc Shape correction example, Fd Shape data, Mx Learning model, PM Machining program, SA1 product shape, SB2, Sx1 material shape, SC3 placement shape, SF4 to SF24 surface, SH1 turning hole machining shape, SH2, SH3, SH5 to SH7 turning machining shape, SH4, SH16 hole machining shape, SH8 to SH15 surface machining shape.
Claims
1. A coordinate setting unit that sets the program coordinate system so that a first direction set in product shape data representing a product shape coincides with a second direction set in the program coordinate system; a difference detection unit that detects the difference between the coordinates of the arranged product shape and the first direction and the coordinates and the second direction of the program coordinate system; and a shape correction unit that corrects the product shape data so that the difference is within a specific range that is not less than a geometric allowable error amount that is a geometrically allowable error amount. A control device characterized by comprising:
2. The control device according to claim 1, wherein the specific range is less than a set error amount that is an error amount set by an operator.
3. The first direction is the direction of the central axis of a cylindrical surface, a conical surface, or an annular surface included in the product shape, the second direction is the direction of the turning axis set in the program coordinate system, and the shape correction unit corrects the central axis so that the difference is within the specific range when the difference is not within the specific range. The control device according to claim 1 or 2, characterized by:
4. Further comprising a shape arrangement unit that arranges the product shape in a specific coordinate system, the first direction is the direction of each central axis of a stepped hole that is a hole with a step included in the product shape, the shape arrangement unit arranges the product shape so that the central axes coincide, and the difference detection unit detects an axis difference that is the difference between the central axes of adjacent hole surfaces among the holes included in the stepped hole, and the shape correction unit corrects each central axis so that the axis difference is within the specific range when the axis difference is not within the specific range. The control device according to claim 1 or 2, characterized by:
5. The first direction is the direction of the normal vector of a plane included in the product shape, and the shape correction unit corrects the normal vector so that the difference is within the specific range when the difference is not within the specific range. The control device according to claim 1 or 2, characterized by:
6. The first direction is the direction of the central axis vector of a cylindrical partial surface that is part of the cylindrical surface included in the product shape, the second direction is the direction of the turning axis set in the program coordinate system, and the shape correction unit corrects the central axis vector so that the difference is within the specific range when the difference is not within the specific range. The control device according to claim 1 or 2, characterized by the above.
7. The control device further includes a shape arrangement unit that arranges the product shape in a specific coordinate system. The shape arrangement unit arranges the product shape so that the radius value of the chamfered R surface included in the product shape matches the reference radius value, which is the reference radius value. The difference detection unit detects a radius difference, which is the difference between the radius value of the chamfered R surface and the reference radius value. The shape correction unit corrects the radius value of the chamfered R surface so that the radius difference is within the specific range when the radius difference is not within the specific range. The control device according to claim 1 or 2, characterized by the above.
8. The control device further includes a shape arrangement unit that arranges the product shape in a specific coordinate system. The shape arrangement unit arranges the product shape so that the chamfer width of the chamfered C surface included in the product shape matches the reference width, which is the reference chamfer width. The difference detection unit detects a width difference, which is the difference between the chamfer width of the chamfered C surface and the reference width. The shape correction unit corrects the chamfer width of the chamfered C surface so that the width difference is within the specific range when the width difference is not within the specific range. The control device according to claim 1 or 2, characterized by the above.
9. A shape correction method analysis unit that extracts a first parameter that corresponds to a shape correction method and is an adjustment target from the corrected product shape data, and extracts a second parameter that is used for adjusting the first parameter and is not an adjustment target from the product shape data before correction; A machine learning unit that generates a learning model for inferring the first parameter from the second parameter by learning using a data set including the first parameter and the second parameter; An inference unit that infers the first parameter from the second parameter using the learning model; The shape correction unit corrects the product shape data using the first parameter inferred by the inference unit. The control device according to any one of claims 1 to 8, characterized in that 10. The difference is a difference generated by format conversion when the product shape data is created. The control device according to any one of claims 1 to 9, characterized in that 11. A coordinate setting step in which the control device sets the program coordinate system so that a first direction set in product shape data representing a product shape coincides with a second direction set in the program coordinate system; A difference detection step in which the control device detects a difference between the coordinates of the arranged product shape and the first direction and the coordinates of the program coordinate system and the second direction; A shape correction step in which the control device corrects the product shape data so that the difference is within a specific range that is not less than a geometric allowable error amount that is a geometrically allowable error amount. A control method characterized by that.
Citation Information
Patent Citations
Automatic optimal NC data creation method
JP2004213554A