JPH05246193A - Figure drawing apparatus - Google Patents

Figure drawing apparatus

Info

Publication number
JPH05246193A
JPH05246193A JP4084910A JP8491092A JPH05246193A JP H05246193 A JPH05246193 A JP H05246193A JP 4084910 A JP4084910 A JP 4084910A JP 8491092 A JP8491092 A JP 8491092A JP H05246193 A JPH05246193 A JP H05246193A
Authority
JP
Japan
Prior art keywords
plotter
draw
move
order
point
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
Application number
JP4084910A
Other languages
Japanese (ja)
Inventor
Jiyun Ooshimo
純 大志茂
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.)
Tsubakimoto Chain Co
Original Assignee
Tsubakimoto Chain Co
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 Tsubakimoto Chain Co filed Critical Tsubakimoto Chain Co
Priority to JP4084910A priority Critical patent/JPH05246193A/en
Publication of JPH05246193A publication Critical patent/JPH05246193A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

PURPOSE:To reduce the operation cost and figure drawing cost of the title apparatus by drawing a figure in the order corresponding to drawing positional relation so that the moving distance of the pen plotter of a CAD device having a plotter becomes shortest. CONSTITUTION:The passing point calculating means 121 of an operational processing part 12 calculates the coordinates of the middle point of a 'draw' terminal point as a temporary passing point where the pen cursor of a plotter 2 passes on a figure from the figure data stored in a figure data file 11 to calculate the shortest route on the basis of said coordinates. A drawing sequence determining means 122 operates the 'move' distances when the pen cursor moves in forward and reverse directions according to the shortest route and a drawing sequence of a shorter 'move' distance is selected. A sequence data output part 13 gives 'draw' and 'move' orders to the plotter 2 according to the selected drawing sequence.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ペンプロッタを備えた
CAD 装置,加工ヘッド, 加工テーブルの移動をコンピュ
ータ制御するレーザ加工機等の図形描画装置に関する。
BACKGROUND OF THE INVENTION The present invention includes a pen plotter.
The present invention relates to a graphic drawing device such as a laser processing machine for computer-controlled movement of a CAD device, a processing head, and a processing table.

【0002】[0002]

【従来の技術】従来のCAD 装置では、複数の図形をペン
プロッタで描画する場合、CAD における図形データの入
力順又は、線の始端・終端,中心角等の各図形の描画上
の属性データが格納される図形データファイルへのデー
タ格納順に従ってペンプロッタへの図形データの出力順
序を決定している。
2. Description of the Related Art In a conventional CAD device, when drawing a plurality of figures with a pen plotter, the figure data input order in CAD or the attribute data for drawing each figure such as the start / end and center angle of a line The output order of the graphic data to the pen plotter is determined according to the data storage order in the stored graphic data file.

【0003】[0003]

【発明が解決しようとする課題】上述のような従来の図
形描画装置は、図形データの入力順,図形データファイ
ルへのデータ格納順等、その描画位置関係に無関係な描
画順序に従って図形データをペンプロッタ,加工ヘッ
ド,加工テーブル等の描画手段に出力するために描画手
段の移動に無駄が生じて図形の描画に長時間を要し、ま
た描画手段の摩耗が早まって装置の寿命が短くなるので
装置の運転コスト及び描画コストが増大するという問題
がある。
SUMMARY OF THE INVENTION The conventional graphic drawing apparatus as described above penforms graphic data in a drawing order that is irrelevant to the drawing positional relationship, such as the input order of graphic data and the storage order of data in a graphic data file. Since the drawing means such as the plotter, the processing head, and the processing table are output, the movement of the drawing means is wasted, and it takes a long time to draw a figure, and the drawing means wears quickly and shortens the life of the apparatus. There is a problem that the operating cost and drawing cost of the device increase.

【0004】本発明はこのような問題点を解決するため
になされたものであって、各図形の描画位置関係を考慮
した描画順序に従って描画手段を移動させ、描画手段の
無駄な移動を排除して描画時間を可及的に短縮するとと
もに装置の寿命を延ばすことにより装置の運転コスト及
び描画コストを低減する図形描画装置の提供を目的とす
る。
The present invention has been made in order to solve such a problem, and moves the drawing means in accordance with the drawing order in consideration of the drawing position relationship of each figure, and eliminates unnecessary movement of the drawing means. It is an object of the present invention to provide a graphic drawing apparatus that reduces the operating cost and drawing cost of the apparatus by shortening the drawing time as much as possible and extending the life of the apparatus.

【0005】[0005]

【課題を解決するための手段】本発明に係る図形描画装
置は、図形を描画すべく移動される描画手段を、所定の
描画順序に従って移動させて複数の図形を各図形の描画
上の属性データに基づき描画する装置において、前記属
性データを基に、各図形の描画位置を代表する代表座標
を求める手段と、各代表座標を各1回通過する経路のう
ち、最短距離の経路を求める手段と、該手段が求めた経
路に従って図形間の非描画期間での前記描画手段の移動
距離を算出して該移動距離が最短となる描画順序を決定
する手段とを備えたことを特徴とする。
In a graphic drawing apparatus according to the present invention, a drawing means which is moved to draw a graphic is moved in a predetermined drawing order so that a plurality of graphics are attribute data for drawing each graphic. A device for drawing based on the attribute data, a means for obtaining a representative coordinate representative of the drawing position of each figure, and a means for obtaining the shortest distance route among the routes each passing through each representative coordinate once. According to the route obtained by the means, means for calculating a moving distance of the drawing means in a non-drawing period between figures and determining a drawing order in which the moving distance is the shortest is provided.

【0006】[0006]

【作用】本発明に係る図形描画装置は、各図形の描画上
の属性データに基づいて、各図形の描画位置を代表する
代表座標を求め、この代表座標を各1回通過する経路の
うち最短距離の経路を求め、この最短経路に従って各図
形間の非描画期間に描画手段が移動する距離が最短とな
る描画順序を決定する。
The graphic drawing apparatus according to the present invention obtains the representative coordinates representative of the drawing position of each figure based on the drawing attribute data of each figure, and determines the shortest route among the paths which pass through the representative coordinates once. The path of distance is obtained, and the drawing order that minimizes the distance that the drawing means moves in the non-drawing period between the figures is determined according to this shortest path.

【0007】[0007]

【実施例】以下、本発明をその実施例を示す図に基づい
て説明する。図1は本発明に係るCAD 装置の構成を示す
ブロック図である。図中1は画面上で作成された図形か
ら、各図形データの描画上の属性データを含む図形デー
タを作成して描画順序を決定するCAD であって、作成し
た図形データを決定した描画順序に従ってプロッタ2に
出力する。
The present invention will be described below with reference to the drawings showing the embodiments thereof. FIG. 1 is a block diagram showing the configuration of a CAD device according to the present invention. In the figure, reference numeral 1 is a CAD that determines the drawing order by creating figure data including attribute data for drawing each figure data from the figure created on the screen. Output to plotter 2.

【0008】CAD 1で作成された図形の描画上の属性デ
ータである直線の始端, 終端, 円中心等の座標値,半
径, 円弧の中心角等の各種パラメータは図形データファ
イル11に格納され、演算処理部12では、通過点算出手段
121 が図形データファイル11に格納されている図形デー
タに基づき、各図形におけるペンカーソルの仮の通過点
として各図形の描画始端・終端の2つのdraw端点の中点
である代表座標値を算出し、描画順序決定手段122 はこ
の代表座標値に基づき、各通過点を各1回通過する最短
経路を後述する方法で求め、この最短経路に従って、プ
ロッタ2における図形間の非描画期間でのペンカーソル
の移動距離を算出してこの移動距離が最短距離になる描
画順序を決定し、順次データ出力部13は決定された描画
順序に従ってdraw,move 命令をプロッタ2に与える。
Various parameters such as the coordinate values of the starting point, the ending point, the center of a circle, etc. of the straight line which are the attribute data on the drawing of the figure created by CAD 1 are stored in the figure data file 11, In the arithmetic processing unit 12, the passing point calculating means
Based on the graphic data stored in the graphic data file 11, 121 calculates the representative coordinate value which is the midpoint between the two drawing end points of the drawing start end and the end of each drawing as a temporary passing point of the pen cursor in each graphic. Based on this representative coordinate value, the drawing order determining means 122 finds the shortest path that passes each passing point once, by the method described later, and according to this shortest path, the pen cursor in the non-drawing period between figures in the plotter 2. Is calculated to determine the drawing order in which the moving distance becomes the shortest distance, and the data output unit 13 sequentially gives draw, move commands to the plotter 2 in accordance with the determined drawing order.

【0009】以上のような構成のCAD 装置による図形描
画手順を図2に示すフローチャートに基づいて説明す
る。なお、本実施例では図形の数を(n−1)個とす
る。ペンカーソルが各図形を通過する仮の通過点とし
て、各図形の2つのdraw端点の中点の座標値を求め、こ
れにペンカーソルのホームポジションPn の1点を加え
たn点の通過点を求める(S1)。ペンカーソルの仮の通
過点それぞれをペンカーソルが各1回通過する経路のう
ち最短経路を後述する方法で求める(S2)。
A graphic drawing procedure performed by the CAD apparatus having the above-described structure will be described with reference to the flowchart shown in FIG. In this embodiment, the number of figures is (n-1). As a temporary passing point where the pen cursor passes through each figure, the coordinate values of the midpoints of the two draw end points of each figure are obtained, and the n passing points obtained by adding one point of the home position Pn of the pen cursor Ask (S1). The shortest path of the paths through which the pen cursor passes once each of the temporary passing points of the pen cursor is obtained by the method described later (S2).

