JP2001273016A - Data processor and a memory medium readable by a computer - Google Patents
Data processor and a memory medium readable by a computerInfo
- Publication number
- JP2001273016A JP2001273016A JP2000087834A JP2000087834A JP2001273016A JP 2001273016 A JP2001273016 A JP 2001273016A JP 2000087834 A JP2000087834 A JP 2000087834A JP 2000087834 A JP2000087834 A JP 2000087834A JP 2001273016 A JP2001273016 A JP 2001273016A
- Authority
- JP
- Japan
- Prior art keywords
- point
- points
- coefficient
- point group
- element data
- 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.)
- Pending
Links
- 238000012545 processing Methods 0.000 claims description 76
- 238000000034 method Methods 0.000 claims description 35
- 238000013461 design Methods 0.000 description 33
- 238000006243 chemical reaction Methods 0.000 description 28
- 238000010586 diagram Methods 0.000 description 6
- 238000011960 computer-aided design Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000003754 machining Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Landscapes
- Complex Calculations (AREA)
- Numerical Control (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、曲線を近似する幾
つかの円弧と幾つかの線分の集合を表す複数の要素デー
タを生成するデータ処理装置と、コンピュータを、その
ようなデータ処理装置として動作させるためのコンピュ
ータ読取可能な記録媒体とに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus for generating a plurality of element data representing a set of several arcs and several line segments approximating a curve, and a computer. And a computer-readable recording medium for operating as a computer.
【0002】[0002]
【従来の技術】近年、さまざまな種類の設計図面(例え
ば、プリント基板、船舶、建物等の設計図面)が、コン
ピュータ(CADプログラム)を用いて作成されるように
なっている。CADプログラムによって作成される設計
図面データは、周知のように、それぞれ、特定形状の図
形要素(円、円弧、線分、曲線等)を表す複数の図形要素
データを含んでいる。2. Description of the Related Art In recent years, various types of design drawings (for example, design drawings of a printed circuit board, a ship, a building, and the like) have been created using a computer (CAD program). As is well known, the design drawing data created by the CAD program includes a plurality of graphic element data each representing a graphic element (circle, arc, line segment, curve, etc.) of a specific shape.
【0003】[0003]
【発明が解決しようとする課題】さて、CADプログラ
ムによって作成された設計図面データが直接的に工作機
械に入力されて製品が製造されている分野もあるが、船
舶等の製造時に用いられているNC(numerical contro
l)工作機械は、直線状の動作(加工)或いは円弧状の動作
しか行えないものとなっている。すなわち、船舶等の製
造に用いられるNC工作機械は、コンピュータによって
作成された設計図面データ内に含まれる曲線図形要素に
対応した動作を行なえないものとなっている。このた
め、従来は、CADプログラムによって得られた設計図
面データ(或いは設計図面)に基づき、オペレータ(制
御データの作成者)が各曲線を分割して夫々円弧(或い
は線分)として近似し、その分割位置を指定する形で、
NC工作機械用の制御データが作成され、その制御デー
タによってNC工作機械が制御されていた。In some fields, products are manufactured by directly inputting design drawing data created by a CAD program to a machine tool. However, such products are used in the manufacture of ships and the like. NC (numerical contro
l) The machine tool can perform only a linear motion (machining) or a circular motion. That is, an NC machine tool used for manufacturing a ship or the like cannot perform an operation corresponding to a curve graphic element included in design drawing data created by a computer. For this reason, conventionally, based on design drawing data (or design drawing) obtained by a CAD program, an operator (creator of control data) divides each curve and approximates each curve as an arc (or line segment). By specifying the division position,
Control data for the NC machine tool is created, and the NC machine tool is controlled by the control data.
【0004】そのようにして作成された制御データは、
曲線部分が過度に細かく円弧に分割されたものであるこ
とが多いため、従来は、1動作で加工させても良い部分
が2動作で加工されるといったように、NC工作機械が
非効率的に利用されることが頻繁に生じていた。[0004] The control data thus created is
Since the curved portion is often divided into arcs that are excessively finely divided, conventionally, the NC machine tool is inefficient, such that a portion that may be processed in one operation is processed in two operations. It was frequently used.
【0005】そこで、本発明の課題は、円弧以外の形状
の曲線を、幾つかの円弧要素と幾つかの線分要素の組み
合わせで表した、要素の総数が少ないデータを生成する
ことが出来るデータ処理装置であって、例えば、CAD
プログラムによって作成した設計図面ファイル(曲線の
定義情報を含むファイル)から、NC工作機械を効率よ
く制御できる制御データファイル(曲線を表す複数の要
素データを含むファイル)を簡単に得ることが出来るデ
ータ処理装置を提供することにある。[0005] It is an object of the present invention to provide a data which can generate data having a small total number of elements, in which a curve having a shape other than an arc is represented by a combination of some arc elements and some line segment elements. A processing device, for example, CAD
Data processing for easily obtaining a control data file (a file containing a plurality of element data representing a curve) that can efficiently control an NC machine tool from a design drawing file (a file containing curve definition information) created by a program It is to provide a device.
【0006】また、本発明の他の課題は、コンピュータ
を、そのようなデータ処理装置として動作させるための
コンピュータ読取可能な記録媒体を提供することにあ
る。Another object of the present invention is to provide a computer-readable recording medium for operating a computer as such a data processing device.
【0007】[0007]
【課題を解決するための手段】上記課題を解決するため
に、本発明では、曲線を近似する幾つかの円弧と幾つか
の線分とを表す複数の要素データを生成するデータ処理
装置を、曲線上に位置する順序付けられた複数の点で構
成される点系列の中の、始点として指定された点とそれ
に後続する2個の点とからなる基準点群を通る円を表す
方程式の係数、或いは、当該基準点群を通る直線を表す
方程式の係数を算出する係数算出手段と、点系列の基準
点群よりも末尾側の点の中から、1つ前の点及び自身
が、係数算出手段によって係数が算出された方程式によ
って表される円或いは直線からの距離が規定値以下の領
域に位置している全ての点を特定する特定手段と、この
特定手段によって1個以上の点が特定された場合には、
当該1個以上の点と基準点群とからなる点群を近似する
とともに、当該点群の中の、点系列における最も先頭側
の点と最も末尾側の点とを端点として有する円弧或いは
線分を表す要素データを生成し、特定手段によって1個
の点も特定されなかった場合には、基準点群の中の、点
系列における最も先頭側の点と最も末尾側の点とを端点
として有し、残りの1点を通過する円弧或いは線分を表
す要素データを生成する生成手段と、点系列の先頭の点
を始点として指定して係数算出手段を機能させるととも
に、生成手段によって要素データが生成される度に、当
該要素データが表している円弧或いは線分の末尾側の端
点を始点として指定して係数算出手段を機能させる算出
順序制御手段とを用いて構成する。According to the present invention, there is provided a data processing apparatus for generating a plurality of element data representing several arcs and several line segments approximating a curve. A coefficient of an equation representing a circle passing through a reference point group consisting of a point designated as a starting point and two subsequent points in a point sequence composed of a plurality of ordered points located on a curve; Alternatively, a coefficient calculating means for calculating a coefficient of an equation representing a straight line passing through the reference point group, and a preceding point and a point itself among the points on the tail side of the reference point group of the point series are used as the coefficient calculating means. A specifying means for specifying all points located in an area whose distance from a circle or a straight line represented by an equation whose coefficient is calculated is equal to or less than a specified value, and one or more points are specified by the specifying means. If
An arc or line segment that approximates the point group consisting of the one or more points and the reference point group, and that has, as an end point, the foremost point and the most end point in the point sequence in the point group. Is generated, and if no point is specified by the specifying means, the point at the forefront and the point at the end of the point series in the reference point group are defined as end points. Then, the generating means for generating element data representing an arc or a line segment passing through the remaining one point, and the coefficient calculating means functioning by designating the head point of the point series as a starting point, are used. Each time it is generated, the calculation is performed by using a calculation order control unit that causes the coefficient calculation unit to function by designating the end point on the end side of the arc or line segment represented by the element data as a start point.
【0008】すなわち、本発明のデータ処理装置では、
処理すべき曲線の一部分を表す1つの円弧の形状を決定
するに際して、まず、当該曲線上に位置している点系列
に含まれる連続した3点(基準点群)を通る円(或いは
直線)の方程式の係数が求められる。そして、基準点群
よりも末尾側の点の中から、1つ前の点及び自身が、そ
の円(或いは直線)からの距離が規定値以下の領域内に
位置している全ての点が特定され、特定された点と基準
点群とを近似できるように円弧の形状が決定される。そ
の際、その円弧の形状は、その円弧が、同様の手順で決
定される前後の円弧と連続するように、特定された1個
以上の点と基準点群とからなる点群の中の、点系列にお
ける最も先頭側の点と最も末尾側の点とを端点として有
するように決定される。That is, in the data processing device of the present invention,
In determining the shape of one arc representing a part of a curve to be processed, first, a circle (or a straight line) passing through three consecutive points (reference point group) included in a series of points located on the curve is considered. The coefficients of the equation are determined. Then, from the points on the tail side of the reference point group, all the points that are located within an area whose distance from the circle (or the straight line) is equal to or less than a specified value are identified. Then, the shape of the arc is determined so that the specified point and the reference point group can be approximated. At this time, the shape of the circular arc is such that the circular arc is continuous with the previous and subsequent circular arcs determined by the same procedure, and is included in a point group including one or more specified points and a reference point group. The point sequence is determined to have the foremost point and the last point in the point sequence as end points.
【0009】このような手順で円弧の形状が決定される
ので、本データ処理装置を用いれば、曲線を少ない数の
円弧で近似したデータ(幾つかの要素データからなるデ
ータ)が生成されることになる。従って、本発明のデー
タ処理装置によれば、例えば、CADプログラムによっ
て作成した設計図面ファイル(曲線の定義情報を含むフ
ァイル)から、NC工作機械を効率よく制御できる制御
データファイル(曲線を表す複数の要素データを含むフ
ァイル)を簡単に得ることができることになる。[0009] Since the shape of the arc is determined by such a procedure, the present data processing apparatus generates data (data consisting of several element data) obtained by approximating a curve with a small number of arcs. become. Therefore, according to the data processing device of the present invention, for example, a control data file (a plurality of curves representing a curve) capable of efficiently controlling an NC machine tool is obtained from a design drawing file (a file including curve definition information) created by a CAD program. File containing element data) can be easily obtained.
【0010】なお、本発明のデータ処理装置を、一般的
な設計図面ファイルを処理できる装置として実現する際
には、曲線を表す関数情報に基づき、点系列を構成する
各点の座標を算出する座標算出手段を付加しておくこと
が必要である。When the data processing apparatus of the present invention is realized as an apparatus capable of processing a general design drawing file, coordinates of each point constituting a point sequence are calculated based on function information representing a curve. It is necessary to add a coordinate calculation means.
【0011】また、本発明のデータ処理装置を実現する
に際しては、生成手段として、点群を近似する円弧の半
径が所定値を超える場合には、当該点群の中の点系列に
おける最も先頭側の点と最も末端側の点とが端点である
線分を表す要素データを生成する手段を用いることがで
きる。このような生成手段を用いておけば、NC工作機
械等の制御に使用できない要素データが生成されないデ
ータ処理装置を得ることができる。In implementing the data processing apparatus of the present invention, when the radius of the arc approximating the point group exceeds a predetermined value, the generation means may be configured to be the first one in the point series in the point group. It is possible to use a means for generating element data representing a line segment whose end point is the end point of the point. By using such a generating means, it is possible to obtain a data processing device in which element data that cannot be used for controlling an NC machine tool or the like is not generated.
【0012】また、本発明のデータ処理装置を実現する
に際しては、生成手段として、特定手段によって1個以
上の点が特定された場合には、当該1個以上の点と基準
点群とからなる点群の中の点系列における最も先頭側の
点と最も末尾側の点とを通る円の方程式の係数を、当該
点群の中の各点に関する、その点と当該円の中心との間
の距離の二乗値からその円の半径の二乗値を減じた値の
二乗値の総和が最小となるように求め、方程式の係数を
求めた円に含まれる円弧を表す要素データを生成する手
段を採用することが望ましい。In implementing the data processing apparatus of the present invention, when one or more points are specified by the specifying means as the generating means, the data processing apparatus includes the one or more points and a reference point group. The coefficient of the equation of the circle passing through the point at the forefront and the point at the end of the point series in the point group is calculated for each point in the point group between the point and the center of the circle. A method is used in which the sum of square values obtained by subtracting the square value of the radius of the circle from the square value of the distance is minimized and element data representing an arc included in the circle for which the coefficient of the equation is obtained is adopted. It is desirable to do.
【0013】すなわち、生成手段の具体的な構成(係数
の算出手順)としては、さまざまなものが考えられる
が、上記構成以外の構成の生成手段を採用したのでは、
係数の算出に時間がかかってしまうことになる。従っ
て、本発明のデータ処理装置を実現するに際しては、上
記構成の生成手段を採用しておくことが望ましい。In other words, there are various possible configurations of the generating means (coefficient calculation procedure), but if a generating means having a configuration other than the above configuration is adopted,
It takes time to calculate the coefficient. Therefore, when implementing the data processing device of the present invention, it is desirable to employ the generating means having the above configuration.
【0014】そして、本発明のコンピュータ読取可能な
記録媒体は、コンピュータを、本発明のデータ処理装置
として動作させるためのプログラムを記録してなる。従
って、本発明のコンピュータ読取可能な記録媒体を用い
れば、一般的なコンピュータを用いて、例えば、CAD
プログラムによって作成した設計図面ファイルから、N
C工作機械を効率よく制御できる制御データファイルを
簡単に得ることができることになる。The computer-readable recording medium of the present invention stores a program for causing a computer to operate as the data processing device of the present invention. Therefore, if the computer-readable recording medium of the present invention is used, for example, CAD
From the design drawing file created by the program, N
A control data file that can efficiently control the C machine tool can be easily obtained.
【0015】[0015]
【発明の実施の形態】以下、図面を参照して、本発明の
実施の形態を説明する。Embodiments of the present invention will be described below with reference to the drawings.
【0016】本発明の一実施形態に係るデータ処理装置
10は、CAD(Computer Aided Design)プログラムに
よって作成された設計図面ファイルを、NC工作機械を
制御するための制御データからなる制御データファイル
に変換する装置である。A data processing apparatus 10 according to one embodiment of the present invention converts a design drawing file created by a CAD (Computer Aided Design) program into a control data file including control data for controlling an NC machine tool. It is a device to do.
【0017】図1に模式的に示したように、実施形態に
係るデータ処理装置10は、ディスプレイ21、入力装
置22及びコンピュータ本体23からなるコンピュータ
20内のHDD34に、コンピュータ読取可能な記録媒
体であるCD−ROM60に記録された変換プログラム
41及び変換条件情報ファイル42を、CD−ROMド
ライブ36を介してインストールすることによって実現
されている。As schematically shown in FIG. 1, the data processing apparatus 10 according to the embodiment stores a computer-readable recording medium in an HDD 34 in a computer 20 including a display 21, an input device 22, and a computer main body 23. This is realized by installing a conversion program 41 and a conversion condition information file 42 recorded on a certain CD-ROM 60 via a CD-ROM drive 36.
【0018】変換プログラム41は、コンピュータ20
を、データ処理装置10として動作させるためのプログ
ラムである。なお、変換プログラム41は、所定のOS
上で実行するためのプログラムとして作成してあり、H
DD34内には、当該OSもインストールされている。
変換条件情報ファイル42は、変換プログラム41によ
って参照される情報である分割数nD、許容差δ及び最
大半径RLMTを保持したファイルである。各情報の用途
については後述するが、変換条件情報ファイル42に
は、分割数nDとして、設計図面ファイル内に図形要素
データとして含まれているスプライン関数の次数に応じ
た値(当該次数の2〜3倍程度の値)が記憶(設定)され
ている。また、最大半径RLMTとしては、使用するNC
工作機械に実行させることが出来る円弧状動作の最大半
径が記憶されており、許容差δとしては、許容される設
計値からの誤差を指定する値が記憶されている。The conversion program 41 is stored in the computer 20
Is a program for operating as a data processing device 10. It should be noted that the conversion program 41 is a predetermined OS
Created as a program to be executed on
The OS is also installed in the DD 34.
The conversion condition information file 42 is a file holding the number of divisions n D , the tolerance δ, and the maximum radius R LMT which are information referred to by the conversion program 41. Although the use of each information will be described later, the conversion condition information file 42 has a value corresponding to the degree of the spline function included as the graphic element data in the design drawing file (2 of the degree) as the division number n D.値 3 times) is stored (set). The maximum radius R LMT is the NC used.
The maximum radius of the arc-shaped operation that can be executed by the machine tool is stored, and a value designating an error from an allowable design value is stored as the tolerance δ.
【0019】変換プログラム41が実行されたコンピュ
ータ20(すなわち、データ処理装置10)では、CPU
31の制御下、図2に示した手順のファイル変換処理が
実行される。なお、変換プログラム41は、OSに従っ
て動作しているCPU31が、オペレータから変換プロ
グラム41の実行指示が与えられたことを入力装置22
を介して認識した際に、CPU31によって実行され
る。In the computer 20 (ie, the data processing device 10) on which the conversion program 41 has been executed, the CPU
Under the control of 31, the file conversion process of the procedure shown in FIG. 2 is executed. It should be noted that the conversion program 41 is configured so that the CPU 31 operating according to the OS notifies the input device 22 that an instruction to execute the conversion program 41 has been given from the operator.
It is executed by the CPU 31 when it is recognized via.
【0020】図示したように、ファイル変換処理時に
は、まず、変換条件ファイル41に記憶されている分割
数初期値nD、許容差δ及び最大半径RLMTがRAM32
上に読み出され(ステップS101)、ファイル指定情報
取得処理(ステップS102)が実行される。このファイ
ル指定情報取得処理時には、入力装置22を介して、オ
ペレータから、処理を行う設計図面ファイルを指定する
設計図面ファイル指定情報(ドライブ名、フォルダ名及
びファイル名)と、変換結果を記憶する制御データファ
イルを指定する制御データファイル指定情報とが取得さ
れる。また、ファイル指定情報取得処理は、オペレータ
が、RAM32上(或いは、RAM32上及び変換条件
情報ファイル42内)の分割数初期値nD、許容差δ及び
最大半径RLM Tを変更することが出来る処理となってい
る。従って、オペレータは、通常とは異なる条件でデー
タ処理装置10にファイルの変換を行わせる場合には、
このステップS102において、分割数初期値nD等を
変更するための操作も入力装置22に対して行う。As shown in the figure, at the time of file conversion processing, first, the division number initial value n D , tolerance δ and maximum radius R LMT stored in the conversion condition file 41 are stored in the RAM 32.
The file is read out (step S101), and a file designation information acquisition process (step S102) is executed. At the time of this file designation information acquisition processing, a control for storing design drawing file designation information (drive name, folder name and file name) for designating a design drawing file to be processed, and a conversion result from the operator via the input device 22. Control data file specification information for specifying a data file is acquired. The file specification information acquisition process, the operator, RAM 32 above (or, RAM 32 and on the conversion condition information file 42) can change the division number initial value n D, tolerance δ and maximum radius R LM T of Processing. Therefore, when the operator wants the data processing device 10 to convert the file under a condition different from the normal condition,
In this step S102, an operation for changing the division number initial value n D and the like is also performed on the input device 22.
【0021】ファイル指定情報取得処理の完了後には、
設計図面ファイル指定情報で指定されている設計図面フ
ァイルが読み込みのためにオープンされ、制御データフ
ァイル指定情報で指定されている制御データファイルが
書き込みのためにオープンされる(ステップS103)。After the completion of the file designation information acquisition process,
The design drawing file specified by the design drawing file specification information is opened for reading, and the control data file specified by the control data file specification information is opened for writing (step S103).
【0022】すなわち、設計図面ファイル指定情報内の
ドライブ名が、FDD(Flexible Disk Drive)35を示
すものであった場合には、FDD35にセットされたフ
レキシブルディスク50に記憶された、設計図面ファイ
ル指定情報内のフォルダ名及びファイル名で識別される
ファイルがオープンされる。また、設計図面ファイル指
定情報内のドライブ名が、HDD34を示すものであっ
た場合には、HDD34に記憶されている、設計図面フ
ァイル指定情報内のフォルダ名及びファイル名で識別さ
れるファイルが、オープンされる。さらに、設計図面フ
ァイル指定情報内のドライブ名が、ネットワークドライ
ブを示すものであった場合には、通信制御回路37が利
用されて、LANケーブル70によって接続されている
他コンピュータの、当該ドライブ名で識別されるドライ
ブに記憶された、設計図面ファイル指定情報内のフォル
ダ名及びファイル名で識別されるファイルが、オープン
される。制御データファイルについても同様に、制御デ
ータファイル指定情報で指定されている場所に、指定さ
れているファイル名で記憶されているファイルが、オー
プンされる。ただし、制御データファイルに関しては、
新規なファイルが作成される形でオープンされる。That is, when the drive name in the design drawing file designation information indicates the FDD (Flexible Disk Drive) 35, the design drawing file designation stored in the flexible disk 50 set in the FDD 35 is designated. The file identified by the folder name and file name in the information is opened. When the drive name in the design drawing file designation information indicates the HDD 34, the file identified by the folder name and the file name in the design drawing file designation information stored in the HDD 34 is Be opened. Further, when the drive name in the design drawing file designation information indicates a network drive, the communication control circuit 37 is used and the drive name of another computer connected by the LAN cable 70 is used. The file identified by the folder name and the file name in the design drawing file specification information stored in the identified drive is opened. Similarly, for the control data file, the file stored with the specified file name is opened at the location specified by the control data file specification information. However, regarding the control data file,
A new file is created and opened.
【0023】設計図面データファイル、制御データファ
イルのオープン後には、設計図面ファイル内の最初の図
形要素データが読み出され(ステップS104)、その図
形要素データがスプライン曲線(スプライン関数で定義
された曲線)を表すものであるか否かが判断される(ステ
ップS105)。読み出された図形要素データがスプラ
イン曲線を表すものでなかった場合(ステップS10
5;NO)、その図形要素データに応じた制御データ、
すなわち、円弧或いは線分を表す制御データが作成され
て制御データファイルに追加される(ステップS10
6)。一方、読み出された図形要素データがスプライン
曲線を表すものであった場合(ステップS105;YE
S)、そのスプライン曲線の各セグメントに対してデー
タ変換処理が繰り返される(ステップS107、S10
8;NO)。After opening the design drawing data file and the control data file, the first graphic element data in the design drawing file is read out (step S104), and the graphic element data is converted into a spline curve (a curve defined by a spline function). ) Is determined (step S105). If the read graphic element data does not represent a spline curve (step S10
5; NO), control data corresponding to the graphic element data,
That is, control data representing an arc or a line segment is created and added to the control data file (step S10).
6). On the other hand, if the read graphic element data represents a spline curve (step S105; YE
S), the data conversion process is repeated for each segment of the spline curve (steps S107, S10)
8; NO).
【0024】図3に、ステップS107におけるデータ
変換処理の流れ図を示す。図示したように、データ変換
処理時には、まず、変数Nに、“nd+1”が設定され
る(ステップS200)。次いで、スプライン曲線の1
セグメント分の曲線(処理対象曲線)上の、点系列P1〜
PNの座標(X1、Y1)〜(XN、YN)が算出される(ステッ
プS201)。FIG. 3 shows a flowchart of the data conversion process in step S107. As shown in the figure, at the time of data conversion processing, first, “ nd + 1” is set to a variable N (step S200). Then, one of the spline curves
Point series P 1 to P on the curve for the segment (curve to be processed)
P N of the coordinates (X 1, Y 1) ~ (X N, Y N) is calculated (step S201).
【0025】具体的には、このステップS201では、
まず、処理対象曲線(スプライン曲線の1セグメント分
の曲線)の“X=f(t)、Y=g(t)、t1≦t≦t2”
形式の関数が決定される。なお、f(t)、g(t)は、共
に、図形要素データが示しているスプライン関数と同じ
或いはそれ以下の次数の、tの多項式関数である。
t 1、t2は、(f(t1)、g(t1))、(f(t2)、g(t
2))が処理対象セグメントの端点(節点)の座標となる
値であるSpecifically, in step S201,
First, the curve to be processed (one segment of the spline curve)
X = f (t), Y = g (t), t1≦ t ≦ tTwo"
The function of the form is determined. Note that f (t) and g (t) are
Is the same as the spline function indicated by the graphic element data
Alternatively, it is a polynomial function of t of lower order.
t 1, TTwoIs (f (t1), G (t1)), (F (tTwo), G (t
Two)) Is the coordinates of the end point (node) of the segment to be processed
Is a value
【0026】f(t)、g(t)の係数の決定後には、処理
対象曲線を、パラメータ空間tにおいて(N−1)等分
した節点の座標(Xi,Yi)が求められる。すなわち、こ
のステップS201では、例えば、Nが“5”であった
場合、図4に模式的に示したように、処理対象曲線の端
点を、点P1、点P5として含むとともに、これらの端点
間を結ぶ曲線上に位置する3点P2〜P4を含む、N(=
5)個の点系列P1〜PNの座標(X1、Y1)〜(XN、YN)
が、算出される。After determining the coefficients of f (t) and g (t), the coordinates (X i , Y i ) of the node obtained by equally dividing the curve to be processed in the parameter space t by (N−1) are obtained. That is, in the step S201, for example, when N is "5", as schematically shown in FIG. 4, the end points of the processing target curve, the points P 1, with including a point P 5, these N (= 3 points) including three points P 2 to P 4 located on a curve connecting end points
5) Coordinates (X 1 , Y 1 ) to (X N , Y N ) of the point series P 1 to P N
Is calculated.
【0027】座標(X1、Y1)〜(XN、YN)の算出後に
は、点系列P1〜PN内の1点を指定す情報(番号)を記
憶するための変数iに“1”が設定され(ステップS2
02)、他の1点を指定する情報を記憶するための変数
jに“i+2”が設定される(ステップS203)。その
後、j(=i+2)値がN値以下である場合(ステップ
S204;YES)、すなわち、3点Pi、Pi+1及びP
i+2が存在する場合には、それらの3点を通る円である
基準円の中心座標(x0、y0)と半径r0とが、一連の演
算式によって算出される(ステップS205)。換言すれ
ば、このステップS205では、(X,Y)=(Xi,Yi)、
(X,Y)=(Xi+1,Yi+1)及び(X,Y)=(Xi+2,Yi+2)の
それぞれについて式“(X−x0)2+(Y−y0)2−r0 2=
0”が成立するx0、y0及びr0が算出される。なお、
3点Pi、Pi+1及びPi+2が一直線上に位置していた場
合(この場合、基準円が求められない)、ステップS20
5では、当該直線(以下、基準線と表記する)を表す方程
式“AX+BY+C=0”の係数A,B及びCが、算出
される。After the calculation of the coordinates (X 1 , Y 1 ) to (X N , Y N ), the variable i for storing information (number) designating one point in the point series P 1 to P N. “1” is set (step S2
02), “i + 2” is set as a variable j for storing information designating another point (step S203). Thereafter, when the j (= i + 2) value is equal to or smaller than the N value (step S204; YES), that is, at three points P i , P i + 1 and P
If i + 2 exists, the center coordinates (x 0 , y 0 ) and radius r 0 of the reference circle, which is a circle passing through these three points, are calculated by a series of arithmetic expressions (step S205). . In other words, in this step S205, (X, Y) = (X i, Y i),
For each of (X, Y) = (X i + 1 , Y i + 1 ) and (X, Y) = (X i + 2 , Y i + 2 ), the formula “(X−x 0 ) 2 + (Y -y 0) 2 -r 0 2 =
X 0 , y 0, and r 0 that satisfy 0 ” are calculated.
If the three points P i , P i + 1 and P i + 2 are located on a straight line (in this case, the reference circle is not obtained), step S20
In 5, the coefficients A, B, and C of the equation “AX + BY + C = 0” representing the straight line (hereinafter, referred to as a reference line) are calculated.
【0028】ステップS205の完了後には、変数jに
“1”が加算される(ステップS206)。すなわち、基
準円の決定に用いられた3点の次の1点を示す値が変数
jに設定される。そして、j値がN値以下であるか否か
が判断され(ステップS207)、j値がN値以下であっ
た場合(ステップS207;YES)には、点Pjと基準
円或いは基準線との間の距離が算出され、変数dに記憶
される(ステップS208)。より具体的には、基準円が
求められていた場合、(1)式により、点Pjの当該基準
円からの距離d(点Pjと基準円の中心(x0,y0)との間
の距離から基準円の半径r0を減じた値の絶対値)が求め
られる。また、基準線が求められていた場合には、(2)
式により、点Pjの当該基準線からの距離dが求められ
る。After the completion of step S205, "1" is added to the variable j (step S206). That is, a value indicating the next one of the three points used for determining the reference circle is set as the variable j. Then, it is determined whether or not the j value is equal to or less than the N value (step S207). If the j value is equal to or less than the N value (step S207; YES), the point Pj and the reference circle or the reference line are determined. Is calculated and stored as a variable d (step S208). More specifically, when the reference circle has been demanded, (1) by equation of the distance d (the point P j and a reference circle from the reference circle of the point P j center (x 0, y 0) and the The absolute value of the value obtained by subtracting the radius r 0 of the reference circle from the distance between them is obtained. If the reference line has been determined, (2)
The distance d of the point Pj from the reference line is obtained by the equation.
【0029】[0029]
【数1】 (Equation 1)
【0030】その後、算出されたd値と設定されている
δ値とが比較され(ステップS209)、d値がδ値以下
であった場合(ステップS209;YES)には、ステッ
プS206からの処理が再び実行される。Thereafter, the calculated d value is compared with the set δ value (step S209). If the d value is not more than the δ value (step S209; YES), the processing from step S206 is performed. Is executed again.
【0031】ステップS208において算出されたd値
がδ値を超えていた場合(ステップS209;NO)、点
Pi〜Pj-1の座標情報に基づき、点Pi及び点Pj-1を通
り、点Pi+1から点Pj-2までの各点を近似する円(以
下、近似円と表記する)の中心座標(Xc,Yc)と半径Rと
が算出される(ステップS210)。If the d value calculated in step S208 exceeds the δ value (step S209; NO), the points P i and P j-1 are determined based on the coordinate information of the points P i to P j-1 . As described above, the center coordinates (Xc, Yc) and the radius R of a circle (hereinafter, referred to as an approximate circle) approximating each point from the point P i + 1 to the point P j-2 are calculated (step S210). .
【0032】本実施形態に係るデータ処理装置10で
は、このステップS210において、以下に記する(3)
式で定義される関数h(X,Y)の係数Xc、Yc及びR
が、(4)式及び(5)式が成立し、かつ、“i+1”から
“j−2”までの各整数値kに対するh(Xk、Yk)2の
総和(以下、Σh(Xk,Yk)2と表記する)が最小となると
いう条件で、求められている。In the data processing device 10 according to the present embodiment, in step S210, the following (3)
The coefficients Xc, Yc and R of the function h (X, Y) defined by the equation
Is the sum of h (X k , Y k ) 2 with respect to each integer k from “i + 1” to “j−2” (hereinafter, Σh (X k , Y k ) 2 ) is minimized.
【0033】[0033]
【数2】 (Equation 2)
【0034】ここで、上記条件を満たすXc、Yc及びR
の算出手順(原理)を簡単に説明しておく。上記した
(4)、(5)式から、h(X,Y)に対しては、h(Xi,Yi)
−h(Xj -1,Yj-1)=0が成立する。従って、Rを含ま
ない(6)式を得ることができる。また、(4)式を用いて
(3)式を変形すると、Rを含まない(7)式を得ることが
できる。Here, Xc, Yc and R satisfying the above conditions are satisfied.
The calculation procedure (principle) of will be briefly described. Above
From equations (4) and (5), for h (X, Y), h (X i , Y i )
-H (X j -1, Y j -1) is = 0 holds. Therefore, the equation (6) not including R can be obtained. Also, using equation (4)
By transforming equation (3), equation (7) not including R can be obtained.
【0035】[0035]
【数3】 (Equation 3)
【0036】そして、(6)式を用いて、(7)式からYc
を消去することにより、X,Y,Xi,Yi,Xj-1,Yj-1,及
びXcで表されたh(X,Y)を得ることができる。(6)、
(7)式は、いずれも、Xc及びYcに関する一次式である
ので、そのようにして得られたh(X,Y)は、Xcに関
する1次式となる。一方、Σh(Xk,Yk)2を最小とする
Xc値は、周知のように、関数∂Σh(Xk,Yk)2/∂Xc
の値が“0”となるXc値を求めることにより得ること
ができる。この∂Σh(Xk,Yk)2/∂Xcは、h(X,Y)
2がXcの二次式となるので、(Xi,Yi)〜(Xj-1,Yj-1)
から一義的に算出できる係数を有するXcの一次式とな
る。Then, using equation (6), Yc
By erasing, X, Y, X i, Y i, X j-1, Y j-1, and represented by Xc h (X, Y) can be obtained. (6),
Since both equations (7) are linear equations relating to Xc and Yc, h (X, Y) obtained in this way is a linear equation relating to Xc. On the other hand, the Xc value that minimizes Σh (X k , Y k ) 2 is, as is well known, a function ∂Σh (X k , Y k ) 2 / ∂Xc
Can be obtained by finding the Xc value at which the value of "." This ∂Σh (X k , Y k ) 2 / ∂Xc is given by h (X, Y)
Because 2 is quadratic in Xc, (X i, Y i ) ~ (X j-1, Y j-1)
Is a linear expression of Xc having a coefficient that can be uniquely calculated from
【0037】ステップS210では、このXcの一次式
の係数を求める演算を中心とした処理により、Xc、Yc
及びRが算出されている。詳細の説明は省略するが、こ
のようにして算出されたXc、Yc及びRで特定される近
似円と、点Pi+1〜Pj-2内の任意の点Pkとの間の距離
は、点Pi〜Pj-1がどのような位置関係にあっても、δ
以下となる。In step S210, Xc, Yc
And R have been calculated. Although the detailed description is omitted, the distance between the approximate circle specified by Xc, Yc and R calculated in this way and any point Pk in the points Pi + 1 to Pj -2 Is δ regardless of the positional relationship between the points P i to P j-1.
It is as follows.
【0038】なお、ステップS210が、j=i+3が
成立している状態で実行された場合(ステップS205
の実行直後に実行されたステップS209において“N
O”側への分岐が行なわれた場合)、∂Σh(Xk,Yk)2
/∂Xcの係数から求められるXc、Yc及びRは、それ
ぞれ、x0、y0及びr0と一致することになる。このた
め、ステップS210は、j=i+3が成立している状
態で実行された場合、その時点におけるx0値、y0値及
びr0値が、それぞれ、Xc、Yc及びRに設定されるス
テップとなっている。また、ステップS210は、点P
i〜Pj-1が一直線上に存在していた場合(近似円の中心
座標等が算出できない場合)、ステップS205におい
て算出されている直線を表す方程式の係数が、そのまま
算出結果とされるステップともなっている。When step S210 is executed in a state where j = i + 3 holds (step S205).
In step S209 executed immediately after the execution of
O ”side), Δh (X k , Y k ) 2
Xc, Yc and R obtained from the coefficient of / ∂Xc are respectively equal to x 0 , y 0 and r 0 . Therefore, step step S210, if the j = i + 3 is performed in a state in which satisfied, where x 0 value at that time, y 0 value and r 0 value, respectively, Xc, is set to Yc and R It has become. Step S210 determines whether the point P
When i to P j-1 are on a straight line (when the center coordinates of the approximate circle cannot be calculated), the coefficient of the equation representing the straight line calculated in step S205 is directly used as the calculation result. It is with.
【0039】ステップS210の算出結果は、続くステ
ップS211において、制御データを作成するために用
いられる。具体的には、ステップS210で近似円の中
心座標と半径が求められていた場合、ステップS211
では、点Piが一方の端点であり、点Pj-1が他方の端点
である、当該近似円の円弧を表す制御データが作成され
て制御データファイルに追加される。ただし、算出され
ている半径Rが最大半径RLMTよりも大きかった場合、
ステップS211では、円弧を表す制御データではな
く、点Piが始点であり、点Pj-1が終点である線分を表
す制御データが制御データファイルに追加される。ま
た、ステップS210の算出結果が直線方程式の係数で
あった場合にも、このステップS211では、点Piが
始点であり、点Pj-1が終点である線分を表す制御デー
タが制御データファイルに追加される。The calculation result of step S210 is used for creating control data in the following step S211. Specifically, when the center coordinates and the radius of the approximate circle have been determined in step S210, the process proceeds to step S211.
Then, control data representing the arc of the approximate circle, in which the point P i is one end point and the point P j-1 is the other end point, is created and added to the control data file. However, if the calculated radius R is larger than the maximum radius R LMT ,
In step S211, not the control data representing the arc but the control data representing the line segment where the point P i is the start point and the point P j-1 is the end point are added to the control data file. Further, even when the calculated result of step S210 is a coefficient of linear equations, in the step S211, a point P i is the starting point, the point P j-1 is the control data representing the line segment which is the end point control data Appended to the file.
【0040】制御データの追加後には、変数iに“j−
1”(今回、制御データが作成された、点Pi〜Pj-1の
最後尾の点の番号)が設定され(ステップS212)、ス
テップS203からの処理が再び実行される。After adding the control data, “j−
1 "(the number of the last point of the points P i to P j-1 for which the control data has been created this time) is set (step S212), and the processing from step S203 is executed again.
【0041】このような手順の処理が繰り返された結果
として、あるi値に対するステップS206〜S209
の実行中に、j値がN値を超えた場合(ステップS20
7;NO)、ステップS210、S211と同じ内容の
処理(ステップS220、S221)が実行されて、デー
タ変換処理が終了される。すなわち、ステップS205
において基準円を決定するために用いられた点Pi+2が
最後の点であったとき(ステップS203の完了時にお
いてj=i+2=Nが成立していたとき)、或いは、ス
テップS208において距離dが算出された点Pjが最
後の点であったときには、点Pi〜Pj-1(=PN)に関す
る制御データが作成され、制御データファイルに追加さ
れる。そして、処理対象曲線(1セグメント分のスプラ
イン曲線)に関する全ての点に関する処理が完了してい
ることになるので、データ変換処理が終了される。Steps S206 to S209 for a certain i value are obtained as a result of repeating the processing of such a procedure.
When the j value exceeds the N value during the execution of (Step S20)
7; NO), processes having the same contents as those in steps S210 and S211 (steps S220 and S221) are executed, and the data conversion process ends. That is, step S205
When the point P i + 2 used to determine the reference circle in is the last point (when j = i + 2 = N holds when the step S203 is completed), or when the distance is determined in the step S208. When the point P j at which d is calculated is the last point, control data relating to points P i to P j-1 (= P N ) is created and added to the control data file. Then, since the processing for all points related to the processing target curve (spline curve for one segment) has been completed, the data conversion processing ends.
【0042】また、ステップS203において再設定が
行なわれた変数jの値がN値を超えた場合(ステップS
204;NO)、N値が“1”インクリメントされて
(ステップS230)、ステップS201からの処理が
再び実行される。When the value of the variable j reset at step S203 exceeds the N value (step S203).
204; NO), the N value is incremented by "1" (step S230), and the processing from step S201 is executed again.
【0043】すなわち、ステップS212及び続くステ
ップS203の処理は、変数iに、制御データの作成が
行なわれた3個以上の点の末尾側の点の番号を設定した
後、それまでN値以下であった(ステップS207で
“YES”側への分岐が行なわれている)変数jの値を
“1”インクリメントする処理となっている。従って、
ステップS204において、“NO”側への分岐が行な
われるのは、ステップS212の実行時にj=Nが成立
していたとき、つまり、制御データが作成されていない
点が1個しか残っていないときである。この場合、点P
N-1が始点であり、点PNが終点である線分を表す制御デ
ータを作成して制御データファイルに追加することも出
来るが、本装置では、分割数を増やして再計算させてい
るのである。That is, the processing of step S212 and the subsequent step S203 is performed by setting the number of the last point of three or more points for which control data has been created in the variable i, and then setting the variable to the N value or less. This is processing for incrementing the value of the variable j that has occurred (the branch to the “YES” side has been made in step S207) by “1”. Therefore,
In step S204, the branch to the “NO” side is performed when j = N is satisfied at the time of execution of step S212, that is, when only one point where no control data is created remains. It is. In this case, the point P
It is also possible to create control data representing a line segment where N-1 is the start point and the point PN is the end point and add it to the control data file. However, in this apparatus, the number of divisions is increased and recalculation is performed. It is.
【0044】ここで、図5ないし図8を用いて、このデ
ータ変換処理における処理手順を、さらに具体的に説明
しておく。なお、これらの図に示してある曲線は、スプ
ライン関数の1セグメント分の曲線の先頭側の部分を示
したもの(nd>10)である。Here, the processing procedure in the data conversion processing will be described more specifically with reference to FIGS. It should be noted that the curves shown in these figures show the leading part of the curve for one segment of the spline function (n d > 10).
【0045】まず、ステップS200〜S205の処理
により、図5に示してあるように、点P1〜P3を通る円
の中心座標(x0,y0)及び半径r0が求められる。すなわ
ち、データ処理装置10が備える座標算出手段(ステッ
プS201)、算出順序制御手段(ステップS202)
及び係数算出手段(ステップS203〜S205)が機
能する。First, as shown in FIG. 5, the center coordinates (x 0 , y 0 ) and the radius r 0 of the circle passing through the points P 1 to P 3 are obtained by the processing of steps S200 to S205. That is, the coordinate calculation means (step S201) and the calculation order control means (step S202) included in the data processing device 10
And coefficient calculating means (steps S203 to S205) function.
【0046】その後、ステップS206〜S209の処
理により、点P4の基準円からの距離dが求められて、
d≦δが成立するか否かが判断される。図示してあるケ
ースでは、点P4に対してδ値よりも小さいd値が求め
られるので、ステップS209において“YES”側へ
の分岐が行なわれる。その結果、点P5の基準円からの
距離dと許容差δとが比較される。そして、点P5が、
基準円からδ以上離れている点であるため、ステップS
209で“NO”側への分岐が行なわれる。換言すれ
ば、データ処理装置10が備える特定手段が機能し、点
P4が特定される。Thereafter, the processing of step S206 to S209, it is determined the distance d from the reference circle of the point P 4,
It is determined whether d ≦ δ is satisfied. In it is illustrated case, since the smaller d value than δ value for the point P 4 is determined, branching to "YES" side in Step S209 is performed. As a result, the distance d from the reference circle of the point P 5 and the tolerance δ are compared. And the point P 5 becomes
Since the point is at least δ away from the reference circle, step S
At 209, a branch is made to the "NO" side. In other words, certain means serve the data processing apparatus 10 is provided, the point P 4 is identified.
【0047】その結果、ステップS210が実行され
て、図6に示してあるように、点P1と点P4とを通る近
似円の中心座標(Xc,Yc)及び半径Rが求められる。そ
して、当該近似円上の、点P1と点P4とを端点とした円
弧を示す制御データが作成されて、制御データファイル
に記憶される。すなわち、データ処理装置10が備える
生成手段が機能する。[0047] Consequently, step S210 is executed, as is shown in FIG. 6, the point P 1 and the center coordinates of the approximate circle passing through the point P 4 (Xc, Yc) and the radius R is determined. Then, on the approximation circle, the control data indicating the arc that the point P 1 and point P 4 and the end point is created and stored in the control data file. That is, the generation unit included in the data processing device 10 functions.
【0048】その後、ステップS212において、変数
iに“4”(=j−1;この時点におけるj=5)が設定
される。すなわち、データ処理装置10が備える算出順
序制御手段としての機能が実行される。その結果、ステ
ップS202〜S205の処理により、図7に示したよ
うに、点P4〜P6を通る基準円の方程式が求められる。
そして、ステップS206〜S209の処理により、そ
の基準円からの距離がδ以下である1個以上の連続した
点が、点P4〜P6に後続する点の中から探索される。こ
の場合、点P7及び点P8が、基準円からの距離がδ以下
の点であり、点P9が、基準円からの距離がδを超える
点であるため、j=9の状態でステップS210が実行
される。その結果、図8に示したように、点P4と点P8
とを通る近似円が決定され、当該近似円上の、点P4と
点P8とを端点とした円弧を示す制御データが作成され
て、制御データファイルに記憶される。Thereafter, in step S212, "4" (= j-1; j = 5 at this time) is set as a variable i. That is, the function as the calculation order control means provided in the data processing device 10 is executed. As a result, the processing of step S202 to S205, as shown in FIG. 7, the equation of the reference circle passing through the point P 4 to P 6 are obtained.
Then, the processing of step S206 to S209, that its distance from the reference circle are continuous in one or more or less δ is searched from the points following the point P 4 to P 6. In this case, the points P 7 and P 8 are points whose distance from the reference circle is δ or less, and the point P 9 is a point whose distance from the reference circle exceeds δ. Step S210 is performed. As a result, as shown in FIG. 8, the points P 4 and P 8
It determines the approximate circle passing bets, on the approximation circle, the control data indicating the arc that the point P 4 and the point P 8 and the end point is created and stored in the control data file.
【0049】本データ変換処理時には、このような処理
が繰り返されて、処理対象曲線(1セグメント分のスプ
ライン曲線)を近似する幾つかの円弧(或いは幾つかの
円弧と幾つかの線分)が決定され、それらに応じた制御
データ群が制御データファイル内に設定される。At the time of this data conversion processing, such processing is repeated, and some arcs (or some arcs and some line segments) approximating the curve to be processed (one segment spline curve) are formed. It is determined and a control data group corresponding to them is set in the control data file.
【0050】図2に戻って、ファイル変換処理の説明を
続ける。スプライン曲線の全セグメントに関する処理が
終了した場合(ステップS108;YES)、或いは、ス
テップS106の終了後には、設計図面ファイル内の全
データの処理が完了したか否かが判断される(ステップ
S109)。全データの処理が完了していなかった場合
(ステップS109;NO)には、設計図形ファイル内の
次の図形要素データが読み出され(ステップS110)、
その図形要素データについてステップS105からの処
理が再び実行される。Returning to FIG. 2, the description of the file conversion process will be continued. When the processing for all the segments of the spline curve is completed (Step S108; YES), or after the end of Step S106, it is determined whether or not the processing of all the data in the design drawing file is completed (Step S109). . When processing of all data has not been completed
In (Step S109; NO), the next graphic element data in the design graphic file is read (Step S110),
The processing from step S105 is executed again on the graphic element data.
【0051】そして、全ての図形要素データに対してス
テップS106の処理、或いは、ステップS107及び
ステップS108からなる処理が完了したとき(ステッ
プS109;YES)、設計図面ファイル及び制御デー
タファイルがクローズされて(ステップS111)、フ
ァイル変換処理が終了される。When the processing of step S106 or the processing of steps S107 and S108 is completed for all the graphic element data (step S109; YES), the design drawing file and the control data file are closed. (Step S111), the file conversion process ends.
【0052】以上、詳細に説明したように、本実施形態
に係るデータ処理装置10によれば、スプライン曲線が
用いられている図形に関する設計図面ファイルに基づ
き、その図形が円弧及び線分の組み合わせで表された制
御データファイルを生成することができる。また、本デ
ータ処理装置10では、スプライン曲線を近似する円弧
の組み合わせ(或いは円弧と線分の組み合わせ)が、設
計値との誤差が許容差δ以下となるという条件下で、円
弧の総数ができるだけ少なくなるように(1個の円弧で
曲線のより広い部分が近似されるように)、決定されて
いる。従って、データ処理装置10によれば、CADプ
ログラムによって作成した設計図面ファイルから、NC
工作機械を効率よく制御できる制御データファイルを簡
単に得ることができることになる。As described in detail above, according to the data processing apparatus 10 of the present embodiment, based on a design drawing file relating to a graphic using a spline curve, the graphic is formed by a combination of arcs and line segments. A represented control data file can be generated. Further, in the present data processing device 10, the total number of arcs can be as small as possible under the condition that the combination of arcs (or the combination of arcs and line segments) approximating the spline curve has an error from the design value equal to or smaller than the tolerance δ. It is determined to be less (so that one arc approximates the wider part of the curve). Therefore, according to the data processing device 10, the NC drawing is performed from the design drawing file created by the CAD program.
It is possible to easily obtain a control data file that can efficiently control the machine tool.
【0053】<変形形態>上記したデータ処理装置10
は、各種の変形を行うことができる。例えば、データ処
理装置10は、スプライン関数で表された曲線を処理対
象とする装置であったが、他のタイプの関数(三角関数
や単純な多項式)で表された曲線やベジェ曲線を処理で
きるようにデータ処理装置10を変形しても良い。ま
た、関数ではなく、複数の点の座標で表された曲線(繋
がった複数の線分で表された曲線)を処理できるように
データ処理装置10を変形しても良い。<Modification> The data processing apparatus 10 described above
Can be variously modified. For example, the data processing device 10 is a device that processes a curve represented by a spline function, but can process a curve or a Bezier curve represented by another type of function (a trigonometric function or a simple polynomial). The data processing device 10 may be modified as described above. Further, the data processing apparatus 10 may be modified so as to process a curve represented by a plurality of point coordinates (a curve represented by a plurality of connected line segments) instead of a function.
【0054】また、ステップS204で“NO”側への
分岐が行なわれた場合に、点Pi、点PNを通る近似円が
求められ、その結果に基づき作成された、点Pi、点PN
をそれぞれ端点とする円弧を表す制御データが、直前に
実行されたステップS211にて制御データファイルに
追加された制御データ(点Pi、点PN-1を2端点とした
円弧を表す制御データ)の代わりに制御データファイル
に記憶されて、データ変換処理が終了するように、デー
タ処理装置10を構成しておいても良い。また、当該分
岐時に、点PN-1、点PN間の曲線上の何個かの点の座標
が求められて、それらの点に対して、基準円の算出等に
より、点PN-1、点PN間の曲線を近似する円弧等を表す
制御データが作成されてデータ変換処理が終了するよう
にしておいても良い。If the branch to the “NO” side is made in step S204, an approximate circle passing through the points P i and PN is obtained, and the points P i and P N
Is the control data added to the control data file in the immediately preceding step S211 (the control data representing an arc having two end points P i and P N-1). ), The data processing device 10 may be configured so as to be stored in a control data file and to end the data conversion process. At the time of the branch, the coordinates of some points on the curve between the points P N−1 and P N are obtained, and the points P N− 1, the data conversion process creates the control data representing an arc or the like for approximating the curve between points P N may be set to the be terminated.
【0055】また、実施形態に係るデータ処理装置10
では、近似円の方程式の係数を求める際に、Σh(Xk,
Yk)2(式(3)参照)が最小となるという条件が用い
られているが、近似円の方程式の係数を求める際に、他
の条件を用いることもできる。例えば、Σ|h(Xk,
Yk)|が最小となるという条件を用いて、近似円の方程
式の係数を求めることが出来る。また、|h(Xi+1,Y
i+1)|〜|h(Xj-2,Yj-2)|の中の最大値が最小とな
るという条件を用いて、近似円の方程式の係数を求める
ことも出来る。さらに、Σ|SQR((Xk−Xc)2+(Yk−
Yc)2)−R|が最小となるという条件、或いは、|SQR
((Xi+1−Xc)2+(Yi+1−Yc)2)−R|〜|SQR((Xj-2
−Xc)2+(Yj-2−Yc)2)−R|の最大値が最小となる
という条件を用いて、近似円の方程式の係数を求めるこ
とも出来る。ただし、これらの条件を用いた場合、近似
円の方程式の係数を求めるために、Σh(Xk,Yk)2が最
小となるという条件を用いた場合よりも多くの演算が必
要とされることになる。従って、ファイルの変換を高速
に行なわせたい場合には、実施形態に係るデータ処理装
置10の構成を採用しておくことが望ましい。The data processing device 10 according to the embodiment
Then, when calculating the coefficients of the equation of the approximate circle, Σh (X k ,
Although the condition that Y k ) 2 (see equation (3)) is minimized is used, other conditions can be used when obtaining the coefficients of the equation of the approximate circle. For example, Σ | h (X k ,
By using the condition that Y k ) | is minimized, the coefficients of the equation of the approximate circle can be obtained. Also, | h (X i + 1 , Y
Using the condition that the maximum value among i + 1 ) | to | h (X j-2 , Y j-2 ) | Further, Σ | SQR ((X k −Xc) 2 + (Y k −
Yc) 2 ) -R | is minimum, or | SQR
((X i + 1 −Xc) 2 + (Y i + 1 −Yc) 2 ) −R | to | SQR ((X j−2
Using the condition that the maximum value of −Xc) 2 + (Y j−2 −Yc) 2 ) −R | is minimized, the coefficient of the equation of the approximate circle can be obtained. However, when these conditions are used, more operations are required to obtain the coefficients of the equation of the approximate circle than when the condition that Σh (X k , Y k ) 2 is minimum is used. Will be. Therefore, when it is desired to convert a file at high speed, it is desirable to adopt the configuration of the data processing device 10 according to the embodiment.
【0056】[0056]
【発明の効果】本発明のデータ処理装置によれば、処理
対象とされた曲線を近似する幾つかの円弧と幾つかの線
分とを表す複数の要素データを、要素データの総数が少
なくなるように、生成することができる。従って、本発
明のデータ処理装置を用いれば、例えば、CADプログ
ラムによって作成した設計図面ファイルから、NC工作
機械を効率よく制御できる制御データファイルを簡単に
作成できることになる。また、本発明のコンピュータ読
取可能な記録媒体によれば、コンピュータを本発明のデ
ータ処理装置として動作させることができることにな
る。According to the data processing apparatus of the present invention, a plurality of element data representing several arcs and some line segments approximating a curve to be processed is reduced in total number of element data. And so on. Therefore, by using the data processing device of the present invention, for example, a control data file that can efficiently control an NC machine tool can be easily created from a design drawing file created by a CAD program. According to the computer-readable recording medium of the present invention, a computer can be operated as the data processing device of the present invention.
【図1】本発明の一実施形態に係るデータ処理装置の図
である。FIG. 1 is a diagram of a data processing device according to an embodiment of the present invention.
【図2】実施形態に係るデータ処理装置が実行するファ
イル変換処理の流れ図である。FIG. 2 is a flowchart of a file conversion process executed by the data processing device according to the embodiment.
【図3】ファイル変換処理時に実行されるデータ変換処
理の流れ図である。FIG. 3 is a flowchart of a data conversion process executed during a file conversion process.
【図4】データ変換処理の説明図である。FIG. 4 is an explanatory diagram of a data conversion process.
【図5】データ変換処理の説明図である。FIG. 5 is an explanatory diagram of a data conversion process.
【図6】データ変換処理の、図5に続く説明図である。FIG. 6 is an explanatory diagram following FIG. 5 of the data conversion process;
【図7】データ変換処理の、図6に続く説明図である。FIG. 7 is an explanatory diagram following FIG. 6 of the data conversion process;
【図8】データ変換処理の、図7に続く説明図である。FIG. 8 is an explanatory diagram following FIG. 7 of the data conversion process;
10 データ処理装置 20 コンピュータ 21 入力装置 22 ディスプレイ 23 コンピュータ本体 31 CPU 32 RAM 34 HDD 35 FDD 36 CD−ROMドライブ 37 通信制御回路 41 変換プログラムファイル 42 変換条件情報ファイル 50 フレキシブルディスク 60 CD−ROM 70 LANケーブル Reference Signs List 10 data processing device 20 computer 21 input device 22 display 23 computer main body 31 CPU 32 RAM 34 HDD 35 FDD 36 CD-ROM drive 37 communication control circuit 41 conversion program file 42 conversion condition information file 50 flexible disk 60 CD-ROM 70 LAN cable
Claims (8)
線分とを表す複数の要素データを生成するデータ処理装
置であって、 前記曲線上に位置する順序付けられた複数の点で構成さ
れる点系列の中の、始点として指定された点とそれに後
続する2個の点とからなる基準点群を通る円を表す方程
式の係数、或いは、当該基準点群を通る直線を表す方程
式の係数を算出する係数算出手段と、 前記点系列の前記基準点群よりも末尾側の点の中から、
1つ前の点及び自身が、前記係数算出手段によって係数
が算出された方程式によって表される円或いは直線から
の距離が規定値以下の領域に位置している全ての点を特
定する特定手段と、 この特定手段によって1個以上の点が特定された場合に
は、当該1個以上の点と前記基準点群とからなる点群を
近似するとともに、当該点群の中の、前記点系列におけ
る最も先頭側の点と最も末尾側の点とを端点として有す
る円弧或いは線分を表す要素データを生成し、前記特定
手段によって1個の点も特定されなかった場合には、前
記基準点群の中の、前記点系列における最も先頭側の点
と最も末尾側の点とを端点として有し、残りの1点を通
過する円弧或いは線分を表す要素データを生成する生成
手段と、 前記点系列の先頭の点を始点として指定して前記係数算
出手段を機能させるとともに、前記生成手段によって要
素データが生成される度に、当該要素データが表してい
る円弧或いは線分の末尾側の端点を始点として指定して
前記係数算出手段を機能させる算出順序制御手段とを備
えることを特徴とするデータ処理装置。1. A data processing device for generating a plurality of element data representing some arcs and some line segments approximating a curve, comprising a plurality of ordered points located on the curve. Of the equation representing a circle passing through a reference point group consisting of a point designated as a starting point and two succeeding points, or an equation representing a straight line passing through the reference point group, in a point sequence to be executed. Coefficient calculating means for calculating a coefficient, from among the points on the tail side of the reference point group of the point series,
A specifying means for specifying all points located in an area whose distance from a circle or a straight line represented by an equation whose coefficient has been calculated by the coefficient calculating means is equal to or less than a predetermined value, and When one or more points are specified by the specifying unit, a point group including the one or more points and the reference point group is approximated, and the point series in the point group in the point group is approximated. Generating element data representing an arc or a line segment having the foremost point and the last point as end points, and if no point is specified by the specifying means, the reference point group Generating means for generating element data representing an arc or a line segment passing through the remaining one point, having the foremost point and the last point in the point series as end points, Specify the first point of The coefficient calculation means is caused to function, and each time element data is generated by the generation means, the end point on the end side of the arc or line segment represented by the element data is designated as a start point to function the coefficient calculation means. A data processing device comprising: a calculation order control unit that causes the calculation order to be controlled.
点系列を構成する各点の座標を算出する座標算出手段
を、さらに備えることを特徴とする請求項1記載のデー
タ処理装置。2. The data processing apparatus according to claim 1, further comprising: a coordinate calculating unit configured to calculate coordinates of each point constituting the point sequence based on the function information representing the curve.
弧の半径が所定値を超える場合には、当該点群の中の前
記点系列における最も先頭側の点と最も末端側の点とが
端点である線分を表す要素データを生成することを特徴
とする請求項1又は請求項2に記載のデータ処理装置。3. The method according to claim 1, wherein when the radius of the arc approximating the point group exceeds a predetermined value, the generation unit determines a point at the forefront and a point at the most end in the point series in the point group. 3. The data processing device according to claim 1, wherein the data processing device generates element data representing a line segment that is an end point. 4.
1個以上の点が特定された場合には、当該1個以上の点
と前記基準点群とからなる点群の中の前記点系列におけ
る最も先頭側の点と最も末尾側の点とを通る円の方程式
の係数を、当該点群の中の各点に関する、その点と当該
円の中心との間の距離の二乗値からその円の半径の二乗
値を減じた値の二乗値の総和が最小となるように求め、
方程式の係数を求めた円に含まれる円弧を表す要素デー
タを生成することを特徴とする請求項1ないし請求項3
のいずれかに記載のデータ処理装置。4. The method according to claim 1, wherein, when one or more points are specified by the specifying unit, the generation unit includes a point group in the point group including the one or more points and the reference point group. The coefficient of the equation of the circle passing through the point at the forefront and the point at the back end is calculated from the square value of the distance between the point and the center of the circle for each point in the point group. The sum of the squared values of the values obtained by subtracting the squared values of the radius is calculated so as to be minimum,
4. An element data representing an arc included in a circle for which a coefficient of an equation is obtained is generated.
The data processing device according to any one of the above.
数の要素データを生成する装置であって、 前記曲線上に位置する順序付けられた複数の点で構成さ
れる点系列の中の、始点として指定された点とそれに後
続する2個の点とからなる基準点群を通る円を表す方程
式の係数、或いは、当該基準点群を通る直線を表す方程
式の係数を算出する係数算出手段と、 前記点系列の前記基準点群よりも末尾側の点の中から、
1つ前の点及び自身が、前記係数算出手段によって係数
が算出された方程式によって表される円或いは直線から
の距離が規定値以下の領域に位置している全ての点を特
定する特定手段と、 この特定手段によって1個以上の点が特定された場合に
は、当該1個以上の点と前記基準点群とからなる点群を
近似するとともに、当該点群の中の、前記点系列におけ
る最も先頭側の点と最も末尾側の点とを端点として有す
る円弧或いは成分を表す要素データを生成し、前記特定
手段によって1個の点も特定されなかった場合には、前
記基準点群の中の、前記点系列における最も先頭側の点
と最も末尾側の点とを端点として有し、残りの1点を通
過する円弧或いは線分を表す要素データを生成する生成
手段と、 前記点系列の先頭の点を始点として指定して前記係数算
出手段を機能させるとともに、前記生成手段によって要
素データが生成される度に、当該要素データが表してい
る円弧或いは線分の末尾側の端点を始点として指定して
前記係数算出手段を機能させる算出順序制御手段とを備
える装置として動作させるプログラムを記録したコンピ
ュータ読取可能な記録媒体。5. An apparatus for generating a plurality of element data representing a number of arcs and a number of line segments approximating a curve, the apparatus comprising: a plurality of ordered points located on the curve; A coefficient of an equation representing a circle passing through a reference point group consisting of a point designated as a starting point and two succeeding points, or an equation representing a straight line passing through the reference point group, in the constructed point sequence. Coefficient calculating means for calculating the coefficient of, from among the points on the tail side of the reference point group of the point series,
A specifying means for specifying all points located in an area whose distance from a circle or a straight line represented by an equation whose coefficient has been calculated by the coefficient calculating means is equal to or less than a predetermined value, and When one or more points are specified by the specifying unit, a point group including the one or more points and the reference point group is approximated, and the point series in the point group in the point group is approximated. Element data representing an arc or a component having the foremost point and the last point as end points is generated, and if no point is specified by the specifying means, the reference point group Generating means for generating element data representing an arc or a line segment passing through the remaining one point, having the most point and the last point in the point sequence as end points; Specify the first point as the starting point The coefficient calculation means is caused to function, and each time element data is generated by the generation means, the end point on the end side of the arc or line segment represented by the element data is designated as a start point to function the coefficient calculation means. A computer-readable recording medium on which a program for operating as a device including a calculation order control unit for causing the computer to operate is recorded.
を、 前記曲線を表す関数情報に基づき、前記点系列を構成す
る各点の座標を算出する座標算出手段を、さらに備える
装置として動作させることを特徴とする請求項5記載の
コンピュータ読取可能な記録媒体。6. The program causes the computer to operate as an apparatus further including coordinate calculation means for calculating coordinates of each point constituting the point series based on function information representing the curve. 6. The computer-readable recording medium according to claim 5, wherein:
弧の半径が所定値を超える場合には、当該点群の中の前
記点系列における最も先頭側の点と最も末端側の点とが
端点である線分を表す要素データを生成することを特徴
とする請求項5又は請求項6に記載のコンピュータ読取
可能な記録媒体。7. When the radius of an arc approximating the point group exceeds a predetermined value, the generation unit determines a point at the forefront and a point at the most end in the point series in the point group. 7. The computer-readable recording medium according to claim 5, wherein the element data represents a line segment which is an end point.
1個以上の点が特定された場合には、当該1個以上の点
と前記基準点群とからなる点群の中の前記点系列におけ
る最も先頭側の点と最も末尾側の点とを通る円の方程式
の係数を、当該点群の中の各点に関する、その点と当該
円の中心との間の距離の二乗値からその円の半径の二乗
値を減じた値の二乗値の総和が最小となるように求め、
方程式の係数を求めた円に含まれる円弧を表す要素デー
タを生成することを特徴とする請求項5ないし請求項7
のいずれかに記載のコンピュータ読取可能な記録媒体。8. The method according to claim 1, wherein, when one or more points are specified by the specifying unit, the generation unit determines the point sequence in the point group in the point group including the one or more points and the reference point group. The coefficient of the equation of the circle passing through the point at the forefront and the point at the back end is calculated from the square value of the distance between the point and the center of the circle for each point in the point group. The sum of the squared values of the values obtained by subtracting the squared values of the radius is calculated so as to be minimum,
8. An element data representing an arc included in a circle for which a coefficient of an equation is obtained is generated.
A computer-readable recording medium according to any one of the above.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000087834A JP2001273016A (en) | 2000-03-28 | 2000-03-28 | Data processor and a memory medium readable by a computer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000087834A JP2001273016A (en) | 2000-03-28 | 2000-03-28 | Data processor and a memory medium readable by a computer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2001273016A true JP2001273016A (en) | 2001-10-05 |
Family
ID=18603787
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000087834A Pending JP2001273016A (en) | 2000-03-28 | 2000-03-28 | Data processor and a memory medium readable by a computer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2001273016A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008003756A (en) * | 2006-06-21 | 2008-01-10 | Miyachi Technos Corp | Laser marking method and apparatus |
| JP2018063730A (en) * | 2015-06-30 | 2018-04-19 | キヤノンマーケティングジャパン株式会社 | Program, information processing device, and processing method thereof |
| CN109507954A (en) * | 2011-01-24 | 2019-03-22 | 斗山机床株式会社 | Cnc machine tool utilizes the machining shape input unit and method of interactive program |
| CN113927127A (en) * | 2021-08-17 | 2022-01-14 | 熵智科技(深圳)有限公司 | Automatic cutting method and device for bevel line, storage medium and computer equipment |
-
2000
- 2000-03-28 JP JP2000087834A patent/JP2001273016A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008003756A (en) * | 2006-06-21 | 2008-01-10 | Miyachi Technos Corp | Laser marking method and apparatus |
| CN109507954A (en) * | 2011-01-24 | 2019-03-22 | 斗山机床株式会社 | Cnc machine tool utilizes the machining shape input unit and method of interactive program |
| JP2018063730A (en) * | 2015-06-30 | 2018-04-19 | キヤノンマーケティングジャパン株式会社 | Program, information processing device, and processing method thereof |
| CN113927127A (en) * | 2021-08-17 | 2022-01-14 | 熵智科技(深圳)有限公司 | Automatic cutting method and device for bevel line, storage medium and computer equipment |
| CN113927127B (en) * | 2021-08-17 | 2023-11-14 | 熵智科技(深圳)有限公司 | Automatic groove line cutting method and device, storage medium and computer equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8234599B2 (en) | Use of graphs to decompose layout design data | |
| JP6366033B2 (en) | Optimization method of IF statement in program | |
| JP4614389B2 (en) | Image forming apparatus, printing apparatus, display apparatus, drawing processing method, and program | |
| WO2013128625A1 (en) | Working program generation device, working program generation method, and working program generation program | |
| JP2001273016A (en) | Data processor and a memory medium readable by a computer | |
| CN115097786B (en) | Processing track optimization method and equipment based on convolution line and storage medium | |
| JPWO2019130412A1 (en) | Machining program modification device and machining program modification method | |
| JP2009157623A (en) | System and method for circuit simulation | |
| JP2003108377A (en) | Knowledge rule conversion device, expert system, knowledge rule conversion program, and method of constructing expert system | |
| JPH07160873A (en) | Image data conversion method including Bezier curve | |
| JP7192603B2 (en) | Program editing device, program editing method, and program editing program | |
| EP1762953A1 (en) | Automatic trace determination method | |
| JP4981313B2 (en) | Three-dimensional shape processing apparatus, curved surface creation program, and curved surface creation method | |
| CN115526956B (en) | A graphic offset method for electronic design automation system and electronic design automation system | |
| CN120891695B (en) | Optical proximity correction method, electronic device, and storage medium | |
| JP3815909B2 (en) | Perforated polygon bridge generation system, perforated polygon bridge generation method, and recording medium for executing the method | |
| JP2695788B2 (en) | Graphic data interpolation method | |
| CN118821351A (en) | Method, device, electronic equipment and medium for optimizing tooth profile of flexible wheel of harmonic reducer | |
| CN120235110A (en) | A quantum chip layout simulation method, device, equipment and medium | |
| JP2003195911A (en) | Program converting method from mnemonic form to ladder diagram form, program for program conversion, and recording medium for recording program | |
| JP4851542B2 (en) | Route curve generation system, method, and program | |
| JP4847028B2 (en) | CAD data conversion program | |
| CN120669961A (en) | Rule generation method and computing device | |
| JP2001075831A (en) | Program processor, ic test system, program processing method and storage medium | |
| CN116931885A (en) | Relationship diagram generation method, device, equipment and storage medium |