Programming device

The program creation device automates the selection of machining elements by designating points and extracting relevant lines and arcs, addressing the inefficiencies and errors in manual element specification, thereby simplifying the machining program creation process.

JP7764599B2Active Publication Date: 2025-11-05FANUC LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
JP2024526054
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-06-06
Publication Date
2025-11-05
Estimated Expiration
2042-06-06

AI Technical Summary

Technical Problem

The existing method of sequentially specifying elements such as straight lines and arcs to create a machining program is time-consuming and prone to user input errors, especially when small elements need to be enlarged for easier input.

Method used

A program creation device that automatically generates a machining program by setting machining information and designating a machining point, identifying the smallest closed machining area containing the point, and extracting straight line or arc elements using a machining point designation unit, machining area designation unit, and contour element extraction unit.

Benefits of technology

Enables easy and quick selection of elements that make up the processing area, reducing the time and effort required to create a machining program.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007764599000001
    Figure 0007764599000001
  • Figure 0007764599000002
    Figure 0007764599000002
  • Figure 0007764599000003
    Figure 0007764599000003
Patent Text Reader

Abstract

The present invention makes it possible to easily and quickly select an element constituting a processing region. This program creation device sets processing information and designates and sets a contour from shape data, thereby automatically generating a processing program, the program creation device comprising: a processing point designation unit that designates a processing point within a region being processed or on a contour in the shape data; a processing region specification unit that specifies closed processing regions in which the fewest processing points designated on the basis of the shape data are included, and excludes a closed processing region that does not include the processing points from among the closed processing regions, to thereby specify a processing region; and a contour element extraction unit that extracts an element of at least a line or arc constituting the specified processing region.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a program creation device. [Background technology]

[0002] There is known a technology in which a user sequentially specifies elements such as straight lines and arcs that make up a machining area from shape data displayed on a display via an input device such as a keyboard or touch panel, and then inputs machining information such as a finishing allowance and feed rate for the specified elements to create a machining program (see, for example, Patent Document 1). 23 to 25 are diagrams showing an example of a procedure for creating a machining program by sequentially specifying elements and inputting machining information. As shown in Fig. 24, from the shape data (e.g., CAD data, etc.) shown on the display in Fig. 23, the user specifies elements 1 to 6 that make up the machining area shown in the shaded area. As shown in Fig. 25, the user inputs machining information such as the finish allowance and feed rate along with the coordinates and radius of the start and end points of each of the specified elements 1 to 6, and presses the "OK" button to create a machining program. In the machining program shown in Fig. 25, "T10" indicates the tool number, "M6" indicates the tool change command, "G1040" indicates machining information for rough machining of the pocket, and "G1201" indicates information about the straight machining area. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Publication No. 07-311795 Summary of the Invention [Problem to be solved by the invention]

[0004] However, sequentially specifying the elements such as straight lines and arcs that make up the machining area requires time and effort to create a program, and is prone to user input errors. Also, if some of the elements that make up the displayed machining area are small, it is necessary to enlarge them to a size that makes them easier to input, which is very troublesome.

[0005] Therefore, it is desirable to be able to easily and quickly select the elements that make up the processing area. [Means for solving the problem]

[0006] One aspect of the program creation device disclosed herein is a program creation device that automatically generates a machining program by setting machining information and specifying and setting a contour from shape data, and is equipped with a machining point designation unit that designates a machining point inside the area to be machined or on the contour in the shape data, a machining area designation unit that identifies the smallest closed machining area that contains the designated machining point based on the shape data and excludes closed machining areas from the closed machining area that do not contain the machining point, and a contour element extraction unit that extracts at least straight line or arc elements that make up the identified machining area. [Effects of the Invention]

[0007] According to one aspect, elements that make up the processing area can be selected easily and quickly. [Brief explanation of the drawings]

[0008] [Figure 1] 1 is a functional block diagram of a program creating device for a numerical control device according to a first embodiment. [Figure 2A] 10A and 10B are diagrams showing an example of designating a processing point inside or on the contour of a region to be processed; [Figure 2B] 10A and 10B are diagrams showing an example of designating a processing point inside or on the contour of a region to be processed; [Figure 3] FIG. 10 is a diagram illustrating an example of an element extraction process. [Figure 4A]FIG. 10 is a diagram showing an example of a closed machining area in shape data. [Figure 4B] FIG. 10 is a diagram showing an example of a closed machining area in shape data. [Figure 5] 10A and 10B are diagrams illustrating an example of input of an instruction to change the start point and direction for extracting elements. [Figure 6] 10 is a flowchart illustrating a machining program creation process of the numerical control device program creation device. [Figure 7] 7 is a flowchart illustrating detailed processing contents of the processing area specifying process shown in step S3 in FIG. 6. [Figure 8] 8 is a flowchart illustrating detailed processing contents of the element extraction processing shown in step S31 in FIG. 7. [Figure 9] 8 is a flowchart illustrating detailed processing contents of the closed machining region specifying processing shown in step S33 in FIG. 7. [Figure 10] 10A and 10B are diagrams illustrating an example of a closed machining region specifying process. [Figure 11] 8 is a flowchart illustrating detailed processing contents of the machining point determination processing shown in step S35 in FIG. 7. [Figure 12] FIG. 10 is a diagram showing an example of a closed machining area. [Figure 13A] FIG. 10 is a diagram illustrating an example of an inside / outside determination table. [Figure 13B] 10A and 10B are diagrams illustrating an example of the relationship between machining points and closed machining regions in each pattern. [Figure 14] 12 is a flowchart illustrating detailed processing contents of the polygon inside / outside determination processing shown in step S353 in FIG. 11. [Figure 15A] FIG. 10 is a diagram showing an example of the relationship between angles between vectors when a processing point is inside a polygon. [Figure 15B] FIG. 10 is a diagram showing an example of the relationship between angles between vectors when a processing point is outside a polygon. [Figure 16] 12 is a flowchart illustrating detailed processing contents of the inside / outside arc determination processing shown in step S354 in FIG. 11. [Figure 17] FIG. 10 is a diagram illustrating an example of a relationship between an arc and a processing point. [Figure 18] FIG. 10 is a functional block diagram of a program creating device for a numerical control device according to a second embodiment. [Figure 19] FIG. 10 is a diagram showing an example of combining processing regions. [Figure 20] FIG. 10 is a diagram showing an example in which the processing area differs for each process. [Figure 21] 10 is a flowchart illustrating a machining program creation process of the numerical control device program creation device. [Figure 22] 22 is a flowchart illustrating detailed processing contents of the processing area combining process shown in step S43 in FIG. 21. [Figure 23] FIG. 10 is a diagram showing an example of selection of elements of a processing region from shape data. [Figure 24] FIG. 10 is a diagram showing an example of an element of a selected processing area. [Figure 25] FIG. 10 is a diagram illustrating an example of input of processing information. DETAILED DESCRIPTION OF THE INVENTION

