JPH077292B2 - Two-dimensional tool trajectory generation method - Google Patents

Two-dimensional tool trajectory generation method

Info

Publication number
JPH077292B2
JPH077292B2 JP61063944A JP6394486A JPH077292B2 JP H077292 B2 JPH077292 B2 JP H077292B2 JP 61063944 A JP61063944 A JP 61063944A JP 6394486 A JP6394486 A JP 6394486A JP H077292 B2 JPH077292 B2 JP H077292B2
Authority
JP
Japan
Prior art keywords
tool
processing
contour
contour line
area
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
JP61063944A
Other languages
Japanese (ja)
Other versions
JPS62221003A (en
Inventor
のぞみ 澤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP61063944A priority Critical patent/JPH077292B2/en
Publication of JPS62221003A publication Critical patent/JPS62221003A/en
Publication of JPH077292B2 publication Critical patent/JPH077292B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Description

【発明の詳細な説明】 [技術分野] 本発明は、数値制御工作機械で加工領域を加工するため
に工具を移動させるときの2次元軌跡を生成する2次元
工具軌跡生成方法に関する。
Description: TECHNICAL FIELD The present invention relates to a two-dimensional tool trajectory generation method for generating a two-dimensional trajectory when a tool is moved to machine a machining area with a numerically controlled machine tool.

[従来技術] 近年、FA(Factory Automation)やFMS(Flexible Manu
facturing Sytem)が広く提唱されており、このような
システムには切削加工、溶接作業、溶断作業および製図
作業等を自動的に行なうため、数値制御工作機械が用い
られている。
[Prior Art] In recent years, FA (Factory Automation) and FMS (Flexible Manu
facturing system) has been widely proposed, and such a system uses a numerically controlled machine tool to automatically perform cutting, welding, fusing, and drawing work.

この数値制御工作機械は、あらかじめ与えられた移動位
置および速度等の数値データ(すなわち制御プログラ
ム)に基づいて、選択された工具を移動させ、被加工物
(ワーク)を目的とする工作物を加工するものである。
This numerically controlled machine tool moves the selected tool based on the numerical data (that is, the control program) such as the moving position and speed that are given in advance, and processes the target workpiece (workpiece). To do.

従来、このような数値制御工作機械に制御プログラムを
入力するには、所定の数値制御用プログラム言語によっ
て工作物の形状を定義するか、あるいは、加工形状が複
雑な場合には、工作形状の模型(マスタ)を形成してこ
のマスタの表面を工具でトレースさせてそのトレース位
置を直接数値制御工作機械に入力させている(倣い加
工)。
Conventionally, in order to input a control program to such a numerically controlled machine tool, the shape of the workpiece is defined by a predetermined programming language for numerical control, or if the machining shape is complicated, a model of the machined shape is used. (Master) is formed, the surface of this master is traced by a tool, and the trace position is directly input to the numerically controlled machine tool (copying).

しかしながら、前者の方法では複雑な形状を入力するこ
とが困難であり、また、数値制御用プログラム言語を修
得する必要があるためにプログラム作成が困難であっ
た。また後者の方法ではマスタの作成のための手間、時
間およびコストがかかって好ましくない。
However, with the former method, it is difficult to input a complicated shape and it is difficult to create a program because it is necessary to acquire a programming language for numerical control. In addition, the latter method is not preferable because it takes time, time and cost for creating the master.

また、入力された加工形状を加工するための工具の軌跡
を生成するとき、この加工形状の輪郭線よりも工具半径
に相当する量内側にオフセットしてオフセット経路を形
成し、これを順次繰り返して工具の経路を形成している
が、かかる方法では加工形状によってはその中央部など
に削り残りが生じ、この削り残りの部分を処理するため
に煩雑な処理が必要であった。
In addition, when generating the trajectory of the tool for machining the input machining shape, an offset path is formed by offsetting the contour line of this machining shape inward by an amount corresponding to the tool radius, and repeating this in sequence. Although the tool path is formed, in such a method, depending on the machining shape, uncut parts are left in the central part and the like, and complicated processing is required to process the uncut parts.

さらに、加工形状に加工しないで残す部分(いわゆるア
イランド)がある場合には、さらに複雑な処理が必要で
あり、かかる加工形状を適切に加工するための工具軌跡
を自動的に生成することが非常に困難であった。
Furthermore, if there is a portion (so-called island) to be left without being machined in the machined shape, more complicated processing is required, and it is extremely difficult to automatically generate a tool path for properly machining the machined shape. It was very difficult.

[目的] 本発明は、上述した実情に鑑みてなされたものであり、
工具の軌跡を自動的に生成できる2次元工具軌跡生成方
法を提供することを目的としている。
[Purpose] The present invention has been made in view of the above-mentioned circumstances,
It is an object of the present invention to provide a two-dimensional tool trajectory generation method capable of automatically generating a tool trajectory.

[構成] 本発明は、加工領域の画像を入力し、その画像データに
あらわれる加工領域の輪郭線を抽出し、その輪郭線から
加工領域の内側に向かい、径の異なる複数の工具で加工
させる工具別加工領域を、径が小さい工具に対応するも
のから順に形成し、おのおのの工具のオフセット量とオ
ーバラップ量に基づいてそれぞれの工具に対応した一筆
書き状の2次元工具軌跡を形成して、削り残りの出ない
工具軌跡を自動的に生成している。
[Structure] The present invention is a tool for inputting an image of a processing area, extracting a contour line of the processing area that appears in the image data, and working from the contour line toward the inside of the processing area with a plurality of tools having different diameters. Separate machining areas are formed in order from a tool corresponding to a tool having a small diameter, and a one-stroke written two-dimensional tool locus corresponding to each tool is formed based on the offset amount and the overlap amount of each tool, It automatically generates a tool path with no uncut residue.

以下、添付図面を参照しながら、本発明の実施例を詳細
に説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

第1図は、本発明の一実施例にかかる装置を示してい
る。
FIG. 1 shows an apparatus according to an embodiment of the present invention.

同図において、データ処理部1は後述する処理を実行し
て工具軌跡を生成するものであり、このデータ処理部1
に対してオペレータの操作情報を入力するためのキーボ
ード2、加工形状を入力するための画像読取部3および
読取画像や中間ファイル等を記憶するためのメモリ4が
接続されている。
In the figure, the data processing unit 1 executes a process described later to generate a tool trajectory.
A keyboard 2 for inputting operator's operation information, an image reading unit 3 for inputting a processed shape, and a memory 4 for storing a read image, an intermediate file, and the like are connected.

また、画面表示部5は例えばビットマップディスプレイ
装置から構成され、データ処理部1からオペレータに対
する各種のメッセージおよび読取画像等を表示するため
のものであり、表示制御部6はこの画面表示部5の表示
内容を制御するためのものである。
The screen display unit 5 is composed of, for example, a bitmap display device, and is used to display various messages from the data processing unit 1 to the operator, read images, and the like, and the display control unit 6 controls the screen display unit 5. It is for controlling display contents.

したがって、オペレータは会話的に操作および作業を進
めることができ、視覚的に処理状況を確認できる。ま
た、キーボード2は画面表示部5の任意の位置を表示画
素単位に指示できるポインティングデバイスを備えてお
り、画像読取部3はファクシミリ装置の画像入力部等に
用いられているイメージスキャナ等を用いることができ
る。したがって、画像読取部3で読み取られた画像は、
主走査方向と副走査方向に所定の解像度で画素に分解さ
れ、おのおのの画素はそれぞれの濃度に対応した白黒の
二値情報をもっている。
Therefore, the operator can interactively proceed with the operation and work, and can visually confirm the processing status. Further, the keyboard 2 is provided with a pointing device capable of indicating an arbitrary position of the screen display unit 5 in display pixel units, and the image reading unit 3 uses an image scanner or the like used in an image input unit of a facsimile apparatus. You can Therefore, the image read by the image reading unit 3 is
It is divided into pixels with a predetermined resolution in the main scanning direction and the sub-scanning direction, and each pixel has black and white binary information corresponding to each density.

さて、データ処理部1は、第2図(a),(b)に示し
た2次元工具軌跡生成処理を実行して、径が小さく微細
な部分の加工に適した輪郭加工工具および径が大きく広
い部分の加工に適したサライ加工工具の2次元軌跡を生
成する。なお、この場合、加工領域は黒の画像であらわ
されている。
By the way, the data processing unit 1 executes the two-dimensional tool locus generation processing shown in FIGS. 2A and 2B to obtain a contour machining tool suitable for machining a small diameter small portion and a large diameter machining tool. A two-dimensional trajectory of a saray processing tool suitable for processing a wide area is generated. In this case, the processed area is represented by a black image.

まず、読み取った画像データに黒画像であらわれている
加工領域を、サライ加工工具で加工するサライ加工領域
と輪郭加工工具で加工する輪郭加工領域に分割する(処
理110)。この処理110では、加工領域の輪郭線を抽出
し、その輪郭線から輪郭加工工具の径の2倍あるいはサ
ライ加工工具の半径に輪郭加工工具の径を加えた値のう
ち大きい方の寸法の距離だけ内側の範囲を輪郭加工領域
として識別し、それ以外の部分をサライ加工領域として
識別している。
First, the processing area represented by a black image in the read image data is divided into a saray processing area to be processed with a saray processing tool and a contour processing area to be processed with a contour processing tool (process 110). In this processing 110, the contour line of the machining area is extracted, and the distance of the larger dimension of the contour line is twice the diameter of the contour machining tool or the value of the radius of the saray machining tool plus the diameter of the contour machining tool. The area inside only is identified as the contour processing area, and the other portion is identified as the saray processing area.

すなわち第3図に示すように、まず加工領域の輪郭線を
抽出する(処理201)。この処理201では、画像を基準位
置から一定方向に走査して最初に白から黒へ変化してい
る画素を開始画素として判別し、その画素を始点とし
て、次に白から黒(あるいは黒から白)へと変化してい
る隣接画素(変化画素)を見つけ、その方向を第4図
(a)に示した8つの方向のベクトルのいずれか1つに
よってあらわし、次に、その見つけた変化画素を起点と
してその変化画素に入ってきたベクトルよりも2つ左の
ベクトルの方向から反時計回りに次の変化画素を見つ
け、8つの方向のベクトルのいずれか1つによってあら
わし、これを始点に戻ってくるまで順次繰り返す(8連
結ベルトル追跡;第4図(b)参照)。
That is, as shown in FIG. 3, first, the contour line of the processing area is extracted (process 201). In this process 201, an image is scanned in a fixed direction from a reference position, and a pixel that first changes from white to black is determined as a start pixel, and that pixel is used as a starting point, and then white to black (or black to white). ), The adjacent pixel (change pixel) that has changed to (1) is found, and its direction is represented by one of the vectors in the eight directions shown in FIG. 4 (a). Find the next change pixel counterclockwise from the direction of the vector two to the left of the vector that entered the change pixel as the starting point, represent by one of the eight direction vectors, and return to the start point Repeatedly until it comes (8 connected belt tracking; see FIG. 4 (b)).

そして、輪郭線を形成している閉曲線を、始点の位置座
標と、それに順次連続する変化画素のベクトルの並びか
らなるデータによってあらわす。なお、この輪郭線デー
タの最後には終了をあらわすマークが付される。
Then, the closed curve forming the contour line is represented by the position coordinates of the starting point and the data consisting of a sequence of vectors of changing pixels successively consecutive thereto. A mark indicating the end is added to the end of the contour line data.

ただし、2つのベクトルの差が180度以上になる角は輪
郭線を形成し得ないので、さらに反時計回り方向に変化
画素を探す(第4図(c)参照)。なおこの2つのベク
トルのなす角度は、次式(I)に示したように2つのベ
クトルの内積を演算することによって算出できる。
However, an angle where the difference between the two vectors is 180 degrees or more cannot form a contour line, and therefore a changing pixel is searched for in the counterclockwise direction (see FIG. 4 (c)). The angle formed by these two vectors can be calculated by calculating the inner product of the two vectors as shown in the following equation (I).

θ=cos-1(V1・V2/(|V1|・|V2|)) ・・・(I) ここで、V1は変化画素に入ってくるまでの複数個(例え
ば5個)のベクトルの平均ベクトルをあらわし、V2は変
化画素からでていく方向の複数個のベクトルの平均ベク
トルをあらわしている。
θ = cos −1 (V 1 · V 2 / (| V 1 | · | V 2 |)) ・ ・ ・ (I) Here, V 1 is a plural number (eg 5 ) Represents the average vector of the vectors, and V 2 represents the average vector of a plurality of vectors in the direction of going out from the changed pixel.

このようにして輪郭線を抽出すると、1回目であるとき
には(判断202の結果がYES)、そのときに抽出した輪郭
線は加工領域の最外側の輪郭をあらわすためこの最外枠
のデータ(始点の位置座標とベクトルデータ)を記憶す
る(処理203)。
When the contour line is extracted in this way, when it is the first time (the result of the judgment 202 is YES), the contour line extracted at that time represents the outermost contour of the machining area, and therefore the data of this outermost frame (start point The position coordinates and vector data of are stored (step 203).

そして、処理201で輪郭線として抽出した画素に対し、
処理済みをあらわす処理済マークを付加する(処理20
4)。ただし、なるべく加工領域を分断しないために、
第4図(d)に示したように、輪郭線が2ベット以上離
れていない部分には処理済マークを付加しない。この処
理済マークを付加する画素と付加しない画素の区別は、
その画素に入ってくるベクトルとその画素から次の変化
画素に出ていく画素へのベクトルとの関係によって判別
できる。なお同図においては、処理済マークをΔで示し
ている。
Then, for the pixels extracted as contour lines in process 201,
Add a processed mark that indicates processed (Process 20
Four). However, in order not to divide the processing area as much as possible,
As shown in FIG. 4 (d), the processed mark is not added to a portion where the contour lines are not separated by two or more bets. The distinction between the pixel to which this processed mark is added and the pixel to which it is not added is
It can be discriminated by the relationship between the vector entering the pixel and the vector from that pixel to the pixel going out to the next change pixel. In the figure, the processed mark is indicated by Δ.

次に最外枠から所定数の画素数だけ輪郭線の曲出を行な
ったかどうかを調べ(判断205)、この判断205の結果が
NOのときには処理201に戻り、このときには処理済マー
クを付加している画素と加工領域との境界をなす輪郭線
を抽出して順次加工領域の内側の輪郭線を形成している
画素を抽出し、その抽出した画素に処理済マークを付加
する。
Next, it is checked whether or not the contour line is curved out from the outermost frame by a predetermined number of pixels (decision 205).
If NO, the process returns to step 201. At this time, the contour line that forms the boundary between the pixel to which the processed mark is added and the processing region is extracted, and the pixels forming the contour line inside the processing region are sequentially extracted. , A processed mark is added to the extracted pixel.

ここで、判断205で判断する画素数は、輪郭加工領域に
相当する画素数すなわち輪郭加工工具径の2倍あるいは
サライ加工工具の半径に輪郭加工工具の径を加えた値の
大きい方の寸法に相当する画素数である。したがって、
この判断205を終了した時点では、最外枠の輪郭線から
輪郭加工領域の範囲だけ内側の部分の画素に処理済マー
クが付加される。
Here, the number of pixels determined in the determination 205 is the number of pixels corresponding to the contour processing area, that is, twice the diameter of the contour processing tool or the larger value of the radius of the saray processing tool plus the diameter of the contour processing tool. It is the corresponding number of pixels. Therefore,
At the time when this determination 205 is completed, the processed mark is added to the pixels inside the contour processing area within the contour line of the outermost frame.

ところで、処理204によれば、可能な限りに加工領域を
連続させるため、輪郭線の間隔が2ビット以上離れてい
ない部分には処理済マークが付加されず、また、画像の
主走査方向あるいは副走査方向に対して45度に傾斜して
いる部分では実際に輪郭加工工具によって加工される範
囲の の部分までにしか処理済マークが付加されない。
By the way, according to the processing 204, since the processing areas are made continuous as much as possible, the processed mark is not added to the portion where the intervals of the contour lines are not separated by 2 bits or more, and the main scanning direction or the sub-direction of the image is not added. In the part inclined at 45 degrees to the scanning direction, the range of the area actually processed by the contour processing tool The processed mark is added only up to.

そこで、実際に輪郭加工工具で加工される領域を正確に
形成するために、処理203で記憶した最外枠の輪郭線を
あらわすベクトルデータを読み込み(処理206)、輪郭
加工領域の画素数の2倍の径で描いた加工円の中心をこ
の最外枠の輪郭線に沿って移動したときにその加工円の
内側に含まれる領域に属する画素で処理済マークが付加
されていないものに処理済マークを付加して、加工領域
を補正する(処理207)。
Therefore, in order to accurately form the area actually processed by the contour processing tool, the vector data representing the contour line of the outermost frame stored in step 203 is read (step 206), and the number of pixels of the contour processing area is set to 2 When the center of a processed circle drawn with a doubled diameter is moved along the contour line of this outermost frame, the pixels that belong to the area inside the processed circle and have no processed mark have been processed. A mark is added to correct the processing area (process 207).

これによって、正確な輪郭加工領域に対応する部分の画
素に処理済マークが付加される。
As a result, the processed mark is added to the pixels in the portion corresponding to the accurate contour processing area.

このようにして、加工領域を輪郭加工領域とサライ加工
領域に分割すると、加工領域のうち処理済マークが付加
されていない画素にサライ加工領域を示すマークを付し
てサライ加工領域のデータを形成してこれを記憶する
(処理120)。
In this way, when the processing area is divided into the contour processing area and the saray processing area, the pixels of the processing area to which the processed mark is not added are marked with the saray processing area to form the data of the saray processing area. Then, this is stored (process 120).

次に、サライ加工領域のマークを付加した部分を非加工
領域のデータすなわち白画素に変換して、処理110で処
理済マークを付加した画素を黒画素の状態に戻す(処理
130)。
Next, the mark-added portion of the saray-processed area is converted into data of the non-working area, that is, white pixels, and the pixel to which the processed mark is added in the processing 110 is returned to the black pixel state (processing
130).

したがって、例えば第5図に示したような画像を画像読
取部3から入力すると、この画像に黒で描かれた部分BL
が加工領域として判別され、第6図(a)に示したよう
に、輪郭加工工具で加工する輪郭加工領域RAと、サライ
加工工具で加工するサライ加工領域RBにそれぞれ分割さ
れる。
Therefore, for example, when an image as shown in FIG. 5 is input from the image reading unit 3, the portion BL drawn in black in this image is displayed.
Is discriminated as a machining area, and as shown in FIG. 6A, the contour machining area RA is machined by the contour machining tool and the saray machining area RB is machined by the saray machining tool.

このようにして、輪郭加工領域とサライ加工領域を算出
すると、次に、輪郭加工領域を輪郭加工工具で加工する
ための輪郭加工軌跡およびサライ加工領域をサライ加工
工具で加工するためのサライ加工軌跡を、処理140,150
によってそれぞれ形成する。
In this way, when the contour processing area and the saray processing area are calculated, next, the contour processing trajectory for processing the contour processing area with the contour processing tool and the saray processing trajectory for processing the saray processing area with the saray processing tool The processing 140,150
To form each.

輪郭加工軌跡演算処理140では、まず、処理103で輪郭加
工領域を形成した状態で第3図の処理を輪郭加工工具の
半径に相当する画素数について適用し、輪郭加工工具が
通過するオフセット量すなわち輪郭加工工具の半径だけ
輪郭加工領域の最外枠を削って加工領域を更新する(処
理141)。このときに削った部分の画素には処理済マー
クを付加する。
In the contour processing locus calculation processing 140, first, in the state where the contour processing area is formed in the processing 103, the processing of FIG. 3 is applied to the number of pixels corresponding to the radius of the contour processing tool, and The outermost frame of the contour processing area is cut by the radius of the contour processing tool to update the processing area (process 141). At this time, a processed mark is added to the pixel of the part that is cut off.

次に、更新した加工領域において、処理済マークを付加
した画素と黒画素との境界線(輪郭線)を第3図の処理
201と同様な方法で算出し、その算出結果(すなわち追
跡ベクトル)をスムージング処理して、円、工具径の10
倍以上の長い直線、頂点、短い直線、円弧および自由曲
線の組合せによってあらわした輪郭加工工具の最外枠工
具軌跡を算出する(処理142)。
Next, in the updated processing area, the boundary line (contour line) between the pixel to which the processed mark is added and the black pixel is processed as shown in FIG.
It is calculated by the same method as 201, and the calculation result (that is, the tracking vector) is smoothed, and the circle and tool diameter 10
The outermost frame tool locus of the contour processing tool represented by a combination of a straight line that is more than twice as long, a vertex, a short straight line, a circular arc, and a free curve is calculated (process 142).

すなわち、第7図に示したように、まず、輪郭線の円の
部分を判定する(処理301)。この処理301では、輪郭線
の各座標を次式(II)に代入して各座標におけるCの値
を算出し、Cが一定の場合は仮の円と判定する。そし
て、仮の円と判定した場合、輪郭線の任意の3点を適宜
に複数組選んでおのおのの組の3点を通る円の中心を算
出し、これらの複数個の中心の平均位置を算出して当該
輪郭線を円とみなしたときの仮の中心を求める。
That is, as shown in FIG. 7, first, the circle portion of the contour line is determined (process 301). In this process 301, each coordinate of the contour line is substituted into the following formula (II) to calculate the value of C at each coordinate, and when C is constant, it is determined to be a tentative circle. When it is determined that the circle is a provisional circle, a plurality of arbitrary three points on the contour line are appropriately selected and the center of the circle passing through the three points of each set is calculated, and the average position of the plurality of centers is calculated. Then, the provisional center when the contour is regarded as a circle is obtained.

次に、このようにして得た仮の中心から次式(III)の
ような円の方程式を形成し、さらに、各画素データと式
(III)で算出した仮の円との距離Δliの絶対値の積算
値SAおよび積算値SBを次式(IV),(V)に基づいて算
出し、それらの結果に基づいて式(III)で算出した仮
の円が実際の円として識別できるかどうかを判定する。
Next, a circle equation such as the following equation (III) is formed from the thus obtained temporary center, and the absolute value of the distance Δli between each pixel data and the temporary circle calculated by the equation (III) is calculated. Whether the tentative circle calculated by formula (III) based on the following formulas (IV) and (V) can be identified as the actual circle by calculating the accumulated value SA and accumulated value SB of the values To judge.

C=(x2+y2)y ・・・(II) (x−xc)+(y−yc)=Γ ・・・(III) ここで、円は1つの閉曲線をなすから、この円の判定に
よって1つの輪郭線を形成する全ての軌跡が終了したか
どうかを調べ(判断302)、この判断302の結果がNOのと
きには次の処理へと進む。
C = (x 2 + y 2 ) y (II) (x−xc) 2 + (y−yc) 2 = Γ 2 (III) Here, since a circle forms one closed curve, it is checked whether or not all the loci forming one contour line have ended by the judgment of this circle (judgment 302), and if the result of this judgment 302 is NO, the next Proceed to processing.

次には、輪郭加工工具の10倍以上の長さの直線を算出す
る(処理303)。この処理303では、単位ベクトル5個分
のベクトルの平均ベクトル形成し、その平均ベクトルの
ベクトル角から、次式(III)に基づいて仮の直線区間
を算出する。
Next, a straight line having a length ten times or more that of the contour processing tool is calculated (process 303). In this process 303, an average vector of five unit vectors is formed, and a tentative straight line section is calculated from the vector angle of the average vector based on the following equation (III).

次に、各画素データと式(VI)で算出した仮の直線との
距離Δliの絶対値の積算値SAおよび積算値SBをそれぞれ
式(IV),(V)に基づいて算出し、それらの結果に基
づいて式(VI)で算出した仮の直線が実際の直線として
識別できるかどうかを判定する。
Next, the integrated value SA and the integrated value SB of the absolute value of the distance Δli between each pixel data and the tentative straight line calculated by the formula (VI) are calculated based on the formulas (IV) and (V), respectively. Based on the result, it is determined whether the provisional straight line calculated by the formula (VI) can be identified as an actual straight line.

ax+by+c=0 ・・・(VI) なお、さらにベクトルの方向のヒストグラムを形成し、
そのヒストグラムにピークがただ1つある場合にはその
区間を直線として、ヒストグラムのピークがそれ以上の
個数ある場合にはそれ以外のものとして判別している。
ax + by + c = 0 (VI) Furthermore, a histogram in the direction of the vector is further formed,
If there is only one peak in the histogram, the section is determined as a straight line, and if there are more peaks in the histogram, it is determined as other.

次に、処理301および処理303で円および長い直線と判別
されなかった部分について、輪郭線に現われる頂点を判
別する(処理304)。
Next, the vertices appearing in the contour line are discriminated for the portions which are not discriminated as circles and long straight lines in the processing 301 and the processing 303 (processing 304).

この処理では、処理303で形成した平均ベクトルを式
(I)に代入して2つの平均ベクトルのなす角度を算出
し、その算出結果に基づいて頂点を判別する。このと
き、第8図に示したように、平均ベクトルの算出起点に
よっては、点P1が誤って頂点として判断されるおそれが
あるので、2つの平均ベクトルのなす角度がある程度鋭
くなっている部分では、平均ベクトルの算出起点を順次
変化させ、2つの平均ベクトルのなす角度が最も鋭く、
かつ、安定している状態を判別し、それによって適切な
頂点Ptを検出している。
In this process, the average vector formed in process 303 is substituted into the formula (I) to calculate the angle formed by the two average vectors, and the vertex is discriminated based on the calculation result. At this time, as shown in FIG. 8, the point P1 may be erroneously determined as the apex depending on the starting point of calculation of the average vector. , The average vector calculation starting point is sequentially changed, and the angle formed by the two average vectors is the sharpest,
In addition, the stable state is determined, and the appropriate vertex Pt is detected accordingly.

次に、処理303で算出した直線の端点と処理304で算出し
た頂点の間の区間、あるいは、頂点と頂点との間の区間
で直線と判定できる部分を、処理303と同様な判断基準
で算出する(処理305)。
Next, a section between the end points of the straight line calculated in step 303 and the apex calculated in step 304, or a portion that can be determined to be a straight line in the section between the apexes is calculated using the same judgment criteria as in step 303. Yes (process 305).

次に、処理301,303,304,305で処理されなかった区間に
対し、円弧の部分を算出する(処理306)。この処理306
では、処理301とほぼ同様にして仮の円弧区間を算出
し、この仮の円弧区間の仮の中心を仮の円弧区間の8点
の座標をもとに算出し、仮の中心から式(III)のよう
な円の方程式を形成する。
Next, an arc portion is calculated for the section not processed by the processes 301, 303, 304, 305 (process 306). This process 306
Then, a tentative arc section is calculated in substantially the same manner as in step 301, the tentative center of this tentative arc section is calculated based on the coordinates of the eight points of the tentative arc section, and the tentative center is used to calculate the formula (III ) Form a circle equation.

そして、この仮の円弧との実際の画素の座標との差を上
式(IV),(V)によって算出し、その算出結果に基づ
いてその仮の円弧区間を適切なものであるかどうかを判
断するとともに、半径を判定する。
Then, the difference between this temporary arc and the actual pixel coordinates is calculated by the above equations (IV) and (V), and it is determined whether the temporary arc section is appropriate based on the calculation result. The radius is determined along with the determination.

最後に、処理301,303〜306で対象とならなかった区間に
対して、スプライン曲線からなる自由曲線をあてはめる
(処理307)。
Finally, a free curve consisting of a spline curve is fitted to the sections not covered by the processing 301, 303 to 306 (processing 307).

このようにして、処理142により輪郭加工工具の最外枠
工具軌跡を算出する。
In this way, the outermost frame tool locus of the contour processing tool is calculated by the process 142.

そして、次に第3図の処理を輪郭加工工具のオーバラッ
プ量に相当する画素数について適用し、最外枠工具軌跡
を輪郭加工工具が通過したときと1つ内側の工具軌跡を
輪郭加工工具が通過したときのオーバラップ量に相当す
る部分の画素に処理済マークを付加する(処理143)。
なお、この処理143においては、工具軌跡が一筆書き状
になるように連続性を失わないような処理を施す。
Then, the processing of FIG. 3 is applied to the number of pixels corresponding to the overlap amount of the contouring tool, and when the contouring tool passes through the outermost frame tool trajectory and when the contouring tool has one inner tool trajectory. The processed mark is added to the pixels in the portion corresponding to the overlap amount when the image has passed (process 143).
In this process 143, a process that does not lose continuity is performed so that the tool path becomes a single stroke.

このような処理141,142,143を、全ての加工領域の最外
枠について適用するまで繰り返し実行し(判断144のル
ープ)、各加工領域の輪郭加工領域の最外枠工具軌跡を
算出する。
Such processing 141, 142, 143 is repeatedly executed until the outermost frame of all the machining areas is applied (loop of determination 144), and the outermost frame tool locus of the contour machining area of each machining area is calculated.

次に、第3図の処理を輪郭加工工具のオフセット量に相
当する画素数について適用して内側の加工領域を加工す
るためのオフセット線を抽出し(処理145)、このオフ
セット線に対応したスムージング処理しない工具軌跡を
算出し(処理146)、第3図の処理を輪郭加工工具のオ
ーバラップ量に相当する画素数について適用してオーバ
ラップする分の画素に処理済マークを付加し(処理14
7)、輪郭加工領域の全ての画素に処理済マークが付加
されるまで処理145,146,147を繰り返し実行して(判断1
48のループ)、最外枠以外の輪郭加工領域を加工するた
めの工具軌跡を算出する。
Next, the processing of FIG. 3 is applied to the number of pixels corresponding to the offset amount of the contour processing tool to extract an offset line for processing the inner processing area (processing 145), and smoothing corresponding to this offset line. An unprocessed tool locus is calculated (process 146), the process of FIG. 3 is applied to the number of pixels corresponding to the overlap amount of the contouring tool, and processed pixels are added to the overlapped pixels (process 14).
7) The processes 145, 146, and 147 are repeatedly executed until the processed marks are added to all the pixels in the contour processing area (determination 1
(Loop of 48), and calculate a tool locus for machining the contour machining area other than the outermost frame.

このようにして輪郭加工軌跡演算処理140により、全て
の輪郭加工領域における輪郭加工工具の工具軌跡が算出
される。
In this way, the contour machining trajectory calculation processing 140 calculates the tool trajectory of the contour machining tool in all contour machining areas.

そして次に、サライ加工領域をサライ加工工具で加工す
るための工具軌跡をサライ加工軌跡演算処理150によっ
て算出する。
Then, next, the tool path for processing the saray processing region with the saray processing tool is calculated by the saray processing trajectory calculation processing 150.

このサライ加工軌跡演算処理150では、まず、処理120で
記憶したサライ加工領域のデータを読み込んだ後(処理
151)、輪郭加工軌跡演算処理140において処理141を省
略したと同様の処理を、指定されたサライ工具の径やオ
ーバラップ量等について実行する(処理152,153、判断1
54、処理155,156,157、判断158)。
In the saray processing locus calculation processing 150, first, after reading the data of the saray processing area stored in the processing 120 (processing
151), the same processing as that in which the processing 141 is omitted in the contour processing locus calculation processing 140 is executed for the diameter and the overlap amount of the specified saray tool (processing 152, 153, judgment 1).
54, processing 155, 156, 157, decision 158).

なお、ここでサライ加工領域の最外径を加工するための
オフセット線を形成する必要がないのは、処理110で輪
郭加工領域とサライ加工領域を分割したとき、輪郭加工
領域をサライ加工工具の半径よりも大きく設定したの
で、サライ加工領域の最外枠に沿ってサライ工具を移動
しても読取画像で設定された加工領域の外側まで加工す
るおそれがないからである。
Note that it is not necessary to form an offset line for processing the outermost diameter of the saray processing area here because the contour processing area and the saray processing area are divided in step 110 when the contour processing area Since the radius is set larger than the radius, even if the saray tool is moved along the outermost frame of the saray processing area, there is no risk of processing outside the processing area set in the read image.

これにより、全てのサライ加工領域におけるサライ加工
工具の工具軌跡が算出される。
As a result, the tool trajectory of the saray processing tool in all the saray processing regions is calculated.

以上のようにして、加工領域の画像を原稿に形成し、そ
の原稿を画像読取部3で読み取らせるだけで、例えば第
6図(b)に示したような輪郭加工工具の工具軌跡およ
びサライ加工工具の工具軌跡が自動的に形成される。ま
た、読み取りのさいの画像の歪み等は、処理142によっ
てスムージングされる結果、除去される。
As described above, the image of the processing area is formed on the original document, and the original document is read by the image reading unit 3, and the tool locus and the saray processing of the contour processing tool as shown in FIG. The tool path of the tool is automatically formed. In addition, the distortion and the like of the image at the time of reading are removed as a result of being smoothed by the process 142.

