JPH07121735A - Method and device for processing graphic - Google Patents

Method and device for processing graphic

Info

Publication number
JPH07121735A
JPH07121735A JP5270340A JP27034093A JPH07121735A JP H07121735 A JPH07121735 A JP H07121735A JP 5270340 A JP5270340 A JP 5270340A JP 27034093 A JP27034093 A JP 27034093A JP H07121735 A JPH07121735 A JP H07121735A
Authority
JP
Japan
Prior art keywords
graphic
closed
generating
original
line segment
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.)
Withdrawn
Application number
JP5270340A
Other languages
Japanese (ja)
Inventor
Masahiro Ishizaki
昌宏 石崎
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP5270340A priority Critical patent/JPH07121735A/en
Publication of JPH07121735A publication Critical patent/JPH07121735A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Digital Computer Display Output (AREA)

Abstract

PURPOSE:To provide the method and device for processing graphic so as to easily generate continuous closed graphics and so as to easily perform hatching at high speed. CONSTITUTION:In a step S111, the central angle of a circular arc element is calculated. In a step S112, it is decided whether the calculated central angle thetaof the circular arc is more than 180 deg. or not. When the central angle theta is more than 180 deg., division is required and in the step S113, the circular arc element is divided into plural pieces of circular arc element data. In a step S114, the closed graphic including a circular arc separated from the circular arc element inside and outside just for a prescribed distance alpha in the normal direction of the circular arc element and a circular arc element provided by synthesizing the circles of a radius alpha with the two end points of the circular arc element as the centers. In a step S115, a graphic ORing the plural generated closed graphics is calculated. In a step S116, the data of a closed graphic (r) generated in the step 115 are stored in any storage area excepting for a storage area where source graphic data are stored.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、図形処理、例えば、閉
図形を生成する図形処理方法とその装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic processing method, for example, a graphic processing method and apparatus for generating a closed graphic.

【0002】[0002]

【従来の技術】画像処理システムやCAD/CAMシス
テム等で行う、形の処理、例えば,線分,円、円弧など
の幾何要素で構成される閉領域の図形を生成したり、元
図形に対するハッチング処理を行うには、以下の方法が
あった。
2. Description of the Related Art Shape processing performed by an image processing system, a CAD / CAM system or the like, for example, generating a closed region figure composed of geometric elements such as line segments, circles and arcs, or hatching an original figure. There were the following methods for performing the treatment.

【0003】即ち、閉図形を生成するために、基本の図
形要素、例えば、円をパラメトリックな方程式で表現し
ておき、その円を包含する閉図形を求める方法があっ
た。
That is, in order to generate a closed figure, there has been a method of expressing a basic figure element, for example, a circle by a parametric equation and obtaining a closed figure including the circle.

【0004】また、元図形に対するハッチング処理を行
うには、利用者が、元図形に対するハッチング領域の指
定、例えば、ハッチング線分のデータを直接指定してい
た。
Further, in order to carry out the hatching process on the original figure, the user directly specifies the hatching area for the original figure, for example, the data of the hatching line segment.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、閉図形
の生成では、実際に円図形を表示する空間は量子化され
た画像アドレス空間であるため、パラメトリックに表現
された円に対して、その円を包含する滑らかな連続した
閉図形として、量子化された画像アドレス空間に生成/
描画するには、処理時間のかかる面倒な補間/修正処理
が必要であった。
However, in the closed figure generation, since the space for actually displaying the circle figure is the quantized image address space, the circle is represented by a parametrically represented circle. Generated in the quantized image address space as a smooth continuous closed figure that includes /
In order to draw, complicated and time-consuming interpolation / correction processing is required.

【0006】また、元図形に対するハッチング処理を行
うには、利用者がその領域を示す詳細なデータを入力す
る必要があり、時間がかかり、利用者の負担が大きかっ
た。
Further, in order to carry out the hatching process on the original figure, the user needs to input detailed data indicating the area, which takes time and imposes a heavy burden on the user.

【0007】本発明は上記従来例に鑑みてなされたもの
で、連続した閉図形を容易に生成する図形処理方法とそ
の装置を提供することを目的とする。
The present invention has been made in view of the above conventional example, and an object thereof is to provide a graphic processing method and apparatus for easily generating continuous closed graphics.

【0008】また、別の発明は、図形に対するハッチン
グ処理を高速に、かつ利用者のハッチングデータ入力量
を軽減することのできる図形処理方法とその装置を提供
することを目的とする。
Another object of the present invention is to provide a graphic processing method and apparatus capable of reducing the amount of hatching data input by a user at a high speed in the hatching process for a graphic.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するた
め、本発明の図形処理方法とその装置は以下の構成を備
える。即ち、前記元図形から、基本図形要素を抽出する
抽出工程と、前記抽出された基本図形要素を、複数のプ
リミテイブ図形要素に分割する分割工程と、前記プリミ
テイブ図形要素から、前記元図形に対応する閉図形を生
成する生成工程と、を備える。また、別の発明は、元図
形に対する線分要素を設定する設定工程と、前記元図形
と前記線分要素の接触点座標を計算する計算工程と、前
記接触点座標から、ハッチングに必要な接触点を選択す
る選択工程と、前記選択された接触点座標を、前記線分
要素の始点に近い順に並べるソーテイング工程と、前記
並べられた接触点座標に基づき、ハッチング線分を生成
するハッチング線分生成工程と、を備える。また、さら
に別の発明は、前記元図形から、基本図形要素を抽出す
る抽出手段と、前記抽出された基本図形要素を、複数の
プリミテイブ図形要素に分割する分割手段と、前記プリ
ミテイブ図形要素から、前記元図形に対応する閉図形を
生成する生成手段と、を備える。また、さらに別の発明
は、元図形に対する線分要素を設定する設定手段と、前
記元図形と前記線分要素の接触点座標を計算する計算手
段と、前記接触点座標から、ハッチングに必要な接触点
を選択する選択手段と、前記選択された接触点座標を、
前記線分要素の始点に近い順に並べるソーテイング手段
と、前記並べられた接触点座標に基づき、ハッチング線
分を生成するハッチング線分生成手段と、を備える。
In order to achieve the above object, a graphic processing method and apparatus of the present invention have the following configurations. That is, the extraction step of extracting a basic graphic element from the original graphic, the dividing step of dividing the extracted basic graphic element into a plurality of primitive graphic elements, and the primitive graphic element corresponding to the original graphic A generation step of generating a closed figure. Further, another invention is a setting step of setting a line segment element for an original figure, a calculation step of calculating a contact point coordinate of the original figure and the line segment element, and a contact necessary for hatching from the contact point coordinate. A selection step of selecting a point, a sorting step of arranging the selected contact point coordinates in order from the starting point of the line segment element, and a hatching line segment for generating a hatching line segment based on the arranged contact point coordinates. And a generation step. Still another invention is, from the original graphic, extracting means for extracting a basic graphic element, dividing means for dividing the extracted basic graphic element into a plurality of primitive graphic elements, and from the primitive graphic element, Generating means for generating a closed figure corresponding to the original figure. Still another invention is a setting means for setting a line segment element for an original figure, a calculating means for calculating a contact point coordinate of the original figure and the line segment element, and a hatching necessary from the contact point coordinate. Selecting means for selecting a contact point, and the selected contact point coordinates,
Sorting means for arranging in order from the starting point of the line segment element, and hatching line segment generating means for generating a hatching line segment based on the arranged contact point coordinates.

【作用】以上の構成において、前記元図形から、基本図
形要素を抽出し、前記抽出された基本図形要素を、複数
のプリミテイブ図形要素に分割し、前記プリミテイブ図
形要素から、前記元図形に対応する閉図形を生成する。
また、別の発明は、元図形に対する線分要素を設定し、
前記元図形と前記線分要素の接触点座標を計算し、前記
接触点座標から、ハッチングに必要な接触点を選択し、
前記選択された接触点座標を、前記線分要素の始点に近
い順に並べ、前記並べられた接触点座標に基づき、ハッ
チング線分を生成する。また、さらに別の発明は、抽出
手段が、前記元図形から基本図形要素を抽出し、分割手
段が、前記抽出された基本図形要素を複数のプリミテイ
ブ図形要素に分割し、生成手段が、前記プリミテイブ図
形要素から前記元図形に対応する閉図形を生成する。ま
た、さらに別の発明は、設定手段が、元図形に対する線
分要素を設定し、計算手段が、前記元図形と前記線分要
素の接触点座標を計算し、選択手段が、前記接触点座標
から、ハッチングに必要な接触点を選択し、ソーテイン
グ手段が、前記選択された接触点座標を、前記線分要素
の始点に近い順に並べ、ハッチング線分生成手段が、前
記並べられた接触点座標に基づきハッチング線分を生成
する。
In the above construction, the basic graphic element is extracted from the original graphic, the extracted basic graphic element is divided into a plurality of primitive graphic elements, and the primitive graphic element corresponds to the original graphic. Generate a closed figure.
Another invention sets a line segment element for the original figure,
Calculate the contact point coordinates of the original figure and the line segment element, from the contact point coordinates, select the contact point necessary for hatching,
The selected contact point coordinates are arranged in order from the starting point of the line segment element, and a hatching line segment is generated based on the arranged contact point coordinates. In still another aspect of the invention, the extracting means extracts a basic graphic element from the original graphic, the dividing means divides the extracted basic graphic element into a plurality of primitive graphic elements, and the generating means includes the primitive graphic element. A closed figure corresponding to the original figure is generated from the figure element. In still another invention, the setting means sets the line segment element for the original figure, the calculating means calculates the contact point coordinates of the original figure and the line segment element, and the selecting means sets the contact point coordinate. From the, the contact point required for hatching is selected, the sorting means arranges the selected contact point coordinates in the order of being closer to the start point of the line segment element, and the hatching line segment generation means arranges the arranged contact point coordinates. A hatching line segment is generated based on.

【0010】[0010]

【実施例】次に、本発明の第1の実施例について図面を
参照しながら、本図形処理方法を詳細に説明する図1は
第1の実施例である図形処理方法が適用される図形処理
システムのハードウエア構成を示すブロック図である。
この図形処理システムは、全体の制御を行う中央処理装
置1と、図形処理プログラムと図形データ等が格納され
た記憶装置2と、キーボードやポインテイング入力デバ
イス等の入力装置3と、CRTデイスプレイモニタ等の
表示装置4とから、その主要部が構成されている。この
図形処理システムは、例えば、CAD/CAMシステム
であってもよい。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, a first embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a graphic processing to which the graphic processing method of the first embodiment is applied. It is a block diagram which shows the hardware constitutions of a system.
This graphic processing system includes a central processing unit 1 for overall control, a storage device 2 in which a graphic processing program and graphic data are stored, an input device 3 such as a keyboard and pointing input device, a CRT display monitor, etc. The display device 4 and the main part thereof are configured. The graphic processing system may be, for example, a CAD / CAM system.

【0011】図2は、第1の実施例の図形処理方法を説
明するフローチャートである。
FIG. 2 is a flow chart for explaining the graphic processing method of the first embodiment.

【0012】図3は、第1の実施例での図形処理が施さ
れる前の図形データの例を示し、この図形データは、予
め記憶装置2に格納されている。
FIG. 3 shows an example of graphic data before the graphic processing in the first embodiment is performed, and the graphic data is stored in the storage device 2 in advance.

【0013】図4は、第1の実施例での図形処理が施さ
れた後の図形データの例を示す。
FIG. 4 shows an example of graphic data after the graphic processing in the first embodiment is performed.

【0014】以下、図2のフローチャートを参照して、
第1の実施例の図形処理方法を説明する。尚、このフロ
ーチャートで示す図形処理プログラムと、処理される図
形データは、予め記憶装置2に格納されている。また、
中央処理装置1は、記憶装置2に格納されている図形処
理プログラムと処理される図形データをアクセスして図
形処理を実行する。
Hereinafter, with reference to the flowchart of FIG.
The graphic processing method of the first embodiment will be described. The graphic processing program shown in this flowchart and the graphic data to be processed are stored in the storage device 2 in advance. Also,
The central processing unit 1 executes the graphic processing by accessing the graphic processing program stored in the storage device 2 and the graphic data to be processed.

【0015】ステップS11では、記憶装置2に格納さ
れている図形データから、線分,円の要素データを取り
出す。例えば、図3に示す図形から、e1〜e4の線
分,e5の円要素データを取り出す。
In step S11, line segment and circle element data are extracted from the graphic data stored in the storage device 2. For example, line segments e1 to e4 and circle element data e5 are extracted from the figure shown in FIG.

【0016】ステップS12では、取り出された要素デ
ータについて、分解が必要か否かを判定する。そして、
分解が必要であれば、分解処理を行うステップS13へ
進む。また、分解が不要であれば、ステップS14へ進
む。ここで、円要素は分解が必要な図形要素である。直
線は分解を必要としない図形要素である。従って、例え
ば、図3に示すe5の円要素は、分解が必要な図形要素
であるので、ステップS13で、分解処理が施される。
In step S12, it is determined whether the extracted element data needs to be decomposed. And
If disassembly is required, the process proceeds to step S13 for performing disassembly processing. If the disassembly is unnecessary, the process proceeds to step S14. Here, the circle element is a graphic element that needs to be decomposed. A straight line is a graphic element that does not require decomposition. Therefore, for example, since the circular element e5 shown in FIG. 3 is a graphic element that needs to be decomposed, the decomposition process is performed in step S13.

【0017】ステップS13では、分解を必要とする図
形要素、例えば、円要素を複数の円弧要素に分割する。
例えば、図3に示すe5の円要素は、ここで、図4に示
す円要素e7,e6のように2つの円弧要素に分割され
る。
In step S13, a graphic element that needs to be decomposed, for example, a circular element is divided into a plurality of arc elements.
For example, the circular element e5 shown in FIG. 3 is now divided into two circular arc elements like the circular elements e7 and e6 shown in FIG.

【0018】ステップS14では、始めに格納されてい
た元図形データの記憶領域とは別の領域に、抽出または
分解された図形要素のデータを格納する。例えば、図4
に示すような各要素データe1,e2,e3,e4,e
6,e7を格納し、処理を終了する。
In step S14, the extracted or decomposed graphic element data is stored in an area different from the storage area of the original graphic data that was initially stored. For example, in FIG.
Each element data e1, e2, e3, e4, e as shown in
6 and e7 are stored, and the process ends.

【0019】なお、本発明は第1の実施例で示されるも
のに限定されるものではない。たとえば、第1の実施例
では、分割される要素を円データとしているが、楕円デ
ータにも適用できる。
The present invention is not limited to that shown in the first embodiment. For example, in the first embodiment, the element to be divided is the circle data, but it can be applied to the ellipse data.

【0020】また、第1の実施例では、分割される要素
を2分割しているが、これ以上の複数の分割をおこなっ
てもよい。
Further, in the first embodiment, the element to be divided is divided into two, but a plurality of divisions may be performed.

【0021】さらに、第1の実施例では、ステップ11
で幾何要素を取り出す記憶装置の記憶領域と、ステップ
14で格納する記憶領域とを異なるものにしたが、一旦
取り出し分解処理した要素については、そのオリジナル
の要素データを削除し、分解処理を行わなかった図形要
素についてはそのままで、分解処理した要素についての
み追加してもよい。
Further, in the first embodiment, step 11
The storage area of the storage device from which the geometric element is extracted is different from the storage area to be stored in step 14, but the original element data is deleted and the decomposition processing is not performed for the element once extracted and decomposed. The graphic elements may be left as they are, and only the decomposed elements may be added.

【0022】以上説明したように、第1の実施例によれ
ば以下のような効果が得られる。即ち、元図形を構成す
る円や楕円等の図形要素を複数円弧要素に分解して表現
することにより、それら複数円弧要素を利用した、元の
図形要素を包含する閉図形を容易に求めることができ
る。
As described above, according to the first embodiment, the following effects can be obtained. That is, by decomposing and expressing the graphic elements such as circles and ellipses that compose the original graphic into a plurality of arc elements, it is possible to easily obtain a closed graphic that includes the original graphic elements using the plurality of arc elements. it can.

【0023】(第2の実施例)次に、第2の実施例につ
いて図面を参照して詳細に説明する。
(Second Embodiment) Next, a second embodiment will be described in detail with reference to the drawings.

【0024】図5は、第2の実施例の図形処理を説明す
るフローチャートである。
FIG. 5 is a flow chart for explaining the graphic processing of the second embodiment.

【0025】ステップS111では、記憶装置2に予め
格納されている図形データ、円弧要素のデータを取り出
して、その中心角を求める。図6は、抽出された円弧要
素の一例を示す図である。ここで、e10は抽出された
円弧であり、その中心角はθである。
In step S111, graphic data and arc element data stored in advance in the storage device 2 are taken out and the central angle thereof is obtained. FIG. 6 is a diagram showing an example of the extracted arc elements. Here, e10 is the extracted circular arc, and its central angle is θ.

【0026】ステップS112では、求めた円弧の中心
角θが180°以上かどうか判定する。即ち、分割が必
要か否かの判定を、中心角θが180°以上か以下かで
行う。中心角θが180°以内であれば、分割を必要と
せず、ステップS114へ進む。また、中心角θが18
0°以上であれば分割を必要とし、ステップS113へ
進む。
In step S112, it is determined whether the obtained central angle θ of the circular arc is 180 ° or more. That is, the determination as to whether or not division is necessary is performed depending on whether the central angle θ is 180 ° or more or less. If the central angle θ is within 180 °, no division is necessary and the process proceeds to step S114. Also, the central angle θ is 18
If it is 0 ° or more, division is required, and the process proceeds to step S113.

【0027】ステップS113では、分割を必要とする
円弧要素を複数の円弧要素データに分割する。図7は、
円弧要素e10を円弧要素e1とe2に分割した時の状
態の一例を示している。
In step S113, the arc element requiring division is divided into a plurality of pieces of arc element data. Figure 7
An example of a state when the arc element e10 is divided into arc elements e1 and e2 is shown.

【0028】ステップS114では、円弧要素の法線方
向に、円弧要素から内側と外側に所定の距離αはなれた
円弧と、円弧要素の2つの端点を中心とした半径αの円
を合成して得られる、円弧要素を包含する閉図形を生成
する。図8,図9は、その生成された閉図形の一例を示
す。ここで、図8は、円弧要素e11に対応して生成し
た閉図形r1を示している。また、図9は、円弧要素e
12に対応して生成した閉図形r2を示している。
In step S114, an arc which is separated from the arc element by a predetermined distance α in the normal direction of the arc element and a circle having a radius α centered on the two end points of the arc element are obtained. Generate a closed figure that includes the arc element. 8 and 9 show an example of the generated closed figure. Here, FIG. 8 shows a closed figure r1 generated corresponding to the arc element e11. Further, FIG. 9 shows an arc element e.
The closed figure r2 generated corresponding to 12 is shown.

【0029】ステップS115では、複数生成された閉
図形間の論理和図形を求める。図10は、論理和図形を
求めた一例を示す。即ち、閉図形r1とr2の論理和を
とった結果を示す。この結果からわかるように、100
と101の場所では、2つの閉図形が論理図形の内側で
交差している。そのため、この内側で交差している論理
和図形部分を取り除く。図11は、この内側で交差して
いる論理和図形部分を取り除いた結果の閉図形rを示
す。
In step S115, a logical sum figure between a plurality of generated closed figures is obtained. FIG. 10 shows an example of obtaining a logical sum graphic. That is, the result of taking the logical sum of the closed figures r1 and r2 is shown. As you can see from this result, 100
At positions 101 and 101, two closed figures intersect inside the logical figure. Therefore, the logical sum graphic portion intersecting inside is removed. FIG. 11 shows a closed figure r obtained as a result of removing the logical sum figure portion intersecting inside.

【0030】ステップS116では、元図形データが格
納されている記憶領域以外の記憶領域に、ステップS1
15で生成された閉図形rのデータを格納して、図形処
理を終了する。
In step S116, a storage area other than the storage area in which the original graphic data is stored is stored in step S1.
The data of the closed figure r generated in 15 is stored, and the figure processing is ended.

【0031】なお、第2の実施例では、オリジナル円弧
の中心角が180°より大きいか否かにより2分割され
ているが、これ以下の角度で判定を行ってもよい。
In the second embodiment, the original arc is divided into two parts depending on whether the central angle is larger than 180 °, but the angle may be smaller than this.

【0032】以上説明したように、第2の実施例によれ
ば以下のような効果が得られる。即ち、元図形を構成す
る円や楕円等の図形要素を複数円弧要素に分解して表現
し、各円弧要素ごとに対応する閉図形を求め、論理和を
とることにより、元の図形要素を包含する閉図形を容易
に求めることができる。
As described above, according to the second embodiment, the following effects can be obtained. That is, the figure elements such as circles and ellipses that make up the original figure are decomposed into a plurality of arc elements and expressed, the closed figure corresponding to each arc element is found, and the original figure elements are included by taking the logical sum. It is possible to easily find the closed figure to be performed.

【0033】(第3の実施例)次に、第3の実施例につ
いて図面を参照して詳細に説明する。第3の実施例で
は、閉図形に対してハッチング処理を行う際に必要とな
る、ハッチング線を正確に求める図形処理方法を説明す
る。
(Third Embodiment) Next, a third embodiment will be described in detail with reference to the drawings. In the third embodiment, a graphic processing method for accurately obtaining a hatching line, which is necessary when performing a hatching process on a closed graphic, will be described.

【0034】図12は、第3の実施例であるハッチング
線を求める処理内容を示すフローチャートであり、図1
3〜図15は、図12に示す処理を説明するための処理
図形の一例を示す。
FIG. 12 is a flow chart showing the processing contents for obtaining the hatching line according to the third embodiment.
3 to 15 show examples of processing figures for explaining the processing shown in FIG.

【0035】ステップS211では、記憶装置2に格納
されている、線分,円などの幾何要素で構成される元図
形データを入力する。また、その図形データに対してハ
ッチングを行うための、基準となる1線分要素のデータ
を入力する。この基準となる1線分要素データの入力
は、キーボード等の入力装置3から行ってもよいし、ま
た、予め基準となる1線分要素データを記憶装置2に格
納しておき、これを読みだしてもよい。図13における
fは、記憶装置2から入力した元図形データの形状の一
例を示す。また、Gはハッチングを行うための基準とな
る1線分の一例を示し、始点G1と終点G2を持つ線分
要素である。
In step S211, original graphic data stored in the storage device 2 and composed of geometric elements such as line segments and circles is input. In addition, the data of one line segment element serving as a reference for hatching the graphic data is input. The reference one-line-segment element data may be input from the input device 3 such as a keyboard, or the reference one-line-segment element data may be stored in the storage device 2 in advance and read. You can 13 f shows an example of the shape of the original graphic data input from the storage device 2. Further, G indicates an example of one line segment serving as a reference for hatching, and is a line segment element having a start point G1 and an end point G2.

【0036】ステップS212では、入力した元図形f
と、1線分要素Gとの交点を求める。例えば、図14に
示すように、交点座標データa〜hを求める。
In step S212, the input original figure f
And the intersection point with the one line segment element G are obtained. For example, as shown in FIG. 14, intersection point coordinate data a to h are obtained.

【0037】ステップS213では、ステップS212
で求めた交点座標データの中から、ハッチング線上の、
不要な点を取り除く。即ち、元図形の構成要素の線分や
円弧などの始点や終点と重なる点、元図形の構成要素の
円弧の接線上の接触点と重なっている点を取り除く。図
14は、取り除く対象となる点がどれであるかを説明す
る図である。上述した重なり条件に合致する点は以下の
ものである。即ち、 e、f ・・・ (元図形の線分の端点に重なる点) g ・・・ (元図形の円弧の接線上の接点と重な
る点) h ・・・ (元図形の線分の端点と接する点) であり、結局、a、b、c、dの各点が残される点であ
る。
In step S213, step S212.
From the intersection coordinate data obtained in, on the hatching line,
Remove unnecessary points. That is, points that overlap the starting points and end points of the line segments and arcs of the constituent elements of the original figure and points that overlap the contact points on the tangents of the arcs of the constituent elements of the original figure are removed. FIG. 14 is a diagram for explaining which points are to be removed. The points that meet the above-mentioned overlapping conditions are as follows. That is, e, f ... (Point overlapping the end point of the line segment of the original figure) g ... (Point overlapping the contact point on the tangent line of the arc of the original figure) h ... (End point of the line segment of the original figure) Is a point in contact with), and eventually points a, b, c, and d are left.

【0038】ステップS214では、ステップS123
で残った点データを、与えられた1線分要素Gの始点、
即ち、G1またはG2からの距離が小さい順に並べ換え
る。
In step S214, step S123
The point data remaining in
That is, rearrangement is performed in the order of increasing distance from G1 or G2.

【0039】ステップS215では、並べ換えられた各
点データと、その並べ換えられた各点データが元図形の
どの構成要素上の点であるか等の属性情報を付加して、
記憶装置2に格納する。また、並べ換えられた各点デー
タの片端の交点データとその近傍の点を結ぶ線分、そし
て、その次の点と、その次の点の近傍の点を結ぶ線分を
ハッチング線分とする。図15に、点a、bから生成さ
れたハッチング線分G3と、点c、dから生成されたハ
ッチング線分G4の一例を示す。
In step S215, the rearranged point data and attribute information such as on which constituent element of the original figure the point of rearranged point data is added are added.
It is stored in the storage device 2. Further, a line segment connecting the intersection data at one end of each rearranged point data and a point in the vicinity thereof, and a line segment connecting the next point and a point in the vicinity of the next point are defined as hatching line segments. FIG. 15 shows an example of the hatching line segment G3 generated from the points a and b and the hatching line segment G4 generated from the points c and d.

【0040】尚、第3の実施例では交点データの中か
ら、図形の構成要素の線分、円弧などの始点や終点など
の端点と同一のものや円弧の接触点と同一のものについ
ては、不要な交点と判定し、不要な交点を取り除き、並
べ換えの処理を行っているが、これらを取り除かずに、
不要な交点である旨の属性を付けて残し、並べ換えの処
理を行ってもよい。
In the third embodiment, among the intersection data, line segments of graphic elements, end points such as start points and end points of arcs, and the same contact points of arcs are as follows: Although it is determined as unnecessary intersections, unnecessary intersections are removed and rearrangement processing is performed, but without removing these,
The rearrangement process may be performed by leaving an attribute indicating that the intersection is unnecessary.

【0041】尚、本発明は、複数の機器から構成される
システムに適用しても、1つの機器から成る装置に適用
しても良い。また、本発明はシステム或は装置にプログ
ラムを供給することによって達成される場合にも適用で
きることは言うまでもない。
The present invention may be applied to a system including a plurality of devices or an apparatus including a single device. Further, it goes without saying that the present invention can be applied to the case where it is achieved by supplying a program to a system or an apparatus.

【0042】以上説明したように、第3の実施例によれ
ば以下のような効果が得られる。即ち、ハッチング処理
を行うためのハッチング線を、自動的にかつ容易に求め
ることができる。
As described above, according to the third embodiment, the following effects can be obtained. That is, the hatching line for performing the hatching process can be automatically and easily obtained.

【0043】[0043]

【発明の効果】以上説明したように本発明によれば、連
続した閉図形を容易に生成できる。
As described above, according to the present invention, continuous closed figures can be easily generated.

【0044】また、別の発明は、図形に対するハッチン
グ処理を高速に、かつ利用者のハッチングデータ入力量
を軽減することができる。
Further, according to another invention, it is possible to perform a hatching process on a figure at high speed and reduce the amount of hatching data input by a user.

【0045】[0045]

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

【図1】本実施例の図形処理装置のハードウエア構成を
説明する図である。
FIG. 1 is a diagram illustrating a hardware configuration of a graphic processing device according to an embodiment.

【図2】第1の実施例の図形処理を説明するフローチャ
ートである。
FIG. 2 is a flowchart illustrating a graphic process of the first embodiment.

【図3】元図形の一例を示す図である。FIG. 3 is a diagram showing an example of an original figure.

【図4】分割された各要素を説明する図である。FIG. 4 is a diagram illustrating each divided element.

【図5】第2の実施例の図形処理を説明するフローチャ
ートである。
FIG. 5 is a flowchart illustrating graphic processing according to the second embodiment.

【図6】第2の実施例の図形処理過程をしめす図であ
る。
FIG. 6 is a diagram showing a graphic processing process of the second embodiment.

【図7】第2の実施例の図形処理過程をしめす図であ
る。
FIG. 7 is a diagram showing a graphic processing process of the second embodiment.

【図8】第2の実施例の図形処理過程をしめす図であ
る。
FIG. 8 is a diagram showing a graphic processing process of the second embodiment.

【図9】第2の実施例の図形処理過程をしめす図であ
る。
FIG. 9 is a diagram showing a graphic processing process of the second embodiment.

【図10】第2の実施例の図形処理過程をしめす図であ
る。
FIG. 10 is a diagram showing a graphic processing process of the second embodiment.

【図11】第2の実施例の図形処理過程をしめす図であ
る。
FIG. 11 is a diagram showing a graphic processing process of the second embodiment.

【図12】第3の実施例の図形処理を説明するフローチ
ャートである。
FIG. 12 is a flowchart illustrating graphic processing according to a third embodiment.

【図13】第3の実施例の図形処理過程をしめす図であ
る。
FIG. 13 is a diagram showing a graphic processing process of the third embodiment.

【図14】第3の実施例の図形処理過程をしめす図であ
る。
FIG. 14 is a diagram showing a graphic processing process of the third embodiment.

【図15】第3の実施例の図形処理過程をしめす図であ
る。
FIG. 15 is a diagram showing a graphic processing process of the third embodiment.

Claims (20)

【特許請求の範囲】[Claims] 【請求項1】 元図形から、この元図形を包含する図形
を生成する図形処理方法であって、 前記元図形から、基本図形要素を抽出する抽出工程と、 前記抽出された基本図形要素を、複数のプリミテイブ図
形要素に分割する分割工程と、 前記プリミテイブ図形要素から、前記元図形に対応する
閉図形を生成する生成工程と、を備えることを特徴とす
る図形処理方法。
1. A graphic processing method for generating a graphic including this original graphic from an original graphic, comprising: an extracting step of extracting a basic graphic element from the original graphic; A graphic processing method comprising: a dividing step of dividing into a plurality of primitive graphic elements; and a generating step of generating a closed graphic corresponding to the original graphic from the primitive graphic element.
【請求項2】 前記基本図形要素は、円であることを特
徴とする請求項1に記載の図形処理方法。
2. The graphic processing method according to claim 1, wherein the basic graphic element is a circle.
【請求項3】 前記基本図形要素は、円弧であることを
特徴とする請求項1に記載の図形処理方法。
3. The graphic processing method according to claim 1, wherein the basic graphic element is a circular arc.
【請求項4】 前記基本図形要素は、楕円であることを
特徴とする請求項1に記載の図形処理方法。
4. The graphic processing method according to claim 1, wherein the basic graphic element is an ellipse.
【請求項5】 前記生成工程は、 前記プリミテイブ図形要素から、所定距離離れた閉図形
を生成するプリミテイブ閉図形生成工程と、 生成された複数の閉図形間の論理和を演算して、論理和
閉図形を生成する論理和閉図形生成工程と、を備えるこ
とを特徴とする請求項1に記載の図形処理方法。
5. The generating step includes a primitive closed figure generating step of generating a closed figure separated from the primitive figure element by a predetermined distance, and a logical sum of a plurality of generated closed figures to obtain a logical sum. The graphic processing method according to claim 1, further comprising a logical sum closed graphic generation step of generating a closed graphic.
【請求項6】 前記生成工程は、 前記プリミテイブ図形要素から、所定距離離れた閉図形
を生成するプリミテイブ閉図形生成工程と、 生成された複数の閉図形間の論理和を演算して、論理和
閉図形を生成する論理和閉図形生成工程と、 前記論理和閉図形の内側に、別の図形が生成されていれ
ば、前記別の図形を前記論理和閉図形から別図形除去工
程と、を備えることを特徴とする請求項1に記載の図形
処理方法。
6. The generating step includes a primitive closed figure generating step of generating a closed figure that is a predetermined distance away from the primitive figure element, and a logical sum of a plurality of generated closed figures to obtain a logical sum. A disjunction closed figure generating step of generating a closed figure; and if another figure is generated inside the disjunction closed figure, the another figure is removed from the disjunction closed figure. The graphic processing method according to claim 1, further comprising:
【請求項7】 元図形に対するハッチング線分を生成す
る図形処理方法であって、 元図形に対する線分要素を設定する設定工程と、 前記元図形と前記線分要素の接触点座標を計算する計算
工程と、 前記接触点座標から、ハッチングに必要な接触点を選択
する選択工程と、 前記選択された接触点座標を、前記線分要素の始点に近
い順に並べるソーテイング工程と、 前記並べられた接触点座標に基づき、ハッチング線分を
生成するハッチング線分生成工程と、を備えることを特
徴とする図形処理方法。
7. A graphic processing method for generating a hatching line segment for an original graphic, comprising a setting step of setting a line segment element for the original graphic, and a calculation for calculating contact point coordinates of the original graphic and the line segment element. A step of selecting a contact point necessary for hatching from the step, the contact point coordinates, a sorting step of arranging the selected contact point coordinates in the order of being closer to the start point of the line segment element, and the arranged contact And a hatching line segment generating step of generating a hatching line segment based on the point coordinates.
【請求項8】 前記選択工程は、 前記元図形を構成する基本図形要素の端点や接線との接
触点を持つ前記接触点を除いた残りの前記接触点を選択
することを特徴とする請求項7に記載の図形処理方法。
8. The selecting step selects the remaining contact points excluding the contact points having a contact point with an end point or a tangent line of a basic graphic element forming the original graphic. The graphic processing method according to item 7.
【請求項9】 前記基本図形要素は円弧であることを特
徴とする請求項7に記載の図形処理方法。
9. The graphic processing method according to claim 7, wherein the basic graphic element is a circular arc.
【請求項10】 前記基本図形要素は直線分であること
を特徴とする請求項7に記載の図形処理方法。
10. The graphic processing method according to claim 7, wherein the basic graphic element is a straight line segment.
【請求項11】 元図形から、前記元図形を包含する図
形を生成する図形処理装置であって、 前記元図形から、基本図形要素を抽出する抽出手段と、 前記抽出された基本図形要素を、複数のプリミテイブ図
形要素に分割する分割手段と、 前記プリミテイブ図形要素から、前記元図形に対応する
閉図形を生成する生成手段と、を備えることを特徴とす
る図形処理装置。
11. A graphic processing device for generating a graphic including the original graphic from the original graphic, wherein the extracting means extracts a basic graphic element from the original graphic, the basic graphic element being extracted. A graphic processing device comprising: a dividing means for dividing into a plurality of primitive graphic elements; and a generating means for generating a closed graphic corresponding to the original graphic from the primitive graphic element.
【請求項12】 前記基本図形要素は、円であることを
特徴とする請求項11に記載の図形処理装置。
12. The graphic processing apparatus according to claim 11, wherein the basic graphic element is a circle.
【請求項13】 前記基本図形要素は、円弧であること
を特徴とする請求項11に記載の図形処理装置。
13. The graphic processing apparatus according to claim 11, wherein the basic graphic element is a circular arc.
【請求項14】 前記基本図形要素は、楕円であること
を特徴とする請求項11に記載の図形処理装置。
14. The graphic processing apparatus according to claim 11, wherein the basic graphic element is an ellipse.
【請求項15】 前記生成手段は、 前記プリミテイブ図形要素から、所定距離離れた閉図形
を生成するプリミテイブ閉図形生成手段と、 生成された複数の閉図形間の論理和を演算して、論理和
閉図形を生成する論理和閉図形生成手段と、を備えるこ
とを特徴とする請求項11に記載の図形処理装置。
15. The generating means calculates a logical sum of a primitive closed figure generating means for generating a closed figure separated from the primitive figure element by a predetermined distance, and a logical sum of a plurality of generated closed figures. The graphic processing apparatus according to claim 11, further comprising: a logical sum closed graphic generation unit that generates a closed graphic.
【請求項16】 前記生成手段は、 前記プリミテイブ図形要素から、所定距離離れた閉図形
を生成するプリミテイブ閉図形生成手段と、 生成された複数の閉図形間の論理和を演算して、論理和
閉図形を生成する論理和閉図形生成手段と、 前記論理和閉図形の内側に、別の図形が生成されていれ
ば、前記別の図形を前記論理和閉図形から別図形除去手
段と、を備えることを特徴とする請求項11に記載の図
形処理装置。
16. The generating means calculates a logical sum of the primitive closed figure generating means for generating a closed figure separated from the primitive figure element by a predetermined distance, and a logical sum of a plurality of generated closed figures. A disjunctive closed figure generating means for generating a closed figure; and if another figure is generated inside the disjunctive closed figure, the another figure is removed from the disjunctive closed figure with another figure. The graphic processing device according to claim 11, further comprising:
【請求項17】 元図形に対するハッチング線分を生成
する図形処理装置であって、 元図形に対する線分要素を設定する設定手段と、 前記元図形と前記線分要素の接触点座標を計算する計算
手段と、 前記接触点座標から、ハッチングに必要な接触点を選択
する選択手段と、 前記選択された接触点座標を、前記線分要素の始点に近
い順に並べるソーテイング手段と、 前記並べられた接触点座標に基づき、ハッチング線分を
生成するハッチング線分生成手段と、を備えることを特
徴とする図形処理装置。
17. A graphic processing device for generating a hatching line segment for an original graphic, comprising setting means for setting a line segment element for the original graphic, and calculation for calculating contact point coordinates of the original graphic and the line segment element. Means, selecting means for selecting a contact point required for hatching from the contact point coordinates, sorting means for arranging the selected contact point coordinates in the order of being closer to the start point of the line segment element, and the arranged contact And a hatching line segment generation means for generating a hatching line segment based on the point coordinates.
【請求項18】 前記選択手段は、 前記元図形を構成する基本図形要素の端点や接線との接
触点を持つ前記接触点を除いた残りの前記接触点を選択
することを特徴とする請求項17に記載の図形処理装
置。
18. The selecting means selects the remaining contact points excluding the contact points having contact points with the end points or tangents of the basic graphic elements forming the original graphic. The graphic processing device according to item 17.
【請求項19】 前記基本図形要素は円弧であることを
特徴とする請求項17に記載の図形処理装置。
19. The graphic processing apparatus according to claim 17, wherein the basic graphic element is a circular arc.
【請求項20】 前記基本図形要素は直線分であること
を特徴とする請求項17に記載の図形処理装置。
20. The graphic processing apparatus according to claim 17, wherein the basic graphic element is a straight line segment.
JP5270340A 1993-10-28 1993-10-28 Method and device for processing graphic Withdrawn JPH07121735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5270340A JPH07121735A (en) 1993-10-28 1993-10-28 Method and device for processing graphic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5270340A JPH07121735A (en) 1993-10-28 1993-10-28 Method and device for processing graphic

Publications (1)

Publication Number Publication Date
JPH07121735A true JPH07121735A (en) 1995-05-12

Family

ID=17484897

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5270340A Withdrawn JPH07121735A (en) 1993-10-28 1993-10-28 Method and device for processing graphic

Country Status (1)

Country Link
JP (1) JPH07121735A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007334436A (en) * 2006-06-12 2007-12-27 Nitto Denko Corp Graphic processor, processing method, and processing program
JP2016040677A (en) * 2014-08-12 2016-03-24 東芝機械株式会社 Image processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007334436A (en) * 2006-06-12 2007-12-27 Nitto Denko Corp Graphic processor, processing method, and processing program
JP2016040677A (en) * 2014-08-12 2016-03-24 東芝機械株式会社 Image processor

Similar Documents

Publication Publication Date Title
JP3599198B2 (en) Figure editing device
JPH07121735A (en) Method and device for processing graphic
JP3490169B2 (en) Three-dimensional animation processing system and processing method
JP3696909B2 (en) Graphic processing method and apparatus
JPH0696178A (en) Graphic processing system
JPH0816803A (en) Graphic processor and graphic processing method
JPH04167075A (en) Method and device for image processing
JPH1031760A (en) Graphic processor
JPH06259507A (en) Graphic dividing device
JPH10222338A (en) Window display control device and method, information processing unit and method, and storage medium
JPH03211675A (en) Cad drawing display system
JP2714114B2 (en) Graphic processing method and graphic system
JP2616443B2 (en) Graphic drawing device
JP2713265B2 (en) Image display device
JPH06150016A (en) Graphic display device
JPS6231478A (en) Interactive split picture producer
JPH07262394A (en) Integrating device for adjacent polygon
JPH08335277A (en) Graphic processor
JPH06195437A (en) Three dimensional animation processing system
JPH0373073A (en) Information processor with picture editing function
JPH09319783A (en) Hidden line processing method for parametric graphic
JPH0855244A (en) Stereographic data input method
JPH08202898A (en) Graphic processor and method therefor
JPH10111957A (en) System and method for mesh generation and recording medium
JPH06282618A (en) Graphic plotting device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010130