[0009] The first and second embodiments will be described in detail with reference to the drawings. Here, each embodiment has in common the configuration of specifying a machining point inside or on the contour of the area to be machined in the shape data, identifying the smallest closed machining area that contains the specified machining point based on the shape data, and excluding closed machining areas that do not contain the machining point from within the closed machining area, thereby identifying the machining area. However, in the first embodiment, at least straight line or arc elements that make up the identified machining area are extracted, whereas in the second embodiment, machining points on the inside or contour of one or more adjacent areas are specified along with the area to be machined, and if there are identical elements common to the adjacent machining areas, the adjacent machining areas are combined and identified as a single machining area, which is different from the first embodiment. In the following, the first embodiment will be described in detail first, and then the second embodiment will be described, particularly focusing on the differences from the first embodiment.

[0010] First Embodiment FIG. 1 is a functional block diagram of a program creating device for a numerical control device according to the first embodiment. 1, a program creation device 1 for a numerical control device as a program creation device is a computer, a tablet terminal, or the like, and has a control unit 10, a storage unit 20, an input unit 30, and a display unit 40. The control unit 10 also has a machining point designation unit 101, a machining area identification unit 102, a contour element extraction unit 103, a contour element setting unit 104, a machining information setting unit 105, and a program creation unit 106. The numerical control device program creation device 1 may be connected to a numerical control device (not shown) via a network (not shown) such as a LAN (Local Area Network) or the Internet. In this case, the numerical control device program creation device 1 includes a communication unit (not shown) for transmitting the machining program created via such connection to the numerical control device (not shown). The numerical control device program creation device 1 may be directly connected to the numerical control device (not shown) via a connection interface (not shown) in a wired or wireless manner.

[0011] <Storage section 20> The storage unit 20 is a solid state drive (SSD), a hard disk drive (HDD), etc. The storage unit 20 stores shape data 201 together with an operating system and application programs executed by the control unit 10, etc. The shape data 201 is CAD data or the like that indicates the shape of a workpiece generated by a machining operation performed by a machine tool (not shown).

[0012] <Input section 30> The input unit 30 is an input unit such as a keyboard, a mouse, or a touch panel, and accepts input operations from the user.

[0013] <Display section 40> The display unit 40 is a liquid crystal display or the like serving as a display unit, and displays the shape data 201. The display unit 40 may also display a machining area selected from the shape data 201, display a screen for setting machining information such as a finishing allowance and a feed rate for the selected machining area, or display a machining program created based on the machining information.

[0014] <Control unit 10> The control unit 10 includes a CPU, a ROM, a RAM, a CMOS memory, and the like, which are configured to be able to communicate with each other via a bus, and are well known to those skilled in the art. The CPU is a processor that controls the entire numerical control device program creation device 1. The CPU reads out the system program and application program stored in the ROM via the bus and controls the entire numerical control device program creation device 1 in accordance with the system program and application program. As a result, as shown in FIG. 1, the control unit 10 is configured to realize the functions of a machining point designation unit 101, a machining area specification unit 102, a contour element extraction unit 103, a contour element setting unit 104, a machining information setting unit 105, and a program creation unit 106. The RAM stores various data such as temporary calculation data and display data. The CMOS memory is backed up by a battery (not shown) and is configured as a non-volatile memory that retains its stored state even when the power to the numerical control device program creation device 1 is turned off.

[0015] The machining point designation unit 101 designates a machining point P inside or on the contour of the area to be machined for which a machining program is to be created from the shape data 201 displayed on the display unit 40, based on the user's input operation via the input unit 30, as shown in Figures 2A and 2B, for example.

[0016] The machining area identification unit 102 identifies the smallest closed machining area that includes the specified machining point P based on the shape data 201, and identifies the machining area by excluding closed machining areas that do not include the machining point P from the identified closed machining area. Specifically, as shown in Fig. 3, for example, the machining area specifying unit 102 executes an element extraction process in the area to be machined shown in Fig. 2A, calculates an arbitrary half line L starting from the designated machining point P, and extracts elements such as lines, arcs, and circles that intersect with the half line L. The machining area specifying unit 102 calculates the distance from the designated machining point P to each extracted element, and sorts the extracted elements as elements Ei (i is 1 to 2) in order of the closest calculated distance. The element extraction process will be described later. In addition, in the case of the area to be processed shown in Figure 2B, as in the case of Figure 2A, the processing area identification unit 102 calculates an arbitrary half-line L starting from the specified processing point P, extracts elements that intersect with the half-line L, calculates the distance from the processing point P to each extracted element, and sorts the extracted elements in order of closest calculated distance as elements Ei (i is 1 to 2).

[0017] Next, the machining area specifying unit 102 executes a closed machining area specifying process to specify a closed machining area Ti including one element Ei from among the sorted elements. The closed machining area specifying process will be described later. However, as shown in FIG. 4A, the shape data 201 shown in FIG. 2A includes two closed machining areas, T1 and T2. Also, as shown in FIG. 4B, the shape data 201 shown in FIG. 2B includes closed machining areas T1 to T7.

[0018] Next, the machining area specifying unit 102 executes machining point determination processing to determine whether or not the specified closed machining area Ti has a designated machining point P, and specifies the closed machining area Ti having the machining point P as the machining area. On the other hand, the machining area specifying unit 102 excludes the closed machining area Ti having no machining point P from the machining area, increments i by 1, and specifies the closed machining area Ti including the next element Ei. The machining point determination processing will be described later.

[0019] The contour element extracting unit 103 extracts at least straight line or arc elements that form the machining area (closed machining area Ti) specified by the machining area specifying unit 102. Specifically, for example, in the closed machining area T2 of Fig. 4A, the contour element extraction unit 103 extracts elements in a clockwise or counterclockwise element extraction order, starting with element E3, which is closest to the machining point P shown in Fig. 5, as the first element. That is, when the element extraction order is clockwise, the contour element extraction unit 103 extracts elements E3, E5, E4, E7, E6, and E2 in that order. On the other hand, when the element extraction order is counterclockwise, the contour element extraction unit 103 extracts elements E3, E2, E6, E7, E4, and E5 in that order. 5, the contour element extraction unit 103 may display dots and arrows indicating the start point and direction for extracting elements on the display unit 40 together with the closed machining area T2 of FIG. 4A. When the contour element extraction unit 103 receives a flick input as shown in FIG. 5, which instructs the user via the input unit 30 to change the start point and direction for extracting elements, the contour element extraction unit 103 may change the element extraction order clockwise, starting with element E7 as the first element, and extract elements E7, E6, E2, E3, E5, and E4 in this order.

[0020] The contour element setting unit 104 sets, as contour element information, the start point, end point, radius, etc. of each element extracted by the contour element extraction unit 103. The contour element setting unit 104 outputs the setting information of each element to the program creation unit 106, which will be described later.

[0021] The machining information setting unit 105 displays a setting screen on the display unit 40 for each element extracted by the contour element extraction unit 103, and sets machining information such as a finishing allowance and a feed rate for machining each element based on an input operation by the user via the input unit 30. The machining information setting unit 105 outputs the machining information for each element to the program creation unit 106, which will be described later.

[0022] The program creation unit 106 creates a machining program for the closed machining region Ti based on the setting information of each element set by the contour element setting unit 104 and the machining information set by the machining information setting unit 105.

[0023] <Processing program creation process of the program creation device 1 for numerical control device> Next, the flow of processing for creating a machining program by the numerical control device program creating device 1 will be described with reference to FIG. 6 is a flowchart illustrating the machining program creation process of the numerical control device program creation device 1. The flow shown here is repeatedly executed every time the user selects shape data 201.

[0024] In step S1, the input unit 30 accepts a selection of shape data 201 from the user, and the display unit 40 displays the selected shape data 201.

[0025] In step S2, the machining point designation unit 101 designates a machining point P inside or on the contour of the area to be machined for which a machining program is to be created from the shape data 201 selected and displayed in step S1, based on the user's input operation via the input unit 30.

[0026] In step S3, the machining area specifying unit 102 specifies the smallest closed machining area that includes the machining point P specified in step S2, and executes machining area specifying processing to exclude the closed machining area that does not include the machining point P from the closed machining area, thereby specifying the machining area. Note that the detailed flow of the machining area specifying processing will be described later.

[0027] In step S4, the contour element extraction unit 103 extracts straight line or arc elements that form the machining area identified in step S3.

[0028] In step S5, the contour element setting unit 104 sets the start point, end point, radius, etc. of each element extracted in step S4 as contour element information.

[0029] In step S6, the processing information setting unit 105 displays a setting screen for each element extracted in step S3 on the display unit 40, and sets processing information such as finishing allowance and feed rate for processing each element based on the user's input operation via the input unit 30.

[0030] In step S7, the program creation unit 106 creates a machining program for the machining area identified in step S3 based on the setting information of each element set in step S5 and the machining information set in step S6.

[0031] In step S8, the machining point designation unit 101 determines whether or not a machining point P of the next machining target area has been designated based on an input operation by the user via the input unit 30. If a machining point P of the next machining target area has been designated, the process proceeds to step S3. On the other hand, if a machining point P of the next machining target area has not been designated, the numerical control device program creation device 1 ends the program creation process.

[0032] FIG. 7 is a flowchart illustrating the detailed processing content of the processing area specifying process shown in step S3 in FIG.

[0033] In step S31, the machining area specifying unit 102 executes an element extraction process on an arbitrary half line L starting from the machining point P specified in step S2, extracts elements such as lines, arcs, and circles that intersect with the half line L, calculates the distance from the specified machining point P to each extracted element, and sorts them as elements Ei in order of the closest calculated distance. The element extraction process will be described later.

[0034] In step S32, the processing area specifying unit 102 initializes a variable i to "1".

[0035] In step S33, the machining area specifying unit 102 executes a closed machining area specifying process to specify the closed machining area Ti including the elements Ei sorted in step S31. The closed machining area specifying process will be described later.

[0036] In step S34, the machining area specifying unit 102 determines whether or not there is a closed machining area Ti specified in the specification result of step S33. If there is a specified closed machining area Ti, the process proceeds to step S35. On the other hand, if there is no specified closed machining area Ti, the process proceeds to step S39.

[0037] In step S35, the machining area specifying unit 102 executes machining point determination processing to determine whether or not the designated machining point P is inside the closed machining area Ti specified in step S33. The machining point determination processing will be described later.

[0038] In step S36, the machining area specifying unit 102 determines whether the machining point P designated in the determination result of step S35 is inside the closed machining area Ti. If the designated machining point P is inside the closed machining area Ti, the process proceeds to step S37. On the other hand, if the designated machining point P is outside the closed machining area Ti, the process proceeds to step S38.

[0039] In step S37, the machining area specifying unit 102 specifies, as the machining area, the closed machining area Ti in which the machining point P is located. The machining area specifying unit 102 ends the machining area specifying process, and the process proceeds to step S4.

[0040] In step S38, the machining area specifying unit 102 excludes the closed machining area Ti where there is no machining point P from the machining area.

[0041] In step S39, the processing area specifying unit 102 increments the variable i by one.

[0042] In step S40, the processing area specifying unit 102 determines whether the variable i is equal to or less than the number q of elements in the set {element Ei}. If the variable i is equal to or less than the number q of elements, the process proceeds to step S33. On the other hand, if the variable i is greater than the number q of elements, the process proceeds to step S4.

[0043] FIG. 8 is a flowchart illustrating the detailed processing contents of the element extraction processing shown in step S31 in FIG.

[0044] In step S311, the machining area specifying unit 102 calculates the coordinates of the machining point P specified in step S2.

[0045] In step S312, the machining area specifying unit 102 calculates a half line L having the machining point P as its starting point.

[0046] In step S313, the processing region specifying unit 102 extracts all elements such as straight lines, arcs, and circles that intersect with the half-line L calculated in step S312.

[0047] In step S314, the machining area specifying unit 102 calculates the distance from the specified machining point P to each element extracted in step S313.

[0048] In step S315, the processing region specifying unit 102 sorts the elements extracted in order of the distance calculated in step S314 in descending order as elements Ei. The process proceeds to step S32.

[0049] FIG. 9 is a flowchart illustrating the detailed processing contents of the closed machining region specifying processing shown in step S33 in FIG.

[0050] In step S331, the machining area specifying unit 102 determines Ei as an element included in the closed machining area Ti, and sets it as a determined element.

[0051] In step S332, the machining area specifying unit 102 sets the element Ei as the element M of the closed machining area Ti to be searched. Specifically, as shown in Fig. 10, the machining area specifying unit 102 sets, for example, the element Ei indicated by the thick line in the shape data 201 of Fig. 2B as the element M to be searched for to search for the next element connected to the element Ei.

[0052] In step S333, the processing region specifying unit 102 searches for an element Ek adjacent to the element M in the shape data 201 (k is a positive integer, and element Ekε{shape data 201}).

[0053] In step S334, the processing region specifying unit 102 determines whether or not there is an adjacent element Ek. ​​If there is an adjacent element Ek, the process proceeds to step S335. On the other hand, if there is no adjacent element Ek, the process proceeds to step S33C.

[0054] In step S335, the processing area specifying unit 102 determines whether there is one adjacent element Ek. ​​If there is one adjacent element Ek, the process proceeds to step S336. On the other hand, if there are two or more adjacent elements Ek, the process proceeds to step S33A.

[0055] In step S336, the machining area specifying unit 102 determines the adjacent element Ek as an element included in the closed machining area Ti, and sets it as a determined element.

[0056] In step S337, the processing area specifying unit 102 determines whether the determined element determined in step S336 is the element Ei, which is the element M set in step S332. If the determined element is the element Ei, the process proceeds to step S339. On the other hand, if the determined element is not the element Ei, the process proceeds to step S338.

[0057] In step S338, the processing region specifying unit 102 sets the determined element, that is, the adjacent element Ek, as the element M. The processing returns to step S333.

[0058] In step S339, the machining area specifying unit 102 specifies the closed machining area Ti. The machining area specifying unit 102 ends the machining area specifying process, and the process proceeds to step S34.

[0059] In step S33A, when there are multiple adjacent elements Ek and at least one element Ek is an arc, the machining area specifying unit 102 calculates a tangent L' that passes through a point (branch point) adjacent to the element M. Specifically, as shown in Fig. 10, when two elements B1 and B2 as the element Ek are connected to the element M (element Ei) at a point (branch point) A and the element B1 is an arc, the machining area specifying unit 102 calculates a tangent L' that passes through the point (branch point) A and is tangent to the arc of the element B1. By doing so, the processing area specifying unit 102 can calculate the angle formed between the element M and the element B1 at the point (branch point) A.

[0060] In step S33B, the machining area specifying unit 102 determines the element Ek to be the element that forms the largest angle with the element M in the counterclockwise direction. For example, in the case of Fig. 10, the angle formed between the element M and the element B1 in the counterclockwise direction is larger than the angle formed between the element M and the element B2, so the machining area specifying unit 102 determines the element B1 to be the element Ek.

[0061] In step S33C, the machining area specifying unit 102 determines that there is no closed machining area in the area to be machined, and the process proceeds to step S34.

[0062] FIG. 11 is a flowchart illustrating the detailed processing contents of the machining point determination processing shown in step S35 in FIG.

[0063] In step S351, the machining area specifying unit 102 determines whether the closed machining area Ti specified in step S33 is a circle. If the specified closed machining area Ti is a circle, the process proceeds to step S356. On the other hand, if the specified closed machining area Ti is not a circle, the process proceeds to step S352.

[0064] In step S352, the machining area specifying unit 102 connects the start point and end point of each of the arc elements Ek (k is an integer equal to or greater than 1) included in the closed machining area Ti with a straight line, thereby forming the closed machining area Ti into a polygon. Specifically, the machining area specifying unit 102 connects the start point and end point of each arc element in the closed machining area Ti shown in FIG. 12 with a straight line indicated by a broken line, thereby creating a polygon. Note that the polygon in FIG. 12 has 12 vertices TP(1) to TP(12). Also, TP(1) and TP(12) are the same vertex.

[0065] In step S353, the processing area specifying unit 102 executes polygon inside / outside determination processing for the polygon created in step S352 using, for example, a known Winding Number Algorithm, to determine whether the processing point P is inside or outside the polygon. Note that the detailed flow of the polygon inside / outside determination processing will be described later.

[0066] In step S354, the machining area specifying unit 102 executes an inside / outside arc determination process to determine whether the machining point is inside or outside the arc element. The detailed flow of the inside / outside arc determination process will be described later.

[0067] In step S355, the machining area specifying unit 102 determines whether the machining point P is inside or outside the closed machining area Ti based on the determination results of step S353 and step S354. Specifically, using the inside / outside determination table shown in Fig. 13A, if the determination result of the polygon inside / outside determination process shows that the machining point P is inside the polygon, and if the determination result of the arc inside / outside determination process shows that the machining point P is inside the arc and the machining point P is inside the arc and the machining point P is pattern 1, or if the determination result of the polygon inside / outside determination process shows that the machining point P is outside the polygon, and if the determination result of the arc inside / outside determination process shows that the machining point P is outside the arc and the machining point P is outside the arc and the machining point P is pattern 4, the machining area specifying unit 102 determines that the machining point P is outside the closed machining area Ti. On the other hand, the machining area specifying unit 102 determines that the machining point P is inside the closed machining area Ti when the determination result of the polygon inside / outside determination process shows that the machining point P is inside the polygon, and when the determination result of the arc inside / outside determination process shows that the machining point P is outside the arc and the machining point P is outside the arc and the determination result of the arc inside / outside determination process shows that the machining point P is inside the arc and the machining point P is inside the arc and the machining point P is inside the closed machining area Ti. Then, the processing proceeds to step S36. FIG. 13B is a diagram showing an example of the relationship between the machining points P and the closed machining regions Ti in each of patterns 1 to 4. As shown in FIG.

[0068] In step S356, the machining area specifying unit 102 calculates the distance D from the center of the circular closed machining area Ti to the machining point.

[0069] In step S357, the machining area specifying unit 102 determines whether the distance D calculated in step S356 is smaller than the radius R of the circular closed machining area Ti. If the calculated distance D is smaller than the radius R, the process proceeds to step S358. On the other hand, if the calculated distance D is equal to or larger than the radius R, the process proceeds to step S359.

[0070] In step S358, the machining area specifying unit 102 determines that the machining point P is inside the closed machining area Ti. Then, the process proceeds to step S36.

[0071] In step S359, the machining area specifying unit 102 determines that the machining point P is outside the closed machining area Ti. Then, the process proceeds to step S36.

[0072] FIG. 14 is a flowchart illustrating in detail the polygon inside / outside determination process shown in step S353 in FIG.

[0073] In step S3531, the processing area specifying unit 102 initializes a variable A to "0" and a variable s to "1".

[0074] In step S3532, the machining area specifying unit 102 calculates the angle as formed between adjacent vectors PTP(s) and PTP(s+1) among the vectors directed from the machining point P to the vertex TP(s) of the polygon shown in FIG. 12 (i.e., the start point or end point of element Ek) obtained in step S352, as shown in FIG. 15A (s is 1 to (m-1), and m is the number of vertices of the polygon). Note that when vector PTP(s+1) is adjacent to vector PTP(s) counterclockwise, the machining area specifying unit 102 calculates the angle as as a positive value, and when vector PTP(s+1) is adjacent to vector PTP(s) clockwise, the machining area specifying unit 102 calculates the angle as as a negative value.

[0075] In step S3533, the processing area specifying unit 102 adds the angle as calculated in step S3532 by A=(1 / 2π)(A+as), and also increments the variable s by one.

[0076] In step S3534, the processing area specifying unit 102 determines whether the value of the variable s is smaller than the number m of vertices of the polygon. If the value of the variable s is smaller than the number m of vertices of the polygon, the process returns to step S3532. On the other hand, if the value of the variable s is equal to or larger than the number m of vertices of the polygon, the process proceeds to step S3535.

[0077] In step S3535, the processing area specifying unit 102 determines whether the variable A (the sum of the angle as between the vector PTP(s) and the vector PTP(s+1)) is "0". If the variable A is "0", the process proceeds to step S3537. On the other hand, if the variable A is not "0", the process proceeds to step S3536.

[0078] In step S3536, the machining area specifying unit 102 determines that the machining point P is inside the polygon because the variable A is not "0" as shown in FIG. 15A.

[0079] In step S3537, the machining area specifying unit 102 determines that the machining point P is outside the polygon because the variable A is "0" as shown in FIG. 15B.

[0080] FIG. 16 is a flowchart illustrating in detail the process of determining whether the point is inside or outside the arc shown in step S354 in FIG.

[0081] In step S3541, the processing area specifying unit 102 initializes a variable k to "1".

[0082] In step S3542, if the element Ek of the closed machining area Ti is an arc, the machining area specifying unit 102 calculates the distance between the center and the machining point P and determines whether the calculated distance is equal to or less than the radius of the arc. If the calculated distance is equal to or less than the radius of the arc, the process proceeds to step S3546. On the other hand, if the calculated distance is greater than the radius of the arc, the process proceeds to step S3543.

[0083] In step S3543, the processing area specifying unit 102 increments the variable k by one.

[0084] In step S3544, the machining area specifying unit 102 determines whether the variable k is smaller than the number n of elements included in the closed machining area Ti. If the variable k is smaller than the number n of elements, the process proceeds to step S3542. On the other hand, if the variable k is equal to or larger than the number n of elements, the process proceeds to step S3545.

[0085] In step S3545, the machining area specifying unit 102 determines that the machining point P is outside the arc of the element Ek. ​​Then, the process proceeds to step S355.

[0086] In step S3546, the machining area specifying unit 102 calculates a line segment SE connecting the start point S and the end point E of the arc of the element Ek, as shown in FIG.

[0087] In step S3547, the machining area specifying unit 102 calculates a line segment CP connecting the center C of the arc of the element Ek and the machining point P, as shown in Fig. 17. In Fig. 17, the position of the machining point P when the line segment SE and the line segment CP intersect is indicated by a white circle, and the position of the machining point P when the line segment SE and the line segment CP do not intersect is indicated by a shaded circle.

[0088] In step S3548, the machining area specifying unit 102 determines whether the central angle of the arc of the element Ek is 180 degrees or less. If the central angle of the arc of the element Ek is 180 degrees or less, the process proceeds to step S354B. On the other hand, if the central angle of the arc of the element Ek is greater than 180 degrees, the process proceeds to step S3549.

[0089] In step S3549, the processing area specifying unit 102 determines whether the line segment SE and the line segment CP intersect. If the line segment SE and the line segment CP intersect, the process proceeds to step S3545. On the other hand, if the line segment SE and the line segment CP do not intersect, the process proceeds to step S354A.

[0090] In step S354A, the machining area specifying unit 102 determines that the machining point P is inside the arc of the element Ek. ​​The process proceeds to step S355.

[0091] In step S354B, the processing area specifying unit 102 determines whether the line segment SE and the line segment CP intersect. If the line segment SE and the line segment CP intersect, the process proceeds to step S354A. On the other hand, if the line segment SE and the line segment CP do not intersect, the process proceeds to step S3545.

[0092] As described above, when a user specifies one machining point P in the shape data 201, the numerical control device program creation device 1 according to the first embodiment automatically extracts elements Ek such as straight lines and arcs that constitute the closed machining area Ti including the machining point P. This allows the numerical control device program creation device 1 to easily and quickly select the elements that constitute the machining area, thereby reducing the effort and time required to create a machining program. The first embodiment has been described above.

[0093] Second Embodiment Next, a second embodiment will be described. As described above, in the first embodiment, at least straight line or arc elements that make up the identified machining area are extracted. In contrast, in the second embodiment, machining points on the inside or contour of one or more adjacent areas are specified along with the area to be machined, and if there are identical elements common to the adjacent machining areas, the adjacent machining areas are combined and identified as a single machining area, which is different from the first embodiment. This allows the numerical control device program creating device 1A to easily and quickly select elements that make up the machining area. The second embodiment will be described below.

[0094] Fig. 18 is a functional block diagram of a program creation device for a numerical control device according to the second embodiment. Elements having the same functions as those of the program creation device 1 for a numerical control device in Fig. 1 are denoted by the same reference numerals, and detailed description thereof will be omitted. 18, the numerical control device program creation device 1A is a computer, a tablet terminal, or the like, and has a control unit 10a, a storage unit 20, an input unit 30, and a display unit 40. The control unit 10a also has a machining point designation unit 101a, a machining area identification unit 102a, a contour element extraction unit 103, a contour element setting unit 104, a machining information setting unit 105, and a program creation unit 106. The storage unit 20 also stores shape data 201. The storage unit 20, the input unit 30, and the display unit 40 have the same functions as the storage unit 20, the input unit 30, and the display unit 40 in the first embodiment. Moreover, the shape data 201 is the same data as the shape data 201 in the first embodiment.

[0095] <Control unit 10a> The control unit 10a includes a CPU, a ROM, a RAM, a CMOS memory, and the like, which are configured to be able to communicate with each other via a bus, and are well known to those skilled in the art. The CPU is a processor that controls the entire numerical control device program creation device 1A. The CPU reads out the system program and application program stored in the ROM via the bus, and controls the entire numerical control device program creation device 1A in accordance with the system program and application program. As a result, as shown in Fig. 18, the control unit 10a is configured to realize the functions of a machining point designation unit 101a, a machining area identification unit 102a, a contour element extraction unit 103, a contour element setting unit 104, a machining information setting unit 105, and a program creation unit 106. The contour element extraction unit 103, the contour element setting unit 104, the processing information setting unit 105, and the program creation unit 106 have functions equivalent to those of the contour element extraction unit 103, the contour element setting unit 104, the processing information setting unit 105, and the program creation unit 106 in the first embodiment.

[0096] 1, the machining point designation unit 101a designates machining points inside or on the contour of a region to be machined for which a machining program is to be created in the shape data 201 displayed on the display unit 40, based on an input operation by the user via the input unit 30. The machining point designation unit 101a also designates machining points inside or on the contour of one or more regions adjacent to the region to be machined.

[0097] 1, the machining area specifying unit 102a specifies the smallest closed machining area that includes the machining point specified in the area to be machined based on the shape data 201, and specifies the machining area by excluding the closed machining area that does not include the machining point from the specified closed machining area. Also, the machining area specifying unit 102a specifies the smallest closed machining area that includes the machining point specified in each of the areas adjacent to the area to be machined, and specifies the machining area by excluding the closed machining area that does not include the machining point from the specified closed machining area. If there are common elements between the elements of the machining area specified from the area to be machined and the elements of the machining area specified from the adjacent area, the machining area specifying unit 102a combines the machining area of ​​the area to be machined and the machining area of ​​the adjacent area to specify them as one machining area.

[0098] FIG. 19 is a diagram showing an example of combining processing regions. As shown in the upper part of Figure 19, when a processing point of the area to be processed on the left side of the shape data 201 is specified based on a user's input operation via the input unit 30, the processing area identification unit 102a identifies a closed processing area having elements F1 to F4 included in the closed processing area of ​​that area as the processing area. Next, as shown in the middle of Figure 19, when a machining point in an area adjacent to the area to be machined on the right side of the shape data 201 is specified based on a user's input operation via the input unit 30, the machining area identification unit 102a identifies a closed machining area having elements G1 to G4 included in the closed machining area of ​​the adjacent area as the machining area. In this case, the processing area specifying unit 102a searches for the same common element among the elements F1 to F4 of the processing area of ​​the area to be processed and the elements G1 to G4 of the processing area of ​​the adjacent area. In this case, since the element F1 of the processing area of ​​the area to be processed and the element G3 of the processing area of ​​the adjacent area are the same common element, the processing area specifying unit 102a deletes the elements F1 and G3, as shown in the lower part of Fig. 19, and specifies one processing area having the elements G1, G2, F2, F3, F4, and G4 as elements. By doing so, if the machining area differs for each machining process of the workpiece, the user can easily specify (identify) the machining area for each process, and create a machining program for each process.

[0099] FIG. 20 is a diagram showing an example in which the machining area differs for each process. The first row of FIG. 20 shows the post-machining, i.e., completed, workpiece W and shape data 201. The second row of FIG. 20 shows, from the left, the workpiece W before machining, the machining area to be cut in process 1, and the user's specification of machining points on the shape data 201 for process 1. The third row of FIG. 20 shows, from the left, the machining area to be cut in process 2, and the user's specification of machining points on the shape data 201 for process 2. The fourth row of FIG. 20 shows the machining area to be cut in process 3, and the user's specification of machining points on the shape data 201 for process 3. 20, the machined workpiece W has a two-step staircase shape, with the edge of the first step being cut obliquely. Therefore, the shape data 201 has three regions. As shown in the second row of Fig. 20, in order to cut the rectangular parallelepiped pre-machined workpiece W into the shape shown in the first row of Fig. 20, in step 1, it is necessary to cut the entire top surface of the pre-machined workpiece W, and the machining point designation unit 101a designates machining points in order from the left (or right or center) area in the shape data 201 based on an input operation by the user via the input unit 30. The machining area identification unit 102 identifies a single combined machining area indicated by a thick line from the three designated machining points. Next, as shown in the third row of Fig. 20, in step 2, in order to cut the right side of the workpiece W before machining, the machining point designation unit 101a designates machining points in the center and right side areas in the shape data 201 based on an input operation by the user via the input unit 30. The machining area identification unit 102 identifies a single combined machining area indicated by a thick line based on the two designated machining points. Finally, as shown in the fourth row of Fig. 20, in step 3, in order to cut the right end of the workpiece W obliquely before machining, the machining point designation unit 101a designates a machining point in the right-hand region in the shape data 201 based on an input operation by the user via the input unit 30. The machining region identification unit 102 identifies a machining region indicated by a thick line based on the one designated machining point.

[0100] <Processing program creation process of the program creation device 1A for numerical control device> Next, the flow of processing for creating a machining program by the numerical control device program creating device 1A will be described with reference to FIG. 21 is a flowchart illustrating the machining program creation process of the numerical control device program creation device 1A. The flow shown here is repeatedly executed every time the user selects shape data 201. The processes from step S1 to step S4 and step S5 to step S8 are the same as the processes from step S1 to step S4 and step S5 to step S8 in FIG. 6, and therefore the description thereof will be omitted.

[0101] In step S41, the machining area specifying unit 102a determines whether two or more machining points are specified in step S2. If multiple machining points are specified, the process proceeds to step S42. On the other hand, if multiple machining points are not specified, the process proceeds to step S5.

[0102] In step S42, the machining area specifying unit 102a determines whether or not there is a next machining point. If there is a next machining point, the process proceeds to step S3. On the other hand, if there is no next machining point, the process proceeds to step S43.

[0103] In step S43, the machining area specifying unit 102a executes machining area combining processing, and combines machining areas having the same common elements among the plurality of machining areas including the plurality of machining points specified in step S3. The detailed flow of the machining area combining processing will be described later.

[0104] FIG. 22 is a flowchart illustrating the detailed processing contents of the processing area combining process shown in step S43 in FIG.

[0105] In step S431, the machining area specifying unit 102a searches for common elements between adjacent machining areas.

[0106] In step S432, if there are identical common elements, the processing area specifying unit 102a deletes the identical common elements and combines the areas into one processing area.

[0107] In step S433, the processing area specifying unit 102a determines whether or not all processing areas have been searched. If all processing areas have been searched, the process proceeds to step S5. On the other hand, if all processing areas have not been searched, the process returns to step S431.

[0108] As described above, the numerical control device program creation device 1A automatically extracts elements such as straight lines and arcs that constitute the machining area of ​​a closed machining area including each machining point when the user specifies two or more machining points in the shape data 201. If there are identical elements common to adjacent machining areas, the numerical control device program creation device 1A combines them into one machining area. This allows the numerical control device program creation device 1A to easily and quickly select the elements that constitute the machining area, thereby reducing the effort and time required to create a machining program. The second embodiment has been described above.

[0109] The first and second embodiments have been described above, but the program creation device 1, 1A for a numerical control device is not limited to the above-mentioned embodiments and includes modifications, improvements, etc. within the scope that can achieve the purpose.

[0110] <Modification> In the first and second embodiments, the numerical control device program creation devices 1 and 1A are devices separate from the numerical control device (not shown), but this is not limiting. For example, the numerical control device program creation devices 1 and 1A may be implemented inside the numerical control device (not shown) and integrated with the numerical control device (not shown).

[0111] Note that the functions included in the numerical control device program creation devices 1 and 1A in the first and second embodiments can be realized by hardware, software, or a combination of these. Here, being realized by software means being realized by a computer reading and executing a program.

[0112] The program can be stored and supplied to a computer using various types of non-transitory computer-readable media. Non-transitory computer-readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic storage media (e.g., flexible disks, magnetic tapes, hard disk drives), magneto-optical storage media (e.g., magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, and semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, and RAMs). The program may also be supplied to a computer by various types of transitory computer-readable media. Examples of transitory computer-readable media include electrical signals, optical signals, and electromagnetic waves. The transitory computer-readable media can be supplied to a computer via wired communication paths such as electric wires and optical fibers, or via wireless communication paths.

[0113] In addition, the steps of writing a program to be recorded on a recording medium include not only processes that are performed chronologically in accordance with the order, but also processes that are not necessarily performed chronologically but are performed in parallel or individually.

[0114] In other words, the program creation device of the present disclosure can take on a variety of different embodiments having the following configurations.

[0115] (1) The program creation device 1 for a numerical control device disclosed herein is a program creation device that automatically generates a machining program by setting machining information and specifying and setting a contour from shape data 201, and is equipped with a machining point designation unit 101 that designates a machining point P inside the area to be machined or on the contour in the shape data 201, a machining area designation unit 102 that designates the machining area by identifying the smallest closed machining area Ti that includes the designated machining point based on the shape data and excluding closed machining areas within the closed machining area Ti that do not include the machining point P, and a contour element extraction unit 103 that extracts at least straight line or arc elements that make up the identified machining area. According to this numerical control device program creating device 1, elements that make up the machining area can be selected easily and quickly.

[0116] (2) In the program creation device 1 for a numerical control device described in (1), the contour element extraction unit 103 may extract all elements that are contours that constitute the machining area in a clockwise or counterclockwise element extraction order, with the element of the machining area that is closest to the machining point P specified by the machining point designation unit 101 as the first element.

[0117] (3) In the numerical control device program creating device 1 described in (2), the contour element extracting unit 103 may switch the element extraction order between clockwise and counterclockwise based on an instruction from the user.

[0118] (4) In the program creation device 1 for a numerical control device described in (2) or (3), the contour element extraction unit 103 may display the starting point and rotation direction for starting element extraction on the display unit 40 included in the program creation device 1 for a numerical control device, and extract elements based on the starting point and / or rotation direction changed based on instructions from the user.

[0119] (5) In the numerical control device program creating device 1A described in (1), the machining point designation unit 101a may designate machining points inside or on the contour of one or more areas adjacent to the area to be machined.

[0120] (6) In the program creation device 1A for a numerical control device described in (5), if there are elements common to the area to be machined and an adjacent area, the machining area identification unit 102a may combine the area to be machined and the adjacent area to identify them as a single machining area. [Explanation of symbols]

[0121] 1, 1A Programming device for numerical control devices 10, 10a Control section 101, 101a Machining point specification section 102, 102a Machining area identification part 103 Contour element extraction unit 104 Contour element setting section 105 Processing information setting section 106 Program Creation Department 20 Memory section 201 Shape Data 30 Input section 40 Display section

Claims

1. A program creation device that automatically generates a machining program by setting machining information and specifying and setting a contour from shape data, a machining point designation unit that designates a machining point inside a region to be machined or on the contour in the shape data; a machining area specifying unit that specifies the smallest closed machining area that includes the machining point specified based on the shape data, and excludes a closed machining area that does not include the machining point from the closed machining area, thereby specifying the machining area; a contour element extraction unit that extracts at least straight line or arc elements that constitute the specified machining area; A program creation device comprising:

2. 2. The program creation device according to claim 1, wherein the contour element extraction unit extracts all elements that are contours that constitute the machining area in a clockwise or counterclockwise element extraction order, starting with the element of the machining area that is closest to the machining point specified by the machining point designation unit as the first element.

3. 3. The program creating device according to claim 2, wherein the contour element extracting section switches the element extraction order between clockwise and counterclockwise based on an instruction from a user.

4. 4. The program creation device according to claim 2, wherein the contour element extraction unit displays a starting point and a rotation direction for starting extraction of the element on a display unit included in the program creation device, and extracts the element based on the starting point and / or the rotation direction changed based on instructions from a user.

5. 2. The program creation device according to claim 1, wherein the machining point designation unit designates machining points inside one or more regions adjacent to the region to be machined or on the contour.

6. The program creation device according to claim 5, wherein, when there is a common element between the area to be processed and an adjacent area, the processing area identification unit combines the area to be processed and the adjacent area to identify them as a single processing area.

Citation Information

Patent Citations

  • Interactive graphic input system

    JP1987251905A

  • NC data preparation device

    JP1990089106A

  • Working area designating device

    JP1992057106A

  • Shape input system

    JP1995311795A

  • Device and method for nc data generation

    JP2002236509A