なお、第6図(b)で破線は輪郭加工工具の工具軌跡を
示し、一点鎖線はサライ加工工具の工具軌跡を示してい
る。ただし、この場合には輪郭加工工具の最内側の工具
軌跡とサライ加工工具の最外側の工具軌跡が重複してい
る。
In FIG. 6 (b), the broken line indicates the tool locus of the contour processing tool, and the alternate long and short dash line indicates the tool locus of the saray processing tool. However, in this case, the innermost tool locus of the contour machining tool and the outermost tool locus of the saray machining tool overlap.

ところで、上述した実施例では、径の小さい輪郭加工工
具と、径の大きいサライ加工工具の2つの工具によって
読取画像に設定されている加工領域を切削加工する場合
について説明したが、径が異なる3つ以上の工具を用い
た場合でも、同様にして本発明を適用することができ
る。またこのように複数の径が異なる工具による工具軌
跡を生成しているので、とくに工具を自動的に交換でき
る機能(オート・ツール・チェンジャ)を備えた数値制
御工作機械に対して、本発明は非常に大きな効果を奏す
る。
By the way, in the above-described embodiment, the case where the processing area set in the read image is cut by the two tools of the contour processing tool having a small diameter and the saray processing tool having a large diameter has been described. The present invention can be similarly applied even when three or more tools are used. Further, since the tool loci are generated by the tools having different diameters as described above, the present invention is particularly applicable to a numerically controlled machine tool having a function (auto tool changer) capable of automatically exchanging tools. Very effective.

また、上述した実施例では、読取画像の黒画素の部分を
加工領域として判断しているが、白画素の部分を加工領
域として判別させることもできる。その場合、読取画像
を白黒反転した画像の黒画素の部分を加工領域として判
断させてもよい。
Further, in the above-described embodiment, the black pixel portion of the read image is determined as the processing area, but the white pixel portion may be determined as the processing area. In that case, the black pixel portion of the image obtained by inverting the read image in black and white may be determined as the processing region.

なお、工具軌跡をスムージングする方法としては、上述
した実施例以外のものを用いることもできる。
As a method for smoothing the tool locus, a method other than the above-mentioned embodiments can be used.

また、上述した実施例では、予め加工領域の画像を形成
した原稿を画像読取部で読み取らせ、その読取画像から
加工領域を識別しているが、画面表示部とキーボードに
よって線画からなる加工領域を形成し、それに白黒の画
像を指定することによって加工領域を入力することもで
きる。
Further, in the above-described embodiment, the image reading unit reads the document on which the image of the processing area is formed in advance, and the processing area is identified from the read image. However, the processing area including the line drawing is displayed by the screen display unit and the keyboard. It is also possible to input the processing area by forming the image and designating a black and white image on it.

[効果] 以上説明したように、本発明によれば、加工領域の画像
を入力し、その画像データにあらわれる加工領域の輪郭
線を抽出し、その輪郭線から加工領域の内側に向かい、
径の異なる複数の工具で加工させる工具別加工領域を、
径が小さい工具に対応するものから順に形成し、おのお
のの工具のオフセット量とオーバラップ量に基づいてそ
れぞれの工具に対応した一筆書き状の2次元工具軌跡を
形成して、削り残りの出ない工具軌跡を自動的に生成し
ているので、工具軌跡を形成するための労力および時間
を格段に短縮できる。
[Effect] As described above, according to the present invention, an image of a processing area is input, a contour line of the processing area that appears in the image data is extracted, and the contour line is directed to the inside of the processing area.
A machining area for each tool to be machined with multiple tools with different diameters
It forms in order from a tool with a small diameter, and forms a one-stroke written two-dimensional tool locus corresponding to each tool based on the offset amount and overlap amount of each tool, and there is no uncut residue. Since the tool locus is automatically generated, the labor and time for forming the tool locus can be significantly reduced.

【図面の簡単な説明】[Brief description of drawings]

第1図は本発明の一実施例にかかるデータ処理装置を示
したブロック図、第2図(a),(b)は工具軌跡を生
成するための処理例を示したフローチャート、第3図は
加工領域を抽出するための処理例を示したフローチャー
ト、第4図(a)〜(d)は輪郭線抽出を説明するため
の説明図、第5図は読取画像の一例を示した平面図、第
6図(a),(b)は処理の中間状態を説明するための
説明図、第7図はスムージング処理の一例を示したフロ
ーチャート、第8図は頂点の識別を説明するための説明
図である。 1……データ処理部、2……キーボード、3……画像読
取部、4……メモリ、5……画面表示部、6……表示制
御部。
FIG. 1 is a block diagram showing a data processing device according to an embodiment of the present invention, FIGS. 2 (a) and 2 (b) are flowcharts showing a processing example for generating a tool path, and FIG. 4 is a flowchart showing an example of processing for extracting a processing region, FIGS. 4A to 4D are explanatory views for explaining contour line extraction, and FIG. 5 is a plan view showing an example of a read image. 6 (a) and 6 (b) are explanatory views for explaining the intermediate state of the processing, FIG. 7 is a flowchart showing an example of the smoothing processing, and FIG. 8 is an explanatory view for explaining the identification of the vertices. Is. 1 ... Data processing unit, 2 ... Keyboard, 3 ... Image reading unit, 4 ... Memory, 5 ... Screen display unit, 6 ... Display control unit.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】数値制御工作機械に加工させる加工領域に
対応した画像を形成し、その画像のデータに基づいて上
記加工領域にあらわれる輪郭線を抽出し、この輪郭線か
ら加工領域の内側に向かって径の異なる複数の工具で加
工させる工具別加工領域を径が小さい工具に対応するも
のから順に形成し、おのおのの工具別加工領域に対応す
る工具のオフセット量およびオーバラップ量に基づいて
それぞれの工具に対応した一筆書き状の2次元工具軌跡
を形成することを特徴とする2次元工具軌跡生成方法。
1. An image corresponding to a machining area to be machined by a numerically controlled machine tool is formed, a contour line appearing in the machining area is extracted based on data of the image, and the contour line is directed from the contour line toward the inside of the machining area. The machining area for each tool to be machined with multiple tools with different diameters is formed in order from the tool corresponding to the tool with the smallest diameter, and each of them is based on the offset amount and overlap amount of the tool corresponding to the machining area for each tool. A two-dimensional tool locus generating method, characterized in that a one-stroke-shaped two-dimensional tool locus corresponding to a tool is formed.
【請求項2】特許請求の範囲第1項記載において、前記
輪郭線は、隣接する変化画素をベクトルで結んで形成さ
れることを特徴とする2次元工具軌跡生成方法。
2. The two-dimensional tool locus generating method according to claim 1, wherein the contour line is formed by connecting adjacent change pixels with a vector.
【請求項3】特許請求の範囲第1項記載において、最外
側の前記工具別加工領域で輪郭線を形成するための2次
元工具軌跡は、その部分が円、直線、頂点、円弧および
自由曲線のいずれかに変換されて円滑化された状態でオ
フセット量だけ内側に形成され、それ以外の前記工具別
加工領域では、その輪郭線に沿って最外側の2次元工具
軌跡が形成されることを特徴とする2次元工具軌跡生成
方法。
3. The two-dimensional tool locus for forming a contour line in the outermost machining region according to claim 1, wherein the portion is a circle, a straight line, a vertex, a circular arc or a free curve. It is formed on the inside by an offset amount in a smoothed state by being converted to any of the above, and in the other machining area for each tool, the outermost two-dimensional tool locus is formed along its contour line. A characteristic two-dimensional tool trajectory generation method.
JP61063944A 1986-03-24 1986-03-24 Two-dimensional tool trajectory generation method Expired - Fee Related JPH077292B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61063944A JPH077292B2 (en) 1986-03-24 1986-03-24 Two-dimensional tool trajectory generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61063944A JPH077292B2 (en) 1986-03-24 1986-03-24 Two-dimensional tool trajectory generation method

Publications (2)

Publication Number Publication Date
JPS62221003A JPS62221003A (en) 1987-09-29
JPH077292B2 true JPH077292B2 (en) 1995-01-30

Family

ID=13243963

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61063944A Expired - Fee Related JPH077292B2 (en) 1986-03-24 1986-03-24 Two-dimensional tool trajectory generation method

Country Status (1)

Country Link
JP (1) JPH077292B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016064438A (en) * 2014-09-25 2016-04-28 株式会社ユミノ金属工業 Gas cutting machine and gas cutting method

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2632541B2 (en) * 1988-02-09 1997-07-23 新光電気工業株式会社 Pocket cutting method using automatic processing machine
JP2701307B2 (en) * 1988-04-08 1998-01-21 株式会社リコー Method for generating a rough tool path for area machining
JPH01257503A (en) * 1988-04-08 1989-10-13 Shinko Electric Ind Co Ltd Pocket cutting method employing automatic machining device
JP2007283452A (en) * 2006-04-19 2007-11-01 Mitsubishi Heavy Ind Ltd Cutting method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5866118A (en) * 1981-10-15 1983-04-20 Yamazaki Mazak Corp Work condition display method for numerical control machine tool
JPS60186906A (en) * 1984-03-05 1985-09-24 Fanuc Ltd Automatic programming method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016064438A (en) * 2014-09-25 2016-04-28 株式会社ユミノ金属工業 Gas cutting machine and gas cutting method

Also Published As

Publication number Publication date
JPS62221003A (en) 1987-09-29

Similar Documents

Publication Publication Date Title
EP0044192B2 (en) A method for preparing numerical control information
US5177689A (en) Cad/cam apparatus for enhancing operator entry of machining attributes and geometric shapes
US6968080B2 (en) Method and apparatus for generating part programs for use in image-measuring instruments, and image-measuring instrument and method of displaying measured results therefrom
EP0258897B1 (en) Method and system for automatically generating tool path data for automatic machining center
CN102473008B (en) Automatic programming device and method
CN102473009B (en) Automatic programming device and method
JPH0561649B2 (en)
US8594831B2 (en) Automatic programming method and automatic programming device
JPH077292B2 (en) Two-dimensional tool trajectory generation method
JP2752787B2 (en) Numerical control information creation device
JP2617292B2 (en) Program creation device for numerically controlled machine tools
JPS6244282B2 (en)
JPH07107645B2 (en) Two-dimensional tool trajectory generation method
JP2701307B2 (en) Method for generating a rough tool path for area machining
DE19829661A1 (en) Computer-aided robot control sequence generation method
JPH0683422A (en) Numerical control method
JP2629759B2 (en) Data generation method for numerical control machining
CN111950189A (en) Cutter machining path planning method suitable for curved surface
US6681144B1 (en) Process and system for working a workpiece through numerically controlled machine tools
JPH069007B2 (en) NC data creation method for compound curved surface
JPS62256103A (en) Nc data producing method for numerical control
JP2637923B2 (en) Method for correcting stripe pattern direction data and information processing apparatus for executing the same, and method for correcting stripe pattern pitch data and information processing apparatus for executing the same
JP2792764B2 (en) Numerical control data editing device
JP3372582B2 (en) NC data creation apparatus and method
JP2824271B2 (en) 2D tool path generation method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees