JP3145724B2 - Graphic data converter - Google Patents

Graphic data converter

Info

Publication number
JP3145724B2
JP3145724B2 JP07851091A JP7851091A JP3145724B2 JP 3145724 B2 JP3145724 B2 JP 3145724B2 JP 07851091 A JP07851091 A JP 07851091A JP 7851091 A JP7851091 A JP 7851091A JP 3145724 B2 JP3145724 B2 JP 3145724B2
Authority
JP
Japan
Prior art keywords
line segment
storage area
data
tracing
intersection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP07851091A
Other languages
Japanese (ja)
Other versions
JPH04289977A (en
Inventor
俊英 大場
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP07851091A priority Critical patent/JP3145724B2/en
Publication of JPH04289977A publication Critical patent/JPH04289977A/en
Application granted granted Critical
Publication of JP3145724B2 publication Critical patent/JP3145724B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は図形データ変換装置、特
に、コンピュータを用いた印刷製版処理に利用できる図
形データ変換装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic data conversion apparatus, and more particularly to a graphic data conversion apparatus which can be used for a printing process using a computer.

【0002】[0002]

【従来の技術】近年、印刷製版工程にもコンピュータが
盛んに取り入れられるようになってきており、コンピュ
ータによる様々な画像処理技術が開発されてきている。
特に、幾何学図形を組み合わせた絵柄の作成は、コンピ
ュータを用いることにより非常に簡単な作業で行うこと
ができる。一般に、幾何学図形を組み合わせた絵柄を、
ディスプレイなどに表示する場合には、幾何学図形をそ
のまま重ねて表示しても問題はない。ところが、このよ
うな絵柄に基づいて印刷製版を行う場合、もとの幾何学
図形の図形データをそのまま取り扱うことはできない。
これは、印刷を行う場合、幾何学図形そのものを1つの
単位として取り扱うのではなく、絵柄を構成する各閉領
域を1つの単位として取り扱う必要があるためである。
たとえば、2つの円が部分的に重なったような絵柄を考
える。この絵柄をディスプレイに表示するのであれば、
円を2つ重ねて表示すればよい。すなわち、円という幾
何学図形のまま取り扱うことができる。ところが、この
絵柄を印刷する場合、第1の円だけで構成される閉領
域、第2の円だけで構成される閉領域、そして両方の円
が重なった部分の閉領域、という3つの閉領域として取
り扱う必要がある。そこで、複数の幾何学図形の図形デ
ータを、複数の閉領域を構成する最小構成図形の図形デ
ータに変換する必要がある。
2. Description of the Related Art In recent years, computers have been actively used in the printing and plate making processes, and various image processing techniques using computers have been developed.
In particular, the creation of a picture combining geometric figures can be performed with a very simple operation by using a computer. Generally, a pattern that combines geometric figures
In the case of displaying on a display or the like, there is no problem even if the geometric figures are displayed as they are. However, when performing printing plate making based on such a pattern, the graphic data of the original geometric figure cannot be handled as it is.
This is because, when printing, it is necessary to treat each closed region constituting a picture as one unit, instead of treating the geometric figure itself as one unit.
For example, consider a pattern in which two circles partially overlap. If you want to display this pattern on the display,
What is necessary is just to display two circles overlapping. That is, it can be handled as a geometric figure called a circle. However, when this picture is printed, there are three closed areas: a closed area consisting only of the first circle, a closed area consisting only of the second circle, and a closed area where both circles overlap. Must be treated as Therefore, it is necessary to convert graphic data of a plurality of geometric figures into graphic data of a minimum constituent figure constituting a plurality of closed regions.

【0003】[0003]

【発明が解決しようとする課題】従来知られている図形
データ変換装置は、上述した図形データの変換を行う機
能をもったものである。しかしながら、従来装置では、
変換処理が完全には自動化されていないため、変換作業
が煩わしく、時間がかかるという問題がある。すなわ
ち、オペレータがディスプレイ画面に表示された図形パ
ターンを見ながら、マウスなどを用いて各閉領域内の1
点を指示し、この指示された1点を含む閉領域を最小構
成図形として認識するという処理がなされる。したがっ
て、オペレータが手作業で指示を与える必要があり、操
作が非常に煩わしくなる。また、指示された1点を含む
閉領域を認識するために、いわゆる「塗り潰しのアルゴ
リズム」を利用しているため、認識処理にかなりの時間
が必要になる。
A conventionally known graphic data conversion apparatus has a function of performing the above-described graphic data conversion. However, in the conventional device,
Since the conversion process is not completely automated, there is a problem that the conversion operation is troublesome and takes time. That is, the operator looks at the graphic pattern displayed on the display screen and uses a mouse or the like to move one of the closed regions into one.
A point is designated, and a process of recognizing a closed area including the designated point as a minimum constituent figure is performed. Therefore, it is necessary for the operator to manually give an instruction, and the operation becomes very troublesome. Further, since a so-called “painting algorithm” is used to recognize a closed area including the designated one point, a considerable time is required for the recognition processing.

【0004】そこで本発明は、短い演算時間で、図形デ
ータの変換処理を自動的に行うことのできる図形データ
変換装置を提供することを目的とする。
Accordingly, an object of the present invention is to provide a graphic data conversion apparatus capable of automatically performing graphic data conversion processing in a short operation time.

【0005】[0005]

【課題を解決するための手段】(1) 本願第1の発明
は、閉領域を構成する2つの幾何学図形の図形データ
を、この2つの幾何学図形を部分的に重ねることによっ
て新たに生じる複数の閉領域を構成する最小構成図形の
図形データに変換する図形データ変換装置において、変
換前の図形データを保存するための第1の記憶領域と、
変換後の図形データを保存するための第2の記憶領域
と、テーブルを構成するデータを保存するための第3の
記憶領域と、を有する記憶手段と、第1の記憶領域内の
データに基づいて、2つの幾何学図形の交点を認識し、
認識した交点に交点IDを定義する交点認識手段と、第
1の記憶領域内のデータに基づいて、認識された交点を
両端点とする線分を認識し、認識した線分に、この線分
が所属する幾何学図形を特定するための情報を含んだ線
分IDを定義する線分認識手段と、第1の記憶領域内の
データに基づいて、認識した線分が、この線分が所属す
る幾何学図形ではないもう一方の幾何学図形の内側に存
在するか外側に存在するかを判断し、この線分に「内
側」または「外側」の属性を与える内外判断手段と、認
識したすべての線分について、その線分ID、その線分
の両端点に対応する交点ID、および、その線分に与え
られた属性、をテーブルとして第3の記憶領域に書き込
むテーブル作成手段と、作成したテーブルに基づいて、
属性が「内側」であり、かつ、トレースが一度も行われ
たことがない線分のみを、所属する幾何学図形が交互に
変わるようにトレースして閉領域を形成し、このトレー
スした線分からなる図形の図形データを変換後の図形デ
ータとして第2の記憶領域に書き込む内側トレース手段
と、作成したテーブルに基づいて、属性が交互に変わる
ように、かつ、所属する幾何学図形が交互に変わるよう
に、トレースの回数が満了していない線分をトレースし
て閉領域を形成し、このトレースした線分からなる図形
の図形データを変換後の図形データとして第2の記憶領
域に書き込む外側トレース手段と、各線分について、ト
レースが行われた回数を計数し、属性が「内側」である
線分については2回のトレースにより、属性が「外側」
である線分については1回のトレースにより、それぞれ
当該線分についてのトレースの回数が満了したことを指
示するトレース回数計数手段と、を設けたものである。
Means for Solving the Problems (1) The first invention of the present application newly generates graphic data of two geometric figures constituting a closed area by partially overlapping these two geometric figures. In a graphic data conversion device for converting graphic data of a minimum configuration graphic constituting a plurality of closed areas, a first storage area for storing graphic data before conversion,
A storage unit having a second storage area for storing the converted graphic data, a third storage area for storing data making up the table, and a storage unit based on the data in the first storage area. To recognize the intersection of two geometric figures,
An intersection recognition means for defining an intersection ID for the recognized intersection; and a line segment having both ends as the recognized intersection based on the data in the first storage area. And a line segment recognizing unit that defines a line segment ID including information for specifying a geometrical figure to which the line segment belongs, and a line segment recognized based on data in the first storage area. An internal / external determining means for determining whether the geometrical figure exists inside or outside the other geometrical figure that is not the geometrical figure to be given, and assigning the attribute “inside” or “outside” to this line segment, Table creation means for writing the line segment ID, intersection IDs corresponding to both end points of the line segment, and attributes given to the line segment as a table in the third storage area. Based on the table,
Only the line segment whose attribute is "inside" and the tracing has never been performed is traced so that the geometric figures to which it belongs belong alternately to form a closed area, and from this traced line segment The inner tracing means for writing the graphic data of the graphic as the converted graphic data in the second storage area, and based on the created table, the attributes are alternately changed, and the geometrical figures to which the figure belongs are alternately changed. In this manner, a closed area is formed by tracing a line segment for which the number of times of tracing has not expired, and writing the graphic data of a graphic composed of the traced line segment as converted graphic data in the second storage area. For each line segment, the number of times of tracing is counted, and for the line segment whose attribute is “inside”, the attribute is “outside” by two traces.
And a trace number counting means for indicating that the number of times of tracing for the line segment has expired by one tracing.

【0006】(2) 本願第2の発明は、閉領域を構成す
る複数の幾何学図形の図形データを、この複数の幾何学
図形を部分的に重ねることによって新たに生じる複数の
閉領域を構成する最小構成図形の図形データに変換する
図形データ変換装置において、変換前の図形データを保
存するための第1の記憶領域と、変換後の図形データを
保存するための第2の記憶領域と、テーブルを構成する
データを保存するための第3の記憶領域と、を有する記
憶手段と、第1の記憶領域または第2の記憶領域から、
所定の2つの図形データを対象図形のデータとして抽出
する対象図形抽出手段と、抽出したデータに基づいて、
2つの対象図形の交点を認識し、認識した交点に交点I
Dを定義する交点認識手段と、抽出したデータに基づい
て、認識された交点を両端点とする線分を認識し、認識
した線分に、この線分が所属する幾何学図形を特定する
ための情報を含んだ線分IDを定義する線分認識手段
と、抽出したデータに基づいて、認識した線分が、この
線分が所属する対象図形ではないもう一方の対象図形の
内側に存在するか外側に存在するかを判断し、この線分
に「内側」または「外側」の属性を与える内外判断手段
と、認識したすべての線分について、その線分ID、そ
の線分の両端点に対応する交点ID、および、その線分
に与えられた属性、をテーブルとして第3の記憶領域に
書き込むテーブル作成手段と、作成したテーブルに基づ
いて、属性が「内側」であり、かつ、トレースが一度も
行われたことがない線分のみを、所属する幾何学図形が
交互に変わるようにトレースして閉領域を形成し、この
トレースした線分からなる図形の図形データを変換後の
図形データとして第2の記憶領域に書き込む内側トレー
ス手段と、作成したテーブルに基づいて、属性が交互に
変わるように、かつ、所属する対象図形が交互に変わる
ように、トレースの回数が満了していない線分をトレー
スして閉領域を形成し、このトレースした線分からなる
図形の図形データを変換後の図形データとして第2の記
憶領域に書き込む外側トレース手段と、各線分につい
て、トレースが行われた回数を計数し、属性が「内側」
である線分については2回のトレースにより、属性が
「外側」である線分については1回のトレースにより、
それぞれ当該線分についてのトレースの回数が満了した
ことを指示するトレース回数計数手段と、を設け、対象
図形抽出手段による抽出作業およびこの抽出された図形
に対する処理を、第2の記憶領域に所望の図形データが
得られるまで繰り返して行うことができるようにしたも
のである。
(2) The second invention of the present application is a method for constructing a plurality of closed areas newly generated by partially overlapping the plurality of geometric figures constituting the closed area with the plurality of geometric figures. A first storage area for storing graphic data before conversion, a second storage area for storing graphic data after conversion, A storage unit having a third storage area for storing data constituting the table; and a first storage area or a second storage area.
A target graphic extracting unit for extracting predetermined two graphic data as data of the target graphic, and based on the extracted data,
Recognize the intersection of two target figures, and add the intersection I to the recognized intersection.
An intersection recognizing means for defining D and a line segment having both ends as the recognized intersection based on the extracted data, and specifying the geometrical figure to which the line segment belongs to the recognized line segment. And a line segment recognition unit that defines a line segment ID including the information of the line segment, and based on the extracted data, the recognized line segment exists inside the other target graphic that is not the target graphic to which the line segment belongs. Inside / outside determining means for giving an attribute of “inside” or “outside” to this line segment, and, for all recognized line segments, the line segment ID and the end points of the line segment. A table creating means for writing the corresponding intersection ID and the attribute given to the line segment as a table in the third storage area; and based on the created table, the attribute is “inside” and the trace is Never been done The inner trace is formed by tracing only the minute portion so that the geometric figures to which it belongs belong alternately to form a closed area, and writing the figure data of the figure consisting of the traced line segments into the second storage area as the converted figure data. On the basis of the means and the created table, a closed area is formed by tracing a line segment whose number of times of tracing has not expired so that the attribute is alternately changed and the belonging graphic is alternately changed. Outer tracing means for writing the graphic data of the graphic consisting of the traced line segments into the second storage area as converted graphic data, counting the number of times of tracing for each line segment, and setting the attribute to "inside"
Is obtained by tracing twice, and the line segment having the attribute “outside” is obtained by one tracing.
Trace number counting means for indicating that the number of traces for the line segment has expired is provided, and the extraction work by the target figure extraction means and the processing on the extracted figures are stored in the second storage area as desired. This can be repeated until graphic data is obtained.

【0007】[0007]

【作 用】(1) 本願第1の発明による図形データ変換
装置では、互いに重なり合った2つの幾何学図形につい
て、交点が認識され、2つの交点を端点とする線分が認
識され、この線分が他方の幾何学図形の「内側」にある
か「外側」にあるかを示す属性が認識され、これらに基
づいてテーブルが作成される。そして、すべての辺が
「内側」の属性をもつ線分から構成された最小構成図形
と、「外側」の属性をもつ線分が辺の一部となっている
最小構成図形と、が別個の手順によってトレースされ
る。しかも、「内側」の属性をもつ線分は2回のトレー
スが、「外側」の属性をもつ線分は1回のトレースが、
それぞれ行われるように、トレースの回数が計数される
ので、すべてのトレースが完了した時点で、すべての最
小構成図形が得られる。
[Operation] (1) In the graphic data conversion device according to the first invention of the present application, for two geometric figures overlapping each other, an intersection is recognized, and a line segment having the two intersections as end points is recognized. Are recognized as "inside" or "outside" of the other geometric figure, and a table is created based on these. Then, the minimum configuration graphic in which all sides are composed of line segments having the attribute “inside” and the minimum configuration graphic in which the line segment having the attribute “outside” is part of the side are separate procedures. Traced by Moreover, a line segment having the attribute “inside” has two traces, a line segment having the attribute “outside” has one trace,
Since the number of times of tracing is counted as in each case, when all the tracings are completed, all the minimum constituent figures are obtained.

【0008】(2) 本願第2の発明による図形データ変
換装置は、前述の第1の発明による装置を複数の幾何学
図形にも適応できるようにしたものである。前述の第1
の発明による装置では、2つの幾何学図形についてのデ
ータ変換が可能である。そこで、複数の幾何学図形の中
から2つずつ抽出してはデータ変換を行うという作業を
繰り返し行うようにすれば、複数の幾何学図形について
のデータ変換が可能になる。
(2) A graphic data conversion apparatus according to the second invention of the present application is such that the apparatus according to the first invention can be adapted to a plurality of geometric figures. The above-mentioned first
In the apparatus according to the invention of the present invention, data conversion for two geometric figures is possible. Therefore, if the operation of extracting data two by two from a plurality of geometric figures and performing data conversion is repeatedly performed, data conversion of a plurality of geometric figures becomes possible.

【0009】[0009]

【実施例】以下、本発明を図示する実施例に基づいて詳
述する。図1は本発明に係る図形データ変換装置の基本
構成を示すブロック図である。この装置は、記憶手段1
0、対象図形抽出手段20、交点認識手段30、線分認
識手段40、内外判断手段50、テーブル作成手段6
0、内側トレース手段70、外側トレース手段80、ト
レース回数計数手段90、の各構成要素よりなる。実際
には、これらの各構成要素はコンピュータによって実現
できる。すなわち、記憶手段10は用いるコンピュータ
のメモリや外部記憶装置によって構成され、他の各構成
要素は所定のソフトウエアで動作するプロセッサによっ
て構成されることになる。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. FIG. 1 is a block diagram showing a basic configuration of a graphic data conversion device according to the present invention. This device includes a storage unit 1
0, target figure extracting means 20, intersection recognizing means 30, line segment recognizing means 40, inside / outside judging means 50, table creating means 6
0, inner tracing means 70, outer tracing means 80, and tracing number counting means 90. In practice, each of these components can be realized by a computer. That is, the storage means 10 is configured by a memory of a computer to be used or an external storage device, and each of the other components is configured by a processor operated by predetermined software.

【0010】記憶手段10は、変換前の図形データを保
存するための第1の記憶領域11、変換後の図形データ
を保存するための第2の記憶領域12、テーブルを構成
するデータを保存するための第3の記憶領域13、を有
する。対象図形抽出手段20は、第1の記憶領域11ま
たは第2の記憶領域12に保存されている図形の中か
ら、所定の2つの図形を対象図形として抽出する。交点
認識手段30はこの2つの対象図形についての交点を認
識し、線分認識手段40はこの2つの対象図形を構成す
る線分を認識し、内外判断手段50は認識した線分につ
いて「内側」あるいは「外側」の属性を与える機能を有
する。テーブル作成手段60は、認識された交点、線
分、属性に基づいて、テーブルを作成し、これを第3の
記憶領域13に保存する。内側トレース手段70および
外側トレース手段80は、このテーブルに基づいて線分
のトレース処理を行い、変換後の図形データを作成し、
これを第2の記憶領域12に保存する。線分のトレース
処理の回数は、トレース回数計数手段90によって計数
される。以上が、この装置による変換処理の概要であ
る。
[0010] The storage means 10 stores a first storage area 11 for storing graphic data before conversion, a second storage area 12 for storing graphic data after conversion, and data forming a table. And a third storage area 13. The target figure extracting means 20 extracts two predetermined figures as target figures from the figures stored in the first storage area 11 or the second storage area 12. The intersection recognizing means 30 recognizes the intersection of the two target graphics, the line segment recognizing means 40 recognizes the line segments constituting the two target graphics, and the inside / outside determining means 50 recognizes the "inside" of the recognized line segment. Alternatively, it has a function of giving an “outside” attribute. The table creating means 60 creates a table based on the recognized intersections, line segments, and attributes, and stores the table in the third storage area 13. The inner tracing means 70 and the outer tracing means 80 perform a line segment tracing process based on the table, create converted graphic data,
This is stored in the second storage area 12. The number of line segment tracing processes is counted by the tracing number counting unit 90. The above is the outline of the conversion processing by this device.

【0011】続いて、この装置による変換処理動作を、
具体例に即して説明する。ここでは、まず、2つの幾何
学図形についての変換処理を説明する。いま、図2に示
すような、図形Aおよび図形Bについてのデータが、第
1の記憶領域11内に保存されているものとする。これ
らの図形データは、どのような形式で用意されていても
よいが、通常、図形Aのような矩形については4頂点の
座標値が、図形Bのような円については中心点座標値と
半径値が、それぞれ図形データとして用意される。ここ
では、この2つの図形を図3に示すように重ね合わせて
絵柄を作成し、これを印刷に用いる場合を考える。図3
に示すように、図形Aと図形Bとを重ね合わせると、3
つの閉領域x,y,zが新たに生じることになる。した
がって、この絵柄の最小構成図形は、図4に示すよう
に、3つの図形X,Y,Zとなる。図2に示す2つの図
形Aおよび図形Bを変換して、図4に示す3つの図形
X,Y,Zを求めるのが、この装置による変換作業の目
的である。別言すれば、図1のブロック図において、第
1の記憶領域11内に用意された図形Aおよび図形Bの
データに基づいて、図形X,Y,Zのデータを演算し、
これを第2の記憶領域12に書き込む処理が行われるこ
とになる。以下、この変換処理の手順を詳述する。
Subsequently, the conversion processing operation by this device is as follows:
A description will be given according to a specific example. Here, the conversion process for two geometric figures will be described first. Now, it is assumed that data on the graphic A and the graphic B as shown in FIG. 2 are stored in the first storage area 11. These graphic data may be prepared in any format. Usually, the coordinate values of four vertices for a rectangle such as the graphic A, and the coordinate values of the center point and the radius for the circle such as the graphic B are used. The values are prepared as graphic data. Here, a case is considered in which a picture is created by superimposing the two figures as shown in FIG. 3 and is used for printing. FIG.
As shown in FIG.
Two closed regions x, y, and z are newly generated. Therefore, as shown in FIG. 4, the minimum constituent figures of the picture are three figures X, Y, and Z. The purpose of this apparatus is to convert the two figures A and B shown in FIG. 2 to obtain three figures X, Y and Z shown in FIG. In other words, in the block diagram of FIG. 1, data of graphics X, Y, and Z are calculated based on graphics A and graphics B prepared in the first storage area 11,
The process of writing this in the second storage area 12 is performed. Hereinafter, the procedure of the conversion process will be described in detail.

【0012】まず、対象図形抽出手段20によって、図
形Aおよび図形Bが対象図形として抽出される。ここに
述べる例は、図形Aおよび図形Bの2つの図形からなる
絵柄についての処理であるが、後述するように、3以上
の複数の図形からなる絵柄についての処理を行う場合に
は、対象図形抽出手段20によって所定の2つの図形が
選択されることになる。
First, the figure A and the figure B are extracted as the target figure by the target figure extracting means 20. The example described here is a process for a pattern composed of two figures, that is, a figure A and a figure B. However, as will be described later, when processing a pattern composed of three or more figures, Two predetermined figures are selected by the extracting means 20.

【0013】続いて、交点認識手段30において、図形
Aおよび図形Bを部分的に重ねることにより生じる交点
が認識される。この例では、図5に示すように、2つの
交点PおよびQが認識されることになる。この交点の認
識は、一般的な幾何学演算によって行うことができるの
で、ここでは具体的な演算方法の説明は省略する。認識
された交点には、交点IDが定義される。この交点ID
は、交点同士を識別することができるユニークなコード
であれば、どのようなものを用いてもかまわない。この
例では、交点「P」および交点「Q」なる名称をそのま
ま交点IDとして用いることにする。
Subsequently, the intersection recognizing means 30 recognizes an intersection generated by partially overlapping the figure A and the figure B. In this example, as shown in FIG. 5, two intersections P and Q are recognized. Since the recognition of the intersection can be performed by a general geometric operation, a description of a specific operation method is omitted here. An intersection ID is defined for the recognized intersection. This intersection ID
May be any unique code that can identify the intersections. In this example, the names of the intersection “P” and the intersection “Q” are used as the intersection ID as they are.

【0014】交点が認識されたら、線分認識手段40に
おいて、認識された交点を両端点とする線分の認識が行
われる。この例の場合、図5に示すように、交点Pおよ
び交点Qを両端点とする線分として、線分a1,a2,
b1,b2の4つが認識されることになる。図では、各
線分が区別しうるように異なった線種(実線、破線、一
点鎖線、二点鎖線)を用いてこれらを示してある。な
お、このとき、認識した各線分がどの図形に所属する線
分であるかという事項がわかるようにしておく。たとえ
ば、線分a1,a2は図形Aに所属する線分であり、線
分b1,b2は図形Bに所属する線分である。このよう
な線分の認識方法も公知であるため、ここでは具体的な
演算方法の説明は省略する。
When the intersection is recognized, the line segment recognition means 40 recognizes a line segment having the recognized intersection as both end points. In the case of this example, as shown in FIG. 5, the line segments a1, a2,
Four of b1 and b2 are recognized. In the drawing, different line types (solid line, dashed line, dashed-dotted line, two-dot dashed line) are shown so as to be distinguishable from each other. At this time, it is necessary to understand the matter to which graphic each recognized line segment belongs. For example, the line segments a1 and a2 are line segments belonging to the figure A, and the line segments b1 and b2 are line segments belonging to the figure B. Since a method for recognizing such a line segment is also known, a description of a specific calculation method is omitted here.

【0015】次に、内外判断手段50において、認識さ
れた各線分に対して属性が与えられる。すなわち、その
線分が、自らが所属する図形ではないもう一方の図形の
内側に存在するか外側に存在するかを示す属性が与えら
れる。たとえば、線分a1については、図形Bの外側に
存在するので「外側」なる属性が与えられ、線分a2に
ついては、図形Bの内側に存在するので「内側」なる属
性が与えられる。また、線分b1については、図形Aの
外側に存在するので「外側」なる属性が与えられ、線分
b2については、図形Aの内側に存在するので「内側」
なる属性が与えられる。「内側」か「外側」かの判断
は、たとえば、次のような方法で行えばよい。すなわ
ち、判断対象となる線分上に任意の1点をとり、この1
点から任意の方向に半直線を引く。そして、この半直線
が他方の図形と交差する回数が偶数(0も含む)であれ
ば「外側」、奇数であれば「内側」と判断できる。
Next, in the inside / outside judgment means 50, an attribute is given to each recognized line segment. That is, an attribute indicating whether the line segment exists inside or outside the other figure that is not the figure to which the line segment belongs is given. For example, since the line segment a1 exists outside the figure B, the attribute "outside" is given, and the line segment a2 has the attribute "inside" because it exists inside the figure B. Further, the line segment b1 is provided outside the graphic A and therefore has the attribute “outside”, and the line segment b2 is provided inside the graphic A and thus “inside”.
Attribute is given. The determination of “inside” or “outside” may be made, for example, by the following method. That is, an arbitrary point is taken on the line segment to be determined,
Draw a ray from the point in any direction. If the number of times this half line intersects with the other figure is an even number (including 0), it can be determined as “outside”, and if it is an odd number, it can be determined as “inside”.

【0016】続いて、テーブル作成手段60によってテ
ーブルが作成され、第3の記憶領域13に書き込まれ
る。このテーブルは、前述の各段階で求められた線分I
D、その線分の両端点に対応する交点ID、その線分に
与えられた属性、を表の形式で並べたものである。図5
に示す例では、図6に示すようなテーブルが得られる。
Subsequently, a table is created by the table creating means 60 and written into the third storage area 13. This table stores the line segment I obtained in each of the aforementioned steps.
D, intersection IDs corresponding to both end points of the line segment, and attributes given to the line segment are arranged in a table format. FIG.
In the example shown in FIG. 6, a table as shown in FIG. 6 is obtained.

【0017】このようなテーブルが得られたら、このテ
ーブルに基づいてトレースが行われる。ここで「トレー
ス」とは、複数の線分を順に辿ってゆき、1つの閉領域
を囲む図形を形成する作業である。たとえば、図5にお
いて、点Pを起点として点Qへと線分b2を辿り、更
に、点Qから点Pへと線分a1を辿って戻れば、図4に
示す図形Xが形成できる。同様に、点Pを起点として点
Qへと線分b2を辿り、更に、点Qから点Pへと線分a
2を辿って戻れば、図4に示す図形Yが形成でき、点P
を起点として点Qへと線分a2を辿り、更に、点Qから
点Pへと線分b1を辿って戻れば、図4に示す図形Zが
形成できる。結局、図5に示す例では、3つのルートに
よるトレースを行えば、図4に示す3つの図形のすべて
が形成できることになる。ここで、この3つのルートに
よるトレースにおいて、各線分がトレースされた合計回
数を調べて見ると、線分a1,b1は1回、線分a2,
b2は2回である。これは各線分に与えられた属性と関
係がある。すなわち、属性「外側」が与えられた線分に
ついては1回、「内側」が与えられた線分については2
回のトレースが行われていることになる。別言すれば、
属性「外側」が与えられた線分を1回、「内側」が与え
られた線分を2回、それぞれトレースすれば、全トレー
ス作業は完了したことになる。トレース回数計数手段9
0は、各線分ごとに行われたトレースの回数を計数し、
属性が「内側」である線分については2回のトレースに
より、属性が「外側」である線分については1回のトレ
ースにより、それぞれ当該線分についてのトレースの回
数が満了したことを指示する。実際のトレース作業は、
内側トレース手段70による作業と外側トレース手段8
0による作業との二段階で行われる。以下、これらの作
業を順に説明する。
When such a table is obtained, tracing is performed based on this table. Here, “trace” is an operation of sequentially tracing a plurality of line segments to form a figure surrounding one closed region. For example, in FIG. 5, by tracing the line segment b2 from the point P to the point Q and further tracing back the line segment a1 from the point Q to the point P, the figure X shown in FIG. 4 can be formed. Similarly, the line segment b2 is traced from the point P to the point Q, and further, the line segment a is moved from the point Q to the point P.
2 and return, the figure Y shown in FIG.
Tracing the line segment a2 from the point Q to the point Q, and further following the line segment b1 from the point Q to the point P, the figure Z shown in FIG. 4 can be formed. Eventually, in the example shown in FIG. 5, if tracing is performed along three routes, all three figures shown in FIG. 4 can be formed. Here, when the total number of times each of the line segments is traced in the trace by these three routes is examined, the line segments a1 and b1 are once and the line segments a2 and
b2 is two times. This is related to the attribute given to each line segment. That is, once for a line segment with the attribute “outside”, 2 for a line segment with “inside”.
This means that tracing has been performed a number of times. In other words,
If the line segment given the attribute “outside” is traced once and the line segment given “inside” is traced twice, the entire tracing work is completed. Trace count counting means 9
0 counts the number of traces performed for each line segment,
The line segment whose attribute is “inside” is indicated by two traces, and the line segment whose attribute is “outside” is indicated by one trace, indicating that the number of traces for the line segment has expired. . The actual tracing work is
Work by inner tracing means 70 and outer tracing means 8
The operation is performed in two stages, namely, the operation by 0. Hereinafter, these operations will be described in order.

【0018】内側トレース手段70の行うトレース作業
は、属性が「内側」である線分のみから構成される最小
構成図形を形成するためのものである。したがって、属
性が「内側」である線分のみを、所属する幾何学図形が
交互に変わるようにトレースして閉領域を形成すればよ
い。具体的には、作成されたテーブルに基づいて、次の
ような処理を行えばよい。すなわち、 属性が「内側」であり、かつ、トレースが一度も行わ
れたことがない任意の線分を第1の線分として選ぶ 次のような4条件を満たす線分を第iの線分として選
ぶ。すなわち、 条件1:属性が「内側」であること 条件2:トレースがまだ一度も行われたことがないこと 条件3:第(i−1)の線分が所属する図形とは異なる
図形に所属すること 条件4:第(i−1)の線分についての2つの交点ID
のうちの少なくとも一方と同じ交点IDをもつこと i=2からはじめて、iを1つずつ増やしながらの
処理を繰り返してゆく。ただし、第iの線分が第1の線
分についての交点IDと同じ交点IDをもっていたら、
そこで作業を完了する。
The tracing operation performed by the inner tracing means 70 is for forming a minimum constituent figure composed only of line segments whose attribute is "inside". Therefore, only the line segment whose attribute is “inside” may be traced such that the geometrical figures to which the attribute belongs alternately change to form a closed region. Specifically, the following processing may be performed based on the created table. That is, an arbitrary line segment whose attribute is “inside” and tracing has never been performed is selected as a first line segment. A line segment satisfying the following four conditions is an i-th line segment. Choose as. Condition 1: the attribute is “inside” Condition 2: trace has never been performed Condition 3: belonging to a figure different from the figure to which the (i−1) th line segment belongs Condition 4: Two intersection IDs for the (i-1) th line segment
Have the same intersection ID as at least one of the above. Starting from i = 2, the process is repeated while increasing i one by one. However, if the i-th line segment has the same intersection ID as the intersection ID for the first line segment,
Then the work is completed.

【0019】図5に示す例では、図6のテーブルに基づ
いて、たとえば次のようなトレース作業が行われる。ま
ず、線分a2が第1の線分として選ばれ、続いて線分b
2が第2の線分として選ばれ、そこでこのルートによる
トレース作業は完了する。このトレース作業により、図
4の図形Yが形成されることになる。内側トレース手段
70は、更に別なルートによるトレース作業を行おうと
試みるが、上述の条件を満たすトレースはもはや行うこ
とはできない。なぜなら、既に線分a2,b2は、1回
トレースが行われてしまっているため、「トレースが一
度も行われたことがない線分」という条件を満たさなく
なっており、この他に、属性「内側」の線分が存在しな
いからである。かくして、内側トレース手段70は、こ
の1つのルートによるトレースのみを行って、任務を完
了する。
In the example shown in FIG. 5, for example, the following tracing work is performed based on the table of FIG. First, the line segment a2 is selected as the first line segment, and then the line segment b
2 is selected as the second line segment, where the tracing work by this route is completed. By this tracing operation, the figure Y in FIG. 4 is formed. The inner tracing means 70 attempts to perform a tracing operation by another route, but the tracing satisfying the above conditions can no longer be performed. This is because the line segments a2 and b2 have already been traced once, and therefore do not satisfy the condition of “a line segment that has never been traced”. This is because there is no "inside" line segment. Thus, the inner tracing means 70 completes the mission by tracing only by this one route.

【0020】続いて行われる外側トレース手段80によ
るトレース作業は、「外側」の属性をもつ線分が辺の一
部となっている最小構成図形を形成するためのものであ
る。そのためには、属性が交互に変わるように、かつ、
所属する図形が交互に変わるように、トレースの回数が
満了していない線分を順にトレースしてゆけばよい。具
体的には、作成されたテーブルに基づいて、次のような
処理を行えばよい。すなわち、 トレース回数が満了していない任意の線分を第1の線
分として選ぶ。
The subsequent tracing operation by the outer tracing means 80 is for forming a minimum constituent figure in which a line segment having the attribute "outside" is a part of a side. To do this, make sure that the attributes alternate, and
It is only necessary to sequentially trace the line segments whose number of times of tracing has not expired so that the graphics to which they belong alternately. Specifically, the following processing may be performed based on the created table. That is, an arbitrary line segment whose trace count has not expired is selected as the first line segment.

【0021】次のような4条件を満たす線分を第iの
線分として選ぶ。すなわち、 条件1:トレース回数が満了していないこと 条件2:第(i−1)の線分とは異なる属性をもつこと 条件3:第(i−1)の線分が所属する図形とは異なる
図形に所属すること 条件4:第(i−1)の線分についての2つの交点ID
のうちの少なくとも一方と同じ交点IDをもつこと i=2からはじめて、iを1つずつ増やしながらの
処理を繰り返してゆく。ただし、第iの線分が第1の線
分についての交点IDと同じ交点IDをもっていたら、
そこで作業を完了する。
A line segment satisfying the following four conditions is selected as the i-th line segment. That is, condition 1: the number of traces has not expired condition 2: having an attribute different from that of the (i-1) th line segment condition 3: the figure to which the (i-1) th line segment belongs Belonging to different figures Condition 4: Two intersection IDs for the (i-1) th line segment
Have the same intersection ID as at least one of the above. Starting from i = 2, the process is repeated while increasing i one by one. However, if the i-th line segment has the same intersection ID as the intersection ID for the first line segment,
Then the work is completed.

【0022】図5に示す例では、図6のテーブルに基づ
いて、たとえば次のようなトレース作業が行われる。ま
ず、線分a1が第1の線分として選ばれ、続いて線分b
2(上述したように、内側トレース手段70のトレース
作業により、1回トレースが行われているが、属性が
「内側」なので、トレース回数は2回で満了する)が第
2の線分として選ばれ、そこでこのルートによるトレー
ス作業は完了する。このトレース作業により、図4の図
形Xが形成されることになる。外側トレース手段80
は、更に別なルートによるトレース作業を行おうと試み
る。たとえば、線分a2が第1の線分として選ばれ、続
いて線分b1が第2の線分として選ばれ、そこでこのル
ートによるトレース作業は完了する。このトレース作業
により、図4の図形Zが形成されることになる。外側ト
レース手段80は、更に別なルートによるトレース作業
を行おうと試みるが、上述の条件を満たすトレースはも
はや行うことはできない。なぜなら、この時点で既にす
べての線分がトレース回数を満了してしまっている。か
くして、外側トレース手段80は、2つのルートによる
トレースを行って、任務を完了する。
In the example shown in FIG. 5, for example, the following tracing work is performed based on the table of FIG. First, the line segment a1 is selected as the first line segment, and then the line segment b
2 (as described above, tracing is performed once by the tracing work of the inner tracing means 70, but the attribute is “inside”, so the number of times of tracing expires twice) is selected as the second line segment. The tracing work by this route is completed there. By this tracing operation, the figure X of FIG. 4 is formed. Outer tracing means 80
Attempts to perform a tracing operation by another route. For example, the line segment a2 is selected as the first line segment, and then the line segment b1 is selected as the second line segment, where the tracing operation by this route is completed. By this tracing operation, the figure Z of FIG. 4 is formed. The outer tracing means 80 attempts to perform a tracing operation by another route, but the tracing satisfying the above conditions can no longer be performed. Because, at this point, all the line segments have already completed the number of times of tracing. Thus, the outer tracing means 80 completes the mission by tracing by two routes.

【0023】こうして、内側トレース手段70による1
ルートのトレースにより図4の図形Yが、外側トレース
手段80による2ルートのトレースにより図4の図形
X,Zが、それぞれ形成され、これらの図形データが第
2の記憶領域12に書き込まれる。結局、第1の記憶領
域11に用意された図形A,Bのデータに基づいて、第
2の記憶領域12に図形X,Y,Zのデータが得られた
ことになる。
In this way, 1 by the inner tracing means 70
The figure Y in FIG. 4 is formed by the trace of the route, and the figures X and Z of FIG. 4 are formed by the trace of the two routes by the outer tracing means 80, and these figure data are written in the second storage area 12. As a result, the data of the figures X, Y, and Z are obtained in the second storage area 12 based on the data of the figures A and B prepared in the first storage area 11.

【0024】以上、部分的に重なり合った2つの図形に
ついての変換手順を説明したが、本発明の装置は3つ以
上の複数の図形が重なり合った場合でも変換可能であ
る。いま、たとえば、図7に示すように、3つの図形
C,D,Eが重なり合った絵柄を考える。この絵柄で
は、合計7つの閉領域が生成されるため、3つの図形デ
ータが、7つの図形データに変換されねばならない。こ
のような場合、2つの図形を対象図形として抽出し、上
述の変換動作を繰り返して行うようにすればよい。具体
的には、次のような処理を行う。まず、第1の記憶領域
11に、3つの図形C,D,Eの図形データを用意して
おく。対象図形抽出手段20は、このうちの2つ、たと
えば図形DおよびEを対象図形として抽出する。2つの
図形D,Eについての変換手順は前述したとおりであ
る。図8に示すように、図形Dと図形Eによって、閉領
域i,j,kが生成され、最小構成図形I,J,Kが第
2の記憶領域12に得られる。そこで、「3つの図形
C,D,Eについての最小構成図形を求める」という当
初の命題は、「4つの図形C,I,J,Kについての最
小構成図形を求める」という命題に置き換えることがで
きる。そこで、対象図形抽出手段20は、今度はたとえ
ば、第1の記憶領域11から図形Cを、第2の記憶領域
12から図形Iを、それぞれ抽出して対象図形とする。
そして、図9(a) に示すように、図形C,Iについての
最小構成図形を求める変換手順を前述のとおり行う。更
に、図9(b) に示すように、図形C,Jについての最小
構成図形を求め、図9(c) に示すように、図形C,Kに
ついての最小構成図形を求めれば、最終的に第2の記憶
領域12内には、3つの図形C,D,Eについての7つ
の最小構成図形が得られることになる。このように、常
に2つの対象図形を抽出してこれらの最小構成図形を求
めるという演算を繰り返し行うことにより、3つ以上の
図形についての変換処理を行うことができる。
Although the conversion procedure for two partially overlapping figures has been described above, the apparatus of the present invention can perform conversion even when three or more figures overlap. Now, for example, consider a pattern in which three figures C, D, and E overlap as shown in FIG. In this pattern, a total of seven closed areas are generated, so three graphic data must be converted into seven graphic data. In such a case, two graphics may be extracted as target graphics, and the above-described conversion operation may be repeatedly performed. Specifically, the following processing is performed. First, graphic data of three graphics C, D, and E are prepared in the first storage area 11. The target figure extracting means 20 extracts two of them, for example, figures D and E, as target figures. The conversion procedure for the two figures D and E is as described above. As shown in FIG. 8, the closed areas i, j, and k are generated by the figures D and E, and the minimum constituent figures I, J, and K are obtained in the second storage area 12. Therefore, the original proposition "Finding the smallest constituent figure for three figures C, D, and E" can be replaced with the proposition "Find the smallest constituent figure for four figures C, I, J, and K". it can. Therefore, the target graphic extracting means 20 extracts the graphic C from the first storage area 11 and the graphic I from the second storage area 12, respectively, as target graphics.
Then, as shown in FIG. 9 (a), the conversion procedure for finding the minimum constituent figure for figures C and I is performed as described above. Further, as shown in FIG. 9 (b), the minimum constituent figure for figures C and J is obtained, and as shown in FIG. 9 (c), the minimum constituent figure for figures C and K is obtained. In the second storage area 12, seven minimum constituent figures for three figures C, D, and E are obtained. As described above, by repeatedly performing the operation of always extracting two target graphics and obtaining the minimum constituent graphics, conversion processing of three or more graphics can be performed.

【0025】以上、本発明の装置の基本的な動作を説明
したが、あらゆる図形に対する適用を可能にするために
は、特別な例外処理を用意しておく必要がある。たとえ
ば、図10(a) に示すように、一方の図形Gの端点G1
が、他方の図形Fの一辺上に位置するような場合や、図
10(b) に示すように、一方の図形Hの辺h1(点H1
とH2とを端点とする辺)が、他方の図形Fの一辺に重
なるような場合は、上述した基本動作に対して例外処理
を施す必要がある。図10(a) 示すケースは、図10
(b) に示すケースにおいて端点H1とH2とが一致した
特殊なケースとして取り扱えばよいので、ここでは、図
10(b) に示すケースに対する例外処理を説明してお
く。このケースの場合、図11に示すように、4つの交
点H1,H2,H3,H4が認識され、図形Hに所属す
る線分として、4つの線分h1,h2,h3,h4が認
識され、図形Fに所属する線分として、4つの線分f
1,h1,f2,f3が認識される。ここで問題となる
のは、線分h1の取扱いである。線分h1は双方の図形
に所属することになる。この場合、線分h1に対しては
「内側」なる属性を与えるが、トレースの回数は1回で
満了するという例外的な取扱いを行う。こうすると、内
側トレース手段70によるトレースによって、線分h
1,h2,f3,h4なるルートのトレースが行われ、
図12に示すような閉領域g1が形成される。このと
き、線分h1のトレース回数は例外的に満了する。続く
外側トレース手段80によるトレースによって、線分f
1,h2なるルート、線分f3,h3なるルート、線分
f2,h4なるルート、のトレースがそれぞれ行われ、
図12に示すような閉領域g2,g3,g4が形成され
る。
Although the basic operation of the apparatus of the present invention has been described above, special exception processing needs to be prepared in order to enable application to any figure. For example, as shown in FIG.
Is located on one side of the other figure F, or as shown in FIG. 10B, the side h1 (point H1
In this case, a side having the end point of H2 and H2) overlaps one side of the other figure F, exception processing needs to be performed on the basic operation described above. The case shown in FIG.
In the case shown in FIG. 10B, the exceptional processing for the case shown in FIG. 10B will be described here because it can be handled as a special case where the end points H1 and H2 match. In this case, as shown in FIG. 11, four intersections H1, H2, H3, and H4 are recognized, and four line segments h1, h2, h3, and h4 are recognized as lines belonging to the graphic H. As a line segment belonging to the figure F, four line segments f
1, h1, f2, f3 are recognized. What matters here is how to handle the line segment h1. The line segment h1 belongs to both figures. In this case, the attribute "inside" is given to the line segment h1, but the exception is handled such that the number of times of tracing expires once. In this case, the line h
The route of 1, h2, f3, h4 is traced,
A closed area g1 as shown in FIG. 12 is formed. At this time, the number of traces of the line segment h1 is exceptionally expired. Following the trace by the outer trace means 80, the line segment f
Traces of a route 1, h2, a route f3, h3, and a route f2, h4 are performed, respectively.
The closed areas g2, g3, g4 as shown in FIG. 12 are formed.

【0026】なお、図13に示すように、L字型の図形
L1とL2とが重なっている場合、領域Mは周囲を図形
で囲まれていて、実質的には閉領域となっているが、本
装置による変換においては、最小構成図形とはならな
い。これは、線分m1およびm2の属性が「外側」とな
り、1回のトレースしか行われないためである。したが
って、最終的に得られる最小構成図形は、図にハッチン
グを施した閉領域の部分だけである。
As shown in FIG. 13, when the L-shaped figures L1 and L2 overlap each other, the area M is surrounded by a figure and is substantially a closed area. However, the conversion by the present apparatus does not become the minimum constituent figure. This is because the attributes of the line segments m1 and m2 are "outside" and only one trace is performed. Therefore, the finally obtained minimum configuration graphic is only the closed area portion hatched in the figure.

【0027】また、本発明の応用として、たとえば図1
4に示すような3つの図形V1,V2,V3に基づい
て、図15に示すような最大構成図形Wを求めることも
可能である。これは、常に属性が「外側」の線分を選
び、かつ、別な図形に所属する線分を選ぶようにしてト
レースを行えばよい。このような最大構成図形Wが求ま
れば、これよりひとまわり大きい図形やひとまわり小さ
い図形も容易に作成することができ、印刷製版を行う上
で利用価値が高い。
As an application of the present invention, for example, FIG.
It is also possible to obtain a maximum constituent figure W as shown in FIG. 15 based on three figures V1, V2 and V3 as shown in FIG. This can be done by always selecting a line segment whose attribute is "outside" and selecting a line segment belonging to another figure. If such a maximum constituent figure W is obtained, a figure slightly larger and a figure slightly smaller than this can be easily created, and is highly useful in performing printing plate making.

【0028】以上本発明を図示する実施例に基づいて説
明したが、本発明はこの実施例のみに限定されるもので
はなく、この他にも種々の態様で実施可能である。たと
えば、上述の実施例では、比較的単純な幾何学図形を用
いた例を示したが、実際には、雲型などの自由曲線から
なる複雑な幾何学図形に対しても有効に作用する。ま
た、上述の実施例では、各図形を構成する線分を、幅を
もたない幾何学的に純粋な線分として取り扱っている
が、実際の印刷製版では、通常、幅をもった線によって
図形を構成するのが一般的である。したがって、実際に
は、各図形の辺同士の連結部は、許容幅以内においては
同一座標であるとするような取扱いが必要である。
Although the present invention has been described based on the illustrated embodiment, the present invention is not limited to this embodiment, but can be implemented in various other modes. For example, in the above-described embodiment, an example using a relatively simple geometric figure is shown. However, in practice, the present invention effectively works on a complicated geometric figure composed of a free curve such as a cloud. Further, in the above-described embodiment, the line segments constituting each figure are treated as geometrically pure line segments having no width. It is common to construct figures. Therefore, in practice, it is necessary to handle such that the joints between the sides of each figure have the same coordinates within the allowable width.

【0029】[0029]

【発明の効果】以上のとおり本発明による図形データ変
換装置によれば、図形を構成する各線分に属性を定義し
て、所定のアルゴリズムに従ってトレースを行うように
したため、部分的に重なり合う複数の幾何学図形のデー
タを最小構成図形のデータに変換する作業を、自動的
に、かつ、比較的短い演算時間で行うことができるよう
になる。
As described above, according to the graphic data conversion apparatus of the present invention, the attribute is defined for each line segment constituting the graphic, and tracing is performed according to a predetermined algorithm. The operation of converting the data of the geometrical figure into the data of the minimum constituent figure can be performed automatically and in a relatively short operation time.

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

【図1】本発明に係る図形データ変換装置の基本構成を
示すブロック図である。
FIG. 1 is a block diagram showing a basic configuration of a graphic data conversion device according to the present invention.

【図2】図1に示す装置の第1の記憶領域11に用意さ
れる変換前の2つの図形の一例を示す図である。
FIG. 2 is a diagram showing an example of two figures before conversion prepared in a first storage area 11 of the apparatus shown in FIG.

【図3】図2に示す2つの図形を部分的に重ねることに
より生成される閉領域を示す図である。
FIG. 3 is a diagram showing a closed region generated by partially overlapping two figures shown in FIG. 2;

【図4】図1に示す装置の第2の記憶領域12に書き込
まれる変換後の図形の一例を示す図である。
FIG. 4 is a diagram showing an example of a figure after conversion written in a second storage area 12 of the device shown in FIG. 1;

【図5】図2に示す2つの図形について認識される交点
および線分を示す図である。
FIG. 5 is a diagram showing intersections and line segments recognized for the two figures shown in FIG. 2;

【図6】図2に示す2つの図形に基づいて作成されるテ
ーブルを示す図である。
FIG. 6 is a diagram showing a table created based on the two figures shown in FIG. 2;

【図7】図1に示す装置の第1の記憶領域11に用意さ
れる変換前の3つの図形を示す図である。
FIG. 7 is a diagram showing three figures before conversion prepared in a first storage area 11 of the apparatus shown in FIG. 1;

【図8】図7に示す3つの図形のうちの2つの図形によ
って生成される3つの閉領域を示す図である。
FIG. 8 is a diagram showing three closed regions generated by two of the three graphics shown in FIG. 7;

【図9】図8に示す3つの閉領域を構成する各図形と、
図7に示すもう1つの図形とによって生成される閉領域
を示す図である。
FIG. 9 is a diagram showing each figure constituting the three closed regions shown in FIG.
FIG. 8 is a diagram showing a closed region generated by another figure shown in FIG. 7.

【図10】図1に示す装置において、例外処理が必要な
図形パターンを示す図である。
FIG. 10 is a diagram showing a graphic pattern that requires exception processing in the device shown in FIG. 1;

【図11】図10に示す図形について認識される交点お
よび線分を示す図である。
FIG. 11 is a diagram showing intersections and line segments recognized for the graphic shown in FIG. 10;

【図12】図10に示す図形によって生成される4つの
閉領域を示す図である。
FIG. 12 is a diagram showing four closed regions generated by the graphic shown in FIG. 10;

【図13】図1に示す装置による変換対象となる別な図
形パターンを示す図である。
FIG. 13 is a diagram showing another graphic pattern to be converted by the apparatus shown in FIG. 1;

【図14】図1に示す装置による最大構成図形を求める
処理の対象となる図形パターンを示す図である。
FIG. 14 is a diagram showing a graphic pattern to be processed by the apparatus shown in FIG. 1 to obtain a maximum constituent graphic.

【図15】図14に示す図形に基づいて求めた最大構成
図形を示す図である。
FIG. 15 is a diagram showing a maximum constituent figure obtained based on the figure shown in FIG. 14;

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

10…記憶手段 11…第1の記憶領域(変換前の図形データを保存) 12…第2の記憶領域(変換後の図形データを保存) 13…第3の記憶領域(テーブルを保存) 20…対象図形抽出手段 30…交点認識手段 40…線分認識手段 50…内外判断手段 60…テーブル作成手段 70…内側トレース手段 80…外側トレース手段 90…トレース回数計数手段 A〜K,L1,L2,V1〜V3,W,X,Y,Z…図
形 M…閉領域 G1,H1,H2,H3,H4,P,Q…交点 a1,a2,b1,b2,f1〜f3,h1〜h4,m
1,m2…線分 g1〜g4,i,j,k,x,y,z…閉領域
DESCRIPTION OF SYMBOLS 10 ... Storage means 11 ... 1st storage area (save figure data before conversion) 12 ... 2nd storage area (save figure data after conversion) 13 ... 3rd storage area (save table) 20 ... Object figure extracting means 30 Intersection recognizing means 40 Line segment recognizing means 50 Inner / outer judging means 60 Table creating means 70 Inner tracing means 80 Outer tracing means 90 Trace number counting means A to K, L1, L2, V1 ~ V3, W, X, Y, Z ... figure M ... closed area G1, H1, H2, H3, H4, P, Q ... intersections a1, a2, b1, b2, f1-f3, h1-h4, m
1, m2 ... line segment g1 to g4, i, j, k, x, y, z ... closed region

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 閉領域を構成する2つの幾何学図形の図
形データを、この2つの幾何学図形を部分的に重ねるこ
とによって新たに生じる複数の閉領域を構成する最小構
成図形の図形データに変換する図形データ変換装置であ
って、変換前の図形データを保存するための第1の記憶
領域と、変換後の図形データを保存するための第2の記
憶領域と、テーブルを構成するデータを保存するための
第3の記憶領域と、を有する記憶手段と、前記第1の記
憶領域内のデータに基づいて、2つの幾何学図形の交点
を認識し、認識した交点に交点IDを定義する交点認識
手段と、前記第1の記憶領域内のデータに基づいて、認
識された交点を両端点とする線分を認識し、認識した線
分に、この線分が所属する幾何学図形を特定するための
情報を含んだ線分IDを定義する線分認識手段と、前記
第1の記憶領域内のデータに基づいて、認識した線分
が、この線分が所属する幾何学図形ではないもう一方の
幾何学図形の内側に存在するか外側に存在するかを判断
し、この線分に「内側」または「外側」の属性を与える
内外判断手段と、認識したすべての線分について、その
線分ID、その線分の両端点に対応する交点ID、およ
び、その線分に与えられた属性、をテーブルとして前記
第3の記憶領域に書き込むテーブル作成手段と、前記テ
ーブルに基づいて、属性が「内側」であり、かつ、トレ
ースが一度も行われたことがない線分のみを、所属する
幾何学図形が交互に変わるようにトレースして閉領域を
形成し、このトレースした線分からなる図形の図形デー
タを変換後の図形データとして前記第2の記憶領域に書
き込む内側トレース手段と、前記テーブルに基づいて、
属性が交互に変わるように、かつ、所属する幾何学図形
が交互に変わるように、トレースの回数が満了していな
い線分をトレースして閉領域を形成し、このトレースし
た線分からなる図形の図形データを変換後の図形データ
として前記第2の記憶領域に書き込む外側トレース手段
と、各線分について、トレースが行われた回数を計数
し、属性が「内側」である線分については2回のトレー
スにより、属性が「外側」である線分については1回の
トレースにより、それぞれ当該線分についてのトレース
の回数が満了したことを指示するトレース回数計数手段
と、を備えることを特徴とする図形データ変換装置。
1. The graphic data of two geometric figures forming a closed area are converted into graphic data of a minimum constituent figure newly forming a plurality of closed areas by partially overlapping the two geometric figures. A graphic data conversion device for converting, comprising: a first storage area for storing graphic data before conversion, a second storage area for storing graphic data after conversion, and data forming a table. A storage unit having a third storage area for saving, and an intersection of two geometric figures is recognized based on data in the first storage area, and an intersection ID is defined for the recognized intersection. An intersection recognizing means for recognizing a line segment having both ends as the recognized intersection based on the data in the first storage area, and identifying a geometric figure to which the line segment belongs to the recognized line segment Segment I containing information to perform A line segment recognizing means for defining D, and a line segment recognized based on the data in the first storage area is present inside another geometric figure which is not the geometric figure to which the line segment belongs; Inside / outside judging means for judging whether the line segment exists or outside the line segment and giving an attribute of “inside” or “outside” to the line segment, for all recognized line segments, the line segment ID, and both end points of the line segment Table creation means for writing, as a table, the intersection ID corresponding to the intersection point and the attribute given to the line segment in the third storage area, and based on the table, the attribute is "inside" and the trace Only the line segments that have never been performed are traced so that the geometric figures to which they belong alternately form a closed area, and the figure data of the figure consisting of the traced line segments is converted to the converted figure data. As the second An inner trace means for writing into the storage area, in accordance with the table,
Trace the line segments whose number of times of tracing has not expired to form a closed area so that the attribute changes alternately and the geometric figures to which they belong alternately, and form a closed area. Outer tracing means for writing graphic data as converted graphic data in the second storage area; counting the number of times tracing has been performed for each line segment; A trace number counting means for indicating, by a single trace, that the number of traces for each of the line segments whose attribute is “outside” has expired by a trace. Data converter.
【請求項2】 閉領域を構成する複数の幾何学図形の図
形データを、この複数の幾何学図形を部分的に重ねるこ
とによって新たに生じる複数の閉領域を構成する最小構
成図形の図形データに変換する図形データ変換装置であ
って、変換前の図形データを保存するための第1の記憶
領域と、変換後の図形データを保存するための第2の記
憶領域と、テーブルを構成するデータを保存するための
第3の記憶領域と、を有する記憶手段と、前記第1の記
憶領域または前記第2の記憶領域から、所定の2つの図
形データを対象図形のデータとして抽出する対象図形抽
出手段と、前記抽出したデータに基づいて、2つの対象
図形の交点を認識し、認識した交点に交点IDを定義す
る交点認識手段と、前記抽出したデータに基づいて、認
識された交点を両端点とする線分を認識し、認識した線
分に、この線分が所属する幾何学図形を特定するための
情報を含んだ線分IDを定義する線分認識手段と、前記
抽出したデータに基づいて、認識した線分が、この線分
が所属する対象図形ではないもう一方の対象図形の内側
に存在するか外側に存在するかを判断し、この線分に
「内側」または「外側」の属性を与える内外判断手段
と、認識したすべての線分について、その線分ID、そ
の線分の両端点に対応する交点ID、および、その線分
に与えられた属性、をテーブルとして前記第3の記憶領
域に書き込むテーブル作成手段と、前記テーブルに基づ
いて、属性が「内側」であり、かつ、トレースが一度も
行われたことがない線分のみを、所属する幾何学図形が
交互に変わるようにトレースして閉領域を形成し、この
トレースした線分からなる図形の図形データを変換後の
図形データとして前記第2の記憶領域に書き込む内側ト
レース手段と、前記テーブルに基づいて、属性が交互に
変わるように、かつ、所属する対象図形が交互に変わる
ように、トレースの回数が満了していない線分をトレー
スして閉領域を形成し、このトレースした線分からなる
図形の図形データを変換後の図形データとして前記第2
の記憶領域に書き込む外側トレース手段と、各線分につ
いて、トレースが行われた回数を計数し、属性が「内
側」である線分については2回のトレースにより、属性
が「外側」である線分については1回のトレースによ
り、それぞれ当該線分についてのトレースの回数が満了
したことを指示するトレース回数計数手段と、を備え、
前記対象図形抽出手段による抽出作業およびこの抽出さ
れた図形に対する処理を、前記第2の記憶領域に所望の
図形データが得られるまで繰り返して行うことができる
ようにしたことを特徴とする図形データ変換装置。
2. The graphic data of a plurality of geometric figures constituting a closed area are converted into graphic data of a minimum constituent figure constituting a plurality of newly formed closed areas by partially overlapping the plurality of geometric figures. A graphic data conversion device for converting, comprising: a first storage area for storing graphic data before conversion, a second storage area for storing graphic data after conversion, and data forming a table. Storage means having a third storage area for saving, and target graphic extraction means for extracting two predetermined graphic data as data of a target graphic from the first storage area or the second storage area An intersection recognizing means for recognizing an intersection of two target graphics based on the extracted data and defining an intersection ID for the recognized intersection; A line segment recognition means for recognizing a line segment to be a point, defining a line segment ID including information for specifying a geometric figure to which the line segment belongs to the recognized line segment; Based on this, it is determined whether the recognized line segment exists inside or outside the other target figure that is not the target figure to which this line segment belongs. Inside and outside judging means for giving the attribute of each of the recognized line segments, their line segment IDs, intersection IDs corresponding to both end points of the line segments, and attributes given to the line segments as a table. And a table creation means for writing into the storage area of No. 3 and, based on the table, only the line segments whose attributes are “inside” and whose tracing has never been performed are alternately assigned to the geometrical figures to which they belong. Trace to change and closed area Inner tracing means for writing the graphic data of the graphic consisting of the traced line segments into the second storage area as the converted graphic data; and changing the attributes based on the table so that the attributes belong to each other. A line segment whose number of times of tracing has not expired is traced to form a closed area so that the target figure to be alternated alternately, and the figure data of the figure consisting of the traced line segment is used as the converted figure data as the second figure data.
Outside tracing means for writing to the storage area of each line segment, and counting the number of times tracing is performed for each line segment. For the line segment whose attribute is "inside", the line segment whose attribute is "outside" is obtained by tracing twice. Trace number counting means for indicating that the number of times of tracing for the line segment has expired by one tracing,
Graphic data conversion, wherein the extraction work by the target graphic extracting means and the processing on the extracted graphic can be repeatedly performed until desired graphic data is obtained in the second storage area. apparatus.
JP07851091A 1991-03-18 1991-03-18 Graphic data converter Expired - Fee Related JP3145724B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP07851091A JP3145724B2 (en) 1991-03-18 1991-03-18 Graphic data converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP07851091A JP3145724B2 (en) 1991-03-18 1991-03-18 Graphic data converter

Publications (2)

Publication Number Publication Date
JPH04289977A JPH04289977A (en) 1992-10-14
JP3145724B2 true JP3145724B2 (en) 2001-03-12

Family

ID=13663936

Family Applications (1)

Application Number Title Priority Date Filing Date
JP07851091A Expired - Fee Related JP3145724B2 (en) 1991-03-18 1991-03-18 Graphic data converter

Country Status (1)

Country Link
JP (1) JP3145724B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5687612B2 (en) * 2011-12-21 2015-03-18 京セラドキュメントソリューションズ株式会社 Image forming apparatus
JP6232948B2 (en) * 2013-11-07 2017-11-22 株式会社リコー Information processing apparatus, information processing method, and program

Also Published As

Publication number Publication date
JPH04289977A (en) 1992-10-14

Similar Documents

Publication Publication Date Title
JPH07334549A (en) Method and device for automatically entering size in cad system
JP2853355B2 (en) 3D graphic data generator
JP3145724B2 (en) Graphic data converter
JP2828271B2 (en) Shape generation method in CAD system
US5014331A (en) Method of detecting an internal point within a closed area
JPH0589187A (en) Graphics processing device
JPH0565906B2 (en)
JPH06119032A (en) Tool arrangement interference checking method for working graphic data
JPH07105353A (en) Drawing management device
JPH07220115A (en) Three-dimensional cad system
JP3564721B2 (en) CAD / CAM equipment
JP2643617B2 (en) Method and apparatus for drawing walls or beams in architectural drawings, etc.
JP3481294B2 (en) Automatic dimension line drawing system
JP2582298B2 (en) Graphic information creation method in graphic processing device
JPH1040275A (en) Display method for cad data
JP3386209B2 (en) Device for rearranging objects displayed on a display screen
JPS6061866A (en) Chamfering system of graphic processing system
JP2938915B2 (en) Pattern processing method
JP2818067B2 (en) Bleed image processing method
JPS6270978A (en) Processing method for graphic data
JPH07121723A (en) Method for correcting direction data of stripe patterns, information processor for executing the same, method for correcting pitch data of stripe patterns and information processor for executing the same
JPS61253583A (en) Production of approximating surface
JPH0575148B2 (en)
JPH05314273A (en) Method and device for processing image data
JPH07182478A (en) Graphic data editing device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090105

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100105

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100105

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110105

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees