WO2018003206A1 - 図形選択装置、図形選択方法および図形選択プログラム - Google Patents

図形選択装置、図形選択方法および図形選択プログラム Download PDF

Info

Publication number
WO2018003206A1
WO2018003206A1 PCT/JP2017/011354 JP2017011354W WO2018003206A1 WO 2018003206 A1 WO2018003206 A1 WO 2018003206A1 JP 2017011354 W JP2017011354 W JP 2017011354W WO 2018003206 A1 WO2018003206 A1 WO 2018003206A1
Authority
WO
WIPO (PCT)
Prior art keywords
graphic
condition
segment
target
unit
Prior art date
Application number
PCT/JP2017/011354
Other languages
English (en)
French (fr)
Inventor
譲二 若色
入口 健二
晋 松原
弘樹 金子
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2017541404A priority Critical patent/JP6239204B1/ja
Publication of WO2018003206A1 publication Critical patent/WO2018003206A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/80Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard

Definitions

  • the present invention relates to a graphic selection device, a graphic selection method, and a graphic selection program for selecting a graphic from a plurality of graphic elements.
  • a conventional apparatus for selecting a figure extracts a figure corresponding to a target area or a target route from drawing data which is a set of segments represented by lines such as lines or arcs.
  • the graphic selection device described in Patent Document 1 as one of such conventional devices searches for a graphic element in contact with a specified graphic element, and further searches for a graphic element in contact with the searched graphic element. .
  • Patent Document 1 which is the conventional technique, when the number of segments is large, the number of searches increases, and as the number of searches increases, the number of times the operator designates a figure also increases. For this reason, in patent document 1, when there were many segments, there existed a problem that the frequency
  • the present invention has been made in view of the above, and an object of the present invention is to obtain a graphic selection device that can select a drawing from drawing data with a small number of operations.
  • the graphic selection device of the present invention has a drawing data input unit for inputting drawing data of a selection source graphic configured by combining segments represented by lines.
  • the graphic selection device of the present invention includes a segment condition storage unit that stores a segment condition that is a segment condition of a target graphic that is a selection target, and a graphic that stores a graphic condition that is a condition of the shape of the target graphic A condition storage unit.
  • the graphic selection device of the present invention further includes a target graphic candidate generation unit that generates a target graphic candidate that satisfies the segment condition and the graphic condition based on the selection source graphic.
  • FIG. 2 is a block diagram showing a configuration of a graphic selection device according to the first embodiment.
  • the flowchart which shows the operation
  • FIG. Diagram for explaining the number of segments in the graphic condition Illustration for explaining the number of components of the graphic condition Flow chart showing processing procedure of closed loop determination Flow chart showing processing procedure for continuous line determination Flowchart showing processing procedure of mirror image symmetry determination The figure which shows the 1st example of a rotation angle The figure which shows the 2nd example of a rotation angle The figure which shows the 3rd example of a rotation angle Flow chart showing the processing procedure of rotational symmetry determination The figure for demonstrating the 1st calculation method of a translation vector The figure for demonstrating the 2nd calculation method of a translation vector Flow chart showing the processing procedure for translational symmetry determination Diagram showing angle to line segment Diagram showing angle to arc segment The figure which shows an example of drawing input into the figure selection apparatus in Embodiment 2 The figure which looked at the components corresponding to drawing shown in
  • FIG. 1 shows the 1st example of the other figure which satisfy
  • the figure which shows an example of the drawing data input into the figure selection apparatus in Embodiment 4 The figure for demonstrating the figure candidate determination process which concerns on Embodiment 4.
  • FIG. 5 The figure for demonstrating the figure candidate determination process which concerns on Embodiment 5.
  • FIG. which shows an example of drawing input into the figure selection apparatus in Embodiment 6
  • the figure which shows the target figure which an operator aims with respect to drawing of FIG.
  • FIG. 7 The figure which shows an example of drawing input into the figure selection apparatus in Embodiment 7
  • FIG. 8 The figure which looked at the components corresponding to drawing shown in FIG. 38 from diagonally
  • the figure which shows an example of drawing input into the figure selection apparatus in Embodiment 9 The figure for demonstrating the structure of drawing data shown in FIG.
  • FIG. 10 is a block diagram showing a configuration of a graphic selection device according to the tenth embodiment. A flowchart showing an operation processing procedure of the graphic selection device according to the tenth embodiment.
  • the figure which shows an example of drawing input into the figure selection apparatus in Embodiment 10 The figure which shows an example of the figure selected with the figure selection apparatus which concerns on Embodiment 10.
  • FIG. The figure which shows an example of the point and segment which an operator designates with respect to the figure selection apparatus which concerns on Embodiment 10.
  • the figure for demonstrating the 2nd conditions which the figure selection apparatus concerning Embodiment 10 adds automatically The figure which shows that the component with which the figure selection apparatus of Embodiment 1, 10 is provided is a processing circuit The figure which shows the structural example of the control circuit with which the figure selection apparatus of Embodiment 1, 10 is provided.
  • FIG. 1 is a block diagram showing the configuration of the graphic selection device according to the first embodiment.
  • the graphic selection device 101 is a computer that generates a graphic as a selection candidate from drawing data.
  • a graphic generated by the graphic selection device 101 is used for graphic editing in a design system, a manufacturing system, or a control system.
  • An example of the design system is CAD (Computer Aided Design).
  • An example of the manufacturing system is a CAM (Computer Aided Manufacturing) system.
  • An example of the control system is an NC (Numerical Control) automatic programming system. Note that the graphic generated by the graphic selection device 101 may be used to generate an NC program.
  • the graphic selection device 101 is connected to the display device 21 and the input device 22.
  • the display device 21 displays the shape of the object indicated by the drawing data.
  • the input device 22 receives an instruction to the graphic selection device 101 and inputs it to the graphic selection device 101.
  • An example of the display device 21 is a liquid crystal monitor, and an example of the input device 22 is a mouse.
  • the figure selection device 101 includes a drawing data input unit 1, a drawing data storage unit 2, a figure condition storage unit 3, and a segment condition storage unit 4.
  • the graphic selection device 101 includes a graphic condition determination unit 5, a segment condition determination unit 6, a target graphic candidate generation unit 7, a target graphic candidate storage unit 8, and a target graphic selection unit 9.
  • the graphic selection device 101 includes a preset condition storage unit 11, a preset condition setting unit 12, a condition editing unit 13, a drawing information specifying unit 14, and an automatic condition updating unit 31.
  • the drawing data input unit 1 reads the drawing data and inputs it into the drawing data storage unit 2. Specifically, the drawing data input unit 1 inputs drawing data of a selection source graphic configured by combining segments represented by lines to the drawing data storage unit 2.
  • the drawing data storage unit 2 stores the drawing data from the drawing data input unit 1.
  • the drawing data of the present embodiment represents the shape of a workpiece or a processing tool.
  • the drawing data includes segment attribute information such as the shape and position of a segment constituting the drawing, color or line type, hatching range, and layer information.
  • drawing data is not limited to such information, and may be any information.
  • segment type is a line segment, an arc, or a circle.
  • the graphic condition storage unit 3 stores graphic conditions that are conditions that must be satisfied by the target graphic to be selected by the operator.
  • the graphic condition is a condition of the shape of the target graphic and is editable information.
  • the graphic conditions are read from the preset condition storage unit 11 and stored in the graphic condition storage unit 3. Further, the graphic conditions in the graphic condition storage unit 3 are edited by the operator as necessary.
  • the graphic condition determination unit 5 is connected to the graphic condition storage unit 3 and the target graphic candidate generation unit 7. When the target graphic candidate is sent from the target graphic candidate generation unit 7, the graphic condition determination unit 5 determines whether or not the target graphic candidate satisfies each graphic condition stored in the graphic condition storage unit 3. judge.
  • a target graphic candidate that is sent from the target graphic candidate generation unit 7 to the graphic condition determination unit 5 is referred to as a graphic determination candidate.
  • the graphic determination candidate is the first candidate for the target graphic
  • the target graphic candidate stored in the target graphic candidate storage unit 8 by the target graphic candidate generation unit 7 is the second target graphic candidate.
  • those that have passed the determination result are the second candidates for the target graphic.
  • the graphic condition determination unit 5 returns “true” to the target graphic candidate generation unit 7 when the graphic determination candidate satisfies all graphic conditions.
  • the graphic condition determination unit 5 returns “false” to the target graphic candidate generation unit 7 when the graphic determination candidate does not satisfy any of the graphic conditions.
  • “True” returned from the graphic condition determination unit 5 to the target graphic candidate generation unit 7 is information indicating that the graphic determination candidate satisfies all graphic conditions.
  • the “false” returned from the graphic condition determination unit 5 to the target graphic candidate generation unit 7 is information indicating that the graphic determination candidate does not satisfy any of the graphic conditions.
  • the segment condition storage unit 4 stores a segment condition that is a condition that must be satisfied by all segments constituting the target graphic that the operator is trying to select.
  • the segment condition is a condition of a segment included in a target graphic that is an object of selection by the operator, and is editable information.
  • the segment condition is read from the preset condition storage unit 11 and stored in the segment condition storage unit 4. Moreover, the segment conditions in the segment condition storage unit 4 are edited by the operator as necessary.
  • the segment condition determination unit 6 is connected to the segment condition storage unit 4 and the target graphic candidate generation unit 7. When a segment is sent from the target graphic candidate generation unit 7, the segment condition determination unit 6 determines whether or not this segment satisfies each segment condition stored in the segment condition storage unit 4.
  • the segment condition determination unit 6 returns “true” to the target graphic candidate generation unit 7 when the segment satisfies all the segment conditions. On the other hand, the segment condition determination unit 6 returns “false” to the target graphic candidate generation unit 7 when the segment does not satisfy any of the segment conditions. “True” returned from the segment condition determination unit 6 to the target graphic candidate generation unit 7 is information indicating that the segment satisfies all the segment conditions. Further, “false” returned from the segment condition determination unit 6 to the target graphic candidate generation unit 7 is information indicating that the segment does not satisfy any of the segment conditions. There are a plurality of types of segment conditions stored in the segment condition storage unit 4 and determined by the segment condition determination unit 6. Details of each segment condition will be described later.
  • the preset condition storage unit 11 stores various graphic conditions and various segment conditions in advance before graphic selection is started.
  • the graphic conditions stored in the preset condition storage unit 11 include graphic conditions corresponding to the properties of the drawing read by the drawing data input unit 1 and the properties of the selected graphic.
  • the segment condition stored in the preset condition storage unit 11 includes a segment condition corresponding to the property of the drawing read by the drawing data input unit 1 and the property of the selected figure.
  • the preset condition setting unit 12 is connected to the preset condition storage unit 11.
  • the preset condition setting unit 12 reads out the graphic conditions stored in the preset condition storage unit 11 and sets them in the graphic condition storage unit 3. Further, the preset condition setting unit 12 sets the segment condition stored in the preset condition storage unit 11 in the segment condition storage unit 4.
  • the condition editing unit 13 is connected to the display device 21, the input device 22, the graphic condition storage unit 3, the segment condition storage unit 4, and the drawing information designation unit 14.
  • the condition editing unit 13 causes the display device 21 to display the graphic conditions set in the graphic condition storage unit 3 and the segment conditions set in the segment condition storage unit 4.
  • condition editing unit 13 rewrites the contents of the graphic condition storage unit 3 and the segment condition storage unit 4 in accordance with the operator's instruction input from the input device 22. Specifically, the condition editing unit 13 adds or deletes graphic conditions in the graphic condition storage unit 3 in accordance with an operator instruction input from the input device 22. In addition, the condition editing unit 13 adds or deletes the segment condition in the segment condition storage unit 4 according to the operator's instruction input from the input device 22. Further, the condition editing unit 13 may change the parameter in accordance with the operator's instruction input from the input device 22 for the graphic condition or the segment condition where the parameter exists.
  • the drawing information specifying unit 14 is connected to the display device 21, the input device 22, the drawing data storage unit 2, the graphic condition storage unit 3, the segment condition storage unit 4, and the condition editing unit 13.
  • the drawing information designating unit 14 reads out drawing information serving as parameters of drawing-dependent conditions from the drawing data storage unit 2 and sends the drawing information to the condition editing unit 13 in accordance with an operator instruction input from the input device 22.
  • the drawing-dependent conditions in the present embodiment are graphic conditions or segment conditions that require drawing data stored in the drawing data storage unit 2 when defining parameters. Accordingly, it can be said that the drawing-dependent condition parameter is a graphic condition or segment condition parameter.
  • the drawing information that is directly used for the parameter of the drawing dependent condition is a layer name or a segment number stored in the drawing data storage unit 2.
  • the drawing information designating unit 14 draws a point or a closed figure that can calculate the positional relationship between the segments in the drawing data by associating the drawing data stored in the drawing data storage unit 2 with the coordinate system. It may be used as a parameter for the dependency condition.
  • graphic conditions 16 to 18 described later and segment conditions 6 and 7 described later are drawing-dependent conditions.
  • the condition editing unit 13 edits the graphic condition or the segment condition based on the drawing information sent from the drawing information specifying unit 14.
  • the condition editing unit 13 calls the drawing information specifying unit 14 when the operator edits the drawing dependence condition.
  • the drawing information specifying unit 14 includes a layer specifying unit 15, a point specifying unit 16, a closed figure specifying unit 17, and a segment specifying unit 18.
  • the layer designating unit 15 displays the layer information stored in the drawing data storage unit 2 on the display device 21 and sends the name of the layer designated by the operator operating the input device 22 to the condition editing unit 13. .
  • the point designating unit 16 displays the drawing information stored in the drawing data storage unit 2 on the display device 21, and sends the point designated by the operator by operating the input device 22 to the condition editing unit 13.
  • the points specified by the operator are points defined in the coordinate system of the drawing.
  • the drawing information specifying unit 14 provides the operator with an easy operation method by causing the display device 21 to display the end points of the segments stored in the drawing data storage unit 2 with a display method that is easy to select. May be.
  • the drawing information designating unit 14 displays the end points of the segments in a format different from other graphic elements so that it can be easily understood that the selection can be made.
  • the operator may directly input the coordinate values of the points as numerical values.
  • the closed graphic designating unit 17 displays the drawing information stored in the drawing data storage unit 2 on the display device 21, and sends the closed graphic designated by the operator operating the input device 22 to the condition editing unit 13. .
  • the closed figure specified by the operator is defined by continuously drawing line segments or arcs.
  • the operator defines a closed figure by designating a representative point necessary for defining each line segment or arc by an operation such as touch or click.
  • the operator When the drawing information is displayed on the display device 21 in the form of text composed of the coordinate values of the end points of the segments, the operator directly sets the coordinate values of the representative points necessary for defining the line segment or the arc.
  • a closed figure may be defined by inputting numerical values.
  • the segment designation unit 18 causes the display device 21 to display the segment information stored in the drawing data storage unit 2.
  • the segment designating unit 18 refers to the graphic conditions set in the graphic condition storage unit 3 and the segment conditions set in the segment condition storage unit 4 so that the operator can easily specify the segment. Adjust the method.
  • the segment designating unit 18 displays a segment that does not satisfy the segment condition by changing the segment color to an inconspicuous color.
  • the operator looks at the display device 21 and operates the input device 22 to designate a segment.
  • the segment designation unit 18 sends the segment number of the designated segment to the condition editing unit 13.
  • the drawing information is displayed on the display device 21 in the form of text consisting of the coordinate value of the end point of the segment and the segment number
  • the operator can specify the segment by inputting the segment number. Good.
  • the designation methods that can be designated by the segment designation unit 18 are the following first to sixth designation methods.
  • the first designation method is a method for designating a single segment by clicking or touching.
  • the second designation method is a method for designating all the segments that intersect the line segment drawn using the input device 22.
  • the segment specifying unit 18 determines whether or not all the segments stored in the drawing data storage unit 2 intersect with the drawn line segment.
  • the segment designating unit 18 determines the intersection between the line segment when the segment type is a line segment, and determines the intersection between the arc and the line segment when the segment type is an arc. Then, the segment designating unit 18 sets all segments determined to intersect as designated segments.
  • the third designation method is a method for designating all segments that do not intersect the line segment drawn using the input device 22.
  • the segment designating unit 18 determines whether or not all segments stored in the drawing data storage unit 2 intersect the drawn line segment.
  • the segment designating unit 18 determines the intersection between the line segment when the segment type is a line segment, and determines the intersection between the arc and the line segment when the segment type is an arc.
  • designated part 18 makes all the segments determined not to cross
  • the fourth designation method is a method of designating all segments in a rectangle drawn using the input device 22.
  • the segment designation unit 18 determines whether or not the entire segment is within the rectangle for all the segments stored in the drawing data storage unit 2. Then, the segment designating unit 18 sets all the segments determined to be within the rectangle as designated segments.
  • the fifth designation method is a method of designating all segments that are not within the rectangle drawn using the input device 22.
  • the segment designation unit 18 determines whether or not the entire segment is within the rectangle for all the segments stored in the drawing data storage unit 2. Then, the segment specifying unit 18 sets all the segments determined not to be in the rectangle as the specified segments.
  • the sixth designation method is a method for designating all segments that are not within the display range of the display device 21. For example, when the display range is a rectangle, the segment designation unit 18 determines whether or not the entire segment is within the rectangle corresponding to the display range for all the segments stored in the drawing data storage unit 2. I do. Then, the segment specifying unit 18 sets all the segments determined not to be in the rectangle as the specified segments.
  • the segment designation unit 18 designates a segment by using an inclusion relation or an intersection relation with respect to a point, a line, a plurality of continuous lines, a free curve drawn with a mouse, a polygon, or a circle. May be.
  • the target graphic candidate generation unit 7 reads all the segments stored in the drawing data storage unit 2 and sends them to the segment condition determination unit 6 in order.
  • the segment condition determination unit 6 returns “true” or “false” to the target graphic candidate generation unit 7 for each segment.
  • the target graphic candidate generation unit 7 satisfies the segment condition from the segments stored in the drawing data storage unit 2 based on the information indicating “true” or “false” sent from the segment condition determination unit 6. Extract a segment.
  • the target graphic candidate generation unit 7 creates a plurality of graphic determination candidates that combine the extracted segments.
  • the target graphic candidate generation unit 7 sends the generated target graphic candidates to the graphic condition determination unit 5 in order.
  • the graphic condition determination unit 5 returns “true” or “false” to the target graphic candidate generation unit 7 for each graphic determination candidate.
  • the target graphic candidate generation unit 7 selects only graphic determination candidates satisfying the graphic condition from among the graphic determination candidates.
  • the graphic determination candidate stored in the target graphic candidate storage unit 8 is a target graphic candidate presented to the operator.
  • the target graphic candidate generation unit 7 may refer to the graphic conditions stored in the graphic condition storage unit 3 when generating a target graphic candidate or a graphic determination candidate. In this case, the target graphic candidate generation unit 7 may generate a target graphic candidate or graphic determination candidate based on the referenced graphic condition, or generate a target graphic candidate or graphic determination candidate that does not satisfy the graphic condition. It may be excluded.
  • the first method is a method in which the target graphic candidate generation unit 7 refers to graphic conditions when generating graphic determination candidates and generates graphic determination candidates so as to satisfy the graphic conditions.
  • the graphic condition determination unit 5 determines whether or not the graphic determination candidate generated by the target graphic candidate generation unit 7 satisfies the graphic condition, and excludes those that do not satisfy the graphic condition. Is the method.
  • the target graphic candidate generation unit 7 stores in the target graphic candidate storage unit 8 only the graphic determination candidates that satisfy all graphic conditions.
  • the target graphic candidate generation unit 7 determines whether or not the target graphic candidate satisfies the graphic condition, and in the case of the second method, the target graphic candidate is a graphic condition.
  • the graphic condition determination unit 5 determines whether or not the above is satisfied.
  • the target graphic candidate generation unit 7 generates a graphic determination candidate based on the graphic condition, and then determines whether or not the segments constituting the generated graphic determination candidate satisfy the segment condition. Based on this, a candidate for a target graphic may be generated.
  • the target graphic candidate generation unit 7 first generates a graphic from the graphic conditions, and determines whether the segment condition determination unit 6 satisfies the segment condition for the segments constituting the generated graphic.
  • generation part 7 may memorize
  • the target figure candidate generation unit 7 is a round robin for the combination of four line segments in the drawing, and is first in a closed loop, that is, the line segments are end points. Determine if connected. Then, the segment condition determination unit 6 determines whether or not the four line segments satisfy the segment condition.
  • the target graphic selection unit 9 causes the display device 21 to display target graphic candidate information stored in the target graphic candidate storage unit 8.
  • the target graphic selection unit 9 selects a target graphic intended by the operator from among target graphic candidates in accordance with the operator's instruction from the input device 22.
  • the target graphic selected by the target graphic selection unit 9 may be stored in the graphic selection device 101 or may be output to an external device.
  • the condition automatic update unit 31 includes a graphic condition stored in the graphic condition storage unit 3, a segment condition stored in the segment condition storage unit 4, and a target graphic candidate stored in the target graphic candidate storage unit 8. Analyze.
  • the condition automatic update unit 31 adds, deletes, or changes parameters of the graphic conditions stored in the graphic condition storage unit 3 based on the analysis result.
  • the automatic condition updating unit 31 adds, deletes, or changes parameters of the segment conditions stored in the segment condition storage unit 4 based on the analysis result.
  • FIG. 2 is a flowchart showing an operation processing procedure of the graphic selection device according to the first embodiment.
  • the figure selecting apparatus 101 When the figure selecting apparatus 101 starts its operation, it confirms whether or not to reuse the previously input drawing data in step S10.
  • the graphic selection device 101 checks whether or not a reuse instruction indicating that the drawing data input last time is reused is input from the input device 22. If there is no reuse instruction, that is, if No in step S10, the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20.
  • An example of the CAD data here is a DXF (Drawing Exchange Format) file.
  • the drawing data input unit 1 assigns different segment numbers to all segments when reading segments from drawing data. Then, the drawing data input unit 1 associates the segment numbers with the segments and inputs them together with the segments to the drawing data storage unit 2. As a result, the drawing data storage unit 2 stores the segment number and the segment associated with each other.
  • the preset condition setting unit 12 sets preset conditions stored in the preset condition storage unit 11 in advance. Specifically, the preset condition setting unit 12 sets the graphic conditions stored in the preset condition storage unit 11 in the graphic condition storage unit 3 in advance. Further, the preset condition setting unit 12 sets the segment condition stored in the preset condition storage unit 11 in the segment condition storage unit 4 in advance. In the graphic selection device 101, storing the graphic conditions in the graphic condition storage unit 3 by the preset condition setting unit 12 corresponds to setting the graphic conditions in the graphic condition storage unit 3. Further, storing the segment condition in the segment condition storage unit 4 by the preset condition setting unit 12 corresponds to setting the segment condition in the segment condition storage unit 4.
  • step S10 that is, if there is a reuse instruction
  • the preset condition setting unit 12 is stored in advance in the preset condition storage unit 11 in step S30 without executing the process of step S20. Set preset conditions.
  • the condition editing unit 13 adds, deletes, or deletes the graphic condition and the segment condition according to the instruction to the input device 22 by the operator. Make a change.
  • the condition editing unit 13 stores, in the graphic condition storage unit 3, information indicating which type of which graphic condition has been added when adding a graphic condition without a parameter. In addition, when adding a segment condition without a parameter, the condition editing unit 13 stores information indicating which type of which segment condition is added in the segment condition storage unit 4.
  • condition editing unit 13 when adding a graphic condition with a parameter, the condition editing unit 13 asks the operator to specify the parameter, and the parameter specified by the operator together with the type of the added graphic condition is stored in the graphic condition storage unit. 3 is stored. In addition, when adding a segment condition with a parameter, the condition editing unit 13 prompts the operator to specify a parameter, and the parameter specified by the operator together with the type of the added segment condition is stored in the segment condition storage unit. 4 is stored.
  • condition editing unit 13 when changing the parameters of the graphic conditions that have already been set, the condition editing unit 13 asks the operator to specify a new parameter, and the parameters stored in the graphic condition storage unit 3 Rewrite with the parameters specified by the user. In addition, when changing the parameter of the segment condition that has already been set, the condition editing unit 13 asks the operator to specify a new parameter, and the parameter stored in the segment condition storage unit 4 Rewrite with the parameters specified by the user.
  • condition editing unit 13 deletes the graphic condition to be deleted from the graphic condition stored in the graphic condition storage unit 3.
  • condition editing unit 13 deletes the segment condition to be deleted from the segment condition stored in the segment condition storage unit 4.
  • step S40 when the worker designates the parameter of the drawing dependence condition, the drawing information designation unit 14 designates the parameter according to the instruction of the worker.
  • the drawing information designating unit 14 determines whether each graphic condition and each segment condition is accompanied by a parameter, and if so, determines what parameter is to be set. Various determinations and determinations made by the drawing information specifying unit 14 for each type of graphic condition and segment condition will be described later.
  • the condition editing unit 13 causes the display device 21 to display an editing screen for editing the graphic condition and the segment condition.
  • the condition editing unit 13 may arrange editing items under conditions that are considered to be frequently used at positions that can be edited immediately without requiring a scrolling operation or an operation for opening another screen.
  • the condition editing unit 13 may arrange editing items of other conditions that are considered to be less frequently used at a position that can be traced by a scroll operation or an operation for opening another screen.
  • condition editing unit 13 can edit the graphic condition and the segment condition included in the preset condition set in step S30 in step S40.
  • the graphic condition and segment condition set by the preset condition setting unit 12 may be prohibited, and deletion and parameter change may be limited to the graphic condition or segment condition added by the operator.
  • the target graphic candidate generation unit 7 When the operator completes the editing of the graphic condition or the segment condition, the target graphic candidate generation unit 7 generates a target graphic candidate in step S50. Specifically, the target graphic candidate generation unit 7 determines whether or not the segment condition determination unit 6 satisfies the segment condition one by one for all segments stored in the drawing data storage unit 2. Make it. Then, based on the determination result that is the first determination result from the segment condition determination unit 6, the target graphic candidate generation unit 7 extracts only the segments that satisfy all the segment conditions from all the segments. A specific example of how each segment condition is determined by the segment condition determination unit 6 will be described later. After extracting the segments, the target graphic candidate generation unit 7 generates a graphic by combining the extracted segments. The figure here is a figure determination candidate.
  • the target graphic candidate generation unit 7 sends the graphic determination candidate to the graphic condition determination unit 5, and causes the graphic condition determination unit 5 to determine whether or not the graphic determination candidate satisfies the graphic condition. Based on the determination result that is the second determination result from the graphic condition determination unit 5, the target graphic candidate generation unit 7 stores only target graphic candidates that satisfy all the graphic conditions in the target graphic candidate storage unit 8.
  • the target graphic candidate generation unit 7 performs combination of segments in a brute force manner, and the graphic condition determination unit 5 determines whether or not graphic conditions are satisfied for all combinations. A specific example of how each graphic condition is determined in the graphic condition determination unit 5 will be described later.
  • the target graphic selection unit 9 selects the target graphic candidates stored in the target graphic candidate storage unit 8 in step S60. It is displayed on the display device 21.
  • step S70 the graphic selection device 101 determines whether or not to regenerate the target graphic candidate.
  • the graphic selection device 101 checks whether or not a redo instruction indicating that the target graphic candidate generation is redone has been input from the input device 22. When the operator instructs to redo, there are cases where the target graphic is not in the target graphic candidates, or there are too many target graphic candidates and it is difficult to find the target graphic.
  • condition automatic update unit 31 determines the graphic condition based on the target graphic candidate information stored in the target graphic candidate storage unit 8 in step S71.
  • the graphic conditions or segment conditions which are the contents of the storage unit 3 and the segment condition storage unit 4, are automatically updated.
  • condition automatic update unit 31 searches for a segment included in all target graphic candidates in the target graphic candidate storage unit 8, and if so, sets the segment number of this segment as a parameter, which will be described later
  • the graphic condition 16 is added to the graphic condition storage unit 3.
  • the automatic condition updating unit 31 searches for a segment not included in any of the target graphic candidates in the target graphic candidate storage unit 8 and, if there is, a later-described segment in which the segment number of this segment is set as a parameter.
  • Condition 7 is added to the segment condition storage unit 4.
  • step S71 after the automatic condition updating unit 31 automatically updates the graphic condition or the segment condition, the graphic selecting apparatus 101 repeats the processes in steps S40 to S70. If the answer is No in step S70, that is, if there is no redo instruction, the target graphic selection unit 9 selects a target graphic in step S80. Specifically, the target graphic selection unit 9 selects a target graphic from the target graphic candidates displayed in step S60 in accordance with an operator instruction input from the input device 22. Thereafter, the graphic selection device 101 stops operating.
  • the graphic selection device 101 may be used in a part of another system.
  • the graphic selection device 101 may be incorporated in a CAD system or a CAM system.
  • the reuse instruction in step S10 may be sent from the CAD system or the CAM system to the graphic selection device 101 instead of from the operator.
  • the drawing data storage unit 2 and the drawing information designation unit 14 may be arranged in a CAD system or a CAM system.
  • the figure selection device 101 may be used as part of an NC automatic programming device.
  • the graphic selection device 101 in the automatic programming device presents graphic candidates.
  • the graphic candidate presented here is a graphic at a location where processing is appropriate when processing is performed with the type of processing selected by the operator.
  • the automatic programming device When the operator selects a graphic from the presented graphic candidates, the automatic programming device generates a machining path from the selected graphic data.
  • the operator reads the drawing data from the automatic programming device and sets the origin in advance.
  • the graphic selection device 101 in the automatic programming device sets a closed region existing in the drawing as a target graphic candidate and presents it.
  • the automatic programming apparatus generates a machining path for pocketing the selected figure, that is, the closed region.
  • Such an automatic programming device can be realized by partially including the graphic selection device 101 as follows.
  • the preset condition storage unit 11 stores a plurality of different preset conditions for each type of processing. Each preset condition corresponds to a figure selected for each processing type.
  • the automatic programming device designates a preset condition corresponding to the type of machining and activates the graphic selection device 101.
  • the graphic selection device 101 executes up to step S30, the preset condition setting unit 12 sets the preset conditions according to the designation from the automatic programming device.
  • the figure selection apparatus 101 can present a candidate of a target figure suitable for the type of processing. Accordingly, the operator can instruct the machining shape by selecting the target graphic from the presented target graphic candidates.
  • the graphic selection device 101 may skip the manual setting of the condition only when the processing of step S40 is performed for the first time.
  • the figure selection apparatus 101 can appropriately narrow down to a small number of target figure candidates only by the preset condition, the number of operations by the operator can be reduced by performing the above-described skip.
  • the automatic programming device displays a candidate for a target graphic, that is, a candidate for a machining location, only by the operator selecting a type of machining. Accordingly, the operator can complete the processing shape instruction only by selecting one of the processing site candidates.
  • the graphic selection device 101 may be used for three-dimensional drawing data or may be used for two-dimensional drawing data. Segments such as line segments or arcs can also be defined in a three-dimensional coordinate system. Further, the segment condition can be used as it is for the three-dimensional drawing data other than those related to the layer. Further, some graphic conditions can be used for three-dimensional drawing data as they are or with some modifications. Therefore, the graphic selection device 101 can be applied to three-dimensional drawing data by using an appropriate segment condition and an appropriate graphic condition.
  • the graphic selection apparatus 101 generates a target graphic candidate using any of the graphic conditions 1 to 18 and any of the segment conditions 1 to 7.
  • the graphic condition 1 is a condition that the graphic to be determined has a specified attribute.
  • An example of the attribute is decoration information such as hatching or fill color, but any information may be used as long as the attribute can be given to the figure.
  • the parameter of graphic condition 1 is the content of the attribute.
  • the condition editing unit 13 stores the contents of the attribute designated by the operator in the graphic condition storage unit 3 when the worker adds the graphic condition 1 or changes the parameters of the graphic condition 1 in step S40.
  • the graphic condition determination unit 5 gives the graphic to be determined from among the attributes corresponding to the graphic among the attributes stored in the drawing data storage unit 2 when determining the graphic condition 1 in step S50. Extract all attributes that can be considered as being. If the extracted attribute has the same attribute as the parameter stored in the graphic condition storage unit 3, the graphic condition determination unit 5 determines that the graphic condition 1 is satisfied. On the other hand, if the extracted attribute does not have the same attribute as the parameter stored in the graphic condition storage unit 3, the graphic condition determination unit 5 determines that the graphic condition 1 is not satisfied.
  • the graphic condition 2 is a condition that the area of the graphic to be determined is within a specified range.
  • the parameters of the graphic condition 2 are the minimum value and the maximum value of the area of the graphic to be determined.
  • the graphic condition determining unit 5 first calculates the area of the graphic to be determined. Then, the graphic condition determination unit 5 compares the calculated area with the minimum value and the maximum value of the area stored in the graphic condition storage unit 3. If the calculated area is not less than the minimum value and not more than the maximum value, the graphic condition determination unit 5 determines that the graphic condition 2 is satisfied. On the other hand, when the calculated area is smaller than the minimum value or larger than the maximum value, the graphic condition determination unit 5 determines that the graphic condition 2 is not satisfied.
  • the graphic condition 3 is a condition that the radii of all the circles and arcs constituting the graphic to be determined are the same. This graphic condition 3 does not include a parameter.
  • the graphic condition determining unit 5 first extracts only a circle and an arc from the segments constituting the graphic to be determined. When neither a circle nor an arc exists, the graphic condition determination unit 5 determines that the graphic condition 3 is satisfied and ends the process.
  • the graphic condition determination unit 5 compares the radii. In the radius comparison, the graphic condition determination unit 5 selects an arbitrary circle or arc from the collected circles and arcs, and examines the radius of the selected circle or arc. Then, the graphic condition determination unit 5 determines whether or not all the radii of the collected circles and arcs are the same as the radius of the arbitrarily selected circle or arc. If all the radii of the collected circles and arcs are the same as the radii of the arbitrarily selected circles or arcs, the graphic condition determining unit 5 determines that the graphic condition 3 is satisfied. On the other hand, if any radius of the collected circles and arcs is different from the radius of the arbitrarily selected circle or arc, the figure condition determination unit 5 determines that the figure condition 3 is not satisfied.
  • the graphic condition 4 is a condition that the number of segments constituting the graphic to be determined is within a specified range.
  • the parameters of the graphic condition 4 are the minimum value and the maximum value of the number of segments.
  • the graphic condition determination unit 5 first counts the number of graphic segments to be determined when determining the graphic condition 4 in step S50. Then, the graphic condition determination unit 5 compares the counted number of segments with the minimum and maximum values of the number of segments stored in the graphic condition storage unit 3. If the counted number of segments is greater than or equal to the minimum value and less than or equal to the maximum value, the graphic condition determination unit 5 determines that the graphic condition 4 is satisfied. On the other hand, when the counted number of segments is smaller than the minimum value or larger than the maximum value, the graphic condition determination unit 5 determines that the graphic condition 4 is not satisfied.
  • the figure condition determination unit 5 may count a plurality of segments that are continuous on the same line with a constant curvature as one segment. This process is effective when a part of the side of the graphic intended by the operator overlaps with another graphic.
  • FIG. 3 is a diagram for explaining the number of segments of the graphic condition.
  • FIG. 3 shows an example of a graphic intended by the operator.
  • the line segment A2 is one side of the triangle and part of one side of the quadrangle.
  • Line segments A1 and A3 are a part of one side of the rectangle.
  • the graphic condition determination unit 5 When the target graphic is the quadrangle shown in FIG. 3, when the graphic condition determination unit 5 counts the line segments A1 to A3 arranged on the same straight line into one segment, the minimum and maximum values of the number of segments are obtained. Both values are four. In this case, the operator may set the graphic condition 4 that the minimum value and the maximum value of the number of segments are four. This is consistent with the general knowledge that the number of sides of a quadrangle is four, so that the operator can easily set parameters.
  • the graphic condition 5 is a condition that the number of components constituting the graphic to be determined is within a specified range.
  • the component in the present embodiment is a collection of segments that are directly or indirectly connected.
  • the fact that the first segment and the second segment are directly connected means that the first segment and the second segment are in contact.
  • the fact that the first segment and the second segment are indirectly connected means that the first segment and the directly connected segment are traced. It means to reach the second segment.
  • FIG. 4 is a diagram for explaining the number of components of the graphic condition.
  • FIG. 4 shows an example of a graphic intended by the operator.
  • the line segment B1 and the line segment B2 are directly connected, and the line segment B2 and the line segment B3 are directly connected.
  • the line segment B1 and the line segment B3 are indirectly connected. Further, the line segment B4 is not connected to any line segment. From the above, the figure shown in FIG. 4 includes the three components of line segments B1 to B3 and the component of one of line segments B4, so the number of components of the figure shown in FIG.
  • the parameters of figure condition 5 are the minimum and maximum values of the number of components.
  • the condition editing unit 13 sets the minimum and maximum values of the number of components instructed by the operator to the graphic condition storage unit 3. To store.
  • the graphic condition determining unit 5 first calculates the number of components of the graphic to be determined. Further, the graphic condition determination unit 5 compares the calculated number of components with the minimum value and the maximum value of the number of components stored in the graphic condition storage unit 3. If the calculated number of components is equal to or greater than the minimum value and equal to or less than the maximum value, the graphic condition determination unit 5 determines that the graphic condition 5 is satisfied. On the other hand, when the calculated number of components is smaller than the minimum value or larger than the maximum value, the graphic condition determination unit 5 determines that the graphic condition 5 is not satisfied.
  • the graphic condition 6 is a condition that the graphic to be determined does not have a branch.
  • the graphic condition determination unit 5 determines whether or not three or more end points are the same with respect to the end points of the segments constituting the graphic to be determined. This graphic condition 6 does not include a parameter.
  • the graphic condition determining unit 5 determines whether all the end points in the segment constituting the graphic to be determined are the same as the other end points. The graphic condition determination unit 5 determines that the graphic condition 6 is satisfied if there is no end point determined to be the same as the other two or more end points. On the other hand, the graphic condition determination unit 5 determines that the graphic condition 6 is not satisfied if there is at least one end point determined to be the same as the other two or more end points.
  • the graphic condition 7 is a condition that the graphic to be determined is composed of one or a plurality of closed loops. This graphic condition 7 does not include a parameter.
  • the graphic condition determining unit 5 operates according to the flowchart shown in FIG. 5 below when determining the graphic condition 7 in step S50.
  • FIG. 5 is a flowchart showing the processing procedure of the closed loop determination.
  • the graphic condition determination unit 5 determines whether or not the graphic to be determined has a branch in step S100. Specifically, the graphic condition determination unit 5 determines whether the graphic condition 6, that is, the condition of having no branch is satisfied.
  • step S100 If the figure to be determined has a branch, that is, if Yes in step S100, the figure condition determining unit 5 determines in step S192 that the figure condition 7 is not satisfied. Then, the graphic condition determination unit 5 returns information indicating “false”, which is a determination result indicating that the graphic condition 7 is not satisfied, to the target graphic candidate generation unit 7. Then, the graphic condition determination unit 5 ends the determination process.
  • the graphic condition determination unit 5 determines whether or not an undetermined segment remains in the graphic to be determined in step S110. To do. At this time, the graphic condition determination unit 5 regards a segment that has not been visited as an undetermined segment.
  • the graphic condition judging unit 5 is undetermined in step S120, that is, any undecided segment from unvisited segments. And start with the selected segment and follow the adjacent segments in one direction. At this time, the graphic condition determination unit 5 keeps a record of the segments that have been traced, that is, visited. Then, in step S130, the graphic condition determination unit 5 determines whether or not the original segment at the beginning of tracing has been returned.
  • the graphic condition determination unit 5 When returning to the original segment, that is, in the case of Yes in step S130, the graphic condition determination unit 5 performs the processing of steps S110 to S130. Then, in the case of No in step S130, that is, when there is no adjacent segment without returning to the original segment, the graphic condition determination unit 5 determines in step S192 that the graphic condition 7 is not satisfied. To do. Then, the graphic condition determination unit 5 returns information indicating “false”, which is a determination result indicating that the graphic condition 7 is not satisfied, to the target graphic candidate generation unit 7. Then, the graphic condition determination unit 5 ends the determination process.
  • step S110 determines that the graphic condition 7 is satisfied in step S191. Then, the graphic condition determination unit 5 returns information indicating “true”, which is a determination result indicating that the graphic condition 7 is satisfied, to the target graphic candidate generation unit 7. Then, the graphic condition determination unit 5 ends the determination process.
  • the graphic condition 8 is a condition that the graphic to be determined does not have a branch and does not have a continuous line that is a closed loop. This graphic condition 8 does not include a parameter.
  • the graphic condition determination unit 5 operates according to the flowchart shown in FIG. 6 below when determining the graphic condition 8 in step S50.
  • FIG. 6 is a flowchart showing a processing procedure for continuous line determination.
  • the flowchart of FIG. 6 differs from the flowchart of FIG. 5 in step S130 and step S230.
  • the graphic condition determining unit 5 starts determining the graphic condition 8
  • the graphic condition determining unit 5 determines whether or not the graphic to be determined has a branch in step S200. If the graphic to be determined has a branch, that is, if Yes in step S200, the graphic condition determining unit 5 determines in step S292 that the graphic condition 8 is not satisfied. Then, the graphic condition determination unit 5 ends the determination process.
  • the graphic condition determination unit 5 determines whether or not an undetermined segment remains in the graphic to be determined in step S210. To do. At this time, the graphic condition determination unit 5 regards a segment that has not been visited as an undetermined segment.
  • the graphic condition determination unit 5 is undetermined in step S220, that is, an arbitrary undetermined segment from unvisited segments. And start with the selected segment and follow the adjacent segments in one direction. At this time, the graphic condition determination unit 5 keeps a record of the segments that have been traced, that is, visited. Then, in step S230, the graphic condition determination unit 5 determines whether or not the original segment that has started to be traced has been returned.
  • the graphic condition determination unit 5 When there is no adjacent segment without returning to the original segment, that is, in the case of No in step S230, the graphic condition determination unit 5 performs the processing of steps S210 to S230. Then, in the case of Yes in step S230, that is, when returning to the original segment, the graphic condition determination unit 5 determines in step S292 that the graphic condition 8 is not satisfied. Then, the graphic condition determination unit 5 ends the determination process.
  • step S210 determines that the graphic condition 8 is satisfied in step S291. Then, the graphic condition determination unit 5 ends the determination process.
  • the graphic condition 9 is a condition that the graphic to be determined is composed of two closed loops, and one closed loop includes the other closed loop. This graphic condition 9 does not include a parameter.
  • the graphic condition determining unit 5 first determines whether or not the graphic condition 7, that is, the condition that the graphic is configured in a closed loop is satisfied.
  • the graphic condition determination unit 5 determines that the graphic condition 9 is not satisfied, and ends the determination process. On the other hand, when the figure is configured in a closed loop, the figure condition determination unit 5 determines that the figure condition 9 is satisfied, and proceeds to the condition determination process for the number of components.
  • the graphic condition determination unit 5 determines whether or not the number of components is two or more and two or less based on the graphic condition 5 that is a condition for the number of components. If the number of components is not less than 2 and not less than 2, the graphic condition determination unit 5 determines that the graphic condition 9 is not satisfied and ends the determination process. On the other hand, when the number of components is two or more and two or less, the graphic condition determination unit 5 determines that the graphic condition 9 is satisfied, and proceeds to the inclusion relationship confirmation process.
  • the graphic condition determination unit 5 knows that the graphic to be determined is composed of two closed loops. In the inclusion relationship confirmation process, the graphic condition determination unit 5 determines whether one closed loop includes the other closed loop for two closed loops.
  • the graphic condition determination unit 5 selects one of the two closed loops, assumes a closed loop that includes the selected closed loop, and assumes that the other closed loop is a closed loop that is included. Then, the graphic condition determination unit 5 determines whether or not all segments of the included closed loop are included in the included closed loop.
  • the graphic condition determining unit 5 determines that the graphic condition 9 is satisfied if all the included segments are included in the included side. On the other hand, if the graphic condition determination unit 5 is not included in the side included in any of the segments, the graphic condition determination unit 5 switches the inclusion side closed loop and the included side closed loop to the first time. The second inclusion determination is performed in the same manner as described above. If the result of the second inclusion determination performed by replacing the closed loop is included in the included side in all the included segments, the graphic condition determination unit 5 satisfies the graphic condition 9. It is determined that On the other hand, the graphic condition determination unit 5 determines that the graphic condition 9 is not satisfied if the result of the second inclusion determination is that the segment is not included in any segment.
  • the graphic condition 10 is a condition that the graphic to be determined is an externally closed graphic. This graphic condition 10 does not include a parameter.
  • the outer closed figure is a closed figure having the outermost contour including all the inner closed figures in the entire closed figure formed by combining a plurality of adjacent closed figures. When the closed figure is not a whole closed figure formed by combining a plurality of adjacent closed figures but a single closed figure, this single closed figure becomes an outer closed figure.
  • step S50 before determining the graphic condition 10, the graphic condition determining unit 5 extracts a segment that satisfies the segment condition. Then, the graphic condition determination unit 5 extracts all the outer closed closed figures from the extracted segment set.
  • the graphic condition determination unit 5 uses a method of viewing the direction of turning the segment in the method disclosed in Japanese Patent No. 2942681 when extracting the outer closed closed graphic. Note that the graphic condition determination unit 5 may extract the outer closed graphic by other methods.
  • the graphic condition determination unit 5 searches for the same graphic as the graphic to be determined from the extracted outer closed closed graphic. The graphic condition determination unit 5 determines that the graphic condition 10 is satisfied when the same graphic is found, and determines that the graphic condition 10 is not satisfied when the same graphic is not found.
  • the graphic condition 11 is a condition that the graphic to be determined is an inward closed graphic. This graphic condition 11 does not include a parameter.
  • the inwardly closed figure is a closed figure in which a plurality of adjacent closed figures are not combined when viewed from the inside.
  • step S50 before determining the graphic condition 11, the graphic condition determining unit 5 extracts a segment that satisfies the segment condition. Then, the graphic condition determination unit 5 extracts all the inner closed closed figures from the extracted set of segments.
  • the graphic condition determination unit 5 uses a method of viewing the direction of turning the segment in the method disclosed in Japanese Patent No. 2942681 when extracting the inward closed graphic. In the method of Japanese Patent No. 2942681, a closed figure whose direction around a segment is opposite to that of the outer closed figure is an inner closed figure.
  • the graphic condition determination unit 5 may extract the inner closed graphic by other methods.
  • the graphic condition determination unit 5 searches for the same graphic as the graphic to be determined from the extracted inner closed graphic. The graphic condition determination unit 5 determines that the graphic condition 11 is satisfied when the same graphic is found, and determines that the graphic condition 11 is not satisfied when the same graphic is not found.
  • the graphic condition 12 is a condition that each segment of the graphic to be determined is smoothly connected.
  • the graphic condition 12 is a condition that a curve representing a graphic to be determined can be differentiated n times.
  • n is a natural number larger than the reference value.
  • the parameter of the graphic condition 12 is the number of differentiable times.
  • the condition editing unit 13 sets the number of differentiable numbers instructed by the operator to the graphic condition storage unit. 3 is stored.
  • the graphic condition determination unit 5 determines the graphic condition 12 in step S50, the graphic condition determination unit 5 first stores all the segments constituting the graphic to be determined in the graphic condition storage unit 3. It is determined whether or not differentiation is possible for a certain number of differentiable times.
  • the graphic condition determination unit 5 is capable of differentiating the number of differentiable times stored in the graphic condition storage unit 3 for all connection points where the two segments constituting the graphic to be determined are connected. Determine whether or not.
  • the graphic condition determining unit 5 determines that the graphic condition 12 is satisfied. On the other hand, if any segment cannot be differentiated or cannot be differentiated at any connection point, the figure condition determining unit 5 determines that the figure condition 12 is not satisfied.
  • the graphic condition determination unit 5 determines whether or not all segments constituting the graphic to be determined can be differentiated once and between these segments. It is determined whether or not the tangent vectors of the segments match at all connection points.
  • the graphic condition 13 is a condition that the graphic to be determined has mirror image symmetry.
  • the parameter of the graphic condition 13 is a symmetry axis of the graphic, but the operator may not set the parameter of the graphic condition 13.
  • step S ⁇ b> 40 when the operator adds the graphic condition 13, changes the parameters of the graphic condition 13, or the operator instructs, the condition editing unit 13 stores the symmetry axis in the graphic condition storage unit 3. To do.
  • the segment designation unit 18 designates the symmetry axis by designating the line segment included in the drawing data storage unit 2 in accordance with an instruction from the worker.
  • the graphic selection device 101 may allow a worker to input a definition of a straight line as a numerical value, and specify a symmetry axis by the definition of the straight line.
  • the graphic condition determination unit 5 operates according to the flowchart shown in FIG. 7 below when determining the graphic condition 13 in step S50.
  • FIG. 7 is a flowchart showing a processing procedure for mirror image symmetry determination.
  • step S300 the figure condition determination unit 5 determines that the mirror image symmetric segment with respect to the symmetry axis stored in the figure condition storage unit 3 is present in step S350. Determine if it exists. At this time, the graphic condition determination unit 5 determines whether or not each segment constituting the graphic to be determined is mirror image symmetric one by one.
  • the graphic condition determination unit 5 sequentially compares the segment being determined with all the other segments constituting the graphic to be determined.
  • the graphic condition determination unit 5 records a portion that is mirror-image symmetric with respect to the segment being determined.
  • the graphic condition determination unit 5 performs all comparisons with segments other than the segment being determined.
  • the graphic condition determination unit 5 determines whether or not a segment having mirror image symmetry is found in the recording for the entire segment being determined. If found, the graphic condition determination unit 5 determines that there is a mirror-symmetric part in the segment being determined. On the other hand, when there is a part that cannot be found, the graphic condition determination unit 5 determines that there is no mirror-symmetric part in the segment being determined.
  • the graphic condition determination unit 5 determines whether or not there is a mirror-symmetric part for all segments constituting the graphic to be determined. If the graphic condition determining unit 5 determines that there are mirror-symmetric portions with respect to all the segments constituting the graphic to be determined, that is, if YES in step S350, the graphic condition determining unit 5 determines the mirror image symmetry in step S391. The determination result of having a certain opposite polarity is sent to the target graphic candidate generation unit 7. Specifically, the graphic condition determination unit 5 sends “true” information, which is a determination result that the graphic condition 13 is satisfied, to the target graphic candidate generation unit 7. Then, the graphic condition determination unit 5 ends the determination process as to whether or not the graphic satisfies the graphic condition 13.
  • step S350 that is, when the graphic condition determining unit 5 determines that there is no mirror-symmetric part with respect to any segment constituting the graphic to be determined
  • the condition determination unit 5 sends a determination result indicating that there is no opposite polarity to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 sends “false” information, which is a determination result that the graphic condition 13 is not satisfied, to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 ends the determination process as to whether or not the graphic satisfies the graphic condition 13.
  • the graphic condition determining unit 5 creates a list of segment pairs using the segments constituting the graphic to be determined in step S310. Specifically, the graphic condition determination unit 5 creates a list including all of the segment pairs corresponding to each combination in order to represent all combinations of segments for the segments constituting the graphic to be determined.
  • the graphic condition determination unit 5 determines whether or not the next segment pair remains in the list in step S320. If the next segment pair remains in the list, that is, if Yes in step S320, the graphic condition determination unit 5 determines in step S330 whether or not the symmetry axis can be calculated from the segment pair.
  • the graphic condition determination unit 5 first selects an arbitrary segment pair from the list. Then, the graphic condition determination unit 5 tries to calculate the symmetry axis when the two segments of the selected segment pair are mirror image symmetric. When the symmetry axis cannot be calculated, that is, when the symmetry axis cannot be found, the graphic condition determination unit 5 deletes the selected segment pair from the list.
  • An example where the symmetry axis cannot be found is when one of the segment pairs is a line segment and the other is an arc.
  • step S340 When the figure condition determination unit 5 can calculate the symmetry axis from the segment pair, that is, in the case of Yes in step S330, in step S340, it is determined whether or not there is a segment that is mirror-image symmetric with respect to the calculated symmetry axis. judge. At this time, the graphic condition determination unit 5 determines, for each of all segments constituting the graphic to be determined, one by one, whether or not there is a segment portion that is mirror-image symmetric with respect to the calculated symmetry axis. The graphic condition determination unit 5 performs mirror image symmetry determination on each segment constituting the graphic with respect to the symmetry axis calculated in step S330 by the same process as in step S350.
  • step S340 determines that there is a mirror-symmetric part with respect to all the segments, that is, if Yes in step S340, it has a counter-polarity that is mirror-image symmetry in step S391.
  • the determination result is sent to the target graphic candidate generation unit 7. Then, the graphic condition determination unit 5 ends the determination process as to whether or not the graphic satisfies the graphic condition 13.
  • step S340 that is, if the graphic condition determining unit 5 determines that there is no mirror-symmetric part with respect to any segment, the graphic condition determining unit 5 selects in step S330. Remove a segment pair from the list. Then, the graphic condition determination unit 5 proceeds to the process of step S320.
  • step S320 the graphic condition determination unit 5 sends a determination result indicating that there is no opposite polarity to the target graphic candidate generation unit 7 in step S392. Then, the graphic condition determination unit 5 ends the determination process as to whether or not the graphic satisfies the graphic condition 13.
  • step S320 determines in step S330 whether or not the symmetry axis can be calculated from the segment pair.
  • step S330 that is, when the symmetry axis cannot be calculated from the segment pair
  • the graphic condition determination unit 5 proceeds to the process of step S320.
  • Yes in step S330 that is, when the symmetry axis can be calculated from the segment pair
  • the graphic condition determination unit 5 determines in step S340 whether or not there is a segment that is mirror-image symmetric with respect to the calculated symmetry axis. judge.
  • step S340 the graphic selection apparatus 101 sends a determination result that the image has symmetry in step S391 to the target graphic candidate generation unit 7, or the determination result that the image selection apparatus 101 does not have mirror image symmetry in step S392.
  • the processes in steps S320 to S340 are repeated until the candidate generation unit 7 is sent.
  • the graphic condition 14 is a condition that the graphic to be determined has rotational symmetry.
  • the rotation condition in the present embodiment is assumed to be a condition consisting of the rotation center, the rotation angle, and the number of repetitions.
  • the parameter of the graphic condition 14 is a rotation condition, but the operator can select whether or not to set this parameter. The operator must set all three items of the rotation condition when setting the parameters. On the other hand, if the parameter is not set, the operator must leave all items of the rotation condition unset. The operator sets the rotation condition by inputting the rotation condition to the input device 22.
  • the operator sets a numerical value for the number of repetitions among the three items of the rotation condition. Specify directly.
  • the operator sets the rotation center by the coordinate value of the rotation center, and sets the rotation angle by the numerical value of the rotation angle.
  • the operator may set the rotation center and the rotation angle by designating two segments included in the drawing data storage unit 2 by the segment designation unit 18.
  • the condition editing unit 13 stores the rotation condition specified by the operator in the graphic condition storage unit 3.
  • FIGS. 8 is a diagram illustrating a first example of the rotation angle
  • FIG. 9 is a diagram illustrating a second example of the rotation angle
  • FIG. 10 is a diagram illustrating a third example of the rotation angle. .
  • the graphic condition determination unit 5 can obtain the rotation center and the rotation angle from the two segments that coincide with each other when rotated.
  • both segments are line segments, there are two possible correspondences between the end points of the line segments, so two rotation centers can be obtained, but the rotation angle has the same value at any rotation center.
  • the drawing information designating unit 14 displays the obtained two rotation centers on the display device 21, so that the worker selects one of the rotation centers.
  • FIG. 8 shows the rotation angle CO1 when the end point C1 of the segment Sc1 and the end point C3 of the segment Sc2 are made to correspond to each other, and the end point C2 of the segment Sc1 and the end point C4 of the segment Sc2 are made to correspond to each other.
  • the straight line CL51 is a vertical bisector of the end points C1 and C3
  • the straight line CL52 is a vertical bisector of the end points C2 and C4.
  • the intersection of straight lines CL51 and CL52 which are vertical bisectors is the rotation center CO1.
  • the rotation angle CR61 is an angle formed by each line segment extending from the rotation center CO1 to the corresponding end point. In FIG. 8, the rotation angle CR61 is indicated by a line segment extending from the rotation center CO1 to the end points C1 and C3.
  • FIG. 9 shows the rotation angle CO2 when the end point C21 of the segment Sc3 and the end point C24 of the segment Sc4 are made to correspond to each other, and the end point C22 of the segment Sc3 and the end point C23 of the segment Sc4 are made to correspond to each other.
  • the straight line CL53 is a vertical bisector of the end point C21 and the end point C24
  • the straight line CL54 is a vertical bisector of the end point C22 and the end point C23.
  • the rotation angle CR62 is an angle formed by each line segment extending from the rotation center CO2 to the corresponding end point.
  • the rotation angle CR62 is indicated by a line segment extending from the rotation center CO2 to the end points C22 and C23.
  • FIG. 10 shows the rotation angle CO3 when the end point C31 of the segment Sc5 and the end point C33 of the segment Sc6 are made to correspond to each other, and the end point C32 of the segment Sc5 and the end point C34 of the segment Sc6 are made to correspond to each other.
  • the straight line CL55 is a vertical bisector of the end point C31 and the end point C33
  • the straight line CL56 is a vertical bisector of the end point C32 and the end point C34.
  • the rotation angle CR63 is an angle formed by each line segment extending from the rotation center CO3 to the corresponding end point. In FIG. 10, the rotation angle CR63 is indicated by a line segment extending from the rotation center CO3 to the end points C31 and C33.
  • the graphic condition determination unit 5 operates according to the flowchart shown in FIG. 11 below when performing rotational symmetry determination that is the graphic condition 14 in step S50 of FIG.
  • FIG. 11 is a flowchart illustrating a processing procedure for determining rotational symmetry.
  • step S400 the graphic condition determination unit 5 determines whether the rotation condition is set based on whether the graphic condition storage unit 3 stores the rotation condition. To do.
  • step S400 the graphic condition determination unit 5 determines whether or not there is a repetitive portion that matches the graphic to be determined if the rotation condition is used in step S450. judge. At this time, the graphic condition determination unit 5 generates a candidate for a repeated portion by combining the segments constituting the graphic to be determined. Then, the graphic condition determination unit 5 duplicates the generated repetition part candidate according to the rotation conditions stored in the graphic condition storage unit 3, that is, the rotation center, the rotation angle, and the number of repetitions. The graphic condition determination unit 5 determines whether or not the duplicated part candidate is a graphic that matches the graphic to be determined.
  • the graphic condition determination unit 5 generates all combinations of segments, and determines whether each generated combination of segments is a rotationally symmetric repeating part. Specifically, the graphic condition determination unit 5 performs combinations of segments constituting the graphic to be determined with brute force and generates all combinations. Each of the generated segment combinations is a candidate for a repeated portion. Next, the graphic condition determination unit 5 generates a graphic by replicating the candidates for each repeated portion according to the rotation condition. This figure is called a duplicated figure. The graphic condition determination unit 5 first duplicates the candidate of the repetitive portion without rotating in order to obtain a duplicated figure. Next, the graphic condition determination unit 5 rotates the candidate for the repeated portion counterclockwise by the rotation angle around the rotation center, and adds the rotated candidate to the graphic of the duplication result.
  • the graphic condition determination unit 5 completes the graphic as a result of duplication so far. If the number of repetitions is 3 times or more, the graphic condition determination unit 5 further rotates the candidate for the repetition part and adds the rotated part to the graphic of the duplication result until the number of repetitions is reached. repeat.
  • the graphic condition determination unit 5 compares the replication result graphic with the graphic to be determined. If the graphic to be determined matches the graphic to be duplicated, the graphic condition determining unit 5 determines that the candidate for the repeated part that is the origin of the graphic to be duplicated is a true repeated part. The graphic condition determination unit 5 determines that the candidate for the repetition part that is the origin of the graphic of the duplication result is not a true repetition part if the graphic to be determined does not match the graphic of the duplication result.
  • step S450 determines in step S491 that The determination result of having rotational symmetry is sent to the target graphic candidate generation unit 7. Specifically, the graphic condition determination unit 5 sends “true” information, which is a determination result that the graphic condition 14 is satisfied, to the target graphic candidate generation unit 7. Then, the graphic condition determination unit 5 ends the determination process as to whether or not the graphic satisfies the graphic condition 14.
  • step S450 that is, when no candidate for a repeated portion that matches the graphic to be determined is found under the rotation condition stored in the graphic condition storage unit 3, the graphic condition determination unit 5 performs step S492.
  • the determination result that there is no rotational symmetry is sent to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 sends “false” information, which is a determination result that the graphic condition 14 is not satisfied, to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 ends the determination process as to whether or not the graphic satisfies the graphic condition 14.
  • the graphic condition determining unit 5 creates a list of segment pairs using the segments constituting the graphic to be determined in step S410. Specifically, the graphic condition determination unit 5 creates a list including all of the segment pairs corresponding to each combination in order to represent all combinations of segments for the segments constituting the graphic to be determined.
  • the graphic condition determination unit 5 determines whether or not the next segment pair remains in the list in step S420. If the next segment pair remains in the list, that is, if Yes in step S420, the graphic condition determination unit 5 determines whether or not the rotation center can be calculated from the segment pair in step S430.
  • the graphic condition determination unit 5 first selects an arbitrary segment pair from the list. Then, the graphic condition determination unit 5 tries to calculate the center of rotation from the two segments of the selected segment pair by the method described with reference to FIGS. If the rotation center cannot be calculated, that is, if the rotation center cannot be found, the graphic condition determination unit 5 deletes the selected segment pair from the list.
  • An example where the center of rotation cannot be found is when one of the segment pairs is a line segment and the other is an arc.
  • the graphic condition determination unit 5 can calculate the rotation center from the segment pair, that is, if Yes in step S430, the graphic condition determination unit 5 matches the graphic to be determined if the rotation condition is used in step S440. It is determined whether or not there is a repeated part.
  • the graphic condition determination unit 5 derives the rotation condition from the calculated rotation center. Then, using the derived rotation condition, the graphic condition determination unit 5 determines whether there is a repeated portion that matches the graphic to be determined. When there are two rotation centers calculated in step S430, the graphic condition determination unit 5 repeats the matching determination process twice.
  • the graphic condition determination unit 5 first selects an arbitrary one from the rotation centers calculated in step S430, and obtains the rotation angle from the rotation center by the method described with reference to FIGS. Next, the graphic condition determination unit 5 generates a repetition part candidate by combining all the segments constituting the graphic to be determined in order to search for a repetition part, and matches each repetition part candidate. Make a decision. At this point, the graphic condition determination unit 5 determines the rotation center and the rotation angle among the rotation conditions to be tried. The graphic condition determination unit 5 assumes that the number of repetitions is twice. The graphic condition determination unit 5 obtains a graphic of the duplication result from the rotation condition and the candidate for the repeated part. The specific method for obtaining the copy result figure is the same as in step S450.
  • the graphic condition determination unit 5 compares the graphic of the duplication result with the graphic to be determined when the graphic of the duplication result is completed.
  • the graphic condition determination unit 5 determines that the repeated part candidate that is the origin of the duplicated figure is a true repeated part if the duplicated figure matches the figure to be determined, and that the repeated part has been found. .
  • the graphic condition determination unit 5 suspends the determination when the graphic of the duplication result does not match the graphic to be determined.
  • the graphic condition determining unit 5 changes the number of repetitions with respect to the current repetition portion candidate to generate a copy result graphic, or rejects the current repetition portion candidate and determines the next repetition portion candidate. In order to determine whether or not to move to the determination, the correspondence relationship between the copied graphic segment and the determined graphic segment is examined.
  • the graphic condition determination unit 5 associates the first and second segments on a one-to-one basis, and does not associate another segment with the already associated segment.
  • the graphic condition determination unit 5 tries to associate all the segments constituting the graphic of the duplication result, and there remains a segment of the graphic of the duplication result that could not be associated, the candidate for the current repetition part And proceed to the determination of candidates for the next repeated portion.
  • the graphic condition determination unit 5 determines the graphic to be determined when there is no remaining segment of the graphic of the duplication result that could not be correlated after trying to correlate all the segments constituting the graphic of the duplication result. It is determined that there is an uncorrelated segment. In this case, the graphic condition determination unit 5 repeats the processing from duplication to association, assuming that the number of repetitions is increased by 1 and is 3 times.
  • the graphic condition determination unit 5 increases the number of duplicated segments every time the number of repetitions is increased by one. Accordingly, when the graphic condition determination unit 5 increases the number of repetitions by one, the graphic determined as the copy result graphic may coincide with some number of times. In this case, the graphic condition determination unit 5 determines that a repeated portion has been found.
  • the graphic condition determination unit 5 determines that no repeated portion has been found.
  • step S440 that is, in the case where at least one candidate for a repeated portion that matches the figure to be determined is found under the rotation condition based on the rotation center calculated in step S430, the graphic condition determination unit 5 performs step S491.
  • the determination result of having rotational symmetry is sent to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 ends the determination process as to whether or not the graphic satisfies the graphic condition 14.
  • step S440 that is, when no candidate for a repeated portion that matches the graphic to be determined is found under the rotation condition based on the rotation center calculated in step S430, the graphic condition determination unit 5 The process proceeds to step S420.
  • the graphic selection device 101 may allow the operator to set only one item or only two items among the three items of the rotation condition.
  • the figure condition determination unit 5 sets the item setting value for the item set by the operator among the three items of the rotation condition at the time of duplication immediately before the condition to proceed from step S440 to step S491. Add the condition that it matches.
  • the graphic condition determination unit 5 determines that the graphic condition 14 is satisfied only when it has rotational symmetry in a form that satisfies the settings partially made by the operator.
  • step S420 the graphic condition determination unit 5 sends a determination result that there is no rotational symmetry to the target graphic candidate generation unit 7 in step S492. . Then, the graphic condition determination unit 5 ends the determination process as to whether or not the graphic satisfies the graphic condition 14.
  • step S420 determines whether or not the rotation center has been calculated from the segment pair in step S430.
  • step S430 determines whether the rotation center cannot be calculated from the segment pair. If No in step S430, that is, if the rotation center cannot be calculated from the segment pair, the graphic condition determination unit 5 proceeds to the process of step S420. If Yes in step S430, that is, if the rotation axis can be calculated from the segment pair, the graphic condition determination unit 5 proceeds to the process of step S440.
  • step S440 the graphic selection apparatus 101 sends a determination result that the object has the rotational symmetry in step S491 to the target graphic candidate generation unit 7, or the determination result that the graphic selection apparatus 101 does not have the rotational symmetry in step S492.
  • the processes in steps S420 to S440 are repeated until the candidate generation unit 7 is sent.
  • the graphic condition 15 is a condition that the graphic to be determined has translational symmetry. It is assumed that the translation condition in the present embodiment is a condition composed of two of a translation vector and the number of repetitions.
  • the parameter of the graphic condition 15 is a translation condition, but the operator can select whether or not to set this parameter. When setting parameters, the operator must set all two items of translation conditions. On the other hand, when the parameter is not set, the operator must leave all items unset. The operator sets the translation condition by inputting the translation condition to the input device 22.
  • step S40 of FIG. 2 when the worker performs setting or designation, the input device 22 receives an instruction from the worker.
  • the worker when a worker sets a new parameter or changes a parameter that has already been set, the worker directly designates the number of repetitions of the two items of the translation condition as a numerical value.
  • the operator sets the translation vector by setting the element value of the translation vector as a numerical value or by specifying two segments included in the drawing data storage unit 2 by the segment specifying unit 18.
  • the condition editing unit 13 stores the translation condition designated by the operator in the graphic condition storage unit 3. From the two segments that coincide with the translation, a translation vector as shown in FIG. 12 or FIG. 13 can be obtained.
  • a vector from the midpoint of both end points of one of the two segments to the midpoint of the end points of the other segment is defined as a translation vector.
  • the condition editing unit 13 or the operator arbitrarily determines which segment is to be the starting point of the translation vector.
  • FIG. 12 is a diagram for explaining a first translation vector calculation method
  • FIG. 13 is a diagram for explaining a second translation vector calculation method.
  • FIG. 12 shows a translation vector D1 obtained from the segments Sd1 and Sd2 of two line segments.
  • FIG. 13 shows a translation vector D2 obtained from two arc segments Sd3 and Sd4.
  • FIG. 14 is a flowchart showing a translation symmetry determination processing procedure.
  • the graphic condition determination unit 5 starts determining the graphic condition 15, in step S500, the graphic condition determination unit 5 determines whether or not the translation condition is set based on whether or not the translation condition is stored in the graphic condition storage unit 3. To do.
  • the graphic condition determination unit 5 determines whether or not there is a repeated portion that matches the graphic to be determined if the translation condition is used in step S550. judge. At this time, the graphic condition determination unit 5 generates a candidate for a repeated portion by combining the segments constituting the graphic to be determined. Then, the graphic condition determination unit 5 duplicates the generated repetition part candidate according to the translation condition stored in the graphic condition storage unit 3, that is, the translation vector and the number of repetitions. The graphic condition determination unit 5 determines whether or not the duplicated part candidate is a graphic that matches the graphic to be determined.
  • the graphic condition determination unit 5 performs the combination of segments for generating the candidate for the repeated portion with the brute force of the segments constituting the graphic to be determined, and generates all combinations. Each of the generated segment combinations is a candidate for a repeated portion. Next, the graphic condition determination unit 5 generates a graphic by replicating the candidates for each repeated portion according to the translation condition. This figure is called a duplicated figure.
  • the graphic condition determination unit 5 first duplicates the repetitive portion with the original position in order to obtain a graphic as a duplication result. Next, the graphic condition determination unit 5 translates the repetitive part by the translation vector, and adds the translated part to the duplicate result graphic.
  • the graphic condition determination unit 5 completes the graphic as a result of duplication so far. If the number of repetitions is 3 or more, the graphic condition determination unit 5 further translates the repetitive part, and further adds the translated part to the graphic of the duplication result until the number of repetitions is reached. repeat.
  • the graphic condition determination unit 5 compares the graphic of the duplication result with the graphic to be determined when the graphic of the duplication result is completed. The graphic condition determination unit 5 determines that the candidate for the repetition part that is the origin of the graphic of the duplication result is a true repetition part if the graphic to be determined matches the graphic of the duplication result. The graphic condition determination unit 5 determines that the candidate for the repeated portion that is the origin of the copied graphic is not a true repeated portion if the graphic to be determined does not match the graphic to be copied.
  • step S550 that is, when at least one candidate for a repeated portion that matches the graphic to be determined is found under the translation condition stored in the graphic condition storage unit 3, the graphic condition determination unit 5 determines in step S591.
  • the determination result that translational symmetry is present is sent to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 sends “true” information, which is a determination result that the graphic condition 15 is satisfied, to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 ends the determination process of whether or not the graphic satisfies the graphic condition 15.
  • step S550 that is, when no candidate for a repeated portion that matches the graphic to be determined is found under the translation condition stored in the graphic condition storage unit 3, the graphic condition determination unit 5 performs step S592.
  • the determination result that there is no translational symmetry is sent to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 sends “false” information, which is a determination result that the graphic condition 15 is not satisfied, to the target graphic candidate generation unit 7.
  • the graphic condition determination unit 5 ends the determination process of whether or not the graphic satisfies the graphic condition 15.
  • the graphic condition determination unit 5 creates a list of segment pairs using the segments constituting the graphic to be determined in step S510. Specifically, the graphic condition determination unit 5 creates a list including all of the segment pairs corresponding to each combination in order to represent all combinations of segments for the segments constituting the graphic to be determined.
  • the graphic condition determination unit 5 determines whether or not the next segment pair remains in the list in step S520. If the next segment pair remains in the list, that is, if Yes in step S520, the graphic condition determination unit 5 determines in step S530 whether or not a translation vector has been calculated from the segment pair.
  • the graphic condition determination unit 5 first selects an arbitrary segment pair from the list. Then, the graphic condition determination unit 5 tries to calculate a translation vector from the two segments of the selected segment pair by the method described with reference to FIGS. When the translation condition cannot be calculated, that is, when the translation vector cannot be found, the graphic condition determination unit 5 deletes the selected segment pair from the list.
  • An example where the translation vector cannot be found is when one of the segment pairs is a line segment and the other is an arc.
  • step S530 If the translation condition vector can be calculated from the segment pair, that is, if Yes in step S530, the graphics condition judgment unit 5 matches the figure to be judged if the translation vector is used in step S540. It is determined whether or not there is a repeated part.
  • the graphic condition determination unit 5 derives a translation condition from the calculated translation vector. Then, using the derived translation condition, the graphic condition determination unit 5 determines whether there is a repeated portion that matches the graphic to be determined. In order to search for a repeated part, the graphic condition determining unit 5 generates a candidate for the repeated part in a brute force manner and performs a match determination for each candidate for the repeated part.
  • the graphic condition determination unit 5 uses the translation vector calculated in step S530 when performing the coincidence determination. At this time, the graphic condition determination unit 5 assumes that the number of repetitions is twice. The figure condition determining unit 5 obtains a figure as a result of duplicating the candidate for the repeated portion according to the translation condition. The specific method of obtaining the copied figure is the same as in step S550. The graphic condition determination unit 5 compares the graphic of the duplication result with the graphic to be determined when the graphic of the duplication result is completed. If the graphic to be determined matches the graphic to be duplicated, the graphic condition determination unit 5 determines that the candidate for the repeated part that is the original of the graphic to be copied is a true repeated part and that the repeated part has been found.
  • the graphic condition determination unit 5 suspends the determination when the graphic to be determined does not match the graphic to be copied. Then, the graphic condition determining unit 5 changes the number of repetitions with respect to the current repetition portion candidate to generate a copy result graphic, or rejects the current repetition portion candidate and determines the next repetition portion candidate. In order to determine whether or not to move to the determination, the correspondence relationship between the copied graphic segment and the determined graphic segment is examined.
  • the graphic condition determination unit 5 associates the first and second segments on a one-to-one basis, and does not associate another segment with the already associated segment.
  • the graphic condition determination unit 5 tries to associate all the segments constituting the graphic of the duplication result, and there remains a segment of the graphic of the duplication result that could not be associated, the candidate for the current repetition part And proceed to the determination of candidates for the next repeated portion.
  • the graphic condition determination unit 5 determines the graphic to be determined when there is no remaining segment of the graphic of the duplication result that could not be correlated after trying to correlate all the segments constituting the graphic of the duplication result. It is determined that there is an uncorrelated segment. In this case, the graphic condition determination unit 5 repeats the processing from duplication to association, assuming that the number of repetitions is increased by 1 and is 3 times.
  • the graphic condition determination unit 5 increases the number of duplicated segments every time the number of repetitions is increased by one. Accordingly, when the graphic condition determination unit 5 increases the number of repetitions by one, the graphic determined as the copy result graphic may coincide with some number of times. In this case, the graphic condition determination unit 5 determines that a repeated portion has been found.
  • the graphic condition determination unit 5 determines that no repeated portion has been found.
  • step S540 that is, in the case where even one candidate for a repeated portion that matches the graphic to be determined is found under the translation condition based on the translation vector calculated in step S530, the graphic condition determination unit 5 performs step S591. , The determination result of translational symmetry is sent to the target graphic candidate generation unit 7. Then, the graphic condition determination unit 5 ends the determination process of whether or not the graphic satisfies the graphic condition 15.
  • step S540 that is, when no candidate for a repeated portion that matches the graphic to be determined is found under the translation condition based on the translation vector calculated in step S530, the graphic condition determination unit 5 The process proceeds to step S520.
  • the graphic selection device 101 may allow the operator to set only one item out of the two items of the translation condition.
  • the figure condition determination unit 5 sets the item setting value for the item set by the operator among the two items of the translation condition when the replication is performed immediately before, based on the condition for proceeding from step S540 to step S591. Add the condition that it matches.
  • the graphic condition determination unit 5 determines that the graphic condition 15 is satisfied only when it has translational symmetry in a form that satisfies the setting partially made by the operator.
  • step S520 the graphic condition determination unit 5 sends a determination result that there is no translational symmetry to the target graphic candidate generation unit 7 in step S592. . Then, the graphic condition determination unit 5 ends the determination process of whether or not the graphic satisfies the graphic condition 15.
  • step S520 determines in step S530 whether or not a translation vector has been calculated from the segment pair.
  • step S530 that is, when the translation vector cannot be calculated from the segment pair, the graphic condition determination unit 5 proceeds to the process of step S520. If Yes in step S530, that is, if a translation vector can be calculated from the segment pair, the graphic condition determination unit 5 proceeds to the process of step S540.
  • step S540 the graphic selection apparatus 101 sends a determination result that the translational symmetry is present in step S591 to the target graphic candidate generation unit 7, or a determination result that the translational symmetry is not present in step S592
  • the processes in steps S520 to S540 are repeated until the candidate generation unit 7 is sent.
  • the graphic condition 16 is a condition that a specific segment stored in the drawing data storage unit 2 exists among the segments constituting the graphic to be determined.
  • the parameter of the graphic condition 16 is a list of segment numbers of the segments that need to exist in the segments constituting the graphic to be determined.
  • step S40 of FIG. 2 when the worker performs setting or designation, the input device 22 receives an instruction from the worker.
  • the worker uses the segment specifying unit 18 to specify one or more segments.
  • the condition editing unit 13 stores the segment number of the designated segment in the graphic condition storage unit 3 as a list.
  • step S50 the graphic condition determination unit 5 determines the graphic condition 16.
  • the graphic condition determination unit 5 confirms whether or not all the segment numbers in the list stored in the graphic condition storage unit 3 are present among the segment numbers of the segments constituting the graphic to be determined. .
  • the graphic condition determination unit 5 determines that the graphic condition 16 is satisfied if all the segment numbers exist, and determines that the graphic condition 16 is not satisfied if any segment number does not exist. To do.
  • the graphic condition 17 is a condition of the geometric relationship between the graphic to be determined and the designated point. There are two parameters for the graphic condition 17: the designated point and the type of geometric relationship. There are two types of geometric relationships: the figure to be judged “includes” the designated point and the figure to be judged “does not contain” the designated point.
  • step S40 of FIG. 2 when the worker performs setting or designation, the input device 22 receives an instruction from the worker.
  • the condition editing unit 13 stores the point specified by the operator and the type of geometric relationship in the graphic condition storage. Store in part 3.
  • the operator uses the point specifying unit 16 when specifying points.
  • step S50 when determining the graphic condition 17, the graphic condition determining unit 5 first determines whether or not the graphic to be determined is a closed graphic. If it is not a closed graphic, the graphic condition determination unit 5 determines that the graphic condition 17 is not satisfied and ends the process. On the other hand, in the case of a closed graphic, the graphic condition determination unit 5 proceeds to the internal / external relationship determination processing.
  • the graphic condition determination unit 5 knows that the graphic to be determined at this time is a closed graphic, by determining the internal / external relationship between the closed graphic and the point, the inside and outside of the graphic determined by the specified point It is determined whether or not.
  • the graphic condition determination unit 5 determines that the graphic condition 17 is satisfied if the specified point is inside the graphic to be determined when the type of the geometric relationship is “includes”, and the graphic that the specified point determines If it is outside, it is determined that the graphic condition 17 is not satisfied.
  • the graphic condition determination unit 5 determines that the graphic condition 17 is satisfied if the specified point is outside the graphic to be determined when the type of geometric relationship is “not included”, and the specified point is satisfied. If it is inside the graphic to be determined, it is determined that the graphic condition 17 is not satisfied.
  • the graphic condition 18 is a condition of the geometric relationship between the graphic to be determined and the designated closed graphic. There are two parameters for the graphic condition 18: the designated closed graphic and the type of geometric relationship.
  • the type of geometric relationship is that the relationship between the graphic to be determined and the specified closed graphic is “intersect” and “does not intersect”, and the graphic to be determined is “included” and “not include” the specified closed graphic Are six types, “included” and “not included” in the designated closed figure.
  • the condition editing unit 13 determines the closed graphic specified by the worker, the type of geometric relationship, Is stored in the graphic condition storage unit 3. The operator uses the closed graphic designating unit 17 when designating the closed graphic.
  • the graphic condition determining unit 5 When determining the graphic condition 18 in step S50 of FIG. 2, the graphic condition determining unit 5 first checks whether or not the graphic to be determined is a closed graphic. If the graphic condition is not a closed graphic, the graphic condition determination unit 5 determines that the graphic condition 18 is not satisfied and ends the process. On the other hand, if it is a closed graphic, the graphic condition determination unit 5 determines that the graphic condition 18 may be satisfied, and proceeds to a Boolean calculation. Since it is known at this point in time that the graphic to be determined is a closed graphic, the graphic condition determination unit 5 determines whether or not the graphic condition 18 is satisfied by performing a Boolean operation between the closed graphics.
  • the graphic condition determination unit 5 performs a Boolean operation on the designated closed graphic stored in the graphic condition storage unit 3 and the graphic to be determined. Perform product operation.
  • the graphic condition determination unit 5 determines that the graphic condition 18 is satisfied if there is a remaining portion in the calculation result, and the calculation result is If there is no remaining part, it is determined that the graphic condition 18 is not satisfied.
  • the graphic condition determination unit 5 determines that the graphic condition 18 is satisfied if there is no remaining portion in the calculation result, and the calculation condition If there is a remaining portion in the result, it is determined that the graphic condition 18 is not satisfied.
  • the graphic condition determination unit 5 performs a Boolean calculation difference operation for subtracting the graphic to be determined from the designated closed graphic stored in the graphic condition storage unit 3. I do.
  • the graphic condition determination unit 5 determines that the graphic condition 18 is satisfied if there is no remaining portion in the calculation result, and the calculation condition If there is a remaining portion in the result, it is determined that the graphic condition 18 is not satisfied.
  • the graphic condition determination unit 5 determines that the graphic condition 18 is satisfied if there is a remaining portion in the calculation result, and the result of the calculation. If there is no remaining portion, the graphic condition 18 is determined not to be satisfied.
  • the graphic condition determination unit 5 performs a Boolean operation of subtracting the designated closed graphic stored in the graphic condition storage unit 3 from the graphic to be determined. Perform the difference operation.
  • the graphic condition determination unit 5 determines that the graphic condition 18 is satisfied if there is no remaining portion in the calculation result, and the calculation If there is a portion remaining in the result of, it is determined that the graphic condition 18 is not satisfied.
  • the graphic condition determination unit 5 determines that the graphic condition 18 is satisfied if there is a remaining portion in the calculation result, and the calculation result If there is no remaining portion, the graphic condition 18 is determined not to be satisfied.
  • the segment condition is a condition that must be satisfied by all the segments constituting the target graphic that the operator is trying to select.
  • the segment conditions of the present embodiment are the following segment conditions 1-7.
  • the segment condition 1 is a condition that the segment to be determined has a designated attribute. Specific examples of attributes are decoration information such as color, line type, and thickness. However, any information may be used as long as it can be assigned to each segment.
  • the parameter of the segment condition is the content of the attribute.
  • the condition editing unit 13 stores the contents of the attribute specified by the operator in the segment condition storage unit 4 when adding the segment condition 1 or changing the parameter of the segment condition 1 in step S40.
  • the segment condition determination unit 6 When determining the segment condition in step S50, the segment condition determination unit 6 extracts all the attributes assigned to the segment from the drawing data storage unit 2 based on the segment number of the segment to be determined. If the extracted attribute has the same attribute as the parameter stored in the segment condition storage unit 4, the segment condition determination unit 6 determines that the segment condition 1 is satisfied. On the other hand, if the extracted attribute does not have the same attribute as the parameter stored in the segment condition storage unit 4, the segment condition determination unit 6 determines that the segment condition 1 is not satisfied.
  • the segment condition 2 is a condition that the curvature of the segment to be determined falls within the specified curvature range.
  • the segment condition 2 parameter is a set of a minimum value and a maximum value of one or more curvatures.
  • the condition editing unit 13 stores one or more pairs of the minimum and maximum curvatures specified by the operator in the segment condition. Stored in part 4.
  • the segment condition determination unit 6 When determining the segment condition in step S50, the segment condition determination unit 6 first calculates the value of the curvature of the segment to be determined. The segment condition determination unit 6 obtains a range that the curvature can take when the curvature of the segment changes continuously. Next, the segment condition determination unit 6 calculates the value of the calculated curvature or the range of the curvature for all the sets of curvature stored in the segment condition storage unit 4 to be not less than the minimum value of the set and not more than the maximum value. Judge whether it fits. The segment condition determination unit 6 determines that the segment condition 2 is satisfied if there is even one set that fits, and determines that the segment condition 2 is not satisfied if there is no set that fits.
  • the operator may add designation of either a line segment or an arc of radius r to segment condition 2 in step S40 of FIG.
  • the segment condition determination unit 6 sets the minimum value to 0 and the maximum value to 0, and the minimum value to 1 / r. Two sets of r and a set whose maximum value is 1 / r are stored in the segment condition storage unit 4.
  • segment condition 3 is a condition that if the segment to be determined is a line segment, the length of the line segment is within a specified range.
  • the parameter of segment condition 3 is a set of a minimum value and a maximum value of one or more lengths.
  • the condition editing unit 13 sets the combination of the minimum value and the maximum value of the length specified by the operator. Are stored in the segment condition storage unit 4.
  • the segment condition determining unit 6 When determining the segment condition 3 in step S50, the segment condition determining unit 6 first determines whether or not the segment is a line segment. The segment condition determination unit 6 determines that the segment condition 3 is satisfied when the segment is not a line segment. On the other hand, when the segment is a line segment, the segment condition determination unit 6 calculates the length of the line segment. Then, the segment condition determination unit 6 determines whether or not the calculated length falls within the minimum value and the maximum value of these sets for all the combinations of lengths stored in the segment condition storage unit 4. judge. The segment condition determination unit 6 determines that the segment condition 3 is satisfied if there is even one set that fits, and determines that the segment condition 3 is not satisfied if there is no set that fits.
  • the segment condition 4 is a condition that if the segment to be determined is an arc, the arc center angle of the arc is within a specified range.
  • the parameter of the segment condition 4 is a set of a minimum value and a maximum value of one or more central angles.
  • the condition editing unit 13 sets the combination of the minimum value and the maximum value of the center angle specified by the operator. Are stored in the segment condition storage unit 4.
  • the segment condition determining unit 6 When determining the segment condition 4 in step S50, the segment condition determining unit 6 first determines whether or not the segment is a curve with a constant curvature. The segment condition determination unit 6 determines that the segment condition 4 is satisfied when the segment is not a curve with a constant curvature. On the other hand, when the segment is a curve with a constant curvature, the segment condition determination unit 6 calculates a central angle when the curve is regarded as an arc. Then, the segment condition determination unit 6 determines whether or not the calculated center angle is within the minimum value and the maximum value of these sets with respect to all the set of center angles stored in the segment condition storage unit 4. judge. The segment condition determination unit 6 determines that the segment condition 4 is satisfied if there is even one set that fits, and determines that the segment condition 4 is not satisfied if there is no set that fits.
  • the segment condition 5 is a condition that an angle formed by a vector tangentially and outwardly at both ends of the segment and an axis vector of the coordinate system is within a specified angle range.
  • the parameter of the segment condition 5 is a set of a minimum value and a maximum value of one or more angles.
  • the condition editing unit 13 sets a pair of the minimum value and the maximum value of the angle specified by the operator.
  • One or more segments are stored in the segment condition storage unit 4.
  • the segment condition determination unit 6 When determining the segment condition in step S50, the segment condition determination unit 6 first calculates a tangential and outward vector at both ends of the segment to be determined. Next, the segment condition determination unit 6 calculates an angle formed with the vector in the positive X-axis direction for each of the two calculated vectors. The angle calculated by the segment condition determination unit 6 will be described with reference to FIGS. 15 and 16.
  • FIG. 15 is a diagram illustrating an angle with respect to a line segment
  • FIG. 16 is a diagram illustrating an angle with respect to an arc segment.
  • FIG. 15 shows angles E11 and E12 calculated by the segment condition determining unit 6 for the segment Se1 of the line segment
  • FIG. 16 shows angles E31 and E32 calculated by the segment condition determining unit 6 for the arc segment Se2. Is shown.
  • the segment condition determination unit 6 determines whether one of the calculated two angles falls within the set of the angles stored in the segment condition storage unit 4 within the minimum value and the maximum value of these sets. Determine whether. The segment condition determination unit 6 determines that one of the two angles is within the specified range if there is even one set that fits.
  • the segment condition determination unit 6 performs the same determination as one of the two angles for the other of the two angles.
  • the segment condition determination unit 6 determines that the segment condition 5 is satisfied when both of the two angles are within the specified range, and if either of the two angles is not within the specified range. Is determined that the segment condition 5 is not satisfied.
  • the segment condition determination unit 6 calculates vectors E1 and E2 that are tangential and outward at both ends of the segment Se1. Then, the segment condition determination unit 6 calculates an angle E11 formed with the vector E3 in the X axis positive direction for the vector E1, and calculates an angle E12 formed with the vector E3 in the X axis positive direction for the vector E2. The segment condition determination unit 6 determines that the segment condition 5 is satisfied when both the calculated angles E11 and E12 are within the specified range.
  • the segment condition determination unit 6 calculates vectors E21 and E22 that are tangential and outward at both ends of the segment Se2.
  • the segment condition determination unit 6 calculates an angle E31 formed with the vector E23 in the X axis positive direction for the vector E21, and calculates an angle E32 formed with the vector E23 in the X axis positive direction for the vector E22.
  • the segment condition determination unit 6 determines that the segment condition 5 is satisfied when both the calculated angles E31 and E32 are within the specified range.
  • the figure selection apparatus 101 uses an arbitrary vector defined by the coordinate system of the drawing as a parameter. It may be settable.
  • segment condition 6 is a condition that the segment to be determined does not belong to the designated layer.
  • the parameter of segment condition 6 is the name of the layer to which the segment does not belong.
  • the worker designates one layer using the layer designating unit 15 when adding the segment condition 6 or changing the parameter of the segment condition 6 in step S40 of FIG.
  • the condition editing unit 13 stores the name of the layer designated by the operator in the segment condition storage unit 4.
  • the segment condition determining unit 6 acquires the name of the layer to which the segment belongs from the drawing data storage unit 2 based on the segment number of the segment to be determined. The segment condition determination unit 6 determines that the segment condition 6 is satisfied if the acquired layer name is different from the layer name stored in the segment condition storage unit 4. On the other hand, the segment condition determination unit 6 determines that the segment condition 6 is not satisfied if the acquired layer name is the same as the layer name stored in the segment condition storage unit 4. Note that the operator may set a plurality of segment conditions 6 having different parameters in order to specify a plurality of layers to which the segment does not belong.
  • segment condition 7 is a condition that the segment to be determined is not a specific segment stored in the drawing data storage unit 2.
  • the parameter of segment condition 7 is a list of segment numbers that should not be applicable.
  • the condition editing unit 13 stores a list of segment numbers of the designated segment in the segment condition storage unit 4.
  • the segment condition determining unit 6 checks whether or not the segment number of the segment to be determined exists in the segment number list of the segment condition storage unit 4. The segment condition determination unit 6 determines that the segment condition 7 is satisfied if the segment number does not exist, and determines that the segment condition 7 is not satisfied if the segment number exists.
  • the figure selection apparatus 101 uses a threshold value when numerical calculation error becomes a problem.
  • the graphic selection device 101 may use a plurality of thresholds such as an angle threshold and a length threshold.
  • the graphic selection device 101 may determine whether or not it is within a range defined by a non-integer value such as the minimum and maximum values of the area of the graphic condition 2. In such a case, even if the figure selection device 101 is below the minimum value or above the maximum value, the figure selection device 101 is within the range if the below or above amount is within the area threshold range. It may be determined that it is within.
  • the graphic selection device 101 may consider that the radii are the same if the difference between the two radii to be compared is within the radius threshold range. The worker may specify these threshold values.
  • the graphic selection device 101 provides a threshold for the positional deviation between the end point of a segment and the end point of another segment under conditions where connection between segments is a problem, such as a condition related to a closed loop or the number of components. May be.
  • the graphic selection device 101 may determine that the segments are connected when the positional deviation is within the threshold. The worker may specify these threshold values.
  • the figure selection device 101 uses a point, a line, a plurality of continuous lines, a free curve drawn with the mouse, a polygon, or a circle instead of the segment number. Inclusion relationships or cross relationships may be used.
  • the graphic selection device 101 develops the graphic condition 18 and includes or intersects a graphic to be determined and any one of a point, a line, a plurality of continuous lines, or a free curve drawn with a mouse. A relationship may be set.
  • the graphic selection device 101 appropriately sets the segment condition or graphic condition, thereby reducing the number of operations and the short operation time even for a graphic other than a closed loop or continuous line. There is an effect that it becomes selectable with.
  • the graphic selection device 101 can reduce individual segment selection operations by appropriately setting segment conditions and graphic conditions. Furthermore, if the number of target graphic candidates generated from the preset conditions is small, the graphic selection device 101 does not need to perform segment selection or parameter adjustment. In this case, the graphic selection device 101 can select the target graphic only by an operation of selecting one graphic from the target graphic candidates.
  • the effect of reducing the number of operations, particularly the effect of reducing the segment selection operation is that when the input device 22 is a device that is difficult to perform fine operations such as a touch panel, the operation time is shortened and the work load of the operator is reduced. Greatly contributes to mitigation.
  • the graphic condition determining unit 5 may determine a graphic using graphic conditions other than the graphic conditions 1 to 18 described above. Further, the segment condition determination unit 6 may determine a figure using a segment condition other than the segment conditions 1 to 7 described above.
  • the graphic selection device 101 since the candidate for the target graphic is generated based on the graphic condition or the segment condition, the graphic selection device 101 cannot be selected by the conventional closed loop selection device and the continuous line selection device. Can be selected with a small number of operations. Further, even when the number of segments or branches existing in the drawing is large, the figure selection device 101 can be operated with a small number of operations by setting a figure condition or a segment condition that matches the nature of the drawing to be input or the nature of the figure to be selected. The target figure can be selected.
  • the graphic selection device 101 can generate a target graphic candidate with a small number of operations for various graphics by combining various graphic conditions and segment conditions. Furthermore, since the operator can flexibly change the graphic condition or the segment condition as appropriate, the graphic selection device 101 can reduce the number of operations after reflecting the knowledge of the operator as needed.
  • the figure selection apparatus 101 can greatly reduce the number of displayed target figure candidates by adding a figure condition or a segment condition using drawing information corresponding to the drawing. Therefore, the graphic selection device 101 can greatly reduce the number of operations for selection.
  • the graphic selection device 101 can generate a target graphic candidate even when the operator does not edit the condition. It is possible to improve the target graphic candidates that the unit 7 regenerates under the updated conditions. In addition, since the graphic selection device 101 automatically sets conditions that can be set based on the previously generated target graphic candidates, the number of operations by the operator can be reduced.
  • FIG. Next, a second embodiment of the present invention will be described with reference to FIGS. 1, 2, and 17 to 21.
  • the graphic selection device 101 since the graphic selection device 101 similar to that in the first embodiment is used, the description of the configuration is omitted.
  • the preset condition storage unit 11 stores a graphic condition 9 suitable for the target graphic. Then, the graphic selection device 101 generates a closed-loop graphic candidate including the closed-loop that is the target graphic based on the graphic condition 9.
  • the graphic selection device 101 stores a closed loop including the closed loop as the graphic condition 9 in the preset condition storage unit 11.
  • the graphic selection device 101 uses this graphic condition 9 to select a pocket processing portion where there is a part to be left in a member to be a part.
  • FIGS. 17 to 21 show parts to be pocket processed.
  • FIG. 17 is a diagram illustrating an example of a drawing input to the graphic selection device in the second exemplary embodiment.
  • Drawing data of drawings 51 to 53 shown in FIG. 17 is drawing data to be read by the drawing data input unit 1 in step S20 of FIG.
  • Drawing 51 shows a plan view of parts to be read by the drawing data input unit 1.
  • the drawing 52 shows a front view of a component to be read by the drawing data input unit 1, and the drawing 53 shows a side view of the component to be read by the drawing data input unit 1.
  • FIG. 18 is a diagram in which components corresponding to the drawing shown in FIG. 17 are viewed obliquely.
  • FIG. 18 shows a perspective view of the component 50 corresponding to FIGS. 19 to 21 show plan views of the component 50 corresponding to the drawings 51 to 53.
  • FIG. 19 is a diagram showing a processing portion intended by the operator for the drawing of FIG. In FIG. 19, the hatched portion indicates the machining location F1 that is intended by the operator.
  • FIG. 20 is a diagram showing a contour graphic intended by the operator for the drawing of FIG. In FIG. 20, the bold line portions indicate contour graphics F2 and F3 that represent the contour of the processing location F1. It is assumed that the contour graphics F2 and F3 are the graphics intended by the operator.
  • FIG. 21 is a diagram showing specific segments designated by the operator for the purpose of excluding selection candidates from the drawing of FIG.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20. Thereafter, in step S30, the preset condition setting unit 12 sets the graphic condition 9 stored in the preset condition storage unit 11 in the graphic condition storage unit 3 in advance.
  • the segment condition 7 is a condition that the segment to be determined is not a specific segment stored in the drawing data storage unit 2.
  • the operator designates the line segment F4 shown in FIG. 21 when setting the segment condition 7 parameters.
  • the target graphic candidate generation unit 7 When the operator finishes editing the segment condition in step S40, the target graphic candidate generation unit 7 generates a target graphic candidate in step S50. Based on the segment condition 7, the target graphic candidate generation unit 7 determines that a segment corresponding to one side of the outermost quadrilateral of the plan view is not used for generating a target graphic candidate. Therefore, the target graphic candidate generation unit 7 does not generate a closed loop from a quadrangle including the line segment F4.
  • the target graphic candidate generation unit 7 stores only the contour graphics F2 and F3, which are target graphic candidates, in the target graphic candidate storage unit 8.
  • the target graphic selection unit 9 causes the display device 21 to display the contour graphics F2 and F3 stored in the target graphic candidate storage unit 8.
  • the display device 21 displays the candidate for the target graphic
  • the operator answers “No” to the question as to whether to generate the candidate for the target graphic again.
  • the input device 22 accepts the answer “No” from the worker in step S70.
  • the worker selects a single candidate for the target graphic.
  • the input device 22 receives an instruction to select a target graphic in step S80.
  • the graphic selection device 101 ends the selection process.
  • the preset condition storage unit 11 stores the graphic condition 9 suitable for the target graphic, so that the operator can perform operations such as a pocket processing place with a small number of operations.
  • a figure representing a closed loop including the closed loop can be selected.
  • Embodiment 3 a third embodiment of the present invention will be described with reference to FIGS. 1, 2, and 22 to 27.
  • FIG. In the third embodiment, since the graphic selection device 101 similar to that in the first embodiment is used, the description of the configuration is omitted.
  • the preset condition storage unit 11 stores graphic conditions 5 and 11 suitable for the target graphic. Then, the graphic selection device 101 generates a candidate for the inner closed graphic that is the target graphic based on the segment conditions 5 and 11.
  • the graphic selection apparatus 101 stores in the preset condition storage unit 11 the inner closed graphic as the graphic condition 11 and the number of components as the graphic condition 5.
  • the graphic selection device 101 sets both the minimum value and the maximum value of the number of components, which are parameters of the graphic condition 5 stored in the preset condition storage unit 11, to “1”.
  • the graphic selection device 101 uses the graphic conditions 5 and 11 to select a pocket processing location.
  • FIG. 22 is a diagram illustrating an example of a drawing input to the graphic selection device in the third exemplary embodiment.
  • the drawing data of drawing 61 shown in FIG. 22 is drawing data to be read by drawing data input unit 1 in step S20 of FIG.
  • Drawing 61 is a front view of components.
  • FIG. 23 is an oblique view of components corresponding to the drawing shown in FIG. In FIG. 23, the figure which looked at the component 60 corresponding to drawing 61 from diagonally is shown.
  • 24 to 27 show front views of the component 60 corresponding to the drawing 61.
  • FIG. FIG. 24 is a diagram showing points designated by the operator with respect to the drawing of FIG.
  • FIG. 25 to FIG. 27 are diagrams showing figures that satisfy the figure conditions of the inner closed figure.
  • FIG. 25 is a diagram showing a contour graphic intended by the operator for the drawing of FIG. In FIG. 25, the figure shown by the bold line shows the outline figure G2 that represents the outline of the machining location. It is assumed that the contour graphic G2 is a graphic intended by the operator.
  • FIG. 26 is a diagram showing a first example of another graphic that satisfies the graphic condition of the inner closed figure
  • FIG. 27 is a diagram showing a second example of another graphic that satisfies the graphic condition of the inner closed graphic.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20. Thereafter, in step S30, the preset condition setting unit 12 sets the graphic conditions 5 and 11 stored in the preset condition storage unit 11 in the graphic condition storage unit 3 in advance.
  • the graphic condition 17 is a condition of the geometric relationship between the graphic to be determined and the designated point.
  • the operator specifies “include” as the type of geometric relationship and further specifies the point G1 shown in FIG.
  • the target graphic candidate generation unit 7 extracts segments that satisfy the segment condition in step S50, as in the first embodiment.
  • the target graphic candidate generation unit 7 does not perform brute force for the combination of segments, which is the method of the first embodiment, for efficiency in generating the target graphic candidates. Instead, the target graphic candidate generation unit 7 generates all graphics that satisfy the graphic condition 11 by the method disclosed in Japanese Patent No. 2942681. Then, the target graphic candidate generating unit 7 determines each generated graphic by the graphic condition determining unit 5, and only the graphic satisfying the graphic condition 17 stored in the graphic condition storage unit 3 is selected as the target graphic candidate storage unit 8. To store.
  • the graphic that satisfies the graphic condition 11 is the contour graphic G2, G3, G4 indicated by bold lines in each of FIGS.
  • the target graphic candidate generation unit 7 stores only the contour graphic G2 which is a target graphic candidate in the target graphic candidate storage unit 8.
  • the target graphic selection unit 9 selects the contour graphic G2 stored in the target graphic candidate storage unit 8 and displays it on the display device 21.
  • the display device 21 displays the candidate for the target graphic
  • the operator answers “No” to the question as to whether to generate the candidate for the target graphic again.
  • the input device 22 accepts the answer “No” from the worker in step S70.
  • the worker selects a single candidate for the target graphic.
  • the input device 22 receives an instruction to select a target graphic in step S80.
  • the graphic selection device 101 ends the selection process.
  • the preset condition storage unit 11 stores the graphic conditions 5 and 11 suitable for the target graphic. It is possible to select a graphic representing a closed inner circuit.
  • Embodiment 4 FIG. Next, a fourth embodiment of the present invention will be described with reference to FIG. 1, FIG. 2, FIG. 28 and FIG.
  • the preset condition storage unit 11 stores graphic conditions 5, 10, and 13 suitable for the target graphic. Then, the graphic selection device 101 generates a candidate for the outer closed graphic that is the target graphic based on the graphic conditions 5, 10, and 13.
  • the graphic selection device 101 stores in the preset condition storage unit 11 an outer closed closed graphic that is the graphic condition 10, a mirror image symmetry that is the graphic condition 13, and the number of components that is the graphic condition 5. Keep it.
  • the graphic selection device 101 sets both the minimum value and the maximum value of the number of components, which are parameters of the graphic condition 5 stored in the preset condition storage unit 11, to “1”.
  • the graphic selection device 101 selects the external shape of a turning part without a hole by using the graphic conditions 5, 10, and 13.
  • FIG. 28 is a diagram illustrating an example of drawing data input to the graphic selection device in the fourth embodiment.
  • FIG. 29 is a diagram for explaining a graphic candidate determination process according to the fourth embodiment. 28 and 29 show a turning part without a hole.
  • FIG. 28 is the drawing data to be read by the drawing data input unit 1 in step S20 of FIG.
  • Drawing 71 is a front view of parts.
  • FIG. 29 is a front view of the component 70 corresponding to the drawing 71.
  • a figure indicated by a bold line is an outline figure H1 representing the outline of the turning part, and this outline figure H1 is a figure intended by the operator.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20. Thereafter, in step S30, the preset condition setting unit 12 sets the graphic conditions 5, 10, and 13 stored in the preset condition storage unit 11 in the graphic condition storage unit 3 in advance.
  • the target graphic candidate generation unit 7 extracts segments that satisfy the segment condition based on the determination result that is the first determination result from the segment condition determination unit 6 in the same manner as in the first embodiment. I do.
  • the target graphic candidate generation unit 7 does not perform brute force for the combination of segments, which is the method of the first embodiment, for efficiency in generating the target graphic candidates. Instead, the target graphic candidate generation unit 7 generates all the graphics that satisfy the graphic condition 10 by the method disclosed in Japanese Patent No. 2942681.
  • the target graphic candidate generation unit 7 determines each generated graphic by the graphic condition determination unit 5, and only the graphic satisfying the graphic condition 13 stored in the graphic condition storage unit 3 is the target graphic candidate storage unit 8. To store.
  • the second determination result which is a determination result of whether or not a graphic satisfies the graphic condition, is acquired from the target graphic candidate generation unit 7 for the graphic condition 10.
  • the information corresponding to the graphic condition 13 is acquired from the graphic condition determination unit 5.
  • the target graphic candidate generation unit 7 stores only the outline graphic H1 which is a target graphic candidate in the target graphic candidate storage unit 8.
  • the target graphic selection unit 9 displays the external graphic H1 stored in the target graphic candidate storage unit 8 on the display device 21.
  • the display device 21 displays the candidate for the target graphic
  • the operator answers “No” to the question as to whether to generate the candidate for the target graphic again.
  • the input device 22 accepts the answer “No” from the worker in step S70.
  • the operator selects the outer shape graphic H1 which is the only candidate for the target graphic.
  • the input device 22 accepts a selection instruction for the external figure H1, which is the target figure.
  • the graphic selection device 101 ends the selection process.
  • the preset condition storage unit 11 stores the graphic conditions 5, 10, and 13 suitable for the target graphic, so that the operator can perform a small number of operations without any holes.
  • An externally closed figure having mirror image symmetry such as the outer shape of a turning part can be selected.
  • Embodiment 5 a fifth embodiment of the present invention will be described with reference to FIG. 1, FIG. 2, FIG. 30, and FIG.
  • the preset condition storage unit 11 stores graphic conditions 1, 5, 7, and 13 suitable for the target graphic.
  • the graphic selection device 101 generates candidates for the outline of the turning part having a hole that is the target graphic, based on the graphic conditions 1, 5, 7, and 13.
  • the graphic selection device 101 stores the closed loop as the graphic condition 7, the mirror image symmetry as the graphic condition 13, the attribute as the graphic condition 1, and the graphic condition 5 in the preset condition storage unit 11. Stores the number of components. Further, the graphic selection device 101 sets hatching to the parameter of the graphic condition 1 stored in the preset condition storage unit 11. In the present embodiment, a case will be described in which the graphic selection apparatus 101 sets “2” for both the minimum value and the maximum value of the number of components that are parameters of the graphic condition 5 stored in the preset condition storage unit 11. . The graphic selection device 101 selects the outer shape of the turning part having a hole by using these graphic conditions 1, 5, 7, and 13.
  • FIG. 30 is a diagram illustrating an example of a drawing input to the graphic selection device in the fifth embodiment.
  • FIG. 31 is a diagram for explaining a graphic candidate determination process according to the fifth embodiment. 30 and 31 show sectional views of a turning part having a hole.
  • FIG. 30 is the drawing data to be read by the drawing data input unit 1 in step S20 of FIG.
  • the hatched part represents the outer shape of the turning part having a hole.
  • FIG. 31 is a cross-sectional view of the component 80 corresponding to the drawing 81, and it is assumed that the bold line portion of the graphic of the component 80 is the graphic intended by the operator.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20. Thereafter, in step S30, the preset condition setting unit 12 sets the graphic conditions 1, 5, 7, and 13 stored in the preset condition storage unit 11 in the graphic condition storage unit 3 in advance.
  • the target graphic candidate generation unit 7 generates a target graphic candidate in step S50.
  • the figure that satisfies the figure condition 1 is only the outline figure I1 corresponding to the outline of the turning part.
  • the outer shape figure I1 satisfies the figure condition 13, the figure condition 7, and the figure condition 5.
  • the target graphic candidate generation unit 7 stores only the external graphic I1 which is a target graphic candidate in the target graphic candidate storage unit 8.
  • the target graphic selection unit 9 causes the display device 21 to display the outer shape graphic I1 stored in the target graphic candidate storage unit 8.
  • the display device 21 displays the candidate for the target graphic
  • the operator answers “No” to the question as to whether to generate the candidate for the target graphic again.
  • the input device 22 accepts the answer “No” from the worker in step S70.
  • the operator selects the external shape graphic I1 which is the only candidate for the target graphic.
  • the input device 22 receives the selection instruction
  • the graphic selection device 101 ends the selection process.
  • the preset condition storage unit 11 stores the graphic conditions 1, 5, 7, and 13 suitable for the target graphic. It is possible to select a graphic representing the outer shape of a turning part having a gap.
  • FIG. 6 a sixth embodiment of the present invention will be described with reference to FIGS. 1, 2, and 32 to 35.
  • the graphic selection device 101 since the graphic selection device 101 similar to that in the first embodiment is used, the description of the configuration is omitted.
  • the preset condition storage unit 11 stores graphic conditions 8 and 15 suitable for the target graphic. Then, the graphic selection device 101 generates a target graphic candidate based on the graphic conditions 8 and 15.
  • the target graphic in the present embodiment is a jumping pattern having translational symmetry such as a groove processing pattern.
  • the graphic selection device 101 stores in the preset condition storage unit 11 no branch and no closed loop as the graphic condition 8 and translational symmetry as the graphic condition 15.
  • the graphic selection device 101 selects a groove processing pattern by using these graphic conditions 8 and 15.
  • FIG. 32 is a diagram illustrating an example of a drawing input to the graphic selection device in the sixth embodiment.
  • FIG. 32 shows a drawing 91 of a part to be grooved.
  • the drawing data of drawing 91 shown in FIG. 32 is drawing data to be read by drawing data input unit 1 in step S20 of FIG.
  • Drawing 91 shown in FIG. 32 is a front view of components.
  • the component shown in FIG. 91 has three grooves 95.
  • FIG. 33 is a diagram showing a target graphic intended by the operator for the drawing of FIG.
  • FIG. 33 shows a target graphic 92 intended by the operator.
  • FIG. 34 is a diagram showing a drawing area designated by the operator for the drawing of FIG.
  • FIG. 35 is a diagram showing segments excluded from the target graphic candidates for the drawing of FIG.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20. Thereafter, in step S30, the preset condition setting unit 12 sets the graphic conditions 8 and 15 stored in the preset condition storage unit 11 in the graphic condition storage unit 3 in advance.
  • the condition editing unit 13 sets “21” to both the minimum value and the maximum value of the number of segments, which are parameters of the graphic condition 4, based on an instruction from the operator.
  • the operator sets the number “21” based on the configuration of the grooves and the number of grooves.
  • each figure J1 is a groove.
  • One groove, which is the graphic J1 is composed of a total of seven arcs including two arcs and five line segments.
  • the arc is a portion that has been cut into an arc shape at the bottom of the groove.
  • the line segments are the chamfered region on the upper side of the groove, the side surface of the groove, and the bottom surface of the groove.
  • the operator When setting the parameters of the segment condition 7, the operator first operates the input device 22 to display a partial graphic 93 as a part of the drawing on the display device 21 as shown in FIG. Suppose. Furthermore, the operator designates all segments that are not within the display range in the segment designation unit 18. As a result, the condition editing unit 13 sets the segment specified by the operator as the parameter of the segment condition 7. With this setting, segments other than the segment that is entirely contained in the partial graphic 93 are not used for generating the target graphic candidates. Specifically, in the partial graphic 94 shown in FIG. 35, the segment J3 indicated by a thick line is not fully displayed on the screen, and therefore is not used when generating a target graphic candidate. Thereby, only the segment which is not thick among the partial figures 94 shown in FIG. 35 will be utilized for the production
  • the target graphic candidate generation unit 7 When the operator finishes editing the preset conditions in step S40, the target graphic candidate generation unit 7 generates a target graphic candidate in step S50.
  • the graphic of the line segment J2 connecting the groove 95 and the groove 95 has a repetition count of two.
  • 16 segments obtained by adding the two line segments and the 14 segments which are the segments of the two grooves 95 are the maximum number of segments corresponding to the two grooves 95. Since these 16 do not satisfy the drawing condition 4, the target graphic selection unit 9 determines that the graphic determination candidate including the line segment J2 including the line segment connecting the groove 95 and the groove 95 is not the target graphic candidate in step S60.
  • the target graphic candidate generation unit 7 does not store the target graphic candidate generation unit 7 in the target graphic candidate storage unit 8.
  • the only target graphic candidate that the target graphic candidate generation unit 7 stores in the target graphic candidate storage unit 8 is the target graphic 92 corresponding to the graphic J1 shown in FIG. 33 in which the groove portion is repeated three times.
  • the target figure selection part 9 displays the figure J1 memorize
  • the display device 21 displays the candidate for the target graphic
  • the operator answers “No” to the question as to whether to generate the candidate for the target graphic again.
  • the input device 22 accepts the answer “No” from the worker in step S70.
  • the operator selects the graphic J1 that is the only candidate for the target graphic.
  • the input device 22 receives an instruction to select the graphic J1 that is the target graphic.
  • the graphic selection device 101 ends the selection process.
  • the preset condition storage unit 11 stores the graphic conditions 8 and 15 suitable for the target graphic, so that the operator can perform the grooving pattern with a small number of operations. It is possible to select a jumping pattern figure having a large translational symmetry.
  • Embodiment 7 FIG. Next, a seventh embodiment of the present invention will be described with reference to FIGS. 1, 2, 36 and 37.
  • FIG. In the seventh embodiment since the same graphic selection device 101 as in the first embodiment is used, the description of the configuration is omitted.
  • the preset condition storage unit 11 stores graphic conditions 3, 7, and 14 suitable for the target graphic. Then, the graphic selection device 101 generates a target graphic candidate based on the graphic conditions 3, 7, and 14.
  • the target graphic in the present embodiment is a flying pattern having rotational symmetry like a circular pattern for drilling.
  • the graphic selection device 101 stores the same radius as the graphic condition 3, the closed loop as the graphic condition 7, and the rotational symmetry as the graphic condition 14 in the preset condition storage unit 11. .
  • the graphic selection device 101 selects a circular pattern for drilling by using the graphic conditions 3, 7, and 14.
  • FIG. 36 is a diagram illustrating an example of a drawing input to the graphic selection device in the seventh embodiment.
  • FIG. 37 is a diagram for explaining a graphic candidate determination process according to the seventh embodiment. 36 and 37 show parts to be drilled.
  • FIG. 36 is the drawing data to be read by the drawing data input unit 1 in step S20 of FIG.
  • Drawing 110 of Drawing 36 is a front view of parts.
  • the part of drawing 110 has a circular area hole 115 to be drilled.
  • FIG. 37 is a front view of the component 120 corresponding to FIG. In FIG. 37, it is assumed that a figure K1 indicated by a bold line is a figure intended by the operator. The figure K1 corresponds to the hole 115 to be drilled.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20. Thereafter, in step S30, the preset condition setting unit 12 sets the graphic conditions 3, 7, and 14 stored in the preset condition storage unit 11 in advance in the graphic condition storage unit 3.
  • the graphic condition 5 is a condition that the number of components constituting the graphic to be determined is within a specified range.
  • the operator sets “5” to both the minimum value and the maximum value of the number of components when setting the parameter of the graphic condition 5.
  • the target graphic candidate generation unit 7 generates a target graphic candidate in step S50.
  • the target graphic candidate generation unit 7 determines that the target graphic candidate is configured by a closed loop. For this reason, the target graphic candidate generation unit 7 does not store a graphic including a line that is interrupted and ends in the middle in the target graphic candidate storage unit 8. Therefore, the target graphic selection unit 9 does not display such a graphic on the display device 21 in step S60.
  • the closed loop has five circles corresponding to the holes 115 and one circle corresponding to the part outline.
  • the target graphic candidate generation unit 7 does not store the graphic determination candidate including the circle corresponding to the part outline in the target graphic candidate storage unit 8.
  • a graphic determination candidate including a circle corresponding to the part outline and including a circle corresponding to the hole 115 does not satisfy the graphic condition 3 because it includes a circle with a different radius.
  • a graphic determination candidate that includes a circle corresponding to the part outline and does not include a circle corresponding to the hole 115 has “1” as the number of components, and thus the number of components is designated as “5” in the parameter. The graphic condition 5 is not satisfied.
  • the graphic determination candidate including the circle corresponding to the part outer shape does not include the circle corresponding to the hole 115, there is a graphic condition that cannot be satisfied.
  • a graphic determination candidate including a circle corresponding to the outer shape is not stored in the target graphic candidate storage unit 8.
  • the target graphic candidate generation unit 7 can determine that a target graphic candidate including five circles corresponding to the hole 115 satisfies the graphic condition 5 and further satisfies the graphic condition 14. From the above, the only target graphic candidate that the target graphic candidate generation unit 7 stores in the target graphic candidate storage unit 8 is the graphic K1. Thereby, the target figure selection part 9 displays only the figure K1 memorize
  • the display device 21 displays the candidate for the target graphic
  • the operator answers “No” to the question as to whether to generate the candidate for the target graphic again.
  • the input device 22 accepts the answer “No” from the worker in step S70.
  • the worker selects a single candidate for the target graphic.
  • the input device 22 receives an instruction to select a target graphic in step S80.
  • the graphic selection device 101 ends the selection process.
  • the preset condition storage unit 11 stores the graphic conditions 3, 7, and 14 suitable for the target graphic. Therefore, the operator performs an operation of selecting individual segments. It is possible to select a flying pattern having rotational symmetry like a circular pattern for drilling with a small number of operations without performing it.
  • Embodiment 8 FIG. Next, an eighth embodiment of the present invention will be described with reference to FIGS. 1, 2, and 38 to 42.
  • FIG. In the eighth embodiment since the graphic selection device 101 similar to that in the first embodiment is used, the description of the configuration is omitted.
  • the preset condition storage unit 11 stores graphic conditions 5 and 8 suitable for the target graphic. Then, the graphic selection device 101 generates a target graphic candidate based on the graphic conditions 5 and 8.
  • the target graphic in the present embodiment is one continuous path.
  • the graphic selection device 101 stores in the preset condition storage unit 11 no branch and no closed loop as the graphic condition 8 and the number of components as the graphic condition 5.
  • the graphic selection device 101 sets “1” to both the minimum value and the maximum value of the number of components that are parameters of the graphic condition 5 stored in the preset condition storage unit 11. .
  • the graphic selection device 101 selects one continuous path by using graphic conditions 5 and 8.
  • FIG. 38 is a diagram illustrating an example of a drawing input to the graphic selection device in the eighth embodiment.
  • the drawing data of drawings 210 to 230 shown in FIG. 38 is drawing data to be read by the drawing data input unit 1 in step S20 of FIG.
  • Drawing 210 shows a plan view of parts to be read by the drawing data input unit 1.
  • the drawing 220 shows a front view of a component to be read by the drawing data input unit 1
  • the drawing 230 shows a side view of the component to be read by the drawing data input unit 1.
  • FIG. 39 is a view of parts corresponding to the drawing shown in FIG. 38 as viewed obliquely.
  • a perspective view of the component 310 corresponding to the drawings 210 to 230 is shown.
  • 40 to 42 show plan views of the component 310 corresponding to the drawings 210 to 230.
  • FIG. FIG. 40 is a diagram showing a path intended by the operator for the drawing of FIG.
  • the path L1 is a figure corresponding to the path intended by the operator.
  • 41 is a diagram showing line segments designated by the operator with respect to the drawing of FIG.
  • FIG. 42 is a diagram showing arcs and line segments designated by the operator with respect to the drawing of FIG.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20. Thereafter, in step S30, the preset condition setting unit 12 sets the graphic conditions 5 and 8 stored in the preset condition storage unit 11 in the graphic condition storage unit 3 in advance.
  • the segment condition 7 is a condition that the segment to be determined is not a specific segment stored in the drawing data storage unit 2.
  • the graphic condition 16 is a condition that a specific segment stored in the drawing data storage unit 2 exists among the segments constituting the graphic to be determined.
  • the target graphic candidate generation unit 7 does not use the designated line segments L2 to L5 for generating target graphic candidates.
  • the target graphic candidate generation unit 7 When the operator finishes editing the segment condition in step S40, the target graphic candidate generation unit 7 generates a target graphic candidate in step S50.
  • the graphic satisfying the graphic condition 5 and graphic condition 8 stored in the preset condition storage unit 11, and the graphic condition 16 and segment condition 7 set by the operator is only the path L1 indicated by the bold line in FIG. Accordingly, the target graphic candidate generation unit 7 stores only the path L1 which is a target graphic candidate in the target graphic candidate storage unit 8.
  • the target graphic selection unit 9 displays the path L1 stored in the target graphic candidate storage unit 8 on the display device 21.
  • the display device 21 displays the candidate for the target graphic
  • the operator answers “No” to the question as to whether to generate the candidate for the target graphic again.
  • the input device 22 accepts the answer “No” from the worker in step S70.
  • the operator selects the path L1 that is the only candidate for the target graphic.
  • the input device 22 receives a selection instruction for the path L1, which is the target graphic.
  • the graphic selection device 101 ends the selection process.
  • the preset condition storage unit 11 stores the graphic conditions 5 and 8 suitable for the target graphic, the operator adds some settings and adds this setting.
  • the figure selecting apparatus 101 can select one continuous path only by designating several segments associated with. Therefore, the graphic selection apparatus 101 can reduce the number of operations by the operator, particularly when the number of segments constituting the target graphic is large, as compared with the method of specifying all the segments.
  • FIG. 9 a ninth embodiment of the present invention will be described with reference to FIGS. 1, 2, and 43 to 45.
  • FIG. In the ninth embodiment, since the same graphic selection device 101 as in the first embodiment is used, the description of the configuration is omitted.
  • graphic conditions 4, 5, 7, 12 and segment conditions 4, 5 suitable for the target graphic are stored.
  • the graphic selection device 101 changes the graphic condition parameters, sets the graphic conditions, or sets the segment conditions in accordance with an instruction from the operator. Then, the graphic selection device 101 generates a target graphic candidate based on the graphic conditions 4, 5, 7, 12 and the segment conditions 4, 5.
  • the target graphic in the present embodiment is a shape that can be defined by geometric conditions, such as a quadrangle whose orientation is aligned with the coordinate system of the drawing and whose corners are rounded.
  • Geometric conditions include the area, length, curvature or angle conditions of the figure.
  • the graphic selection device 101 stores the following six preset conditions in the preset condition storage unit 11.
  • (Preset condition 1) Number of segments as graphic condition 4 (Preset condition 2) Number of components as graphic condition 5 (Preset condition 3) Closed loop as graphic condition 7 (Preset condition 4) Smooth connection of segments as graphic condition 12 (Preset condition 5) Arc center angle that is segment condition 4 (Preset condition 6) Angle formed by the coordinate system and segment that is segment condition 5
  • the graphic selection device 101 uses the preset conditions of preset conditions 1 to 6 described above. To select a quadrangle whose orientation is aligned with the coordinate system of the drawing and whose corners are rounded.
  • the graphic selection device 101 sets the following five parameters as the preset condition parameters.
  • the graphic selection apparatus 101 sets “8” to both the minimum value and the maximum value of the number of segments that are parameters of the graphic condition 4.
  • the graphic selection apparatus 101 sets “1” to both the minimum value and the maximum value of the number of components that are parameters of the graphic condition 5.
  • the graphic selection device 101 sets “1” to the number of differentiable values that is a parameter of the graphic condition 12.
  • the graphic selection apparatus 101 sets 90 degrees or more and 90 degrees or less to the set of the minimum value and the maximum value of the center angle that are parameters of the segment condition 4.
  • the graphic selection device 101 sets 0 to 0 degrees, 90 to 90 degrees, and 180 degrees or more to the combination of the minimum and maximum angles of the segment condition 5 parameter. A total of four sets of 180 degrees or less and 270 degrees or more and 270 degrees or less are set.
  • the condition editing unit 13 causes the display device 21 to display an editing screen for editing the graphic condition and the segment condition.
  • the condition editing unit 13 arranges editing items under conditions that are considered to be frequently used at positions where editing is easy. It is assumed that the target graphic in the present embodiment is a quadrangle with rounded corners. In this case, the condition editing unit 13 uses the graphic conditions 2, 3, 16, 17, and 18 and the segment conditions 1, 2, 3, 6, and 7 that are considered to be frequently used when selecting a square with rounded corners.
  • the edit items are preferentially arranged at positions in the display screen where they can be edited immediately.
  • the condition editing unit 13 arranges editing items of other conditions at positions where they can be traced by scrolling or opening another screen.
  • FIG. 43 is a diagram illustrating an example of a drawing input to the graphic selection device according to the ninth embodiment.
  • FIG. 44 is a view for explaining the configuration of the drawing data shown in FIG.
  • FIG. 45 is a diagram for explaining a graphic candidate determination process according to the ninth embodiment.
  • one special shape and the seven rectangles shown in FIG. 43 are indicated by bold lines. Further, in FIG. 44, the connection points between the segments are highlighted with respect to the special shape.
  • the drawing data of the drawing shown in FIG. 43 has layers. Here, a case will be described in which, of the squares 410 to 470, only the segment constituting the square 440 is in layer B and the other segments are in layer A. In the drawing data shown in FIG. 43, it is assumed that all segments constituting the quadrangle 430 have only a line type as a broken line, and the data is a continuous line. In addition, all the segments constituting the squares 410 to 440, 460, 470 and the special shape 480 are not inclined with respect to the coordinate system, whereas all the segments constituting the square 450 are inclined with respect to the coordinate system. ing.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S20. Thereafter, in step S30, the preset condition setting unit 12 stores the graphic conditions 4, 5, 7, 12 and the segment conditions 4 and 5 previously stored in the preset condition storage unit 11 into the graphic condition storage unit 3 and the segment condition storage. Set to part 4.
  • the graphic selection device 101 executes various processes corresponding to the editing contents when the condition editing by the operator in step S40 is different. In the following description, each process will be described for each edited content of the condition by the operator in step S40.
  • the first case is a case where, in step S40, the operator leaves the preset condition without editing both the graphic condition and the segment condition. In this case, since all the segments constituting the quadrangle 450 are inclined with respect to the coordinate system and do not satisfy the segment condition 5, the target graphic candidate generation unit 7 determines which segment in the segment extraction in step S50. Can not be extracted.
  • the target graphic candidate generation unit 7 selects the arc having the central angle of 270 degrees in the segment extraction in step S50. It cannot be extracted.
  • the graphic condition determination unit 5 does not have a circular arc with a central angle of 270 degrees when determining the graphic condition, so the target graphic candidate using the segment of the special shape 480 does not become a closed loop. It is determined that the graphic condition 7 is not satisfied.
  • the quadrilateral 470 is composed of four straight lines, the graphic condition determination unit 5 determines that the quadrilateral 470 does not satisfy the graphic condition 4. Also, since the rectangle 470 does not match the tangent vector at the vertex, the graphic condition determination unit 5 determines that the square 470 does not satisfy the graphic condition 12.
  • the target graphic candidate generation unit 7 does not store the squares 450 and 470 and the special shape 480 in the target graphic candidate storage unit 8. Therefore, the target graphic selection unit 9 does not display the squares 450 and 470 and the special shape 480 that are not stored in the target graphic candidate storage unit 8 on the display device 21 in step S60.
  • the target graphic candidate generation unit 7 since the number of components is specified as 1 in the graphic condition 5, the target graphic candidate generation unit 7 does not store the graphic including a plurality of rectangles in the target graphic candidate storage unit 8. Therefore, the target graphic selection unit 9 does not cause the display device 21 to display a graphic including a plurality of squares.
  • the target graphic candidate generation unit 7 uses the five different graphics including only one of the squares 410, 420, 430, 440, and 460 as target graphic candidates, and the target graphic candidate storage unit. 8 is stored.
  • the target graphic selection unit 9 displays these five graphics stored in the target graphic candidate storage unit 8 as five candidates. It is assumed that the operator answers “No” to the question of whether or not to regenerate the target graphic candidate. Thereby, the input device 22 accepts the answer “No” from the worker in step S70. In step S80, the input device 22 accepts one selection instruction from these five candidates by the operator. Then, the graphic selection device 101 ends the selection process.
  • the second case is a case where the operator sets the graphic condition 18 in order to select the rectangle 410 in step S40. Assume that the operator defines the same graphic as the circle shown at the upper right in the rectangle 410 using the closed graphic designating unit 17 in order to specify a closed graphic that is a parameter of the graphic condition 18. In addition, it is assumed that the operator sets the geometric relationship that the figure to be determined “includes” the designated closed figure.
  • the quadrangle graphic determination candidate that the graphic condition determination unit 5 determines to satisfy the graphic condition 18 in step S50 is only the graphic determination candidate including only the quadrangle 410. Accordingly, the target graphic candidate storage unit 8 stores only the quadrangle 410, which is the target graphic candidate, that the target graphic selection unit 9 displays on the display device 21 in step S60.
  • the third case is a case where the operator sets the segment condition 2 in order to select the square 420 in step S40. It is assumed that the operator sets 0 or more and 0 or less and 0.5 or more and 0.5 or less to the set of the minimum value and the maximum value of the curvature that are parameters of the segment condition 2.
  • the curvature of 0 corresponds to the line segment
  • the curvature of 0.5 corresponds to the arc of radius 2.
  • the target graphic candidate generation unit 7 does not extract an arc other than the arc having a radius 2 of the quadrangle 420 in the segment extraction in step S50. Therefore, the target graphic candidate generation unit 7 determines that only the quadrangle 420 satisfies all the graphic conditions 4, 5, 7, and 12 in determining the graphic conditions in step S50. Therefore, only the quadrangle 420 which is the candidate for the target graphic is stored in the target graphic candidate storage unit 8 and displayed on the display device 21 by the target graphic selection unit 9 in step S60.
  • the fourth case is a case where the operator sets the segment condition 1 in order to select the quadrangle 430 in step S40. It is assumed that the operator sets an attribute called a broken line for the line type that is a parameter of the segment condition 1.
  • the target graphic candidate generation unit 7 does not extract the segments other than those forming the rectangle 430 in the segment extraction in step S50. Therefore, the target graphic candidate generation unit 7 determines that only the quadrangle 430 satisfies the graphic conditions 4, 5, 7, and 12 in the determination of the graphic conditions in step S50. Therefore, only the quadrangle 430 that is a candidate for the target graphic is stored in the target graphic candidate storage unit 8 and displayed on the display device 21 by the target graphic selection unit 9 in step S60.
  • the fifth case is a case where the operator sets the segment condition 6 in order to select the rectangle 440 in step S40. It is assumed that the operator sets layer A, which is a parameter of segment condition 6, and to which no segment belongs.
  • the target graphic candidate generation unit 7 does not extract the segments other than those forming the rectangle 440 in the segment extraction in step S50. Therefore, the target graphic candidate generation unit 7 determines that only the rectangle 440 satisfies all the graphic conditions 4, 5, 7, and 12 in the determination of the graphic condition in step S50. Therefore, only the rectangle 440 that is a candidate for the target graphic is stored in the target graphic candidate storage unit 8 and displayed on the display device 21 by the target graphic selection unit 9 in step S60.
  • the sixth case is a case where the operator sets the graphic condition 2 in order to select the quadrangle 460 in step S40. It is assumed that the operator sets 100 as the minimum value of the area that is the parameter of the graphic condition 2 and 400 as the maximum value.
  • step S50 the quadrangle graphic determination candidate that the graphic condition determination unit 5 determines to satisfy the graphic condition 2 is only the graphic determination candidate including only the quadrangle 460. Therefore, only the quadrangle 460 that is a candidate for the target graphic is displayed in the target graphic candidate storage unit 8 and displayed on the display device 21 by the target graphic selection unit 9 in step S60.
  • step S40 the operator changes the parameters of the graphic conditions 4 and 5 set by the preset condition setting unit 12 in order to select the two rectangles 410 and 420 at the same time. Is newly set. Assume that the operator changes both the minimum value and the maximum value of the number of segments, which are parameters of the graphic condition 4, to “16”. Further, it is assumed that the worker changes both the minimum value and the maximum value of the number of components, which are parameters of the graphic condition 5, to “2”. Further, it is assumed that the operator uses the closed graphic designating unit 17 to define a designated closed graphic that is a parameter of the graphic condition 18 by a rectangle N1 indicated by a bold line in FIG. Also, assume that the operator sets “included” in the designated closed graphic for the graphic to be determined regarding the geometric relationship.
  • the target graphic candidate generation unit 7 satisfies two graphic conditions 4, 5, 7, and 12 from two of the squares 410, 420, 430, 440, and 460. It is determined that the figure is a combination of. Further, the target graphic candidate generation unit 7 determines that only the combination of the rectangles 410 and 420 satisfies the graphic condition 18 among the combinations. Accordingly, only the graphic composed of the rectangles 410 and 420 that are candidates for the target graphic is stored in the target graphic candidate storage unit 8 and displayed on the display device 21 by the target graphic selection unit 9 in step S60.
  • the display device 21 displays the target graphic candidate
  • the operator answers “No” to the question as to whether to generate the target graphic candidate again.
  • the input device 22 accepts the answer “No” from the worker in step S70.
  • the worker selects a single candidate for the target graphic.
  • the input device 22 receives an instruction to select a target graphic in step S80.
  • the graphic selection device 101 ends the selection process.
  • the preset condition storage unit 11 stores the graphic conditions 4, 5, 7, 12 and the segment conditions 4, 5 suitable for the target graphic. Select a shape that can be defined by geometric conditions, such as a rectangle that has the same orientation as the drawing coordinate system and rounded corners, with fewer operations without selecting individual segments. be able to.
  • Embodiment 10 FIG. Next, a tenth embodiment of the present invention will be described with reference to FIGS.
  • the operator designates the start point and head segment of one continuous path as the selection target, and further designates the end point and end segment of the path.
  • the graphic selection device selects the target path by repeatedly specifying and adding segments included in the target path until there is one candidate for the target graphic.
  • FIG. 46 is a block diagram showing a configuration of the graphic selection device according to the tenth embodiment. 46, the same reference numerals are given to the components that achieve the same functions as those of the graphic selection device 101 of the first embodiment shown in FIG. 1, and redundant descriptions are omitted.
  • the graphic selection device 102 includes a drawing data input unit 1, a drawing data storage unit 2, a graphic condition storage unit 3, and a segment condition storage unit 4, similarly to the graphic selection device 101.
  • the graphic selection device 102 includes a graphic condition determination unit 5, a segment condition determination unit 6, a target graphic candidate generation unit 7, and a target graphic candidate storage unit 8.
  • the graphic selection device 102 includes a preset condition storage unit 11, a preset condition setting unit 12, a drawing information designation unit 14, and an automatic condition update unit 31.
  • the graphic selection device 102 of the present embodiment includes a path selection condition editing unit 41 and a target graphic candidate confirmation unit 42.
  • the graphic selection device 101 includes the target graphic selection unit 9 and the condition editing unit 13
  • the graphic selection device 102 includes a path selection condition editing unit 41 and a target graphic candidate confirmation unit 42. Yes.
  • the path selection condition editing unit 41 is connected to the display device 21, the drawing data storage unit 2, the graphic condition storage unit 3, the segment condition storage unit 4, and the drawing information designation unit 14.
  • the target graphic candidate confirmation unit 42 is connected to the target graphic candidate storage unit 8.
  • the path selection condition editing unit 41 rewrites the contents of the graphic condition storage unit 3 and the segment condition storage unit 4 in accordance with an operator instruction input from the input device 22 via the drawing information specifying unit 14.
  • the path selection condition editing unit 41 displays on the display device 21 which one of the start point, end point, head segment, end segment, and intermediate segment is being specified. Thereafter, the path selection condition editing unit 41 calls the drawing information specifying unit 14 to allow the operator to specify a point or a segment. Then, the path selection condition editing unit 41 determines whether the graphic condition storage unit 3 and the segment condition storage unit 4 are based on the specified point or segment information and the information stored in the drawing data storage unit 2. Add conditions to either or both.
  • the target graphic candidate confirmation unit 42 confirms the number of target graphic candidates stored in the target graphic candidate storage unit 8.
  • the target graphic candidate confirmation unit 42 of this embodiment confirms whether the number of target graphic candidates is one or plural. If the number of candidates is 1, the target graphic candidate confirmation unit 42 determines that the only candidate is the target graphic intended by the operator and selects it.
  • the graphic selection device 102 stores in the preset condition storage unit 11 no branch and closed loop as the graphic condition 8 and the number of components as the graphic condition 5.
  • the graphic selection device 102 sets “1” to both the minimum value and the maximum value of the number of components, which are parameters of the graphic condition 5 stored in the preset condition storage unit 11 will be described. .
  • FIG. 47 is a flowchart showing an operation processing procedure of the graphic selection device according to the tenth embodiment. 47, the description of the same processing as that of the graphic selection device 101 described in FIG. 2 is omitted.
  • steps S600 to S620 of the graphic selection device 102 is the same as the processing of steps S10 to S30 of the graphic selection device 101.
  • step S620 after the preset condition setting unit 12 sets the preset condition, in step S630, the graphic selection device 102 sets the condition based on the designation of both ends. Specifically, first, the operator specifies all of the start point, the top segment, the end point, and the end segment in accordance with the instruction from the path selection condition editing unit 41. Next, the path selection condition editing unit 41 adds the segment condition 7 and the graphic condition 16 based on this designation.
  • the path selection condition editing unit 41 specifies the first segment and the last segment specified by the operator as the parameters of the graphic condition 16. In addition, the path selection condition editing unit 41 specifies all the segments other than the first segment in contact with the specified start point and the segments other than the last segment in contact with the specified end point as the parameters of the segment condition 7.
  • step S640 the target graphic candidate generation unit 7 generates target graphic candidates in the same manner as in the first embodiment.
  • the target graphic candidate confirmation unit 42 confirms the number of target graphic candidates stored in the target graphic candidate storage unit 8 in step S650.
  • the condition automatic update unit 31 performs the same processing as step S71 of the first embodiment in step S651. In other words, the condition automatic updating unit 31 determines the condition that is the contents of the graphic condition storage unit 3 and the segment condition storage unit 4 based on the target graphic candidate information stored in the target graphic candidate storage unit 8 in step S651. Updates automatically.
  • step S652 the graphic selection device 102 sets the condition from the designated segment. Specifically, the operator designates a segment included in the target path in accordance with an instruction from the path selection condition editing unit 41. Then, the path selection condition editing unit 41 adds the graphic condition 16 in which the designated segment is set as a parameter. Thereafter, the graphic selection device 102 performs the processes of steps S640 and S650.
  • step S652 when the operator specifies a segment, the path selection condition editing unit 41 uses a segment used for the parameter of the segment condition 7, a segment used for the parameter of the graphic condition 16, Segments that are not any of these are displayed in different colors.
  • the segment designated by the operator in step S652 is usually one of the unconditioned segments as described above. This is because if the segment already specified in the segment condition 7 is also specified as the parameter of the graphic condition 16, the specified segment is not included and included, and both the contradictory conditions are satisfied. This is because figures cannot exist.
  • step S652 when the operator designates a segment used for either or both of the segment condition 7 and the graphic condition 16, the path selection condition editing unit 41 The operator may be requested to specify different segments.
  • step S650 until the target graphic candidate confirmation unit 42 determines that the number of target graphic candidates stored in the target graphic candidate storage unit 8 is 1, the graphic selection device 102 performs steps S651, S652, S640, The process of S650 is repeated.
  • the target graphic candidate confirmation unit 42 determines the target graphic in step S660.
  • the target graphic candidate confirmation unit 42 determines and selects the only target graphic candidate stored in the target graphic candidate storage unit 8 as the target graphic intended by the operator. Then, the graphic selection device 102 stops operating.
  • FIG. 48 is a diagram showing an example of a drawing input to the graphic selection device in the tenth embodiment.
  • FIG. 49 is a diagram showing an example of a graphic selected by the graphic selection device according to the tenth embodiment.
  • FIG. 50 is a diagram illustrating an example of points and segments designated by the operator for the graphic selection device according to the tenth embodiment.
  • FIG. 51 is a diagram for explaining a first condition that is automatically added by the graphic selection device according to the tenth embodiment.
  • FIG. 52 is a diagram for explaining a second condition that is automatically added by the graphic selection device according to the tenth embodiment.
  • the drawing data of the drawing 510 shown in FIG. 48 is drawing data to be read by the drawing data input unit 1 in step S610 of FIG. 49 is displayed on the display device 21 and corresponds to the drawing data of the drawing 510 in FIG.
  • a path O1 indicated by a bold line is a figure corresponding to the path intended by the operator.
  • the operator selects the path O1 for the drawing data of the drawing 510 will be described.
  • the drawing data input unit 1 reads the drawing data from the CAD data and inputs it to the drawing data storage unit 2 in step S610. Thereafter, in step S620, the preset condition setting unit 12 sets preset conditions stored in the preset condition storage unit 11 in advance.
  • the path selection condition editing unit 41 adds the segment condition 7 and the graphic condition 16 based on the designation by the operator.
  • the segment condition 7 is a condition that the segment to be determined is not a specific segment stored in the drawing data storage unit 2.
  • the graphic condition 16 is a condition that a specific segment stored in the drawing data storage unit 2 exists among the segments constituting the graphic to be determined.
  • the path selection condition editing unit 41 specifies the line segments P11 and P12 as the parameters of the graphic condition 16 because the line segment P11 is specified for the head segment and the line segment P12 is specified for the end segment.
  • the segments that are in contact with the starting point P1 and are not the segment P11 of the head segment are the segments P21 and P22.
  • the segment that is in contact with the end point P2 and is not the segment P12 of the end segment is the segment P23 to the segment P25. Therefore, the path selection condition editing unit 41 specifies the line segment P21 to the line segment P25 as the parameter of the segment condition 7.
  • the target graphic candidate generation unit 7 When the condition setting is completed, the target graphic candidate generation unit 7 generates a target graphic candidate in step S640 as in the first embodiment.
  • the graphic conditions that satisfy all the graphic conditions and the segment conditions set so far include three of the line segments P13, P26, and P27 shown in FIG. 50, and three line segments P14 and P28. There are two ways including one of the two, and when combined, there are six ways as a whole.
  • step S640 the target graphic candidate generation unit 7 generates a total of six target graphic candidates and stores them in the target graphic candidate storage unit 8. Then, the target graphic candidate confirmation unit 42 confirms the number of target graphic candidates stored in the target graphic candidate storage unit 8 in step S650.
  • the target graphic candidate confirmation unit 42 determines that the number of target graphic candidates is not one.
  • the condition automatic update unit 31 performs automatic update of the condition in step S651.
  • the condition automatic update unit 31 adds the graphic condition 16 to the segments included in all the target graphic candidates in the target graphic candidate storage unit 8.
  • the condition automatic update unit 31 adds a graphic condition 16 in which all line segment groups Q1 to Q3, which are segments indicated by bold lines in FIG. 51, are set as parameters.
  • the automatic condition updating unit 31 sets the line segment groups Q1 to Q3 as a group of line segments.
  • a graphic condition 16 set as a parameter is added.
  • the line segment groups Q1 to Q3 are line segments that do not include the line segments P13, P26, P27 and the line segments P14, P28.
  • the condition automatic update unit 31 adds the graphic condition 16 in which the line segment groups Q1 to Q3 are set as parameters to the graphic condition storage unit 3.
  • condition automatic update unit 31 adds a segment condition 7 in which all segments not included in all target graphic candidates in the target graphic candidate storage unit 8 are set as parameters to the segment condition storage unit 4.
  • the line segment newly set as the parameter of the segment condition 7 by the automatic condition updating unit 31 is a line segment indicated by a broken line in FIG.
  • the graphic selection device 102 sets conditions from the designated segment in step S652. At this time, it is assumed that the operator designates the segment P13 shown in FIG. 50, which is a segment included in the path, to the path selection condition editing unit 41. As a result, the path selection condition editing unit 41 adds the graphic condition 16 in which the line segment P13 is set as a parameter in accordance with the designation from the operator.
  • the target graphic candidate generation unit 7 generates a target graphic candidate in step S640.
  • the target graphic candidate confirmation unit 42 confirms the number of target graphic candidates stored in the target graphic candidate storage unit 8 in step S650.
  • the target graphic candidate confirmation unit 42 determines that the number of target graphic candidates is not one.
  • the condition automatic update unit 31 automatically updates the condition in step S651.
  • the condition automatic update unit 31 adds the graphic condition 16 to the segments included in all the target graphic candidates in the target graphic candidate storage unit 8.
  • the condition automatic update unit 31 adds a graphic condition 16 in which all line segment groups Q11 and Q12, which are segments indicated by bold lines in FIG. 52, are set as parameters.
  • the condition automatic update unit 31 adds the graphic condition 16 in which the line segment groups Q11 and Q12 are set as parameters.
  • Line segment groups Q11 and Q12 are line segments that do not include line segments P14 and P28.
  • the condition automatic update unit 31 adds the graphic condition 16 in which the line segment groups Q11 and Q12 are set as parameters to the graphic condition storage unit 3.
  • condition automatic update unit 31 adds a segment condition 7 in which all segments not included in all target graphic candidates in the target graphic candidate storage unit 8 are set as parameters to the segment condition storage unit 4.
  • the line segment newly set as the parameter of the segment condition 7 by the automatic condition updating unit 31 is a line segment indicated by a broken line in FIG.
  • the graphic selection device 102 sets conditions from the designated segment in step S652. At this time, it is assumed that the operator designates the segment P14 shown in FIG. 50, which is a segment included in the path, to the path selection condition editing unit 41. As a result, the path selection condition editing unit 41 adds the graphic condition 16 in which the line segment P14 is set as a parameter in accordance with the designation from the operator.
  • the target graphic candidate generation unit 7 generates a target graphic candidate in step S640.
  • the graphic that satisfies all graphic conditions and segment conditions set up to now is only the path O1 shown in FIG. Therefore, the target graphic candidate generation unit 7 stores the path O1 which is a target graphic candidate in the target graphic candidate storage unit 8.
  • the target graphic candidate confirmation unit 42 confirms the number of target graphic candidates stored in the target graphic candidate storage unit 8 in step S650.
  • the target graphic candidate confirmation unit 42 determines that the number of target graphic candidates is 1. In this case, that is, in the case of Yes in step S650, the target graphic candidate confirmation unit 42 selects the path O1 that is the only candidate for the target graphic in step S660, and the selection processing is thereby completed.
  • the operator performs a total of six selection operations of the start point, the end point, the start segment, the end segment, and the two segments in the middle.
  • the path O1 which is the target graphic indicated by a bold line
  • the number of selection operations is 16.
  • the total number of selection operations in this case is nine.
  • FIG. 53 is a diagram showing that a component included in the graphic selection device according to the first and tenth embodiments is a processing circuit.
  • the processing circuit 58 is dedicated hardware.
  • the processing circuit 58 is a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof. .
  • Some of the components constituting the graphic selection devices 101 and 102 may be dedicated hardware that is separate from the rest.
  • Some or all of the components included in the graphic selection devices 101 and 102 may be realized by a processor 191 described later that executes a program. In this case, functions of some or all of the constituent elements included in the graphic selection devices 101 and 102 are realized by the processor 191 using the main memory.
  • FIG. 54 is a diagram illustrating a configuration example of a control circuit included in the graphic selection device according to the first and tenth embodiments.
  • FIG. 54 shows a control circuit that is a part or all of the components included in the graphic selection devices 101 and 102.
  • the processor 191 is a CPU, a processing device, an arithmetic device, a microprocessor, a microcomputer, or a DSP (Digital Signal Processor).
  • the processor 191 executes the program 90 stored in the memory 192.
  • the functions of the graphic selection devices 101 and 102 are realized by the control circuit. That is, the functions of at least some of the constituent elements constituting the graphic selection devices 101 and 102 are realized by the processor 191 and the program 90.
  • the program 90 is either software, firmware, or a combination of software and firmware. Software or firmware is described in the program 90 and stored in the memory 192.
  • the processor 191 reads out and executes the program 90 stored in the memory 192, thereby realizing the functions of the components constituting the graphic selection devices 101 and 102.
  • the program 90 executed by the processor 191 is stored in a computer-readable non-transitory recording medium including a plurality of instructions for generating target graphic candidates that can be executed by a computer.
  • the program 90 executed by the processor 191 causes the computer to generate target graphic candidates.
  • the program 90 executed by the processor 191 is stored in the memory 192. It can be said that the program 90 stored in the memory 192 causes the computer to execute the procedure or method of the components constituting the graphic selection devices 101 and 102.
  • the memory 192 may be a nonvolatile semiconductor memory or a volatile semiconductor memory.
  • the memory 192 may be a RAM (Random Access Memory), a ROM (Read Only Memory), a flash memory, an EPROM (Erasable Programmable Read Only Memory), or an EEPROM (Electrically Erasable Programmable Memory).
  • the memory 192 may be a magnetic disk, a flexible disk, an optical disk, a compact disk, a mini disk, or a DVD.
  • the functions of a plurality of components constituting the graphic selection devices 101 and 102 may be partially realized with dedicated hardware and the remaining may be realized with software or firmware. As described above, the functions of a plurality of components constituting the graphic selection devices 101 and 102 can be realized by hardware, software, firmware, or a combination thereof.
  • the graphic selection device 102 As described above, the graphic selection device 102 according to the present embodiment and the selection method by the graphic selection device 102 have appropriate preset conditions for the target path, and by adding appropriate conditions manually and automatically. Compared with the existing method, one continuous path can be selected with a smaller number of operations.
  • the preset condition storage unit 11 stores preset conditions suitable for the drawing, and the graphic selection device 102 sets appropriate graphic conditions and segment conditions manually and automatically. Since it is added, one continuous path can be selected with fewer operations than the existing method.
  • the graphic selection device 102 performs display according to the situation, it is possible to prevent mistakes caused by the worker's recognition, reduce the time required for recognition, and reduce the work time.
  • the graphic selection device 102 guides the operator to an operation according to the situation, it is possible to prevent an operator's erroneous operation, and the graphic selection device 102 can omit an operation that can be omitted. Working hours can be reduced.
  • the configuration described in the above embodiment shows an example of the contents of the present invention, and can be combined with another known technique, and can be combined with other configurations without departing from the gist of the present invention. It is also possible to omit or change the part.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

図形選択装置(101)は、線で表現されたセグメントが組み合わされて構成された選択元の図形の図面データを入力する図面データ入力部(1)と、選択の目的となる目的図形が有するセグメントの条件であるセグメント条件を記憶するセグメント条件記憶部(4)と、目的図形の形状の条件である図形条件を記憶する図形条件記憶部(3)と、選択元の図形に基づいて、セグメント条件および図形条件を満たす目的図形の候補を生成する目的図形候補生成部(7)とを備える。

Description

図形選択装置、図形選択方法および図形選択プログラム
 本発明は、複数の図形要素から図形を選択する図形選択装置、図形選択方法および図形選択プログラムに関する。
 図形を選択するための従来の装置は、線分または円弧などの線で表現されたセグメントの集合である図面データから、目的の領域または目的の経路に対応する図形を抽出している。このような従来の装置の1つである特許文献1に記載の図形選択装置は、指定された図形要素に接する図形要素を検索し、さらに検索された図形要素に接する図形要素を検索している。
特許第3628892号公報
 しかしながら、上記従来の技術である特許文献1では、セグメント数が多い場合には、検索回数が多くなり、検索回数が増えると作業者による図形の指定回数も増える。このため、特許文献1では、セグメント数が多い場合には、作業者による操作回数が多くなるという問題があった。
 本発明は、上記に鑑みてなされたものであって、少ない操作回数で図面データから図面を選択させることができる図形選択装置を得ることを目的とする。
 上述した課題を解決し、目的を達成するために、本発明の図形選択装置は、線で表現されたセグメントが組み合わされて構成された選択元の図形の図面データを入力する図面データ入力部を備える。また、本発明の図形選択装置は、選択の目的となる目的図形が有するセグメントの条件であるセグメント条件を記憶するセグメント条件記憶部と、前記目的図形の形状の条件である図形条件を記憶する図形条件記憶部と、を備える。また、本発明の図形選択装置は、前記選択元の図形に基づいて、前記セグメント条件および前記図形条件を満たす目的図形の候補を生成する目的図形候補生成部を備える。
 本発明によれば、少ない操作回数で図面データから図面を選択させることができるという効果を奏する。
実施の形態1に係る図形選択装置の構成を示すブロック図 実施の形態1に係る図形選択装置の動作処理手順を示すフローチャート 図形条件のセグメント数を説明するための図 図形条件のコンポーネント数を説明するための図 閉ループ判定の処理手順を示すフローチャート 連続線判定の処理手順を示すフローチャート 鏡像対称性判定の処理手順を示すフローチャート 回転角の第1の例を示す図 回転角の第2の例を示す図 回転角の第3の例を示す図 回転対称性判定の処理手順を示すフローチャート 並進ベクトルの第1の計算方法を説明するための図 並進ベクトルの第2の計算方法を説明するための図 並進対称性判定の処理手順を示すフローチャート 線分のセグメントに対する角度を示す図 円弧のセグメントに対する角度を示す図 実施の形態2において図形選択装置に入力される図面の一例を示す図 図17に示した図面に対応する部品を斜めから見た図 図17の図面に対して作業者が目的とする加工箇所を示す図 図17の図面に対して作業者が目的とする輪郭図形を示す図 図17の図面に対して作業者が選択候補を除外する目的で指定した特定のセグメントを示す図 実施の形態3において図形選択装置に入力される図面の一例を示す図 図22に示した図面に対応する部品を斜めから見た図 図22の図面に対して作業者が指定した点を示す図 図22の図面に対して作業者が目的とする輪郭図形を示す図 内回り閉図形の図形条件を満たす他の図形の第1例を示す図 内回り閉図形の図形条件を満たす他の図形の第2例を示す図 実施の形態4において図形選択装置に入力される図面データの一例を示す図 実施の形態4に係る図形候補判定処理を説明するための図 実施の形態5において図形選択装置に入力される図面の一例を示す図 実施の形態5に係る図形候補判定処理を説明するための図 実施の形態6において図形選択装置に入力される図面の一例を示す図 図32の図面に対して作業者が目的とする目的図形を示す図 図32の図面に対して作業者が指定した図面領域を示す図 図32の図面に対して目的図形の候補から除外されるセグメントを示す図 実施の形態7において図形選択装置に入力される図面の一例を示す図 実施の形態7に係る図形候補判定処理を説明するための図 実施の形態8において図形選択装置に入力される図面の一例を示す図 図38に示した図面に対応する部品を斜めから見た図 図38の図面に対して作業者が目的とするパスを示す図 図38の図面に対して作業者が指定した線分を示す図 図38の図面に対して作業者が指定した円弧および線分を示す図 実施の形態9において図形選択装置に入力される図面の一例を示す図 図43で示した図面データの構成を説明するための図 実施の形態9に係る図形候補判定処理を説明するための図 実施の形態10に係る図形選択装置の構成を示すブロック図 実施の形態10に係る図形選択装置の動作処理手順を示すフローチャート 実施の形態10において図形選択装置に入力される図面の一例を示す図 実施の形態10に係る図形選択装置で選択される図形の一例を示す図 実施の形態10に係る図形選択装置に対して作業者が指定する点およびセグメントの一例を示す図 実施の形態10に係る図形選択装置が自動的に追加する第1の条件を説明するための図 実施の形態10に係る図形選択装置が自動的に追加する第2の条件を説明するための図 実施の形態1,10の図形選択装置が備える構成要素が処理回路であることを示す図 実施の形態1,10の図形選択装置が備える制御回路の構成例を示す図
 以下に、本発明の実施の形態に係る図形選択装置、図形選択方法および図形選択プログラムを図面に基づいて詳細に説明する。なお、これらの実施の形態によりこの発明が限定されるものではない。
実施の形態1.
 図1は、実施の形態1に係る図形選択装置の構成を示すブロック図である。図形選択装置101は、図面データから選択候補となる図形を生成するコンピュータである。図形選択装置101が生成する図形は、設計システム、製造システムまたは制御システムでの図形編集に用いられる。設計システムの一例は、CAD(Computer Aided Design)である。また、製造システムの一例は、CAM(Computer Aided Manufacturing)システムである。また、制御システムの一例は、NC(Numerical Control)の自動プログラミングシステムである。なお、図形選択装置101が生成した図形は、NCプログラムの生成に用いられてもよい。
 図形選択装置101は、表示装置21および入力装置22に接続されている。表示装置21は、図面データで示される物体の形状を表示する。入力装置22は、図形選択装置101への指示を受付けて図形選択装置101に入力する。表示装置21の一例は、液晶モニタであり、入力装置22の一例は、マウスである。
 図形選択装置101は、図面データ入力部1、図面データ記憶部2、図形条件記憶部3およびセグメント条件記憶部4を備えている。また、図形選択装置101は、図形条件判定部5、セグメント条件判定部6、目的図形候補生成部7、目的図形候補記憶部8、目的図形選択部9を備えている。また、図形選択装置101は、プリセット条件記憶部11、プリセット条件設定部12、条件編集部13、図面情報指定部14および条件自動更新部31を備えている。
 図面データ入力部1は、図面データを読み込んで図面データ記憶部2に入力する。具体的には、図面データ入力部1は、線で表現されたセグメントが組み合わされて構成された選択元の図形の図面データを図面データ記憶部2に入力する。
 図面データ記憶部2は、図面データ入力部1からの図面データを記憶する。本実施の形態の図面データは、加工物または加工工具の形状を表したものである。具体的には、図面データは、図面を構成するセグメントの形状と位置、色または線種といったセグメントの属性情報、ハッチングの範囲およびレイヤ情報である。
 なお、図面データは、これらの情報に限られず何れの情報であってもよい。本実施の形態では、セグメントの種類が、線分、円弧または円である場合について説明する。図面データ記憶部2に格納された図面データは、目的図形候補生成部7および図面情報指定部14によって読み出される。
 図形条件記憶部3は、作業者が選択しようとしている目的図形が満たす必要のある条件である図形条件を記憶する。図形条件は、目的図形の形状の条件であり、編集可能な情報である。図形条件は、プリセット条件記憶部11から読み出されて図形条件記憶部3に格納される。また、図形条件記憶部3内の図形条件は、必要に応じて作業者によって編集される。
 図形条件判定部5は、図形条件記憶部3および目的図形候補生成部7に接続されている。図形条件判定部5は、目的図形候補生成部7から目的図形の候補が送られてくると、この目的図形の候補が図形条件記憶部3で記憶されている各図形条件を満たすか否かを判定する。
 以下の説明では、目的図形の候補であって、目的図形候補生成部7から図形条件判定部5に送られてくるものを、図形判定候補という。本実施の形態では、図形判定候補が目的図形の第1の候補であり、目的図形候補生成部7が目的図形候補記憶部8に格納する目的図形の候補が目的図形の第2の候補である。換言すると、目的図形の第1の候補のうち、判定結果が合格であったのものが、目的図形の第2の候補である。
 図形条件判定部5は、図形判定候補が全ての図形条件を満たす場合には、目的図形候補生成部7に「真」を返す。一方、図形条件判定部5は、図形判定候補が図形条件の何れかを満たさない場合には、目的図形候補生成部7に「偽」を返す。図形条件判定部5が目的図形候補生成部7に返す「真」は、図形判定候補が全ての図形条件を満たすことを示す情報である。また、図形条件判定部5が目的図形候補生成部7に返す「偽」は、図形判定候補が図形条件の何れかを満たさないことを示す情報である。図形条件記憶部3が記憶し、図形条件判定部5が判定する図形条件には複数の種類がある。各図形条件の詳細については後述する。
 セグメント条件記憶部4は、作業者が選択しようとしている目的図形を構成する全てのセグメントが満たす必要のある条件であるセグメント条件を記憶する。セグメント条件は、作業者の選択の目的となる目的図形が有するセグメントの条件であり、編集可能な情報である。セグメント条件は、プリセット条件記憶部11から読み出されてセグメント条件記憶部4に格納される。また、セグメント条件記憶部4内のセグメント条件は、必要に応じて作業者によって編集される。
 セグメント条件判定部6は、セグメント条件記憶部4および目的図形候補生成部7に接続されている。セグメント条件判定部6は、目的図形候補生成部7からセグメントが送られてくると、このセグメントがセグメント条件記憶部4で記憶されている各セグメント条件を満たすか否かを判定する。
 セグメント条件判定部6は、セグメントが全てのセグメント条件を満たす場合には、目的図形候補生成部7に「真」を返す。一方、セグメント条件判定部6は、セグメントが何れかのセグメント条件を満たさない場合には、目的図形候補生成部7に「偽」を返す。セグメント条件判定部6が目的図形候補生成部7に返す「真」は、セグメントが全てのセグメント条件を満たすことを示す情報である。また、セグメント条件判定部6が目的図形候補生成部7に返す「偽」は、セグメントがセグメント条件の何れかを満たさないことを示す情報である。セグメント条件記憶部4が記憶し、セグメント条件判定部6が判定するセグメント条件には複数の種類がある。各セグメント条件の詳細については後述する。
 プリセット条件記憶部11は、図形選択が開始される前に、予め種々の図形条件および種々のセグメント条件を記憶しておく。プリセット条件記憶部11が記憶しておく図形条件は、図面データ入力部1が読み込む図面の性質および選択される図形の性質に対応する図形条件を含んでいる。また、プリセット条件記憶部11が記憶しておくセグメント条件は、図面データ入力部1が読み込む図面の性質および選択される図形の性質に対応するセグメント条件を含んでいる。
 プリセット条件設定部12は、プリセット条件記憶部11に接続されている。プリセット条件設定部12は、プリセット条件記憶部11に格納されている図形条件を読み出して図形条件記憶部3に設定する。また、プリセット条件設定部12は、プリセット条件記憶部11に格納されているセグメント条件をセグメント条件記憶部4に設定する。
 条件編集部13は、表示装置21、入力装置22、図形条件記憶部3、セグメント条件記憶部4および図面情報指定部14に接続されている。条件編集部13は、図形条件記憶部3に設定されている図形条件と、セグメント条件記憶部4に設定されているセグメント条件とを、表示装置21に表示させる。
 また、条件編集部13は、入力装置22から入力される作業者の指示に従い、図形条件記憶部3およびセグメント条件記憶部4の内容を書き換える。具体的には、条件編集部13は、入力装置22から入力される作業者の指示に従って、図形条件記憶部3内の図形条件を追加または削除する。また、条件編集部13は、入力装置22から入力される作業者の指示に従って、セグメント条件記憶部4内のセグメント条件を追加または削除する。また、条件編集部13は、パラメータが存在する図形条件またはセグメント条件については、入力装置22から入力される作業者の指示に従って、パラメータを変更してもよい。
 図面情報指定部14は、表示装置21、入力装置22、図面データ記憶部2、図形条件記憶部3、セグメント条件記憶部4および条件編集部13に接続されている。図面情報指定部14は、入力装置22から入力される作業者の指示に従い、図面依存条件のパラメータとなる図面の情報を図面データ記憶部2から読み出して条件編集部13へ送る。本実施の形態における図面依存条件は、パラメータを定義する際に図面データ記憶部2に格納されている図面データが必要となる図形条件またはセグメント条件である。従って、図面依存条件のパラメータは、図形条件またはセグメント条件のパラメータであるとも言える。
 図面依存条件のパラメータに直接的に利用される図面の情報は、図面データ記憶部2に格納されているレイヤ名またはセグメント番号である。また、図面情報指定部14は、図面データ記憶部2に格納されている図面データと座標系とを対応付けることによって図面データ内のセグメントとの間の位置関係を計算できる点または閉図形を、図面依存条件のパラメータに用いてもよい。本実施の形態では、後述する図形条件16~18までと、後述するセグメント条件6,7とが、図面依存条件である。
 条件編集部13は、図面情報指定部14から送られてくる図面の情報に基づいて、図形条件またはセグメント条件を編集する。条件編集部13は、作業者が図面依存条件の編集を行う際に、図面情報指定部14を呼び出す。図面情報指定部14は、レイヤ指定部15、点指定部16、閉図形指定部17およびセグメント指定部18を有している。
 レイヤ指定部15は、図面データ記憶部2に格納されているレイヤの情報を表示装置21に表示させ、作業者が入力装置22を操作することによって指定したレイヤの名称を条件編集部13へ送る。
 点指定部16は、図面データ記憶部2に格納されている図面の情報を表示装置21に表示させ、作業者が入力装置22を操作することによって指定した点を条件編集部13へ送る。作業者が指定する点は、図面の座標系で定義された点である。
 表示装置21に図面の情報がグラフィカルに表示される場合、作業者はタッチまたはクリックといった操作によって点を指定する。このとき、図面情報指定部14は、図面データ記憶部2に格納されているセグメントの端点を、選択しやすい表示方法で表示装置21に表示させることによって、作業者に容易な操作方法を提供してもよい。この場合、図面情報指定部14は、選択できることが分かりやすくなるように、セグメントの端点を他の図形要素とは異なる形式で表示する。なお、図面の情報が、セグメントの端点の座標値から成るテキストの形式で表示装置21に表示される場合には、作業者は、点の座標値を直接数値で入力してもよい。
 閉図形指定部17は、図面データ記憶部2に格納されている図面の情報を表示装置21に表示させ、作業者が入力装置22を操作することによって指定した閉図形を条件編集部13へ送る。作業者が指定する閉図形は、線分または円弧が連続して作図されることで定義される。
 表示装置21に図面の情報がグラフィカルに表示される場合、作業者は各線分または円弧の定義に必要な代表点を、タッチまたはクリックといった操作で指定していくことで、閉図形を定義する。
 なお、図面の情報が、セグメントの端点の座標値から成るテキストの形式で表示装置21に表示される場合には、作業者は、線分または円弧の定義に必要な代表点の座標値を直接数値で入力していくことで、閉図形を定義してもよい。
 セグメント指定部18は、図面データ記憶部2に格納されているセグメントの情報を表示装置21に表示させる。このとき、セグメント指定部18は、図形条件記憶部3に設定されている図形条件およびセグメント条件記憶部4に設定されているセグメント条件を参照し、作業者がセグメントを指定しやすくなるように表示方法を調整する。例えば、セグメント指定部18は、セグメント条件を満たしていないセグメントに対し、セグメントの色を目立たない色に変えて表示させる。作業者は、表示装置21を見て、入力装置22を操作し、セグメントを指定する。セグメント指定部18は、指定されたセグメントのセグメント番号を条件編集部13へ送る。
 なお、図面の情報が、セグメントの端点の座標値およびセグメント番号から成るテキストの形式で表示装置21に表示される場合には、作業者は、セグメント番号を入力することでセグメントを指定してもよい。
 表示装置21に図面の情報がグラフィカルに表示される場合、セグメント指定部18で指定可能なセグメントの指定方法は複数ある。セグメント指定部18で指定可能な指定方法は、以下の第1~第6の指定方法である。
 (第1の指定方法)
 第1の指定方法は、クリックまたはタッチによって単一のセグメントを指定する方法である。
 (第2の指定方法)
 第2の指定方法は、入力装置22を用いて作図された線分に交差したセグメントを全て指定する方法である。この方法の場合、セグメント指定部18は、図面データ記憶部2に格納されている全てのセグメントについて、作図された線分と交差するか否かの判定を行う。セグメント指定部18は、セグメントの種類が線分である場合、線分と線分との交差判定を行い、セグメントの種類が円弧である場合、円弧と線分との交差判定を行う。そして、セグメント指定部18は、交差していると判定した全てのセグメントを指定されたセグメントとする。
 (第3の指定方法)
 第3の指定方法は、入力装置22を用いて作図された線分と交差しなかったセグメントを全て指定する方法である。セグメント指定部18は、図面データ記憶部2に格納されている全てのセグメントについて、作図された線分と交差するか否かの判定を行う。セグメント指定部18は、セグメントの種類が線分である場合、線分と線分との交差判定を行い、セグメントの種類が円弧である場合、円弧と線分との交差判定を行う。そして、セグメント指定部18は、交差していないと判定した全てのセグメントを指定されたセグメントとする。
 (第4の指定方法)
 第4の指定方法は、入力装置22を用いて作図された矩形内に有る全てのセグメントを指定する方法である。セグメント指定部18は、図面データ記憶部2に格納されている全てのセグメントについて、セグメントの全体が矩形内に入っているか否かの判定を行う。そして、セグメント指定部18は、矩形内に入っていると判定した全てのセグメントを指定されたセグメントとする。
 (第5の指定方法)
 第5の指定方法は、入力装置22を用いて作図された矩形内に無い全てのセグメントを指定する方法である。セグメント指定部18は、図面データ記憶部2に格納されている全てのセグメントについて、セグメントの全体が矩形内に入っているか否かの判定を行う。そして、セグメント指定部18は、矩形内に入っていないと判定した全てのセグメントを指定されたセグメントとする。
 (第6の指定方法)
 第6の指定方法は、表示装置21の表示範囲内に無い全てのセグメントを指定する方法である。例えば、表示範囲が矩形である場合、セグメント指定部18は、図面データ記憶部2に格納されている全てのセグメントについて、セグメントの全体が表示範囲に対応する矩形内に入っているか否かの判定を行う。そして、セグメント指定部18は、矩形内に入っていないと判定した全てのセグメントを指定されたセグメントとする。
 なお、セグメント指定部18は、矩形以外にも、点、線、連続した複数の線、マウスで描いた自由曲線、多角形または円に対して、包含関係または交差関係を用いることでセグメントを指定してもよい。
 目的図形候補生成部7は、図面データ記憶部2に格納されている全てのセグメントを読み出して、セグメント条件判定部6に順番に送る。セグメント条件判定部6は、セグメント毎に「真」または「偽」を目的図形候補生成部7に返す。
 目的図形候補生成部7は、セグメント条件判定部6から送られてくる「真」または「偽」を示す情報に基づいて、図面データ記憶部2に格納されているセグメントの中からセグメント条件を満たすセグメントを抽出する。目的図形候補生成部7は、抽出したセグメントを組み合わせた図形判定候補を複数作成する。目的図形候補生成部7は、作成した目的図形候補を図形条件判定部5に順番に送る。図形条件判定部5は、図形判定候補毎に「真」または「偽」を目的図形候補生成部7に返す。
 目的図形候補生成部7は、図形条件判定部5から送られてくる「真」または「偽」を示す情報に基づいて、図形判定候補の中から図形条件を満たす図形判定候補のみを目的図形候補記憶部8に格納する。この目的図形候補記憶部8に格納される図形判定候補が、作業者に提示される目的図形の候補である。
 なお、目的図形候補生成部7は、目的図形の候補または図形判定候補を生成する際に、図形条件記憶部3に格納されている図形条件を参照してもよい。この場合、目的図形候補生成部7は、参照した図形条件に基づいて目的図形の候補または図形判定候補を生成してもよいし、図形条件を満たさない目的図形の候補または図形判定候補の生成を除外してもよい。
 整理すると、目的図形候補記憶部8に格納する目的図形の候補が各図形条件を満たしていることを保証する方法には2通りの方法がある。1つ目の方法は、目的図形候補生成部7が、図形判定候補の生成時に図形条件を参照し、図形条件を満たすように図形判定候補を生成する方法である。2つ目の方法は、図形条件判定部5が、目的図形候補生成部7で生成された図形判定候補が図形条件を満たすか否かを判定し、図形条件が満たされていないものを排除する方法である。目的図形候補生成部7は、あくまでも図形判定候補のうち全ての図形条件を満たしたもののみを目的図形候補記憶部8に記憶する。このように、1つ目の方法の場合、目的図形の候補が図形条件を満たすか否かを目的図形候補生成部7が判定し、2つ目の方法の場合、目的図形の候補が図形条件を満たすか否かを図形条件判定部5が判定する。
 1つ目の方法の場合、目的図形候補生成部7は、図形条件に基づいて図形判定候補を生成し、その後、生成した図形判定候補を構成するセグメントがセグメント条件を満たすか否かの判定に基づいて、目的図形の候補を生成してもよい。換言すると、目的図形候補生成部7は、先に図形条件から図形を生成し、その生成した図形を構成するセグメントについて、セグメント条件判定部6がセグメント条件を満たしているか否かを判定する。そして、目的図形候補生成部7が、生成した図形のうち、図形を構成するすべてのセグメントがセグメント条件を満たす図形のみを目的図形候補記憶部8に記憶してもよい。
 例えば、目的とする図形が四角形の場合には、目的図形候補生成部7は、図面にある線分4本の組み合わせについて総当たりで、まず閉ループになっているか、すなわち、線分同士が端点で接続しているかを判定する。そして、セグメント条件判定部6が、4本の線分がセグメント条件を満たしているか否かを判定する。
 目的図形選択部9は、目的図形候補記憶部8に格納されている目的図形の候補の情報を表示装置21に表示させる。目的図形選択部9は、入力装置22からの作業者の指示に従い、目的図形の候補の中から作業者が意図している目的図形を選択する。目的図形選択部9が選択した目的図形は、図形選択装置101内に格納しておいてもよいし、外部装置に出力されてもよい。
 条件自動更新部31は、図形条件記憶部3に格納されている図形条件と、セグメント条件記憶部4に格納されているセグメント条件と、目的図形候補記憶部8に格納されている目的図形の候補を分析する。条件自動更新部31は、分析結果に基づいて、図形条件記憶部3に格納されている図形条件の追加、削除またはパラメータ変更を行う。また、条件自動更新部31は、分析結果に基づいて、セグメント条件記憶部4に格納されているセグメント条件の追加、削除またはパラメータ変更を行う。
 つぎに、図形選択装置101の動作処理手順について説明する。図2は、実施の形態1に係る図形選択装置の動作処理手順を示すフローチャートである。図形選択装置101は、動作を開始すると、ステップS10において、前回入力した図面データを再利用するか否かを確認する。図形選択装置101は、前回入力した図面データを再利用することを示す再利用指示が入力装置22から入力されたか否かをチェックしている。再利用指示が無かった場合、すなわち、ステップS10においてNoの場合、ステップS20において、図面データ入力部1は、CADデータから図面データを読み出して図面データ記憶部2に入力する。ここでのCADデータの一例は、DXF(Drawing Exchange Format)ファイルである。
 図面データ入力部1は、図面データからセグメントを読み込む際には、全てのセグメントに異なるセグメント番号を割り当てる。そして、図面データ入力部1は、セグメント番号とセグメントとを対応付けして、セグメントとともに図面データ記憶部2に入力する。これにより、図面データ記憶部2は、セグメント番号とセグメントとが対応付けされたものを記憶する。
 この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されているプリセット条件を設定する。具体的には、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件を図形条件記憶部3に設定する。また、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されているセグメント条件をセグメント条件記憶部4に設定する。図形選択装置101では、プリセット条件設定部12が図形条件を図形条件記憶部3に格納することが、図形条件を図形条件記憶部3に設定することに対応している。また、プリセット条件設定部12がセグメント条件をセグメント条件記憶部4に格納することが、セグメント条件をセグメント条件記憶部4に設定することに対応している。
 ステップS10においてYesの場合、すなわち、再利用指示があった場合、ステップS20の処理が実行されることなく、ステップS30において、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されているプリセット条件を設定する。
 プリセット条件が設定された後、ステップS40において、作業者が条件の手動設定を行うと、条件編集部13が、作業者による入力装置22への指示に従って、図形条件およびセグメント条件の追加、削除または変更を行う。
 条件編集部13は、パラメータを伴わない図形条件を追加する際には、何れの種類の何れの図形条件が追加されたかを示す情報を、図形条件記憶部3に格納する。また、条件編集部13は、パラメータを伴わないセグメント条件を追加する際には、何れの種類の何れのセグメント条件が追加されたかを示す情報を、セグメント条件記憶部4に格納する。
 また、条件編集部13は、パラメータを伴う図形条件を追加する際には、パラメータの指定を作業者に求め、作業者に指定されたパラメータを、追加された図形条件の種類とともに図形条件記憶部3に格納する。また、条件編集部13は、パラメータを伴うセグメント条件を追加する際には、パラメータの指定を作業者に求め、作業者に指定されたパラメータを、追加されたセグメント条件の種類とともにセグメント条件記憶部4に格納する。
 また、条件編集部13は、既に設定されている図形条件のパラメータの変更を行う場合には、新たなパラメータの指定を作業者に求め、図形条件記憶部3が記憶しているパラメータを、作業者に指定されたパラメータで書き換える。また、条件編集部13は、既に設定されているセグメント条件のパラメータの変更を行う場合には、新たなパラメータの指定を作業者に求め、セグメント条件記憶部4が記憶しているパラメータを、作業者に指定されたパラメータで書き換える。
 また、条件編集部13は、図形条件を削除する場合には、削除対象の図形条件を図形条件記憶部3が記憶する図形条件から消去する。また、条件編集部13は、セグメント条件を削除する場合には、削除対象のセグメント条件をセグメント条件記憶部4が記憶するセグメント条件から消去する。
 ステップS40において、作業者が図面依存条件のパラメータを指定する際には、図面情報指定部14が、作業者の指示に従ってパラメータを指定する。図面情報指定部14は、各図形条件および各セグメント条件について、パラメータを伴うか否かを判断し、伴う場合にはどのようなパラメータをどのように設定するかを決定する。図面情報指定部14が図形条件およびセグメント条件の種類毎に行う種々の判断および決定については後述する。
 なお、パラメータが異なる場合、作業者は同じ種類の図形条件、または、同じ種類のセグメント条件を、複数設定してもよい。ステップS40においては、条件編集部13が、図形条件およびセグメント条件を編集するための編集画面を表示装置21に表示させる。この編集画面において、条件編集部13は、使用頻度が高いと考えられる条件の編集項目を、スクロール操作または別の画面を開く操作が不要な、すぐに編集できる位置に配置してもよい。また、条件編集部13は、使用頻度が低いと考えられるその他の条件の編集項目を、スクロール操作または別の画面を開く操作で辿りつける位置に配置してもよい。
 また、本実施の形態では、ステップS40において、条件編集部13が、ステップS30で設定されたプリセット条件に含まれる図形条件、および、セグメント条件を編集できる場合について説明したが、条件編集部13は、プリセット条件設定部12が設定した図形条件、および、セグメント条件の変更を禁止し、削除、および、パラメータの変更を、作業者が追加した図形条件、または、セグメント条件に限定してもよい。
 作業者が、図形条件またはセグメント条件の編集を完了すると、ステップS50において、目的図形候補生成部7が、目的図形の候補を生成する。具体的には、目的図形候補生成部7は、図面データ記憶部2に格納されている全てのセグメントに対して、1つずつセグメント条件判定部6でセグメント条件を満たすか否かの判定を行なわせる。そして、セグメント条件判定部6からの第1の判定結果である判定結果に基づいて、目的図形候補生成部7が、全セグメントの中からセグメント条件を全て満たしたセグメントだけを抽出する。セグメント条件判定部6において、各セグメント条件がどのように判定されるかの具体例については後述する。目的図形候補生成部7は、セグメントを抽出した後、抽出したセグメントを組み合わせることによって図形を生成する。ここでの図形が、図形判定候補である。
 目的図形候補生成部7は、図形判定候補を図形条件判定部5に送り、図形判定候補が図形条件を満たすか否かの判定を図形条件判定部5に行なわせる。目的図形候補生成部7は、図形条件判定部5からの第2の判定結果である判定結果に基づいて、図形条件を全て満たした目的図形の候補のみを目的図形候補記憶部8に格納する。
 目的図形候補生成部7は、セグメントの組み合わせを総当たりで行い、全ての組み合わせについて図形条件判定部5が、図形条件を満たすか否かの判定を行う。図形条件判定部5において、各図形条件がどのように判定されるかの具体例については後述する。
 図形条件判定部5が、生成された図形判定候補の全てに対して判定処理を終えると、ステップS60において、目的図形選択部9が、目的図形候補記憶部8に格納された目的図形の候補を表示装置21に表示させる。
 この後、ステップS70において、図形選択装置101は、目的図形の候補生成をやり直すか否かを判定する。図形選択装置101は、目的図形の候補生成をやり直すことを示すやり直し指示が入力装置22から入力されたか否かをチェックしている。作業者がやり直しを指示する場合には、目的とする図形が目的図形の候補の中に無い場合、または目的図形の候補が多すぎて目的図形を探し出すのが困難である場合が考えられる。
 やり直し指示があった場合、すなわち、ステップS70においてYesの場合、ステップS71において、条件自動更新部31が、目的図形候補記憶部8に格納されている目的図形の候補の情報に基づいて、図形条件記憶部3およびセグメント条件記憶部4の内容である図形条件またはセグメント条件の自動更新を行う。
 具体的には、条件自動更新部31は、目的図形候補記憶部8内の全ての目的図形の候補に含まれているセグメントを探し、もしあれば、このセグメントのセグメント番号をパラメータに設定した後述の図形条件16を、図形条件記憶部3に追加する。
 また、条件自動更新部31は、目的図形候補記憶部8内の何れの目的図形の候補にも含まれていないセグメントを探し、もしあれば、このセグメントのセグメント番号をパラメータに設定した後述のセグメント条件7を、セグメント条件記憶部4に追加する。
 ステップS71において、条件自動更新部31が、図形条件またはセグメント条件の自動更新を行った後、図形選択装置101は、ステップS40~S70の処理を繰り返す。そして、ステップS70においてNoの場合、すなわち、やり直し指示が無かった場合、ステップS80において、目的図形選択部9は、目的図形の選択を行う。具体的には、目的図形選択部9が、入力装置22から入力される作業者の指示に従って、ステップS60で表示された目的図形の候補の中から、目的図形の選択を行う。その後、図形選択装置101は、動作を停止する。
 なお、図形選択装置101は、他のシステムの一部に用いられてもよい。図形選択装置101は、CADシステムまたはCAMシステムに組み込まれてもよい。この場合、ステップS10における再利用指示は、作業者からではなく、CADシステムまたはCAMシステムから図形選択装置101に送られてもよい。また、図面データ記憶部2と図面情報指定部14は、CADシステムまたはCAMシステムに配置されていてもよい。
 また、図形選択装置101は、NCの自動プログラミング装置の一部に用いられてもよい。この場合、自動プログラミング装置を使ったプログラミングにおいて、作業者が加工の種類を選択すると、自動プログラミング装置内の図形選択装置101が、図形の候補を提示する。ここで提示される図形の候補は、作業者によって選択された加工の種類で加工が行われた場合に、加工が適切となる個所の図形である。提示された図形の候補の中から作業者が図形を選択すると、自動プログラミング装置は、選択された図形のデータから加工パスを生成する。
 具体例を説明する。作業者が、事前に自動プログラミング装置に対して図面データを読み込ませ原点を設定していたとする。作業者が、複数ある加工の種類の中からポケット加工を選択したとき、自動プログラミング装置内の図形選択装置101が、図面に存在する閉領域を目的図形の候補に設定して提示する。提示された候補の1つを作業者が選択すると、自動プログラミング装置は、選択された図形、つまり、閉領域をポケット加工する加工パスを生成する。
 このような自動プログラミング装置は、一部に図形選択装置101を以下のように備えることで実現可能である。まず、プリセット条件記憶部11が、加工の種類ごとに異なる複数のプリセット条件を記憶する。各プリセット条件は、各加工の種類で選択される図形に対応するものである。
 つぎに、作業者が加工の種類を選択した際に、自動プログラミング装置は、加工の種類に対応したプリセット条件を指定して、図形選択装置101を起動させる。そして、図形選択装置101において、ステップS30まで実行された際に、プリセット条件設定部12は、自動プログラミング装置からの指定に従ってプリセット条件を設定する。これにより、図形選択装置101は、加工の種類に対して適切な目的図形の候補を提示することができる。従って、作業者は、提示された目的図形の候補の中から目的の図形を選択することによって加工形状を指示することができる。
 また、自動プログラミング装置がプリセット条件を指定して図形選択装置101を起動した後、図形選択装置101は、最初にステップS40の処理となった際にだけ、条件の手動設定をスキップさせてもよい。図形選択装置101は、プリセット条件だけで適切に少数の目的図形の候補に絞り込めることができる場合、上述のスキップを行うことで、作業者による操作回数を削減できる。具体的には、自動プログラミング装置は、作業者が加工の種類を選択するだけで、目的図形の候補、つまり、加工個所の候補を表示する。従って、作業者が、加工個所の候補の中の1つを選択するだけで、加工形状の指示を完了させることができるようになる。
 なお、本実施の形態に係る図形選択装置101は、三次元の図面データに対して用いられてもよいし、二次元の図面データに対して用いられてもよい。線分または円弧といったセグメントは、三次元座標系においても定義可能である。また、セグメント条件は、レイヤに関係するもの以外は、三次元の図面データに対しても、そのまま利用可能である。さらに、図形条件についても、そのまま、もしくは、多少の修正で、三次元の図面データに対しても利用可能なものがある。従って、図形選択装置101は、適切なセグメント条件と適切な図形条件を用いることで、三次元の図面データに対しても適用可能である。
 つぎに、各図形条件の具体例と、各セグメント条件の具体例について説明する。本実施の形態では、図形選択装置101が、図形条件1~18の何れかと、セグメント条件1~7の何れかと、を用いて目的図形の候補を生成する。
 (図形条件1)
 図形条件1は、判定する図形が指定された属性を持っているという条件である。属性の一例は、ハッチングまたは塗りつぶしの色といった装飾の情報であるが、図形に付与できる属性であれば何れの情報でもよい。図形条件1が用いられる場合、図形条件1のパラメータは、属性の内容である。
 条件編集部13は、ステップS40において、作業者が図形条件1を追加する場合または図形条件1のパラメータを変更する場合に、作業者が指示した属性の内容を図形条件記憶部3に格納する。
 そして、図形条件判定部5は、ステップS50において、図形条件1を判定する際に、図面データ記憶部2に格納されている属性のうちの図形に対応するものの中から、判定する図形に付与されているとみなせる属性を全て抽出する。抽出した属性の中に、図形条件記憶部3内に格納されているパラメータである属性と同じものがあれば、図形条件判定部5は、図形条件1は満たされていると判定する。一方、抽出した属性の中に、図形条件記憶部3内に格納されているパラメータである属性と同じものがなければ、図形条件判定部5は、図形条件1は満たされていないと判定する。
 (図形条件2)
 図形条件2は、判定される図形の面積が指定された範囲内であるという条件である。この図形条件2のパラメータは、判定される図形の面積の最小値および最大値である。条件編集部13は、ステップS40において、作業者が図形条件2を追加する場合または図形条件2のパラメータを変更する場合に、作業者が指示した面積の最小値および最大値を図形条件記憶部3に格納する。
 そして、図形条件判定部5は、ステップS50において、図形条件2を判定する際に、まず、判定する図形の面積を計算する。そして、図形条件判定部5は、計算した面積と、図形条件記憶部3に格納されている面積の最小値および最大値とを比較する。計算した面積が、最小値以上であり且つ最大値以下であれば、図形条件判定部5は、図形条件2は満たされていると判定する。一方、計算した面積が、最小値よりも小さいかまたは最大値よりも大きい場合、図形条件判定部5は、図形条件2は満たされていないと判定する。
 (図形条件3)
 図形条件3は、判定する図形を構成する全ての円および円弧の半径が同一であるという条件である。この図形条件3は、パラメータを含んでいない。図形条件判定部5は、図形条件3を判定する際に、まず、判定する図形を構成するセグメントの中から円および円弧のみを抽出する。円および円弧の何れもが存在しなかった場合には、図形条件判定部5は、図形条件3は満たされていると判定して処理を終了する。
 一方、円および円弧の何れかが存在していた場合には、図形条件判定部5は、半径の比較を行う。半径の比較では、図形条件判定部5が、集めた円および円弧の中から、任意の1つの円または円弧を選択し、選択した円または円弧の半径を調べる。そして、図形条件判定部5は、集めた円および円弧について、これらの全ての半径が、任意で選択した円または円弧の半径と同じであるか否かの判定を行う。集めた円および円弧の全ての半径が任意で選択した円または円弧の半径と同じであれば、図形条件判定部5は、図形条件3は満たされていると判定する。一方、集めた円および円弧の何れかの半径が任意で選択した円または円弧の半径と異なる場合、図形条件判定部5は、図形条件3は満たされていないと判定する。
 (図形条件4)
 図形条件4は、判定する図形を構成するセグメントの数が指定された範囲内に入っているという条件である。図形条件4のパラメータは、セグメント数の最小値および最大値である。条件編集部13は、ステップS40において、作業者が図形条件4を追加する場合または図形条件4のパラメータを変更する場合に、作業者が指示したセグメント数の最小値および最大値を図形条件記憶部3に格納する。
 そして、図形条件判定部5は、ステップS50において、図形条件4を判定する際に、まず、判定する図形のセグメント数を数える。そして、図形条件判定部5は、数えたセグメント数と、図形条件記憶部3に格納されているセグメント数の最小値および最大値とを比較する。数えたセグメント数が、最小値以上であり且つ最大値以下であれば、図形条件判定部5は、図形条件4は満たされていると判定する。一方、数えたセグメント数が、最小値よりも小さいまたは最大値よりも大きい場合、図形条件判定部5は、図形条件4は満たされていないと判定する。
 なお、図形条件判定部5は、判定する図形のセグメント数を数える際に、曲率が一定の同一線上で連続している複数のセグメントを1つのセグメントに数えてもよい。この処理は、作業者が目的としている図形の辺の一部が、別の図形と重なっているような場合に有効である。
 図3は、図形条件のセグメント数を説明するための図である。図3は、作業者が目的としている図形の一例を示している。線分A2は、三角形の一辺であり、かつ、四角形の一辺の一部となっている。また、線分A1,A3は、四角形の一辺の一部である。
 目的の図形が図3に示す四角形である場合、図形条件判定部5が、同一の直線上に配置された線分A1~A3をまとめて1つのセグメントに数えると、セグメント数の最小値および最大値が共に4つとなる。この場合、作業者は、セグメント数の最小値および最大値が4つであるという図形条件4を設定しておけばよい。これは四角形の辺の数は4つであるという一般的知識と整合するので、作業者は、パラメータの設定を容易に行うことが可能となる。
 (図形条件5)
 図形条件5は、判定する図形を構成するコンポーネントの数が指定された範囲に入っているという条件である。本実施の形態におけるコンポーネントは、直接的に、もしくは、間接的に接続しているセグメントの集まりである。本実施の形態において、第1のセグメントと第2のセグメントとが直接的に接続しているということは、第1のセグメントと第2のセグメントとが接していることを意味している。また、本実施の形態において、第1のセグメントと第2のセグメントとが間接的に接続しているということは、第1のセグメントから出発して直接的に接続したセグメントを辿っていくことで第2のセグメントに辿りつけることを意味している。
 図4は、図形条件のコンポーネント数を説明するための図である。図4は、作業者が目的としている図形の一例を示している。線分B1と線分B2とは、直接的に接続されており、線分B2と線分B3とは、直接的に接続されている。そして、線分B1と線分B3とは、間接的に接続されている。また、線分B4は、何れの線分とも接続していない。以上から、図4に示す図形には、線分B1~B3の3つから成るコンポーネントと、線分B4の1つから成るコンポーネントがあるので、図4に示す図形のコンポーネント数は2となる。
 図形条件5のパラメータは、コンポーネント数の最小値および最大値である。条件編集部13は、ステップS40において、作業者が図形条件5を追加する場合または図形条件5のパラメータを変更する場合、作業者が指示したコンポーネント数の最小値および最大値を図形条件記憶部3に格納する。
 そして、図形条件判定部5は、ステップS50において、図形条件5を判定する際に、まず、判定する図形のコンポーネント数を計算する。さらに、図形条件判定部5は、計算したコンポーネント数と、図形条件記憶部3に格納されているコンポーネント数の最小値および最大値とを比較する。計算したコンポーネント数が、最小値以上であり且つ最大値以下であれば、図形条件判定部5は、図形条件5は満たされていると判定する。一方、計算したコンポーネント数が、最小値よりも小さいまたは最大値よりも大きい場合、図形条件判定部5は、図形条件5は満たされていないと判定する。
 (図形条件6)
 図形条件6は、判定する図形が分岐を持たないという条件である。図形条件判定部5は、判定する図形を構成するセグメントの端点に対して、3つ以上の端点が同一点となっていないかを判定する。この図形条件6は、パラメータを含んでいない。
 図形条件判定部5は、ステップS50において、図形条件6を判定する際に、判定する図形を構成するセグメントにおける全ての端点について、他の端点と同一点であるかを判定する。図形条件判定部5は、他の2つ以上の端点と同一点と判定された端点が1つもなければ、図形条件6は満たされていると判定する。一方、図形条件判定部5は、他の2つ以上の端点と同一点と判定された端点が1つでもあれば、図形条件6は満たされていないと判定する。
 (図形条件7)
 図形条件7は、判定する図形が1つまたは複数の閉ループで構成されているという条件である。この図形条件7は、パラメータを含んでいない。図形条件判定部5は、ステップS50において、図形条件7を判定する際に、以下の図5に示すフローチャートに従って動作する。
 図5は、閉ループ判定の処理手順を示すフローチャートである。図形条件判定部5は、図形条件7の判定を開始すると、ステップS100において、判定する図形が分岐を持つか否かを判定する。具体的には、図形条件判定部5は、図形条件6、つまり、分岐を持たないという条件を満たしているかを判定する。
 判定する図形が分岐を持つ場合、すなわち、ステップS100においてYesの場合、図形条件判定部5は、ステップS192において、図形条件7は満たされていないと判定する。そして、図形条件判定部5は、図形条件7は満たされていないことを示す判定結果である「偽」を示す情報を、目的図形候補生成部7に返す。そして、図形条件判定部5は、判定処理を終了する。
 一方、判定する図形が分岐を持たない場合、すなわち、ステップS100においてNoの場合、図形条件判定部5は、ステップS110において、判定する図形の中に未判定のセグメントが残っているか否かを判定する。このとき、図形条件判定部5は、訪れていないセグメントを未判定のセグメントとみなす。
 未判定のセグメントが残っている場合、すなわち、ステップS110においてYesの場合、図形条件判定部5は、ステップS120において、未判定である、つまり、未訪問のセグメントの中から任意の未判定のセグメントを選択し、選択したセグメントから始めて、一方向に隣接するセグメントを辿っていく。このとき、図形条件判定部5は、辿った、つまり、訪れたセグメントの記録を残す。そして、図形条件判定部5は、ステップS130において、辿り始めの元のセグメントに戻ってきたか否かを判定する。
 元のセグメントに戻ってきた場合、すなわち、ステップS130においてYesの場合、図形条件判定部5は、ステップS110~S130の処理を行う。そして、図形条件判定部5は、ステップS130においてNoの場合、すなわち、元のセグメントに戻ってくることなく、隣接するセグメントが無くなった場合、ステップS192において、図形条件7は満たされていないと判定する。そして、図形条件判定部5は、図形条件7は満たされていないことを示す判定結果である「偽」を示す情報を、目的図形候補生成部7に返す。そして、図形条件判定部5は、判定処理を終了する。
 一方、ステップS110においてNoの場合、すなわち、未判定のセグメントが残っていない場合、図形条件判定部5は、ステップS191において、図形条件7は満たされていると判定する。そして、図形条件判定部5は、図形条件7は満たされていることを示す判定結果である「真」を示す情報を、目的図形候補生成部7に返す。そして、図形条件判定部5は、判定処理を終了する。
 (図形条件8)
 図形条件8は、判定する図形が分岐を持たず、かつ、閉ループである連続線を持たないという条件である。この図形条件8は、パラメータを含んでいない。図形条件判定部5は、ステップS50において、図形条件8を判定する際に、以下の図6に示すフローチャートに従って動作する。
 図6は、連続線判定の処理手順を示すフローチャートである。図6のフローチャートは、図5のフローチャートと比較して、ステップS130とステップS230が異なる。図形条件判定部5は、図形条件8の判定を開始すると、ステップS200において、判定する図形が分岐を持つか否かを判定する。判定する図形が分岐を持つ場合、すなわち、ステップS200においてYesの場合、図形条件判定部5は、ステップS292において、図形条件8は満たされていないと判定する。そして、図形条件判定部5は、判定処理を終了する。
 一方、判定する図形が分岐を持たない場合、すなわち、ステップS200においてNoの場合、図形条件判定部5は、ステップS210において、判定する図形の中に未判定のセグメントが残っているか否かを判定する。このとき、図形条件判定部5は、訪れていないセグメントを未判定のセグメントとみなす。
 未判定のセグメントが残っている場合、すなわち、ステップS210においてYesの場合、図形条件判定部5は、ステップS220において、未判定である、つまり、未訪問のセグメントの中から任意の未判定のセグメントを選択し、選択したセグメントから始めて、一方向に隣接するセグメントを辿っていく。このとき、図形条件判定部5は、辿った、つまり、訪れたセグメントの記録を残す。そして、図形条件判定部5は、ステップS230において、辿り始めの元のセグメントに戻ってきたか否かを判定する。
 元のセグメントに戻ってくることなく、隣接するセグメントが無くなった場合、すなわち、ステップS230においてNoの場合、図形条件判定部5は、ステップS210~S230の処理を行う。そして、図形条件判定部5は、ステップS230においてYesの場合、すなわち、元のセグメントに戻ってきた場合、ステップS292において、図形条件8は満たされていないと判定する。そして、図形条件判定部5は、判定処理を終了する。
 一方、ステップS210においてNoの場合、すなわち、未判定のセグメントが残っていない場合、図形条件判定部5は、ステップS291において、図形条件8は満たされていると判定する。そして、図形条件判定部5は、判定処理を終了する。
 (図形条件9)
 図形条件9は、判定する図形が2つの閉ループで構成され、かつ、一方の閉ループが他方の閉ループを包含しているという条件である。この図形条件9は、パラメータを含んでいない。図形条件判定部5は、ステップS50において、図形条件9を判定する際に、まず、図形条件7、つまり、図形が閉ループで構成されているという条件を満たすか否かの判定を行う。
 図形が閉ループで構成されていない場合、図形条件判定部5は、図形条件9は満たされていないと判定し、判定処理を終了する。一方、図形が閉ループで構成されている場合、図形条件判定部5は、図形条件9は満たされると判定し、コンポーネント数の条件判定処理に進む。
 図形条件判定部5は、コンポーネント数の条件である図形条件5に基づいて、コンポーネント数が2つ以上かつ2つ以下であるか否かを判定する。コンポーネント数が2つ以上かつ2つ以下でない場合、図形条件判定部5は、図形条件9は満たされていないと判定し、判定処理を終了する。一方、コンポーネント数が2つ以上かつ2つ以下である場合、図形条件判定部5は、図形条件9は満たされていると判定し、包含関係の確認処理に進む。
 ここまでの判定で、図形条件判定部5は、判定する図形が2つの閉ループから構成されることが分かっている。包含関係の確認処理では、図形条件判定部5は、2つの閉ループについて、一方の閉ループが他方の閉ループを包含しているか否かを判定する。
 図形条件判定部5は、2つの閉ループのうちの何れか一方の閉ループを選び、選んだ閉ループを包含する側の閉ループと仮定し、他方の閉ループを包含される側の閉ループであると仮定する。そして、図形条件判定部5は、包含される側の閉ループの全てのセグメントが、包含する側の閉ループに包含されているか否かを判定する。
 図形条件判定部5は、包含される側の全てのセグメントが包含する側に包含されていれば、図形条件9は満たされていると判定する。一方、図形条件判定部5は、何れかのセグメントが包含する側に包含されていなければ、図形条件判定部5は、包含する側の閉ループと包含される側の閉ループとを入れ替えて、1回目と同様に2回目の包含判定を行う。閉ループを入れ替えて行った2回目の包含判定の結果が、包含される側の全てのセグメントが包含する側に包含されているというものであれば、図形条件判定部5は、図形条件9は満たされていると判定する。一方、図形条件判定部5は、2回目の包含判定の結果が、何れかのセグメントが包含する側に包含されていないというものであれば、図形条件9は満たされていないと判定する。
 (図形条件10)
 図形条件10は、判定する図形が外回り閉図形であるという条件である。この図形条件10は、パラメータを含んでいない。外回り閉図形は、複数の隣接した閉図形が複合化されて構成されている全体閉図形において、内側の閉図形を全て含む最も外側の輪郭をとる閉図形である。閉図形が、複数の隣接した閉図形が複合化されて構成されている全体閉図形ではなく単一の閉図形である場合には、この単一の閉図形が、外回り閉図形となる。
 ステップS50において、図形条件判定部5は、図形条件10を判定する前に、セグメント条件を満たしたセグメントの抽出を行う。そして、図形条件判定部5は、抽出したセグメントの集合から、全ての外回り閉図形を抽出する。図形条件判定部5は、外回り閉図形を抽出する際に、特許第2942681号公報に開示されている方法において、セグメントを回る向きを見る方法を用いる。なお、図形条件判定部5は、他の方法によって外回り閉図形を抽出してもよい。
 図形条件判定部5は、抽出した外回り閉図形の中から判定する図形と同じ図形を探す。図形条件判定部5は、同じ図形が見つかった場合は、図形条件10は満たされていると判定し、同じ図形が見つからなかった場合は、図形条件10は満たされていないと判定する。
 (図形条件11)
 図形条件11は、判定する図形が内回り閉図形であるという条件である。この図形条件11は、パラメータを含んでいない。内回り閉図形は、この内側を見た場合に、複数の隣接する閉図形が複合化されていない閉図形である。
 ステップS50において、図形条件判定部5は、図形条件11を判定する前に、セグメント条件を満たしたセグメントの抽出を行う。そして、図形条件判定部5は、抽出したセグメントの集合から、全ての内回り閉図形を抽出する。図形条件判定部5は、内回り閉図形を抽出する際に、特許第2942681号公報に開示されている方法において、セグメントを回る向きを見る方法を用いる。特許第2942681号公報の手法においては、外回り閉図形とはセグメントを回る向きが逆向きの閉図形が、内回り閉図形である。なお、図形条件判定部5は、他の方法によって内回り閉図形を抽出してもよい。
 図形条件判定部5は、抽出した内回り閉図形の中から判定する図形と同じ図形を探す。図形条件判定部5は、同じ図形が見つかる場合は、図形条件11は満たされていると判定し、同じ図形が見つからない場合は、図形条件11は満たされていないと判定する。
 (図形条件12)
 図形条件12は、判定する図形の各セグメントが滑らかに接続しているという条件である。数学的に表現すると、図形条件12は、判定する図形を表す曲線がn回微分可能であるという条件である。ここでのnは、基準値よりも大きな自然数である。図形条件12のパラメータは、微分可能回数である。
 条件編集部13は、図2のステップS40において、作業者が図形条件12を追加する場合、または図形条件12のパラメータを変更する場合には、作業者が指示した微分可能回数を図形条件記憶部3に格納する。
 ステップS50において、図形条件判定部5が図形条件12を判定する際に、図形条件判定部5は、まず、判定する図形を構成する全てのセグメントに対して、図形条件記憶部3に格納されている微分可能回数の微分が可能であるか否かの判定を行う。
 つぎに、図形条件判定部5は、判定する図形を構成する2つのセグメントが接続している全ての接続点について、図形条件記憶部3に格納されている微分可能回数の微分が可能であるか否かの判定を行う。
 全てのセグメントが微分可能であり、かつ、全ての接続点で微分可能である場合、図形条件判定部5は、図形条件12は満たされていると判定する。一方、何れかのセグメントが微分不可能であるか、または、何れかの接続点で微分不可能である場合、図形条件判定部5は、図形条件12は満たされていないと判定する。
 図形条件判定部5は、1回の微分が可能であるか否かを判定する際に、判定する図形を構成する全てのセグメントが1回の微分が可能であるか否かと、これらセグメント間の全ての接続点でセグメントの接線ベクトルが合致しているか否かと、を判定する。
 (図形条件13)
 図形条件13は、判定する図形が鏡像対称性を有しているという条件である。図形条件13のパラメータは、図形の対称軸であるが、作業者は、図形条件13のパラメータを設定しなくてもよい。
 ステップS40において、作業者が図形条件13を追加する場合、または図形条件13のパラメータを変更する場合、作業者が指示した場合に、条件編集部13は、図形条件記憶部3に対称軸を格納する。
 作業者が対称軸を指定する場合、本実施の形態では、セグメント指定部18が、作業者からの指示に従って、図面データ記憶部2に含まれる線分を指定することで対称軸を指定する。なお、図形選択装置101は、作業者に直線の定義を数値入力させ、この直線の定義で対称軸を指定してもよい。図形条件判定部5は、ステップS50において、図形条件13を判定する際に、以下の図7に示すフローチャートに従って動作する。
 図7は、鏡像対称性判定の処理手順を示すフローチャートである。図形条件判定部5は、図形条件13の判定を開始すると、ステップS300において、図形条件記憶部3が対称軸を記憶しているか否かに基づいて、図形に対称軸が与えられているか否かを判定する。
 図形に対称軸が与えられている場合、すなわち、ステップS300においてYesの場合、図形条件判定部5は、ステップS350において、図形条件記憶部3に記憶された対称軸に対して鏡像対称なセグメントが存在するかを判定する。このとき、図形条件判定部5は、判定する図形を構成する全てのセグメントに対して1つずつ鏡像対称か否かの判定を行う。
 鏡像対称な部分の存在を判定する方法の一例は、以下の方法である。まず、図形条件判定部5は、判定中のセグメントを、判定する図形を構成する他の全てのセグメントと順次比較していく。図形条件判定部5は、判定中のセグメントに対して鏡像対称となる部分を記録しておく。図形条件判定部5は、判定中のセグメント以外の他のセグメントとの比較を全て行う。そして、図形条件判定部5は、全ての比較が終わると、判定中のセグメント全体について鏡像対称となるセグメントが記録の中から見つかったか否かを判定する。見つかった場合、図形条件判定部5は、判定中のセグメントには鏡像対称の部分が存在すると判定する。一方、図形条件判定部5は、見つからない部分がある場合、判定中のセグメントには鏡像対称の部分が存在しないと判定する。
 図形条件判定部5は、判定する図形を構成する全てのセグメントに対して、鏡像対称な部分が存在するか否かを判定する。図形条件判定部5は、判定する図形を構成する全てのセグメントに対して鏡像対称な部分が存在していると判定した場合、すなわち、ステップS350においてYesの場合、ステップS391において、鏡像対称性である対極性を持つという判定結果を目的図形候補生成部7に送る。具体的には、図形条件判定部5は、目的図形候補生成部7に対して、図形条件13は満たされているという判定結果である「真」の情報を送る。そして、図形条件判定部5は、図形が図形条件13を満たすか否かの判定処理を終了する。
 一方、ステップS350においてNoの場合、すなわち、図形条件判定部5が、判定する図形を構成する何れかのセグメントに対して鏡像対称な部分が存在していないと判定した場合、ステップS392において、図形条件判定部5は、対極性を持たないという判定結果を目的図形候補生成部7に送る。具体的には、図形条件判定部5は、目的図形候補生成部7に対して、図形条件13は満たされていないという判定結果である「偽」の情報を送る。そして、図形条件判定部5は、図形が図形条件13を満たすか否かの判定処理を終了する。
 ステップS300においてNoの場合、すなわち、図形に対称軸が与えられていない場合、図形条件判定部5は、ステップS310において、判定する図形を構成するセグメントを用いて、セグメント対のリストを作成する。具体的には、図形条件判定部5は、判定する図形を構成するセグメントに対し、全てのセグメントの組み合わせを表すために、各組み合わせに対応するセグメント対の全てを含むリストを作成する。
 そして、図形条件判定部5は、ステップS320において、リストに次のセグメント対が残っているか否かを判定する。リストに次のセグメント対が残っている場合、すなわち、ステップS320においてYesの場合、図形条件判定部5は、ステップS330において、セグメント対から対称軸を計算できたか否かを判定する。
 具体的には、図形条件判定部5は、まず、リストから任意のセグメント対を選ぶ。そして、図形条件判定部5は、選んだセグメント対の2つのセグメントが鏡像対称となる場合の対称軸の計算を試みる。図形条件判定部5は、対称軸を計算できなかった場合、すなわち、対称軸を見つけ出すことができなかった場合、選んだセグメント対をリストから削除する。対称軸を見つけ出すことができない場合の例は、セグメント対の一方が線分であり、他方が円弧である場合である。
 図形条件判定部5は、セグメント対から対称軸を計算できた場合、すなわち、ステップS330においてYesの場合、ステップS340において、計算した対称軸に対して鏡像対称となるセグメントが存在するか否かを判定する。このとき、図形条件判定部5は、計算した対称軸に対して鏡像対称となるセグメントの部分が存在するか否かを、判定する図形を構成する全てのセグメントに対して1つずつ判定する。図形条件判定部5は、ステップS330で計算した対称軸に対し、ステップS350と同様の処理によって図形を構成する各セグメントに対して鏡像対称判定を行う。
 図形条件判定部5は、全てのセグメントに対して鏡像対称な部分が存在していると判定した場合、すなわち、ステップS340においてYesの場合、ステップS391において、鏡像対称性である対極性を持つという判定結果を目的図形候補生成部7に送る。そして、図形条件判定部5は、図形が図形条件13を満たすか否かの判定処理を終了する。
 一方、ステップS340においてNoの場合、すなわち、図形条件判定部5が、何れかのセグメントに対して鏡像対称な部分が存在していないと判定した場合、図形条件判定部5は、ステップS330で選んだセグメント対をリストから削除する。そして、図形条件判定部5は、ステップS320の処理に進む。
 ステップS320においてNoの場合、すなわち、リストに次のセグメント対が残っていない場合、図形条件判定部5は、ステップS392において、対極性を持たないという判定結果を目的図形候補生成部7に送る。そして、図形条件判定部5は、図形が図形条件13を満たすか否かの判定処理を終了する。
 ステップS320においてYesの場合、すなわち、リストに次のセグメント対が残っている場合、図形条件判定部5は、ステップS330において、セグメント対から対称軸を計算できたか否かを判定する。
 ステップS330においてNoの場合、すなわち、セグメント対から対称軸を計算できなかった場合、図形条件判定部5は、ステップS320の処理に進む。ステップS330においてYesの場合、すなわち、セグメント対から対称軸を計算できた場合、図形条件判定部5は、ステップS340において、計算した対称軸に対して鏡像対称となるセグメントが存在するか否かを判定する。
 図形選択装置101は、ステップS340の後、ステップS391において鏡像対称性を持つという判定結果を目的図形候補生成部7に送るか、または、ステップS392において鏡像対称性を持たないという判定結果を目的図形候補生成部7に送るまで、ステップS320~S340の処理を繰り返す。
 (図形条件14)
 図形条件14は、判定する図形が回転対称性を持っているという条件である。本実施の形態における回転条件は、回転中心、回転角度、および繰り返し回数の3つから成る条件であるとする。図形条件14のパラメータは、回転条件であるが、このパラメータを設定するか否かは作業者が選ぶことができる。作業者は、パラメータを設定する場合には、回転条件の3つの項目全てを設定しなくてはならない。一方、作業者は、パラメータを設定しない場合は、回転条件の全ての項目を設定しないままにしなくてはならない。作業者は、入力装置22に回転条件を入力することによって回転条件を設定する。
 作業者が、図2のステップS40において、新たにパラメータを設定する場合、または、既に設定されているパラメータを変更する場合、作業者は、回転条件の3つの項目のうち、繰り返し回数を数値で直接指定する。また、作業者は、回転中心を回転中心の座標値で設定し、回転角度を回転角度の数値で設定する。なお、作業者は、セグメント指定部18で図面データ記憶部2に含まれるセグメントを2つ指定することで回転中心および回転角度の設定を行ってもよい。条件編集部13は、作業者が指定した回転条件を図形条件記憶部3に格納する。
 ここで、図8~図10を用いて、回転中心および回転角度の計算方法を説明する。図8は、回転角の第1の例を示す図であり、図9は、回転角の第2の例を示す図であり、図10は、回転角の第3の例を示す図である。
 図形条件判定部5は、回転させると一致する2つのセグメントから、回転中心および回転角度を求めることができる。セグメントが共に線分の場合、線分の端点の対応関係が2通り考えられるので、回転中心は2つ求まるが、回転角度は何れの回転中心でも同じ値となる。この場合、作業者が線分を2つ選んだ後に、図面情報指定部14は、求まった2つの回転中心を表示装置21に表示させるので、作業者は何れかの回転中心を選択する。
 図8は、セグメントSc1の端点C1とセグメントSc2の端点C3とを対応させ、セグメントSc1の端点C2とセグメントSc2の端点C4とを対応させた場合の回転角CO1を示している。直線CL51は、端点C1および端点C3の垂直二等分線であり、直線CL52は、端点C2および端点C4の垂直二等分線である。
 そして、垂直二等分線である直線CL51,CL52の交点が、回転中心CO1である。回転角度CR61は、この回転中心CO1から対応する端点へ各々伸ばした線分が成す角度である。図8では、回転中心CO1から端点C1,C3へ伸ばした線分で回転角度CR61を示している。
 図9は、セグメントSc3の端点C21とセグメントSc4の端点C24とを対応させ、セグメントSc3の端点C22とセグメントSc4の端点C23とを対応させた場合の回転角CO2を示している。直線CL53は、端点C21および端点C24の垂直二等分線であり、直線CL54は、端点C22および端点C23の垂直二等分線である。
 そして、垂直二等分線である直線CL53,CL54の交点が、回転中心CO2である。回転角度CR62は、この回転中心CO2から対応する端点へ各々伸ばした線分が成す角度である。図9では、回転中心CO2から端点C22,C23へ伸ばした線分で回転角度CR62を示している。
 2つの円弧を平面の中で回転させて一致させるためには、円弧上の任意の点から時計回りに進んで達する円弧の端点同士と、反時計回りに進んで達する円弧の端点同士とを対応させる必要がある。この対応を示したのが、図10である。
 図10は、セグメントSc5の端点C31とセグメントSc6の端点C33とを対応させ、セグメントSc5の端点C32とセグメントSc6の端点C34とを対応させた場合の回転角CO3を示している。直線CL55は、端点C31および端点C33の垂直二等分線であり、直線CL56は、端点C32および端点C34の垂直二等分線である。
 そして、垂直二等分線である直線CL55,CL56の交点が、回転中心CO3である。回転角度CR63は、この回転中心CO3から対応する端点へ各々伸ばした線分が成す角度である。図10では、回転中心CO3から端点C31,C33へ伸ばした線分で回転角度CR63を示している。
 図形条件判定部5は、図2のステップS50において、図形条件14である回転対称性判定を行う際に、以下の図11に示すフローチャートに従って動作する。図11は、回転対称性判定の処理手順を示すフローチャートである。
 図形条件判定部5は、図形条件14の判定を開始すると、ステップS400において、図形条件記憶部3が回転条件を記憶しているか否かに基づいて、回転条件が設定されているか否かを判定する。
 回転条件が設定されている場合、すなわち、ステップS400においてYesの場合、図形条件判定部5は、ステップS450において、回転条件を用いれば、判定する図形に一致する繰り返し部分が存在するか否かを判定する。このとき、図形条件判定部5は、判定する図形を構成するセグメントを組み合わせて繰り返し部分の候補を生成する。そして、図形条件判定部5は、生成した繰り返し部分の候補を、図形条件記憶部3に記憶された回転条件、つまり、回転中心、回転角度、および、繰り返し回数に従って複製する。図形条件判定部5は、複製した繰り返し部分の候補が、判定する図形に一致する図形となるか否かの判定を行う。
 図形条件判定部5は、セグメントの組み合わせを全て生成し、生成したセグメントの各組み合わせについて、回転対称の繰り返し部分であるか否かを判定する。具体的には、図形条件判定部5は、判定する図形を構成するセグメントの組み合わせを、総当たりで行い、全ての組み合わせを生成する。この生成されたセグメントの組み合わせの1つ1つが繰り返し部分の候補となる。次に、図形条件判定部5は、各繰り返し部分の候補を、回転条件に従って複製していき図形を生成する。この図形を複製結果の図形と呼ぶ。図形条件判定部5は、複製結果の図形を得るために、まず、繰り返し部分の候補を回転させずに複製する。次に、図形条件判定部5は、繰り返し部分の候補を、回転中心を中心にして、回転角度だけ反時計回りに回転させ、回転させたものを、前記の複製結果の図形に追加する。
 繰り返し回数が2回であれば、図形条件判定部5は、ここまでで複製結果の図形の完成とする。繰り返し回数が3回以上であれば、図形条件判定部5は、繰り返し部分の候補をさらに回転させ、回転させたものを、前記の複製結果の図形にさらに追加する処理を、繰り返し回数に達するまで繰り返す。図形条件判定部5は、複製結果の図形が出来上がったら、この複製結果の図形を、判定する図形と比較する。図形条件判定部5は、複製結果の図形と判定する図形が一致すれば、複製結果の図形の元となった繰り返し部分の候補は、真の繰り返し部分であったと判定する。図形条件判定部5は、複製結果の図形と判定する図形が一致しなければ、複製結果の図形の元となった繰り返し部分の候補は、真の繰り返し部分ではなかったと判定する。
 ステップS450においてYesの場合、すなわち、図形条件記憶部3に記憶された回転条件で、判定する図形に一致する繰り返し部分の候補が1つでも見つかる場合、図形条件判定部5は、ステップS491において、回転対称性を持つという判定結果を目的図形候補生成部7に送る。具体的には、図形条件判定部5は、目的図形候補生成部7に対して、図形条件14は満たされているという判定結果である「真」の情報を送る。そして、図形条件判定部5は、図形が図形条件14を満たすか否かの判定処理を終了する。
 一方、ステップS450においてNoの場合、すなわち、図形条件記憶部3に記憶された回転条件で、判定する図形に一致する繰り返し部分の候補が1つも見つからない場合、図形条件判定部5は、ステップS492において、回転対称性を持たないという判定結果を目的図形候補生成部7に送る。具体的には、図形条件判定部5は、目的図形候補生成部7に対して、図形条件14は満たされていないという判定結果である「偽」の情報を送る。そして、図形条件判定部5は、図形が図形条件14を満たすか否かの判定処理を終了する。
 ステップS400においてNoの場合、すなわち、回転条件が設定されてない場合、図形条件判定部5は、ステップS410において、判定する図形を構成するセグメントを用いて、セグメント対のリストを作成する。具体的には、図形条件判定部5は、判定する図形を構成するセグメントに対し、全てのセグメントの組み合わせを表すために、各組み合わせに対応するセグメント対の全てを含むリストを作成する。
 そして、図形条件判定部5は、ステップS420において、リストに次のセグメント対が残っているか否かを判定する。リストに次のセグメント対が残っている場合、すなわち、ステップS420においてYesの場合、図形条件判定部5は、ステップS430において、セグメント対から回転中心を計算できたか否かを判定する。
 具体的には、図形条件判定部5は、まず、リストから任意のセグメント対を選ぶ。そして、図形条件判定部5は、選んだセグメント対の2つのセグメントから、図8~図10で説明した方法によって回転中心の計算を試みる。図形条件判定部5は、回転中心を計算できなかった場合、すなわち、回転中心を見つけ出すことができなかった場合、選んだセグメント対をリストから削除する。回転中心を見つけ出すことができない場合の例は、セグメント対の一方が線分であり、他方が円弧である場合である。
 図形条件判定部5は、セグメント対から回転中心を計算できた場合、すなわち、ステップS430においてYesの場合、図形条件判定部5は、ステップS440において、回転条件を用いれば、判定する図形に一致する繰り返し部分が存在するか否かを判定する。
 具体的には、図形条件判定部5は、計算した回転中心から回転条件を導出する。そして、図形条件判定部5は、導出した回転条件を用いれば、判定する図形に一致する繰り返し部分が存在するかについて判定を行う。図形条件判定部5は、ステップS430で計算した回転中心が2つある場合には、一致判定処理を2回繰り返す。
 図形条件判定部5は、まず、ステップS430で計算した回転中心から任意の1つを選び、図8~図10で説明した方法によって回転中心から回転角度を求める。次に、図形条件判定部5は、繰り返し部分を探すため、判定する図形を構成するセグメントの全てを総当たりで組み合わせることによって、繰り返し部分の候補を生成し、各繰り返し部分の候補に対して一致判定を行う。図形条件判定部5は、この時点で、試す回転条件のうち、回転中心および回転角度は決定している。図形条件判定部5は、繰り返し回数については、まずは2回と仮定する。図形条件判定部5は、回転条件と繰り返し部分の候補から複製結果の図形を求める。複製結果の図形の具体的な求め方は、ステップS450と同様である。
 図形条件判定部5は、複製結果の図形が出来上がったら、この複製結果の図形を、判定する図形と比較する。図形条件判定部5は、複製結果の図形と判定する図形とが一致すれば、複製結果の図形の元となった繰り返し部分の候補は、真の繰り返し部分であり、繰り返し部分が見つかったと判定する。図形条件判定部5は、複製結果の図形と判定する図形とが一致しなかった場合は、判定を保留する。そして、図形条件判定部5は、現在の繰り返し部分の候補に対して繰り返し回数を変えて複製結果の図形を生成するか、または現在の繰り返し部分の候補を却下して次の繰り返し部分の候補の判定へと移るかを決めるために、複製結果の図形のセグメントと判定する図形のセグメントとの対応関係を調べる。
 具体的には、図形条件判定部5は、複製結果の図形を構成する第1のセグメントと、判定する図形を構成する第2のセグメントとの、位置および形状が同じ場合、第1および第2のセグメントは対応しているものと判定する。図形条件判定部5は、第1および第2のセグメントの対応付けを1対1で行い、既に対応付けられているセグメントに対して別のセグメントを対応付けることは行わない。
 図形条件判定部5は、複製結果の図形を構成する全てのセグメントについて対応付けを試みた後に、対応付けのできなかった複製結果の図形のセグメントが残った場合には、現在の繰り返し部分の候補を却下して、次の繰り返し部分の候補の判定へと移る。
 一方、図形条件判定部5は、複製結果の図形を構成する全てのセグメントについて対応付けを試みた後に、対応付けのできなかった複製結果の図形のセグメントが残らなかった場合には、判定する図形のセグメントの中に対応付けられなかったものがあると判定する。この場合、図形条件判定部5は、繰り返し回数を1回増やして3回と仮定し、複製から対応付けまでの処理を繰り返す。
 図形条件判定部5は、繰り返し回数を1回増やすたびに複製結果のセグメントを増加して行く。従って、図形条件判定部5が繰り返し回数を1回ずつ増やしていくと、どこかの回数で、複製結果の図形と判定する図形とが一致する場合がある。この場合、図形条件判定部5は、繰り返し部分が見つかったと判定する。
 一方、図形条件判定部5が繰り返し回数を増やしても、複製結果と判定する図形とが一致しない場合がある。この場合、複製結果の図形を構成するセグメントの中に、判定する図形のセグメントと対応付けられないものが発生するので、図形条件判定部5は、繰り返し部分の候補を却下する。図形条件判定部5は、全ての繰り返し部分の候補を却下した場合には、ステップS430で選んだセグメント対をリストから削除する。そして、図形条件判定部5は、繰り返し部分が見つからなかったと判定する。
 ステップS440においてYesの場合、すなわち、ステップS430で計算した回転中心を基にした回転条件で、判定する図形に一致する繰り返し部分の候補が1つでも見つかる場合、図形条件判定部5は、ステップS491において、回転対称性を持つという判定結果を目的図形候補生成部7に送る。そして、図形条件判定部5は、図形が図形条件14を満たすか否かの判定処理を終了する。
 一方、ステップS440においてNoの場合、すなわち、ステップS430で計算した回転中心を基にした回転条件で、判定する図形に一致する繰り返し部分の候補が1つも見つからない場合、図形条件判定部5は、ステップS420の処理へ進む。
 なお、図形選択装置101は、作業者が、回転条件の3つの項目のうちの、1項目だけ、もしくは、2項目だけを設定できるようにしてもよい。この場合、図形条件判定部5は、ステップS440からステップS491へと進む条件に、直前に複製を行った際の回転条件の3項目のうち作業者によって設定されている項目に対して項目設定値と一致しているという条件を足しておく。これにより、図形条件判定部5は、作業者が部分的に行った設定を満たす形で回転対称性を持つときのみ、図形条件14が満たされていると判定することとなる。
 ステップS420においてNoの場合、すなわち、リストに次のセグメント対が残っていない場合、図形条件判定部5は、ステップS492において、回転対称性を持たないという判定結果を目的図形候補生成部7に送る。そして、図形条件判定部5は、図形が図形条件14を満たすか否かの判定処理を終了する。
 ステップS420においてYesの場合、すなわち、リストに次のセグメント対が残っている場合、図形条件判定部5は、ステップS430において、セグメント対から回転中心を計算できたか否かを判定する。
 ステップS430においてNoの場合、すなわち、セグメント対から回転中心を計算できなかった場合、図形条件判定部5は、ステップS420の処理へ進む。ステップS430においてYesの場合、すなわち、セグメント対から回転軸を計算できた場合、図形条件判定部5は、ステップS440の処理へ進む。
 図形選択装置101は、ステップS440の後、ステップS491において回転対称性を持つという判定結果を目的図形候補生成部7に送るか、または、ステップS492において回転対称性を持たないという判定結果を目的図形候補生成部7に送るまで、ステップS420~S440の処理を繰り返す。
 (図形条件15)
 図形条件15は、判定する図形が並進対称性を持っているという条件である。本実施の形態における並進条件は、並進ベクトルおよび繰り返し回数の2つから成る条件であるとする。図形条件15のパラメータは、並進条件であるが、このパラメータを設定するか否かは作業者が選ぶことができる。作業者は、パラメータを設定する場合には、並進条件の2つの項目全てを設定しなくてはならない。一方、作業者は、パラメータを設定しない場合は、全ての項目を設定しないままにしなくてはならない。作業者は、入力装置22に並進条件を入力することによって並進条件を設定する。
 図2のステップS40において、作業者が設定または指定を行う場合、入力装置22は、作業者からの指示を受付ける。この場合において、作業者が新たにパラメータを設定する場合、または、既に設定されているパラメータを変更する場合、作業者は、並進条件の2つの項目のうち、繰り返し回数を数値で直接指定する。また、作業者は、並進ベクトルの要素値を数値で設定するか、またはセグメント指定部18で図面データ記憶部2に含まれるセグメントを2つ指定することで並進ベクトルを設定する。
 そして、条件編集部13は、作業者が指定した並進条件を図形条件記憶部3に格納する。並進させると一致する2つのセグメントからは、図12または図13に示すような並進ベクトルを求めることができる。
 ここで、図12および図13を用いて、並進ベクトルの計算方法を説明する。2つのセグメントのうちの一方のセグメントの両端点の中点から、他方のセグメントの両端点の中点へ向かうベクトルを、並進ベクトルとする。条件編集部13または作業者は、並進ベクトルの起点を何れのセグメントの中点にするかを任意に決定する。
 図12は、並進ベクトルの第1の計算方法を説明するための図であり、図13は、並進ベクトルの第2の計算方法を説明するための図である。図12では、2つの線分のセグメントSd1,Sd2から求められた並進ベクトルD1を示している。また、図13では、2つの円弧のセグメントSd3,Sd4から求められた並進ベクトルD2を示している。図2のステップS50において、図形条件判定部5が図形条件15を判定する場合、図形条件判定部5は、以下の図14に示すフローチャートに従って動作する。
 図14は、並進対称性判定の処理手順を示すフローチャートである。図形条件判定部5は、図形条件15の判定を開始すると、ステップS500において、図形条件記憶部3に並進条件が記憶されているか否かに基づいて、並進条件が設定されているか否かを判定する。
 並進条件が設定されている場合、すなわち、ステップS500においてYesの場合、図形条件判定部5は、ステップS550において、並進条件を用いれば、判定する図形に一致する繰り返し部分が存在するか否かを判定する。このとき、図形条件判定部5は、判定する図形を構成するセグメントを組み合わせて繰り返し部分の候補を生成する。そして、図形条件判定部5は、生成した繰り返し部分の候補を、図形条件記憶部3に記憶された並進条件、つまり、並進ベクトル、および、繰り返し回数に従って複製する。図形条件判定部5は、複製した繰り返し部分の候補が、判定する図形に一致する図形となるか否かの判定を行う。
 図形条件判定部5は、繰り返し部分の候補を生成するためのセグメントの組み合わせを、判定する図形を構成するセグメントの総当たりで行い、全ての組み合わせを生成する。この生成されたセグメントの組み合わせの1つ1つが繰り返し部分の候補となる。次に、図形条件判定部5は、各繰り返し部分の候補を、並進条件に従って複製していき図形を生成する。この図形を複製結果の図形と呼ぶ。
 図形条件判定部5は、複製結果の図形を得るために、まず、繰り返し部分を元の位置のままで複製する。次に、図形条件判定部5は、繰り返し部分を、並進ベクトルの分だけ並進移動させ、並進移動させたものを前記の複製結果の図形に追加する。
 繰り返し回数が2回であれば、図形条件判定部5は、ここまでで複製結果の図形の完成とする。繰り返し回数が3回以上であれば、図形条件判定部5は、繰り返し部分をさらに並進移動させ、並進移動させたものを、前記の複製結果の図形にさらに追加する処理を、繰り返し回数に達するまで繰り返す。図形条件判定部5は、複製結果の図形が出来上がると、この複製結果の図形を、判定する図形と比較する。図形条件判定部5は、複製結果の図形と判定する図形とが一致すれば、複製結果の図形の元となった繰り返し部分の候補は、真の繰り返し部分であったと判定する。図形条件判定部5は、複製結果の図形と判定する図形とが一致しなければ、複製結果の図形の元となった繰り返し部分の候補は、真の繰り返し部分ではなかったと判定する。
 ステップS550においてYesの場合、すなわち、図形条件記憶部3に記憶された並進条件で、判定する図形に一致する繰り返し部分の候補が1つでも見つかる場合、図形条件判定部5は、ステップS591において、並進対称性を持つという判定結果を目的図形候補生成部7に送る。具体的には、図形条件判定部5は、目的図形候補生成部7に対して、図形条件15は満たされているという判定結果である「真」の情報を送る。そして、図形条件判定部5は、図形が図形条件15を満たすか否かの判定処理を終了する。
 一方、ステップS550においてNoの場合、すなわち、図形条件記憶部3に記憶された並進条件で、判定する図形に一致する繰り返し部分の候補が1つも見つからない場合、図形条件判定部5は、ステップS592において、並進対称性を持たないという判定結果を目的図形候補生成部7に送る。具体的には、図形条件判定部5は、目的図形候補生成部7に対して、図形条件15は満たされていないという判定結果である「偽」の情報を送る。そして、図形条件判定部5は、図形が図形条件15を満たすか否かの判定処理を終了する。
 ステップS500においてNoの場合、すなわち、図形に並進条件が与えられていない場合、図形条件判定部5は、ステップS510において、判定する図形を構成するセグメントを用いて、セグメント対のリストを作成する。具体的には、図形条件判定部5は、判定する図形を構成するセグメントに対し、全てのセグメントの組み合わせを表すために、各組み合わせに対応するセグメント対の全てを含むリストを作成する。
 そして、図形条件判定部5は、ステップS520において、リストに次のセグメント対が残っているか否かを判定する。リストに次のセグメント対が残っている場合、すなわち、ステップS520においてYesの場合、図形条件判定部5は、ステップS530において、セグメント対から並進ベクトルを計算できたか否かを判定する。
 具体的には、図形条件判定部5は、まず、リストから任意のセグメント対を選ぶ。そして、図形条件判定部5は、選んだセグメント対の2つのセグメントから、図12および図13で説明した方法によって並進ベクトルの計算を試みる。図形条件判定部5は、並進ベクトルを計算できなかった場合、すなわち、並進ベクトルを見つけ出すことができなかった場合、選んだセグメント対をリストから削除する。並進ベクトルを見つけ出すことができない場合の例は、セグメント対の一方が線分であり、他方が円弧である場合である。
 図形条件判定部5は、セグメント対から並進ベクトルを計算できた場合、すなわち、ステップS530においてYesの場合、図形条件判定部5は、ステップS540において、並進ベクトルを用いれば、判定する図形に一致する繰り返し部分が存在するか否かを判定する。
 具体的には、図形条件判定部5は、計算した並進ベクトルから並進条件を導出する。そして、図形条件判定部5は、導出した並進条件を用いれば、判定する図形に一致する繰り返し部分が存在するかについて判定を行う。図形条件判定部5は、繰り返し部分を探すため、総当たりで繰り返し部分の候補を生成し、各繰り返し部分の候補に対して一致判定を行う。
 図形条件判定部5は、一致判定を行う際には、ステップS530で計算した並進ベクトルを用いる。このとき、図形条件判定部5は、繰り返し回数については、まずは2回と仮定する。図形条件判定部5は、並進条件に従って繰り返し部分の候補を複製した結果の図形を求める。複製した結果の図形の具体的な求め方は、ステップS550と同様である。図形条件判定部5は、複製結果の図形が出来上がると、この複製結果の図形を、判定する図形と比較する。図形条件判定部5は、複製結果の図形と判定する図形が一致すれば、複製結果の図形の元となった繰り返し部分の候補は、真の繰り返し部分であり、繰り返し部分が見つかったと判定する。図形条件判定部5は、複製結果の図形と判定する図形が一致しなかった場合は、判定を保留する。そして、図形条件判定部5は、現在の繰り返し部分の候補に対して繰り返し回数を変えて複製結果の図形を生成するか、または現在の繰り返し部分の候補を却下して次の繰り返し部分の候補の判定へと移るかを決めるために、複製結果の図形のセグメントと判定する図形のセグメントとの対応関係を調べる。
 具体的には、図形条件判定部5は、複製結果の図形を構成する第1のセグメントと、判定する図形を構成する第2のセグメントとの、位置および形状が同じ場合、第1および第2のセグメントは対応しているものと判定する。図形条件判定部5は、第1および第2のセグメントの対応付けを1対1で行い、既に対応付けられているセグメントに対して別のセグメントを対応付けることは行わない。
 図形条件判定部5は、複製結果の図形を構成する全てのセグメントについて対応付けを試みた後に、対応付けのできなかった複製結果の図形のセグメントが残った場合には、現在の繰り返し部分の候補を却下して、次の繰り返し部分の候補の判定へと移る。
 一方、図形条件判定部5は、複製結果の図形を構成する全てのセグメントについて対応付けを試みた後に、対応付けのできなかった複製結果の図形のセグメントが残らなかった場合には、判定する図形のセグメントの中に対応付けられなかったものがあると判定する。この場合、図形条件判定部5は、繰り返し回数を1回増やして3回と仮定し、複製から対応付けまでの処理を繰り返す。
 図形条件判定部5は、繰り返し回数を1回増やすたびに複製結果のセグメントを増加して行く。従って、図形条件判定部5が繰り返し回数を1回ずつ増やしていくと、どこかの回数で、複製結果の図形と判定する図形とが一致する場合がある。この場合、図形条件判定部5は、繰り返し部分が見つかったと判定する。
 一方、図形条件判定部5が繰り返し回数を増やしても、複製結果の図形と判定する図形とが一致しない場合がある。この場合、複製結果の図形を構成するセグメントの中に、判定する図形のセグメントと対応付けられないものが発生するので、図形条件判定部5は、繰り返し部分の候補を却下する。図形条件判定部5は、全ての繰り返し部分の候補を却下した場合には、ステップS530で選んだセグメント対をリストから削除する。そして、図形条件判定部5は、繰り返し部分が見つからなかったと判定する。
 ステップS540においてYesの場合、すなわち、ステップS530で計算した並進ベクトルを基にした並進条件で、判定する図形に一致する繰り返し部分の候補が1つでも見つかる場合、図形条件判定部5は、ステップS591において、並進対称性を持つという判定結果を目的図形候補生成部7に送る。そして、図形条件判定部5は、図形が図形条件15を満たすか否かの判定処理を終了する。
 一方、ステップS540においてNoの場合、すなわち、ステップS530で計算した並進ベクトルを基にした並進条件で、判定する図形に一致する繰り返し部分の候補が1つも見つからない場合、図形条件判定部5は、ステップS520の処理へ進む。
 なお、図形選択装置101は、作業者が、並進条件の2つの項目のうちの、1項目だけを設定できるようにしてもよい。この場合、図形条件判定部5は、ステップS540からステップS591へと進む条件に、直前に複製を行った際の並進条件の2項目のうち作業者によって設定されている項目に対して項目設定値と一致しているという条件を足しておく。これにより、図形条件判定部5は、作業者が部分的に行った設定を満たす形で並進対称性を持つときのみ、図形条件15が満たされていると判定することとなる。
 ステップS520においてNoの場合、すなわち、リストに次のセグメント対が残っていない場合、図形条件判定部5は、ステップS592において、並進対称性を持たないという判定結果を目的図形候補生成部7に送る。そして、図形条件判定部5は、図形が図形条件15を満たすか否かの判定処理を終了する。
 ステップS520においてYesの場合、すなわち、リストに次のセグメント対が残っている場合、図形条件判定部5は、ステップS530において、セグメント対から並進ベクトルを計算できたか否かを判定する。
 ステップS530においてNoの場合、すなわち、セグメント対から並進ベクトルを計算できなかった場合、図形条件判定部5は、ステップS520の処理へ進む。ステップS530においてYesの場合、すなわち、セグメント対から並進ベクトルを計算できた場合、図形条件判定部5は、ステップS540の処理へ進む。
 図形選択装置101は、ステップS540の後、ステップS591において並進対称性を持つという判定結果を目的図形候補生成部7に送るか、または、ステップS592において並進対称性を持たないという判定結果を目的図形候補生成部7に送るまで、ステップS520~S540の処理を繰り返す。
 (図形条件16)
 図形条件16は、判定する図形を構成するセグメントの中に、図面データ記憶部2に記憶されている特定のセグメントが存在しているという条件である。図形条件16のパラメータは、判定する図形を構成するセグメントの中に存在する必要があるセグメントのセグメント番号のリストである。
 図2のステップS40において、作業者が設定または指定を行う場合、入力装置22は、作業者からの指示を受付ける。この場合において、作業者が図形条件16を追加する場合、または図形条件16のパラメータを変更する場合、作業者が、セグメント指定部18を用いて1つまたは複数のセグメントを指定する。条件編集部13は、指定されたセグメントのセグメント番号をリストにして図形条件記憶部3に格納する。
 また、ステップS50において、図形条件判定部5が、図形条件16を判定する。このとき、図形条件判定部5は、判定を行う図形を構成するセグメントのセグメント番号の中に、図形条件記憶部3で記憶されているリスト内のセグメント番号が全て存在するか否かを確認する。図形条件判定部5は、全てのセグメント番号が存在すれば、図形条件16は満たされていると判定し、1つのセグメント番号でも存在しないものがあれば、図形条件16は満たされていないと判定する。
 (図形条件17)
 図形条件17は、判定する図形と指定点との間の幾何的関係の条件である。図形条件17のパラメータは、指定点と、幾何的関係の種類と、の2つである。幾何的関係の種類は、判定する図形が指定点を「含む」と、判定する図形が指定点を「含まない」の2種類である。
 図2のステップS40において、作業者が設定または指定を行う場合、入力装置22は、作業者からの指示を受付ける。この場合において、作業者が図形条件17を追加する場合、または図形条件17のパラメータを変更する場合、条件編集部13は作業者が指定した点と、幾何的関係の種類とを、図形条件記憶部3に格納する。作業者は、点を指定する際には、点指定部16を用いる。
 また、ステップS50において、図形条件17を判定する際に、図形条件判定部5は、まず、判定する図形が閉図形であるか否かを判定する。閉図形でない場合、図形条件判定部5は、図形条件17は満たされていないと判定して処理を終了する。一方、閉図形である場合、図形条件判定部5は、内外関係の判定処理へ進む。
 図形条件判定部5は、この時点で判定する図形が閉図形であることが分かっているので、閉図形と点との内外関係の判定を行うことで、指定点が判定する図形の内側と外側との何れにあるかを判定する。
 図形条件判定部5は、幾何的関係の種類が「含む」の場合、指定点が、判定する図形の内側であれば、図形条件17は満たされていると判定し、指定点が判定する図形の外側であれば、図形条件17は満たされていないと判定する。
 また、図形条件判定部5は、幾何的関係の種類が「含まない」の場合、指定点が、判定する図形の外側であれば、図形条件17は満たされていると判定し、指定点が判定する図形の内側であれば、図形条件17は満たされていないと判定する。
 (図形条件18)
 図形条件18は、判定する図形と指定閉図形との間の幾何的関係の条件である。図形条件18のパラメータは、指定閉図形と、幾何的関係の種類と、の2つである。幾何的関係の種類は、判定する図形と指定閉図形との関係が「交わる」および「交わらない」と、判定する図形が指定閉図形を「包含する」および「包含しない」と、判定する図形が指定閉図形に「包含される」および「包含されない」との合計6種類である。
 条件編集部13は、図2のステップS40において、作業者が図形条件18を追加する場合、または図形条件18のパラメータを変更する場合、作業者が指定した閉図形と、幾何的関係の種類とを、図形条件記憶部3に格納する。作業者は、閉図形を指定する際には、閉図形指定部17を用いる。
 図形条件判定部5は、図2のステップS50において、図形条件18を判定する際に、まず、判定する図形が閉図形であるか否かを確認する。閉図形でなかった場合、図形条件判定部5は、図形条件18は満たされていないと判定し処理を終了する。一方、閉図形であった場合、図形条件判定部5は、図形条件18は満たされる可能性があると判定し、ブーリアン演算へ進む。図形条件判定部5は、この時点で、判定する図形が閉図形であることが分かっているので、閉図形同士のブーリアン演算を行うことで、図形条件18を満たすか否かを判定する。
 幾何的関係の種類が、「交わる」または「交わらない」の場合、図形条件判定部5は、図形条件記憶部3に格納された指定閉図形と、判定する図形と、に対してブーリアン演算の積演算を行う。
 そして、幾何的関係の種類が、「交わる」の場合、図形条件判定部5は、演算の結果に残った部分が存在すれば、図形条件18は満たされていると判定し、演算の結果に残った部分が存在しなければ図形条件18は満たされていないと判定する。
 また、幾何的関係の種類が、「交わらない」の場合、図形条件判定部5は、演算の結果に残った部分が存在しなければ、図形条件18は満たされていると判定し、演算の結果に残った部分が存在すれば、図形条件18は満たされていないと判定する。
 幾何的関係の種類が、「包含する」または「包含しない」の場合、図形条件判定部5は、図形条件記憶部3に格納された指定閉図形から、判定する図形を引くブーリアン演算の差演算を行う。
 そして、幾何的関係の種類が、「包含する」の場合、図形条件判定部5は、演算の結果に残った部分が存在しなければ、図形条件18は満たされていると判定し、演算の結果に残った部分が存在すれば、図形条件18は満たされていないと判定する。
 また、幾何的関係の種類が、「包含しない」の場合、図形条件判定部5は、演算の結果に残った部分が存在すれば、図形条件18は満たされていると判定し、演算の結果に残った部分が存在しなければ、図形条件18は満たされていないと判定する。
 幾何的関係の種類が、「包含される」または「包含されない」の場合は、図形条件判定部5は、判定する図形から、図形条件記憶部3に格納された指定閉図形を引くブーリアン演算の差演算を行う。
 そして、幾何的関係の種類が、「包含される」の場合、図形条件判定部5は、演算の結果に残った部分が存在しなければ、図形条件18は満たされていると判定し、演算の結果に残った部分が存在すれば、図形条件18は満たされていないと判定する。
 また、幾何的関係の種類が、「包含されない」の場合、図形条件判定部5は、演算の結果に残った部分が存在すれば、図形条件18は満たされていると判定し、演算の結果に残った部分が存在しなければ、図形条件18は満たされていないと判定する。
 つぎに、各セグメント条件の具体例について説明する。セグメント条件は、作業者が選択しようとしている目的図形を構成する全てのセグメントが満たす必要のある条件である。本実施の形態のセグメント条件は、以下のセグメント条件1~7である。
 (セグメント条件1)
 セグメント条件1は、判定するセグメントが、指定された属性を持っているという条件である。属性の具体例は、色、線種、太さといった装飾の情報であるが、個々のセグメントに付与できる属性であれば何れの情報であってもよい。セグメント条件のパラメータは、属性の内容である。
 条件編集部13は、ステップS40においてセグメント条件1を追加する場合またはセグメント条件1のパラメータを変更する場合、作業者が指示した属性の内容をセグメント条件記憶部4に格納する。
 セグメント条件判定部6は、ステップS50においてセグメント条件を判定する際に、判定を行うセグメントのセグメント番号に基づいて、図面データ記憶部2からセグメントに付与されている属性を全て抽出する。セグメント条件判定部6は、抽出した属性の中に、セグメント条件記憶部4内に格納されているパラメータである属性と同じものがあれば、セグメント条件1は満たされていると判定する。一方、セグメント条件判定部6は、抽出した属性の中に、セグメント条件記憶部4内に格納されているパラメータである属性と同じものがなければ、セグメント条件1は満たされていないと判定する。
 (セグメント条件2)
 セグメント条件2は、判定するセグメントの曲率が指定された曲率の範囲内に入っているという条件である。セグメント条件2のパラメータは、1つ以上の曲率の最小値と最大値との組である。
 条件編集部13は、ステップS40においてセグメント条件2を追加する場合またはセグメント条件2のパラメータを変更する場合、作業者が指示した曲率の最小値と最大値との組を、1つ以上セグメント条件記憶部4に格納する。
 セグメント条件判定部6は、ステップS50においてセグメント条件を判定する際に、まず、判定を行うセグメントの曲率の値を計算する。セグメント条件判定部6は、セグメントの曲率が連続的に変化するものである場合、曲率の取る範囲を求める。次に、セグメント条件判定部6は、セグメント条件記憶部4に格納されている曲率の組全てに対し、計算した曲率の値、もしくは、曲率の範囲が、組の最小値以上で最大値以下に収まるか否かを判定する。セグメント条件判定部6は、収まる組が1つでも存在すれば、セグメント条件2は満たされていると判定し、収まる組が1つも無ければ、セグメント条件2は満たされていないと判定する。
 作業者が、図2のステップS40において、セグメント条件2に線分または半径rの円弧の何れかという指定を追加する場合がある。この場合、直線の曲率は0であり、半径rの円弧の曲率は1/rであるので、セグメント条件判定部6は、最小値が0で最大値が0の組と、最小値が1/rで最大値が1/rの組と、の2つの組をセグメント条件記憶部4に格納する。
 (セグメント条件3)
 セグメント条件3は、判定するセグメントが線分ならば、線分の長さが指定された範囲内に入っているという条件である。セグメント条件3のパラメータは、1つ以上の長さの最小値と最大値との組である。
 作業者が、図2のステップS40においてセグメント条件3を追加する場合またはセグメント条件3のパラメータを変更する場合、条件編集部13は、作業者が指示した長さの最小値と最大値との組を1つ以上セグメント条件記憶部4に格納する。
 セグメント条件判定部6は、ステップS50においてセグメント条件3を判定する際に、まず、セグメントが線分であるか否かを判定する。セグメント条件判定部6は、セグメントが線分でなかった場合には、セグメント条件3は満たされていると判定する。一方、セグメント条件判定部6は、セグメントが線分であった場合には、この線分の長さを計算する。そして、セグメント条件判定部6は、計算した長さが、セグメント条件記憶部4に格納されている長さの組全てに対し、これらの組の最小値以上かつ最大値以下に収まるか否かを判定する。セグメント条件判定部6は、収まる組が1つでも存在すれば、セグメント条件3は満たされていると判定し、収まる組が1つも無ければ、セグメント条件3は満たされていないと判定する。
 (セグメント条件4)
 セグメント条件4は、判定するセグメントが円弧ならば、この円弧の円弧中心角が指定された範囲内に入っているという条件である。セグメント条件4のパラメータは、1つ以上の中心角の最小値と最大値との組である。
 作業者が、図2のステップS40においてセグメント条件4を追加する場合またはセグメント条件4のパラメータを変更する場合、条件編集部13は、作業者が指示した中心角の最小値と最大値との組を1つ以上セグメント条件記憶部4に格納する。
 セグメント条件判定部6は、ステップS50においてセグメント条件4を判定する際に、まず、セグメントが一定曲率の曲線であるか否かを判定する。セグメント条件判定部6は、セグメントが一定曲率の曲線でなかった場合には、セグメント条件4は満たされていると判定する。一方、セグメント条件判定部6は、セグメントが一定曲率の曲線であった場合には、この曲線を円弧とみなしたときの中心角を計算する。そして、セグメント条件判定部6は、計算した中心角が、セグメント条件記憶部4に格納されている中心角の組全てに対し、これらの組の最小値以上かつ最大値以下に収まるか否かを判定する。セグメント条件判定部6は、収まる組が1つでも存在すれば、セグメント条件4は満たされていると判定し、収まる組が1つも無ければ、セグメント条件4は満たされていないと判定する。
 (セグメント条件5)
 セグメント条件5は、セグメントの両端で接線方向かつ外側に向かうベクトルと、座標系の軸のベクトルとが成す角度が、指定された角度の範囲内に入っているという条件である。セグメント条件5のパラメータは、1つ以上の角度の最小値と最大値との組である。
 作業者が、図2のステップS40においてセグメント条件5を追加する場合またはセグメント条件5のパラメータを変更する場合、条件編集部13は、作業者が指示した角度の最小値と最大値との組を1つ以上セグメント条件記憶部4に格納する。
 セグメント条件判定部6は、ステップS50においてセグメント条件を判定する際に、まず、判定を行うセグメントの両端で接線方向かつ外側に向かうベクトルを計算する。次に、セグメント条件判定部6は、計算した2つのベクトルの各々について、X軸正方向のベクトルと成す角度を計算する。このセグメント条件判定部6が計算する角度について図15および図16を用いて説明する。
 ここでは、図15および図16を用いて、セグメントと座標系との成す角度について説明する。図15は、線分のセグメントに対する角度を示す図であり、図16は、円弧のセグメントに対する角度を示す図である。図15は、線分のセグメントSe1に対してセグメント条件判定部6が計算する角度E11,E12を示し、図16は、円弧のセグメントSe2に対してセグメント条件判定部6が計算する角度E31,E32を示している。
 セグメント条件判定部6は、計算した2つの角度のうちの一方が、セグメント条件記憶部4に格納されている角度の組全てに対し、これらの組の最小値以上かつ最大値以下に収まるか否かを判定する。セグメント条件判定部6は、収まる組が1つでも存在すれば、2つの角度のうちの一方の角度は指定範囲内であると判定する。
 セグメント条件判定部6は、2つの角度のうちの他方についても、2つの角度のうちの一方と同様の判定を行う。セグメント条件判定部6は、2つの角度の両方が指定範囲内であった場合には、セグメント条件5が満たされていると判定し、2つの角度の何れか一方でも指定範囲内でなかった場合には、セグメント条件5が満たされていないと判定する。
 図15に示す線分のセグメントSe1の場合、セグメント条件判定部6は、セグメントSe1の両端で接線方向かつ外側に向かうベクトルE1,E2を計算する。そして、セグメント条件判定部6は、ベクトルE1について、X軸正方向のベクトルE3と成す角度E11を計算し、ベクトルE2について、X軸正方向のベクトルE3と成す角度E12を計算する。セグメント条件判定部6は、計算した角度E11,E12の両方が指定範囲内であった場合には、セグメント条件5が満たされていると判定する。
 図16に示す線分のセグメントSe2の場合、セグメント条件判定部6は、セグメントSe2の両端で接線方向かつ外側に向かうベクトルE21,E22を計算する。そして、セグメント条件判定部6は、ベクトルE21について、X軸正方向のベクトルE23と成す角度E31を計算し、ベクトルE22について、X軸正方向のベクトルE23と成す角度E32を計算する。セグメント条件判定部6は、計算した角度E31,E32の両方が指定範囲内であった場合には、セグメント条件5が満たされていると判定する。
 なお、ここでは角度の基準とするベクトルをX軸正方向のベクトルに固定する場合について説明したが、図形選択装置101は、作業者が、図面の座標系で定義される任意のベクトルをパラメータに設定できるようにしてもよい。
 (セグメント条件6)
 セグメント条件6は、指定されているレイヤに判定対象のセグメントが属していないという条件である。セグメント条件6のパラメータは、セグメントが属さないレイヤの名前である。
 作業者は、図2のステップS40においてセグメント条件6を追加する場合またはセグメント条件6のパラメータを変更する場合、レイヤ指定部15を用いてレイヤを1つ指定する。条件編集部13は、作業者によって指定されたレイヤの名前をセグメント条件記憶部4に格納する。
 セグメント条件判定部6は、ステップS50においてセグメント条件6を判定する際に、判定を行うセグメントのセグメント番号に基づいて、図面データ記憶部2からセグメントが属するレイヤの名前を取得する。セグメント条件判定部6は、取得したレイヤの名前とセグメント条件記憶部4に記憶されているレイヤの名前とが異なれば、セグメント条件6は満たされていると判定する。一方、セグメント条件判定部6は、取得したレイヤの名前とセグメント条件記憶部4に記憶されているレイヤの名前とが同じであれば、セグメント条件6は満たされていないと判定する。なお、作業者は、セグメントが属さないレイヤを複数指定したい場合には、パラメータが異なる複数のセグメント条件6を設定してもよい。
 (セグメント条件7)
 セグメント条件7は、判定するセグメントは図面データ記憶部2に記憶されている特定のセグメントではないという条件である。セグメント条件7のパラメータは、該当してはならないセグメント番号のリストである。
 作業者は、図2のステップS40においてセグメント条件7を追加する場合、またはセグメント条件7のパラメータを変更する場合、セグメント指定部18を用いて、1つまたは複数のセグメントを指定する。条件編集部13は、指定されたセグメントのセグメント番号のリストをセグメント条件記憶部4に格納する。
 セグメント条件判定部6は、ステップS50においてセグメント条件7を判定する際に、セグメント条件記憶部4のセグメント番号のリストの中に、判定を行うセグメントのセグメント番号が存在するか否かを確認する。セグメント条件判定部6は、セグメント番号が存在しなければセグメント条件7は満たされていると判定し、セグメント番号が存在すればセグメント条件7は満たされていないと判定する。
 ここで、複数の図形条件および複数のセグメント条件に共通する補足事項について説明する。図形選択装置101は、数値計算誤差が問題になる場合には閾値を用いる。図形選択装置101は、角度用の閾値および長さ用の閾値のように複数の閾値を用いてもよい。図形選択装置101は、図形条件2の面積の最小値および最大値のような、整数でない値によって定義された範囲に入っているか否かの判定を行う場合がある。このような場合、図形選択装置101は、最小値を下回ったまたは最大値を上回った場合であっても、この下回った量または上回った量が、面積の閾値の範囲内ならば、範囲内に収まっていると判定してもよい。
 また、図形選択装置101は、図形条件3の判定処理における半径の比較においても、比較する2つの半径の差が半径の閾値の範囲内であれば、半径は同じであるとみなしてもよい。また、作業者が、これらの閾値を指定してもよい。
 また、図形選択装置101は、閉ループまたはコンポーネント数に関連する条件のように、セグメントとセグメントとの接続が問題になる条件では、セグメントの端点と別のセグメントの端点との位置ずれについて閾値を設けてもよい。この場合、図形選択装置101は、閾値内の位置ずれである場合、セグメント同士が接続していると判定してもよい。また、作業者が、これらの閾値を指定してもよい。
 図形選択装置101は、パラメータであるセグメント番号を指定する条件を設定する際に、セグメント番号の代わりに、点、線、連続した複数の線、マウスで描いた自由曲線、多角形または円への包含関係または交差関係を用いてもよい。
 また、図形選択装置101は、図形条件18を発展させて、判定する図形と、点、線、連続した複数の線またはマウスで描いた自由曲線のうちの何れか1つと、の包含関係または交差関係を設定できるようにしてもよい。
 以上、説明したように、本実施の形態の図形選択装置101は、セグメント条件または図形条件を適切に設定することで、閉ループまたは連続線以外の図形に対しても、少ない操作回数および短い操作時間で選択可能になるという効果がある。
 また、図形選択装置101は、セグメント条件と図形条件を適切に設定することで、個別のセグメントの選択操作を減らすことができる。さらに、図形選択装置101は、プリセット条件から生成された目的図形の候補の数が少なければ、セグメントの選択またはパラメータの調整を行わせる必要がなくなる。この場合、図形選択装置101は、目的図形の候補の中から1つの図形を選ぶという操作だけで、目的の図形を選択することができる。このような操作回数の減少の効果、特にセグメント選択操作の減少の効果は、入力装置22が、タッチパネルといった細かな操作が難しい装置である場合には、操作時間の短縮および作業者の作業負担の軽減に大きく寄与する。
 なお、図形条件判定部5は、上述した図形条件1~18以外の図形条件を用いて図形を判定してもよい。また、セグメント条件判定部6は、上述したセグメント条件1~7以外のセグメント条件を用いて図形を判定してもよい。
 このように、実施の形態1によれば、図形条件またはセグメント条件に基づいて、目的図形の候補を生成するので、図形選択装置101は、従来の閉ループ選択装置および連続線選択装置では選択できない種類の図形を、少ない操作回数で選択できる。また、図形選択装置101は、図面に存在するセグメントまたは分岐の数が多い場合でも、入力する図面の性質または選択する図形の性質に合わせた図形条件またはセグメント条件を設定すれば、少ない操作回数で目的の図形を選択できる。
 また、図形選択装置101は、種々の図形条件およびセグメント条件を組み合わせることで、種々の図形に対して、少ない操作回数で目的図形の候補を生成できる。さらに、作業者が適宜図形条件またはセグメント条件を柔軟に変更できるので、図形選択装置101は、作業者の知見を随時反映させたうえで、操作回数を減らすことができる。
 また、図形選択装置101は、図面に対応する図面情報を利用した図形条件またはセグメント条件を追加することによって、表示される目的図形の候補を大幅に減らすことが可能となる。従って、図形選択装置101は、選択にかかる操作回数を大幅に減らすことができる。
 また、条件自動更新部31が、図形条件またはセグメント条件を適切な条件に自動的に更新するので、図形選択装置101は、作業者による条件の編集が無い場合であっても、目的図形候補生成部7が更新後の条件で再生成する目的図形の候補を改善することができる。また、図形選択装置101は、前回生成された目的図形の候補に基づいて設定できる条件を、自動的に設定するので、作業者による操作回数を減らすことができる。
実施の形態2.
 つぎに、図1、図2、図17~図21を用いてこの発明の実施の形態2について説明する。なお、実施の形態2では、実施の形態1と同様の図形選択装置101を用いるので、その構成の説明は省略する。実施の形態2では、プリセット条件記憶部11が、目的図形に適した図形条件9を格納しておく。そして、図形選択装置101が、図形条件9に基づいて、目的図形である閉ループを包含した閉ループの図形候補を生成する。
 本実施の形態では、図形選択装置101が、プリセット条件記憶部11に、図形条件9である閉ループを包含した閉ループを格納しておく。図形選択装置101は、この図形条件9を用いることによって、部品となる部材の中に削り残す部分があるポケット加工個所を選択する。
 以下、図17~図21を用いて、ポケット加工個所のような閉ループを包含した閉ループを表す図形を選択する処理について説明する。図17~図21では、ポケット加工される部品を示している。
 図17は、実施の形態2において図形選択装置に入力される図面の一例を示す図である。図17に示す図面51~53の図面データは、図2のステップS20において図面データ入力部1に読み込ませる図面データである。
 図面51は、図面データ入力部1に読み込ませる部品の平面図を示している。図面52は、図面データ入力部1に読み込ませる部品の正面図を示し、図面53は、図面データ入力部1に読み込ませる部品の側面図を示している。
 図18は、図17に示した図面に対応する部品を斜めから見た図である。図18では、図面51~53に対応する部品50の斜視図を示している。図19~図21は、図面51~53に対応する部品50の平面図を示している。図19は、図17の図面に対して作業者が目的とする加工箇所を示す図である。図19では、斜線部分が、作業者の目的とする加工箇所F1を示している。図20は、図17の図面に対して作業者が目的とする輪郭図形を示す図である。図20では、太線部分が、加工箇所F1の輪郭を表す輪郭図形F2,F3を示している。この輪郭図形F2,F3が、作業者の目的とする図形であるとする。図21は、図17の図面に対して作業者が選択候補を除外する目的で指定した特定のセグメントを示す図である。
 作業者が、図2のステップS10において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS20において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件9を図形条件記憶部3に設定する。
 そして、作業者が、ステップS40において、条件編集部13に対して、セグメント条件7を追加したとする。セグメント条件7は、判定するセグメントは図面データ記憶部2に記憶されている特定のセグメントではないという条件である。ここでは、作業者が、セグメント条件7のパラメータ設定の際に、図21に示した線分F4を指定した場合について説明する。
 作業者が、ステップS40においてセグメント条件の編集を終えると、目的図形候補生成部7が、ステップS50において、目的図形の候補を生成する。目的図形候補生成部7は、セグメント条件7により、平面図の最も外側の四角形の一辺に相当するセグメントは、目的図形の候補の生成に用いないと判定する。従って、目的図形候補生成部7は、線分F4を含んだ四角形から閉ループを生成することはない。
 このため、閉ループを含む閉ループは、図20において、太線で表した輪郭図形F2,F3のみとなる。従って、目的図形候補生成部7は、目的図形の候補である輪郭図形F2,F3のみを目的図形候補記憶部8に記憶させる。目的図形選択部9は、ステップS60において、目的図形候補記憶部8に記憶された輪郭図形F2,F3を表示装置21に表示させる。
 表示装置21が目的図形の候補を表示しているので、作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答する。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、作業者は、目的図形の唯一の候補を選択する。これにより、入力装置22は、ステップS80において、目的図形の選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 このように、実施の形態2によれば、プリセット条件記憶部11が、目的図形に適した図形条件9を格納しておくので、作業者は、少ない操作回数で、ポケット加工個所のような、閉ループを包含した閉ループを表す図形を選択することができる。
実施の形態3.
 つぎに、図1、図2、図22~図27を用いてこの発明の実施の形態3について説明する。なお、実施の形態3では、実施の形態1と同様の図形選択装置101を用いるので、その構成の説明は省略する。実施の形態3では、プリセット条件記憶部11が、目的図形に適した図形条件5,11を格納しておく。そして、図形選択装置101が、セグメント条件5,11に基づいて、目的図形である内回り閉図形の候補を生成する。
 本実施の形態では、図形選択装置101が、プリセット条件記憶部11に、図形条件11である内回り閉図形と、図形条件5であるコンポーネント数とを格納しておく。本実施の形態では、図形選択装置101が、プリセット条件記憶部11に格納されている図形条件5のパラメータであるコンポーネント数の最小値および最大値の両方を「1」に設定する場合について説明する。図形選択装置101は、図形条件5,11を用いることによって、ポケット加工個所を選択する。
 以下、図22~図27を用いて、ポケット加工個所のような内回り閉図形を選択する処理について説明する。図22~図27では、ポケット加工される部品を示している。図22は、実施の形態3において図形選択装置に入力される図面の一例を示す図である。図22に示す図面61の図面データは、図2のステップS20において図面データ入力部1に読み込ませる図面データである。図面61は、部品の正面図である。
 図23は、図22に示した図面に対応する部品を斜めから見た図である。図23では、図面61に対応する部品60を斜めから見た図を示している。図24~図27は、図面61に対応する部品60の正面図を示している。図24は、図22の図面に対して作業者が指定した点を示す図である。図25~図27は、内回り閉図形の図形条件を満たす図形を示す図である。図25は、図22の図面に対して作業者が目的とする輪郭図形を示す図である。図25では、太線で示した図形が加工個所の輪郭を表す輪郭図形G2を示している。この輪郭図形G2が、作業者の目的とする図形であるとする。図26は、内回り閉図形の図形条件を満たす他の図形の第1例を示す図であり、図27は、内回り閉図形の図形条件を満たす他の図形の第2例を示す図である。
 作業者が、図2のステップS10において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS20において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件5,11を図形条件記憶部3に設定する。
 そして、作業者が、ステップS40において、条件編集部13に対して、図形条件17を追加したとする。図形条件17は、判定する図形と指定点との間の幾何的関係の条件である。ここでは、作業者が、図形条件17のパラメータ設定の際に、幾何的関係の種類に「含む」を指定し、さらに図24に示した点G1を指定した場合について説明する。
 作業者が、ステップS40においてセグメント条件の編集を終えると、目的図形候補生成部7が、ステップS50において、実施の形態1と同様に、セグメント条件を満たすセグメントの抽出を行う。ここでの目的図形候補生成部7は、目的図形の候補を生成する際に、効率化のため、実施の形態1の方式であるセグメントの組み合わせの総当たりは行わない。代わりに、目的図形候補生成部7は、特許第2942681号公報に開示されている方法で図形条件11を満たす図形を全て生成する。そして、目的図形候補生成部7は、生成された各図形を図形条件判定部5で判定し、図形条件記憶部3に記憶されている図形条件17を満たした図形だけを目的図形候補記憶部8に格納する。
 図22に示した図面61の図形要素のうち、図形条件11を満たす図形、つまり内回り閉図形は、図25~図27の各々において太線で示した輪郭図形G2,G3,G4である。
 これらの3つの輪郭図形G2~G4の中で、図形条件17を満たすのは図25に示した輪郭図形G2だけである。また、輪郭図形G2は、図形条件5も満たす。従って、目的図形候補生成部7は、目的図形の候補である輪郭図形G2のみを目的図形候補記憶部8に記憶させる。目的図形選択部9は、ステップS60において、目的図形候補記憶部8に記憶されている輪郭図形G2を選択して表示装置21に表示させる。
 表示装置21が目的図形の候補を表示しているので、作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答する。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、作業者は、目的図形の唯一の候補を選択する。これにより、入力装置22は、ステップS80において、目的図形の選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 このように、実施の形態3によれば、プリセット条件記憶部11が、目的図形に適した図形条件5,11を格納しておくので、作業者は、少ない操作回数で、ポケット加工個所のような内回り閉図形を表す図形を選択することができる。
実施の形態4.
 つぎに、図1、図2、図28および図29を用いてこの発明の実施の形態4について説明する。なお、実施の形態4では、実施の形態1と同様の図形選択装置101を用いるので、その構成の説明は省略する。実施の形態4では、プリセット条件記憶部11が、目的図形に適した図形条件5,10,13を格納しておく。そして、図形選択装置101が、図形条件5,10,13に基づいて、目的図形である外回り閉図形の候補を生成する。
 本実施の形態では、図形選択装置101が、プリセット条件記憶部11に、図形条件10である外回り閉図形と、図形条件13である鏡像対称性と、図形条件5であるコンポーネント数とを格納しておく。本実施の形態では、図形選択装置101が、プリセット条件記憶部11に格納されている図形条件5のパラメータであるコンポーネント数の最小値および最大値の両方を「1」に設定する場合について説明する。図形選択装置101は、図形条件5,10,13を用いることによって、穴のない旋削部品の外形形状を選択する。
 以下、図28および図29を用いて、穴のない旋削部品の外形形状を選択する処理について説明する。図28は、実施の形態4において図形選択装置に入力される図面データの一例を示す図である。図29は、実施の形態4に係る図形候補判定処理を説明するための図である。図28および図29では、穴のない旋削部品を示している。
 図28に示す図面71の図面データは、図2のステップS20において図面データ入力部1に読み込ませる図面データである。図面71は、部品の正面図である。図29は、図面71に対応する部品70の正面図である。図29において、太線で示した図形が旋削部品の外形を表す外形図形H1であり、この外形図形H1が作業者の目的とする図形であるとする。
 作業者が、図2のステップS10において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS20において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件5,10,13を図形条件記憶部3に設定する。
 そして、作業者が、ステップS40において、条件編集部13に対して、図形条件とセグメント条件の両方について、何も変更を行わなかったとする。この後、目的図形候補生成部7が、ステップS50において、実施の形態1と同様に、セグメント条件判定部6からの第1の判定結果である判定結果に基づいて、セグメント条件を満たすセグメントの抽出を行う。ここでの目的図形候補生成部7は、目的図形の候補を生成する際に、効率化のため、実施の形態1の方式であるセグメントの組み合わせの総当たりは行わない。代わりに、目的図形候補生成部7は、特許第2942681号公報に開示されている方法で図形条件10を満たす図形を全て生成する。そして、目的図形候補生成部7は、生成された各図形を図形条件判定部5で判定し、図形条件記憶部3に記憶されている図形条件13を満たした図形だけを目的図形候補記憶部8に格納する。このように、本実施の形態では、図形が図形条件を満たしているか否かの判定結果である第2の判定結果は、図形条件10に対応するものについては目的図形候補生成部7から取得され、図形条件13に対応するものについては図形条件判定部5から取得される。
 図28に示した図面71の図形要素のうち、図形条件10を満たすのは、旋削部品の外形に対応する外形図形H1だけである。また、この外形図形H1は図形条件13および図形条件5も満たす。従って、目的図形候補生成部7は、目的図形の候補である外形図形H1のみを目的図形候補記憶部8に記憶させる。目的図形選択部9は、ステップS60において、目的図形候補記憶部8に記憶されている外形図形H1を表示装置21に表示させる。
 表示装置21が目的図形の候補を表示しているので、作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答する。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、作業者は、目的図形の唯一の候補である外形図形H1を選択する。これにより、入力装置22は、ステップS80において、目的図形である外形図形H1の選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 このように、実施の形態4によれば、プリセット条件記憶部11が、目的図形に適した図形条件5,10,13を格納しておくので、作業者は、少ない操作回数で、穴のない旋削部品の外形のような鏡像対称性を有した外回り閉図形を選択することができる。
実施の形態5.
 つぎに、図1、図2、図30および図31を用いてこの発明の実施の形態5について説明する。なお、実施の形態5では、実施の形態1と同様の図形選択装置101を用いるので、その構成の説明は省略する。実施の形態5では、プリセット条件記憶部11が、目的図形に適した図形条件1,5,7,13を格納しておく。そして、図形選択装置101が、図形条件1,5,7,13に基づいて、目的図形である穴のある旋削部品の外形の候補を生成する。
 本実施の形態では、図形選択装置101が、プリセット条件記憶部11に、図形条件7である閉ループと、図形条件13である鏡像対称性と、図形条件1である属性と、図形条件5であるコンポーネント数とを格納しておく。また、図形選択装置101は、プリセット条件記憶部11に格納されている図形条件1のパラメータに、ハッチングを設定する。本実施の形態では、図形選択装置101が、プリセット条件記憶部11に格納されている図形条件5のパラメータであるコンポーネント数の最小値および最大値の両方に「2」を設定する場合について説明する。図形選択装置101は、これらの図形条件1,5,7,13を用いることによって、穴のある旋削部品の外形を選択する。
 以下、図30および図31を用いて、穴のある旋削部品の外形を表す図形を選択する処理について説明する。図30は、実施の形態5において図形選択装置に入力される図面の一例を示す図である。図31は、実施の形態5に係る図形候補判定処理を説明するための図である。図30および図31では、穴のある旋削部品の断面図を示している。
 図30に示す図面81の図面データは、図2のステップS20において図面データ入力部1に読み込ませる図面データである。図面81の図形うち、ハッチングされている部分の図形は、穴のある旋削部品の外形を表している。図31は、図面81に対応する部品80の断面図であり、部品80の図形のうち、太線部分が、作業者の目的とする図形であるとする。
 作業者が、図2のステップS10において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS20において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件1,5,7,13を図形条件記憶部3に設定する。
 そして、作業者が、ステップS40において、条件編集部13に対して、図形条件およびセグメント条件の両方について、何も変更を行わなかったとする。この後、目的図形候補生成部7が、ステップS50において、目的図形の候補を生成する。図31では、図形条件1を満たす図形が、旋削部品の外形に対応する外形図形I1だけである。また、この外形図形I1は、図形条件13、図形条件7および図形条件5を満たす。従って、目的図形候補生成部7は、目的図形の候補である外形図形I1のみを目的図形候補記憶部8に記憶させる。目的図形選択部9は、ステップS60において、目的図形候補記憶部8に記憶されている外形図形I1を表示装置21に表示させる。
 表示装置21が目的図形の候補を表示しているので、作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答する。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、作業者は、目的図形の唯一の候補である外形図形I1を選択する。これにより、入力装置22は、ステップS80において、目的図形である外形図形I1の選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 このように、実施の形態5によれば、プリセット条件記憶部11が、目的図形に適した図形条件1,5,7,13を格納しておくので、作業者は、少ない操作回数で、穴のある旋削部品の外形を表す図形を選択することができる。
実施の形態6.
 つぎに、図1、図2、図32~図35を用いてこの発明の実施の形態6について説明する。なお、実施の形態6では、実施の形態1と同様の図形選択装置101を用いるので、その構成の説明は省略する。実施の形態6では、プリセット条件記憶部11が、目的図形に適した図形条件8,15を格納しておく。そして、図形選択装置101が、図形条件8,15に基づいて、目的図形の候補を生成する。本実施の形態における目的図形は、溝加工パターンのような並進対称性を有した飛び飛びのパターンである。
 本実施の形態では、図形選択装置101が、プリセット条件記憶部11に、図形条件8である分岐なし且つ閉ループなしと、図形条件15である並進対称性とを格納しておく。図形選択装置101は、これらの図形条件8,15を用いることによって、溝加工パターンを選択する。
 以下、図32~図35を用いて、溝加工パターンのような並進対称性を有した飛び飛びのパターンを表す図形を選択する処理について説明する。図32は、実施の形態6において図形選択装置に入力される図面の一例を示す図である。図32では、溝加工される部品の図面91を示している。図32に示す図面91の図面データは、図2のステップS20において図面データ入力部1に読み込ませる図面データである。図32に示した図面91は、部品の正面図である。図面91に示される部品は、3本の溝95を有している。
 図33は、図32の図面に対して作業者が目的とする目的図形を示す図である。図33では、作業者の目的とする目的図形92を示している。図34は、図32の図面に対して作業者が指定した図面領域を示す図である。図35は、図32の図面に対して目的図形の候補から除外されるセグメントを示す図である。
 作業者が、図2のステップS10において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS20において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件8,15を図形条件記憶部3に設定する。
 そして、作業者が、ステップS40において、条件編集部13に対して、図面条件4であるセグメント数とセグメント条件7とを追加したとする。ここでの条件編集部13は、作業者の指示に基づいて、図形条件4のパラメータであるセグメント数の最小値および最大値の両方に「21」を設定する。作業者は、この「21」という数字を、溝の構成および溝数に基づいて設定する。
 図33に示すように、作業者の目的とする目的図形92は、3つの図形J1であり、各図形J1は溝である。図形J1である1つの溝は、円弧2本と線分5本の合計7本から構成されている。円弧は、溝の底部分で円弧形状に削り取られた箇所である。また、線分は、溝の上側の面取り領域と、溝の側面と、溝の底面とである。1つの溝が円弧2本と線分5本の合計7本から構成されている場合、且つ、溝の数が3本である場合、作業者は、7本と3本を掛け算することによって、7×3=21のように「21」を求める。
 作業者は、セグメント条件7のパラメータ設定の際には、まず、入力装置22を操作することによって、図34に示すような、図面の一部である一部図形93を表示装置21に表示させたとする。さらに、作業者は、セグメント指定部18において、表示範囲内にない全てのセグメントを指定する。これにより、条件編集部13は、作業者が指定したセグメントを、セグメント条件7のパラメータに設定する。この設定により、一部図形93の中に全体が入っているセグメント以外は、目的図形の候補の生成に利用されなくなる。具体的には、図35に示した一部図形94において、太線で示したセグメントJ3は、画面に入りきっていないので、目的図形の候補を生成する際には用いられない。これにより、図35に示した一部図形94のうち、太線になっていないセグメントだけが、目的図形候補の生成に利用されることとなる。
 作業者が、ステップS40において、プリセット条件の編集を終えると、目的図形候補生成部7が、ステップS50において、目的図形の候補を生成する。図35において、溝95と溝95とを結ぶ線分J2の図形は、繰り返し回数が2回である。この場合、2本の線分と、2つの溝95のセグメントである14本のセグメントと、を足した16本のセグメントが、2つの溝95に対応するセグメント数の最大値になる。この16本は、図面条件4を満たさないので、目的図形選択部9は、ステップS60において、溝95と溝95とを結ぶ線分を含む線分J2を含む図形判定候補は目的図形の候補ではないと判定し、目的図形候補生成部7は、目的図形候補記憶部8に記憶させない。
 従って、目的図形候補生成部7が、目的図形候補記憶部8に記憶させる唯一の目的図形の候補は、溝部分が3回繰り返された図33に示した図形J1に対応する目的図形92となる。これにより、目的図形選択部9は、ステップS60において、目的図形候補記憶部8に記憶されている図形J1を表示装置21に表示させる。
 表示装置21が目的図形の候補を表示しているので、作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答する。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、作業者は、目的図形の唯一の候補である図形J1を選択する。これにより、入力装置22は、ステップS80において、目的図形である図形J1の選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 このように、実施の形態6によれば、プリセット条件記憶部11が、目的図形に適した図形条件8,15を格納しておくので、作業者は、少ない操作回数で、溝加工パターンのような並進対称性を持つ飛び飛びのパターン図形を選択することができる。
実施の形態7.
 つぎに、図1、図2、図36および図37を用いてこの発明の実施の形態7について説明する。なお、実施の形態7では、実施の形態1と同様の図形選択装置101を用いるので、その構成の説明は省略する。実施の形態7では、プリセット条件記憶部11が、目的図形に適した図形条件3,7,14を格納しておく。そして、図形選択装置101が、図形条件3,7,14に基づいて、目的図形の候補を生成する。本実施の形態における目的図形は、穴加工の円パターンのような回転対称性を持つ飛び飛びのパターンである。
 本実施の形態では、図形選択装置101が、プリセット条件記憶部11に、図形条件3である同一半径と、図形条件7である閉ループと、図形条件14である回転対称性とを格納しておく。図形選択装置101は、図形条件3,7,14を用いることによって、穴加工用の円パターンを選択する。
 以下、図36および図37を用いて、穴加工用の円パターンを選択する処理について説明する。図36は、実施の形態7において図形選択装置に入力される図面の一例を示す図である。図37は、実施の形態7に係る図形候補判定処理を説明するための図である。図36および図37では、穴加工される部品を示している。
 図36に示す図面110の図面データは、図2のステップS20において図面データ入力部1に読み込ませる図面データである。図36の図面110は、部品の正面図である。図面110の部品は、穴加工される円形領域の穴115を有している。図37は、図面110に対応する部品120の正面図である。図37において、太線で示した図形K1が作業者の目的とする図形であるとする。図形K1は、穴加工される穴115に対応している。
 作業者が、図2のステップS10において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS20において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件3,7,14を図形条件記憶部3に設定する。
 そして、作業者が、ステップS40において、条件編集部13に対して、図形条件5であるコンポーネント数を追加したとする。図形条件5は、判定する図形を構成するコンポーネントの数が指定された範囲に入っているという条件である。ここでは、作業者が、図形条件5のパラメータを設定する際に、コンポーネント数の最小値および最大値の両方に「5」を設定したとする。この後、目的図形候補生成部7が、ステップS50において、目的図形の候補を生成する。
 この場合において、目的図形候補生成部7は、図形条件7が設定されているので、目的図形の候補は閉ループによって構成されていると判断する。このため、目的図形候補生成部7は、途中で途切れて行き止まりになっている線を含む図形は目的図形候補記憶部8に記憶させない。よって、こういった図形を、目的図形選択部9が、ステップS60において、表示装置21に表示させることはない。
 図36に示した図面110において、閉ループは、穴115に対応する円が5つと、部品外形に対応する円が1つである。まず、目的図形候補生成部7が、部品外形に対応する円を含む図形判定候補を、目的図形候補記憶部8に記憶させることがないことを示す。部品外形に対応する円を含み、かつ、穴115に対応する円を含む図形判定候補は、異なる半径の円を含むため、図形条件3を満たさない。また、部品外形に対応する円を含み、かつ、穴115に対応する円を含まない図形判定候補は、コンポーネント数が「1」となるので、パラメータでコンポーネント数が「5」と指定されている図形条件5を満たさない。よって、部品外形に対応する円を含む図形判定候補は、他に穴115に対応する円を含んでいてもいなくても、満たせない図形条件が存在するため、目的図形候補生成部7が、部品外形に対応する円を含む図形判定候補を、目的図形候補記憶部8に記憶させることはない。
 一方、目的図形候補生成部7は、穴115に対応する5つの円から成る目的図形の候補は、図形条件5を満たし、さらに図形条件14も満たすと判断できる。以上より、目的図形候補生成部7が、目的図形候補記憶部8に記憶させる唯一の目的図形の候補は図形K1のみである。これにより、目的図形選択部9は、ステップS60において、目的図形候補記憶部8に記憶されている図形K1のみを表示装置21に表示させる。
 表示装置21が目的図形の候補を表示しているので、作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答する。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、作業者は、目的図形の唯一の候補を選択する。これにより、入力装置22は、ステップS80において、目的図形の選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 このように、実施の形態7によれば、プリセット条件記憶部11が、目的図形に適した図形条件3,7,14を格納しておくので、作業者は、個別のセグメントを選択する操作を行うことなく少ない操作回数で、穴加工の円パターンのような回転対称性を持つ飛び飛びのパターンを選択することができる。
実施の形態8.
 つぎに、図1、図2、図38~図42を用いてこの発明の実施の形態8について説明する。なお、実施の形態8では、実施の形態1と同様の図形選択装置101を用いるので、その構成の説明は省略する。実施の形態8では、プリセット条件記憶部11が、目的図形に適した図形条件5,8を格納しておく。そして、図形選択装置101が、図形条件5,8に基づいて、目的図形の候補を生成する。本実施の形態における目的図形は、1本の連続したパスである。
 本実施の形態では、図形選択装置101が、プリセット条件記憶部11に、図形条件8である分岐なし且つ閉ループなしと、図形条件5であるコンポーネント数とを格納しておく。本実施の形態では、図形選択装置101が、プリセット条件記憶部11に格納されている図形条件5のパラメータであるコンポーネント数の最小値および最大値の両方に「1」を設定する場合について説明する。図形選択装置101は、図形条件5,8を用いることによって、1本の連続したパスを選択する。
 以下、図38~図42を用いて、1本の連続したパス加工を選択する処理について説明する。図38~図42では、1本の連続したパス加工が行われる部品を示している。図38は、実施の形態8において図形選択装置に入力される図面の一例を示す図である。図38に示す図面210~230の図面データは、図2のステップS20において図面データ入力部1に読み込ませる図面データである。
 図面210は、図面データ入力部1に読み込ませる部品の平面図を示している。図面220は、図面データ入力部1に読み込ませる部品の正面図を示し、図面230は、図面データ入力部1に読み込ませる部品の側面図を示している。
 図39は、図38に示した図面に対応する部品を斜めから見た図である。図39では、図面210~230に対応する部品310の斜視図を示している。図40~図42は、図面210~230に対応する部品310の平面図を示している。図40は、図38の図面に対して作業者が目的とするパスを示す図である。図40では、パスL1が、作業者の目的とするパスに対応した図形である。ここでは、作業者が、図面210~230の図面データに対してパスL1を選択する場合について説明する。図41は、図38の図面に対して作業者が指定した線分を示す図である。図42は、図38の図面に対して作業者が指定した円弧および線分を示す図である。
 作業者が、図2のステップS10において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS20において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件5,8を図形条件記憶部3に設定する。
 そして、作業者が、ステップS40において、条件編集部13に対して、セグメント条件7と図形条件16とを追加したとする。セグメント条件7は、判定するセグメントは図面データ記憶部2に記憶されている特定のセグメントではないという条件である。図形条件16は、判定する図形を構成するセグメントの中に、図面データ記憶部2に記憶されている特定のセグメントが存在しているという条件である。
 ここでは、作業者が、セグメント条件7のパラメータを設定する際に、セグメント指定部18を用いて、図41に示す線分L2,L3,L4,L5を全て指定したとする。この場合、目的図形候補生成部7は、指定された線分L2~L5を、目的図形の候補の生成に用いない。
 また、作業者が、図形条件16のパラメータを設定する際に、図42に示す円弧L6および線分L7を指定したとする。作業者が、ステップS40においてセグメント条件の編集を終えると、目的図形候補生成部7が、ステップS50において、目的図形の候補を生成する。プリセット条件記憶部11に記憶された図形条件5と図形条件8、さらに、作業者が設定した図形条件16とセグメント条件7を満たす図形は、図40において太線で示したパスL1のみである。従って、目的図形候補生成部7は、目的図形の候補であるパスL1のみを目的図形候補記憶部8に記憶させる。目的図形選択部9は、ステップS60において、目的図形候補記憶部8に記憶されているパスL1を表示装置21に表示させる。
 表示装置21が目的図形の候補を表示しているので、作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答する。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、作業者は、目的図形の唯一の候補であるパスL1を選択する。これにより、入力装置22は、ステップS80において、目的図形であるパスL1の選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 このように、実施の形態8によれば、プリセット条件記憶部11が、目的図形に適した図形条件5,8を格納しておくので、作業者が、いくつかの設定を追加し、この追加に伴ういくつかのセグメントを指定するだけで、図形選択装置101は、1本の連続したパスを選択することができる。従って、図形選択装置101は、目的の図形を構成するセグメントの数が多い場合では特に、全てのセグメントを指定する方法と比べて、作業者の操作回数を少なくすることができる。
実施の形態9.
 つぎに、図1、図2、図43~図45を用いてこの発明の実施の形態9について説明する。なお、実施の形態9では、実施の形態1と同様の図形選択装置101を用いるので、その構成の説明は省略する。実施の形態9では、目的図形に適した図形条件4,5,7,12およびセグメント条件4,5を格納しておく。また、図形選択装置101が、ステップS40において、作業者からの指示に従って、図形条件のパラメータ変更、図形条件の設定またはセグメント条件の設定を行う。そして、図形選択装置101が、図形条件4,5,7,12およびセグメント条件4,5に基づいて、目的図形の候補を生成する。本実施の形態における目的図形は、図面の座標系と向きが揃っていて且つ角に丸みが付いた四角形のような、幾何学的な条件で定義できる形状である。幾何学的な条件は、図形の面積、長さ、曲率または角度の条件を含んでいる。
 本実施の形態では、図形選択装置101が、以下の6つのプリセット条件をプリセット条件記憶部11に格納しておく。
 (プリセット条件1)図形条件4であるセグメント数
 (プリセット条件2)図形条件5であるコンポーネント数
 (プリセット条件3)図形条件7である閉ループ
 (プリセット条件4)図形条件12であるセグメントの滑らかな接続
 (プリセット条件5)セグメント条件4である円弧中心角
 (プリセット条件6)セグメント条件5である座標系とセグメントとの成す角度
 図形選択装置101は、上述のプリセット条件1~6のプリセット条件を用いることによって、図面の座標系と向きが揃っていて、かつ、角に丸みが付いた四角形を選択する。
 また、本実施の形態では、図形選択装置101が、前記プリセット条件のパラメータとして、以下の5つのパラメータを設定する場合について説明する。
 (パラメータ1)図形選択装置101が、図形条件4のパラメータであるセグメント数の最小値および最大値の両方に「8」を設定する。この「8」という数字は、本実施の形態における目的図形である角に丸みが付いた四角形の構成に基づいて決定されている。本実施の形態における目的図形は、辺の線分4本と、これらの辺を接続している4本の円弧とで構成されているため、線分4本と円弧4本とを足し算することによって、4+4=8のように「8」が求められている。
 (パラメータ2)図形選択装置101が、図形条件5のパラメータであるコンポーネント数の最小値および最大値の両方に「1」を設定する。
 (パラメータ3)図形選択装置101が、図形条件12のパラメータである微分可能回数に「1」を設定する。
 (パラメータ4)図形選択装置101が、セグメント条件4のパラメータである中心角の最小値と最大値との組に、90度以上90度以下を設定する。
 (パラメータ5)図形選択装置101が、セグメント条件5のパラメータである角度の範囲の最小値と最大値との組に、0度以上0度以下と、90度以上90度以下と、180度以上180度以下と、270度以上270度以下との合計4組を設定する。
 また、図2のステップS40において、条件編集部13は、図形条件およびセグメント条件を編集するための編集画面を表示装置21に表示させる。この表示画面において、条件編集部13は、使用頻度が高いと考えられる条件の編集項目を、編集が容易となる位置に配置する。本実施の形態における目的図形が、角に丸みが付いた四角形であるとする。この場合、条件編集部13は、角に丸みが付いた四角形の選択での使用頻度が高いと考えられる図形条件2,3,16,17,18とセグメント条件1,2,3,6,7の編集項目とを、表示画面内のすぐに編集できる位置に優先的に配置する。また、条件編集部13は、その他の条件の編集項目は、スクロール操作または別の画面を開く操作で辿りつける位置に配置する。
 以下、図43~図45を用いて、図面の座標系と向きが揃っていて且つ角に丸みが付いた四角形を選択する処理について説明する。図43は、実施の形態9において図形選択装置に入力される図面の一例を示す図である。図44は、図43で示した図面データの構成を説明するための図である。図45は、実施の形態9に係る図形候補判定処理を説明するための図である。図44では、1つの特殊形状と、図43に示した7つの四角形とを太線で示している。また、図44では、特殊形状について、セグメント同士の接続点を強調して表示している。
 図43に示した図面の図面データは、レイヤを有している。ここでは、四角形410~470のうち、四角形440を構成するセグメントのみがレイヤBにあり、その他のセグメントはレイヤAにある場合について説明する。図43に示した図面データでは、四角形430を構成する全てのセグメントは、線種が破線となっているだけで、データは連続した線であるとする。また、四角形410~440,460,470および特殊形状480を構成する全てのセグメントは、座標系に対して傾いていないのに対し、四角形450を構成する全てのセグメントは、座標系に対して傾いている。
 また、本実施の形態では、作業者が、四角形410,420,430,440,460の何れか1つ、もしくは、四角形410,420の2つをまとめて選択することを意図しているとする。
 作業者が、図2のステップS10において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS20において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS30では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されている図形条件4,5,7,12およびセグメント条件4,5を図形条件記憶部3およびセグメント条件記憶部4に設定する。
 図形選択装置101は、ステップS40での作業者による条件の編集が異なると、編集内容に対応する種々の処理を実行する。以下の説明では、ステップS40での作業者による条件の編集内容毎に各処理を説明する。
 (第1のケース)
 第1のケースは、ステップS40において、作業者が、図形条件およびセグメント条件の両方を編集せずに、プリセット条件のままにした場合である。この場合、四角形450を構成する全てのセグメントが、座標系に対して傾いており、セグメント条件5を満たさないので、目的図形候補生成部7は、ステップS50でのセグメントの抽出において、何れのセグメントも抽出することができない。
 また、特殊形状480を構成する中心角が270度の円弧が、セグメント条件4を満たさないので、目的図形候補生成部7は、ステップS50でのセグメントの抽出において、中心角が270度の円弧を抽出することができない。そして、図形条件判定部5は、図形条件の判定の際に、中心角が270度の円弧は存在し得ないので、特殊形状480のセグメントを用いた目的図形の候補は閉ループになることがなく、図形条件7を満たさないと判定する。また、四角形470は、四本の直線で構成されているので、図形条件判定部5は、四角形470が図形条件4を満たさないと判定する。また、四角形470は、頂点で接線ベクトルが合致しないので、図形条件判定部5は、四角形470が図形条件12を満たさないと判定する。
 従って、目的図形候補生成部7は、四角形450,470および特殊形状480は目的図形候補記憶部8に記憶させない。よって、目的図形選択部9が、ステップS60において、目的図形候補記憶部8に記憶されていない四角形450,470および特殊形状480を表示装置21に表示させることはない。また、図形条件5でコンポーネント数が1と指定されているので、目的図形候補生成部7は、複数の四角形を含んでいる図形を目的図形候補記憶部8に記憶させることはない。よって、目的図形選択部9が、複数の四角形を含んでいる図形を表示装置21に表示させることはない。
 以上からステップS50では、目的図形候補生成部7は、四角形410,420,430,440,460の何れか1つのみを含んだ5つの異なる図形を、目的図形の候補として、目的図形候補記憶部8に記憶させる。ステップS60では、目的図形選択部9は、目的図形候補記憶部8に記憶されたこれら5つの図形を、5つの候補として表示する。作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答したとする。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、入力装置22は、ステップS80において、作業者によるこれら5つの候補から1つの選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 (第2のケース)
 第2のケースは、ステップS40において、作業者が、四角形410を選択するために図形条件18を設定した場合である。作業者が、図形条件18のパラメータとなる閉図形を指定するために、閉図形指定部17を用いて、四角形410内の右上に示した円と同じ図形を定義したとする。また、作業者が、判定する図形が指定閉図形を「包含する」を、幾何的関係に設定したとする。
 この場合、ステップS50において、図形条件判定部5が図形条件18を満たすと判定する四角形の図形判定候補は、四角形410のみを含む図形判定候補だけである。従って、目的図形候補記憶部8に記憶され、ステップS60において、目的図形選択部9が表示装置21に表示させるのは目的図形の候補である四角形410のみである。
 (第3のケース)
 第3のケースは、ステップS40において、作業者が、四角形420を選択するためにセグメント条件2を設定した場合である。作業者が、セグメント条件2のパラメータである曲率の最小値と最大値との組に、0以上0以下と、0.5以上0.5以下とを設定したとする。ここでの曲率が0は、線分に対応し、半径2の円弧の曲率が1/2=0.5であるので、曲率の0.5は、半径2の円弧に対応する。
 この場合、目的図形候補生成部7は、ステップS50でのセグメントの抽出において、四角形420の半径2の円弧以外の円弧は抽出しない。このため、目的図形候補生成部7は、ステップS50の図形条件の判定において、図形条件4,5,7,12を全て満たすのは、四角形420だけであると判定する。従って、目的図形候補記憶部8に記憶され、ステップS60において、目的図形選択部9が表示装置21に表示させるのは目的図形の候補である四角形420のみである。
 (第4のケース)
 第4のケースは、ステップS40において、作業者が、四角形430を選択するためにセグメント条件1を設定する場合である。作業者が、セグメント条件1のパラメータである線種に破線という属性を設定したとする。
 この場合、目的図形候補生成部7は、ステップS50でのセグメントの抽出において、四角形430を構成するセグメント以外は抽出しない。このため、目的図形候補生成部7は、ステップS50の図形条件の判定において、図形条件4,5,7,12を全て満たすのは、四角形430だけであると判定する。従って、目的図形候補記憶部8に記憶され、ステップS60において、目的図形選択部9が表示装置21に表示させるのは目的図形の候補である四角形430のみである。
 (第5のケース)
 第5のケースは、ステップS40において、作業者が、四角形440を選択するためにセグメント条件6を設定する場合である。作業者が、セグメント条件6のパラメータである、セグメントが属さないレイヤAを設定したとする。
 この場合、目的図形候補生成部7は、ステップS50でのセグメントの抽出において、四角形440を構成するセグメント以外は抽出しない。このため、目的図形候補生成部7は、ステップS50の図形条件の判定において、図形条件4,5,7,12を全て満たすのは、四角形440だけであると判定する。従って、目的図形候補記憶部8に記憶され、ステップS60において、目的図形選択部9が表示装置21に表示させるのは目的図形の候補である四角形440のみである。
 (第6のケース)
 第6のケースは、ステップS40において、作業者が、四角形460を選択するために図形条件2を設定する場合である。作業者が、図形条件2のパラメータである面積の最小値に100を設定し最大値に400を設定したとする。
 この場合、ステップS50において、図形条件判定部5が図形条件2を満たすと判定する四角形の図形判定候補は、四角形460のみを含む図形判定候補だけである。従って、目的図形候補記憶部8に記憶され、ステップS60において、目的図形選択部9が表示装置21に表示させるのは目的図形の候補である四角形460のみである。
 (第7のケース)
 第7のケースは、ステップS40において、作業者が、四角形410,420の2つをまとめて選択するためにプリセット条件設定部12が設定した図形条件4,5のパラメータを変更し、図形条件18を新たに設定する場合である。作業者が、図形条件4のパラメータであるセグメント数の最小値および最大値の両方を「16」に変更したとする。また、作業者が、図形条件5のパラメータであるコンポーネント数の最小値および最大値の両方を「2」に変更したとする。また、作業者が、閉図形指定部17を用いて、図形条件18のパラメータである指定閉図形を、図45内に太線で示した四角形N1で定義したとする。また、作業者が、幾何的関係について、判定する図形が指定閉図形に「包含される」を設定したとする。
 この場合、目的図形候補生成部7は、ステップS50の図形条件の判定において、図形条件4,5,7,12を全て満たすのは、四角形410,420,430,440,460の中から2つを組み合わせた図形であると判定する。また、目的図形候補生成部7は、組み合わせの中で図形条件18を満たすのは、四角形410,420の組み合わせだけであると判定する。従って、目的図形候補記憶部8に記憶され、ステップS60において、目的図形選択部9が表示装置21に表示させるのは目的図形の候補である四角形410,420から成る図形のみである。
 第2~第7のケースの何れかの場合に、表示装置21が、目的図形の候補を表示させると、作業者は、目的図形の候補生成をやり直すかとの問いに対して「いいえ」と回答する。これにより、入力装置22は、ステップS70において、作業者からの「いいえ」と回答を受付ける。そして、作業者は、目的図形の唯一の候補を選択する。これにより、入力装置22は、ステップS80において、目的図形の選択指示を受付ける。そして、図形選択装置101は、選択処理を終了する。
 このように、実施の形態9によれば、プリセット条件記憶部11が、目的図形に適した図形条件4,5,7,12およびセグメント条件4,5を格納しておくので、作業者は、個別のセグメントを選択する操作を行うことなく少ない操作回数で、図面の座標系と向きが揃っていて且つ角に丸みが付いた四角形のような、幾何学的な条件で定義できる形状を選択することができる。
実施の形態10.
 つぎに、図46~図52を用いてこの発明の実施の形態10について説明する。実施の形態10では、作業者が、選択の目的となる1本の連続したパスの始点および先頭のセグメントを指定し、さらに、パスの終点および末尾のセグメントを指定する。そして、図形選択装置は、目的図形の候補が1つになるまで、目的のパスに含まれるセグメントを繰り返し指定して追加していくことで、目的のパスを選択する。
 図46は、実施の形態10に係る図形選択装置の構成を示すブロック図である。図46の各構成要素のうち図1に示す実施の形態1の図形選択装置101と同一機能を達成する構成要素については同一符号を付しており、重複する説明は省略する。
 図形選択装置102は、図形選択装置101と同様に、図面データ入力部1、図面データ記憶部2、図形条件記憶部3およびセグメント条件記憶部4を備えている。また、図形選択装置102は、図形選択装置101と同様に、図形条件判定部5、セグメント条件判定部6、目的図形候補生成部7および目的図形候補記憶部8を備えている。また、図形選択装置102は、図形選択装置101と同様に、プリセット条件記憶部11、プリセット条件設定部12、図面情報指定部14および、条件自動更新部31を備えている。
 また、本実施の形態の図形選択装置102は、パス選択用条件編集部41および目的図形候補確認部42を備えている。換言すると、図形選択装置101が目的図形選択部9および条件編集部13を備えていたのに対して、図形選択装置102は、パス選択用条件編集部41および目的図形候補確認部42を備えている。
 パス選択用条件編集部41は、表示装置21、図面データ記憶部2、図形条件記憶部3、セグメント条件記憶部4および図面情報指定部14に接続されている。目的図形候補確認部42は、目的図形候補記憶部8に接続されている。
 パス選択用条件編集部41は、図面情報指定部14を介した入力装置22から入力される作業者の指示に従い、図形条件記憶部3およびセグメント条件記憶部4の内容を書き換える。パス選択用条件編集部41は、始点、終点、先頭セグメント、末尾セグメントおよび途中のセグメントのうちの何れの指定を求めているかを表示装置21に表示させる。この後パス選択用条件編集部41は、図面情報指定部14を呼び出して、作業者に点またはセグメントを指定させる。そして、パス選択用条件編集部41は、指定された点またはセグメントの情報と、図面データ記憶部2に格納されている情報とに基づいて、図形条件記憶部3とセグメント条件記憶部4との何れか一方または両方に条件を追加する。
 目的図形候補確認部42は、目的図形候補記憶部8に格納されている目的図形の候補の数を確認する。本実施の形態の目的図形候補確認部42は、目的図形の候補の数が1つであるか、複数であるかを確認する。そして、候補の数が1であった場合には、目的図形候補確認部42は、唯一の候補が作業者の意図している目的図形であると判断して選択する。
 本実施の形態では、図形選択装置102が、プリセット条件記憶部11に、図形条件8である分岐なし且つ閉ループなしと、図形条件5であるコンポーネント数とを格納しておく。本実施の形態では、図形選択装置102が、プリセット条件記憶部11に格納されている図形条件5のパラメータであるコンポーネント数の最小値および最大値の両方に「1」を設定する場合について説明する。
 つぎに、図形選択装置102の動作処理手順について説明する。図47は、実施の形態10に係る図形選択装置の動作処理手順を示すフローチャートである。なお、図47の処理のうち図2で説明した図形選択装置101の処理と同様の処理については、重複する説明は省略する。
 図形選択装置102のステップS600~S620の処理は、図形選択装置101のステップS10~S30の処理と、同様の処理である。ステップS620において、プリセット条件設定部12が、プリセット条件を設定した後、ステップS630において、図形選択装置102は、両端指定に基づいて条件設定を行う。具体的には、まず作業者が、パス選択用条件編集部41の指示に従って、始点、先頭のセグメント、終点、および、末尾のセグメントの全てを指定する。次に、パス選択用条件編集部41が、この指定に基づいて、セグメント条件7および図形条件16を追加する。
 パス選択用条件編集部41は、図形条件16のパラメータに、作業者が指定した先頭セグメントおよび末尾セグメントを指定する。また、パス選択用条件編集部41は、セグメント条件7のパラメータに、指定された始点に接する先頭セグメント以外のセグメントと、指定された終点に接する末尾セグメント以外のセグメントとを全て指定する。
 この後、目的図形候補生成部7は、ステップS640において、実施の形態1と同様に、目的図形の候補を生成する。そして、目的図形候補確認部42は、ステップS650において、目的図形候補記憶部8に格納されている目的図形の候補数を確認する。目的図形の候補数が1でなかった場合、すなわち、ステップS650において、Noの場合、条件自動更新部31が、ステップS651において、実施の形態1のステップS71と同様の処理を行う。すなわち、条件自動更新部31が、ステップS651において、目的図形候補記憶部8に格納されている目的図形の候補の情報に基づいて、図形条件記憶部3およびセグメント条件記憶部4の内容である条件の自動更新を行う。
 条件自動更新部31が、条件の自動更新を行った後、ステップS652において、図形選択装置102は、指定セグメントから条件設定を行う。具体的には、作業者が、パス選択用条件編集部41の指示に従って、目的のパスに含まれるセグメントを指定する。そして、パス選択用条件編集部41は、指定されたセグメントをパラメータに設定した図形条件16を追加する。この後、図形選択装置102は、ステップS640,S650の処理を行う。
 ステップS652において、作業者がセグメントを指定する際には、パス選択用条件編集部41は、セグメント条件7のパラメータに使用されているセグメントと、図形条件16のパラメータに使用されているセグメントと、これらの何れでもないセグメントとを、各々異なる色で表示させる。
 これにより、セグメント条件7でも図形条件16でも指定されていないセグメント、つまり、目的図形に含まれているかいないかが条件付けされていないセグメントを、作業者が見つけやすくなる。
 ステップS652において作業者が指定するセグメントは、通常、上述のような条件付けされていないセグメントの中の1本である。なぜならば、既にセグメント条件7で指定されているセグメントを図形条件16のパラメータにも指定すると、指定されたセグメントが含まれていない、且つ、含まれるという矛盾となり、この矛盾した両条件を共に満たす図形は存在しえないからである。
 作業者が、既に図形条件16で指定されているセグメントを指定した場合、既に含まれると指定しているセグメントを、再度含まれると指定していることになるので、論理的には意味のない操作となってしまう。以上より、ステップS652において、作業者が、セグメント条件7、もしくは、図形条件16の両方または何れか一方のパラメータに使用されているセグメントを指定した場合に、パス選択用条件編集部41は、別の異なるセグメントの指定を作業者に要求してもよい。
 ステップS650において、目的図形候補確認部42が、目的図形候補記憶部8に格納されている目的図形の候補数が1であると判定するまで、図形選択装置102は、ステップS651,S652,S640,S650の処理を繰り返す。
 目的図形の候補数が1であった場合、すなわち、ステップS650において、Yesの場合、目的図形候補確認部42が、ステップS660において、目的図形を確定する。これにより、目的図形候補確認部42は、目的図形候補記憶部8に格納されている唯一の目的図形候補を、作業者が意図している目的図形であると判断し選択する。そして、図形選択装置102は、動作を停止する。
 以下、図48から図52までを用いて、1本の連続したパスを選択する操作について、具体的に説明する。図48は、実施の形態10において図形選択装置に入力される図面の一例を示す図である。図49は、実施の形態10に係る図形選択装置で選択される図形の一例を示す図である。図50は、実施の形態10に係る図形選択装置に対して作業者が指定する点およびセグメントの一例を示す図である。図51は、実施の形態10に係る図形選択装置が自動的に追加する第1の条件を説明するための図である。図52は、実施の形態10に係る図形選択装置が自動的に追加する第2の条件を説明するための図である。
 図48に示す図面510の図面データは、図47のステップS610において図面データ入力部1に読み込ませる図面データである。図49の図面520は表示装置21に表示されるものであり、図48の図面510の図面データに対応している。図49では、太線で示したパスO1が、作業者の目的とするパスに対応した図形である。ここでは、作業者が、図面510の図面データに対してパスO1を選択する場合について説明する。
 作業者が、ステップS600において、図面を再利用しないことを選択したとする。この場合、図面データ入力部1は、ステップS610において、CADデータから図面データを読み出して図面データ記憶部2に入力する。この後、ステップS620では、プリセット条件設定部12が、予めプリセット条件記憶部11に格納されているプリセット条件を設定する。
 作業者が、ステップS630において、図50に示した始点P1を指定し、先頭セグメントに線分P11を指定し、終点P2を指定し、末尾セグメントに線分P12を指定したとする。
 さらに、パス選択用条件編集部41は、作業者による指定に基づいて、セグメント条件7および図形条件16を追加する。セグメント条件7は、判定するセグメントが、図面データ記憶部2に記憶されている特定のセグメントではないという条件である。図形条件16は、判定する図形を構成するセグメントの中に、図面データ記憶部2に記憶されている特定のセグメントが存在しているという条件である。ここでのパス選択用条件編集部41は、先頭セグメントに線分P11が指定され、末尾セグメントに線分P12が指定されているので、図形条件16のパラメータに線分P11,P12を指定する。
 また、始点P1に接していて、かつ、先頭セグメントの線分P11ではないセグメントは、線分P21,P22である。また、終点P2に接していて、かつ、末尾セグメントの線分P12ではないセグメントは、線分P23から線分P25である。従って、パス選択用条件編集部41は、セグメント条件7のパラメータに、線分P21から線分P25までを指定する。
 条件設定が完了すると、目的図形候補生成部7が、ステップS640において、実施の形態1と同様に、目的図形の候補を生成する。これまでに設定した全ての図形条件およびセグメント条件を満たす図形は、図50に示した線分P13,P26,P27の3本のうちの何れかを含むかで3通りと、線分P14,P28の2本のうちの何れかを含む2通りとがあり、掛け合わせると全体で6通りである。
 このため、目的図形候補生成部7は、ステップS640において、合計6つの目的図形の候補を生成し、目的図形候補記憶部8に格納する。そして、目的図形候補確認部42は、ステップS650において、目的図形候補記憶部8に格納されている目的図形の候補数を確認する。
 ここでは、目的図形候補記憶部8に格納されている目的図形の候補数が6であるので、目的図形候補確認部42は、目的図形の候補数は、1でないと判断する。この場合、すなわち、ステップS650において、Noの場合、条件自動更新部31は、ステップS651において、条件の自動更新を行う。このとき、条件自動更新部31が、目的図形候補記憶部8内の全ての目的図形の候補に含まれているセグメントに対し、図形条件16を追加する。具体的には、条件自動更新部31は、図51において太線で示したセグメントである全ての線分群Q1~Q3をパラメータに設定した図形条件16を追加する。
 ここでは、線分P13,P26,P27および線分P14,P28以外の箇所は、他に線分の候補が無いので、条件自動更新部31は、線分の集まりである線分群Q1~Q3をパラメータに設定した図形条件16を追加している。線分群Q1~Q3は、線分P13,P26,P27および線分P14,P28を含まない線分である。条件自動更新部31は、線分群Q1~Q3をパラメータに設定した図形条件16を、図形条件記憶部3に追加する。
 さらに、条件自動更新部31は、目的図形候補記憶部8内の全ての目的図形の候補に含まれていないセグメント全てをパラメータに設定したセグメント条件7をセグメント条件記憶部4に追加する。このとき、条件自動更新部31が、新たにセグメント条件7のパラメータに設定する線分は、図51において破線で示す線分である。
 条件自動更新部31が、条件の自動更新を行った後、ステップS652において、図形選択装置102が、指定セグメントから条件設定を行う。このとき、作業者が、パス選択用条件編集部41に対して、パスに含まれるセグメントである、図50に示した線分P13を指定したとする。これにより、パス選択用条件編集部41は、作業者からの指定に従って、線分P13をパラメータに設定した図形条件16を追加する。
 この後、目的図形候補生成部7は、ステップS640において、目的図形の候補を生成する。これまでに設定した全ての図形条件およびセグメント条件を満たす図形は、線分P14,P28の2本のうちの何れかを含むので2通りである。このため、目的図形候補生成部7は、2通りの各々に対応する合計2つの目的図形候補を、目的図形候補記憶部8に格納する。
 そして、目的図形候補確認部42は、ステップS650において、目的図形候補記憶部8に格納されている目的図形の候補数を確認する。ここでは、目的図形候補記憶部8に格納されている目的図形の候補数が2であるので、目的図形候補確認部42は、目的図形の候補数は、1でないと判断する。この場合、すなわち、ステップS650においてNoの場合、条件自動更新部31は、ステップS651において、条件の自動更新を行う。このとき、条件自動更新部31が、目的図形候補記憶部8内の全ての目的図形の候補に含まれているセグメントに対し、図形条件16を追加する。具体的には、条件自動更新部31は、図52において太線で示したセグメントである全ての線分群Q11,Q12をパラメータに設定した図形条件16を追加する。
 ここでは、線分P14,P28以外の箇所は、他に線分の候補が無いので、条件自動更新部31は、線分群Q11,Q12をパラメータに設定した図形条件16を追加している。線分群Q11,Q12は、線分P14,P28を含まない線分である。条件自動更新部31は、線分群Q11,Q12をパラメータに設定した図形条件16を、図形条件記憶部3に追加する。
 さらに、条件自動更新部31は、目的図形候補記憶部8内の全ての目的図形の候補に含まれていないセグメント全てをパラメータに設定したセグメント条件7をセグメント条件記憶部4に追加する。このとき、条件自動更新部31が、新たにセグメント条件7のパラメータに設定する線分は、図52において破線で示す線分である。
 条件自動更新部31が、条件の自動更新を行った後、ステップS652において、図形選択装置102が、指定セグメントから条件設定を行う。このとき、作業者が、パス選択用条件編集部41に対して、パスに含まれるセグメントである、図50に示した線分P14を指定したとする。これにより、パス選択用条件編集部41は、作業者からの指定に従って、線分P14をパラメータに設定した図形条件16を追加する。
 この後、目的図形候補生成部7は、ステップS640において、目的図形の候補を生成する。これまでに設定した全ての図形条件およびセグメント条件を満たす図形は、図49に示したパスO1だけである。このため、目的図形候補生成部7は、目的図形の候補であるパスO1を目的図形候補記憶部8に格納する。
 そして、目的図形候補確認部42は、ステップS650において、目的図形候補記憶部8に格納されている目的図形の候補数を確認する。ここでは、目的図形候補記憶部8に格納されている目的図形の候補数が1であるので、目的図形候補確認部42は、目的図形の候補数は、1であると判断する。この場合、すなわち、ステップS650においてYesの場合、目的図形候補確認部42は、ステップS660において、目的図形の唯一の候補であるパスO1を選択し、これにより、選択処理が終了する。
 本実施の形態における処理の流れの中で、作業者は、始点と、終点と、先頭セグメントと、末尾セグメントと、途中の2本のセグメントとの合計6回の選択操作を行っている。図49において太線で示した目的の図形であるパスO1は、16本のセグメントで構成されている。このため、既存の方式である図形を構成するセグメントを全て指定する方式を用いた場合、選択操作の回数は16回となる。また、別の既存の方式である、セグメントを1つ選択すると分岐に到達するまでの全てのセグメントを自動的に選択する方式では、始点と、全ての分岐点で行き先となるセグメントとを指定する必要がある。このような方式の場合、図49において太線で示したパスO1を指定するには、始点の選択と、分岐の度に行き先に対応するセグメントの選択とが必要となる。よって、この場合の選択操作の回数の合計は9回となる。
 なお、実施の形態1,2の図形選択装置101,102が備える構成要素の機能の一部または全部は、後述する処理回路58によって実現されてもよい。図53は、実施の形態1,10の図形選択装置が備える構成要素が処理回路であることを示す図である。
 処理回路58は、専用のハードウェアである。処理回路58は、単一回路、複合回路、プログラム化されたプロセッサ、並列プログラム化されたプロセッサ、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)、またはこれらを組み合わせたものである。図形選択装置101,102を構成する構成要素の一部は、残部とは別個の専用のハードウェアであってもよい。
 図形選択装置101,102が備える構成要素の一部または全部は、プログラムを実行する後述のプロセッサ191によって実現されてもよい。この場合、図形選択装置101,102が備える構成要素の一部または全部は、プロセッサ191が、メインメモリを用いることによって、機能が実現される。
 図54は、実施の形態1,10の図形選択装置が備える制御回路の構成例を示す図である。図54では、図形選択装置101,102が備える構成要素の一部または全部である制御回路を示している。プロセッサ191は、CPU、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、またはDSP(Digital Signal Processor)である。プロセッサ191は、メモリ192に格納されているプログラム90を実行する。
 図形選択装置101,102が備える構成要素の一部または全部がプロセッサ191である場合、制御回路によって図形選択装置101,102の機能が実現される。すなわち、図形選択装置101,102を構成する少なくとも一部の構成要素の機能は、プロセッサ191と、プログラム90とによって実現される。プログラム90は、ソフトウェア、ファームウェア、またはソフトウェアとファームウェアとの組み合わせの何れかである。ソフトウェアまたはファームウェアは、プログラム90で記述され、メモリ192に格納される。プロセッサ191は、メモリ192に記憶されたプログラム90を読み出して実行することによって、図形選択装置101,102を構成する構成要素の機能を実現する。
 プロセッサ191が実行するプログラム90は、コンピュータで実行可能な、目的図形の候補を生成するための複数の命令を含むコンピュータ読取り可能かつ非遷移的な(non-transitory)記録媒体に格納されている。プロセッサ191が実行するプログラム90は、目的図形の候補を生成することをコンピュータに実行させる。
 プロセッサ191が実行するプログラム90は、メモリ192に格納しておく。メモリ192に格納されるプログラム90は、図形選択装置101,102を構成する構成要素の手順または方法をコンピュータに実行させるものであるともいえる。メモリ192は、不揮発性半導体メモリであってもよいし、揮発性の半導体メモリであってもよい。メモリ192は、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read-Only Memory)であってもよい。なお、メモリ192は、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスクまたはDVDであってもよい。
 図形選択装置101,102を構成する複数の構成要素の機能について、一部を専用のハードウェアで実現し、残部をソフトウェアまたはファームウェアで実現してもよい。このように、図形選択装置101,102を構成する複数の構成要素の機能は、ハードウェア、ソフトウェア、ファームウェア、またはこれらの組み合わせによって実現することができる。
 このように、本実施の形態の図形選択装置102と、この図形選択装置102による選択方法では、目的のパスに適切なプリセット条件を持ち、手動および自動で適切な条件が追加されていくことで、既存の方式と比べ、少ない操作回数で、一本の連続したパスを選択することができる。
 このように、実施の形態10によれば、プリセット条件記憶部11が、図面に適したプリセット条件を格納しておき、図形選択装置102が、手動と自動とで適切な図形条件およびセグメント条件を追加していくので、既存の方式よりも少ない操作回数で、1本の連続したパスを選択することができる。
 また、図形選択装置102が、状況に合わせた表示を行うので、作業者の認知に起因するミスを防ぐことができ、また、認知にかかる時間を減少させ、作業時間を減らすことができる。また、図形選択装置102は、状況に合わせた操作へ作業者を誘導するので、作業者の誤操作を防ぐことができ、また、図形選択装置102は、省略できる操作を省くことができるので、作業者の作業時間を減らすことができる。
 以上の実施の形態に示した構成は、本発明の内容の一例を示すものであり、別の公知の技術と組み合わせることも可能であるし、本発明の要旨を逸脱しない範囲で、構成の一部を省略、変更することも可能である。
 1 図面データ入力部、2 図面データ記憶部、3 図形条件記憶部、4 セグメント条件記憶部、5 図形条件判定部、6 セグメント条件判定部、7 目的図形候補生成部、8 目的図形候補記憶部、9 目的図形選択部、11 プリセット条件記憶部、12 プリセット条件設定部、13 条件編集部、14 図面情報指定部、21 表示装置、22 入力装置、31 条件自動更新部、41 パス選択用条件編集部、42 目的図形候補確認部、101,102 図形選択装置。

Claims (20)

  1.  線で表現されたセグメントが組み合わされて構成された選択元の図形の図面データを入力する図面データ入力部と、
     選択の目的となる目的図形が有するセグメントの条件であるセグメント条件を記憶するセグメント条件記憶部と、
     前記目的図形の形状の条件である図形条件を記憶する図形条件記憶部と、
     前記選択元の図形に基づいて、前記セグメント条件および前記図形条件を満たす目的図形の候補を生成する目的図形候補生成部と、
     を備えることを特徴とする図形選択装置。
  2.  前記目的図形候補生成部は、
     前記選択元の図形が前記セグメント条件を満たしているか否かの第1の判定結果と、前記選択元の図形が前記図形条件を満たしているか否かの第2の判定結果と、に基づいて、前記セグメント条件記憶部に記憶された全てのセグメント条件と、前記図形条件記憶部に記憶された全ての図形条件と、を満たした目的図形の候補を生成する、
     ことを特徴とする請求項1に記載の図形選択装置。
  3.  前記目的図形候補生成部は、
     前記選択元の図形からセグメントを抽出し、
     抽出したセグメントのうち前記セグメント条件を満たすセグメントを用いて図形を生成し、
     生成した図形のうち前記図形条件を満たすものを前記目的図形の候補とする、
     ことを特徴とする請求項1に記載の図形選択装置。
  4.  前記目的図形候補生成部が抽出したセグメントが前記セグメント条件を満たすか否かの判定を行ない、判定結果を前記目的図形候補生成部に送るセグメント条件判定部をさらに備える、
     ことを特徴とする請求項3に記載の図形選択装置。
  5.  前記目的図形候補生成部が生成した図形が前記図形条件を満たすか否かの判定を行ない、判定結果を前記目的図形候補生成部に送る図形条件判定部をさらに備えることを特徴とする請求項3に記載の図形選択装置。
  6.  作業者からの指示に従って、前記目的図形の候補の中から前記目的図形を選択する目的図形選択部をさらに備える、
     ことを特徴とする請求項1から5の何れか1つに記載の図形選択装置。
  7.  作業者からの指示に従って、前記図形条件または前記セグメント条件を編集する条件編集部をさらに備える、
     ことを特徴とする請求項1から6の何れか1つに記載の図形選択装置。
  8.  前記条件編集部は、前記作業者によって前記図面データに含まれる情報が指定されると、指定された情報に基づいて、前記図形条件または前記セグメント条件を編集する、
     ことを特徴とする請求項7に記載の図形選択装置。
  9.  前記目的図形候補生成部が生成した前記目的図形の候補に基づいて、前記セグメント条件または前記図形条件に対して、新たな条件の追加、設定済みの条件の削除または設定済みの条件のパラメータ変更を行う条件自動更新部をさらに備える、
     ことを特徴とする請求項1から8の何れか1つに記載の図形選択装置。
  10.  前記目的図形の候補を確認する目的図形候補確認部をさらに備え、
     前記目的図形候補生成部は、前記目的図形の候補の数が複数であった場合に、前記選択元の図形、前記セグメント条件、前記図形条件、または作業者からの指示によって設定された条件に基づいて、生成する前記目的図形の候補または前記作業者に求める操作を変化させる、
     ことを特徴とする請求項1から9の何れか1つに記載の図形選択装置。
  11.  前記図形条件は、図形が2つの閉ループで構成され、かつ、一方の閉ループが他方の閉ループを包含しているという条件である、
     ことを特徴とする請求項1から10の何れか1つに記載の図形選択装置。
  12.  前記図形条件は、ポケット加工個所の形状に対応する条件である、
     ことを特徴とする請求項1から10の何れか1つに記載の図形選択装置。
  13.  前記図形条件は、穴のない旋削部品の外形形状に対応する条件である、
     ことを特徴とする請求項1から10の何れか1つに記載の図形選択装置。
  14.  前記図形条件は、穴のある旋削部品の外形形状に対応する条件である、
     ことを特徴とする請求項1から10の何れか1つに記載の図形選択装置。
  15.  前記図形条件は、溝加工のパターン形状に対応する条件である、
     ことを特徴とする請求項1から10の何れか1つに記載の図形選択装置。
  16.  前記図形条件は、穴加工のパターン形状に対応する条件である、
     ことを特徴とする請求項1から10の何れか1つに記載の図形選択装置。
  17.  前記図形条件は、1本の連続したパス形状に対応する条件である、
     ことを特徴とする請求項1から10の何れか1つに記載の図形選択装置。
  18.  前記図形条件は、幾何学的な条件で定義できる形状に対応する条件である、
     ことを特徴とする請求項1から10の何れか1つに記載の図形選択装置。
  19.  線で表現されたセグメントが組み合わされて構成された選択元の図形の図面データを入力する図面データ入力ステップと、
     選択の目的となる目的図形が有するセグメントの条件であるセグメント条件を設定するセグメント条件設定ステップと、
     前記目的図形の形状の条件である図形条件を設定する図形条件設定ステップと、
     前記選択元の図形に基づいて、前記セグメント条件および前記図形条件を満たす目的図形の候補を生成する目的図形候補生成ステップと、
     を含むことを特徴とする図形選択方法。
  20.  線で表現されたセグメントが組み合わされて構成された選択元の図形の図面データを入力する図面データ入力ステップと、
     選択の目的となる目的図形が有するセグメントの条件であるセグメント条件を設定するセグメント条件設定ステップと、
     前記目的図形の形状の条件である図形条件を設定する図形条件設定ステップと、
     前記選択元の図形に基づいて、前記セグメント条件および前記図形条件を満たす目的図形の候補を生成する目的図形候補生成ステップと、
     をコンピュータに実行させることを特徴とする図形選択プログラム。
PCT/JP2017/011354 2016-07-01 2017-03-22 図形選択装置、図形選択方法および図形選択プログラム WO2018003206A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017541404A JP6239204B1 (ja) 2016-07-01 2017-03-22 図形選択装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016131697 2016-07-01
JP2016-131697 2016-07-01

Publications (1)

Publication Number Publication Date
WO2018003206A1 true WO2018003206A1 (ja) 2018-01-04

Family

ID=60786262

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/011354 WO2018003206A1 (ja) 2016-07-01 2017-03-22 図形選択装置、図形選択方法および図形選択プログラム

Country Status (1)

Country Link
WO (1) WO2018003206A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7500472B2 (ja) 2021-03-04 2024-06-17 株式会社東芝 図面データ処理装置、図面データ処理方法、及びプログラム

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05233735A (ja) * 1992-02-24 1993-09-10 Mutoh Ind Ltd 図面編集装置
JPH07152922A (ja) * 1993-11-29 1995-06-16 Matsushita Electric Ind Co Ltd 図形編集装置
JP2942681B2 (ja) * 1992-10-06 1999-08-30 大日本スクリーン製造株式会社 閉図形抽出装置
JP2001243488A (ja) * 2000-03-02 2001-09-07 Mutoh Ind Ltd 図形要素選択方法及びcad処理プログラムを記憶してなる媒体
JP3628892B2 (ja) * 1998-12-16 2005-03-16 富士通株式会社 図形選択方法、図形選択装置および図形選択プログラムを記録した記録媒体

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05233735A (ja) * 1992-02-24 1993-09-10 Mutoh Ind Ltd 図面編集装置
JP2942681B2 (ja) * 1992-10-06 1999-08-30 大日本スクリーン製造株式会社 閉図形抽出装置
JPH07152922A (ja) * 1993-11-29 1995-06-16 Matsushita Electric Ind Co Ltd 図形編集装置
JP3628892B2 (ja) * 1998-12-16 2005-03-16 富士通株式会社 図形選択方法、図形選択装置および図形選択プログラムを記録した記録媒体
JP2001243488A (ja) * 2000-03-02 2001-09-07 Mutoh Ind Ltd 図形要素選択方法及びcad処理プログラムを記憶してなる媒体

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7500472B2 (ja) 2021-03-04 2024-06-17 株式会社東芝 図面データ処理装置、図面データ処理方法、及びプログラム

Similar Documents

Publication Publication Date Title
JP5965859B2 (ja) 溶接線情報設定装置、プログラム、自動教示システム、および溶接線情報設定方法
US10379523B2 (en) Machining program editing assist apparatus
JP6022393B2 (ja) 溶接線情報設定装置、プログラム、自動教示システム、および溶接線情報設定方法
JPWO2005006092A1 (ja) 自動プログラミング方法および装置
KR102626305B1 (ko) 정보처리장치, 정보처리방법, 및 기억 매체
US8811752B2 (en) Method and program for creating analysis model
CN111161420B (zh) 一种面向3d打印的制鞋模型快速修复方法
JP3361946B2 (ja) ソリッドモデル自動生成装置およびその方法
WO2018003206A1 (ja) 図形選択装置、図形選択方法および図形選択プログラム
JP6239204B1 (ja) 図形選択装置
JP5149451B1 (ja) Ncデータ編集システム
JPWO2004038522A1 (ja) Cadシステム並びにこれを実行するためのプログラム及びこのプログラムを記録した記録媒体
JP2002207504A (ja) 3次元形状データ生成方法及び3次元形状データ生成装置
JP6022394B2 (ja) 作業経路情報設定装置、プログラム、および作業経路情報設定方法
JPH06259505A (ja) 形状簡略化方法
KR101818527B1 (ko) 통합 관리 시스템의 구역상자 관리 방법
WO2022024863A1 (ja) 加工プログラム編集支援装置
KR101722610B1 (ko) 구조물의 소구역 단위의 물량 산출 장치 및 그의 물량 산출 방법
JP7515689B1 (ja) 加工プログラム作成支援装置、加工システム、加工プログラム作成支援方法、および加工方法
WO2023238373A1 (en) Machining program creation support device, machining system, machining program creation support method, and machining method
JP2002063545A (ja) 地図記号認識結果の確認支援方法及び装置並びに記録媒体
JPH09153070A (ja) 図面編集装置
JPH1079053A (ja) 形状モデラ用位相要素同定装置およびそれを用いた命令再実行装置
KR20170007944A (ko) 소구역의 구역상자 생성 및 관리 장치와 그 방법
JPH0773341A (ja) 3次元ソリッドモデリング装置

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2017541404

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17819575

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17819575

Country of ref document: EP

Kind code of ref document: A1