【0010】この最短経路から順方向経路の通過順序を
求め、第1番目の図形の2つのdraw端点のうち、起点の
ホームポジションPn から近い一方のdraw端点までのペ
ンカーソルの移動(move)距離を算出し、次に、第1番目
の図形の他方のdraw端点から第2番目の図形の2つのdr
aw端点のうち、近い方のdraw端点までの距離を積算し、
通過順序をインクリメントしながらホームポジションP
n に戻るまで、以上の動作をn回繰り返してdraw端点の
順方向経路におけるペンカーソルのmove距離を求める
(S3)。
The pass order of the forward path is obtained from this shortest path, and the move distance of the pen cursor from one of the two draw end points of the first figure to the draw end point close to the origin home position Pn. Is calculated, and then two dr of the second figure from the other draw end point of the first figure
Of the aw endpoints, add up the distance to the closest draw endpoint,
Home position P while incrementing the passing order
The above operation is repeated n times until it returns to n, and the move distance of the pen cursor in the forward path of the draw end point is obtained (S3).

【0011】次に、ホームポジションPn から順方向経
路の通過順序が(n−1)番目の図形の2つのdraw端点
のうち近い方のdraw端点と、前述の順方向経路におい
て、ホームポジションPn に戻る直前のdraw端点が同一
端点であるか否かを検出し(S4)、同一であれば逆方向
経路におけるmove距離は順方向経路で積算した値と同一
となるのでステップS8へジャンプする。
Next, from the home position Pn, to the home position Pn on the forward draw path, whichever is closer to the draw end point of the two draw end points of the (n-1) th figure in which the forward path passes. It is detected whether or not the draw end points immediately before returning are the same end point (S4), and if they are the same, the move distance on the backward route is the same as the value accumulated on the forward route, so the process jumps to step S8.

【0012】一方、ステップS4の結果、draw端点が同一
でない場合、(n−1)番目の図形の2つのdraw端点の
うちホームポジションPn から近い方のdraw端点までの
move距離を算出し、次に、(n−1)番目の他方のdraw
端点から近い方の(n−2)番目の図形要素のdraw端点
までのmove距離を積算し、順方向経路の場合と逆順で通
過順をデクリメントしながら以上の動作をn回繰り返し
て逆方向経路におけるペンカーソルのmove距離を求める
(S5)。
On the other hand, as a result of the step S4, when the draw end points are not the same, of the two draw end points of the (n-1) th figure, from the home position Pn to the closer draw end point.
Calculate the move distance, then draw the (n-1) th other
The move distance from the end point to the draw end point of the closer (n-2) th graphic element is added up, and the above operation is repeated n times while decrementing the passing order in the reverse order of the forward direction path, and the backward path Find the move distance of the pen cursor at (S5).

【0013】順方向経路と逆方向経路における積算move
距離を比較し(S6)、順方向経路の値が小さい場合は順
方向経路のmove距離積算時の描画順序に従ってdraw,mov
e 命令をプロッタ2へ出力し(S7)、また、逆方向経路
の値が小さい場合は逆方向経路のmove距離積算時の描画
順序に従ってdraw,move 命令をプロッタ2へ出力する
(S8)。なお、逆方向経路を選択した場合は通過順序を
逆順に付け直す。
Accumulated move in forward and backward paths
Compare the distances (S6). If the value of the forward route is small, draw, mov according to the drawing order when the forward route move distance is integrated.
The e command is output to the plotter 2 (S7), and if the value of the backward route is small, the draw, move command is output to the plotter 2 according to the drawing order when the backward route move distance is integrated (S8). When the reverse route is selected, the passing order is changed to the reverse order.

【0014】次に、前述のステップS2にて最短経路を求
める手順について説明する。本実施例では、巡回セール
スマン問題をホップフィールドのネットワークを導入し
て解く方法を適用する。
Next, the procedure for obtaining the shortest route in step S2 will be described. In this embodiment, a method of solving the traveling salesman problem by introducing a Hopfield network is applied.

【0015】図3は、通過点1,2,…,x,y,…,
nを行とし、通過する順序1,2,…,i,j,…,n
を列とするn2 個の行列であって、行列の各要素は
“1”又は“0”の状態を持ち、“1”の場合は対応す
る行の通過点を対応する列の順番で通過することを示
し、“0”の場合は通過しないことを示す。また、この
行列では同一の通過点は2回以上通過しない、即ち、行
列の各行及び各列において2箇所以上が“1”の状態を
持たないことが望ましい。
FIG. 3 shows passing points 1, 2, ..., X, y ,.
n is a row, and the order of passage is 1, 2, ..., I, j ,.
Of n 2 columns, each element of the matrix has a state of “1” or “0”, and in the case of “1”, the passing point of the corresponding row is passed in the order of the corresponding column. When the value is “0”, it means that the signal does not pass. Further, in this matrix, it is desirable that the same passing point does not pass more than once, that is, two or more points in each row and each column of the matrix do not have the state of "1".

【0016】このような通過点及び通過順序の行列に、
ホップフィールドのネットワークを適用する。即ち、ホ
ップフィールドのネットワークによりエネルギー関数
(コスト評価関数)を確率的に減少させ、エネルギー関
数が最小になるときの“1”“0”のパターンを求める
ことにより、巡回セールスマン問題の近似最適解、即ち
本実施例における最短経路を求める。ホップフィールド
の提唱するネットワークのエネルギーは次式で表され
る。
In such a matrix of passing points and passing orders,
Apply Hopfield networks. That is, the energy function (cost evaluation function) is stochastically reduced by the Hopfield network, and the pattern of "1" and "0" when the energy function becomes the minimum is obtained to obtain the approximate optimal solution of the traveling salesman problem. That is, the shortest route in this embodiment is obtained. The energy of the network proposed by Hopfield is expressed by the following equation.

【0017】[0017]

【数1】 [Equation 1]

【0018】ただし、E(t) は時刻tにおけるネットワ
ークのエネルギー、Wlmはユニットlとユニットmとの
間の結合強度係数、Vl(t),Vm(t)はそれぞれユニット
l,mの時刻tにおける出力値、θl はユニットlのしき
い値である。
Where E (t) is the energy of the network at the time t, Wlm is the coupling strength coefficient between the unit 1 and the unit m, and Vl (t) and Vm (t) are the time t of the units 1 and m, respectively. The output value at, θl is the threshold of unit l.

【0019】(1) 式を図3に示す通過点及び通過順序の
組み合わせからなる行列に適用して書き直すと次式のよ
うになる。なお、x行i列のユニットをxi, y行j列の
ユニットをyjで表す。また、以下の式中の値は時刻tに
おける値とする。
The equation (1) is rewritten by applying it to the matrix consisting of combinations of passing points and passing orders shown in FIG. The unit at the x-th row and the i-th column is represented by xi, and the unit at the y-th row and the j-th column is represented by yj. Further, the values in the following formulas are values at time t.

【0020】[0020]

【数2】 [Equation 2]

【0021】ただし、Wxi,yj はユニットxiとユニット
yj間の結合強度係数、Vxi, Vyjはユニットxi,yj の出
力値、θxiはユニットxiのしきい値である。
However, Wxi, yj is a unit xi and a unit
Coupling strength coefficient between yj, Vxi, Vyj are output values of the unit xi, yj, and θxi is a threshold value of the unit xi.

【0022】時刻tにユニットxiが他のユニットから受
け取る信号の総和Uxi(t) は次式のようになる。
The total sum Uxi (t) of the signals received by the unit xi from other units at the time t is given by the following equation.

【0023】[0023]

【数3】 [Equation 3]

【0024】エネルギー関数は、一般に多数の極小値を
持ち、最適化問題に応用する場合、極小値にトラップさ
れて最小値付近に到達するのに長時間を要するので、モ
ンテカルロ法を用いた確率的なゆらぎの導入によりエネ
ルギー関数の局所最適値から逃れてより最適な状態、即
ち最小値へ収束させるシミュレーテッドアニーリングの
導入が有効である。
The energy function generally has a large number of local minima, and when it is applied to an optimization problem, it takes a long time to reach the vicinity of the minimum value by being trapped in the local minima, so the stochastic method using the Monte Carlo method is used. It is effective to introduce simulated annealing that escapes from the local optimum value of the energy function by introducing fluctuations and converges to a more optimum state, that is, the minimum value.

【0025】確率のゆらぎの大きさを“温度”で定義し
た場合、時刻tにおいてその総和がUxi(t) の信号を受
けたユニットxiが次の時刻 t+1に出力する値Vxi(t+1)
は次の手続きで求まる。
When the magnitude of the fluctuation of probability is defined by "temperature", the value Vxi (t +) output at the next time t + 1 by the unit xi which has received the signal whose sum is Uxi (t) at time t 1)
Can be obtained by the following procedure.

【0026】[0026]

【数4】 [Equation 4]

【0027】ただし、T(t) は時刻tにおけるネットワ
ークの温度、Ts はT(0) の初期温度である。
However, T (t) is the temperature of the network at time t, and Ts is the initial temperature of T (0).

【0028】[0028]

【数5】 [Equation 5]

【0029】ただし、Jxiはユニットxiの状態が“1”
になる確率分布を示す判定用の値である。 if ( rand(1)≦Jxi) Vxi(t+1) =1 else Vxi(t+1) =0 …(6) ただし、rand(1) は0〜1の一様分布乱数を示す。
However, in Jxi, the state of the unit xi is "1".
It is a value for judgment indicating a probability distribution of. if (rand (1) ≦ Jxi) Vxi (t + 1) = 1 else Vxi (t + 1) = 0 (6) However, rand (1) represents a uniformly distributed random number of 0 to 1.

【0030】経路の長さを反映したコスト評価関数を次
のように決める。 Ec =E1 +E2 …(7) ただし、Ec は評価値、E1 は1つの経路に付随する各
経路の評価値合計である。
The cost evaluation function that reflects the length of the route is determined as follows. Ec = E 1 + E 2 ... (7) however, ec is the evaluation value, E 1 is an evaluation value sum of each path associated with one path.

【0031】[0031]

【数6】 [Equation 6]

【0032】ただし、dxyはPx からPy への距離、
(dxyVxiVy,i+1 )はi番目にPを、(i+1) 番目にP
y を通過した経路の評価値、同じく、(dxyVxiVy,i-
1 )は(i-1) 番目にPy を、i番目にPを通過した経路
の評価値であって、E1 は総移動距離に関するもので最
小となることが望ましい。
Where dxy is the distance from Px to Py,
(DxyVxiVy, i + 1) is the i-th P and the (i + 1) -th P
The evaluation value of the route that passed y, similarly (dxyVxiVy, i-
1) is an evaluation value of a route that has passed (i-1) th and Py, and ithly, and E 1 is related to the total movement distance, and is preferably the smallest.

【0033】また、(7) 式においてE2 はナンセンスな
経路に対応するネットワークの評価値が大きくなるよう
につけ加えた補正項である。
Further, in the equation (7), E 2 is a correction term added so that the evaluation value of the network corresponding to the nonsense route becomes large.

【0034】[0034]

【数7】 [Equation 7]

【0035】(9) 式の第1項は行列表現の同一行xにお
ける2つの列i,jのユニット出力値が同時に“1”の
場合“A”になる項であって、同じ点を2回通過するの
を防ぐ役目を持つ(同行要素間の相互抑制効果)。第2
項は、同様に同一列iにおける2つの行x,yのユニッ
ト出力値が同時に“1”の場合“B”になる項であっ
て、同じ点を2回通過するのを防ぐ役目を持つ(同列要
素間の相互抑制効果)。第3項は行列の要素の総和がn
2 からずれると、そのずれに応じて評価値を大きくする
項であって、全通過点の数をn2 にするように制限する
役目を持つ。
The first term of the equation (9) is a term which becomes "A" when the unit output values of the two columns i and j in the same row x of the matrix expression are "1" at the same time, and the same point is 2 It has the role of preventing the passage of two times (mutual suppression effect between accompanying elements). Second
Similarly, the term is a term that becomes “B” when the unit output values of two rows x and y in the same column i are “1” at the same time, and has a role of preventing the same point from passing twice ( Mutual suppression effect between elements in the same row). In the third term, the sum of matrix elements is n
When it deviates from 2 , it is a term that increases the evaluation value according to the deviation, and has a role of limiting the number of all passing points to n 2 .

【0036】前述の(2) 式は状態の変化を続けながら単
調減少するが、(7) 〜(9) 式で表されるコスト評価関数
が単調減少するか不明であるので、(2) 式と(7) 〜(9)
式が重なり合うように、即ちEc(t)がtの増加とともに
減少性を持つようにすればよい。
The above equation (2) monotonically decreases while continuing to change the state, but it is unknown whether the cost evaluation function represented by the equations (7) to (9) monotonically decreases. And (7) ~ (9)
It suffices if the equations are overlapped, that is, Ec (t) has a decreasing property as t increases.

【0037】 Wxi,yj =−Afxy(1−fij) −B(1−fxy) −C −Ddxy(fj,i+1 +fj,i-1 ) …(10) θxi=Cn …(11)Wxi, yj = -Afxy (1-fij) -B (1-fxy) -C-Ddxy (fj, i + 1 + fj, i-1) (10) θxi = Cn (11)

【0038】ただし、fijはクロネッカーデルタであっ
て、 if i=j fij=1 else fij=0 で定義される。
However, fij is a Kronecker delta and is defined by if i = j fij = 1 else fij = 0.

【0039】以上のような手順を用いて、図4の3つの
図形要素、円弧(A) ,直線(B)(C)を描画する場合の最短
経路を求めた具体例を以下に説明する。なお、ペンカー
ソルのホームポジションは原点(0,0) である。図5は図
形データファイルであって、各図形の種別、直線の始
端, 終端, 円中心等の座標値及び半径, 円弧の中心角等
の各種パラメータ及びCAD を用いた図形作成時における
図形データの入力順が格納されている。
A specific example of obtaining the shortest path when drawing the three graphic elements, the arc (A), and the straight line (B) (C) of FIG. 4 using the above procedure will be described below. The home position of the pen cursor is the origin (0,0). Fig. 5 shows the figure data file, which is used for various types of figures, such as coordinate values and radiuses of straight line start and end points, circle center, etc., and various parameters such as arc center angle, and figure data when creating figures using CAD. The input order is stored.

【0040】本実施例では、円弧(A) は中心座標(6,5),
半径2, 中心角90°〜 270°、直線(B) は始点座標(15,
3), 終点座標(16,1)、直線(C) は始点座標(13,9), 終点
座標(9,1) である。図形要素(A)(B)(C) のdraw端点をそ
れぞれAa,Ab,Ba,Bb,Ca,Cb 、仮の通過点をAc,Bc,Ccとす
る。
In the present embodiment, the arc (A) is represented by the center coordinates (6,5),
Radius 2, central angle 90 ° to 270 °, straight line (B) is the starting point coordinates (15,
3), the end point coordinates (16,1) and the straight line (C) are the start point coordinates (13,9) and the end point coordinates (9,1). The draw end points of the graphic elements (A), (B), and (C) are Aa, Ab, Ba, Bb, Ca, and Cb, and the temporary passing points are Ac, Bc, and Cc.

【0041】比較のため、従来の図形描画装置で入力順
に従った場合では、(0,0) →Cb→Ca→Aa→Ab→Ba→Bb→
(0,0) の経路でペンプロッタが動き、 (0,0)〜Cb, Ca〜
Aa,Ab〜Ba, Bb〜(0,0) のmove距離合計は 41.84であ
る。
For comparison, when the input order is followed in the conventional graphic drawing apparatus, (0,0) → Cb → Ca → Aa → Ab → Ba → Bb →
The pen plotter moves along the path of (0,0), and (0,0) ~ Cb, Ca ~
The total move distance of Aa, Ab ~ Ba, Bb ~ (0,0) is 41.84.

【0042】また、従来の図形描画装置で登録順に従っ
た場合では、(0,0) →Aa→Ab→Ba→Bb→Cb→Ca→(0,0)
の経路でペンプロッタが動き、(0,0) 〜Aa, Ab〜Ba,Bb
〜Cb,Ca〜(0,0) のmove距離合計は 41.55である。
Further, in the case of following the registration order in the conventional graphic drawing device, (0,0) → Aa → Ab → Ba → Bb → Cb → Ca → (0,0)
The pen plotter moves along the path of (0,0) ~ Aa, Ab ~ Ba, Bb
The total move distance of ~ Cb, Ca ~ (0,0) is 41.55.

【0043】本実施例では、まず、円弧(A) の2つのdr
aw端点Aa(6,7),Ab(6,3) を三角関数を用いて求め、通過
点Ac(6,5) を求める。直線(B) は端点Ba(15,3), Bb(16,
1)からBc(15.5, 2) 、直線(C) は端点Ca(13,9), 端点 C
b(9,1)からCc(11, 5) を求める。Ac,Bc,Ccにホームポジ
ション(0) の(0,0) を加えた4個の通過点が求まる。
In this embodiment, first, two drs of the arc (A) are
aw The end points Aa (6,7) and Ab (6,3) are found using trigonometric functions, and the passing points Ac (6,5) are found. The straight line (B) is the end point Ba (15,3), Bb (16,
1) to Bc (15.5, 2), straight line (C) is endpoint Ca (13,9), endpoint C
Find Cc (11, 5) from b (9, 1). Four passing points are obtained by adding (0,0) of home position (0) to Ac, Bc, Cc.

【0044】前述の手順に従って下記のような行列で表
わされるパターンの最短経路を求める。
The shortest path of the pattern represented by the following matrix is obtained according to the procedure described above.

【0045】順方向経路、P1 (0,0) 〜P2 ・ Ab(6,3)
→Aa(6,7) 〜P4 ・Cb(9,1) →Ca(13,9)〜P3 ・Bb(15,
3)→Ba(16,1)〜P1 (0,0) を求める。
Forward path, P 1 (0,0) to P 2 · Ab (6,3)
→ Aa (6,7) ~P 4 · Cb (9,1) → Ca (13,9) ~P 3 · Bb (15,
3) → Ba (16,1) to P 1 (0,0) is calculated.

【0046】次に、P1 (0,0) から近い方のP3 のdraw
端点はBb(15,3)で順方向経路の最終の端点Baと異なるの
で逆方向経路が存在する。逆方向経路、P1 (0,0) 〜P
3 ・Bb(15,3)→Ba(16,1)〜P4 ・ Cb(9,1)→Ca(13,9)〜
2 ・Aa(6,7) →Ab(6,3) 〜P1 (0,0) を求める。
Next, draw of P 3 closer to P 1 (0,0)
Since the end point is Bb (15,3) and is different from the final end point Ba of the forward path, there is a backward path. Reverse path, P 1 (0,0) to P
3・ Bb (15,3) → Ba (16,1) 〜P 4・ Cb (9,1) → Ca (13,9) 〜
P 2 · Aa (6,7) → Ab (6,3) to P 1 (0,0) are calculated.

【0047】順方向経路, 逆方向経路に基づき、各図形
間のペンカーソルのmove距離xを以下の式で求めて積算
する。ここで(x1 1 )はmove始端、(x2 ,y2
はmove終端を示す。 x=√{(x1 −x2 2 +(y1 −y2 2 } …(12)
Based on the forward path and the backward path, the move distance x of the pen cursor between the figures is calculated by the following formula and integrated. Where (x 1 y 1 ) is the move start point, and (x 2 , y 2 )
Indicates the end of move. x = √ {(x 1 -x 2) 2 + (y 1 -y 2) 2} ... (12)

【0048】以上の結果、本実施例では逆方向経路のmo
ve距離の方が短いので逆方向経路を採用し、move距離積
算時の描画順序に従って図形データをプロッタに順次出
力する。
As a result, in the present embodiment, the mo
Since the ve distance is shorter, the reverse route is adopted, and the figure data is sequentially output to the plotter according to the drawing order when the move distance is integrated.

【0049】以上のように、本実施例ではペンカーソル
の仮の通過点としてdraw端点の中点の座標を用いること
で最短経路の演算が速く、従って、図形の描画順序が速
く求まる。また、図形の代表座標値で仮の通過点を設定
するので、最短経路の演算規模は小さく抑えられる。
As described above, in the present embodiment, the coordinates of the midpoint of the draw end point are used as the temporary passing point of the pen cursor, whereby the shortest path is calculated quickly, and therefore the drawing order of the figures can be obtained quickly. Further, since the temporary passing point is set by the representative coordinate values of the figure, the calculation scale of the shortest route can be suppressed to a small value.

【0050】なお、本実施例ではCAD 装置について説明
したが、熔接, 熔段加工ヘッド又は加工テーブル(ポジ
ショナ)をコンピュータ移動させるレーザ加工機等の描
画手段の移動コストが比較的高い図形描画装置であって
もよい。
Although the CAD device has been described in the present embodiment, a graphic drawing device in which the moving cost of the drawing means such as a laser processing machine for moving the welding / melting stage processing head or the processing table (positioner) to the computer is relatively high. It may be.

【0051】また、本実施例では、全図形を対象として
一度に最短経路を求める場合について説明したが、膨大
な図形量の場合は、全体を複数のブロックに分割して各
ブロック毎に最短経路を求めてもよい。その際、ホーム
ポジションは第1番目のブロックと最後のブロックにお
いてのみ考慮すればよく、他のブロックにおいてホーム
ポジションを考慮する必要はない。
Further, in the present embodiment, the case where the shortest path is obtained at once for all the figures has been described. However, in the case of a huge amount of figures, the whole is divided into a plurality of blocks and the shortest path is set for each block. May be asked. At this time, the home position only needs to be considered in the first block and the last block, and it is not necessary to consider the home position in other blocks.

【0052】[0052]

【発明の効果】以上のように、本発明に係る図形描画装
置は、図形の描画位置関係を考慮した描画順序で図形を
描画するので、ペンカーソル,加工ヘッド等の描画手段
の移動距離が略最短となり描画手段の摩耗も少なくて装
置の寿命が延び、装置の運転コスト及び描画コストが大
幅に低減されるという優れた効果を奏する。
As described above, since the figure drawing apparatus according to the present invention draws the figures in the drawing order in consideration of the drawing positional relationship of the figures, the movement distance of the drawing means such as the pen cursor and the machining head is substantially the same. This is the shortest, the wear of the drawing means is small, the life of the apparatus is extended, and the operation cost of the apparatus and the drawing cost are significantly reduced, which is an excellent effect.

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

【図1】本発明に係るCAD 装置のブロック図である。FIG. 1 is a block diagram of a CAD device according to the present invention.

【図2】本発明に係るCAD 装置の図形描画手順を示すフ
ローチャートである。
FIG. 2 is a flowchart showing a graphic drawing procedure of the CAD device according to the present invention.

【図3】最短経路を求める原理を説明する図である。FIG. 3 is a diagram illustrating a principle of obtaining a shortest path.

【図4】図形の描画位置関係を示す図である。FIG. 4 is a diagram showing a drawing positional relationship between figures.

【図5】図形データファイルのデータ格納状態の概念図
である。
FIG. 5 is a conceptual diagram of a data storage state of a graphic data file.

【符号の説明】[Explanation of symbols]

1 CAD 2 プロッタ 11 図形データファイル 12 演算処理部 13 順次データ出力部 121 通過点算出手段 122 描画順序決定手段 1 CAD 2 Plotter 11 Graphic Data File 12 Arithmetic Processing Unit 13 Sequential Data Output Unit 121 Passing Point Calculation Means 122 Drawing Order Determining Means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 図形を描画すべく移動される描画手段
を、所定の描画順序に従って移動させて複数の図形を各
図形の描画上の属性データに基づき描画する装置におい
て、前記属性データを基に、各図形の描画位置を代表す
る代表座標を求める手段と、各代表座標を各1回通過す
る経路のうち、最短距離の経路を求める手段と、該手段
が求めた経路に従って図形間の非描画期間での前記描画
手段の移動距離を算出して該移動距離が最短となる描画
順序を決定する手段とを備えたことを特徴とする図形描
画装置。
1. An apparatus for drawing a plurality of figures based on attribute data on drawing of each figure by moving a drawing means moved to draw a figure in a predetermined drawing order, based on the attribute data. , A means for obtaining a representative coordinate representing the drawing position of each figure, a means for obtaining the shortest path among the paths each passing through each representative coordinate once, and non-drawing between figures according to the path obtained by the means A graphic drawing apparatus, comprising: means for calculating a moving distance of the drawing means during a period and determining a drawing order in which the moving distance becomes shortest.
JP4084910A 1992-03-06 1992-03-06 Figure drawing apparatus Pending JPH05246193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4084910A JPH05246193A (en) 1992-03-06 1992-03-06 Figure drawing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4084910A JPH05246193A (en) 1992-03-06 1992-03-06 Figure drawing apparatus

Publications (1)

Publication Number Publication Date
JPH05246193A true JPH05246193A (en) 1993-09-24

Family

ID=13843890

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4084910A Pending JPH05246193A (en) 1992-03-06 1992-03-06 Figure drawing apparatus

Country Status (1)

Country Link
JP (1) JPH05246193A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07175504A (en) * 1993-12-20 1995-07-14 Atr Ningen Joho Tsushin Kenkyusho:Kk Device and method for search for optimum vehicle allocation and distribution order in distribution problem
WO2008084678A1 (en) * 2006-12-26 2008-07-17 Sharp Kabushiki Kaisha Ink ejector
JP2012066350A (en) * 2010-09-24 2012-04-05 Ihi Marine United Inc Moving route optimizing method for marker
WO2023209983A1 (en) * 2022-04-28 2023-11-02 日本電気株式会社 Parameter generation device, system, method and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07175504A (en) * 1993-12-20 1995-07-14 Atr Ningen Joho Tsushin Kenkyusho:Kk Device and method for search for optimum vehicle allocation and distribution order in distribution problem
WO2008084678A1 (en) * 2006-12-26 2008-07-17 Sharp Kabushiki Kaisha Ink ejector
JP2012066350A (en) * 2010-09-24 2012-04-05 Ihi Marine United Inc Moving route optimizing method for marker
WO2023209983A1 (en) * 2022-04-28 2023-11-02 日本電気株式会社 Parameter generation device, system, method and program

Similar Documents

Publication Publication Date Title
CN106525047B (en) A kind of unmanned plane paths planning method based on floyd algorithm
CN105068427B (en) A kind of multi-robot system finite time robust cooperates with tracking and controlling method
Kasahara et al. Practical multiprocessor scheduling algorithms for efficient parallel processing
CN112612273B (en) Routing inspection robot obstacle avoidance path planning method, system, equipment and medium
US20030223373A1 (en) Dual Dijkstra search for planning multipe paths
JPH0273458A (en) Table calculation processor
CN107291533A (en) Determine method, the device of upstream node bottleneck degree and system bottleneck degree
Sigurdson et al. Automatic algorithm selection in multi-agent pathfinding
WO2016136209A1 (en) Offline teaching device
JPH05246193A (en) Figure drawing apparatus
CN112950744B (en) Visual drag drawing flow chart method, device, equipment and storage medium
JPS63200208A (en) Method for searching moving route
CN110986981B (en) Path obstacle adding method for multi-robot path planning
CN115847431B (en) Method and device for setting waypoints of mechanical arm, electronic equipment and storage medium
WO2018120166A1 (en) Stacking method and device, and robot
CN113486624B (en) Method and device for realizing automatic equidistant PCB wiring and electronic equipment
WO2023167168A1 (en) Computation processing device
CN115618169A (en) Track point fitting method and device, electronic equipment and readable storage medium
CN111912407B (en) Path planning method of multi-robot system
JP2752762B2 (en) Node matching processing method
JPH11328259A (en) Modeling method by petri net
JPS6326705A (en) Device for producing nc command information
CN117697720A (en) Robot walking control method, device, system and storage medium
JPH02120918A (en) Method for linearizing nonlinear input
CN116185001A (en) Method, device, computer equipment and storage medium for controlling shift speed