Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP2641877B2 - Information processing system - Google Patents
[go: Go Back, main page]

JP2641877B2 - Information processing system - Google Patents

Information processing system

Info

Publication number
JP2641877B2
JP2641877B2 JP62318232A JP31823287A JP2641877B2 JP 2641877 B2 JP2641877 B2 JP 2641877B2 JP 62318232 A JP62318232 A JP 62318232A JP 31823287 A JP31823287 A JP 31823287A JP 2641877 B2 JP2641877 B2 JP 2641877B2
Authority
JP
Japan
Prior art keywords
area
arc
data
contour
axis
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
JP62318232A
Other languages
Japanese (ja)
Other versions
JPH01159773A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP62318232A priority Critical patent/JP2641877B2/en
Publication of JPH01159773A publication Critical patent/JPH01159773A/en
Application granted granted Critical
Publication of JP2641877B2 publication Critical patent/JP2641877B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術(第8図) 発明が解決しようとする問題点 問題点を解決するための手段(第1図) 作用 実施例 (a)一実施例の説明(第2図、第3図) (b)面積演算方法の説明(第4図、第5図、第6図、
第7図) (c)他の実施例の説明 発明の効果 〔概要〕 CADシステム等の解析処理に用いられ、自動設計した
円弧を含む二次元の閉領域の面積を求める情報処理シス
テムに関し、 処理ロジックが簡単で且つプログラムサイズを小に
し、処理時間も短くて済むことを目的とし、 円弧を含む閉領域の輪郭線データを格納するメモリ
と、該輪郭線データから該円弧を含む閉領域の面積を演
算する処理部とを有する装置において、該閉領域の円弧
を除いた領域の面積を該輪郭線データから演算するとと
もに、該円弧を該閉領域に沿って検索し、該円弧の輪郭
線データから該円弧の面積を演算し、該検索方向に対す
る該円弧の方向に応じた符号を付し、該円弧を除いた領
域の面積に加えるようにした。
Detailed Description of the Invention [Table of Contents] Overview Industrial application field Conventional technology (Fig. 8) Problems to be solved by the invention Means for solving the problems (Fig. 1) Action embodiment (a) (2) Description of one embodiment (FIGS. 2 and 3) (b) Description of area calculation method (FIGS. 4, 5, and 6)
(FIG. 7) (c) Description of Another Embodiment Effect of the Invention [Overview] An information processing system that is used in analysis processing of a CAD system or the like and obtains the area of a two-dimensional closed area including an automatically designed arc is described. A memory for storing contour data of a closed region including a circular arc, and an area of the closed region including the circular arc from the contour line data, for the purpose of simplifying the logic, reducing the program size, and shortening the processing time. And a processing unit for calculating the area of the closed area excluding the arc from the contour data, and searching for the arc along the closed area, the contour data of the arc , The area of the arc is calculated, a code is added according to the direction of the arc with respect to the search direction, and the area is added to the area of the region excluding the arc.

〔産業上の利用分野〕[Industrial applications]

本発明は、CADシステム等の解析処理に用いられ、自
動設計した円弧を含む二次元の閉領域の面積を求める情
報処理システムに関する。
The present invention relates to an information processing system which is used for analysis processing of a CAD system or the like and calculates an area of a two-dimensional closed region including an automatically designed arc.

コンピュータによる自動設計を図るCAD(Computer Ai
ded Design)システムが、広く利用されている。
CAD (Computer Ai) for automatic design by computer
ded Design) system is widely used.

このようなCADシステムを用いて、設計した機械部品
等においては、その面積を強度計算や重量等を得るため
に演算する必要がある。
In a mechanical part designed using such a CAD system, its area needs to be calculated in order to calculate strength, obtain weight, and the like.

このような面積の演算において、多角形などは比較的
容易に演算できるが、一部に円弧を含む閉領域のものは
容易でなく、簡易に且つ短時間に演算できる技術が求め
られている。
In such an area calculation, a polygon or the like can be calculated relatively easily, but a closed region partially including a circular arc is not easy, and a technique capable of performing calculation easily and in a short time is required.

〔従来の技術〕[Conventional technology]

第8図は従来技術の説明図である。 FIG. 8 is an explanatory diagram of the prior art.

第8図(A)に示すように、5角形の三辺に円弧l2
l5、l8が設けられた閉領域の面積を演算するには、第8
図(C)の処理フローによって面積を演算できる。
As shown in FIG. 8 (A), arcs l 2 ,
To calculate the area of the closed area provided with l 5 and l 8 ,
The area can be calculated by the processing flow of FIG.

先づ、円弧l2、l5、l8を無視した閉領域、この場合は
第8図(B)の実線に示す5角形の面積Saを、輪郭線デ
ータl1、l3、l4、l6、l7、l9より演算する。
First, the closed area ignoring the arcs l 2 , l 5 , l 8 , in this case, the pentagonal area Sa shown by the solid line in FIG. 8 (B) is defined as the contour data l 1 , l 3 , l 4 , l 6, is calculated from l 7, l 9.

次に、円弧部分l2、l5、l8が、5角形に対し凸か凹か
を調べる。
Next, it is checked whether the arc portions l 2 , l 5 and l 8 are convex or concave with respect to the pentagon.

このため、円弧線分上の任意の点(xn、ym)が、円弧
を無視した図形(5角形)内に含まれるかをロジックに
より判定し、含まれていれば凹として、その円弧面積Sc
をSaから減算し、含まれていなければ凸として、この円
弧面積ScをSaに加えるようにしていた。
Therefore, it is determined by logic whether an arbitrary point (xn, ym) on the arc segment is included in the figure (pentagon) ignoring the arc, and if it is included, it is determined as a concave and the arc area Sc
Is subtracted from Sa, and if it is not included, it is regarded as convex, and this arc area Sc is added to Sa.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

しかしながら、係る従来の面積演算方法では、円弧部
分の図形に対する凸凹を、円弧線上の点と図形との位置
関係を演算によって調べる必要があり、処理ロジックが
複雑であり、プログラムサイズが大きいという問題があ
る他に、処理時間も長くなるという問題があった。
However, in such a conventional area calculation method, it is necessary to check the positional relationship between a point on the arc line and the figure by calculating the unevenness of the figure in the arc portion by calculation, and the processing logic is complicated and the program size is large. In addition, there is a problem that the processing time becomes longer.

本発明は、処理ロジックを簡単で且つプログラムサイ
ズも小で処理時間も短くて済む円弧を含む閉領域の面積
演算方法を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a method for calculating the area of a closed region including a circular arc, which has a simple processing logic, a small program size, and a short processing time.

〔問題点を解決するための手段〕[Means for solving the problem]

第1図は本発明の原理説明図である。 FIG. 1 is a diagram illustrating the principle of the present invention.

図中、1はメモリであり、円弧を含む閉領域の輪郭線
データが格納されているもの、2は処理部であり、メモ
リ1の輪郭線データが円弧を含む閉領域の面積を演算す
るものである。
In the figure, reference numeral 1 denotes a memory in which contour data of a closed region including an arc is stored, and 2 denotes a processing unit which calculates the area of the closed region in which the contour data in the memory 1 includes an arc. It is.

本発明は前記の目的を達成するため、円弧を含む図形
を示す図形情報を処理する情報処理システムにおいて、
図形の図形情報および各円弧の変位方向を示す情報を記
憶する記憶手段と、該図形情報に基づき、円弧を除いた
閉領域の面積を計算する第一計算手段と、該図形情報に
基づき、各円弧の面積を計算する第二計算手段と、各円
弧の変位方向情報に基づき、該円弧の面積の符号を決定
する符号決定手段と、当該符号を付与した対応する第二
計算手段により計算される円弧の面積を、第一計算手段
により計算される円弧を除いた閉領域の面積に加算し
て、円弧を含む図形の面積を計算する第三計算手段とを
設けた。
In order to achieve the above object, the present invention provides an information processing system for processing graphic information indicating a graphic including an arc,
Storage means for storing graphic information of a graphic and information indicating a displacement direction of each arc; first calculating means for calculating an area of a closed region excluding an arc based on the graphic information; The second calculating means for calculating the area of the arc, the sign determining means for determining the sign of the area of the arc based on the displacement direction information of each arc, and the corresponding second calculating means to which the sign is assigned are calculated. Third calculation means is provided for adding the area of the arc to the area of the closed region excluding the arc calculated by the first calculation means to calculate the area of the figure including the arc.

本発明は、第1図(B)のように輪郭線データから円
弧を除いた領域の面積Saを演算するとともに円弧の面積
演算を次のようにして行う。
In the present invention, as shown in FIG. 1 (B), the area Sa of the region excluding the arc from the contour data is calculated, and the area calculation of the arc is performed as follows.

円弧の検索方向を第1図(C)〜(E)の如く反時計
方向とすると、円弧l2は第1図(C)のように反時計方
向(左回り)なので、円弧l2の面積Sc1に正の符号を付
す。
When counterclockwise as the search direction of the arc first diagram (C) ~ (E), counter so-clockwise (counterclockwise), the area of arc l 2 as in the first diagram arc l 2 (C) Add a positive sign to Sc 1 .

同様に円弧l5は第1図(D)のように時計方向(右回
り)なので、円弧l5の面積Sc2に負の符号を付し、円弧l
8は第1図(E)のように反時計方向なので、円弧l8
面積Sc3に正の符号を付す。
Similarly since the arc l 5 is clockwise as the first diagram (D) (clockwise), given the negative sign area Sc 2 arc l 5, arc l
Since 8 is a counterclockwise direction as shown in FIG. 1 (E), given the positive sign in an area Sc 3 arc l 8.

そして、これを加えることによって面積Aが得られ
る。
Then, by adding this, the area A is obtained.

〔作用〕[Action]

本発明は、閉領域での円弧部分の凹凸を判定するので
はなく、凹凸を意識することなく、そのものの形状をそ
のまま利用するようにしている。
The present invention does not judge the unevenness of the circular arc portion in the closed region, but uses the shape of the arc as it is without being conscious of the unevenness.

即ち、円弧の検索方向に対する円弧の方向を調べるこ
とによって、凹か凸かが判別でき、面積演算と同時に加
算か減算かを識別できる。
That is, by examining the direction of the circular arc with respect to the search direction of the circular arc, it can be determined whether it is concave or convex, and it is possible to identify addition or subtraction simultaneously with the area calculation.

従って、単に円弧の方向を調べればよいので、処理ロ
ジックが簡単で且つプログラムサイズも小で処理時間も
少なくて済む。
Therefore, since it is sufficient to simply check the direction of the arc, the processing logic is simple, the program size is small, and the processing time is short.

〔実施例〕〔Example〕

(a)一実施例の説明 第2図は本発明の一実施例ブロック図であり、エンジ
ニアリングワークステーションを例に示してある。
(A) Description of one embodiment FIG. 2 is a block diagram of one embodiment of the present invention, showing an engineering workstation as an example.

図中、第1図で示したものと同一のものは同一の記号
で示してあり、3aは表示部であり、高精度図形ディスプ
レイで構成されており、3bは入力部であり、キーボー
ド、座標入力装置等を含むものである。
In the figure, the same components as those shown in FIG. 1 are indicated by the same symbols, 3a is a display unit, which is constituted by a high-precision graphic display, 3b is an input unit, a keyboard, coordinates It includes an input device and the like.

処理部2は主制御プロセッサと、図形と処理プロセッ
サとを含み、図形処理とその他の処理を分担する。
The processing unit 2 includes a main control processor, a graphic and a processor, and shares graphic processing and other processing.

メモリ1には、輪郭線データが格納されており、角輪
郭線データの番号に対応して、直線か、円弧かの線分種
別(直線は“1"、円弧は“2")、直線始点座標(xn、y
n)又は円弧の中心座標(xr、yr)、直線の単位方向ベ
クトル又は円弧の始点角度(始角)、終点角度(終
角)、及び直線の長さ又は円弧の半径が格納されてい
る。
The contour data is stored in the memory 1, and a line segment type (straight line "1", circular arc "2") corresponding to the number of the corner contour data (straight line or arc), straight line start point Coordinates (xn, y
n) or the center coordinates (xr, yr) of the arc, the unit direction vector of the straight line or the start point angle (start angle) and end point angle (end angle) of the arc, and the length of the straight line or the radius of the arc.

第3図は本発明の一実施例対象閉領域の説明図であ
り、これを用いて輪郭線データを具体的に説明する。
FIG. 3 is an explanatory diagram of a target closed region according to an embodiment of the present invention, and the contour line data will be specifically described with reference to FIG.

第3図の閉領域は、第8図(A)で示したものと同一
のものであり、5角形に3つの円弧l2、l5、l8が設けら
れているものである。
The closed area in FIG. 3 is the same as that shown in FIG. 8 (A), in which three arcs l 2 , l 5 and l 8 are provided in a pentagon.

ここで、左回り(反時計方向)に昇順に輪郭線データ
をとるとする。
Here, it is assumed that the contour data is taken counterclockwise (counterclockwise) in ascending order.

輪郭線l1のデータは、直線であるから種別は“1"、直
線始点座標はP1(x1、y1)、直線の単位方向ベクトル
は、x方向が正の“1"、y方向は“0"、長さはL1であ
る。
Data of the contour line l 1 is the type from a straight line "1", a straight line starting coordinates P 1 (x 1, y 1), the unit direction vector of the straight line, x-direction positive "1", y-direction Is "0" and the length is L1.

輪郭線l2のデータは、円弧であるから種別は“2"、円
弧の中心は01(x1′、y1′)、円弧の始点P2(図の座標
x2、y1の点)の角度は、01からP2へは−x方向のため、
π、終点P3の角度は同様に01からP3へは−x方向のた
め、半径はr1である。
Data of the contour line l 2 is the type since an arc "2", the center of the arc is 0 1 (x 1 ', y 1'), the starting point of the arc P 2 (Fig coordinates
The angle of x 2 , y 1 ) is -x direction from 0 1 to P 2 ,
Similarly, since the angle of π and the end point P 3 is from −1 to P 3 in the −x direction, the radius is r 1 .

以下、同様であり、第2図に示す如くの輪郭線l3〜l9
のデータとなる。
Hereinafter, a similar contour line l 3 as denoted in FIG. 2 to l 9
Data.

結局、直線は、始点座標と、直線の単位方向ベクト
ル、長さで示し、円弧は、中心座標と、円弧の始点、終
点の角度、半径で示す。
After all, a straight line is represented by start point coordinates, a unit direction vector and a length of the straight line, and an arc is represented by center coordinates and angles and radii of the start point and end point of the arc.

尚、始点、終点の角度は、円弧の中心から始点、終点
に線分を引いた時に、x軸に平行な線を基準とし、線分
が+x方向を「0」、−x方向を「π」としたラジアン
で表す。
The angles of the starting point and the ending point are defined as follows: when a line segment is drawn from the center of the arc to the starting point and the ending point, a line parallel to the x axis is used as a reference. In radians.

(b)面積演算方法の説明 第4図は本発明の一実施例処理フロー図、第5図乃至
第7図は本発明の一実施例説明図である。
(B) Description of Area Calculation Method FIG. 4 is a processing flowchart of an embodiment of the present invention, and FIGS. 5 to 7 are explanatory diagrams of an embodiment of the present invention.

この面積演算方法は、線分とX軸(又はY軸)との面
積を順次求めて、加算することによって全体の閉領域の
面積を得る。
In this area calculation method, the area of the line segment and the area of the X axis (or Y axis) are sequentially obtained and added to obtain the area of the entire closed region.

そして、閉領域の輪郭線を右回り又は左回りに処理
し、X軸について値の変化しているものと、円弧のみを
処理対象とする。
Then, the contour line of the closed region is processed clockwise or counterclockwise, and only the object whose value changes on the X axis and the arc are processed.

第4図によって面積演算処理について説明する。 The area calculation processing will be described with reference to FIG.

先づ、処理部(以下CPUと称す)2は、自己のメモ
リ内の面積累積領域の内容Aを0にリセットする。
First, the processing unit (hereinafter referred to as CPU) 2 resets the content A of the area accumulation area in its own memory to zero.

次にCPU2は、メモリ1の閉領域の輪郭線データを先
頭から順に読み出し、処理に入るが、読み出すデータが
終了かを判定する。
Next, the CPU 2 reads out the contour data of the closed area of the memory 1 sequentially from the top and starts the processing, and determines whether the data to be read is completed.

終了でなければ、メモリ1の輪郭線データを読み出
し、CPU2は、データの単位方向ベクトル欄を調べ、x軸
の値の変化があるかを調べる。
If not finished, the contour line data in the memory 1 is read out, and the CPU 2 checks the unit direction vector field of the data and checks whether there is a change in the value of the x-axis.

x軸の単位方向ベクトルが“0"以外なら、x軸の値の
変化がある直線と判定する。
If the unit direction vector of the x-axis is other than “0”, it is determined that the straight line has a change in the value of the x-axis.

一方、円弧の場合は、円弧を無視し、中心位置と半径
から始点と終点を求め、始点、終点間でX軸の値の変化
があるかを調べる。
On the other hand, in the case of a circular arc, the circular arc is ignored, the starting point and the ending point are obtained from the center position and the radius, and it is checked whether there is a change in the X-axis value between the starting point and the ending point.

X軸の値の変化がなければ、ステップに進む。 If there is no change in the value of the X axis, the process proceeds to the step.

X軸の値の変化があると、次にY軸の値の変化がある
かを調べる。
If there is a change in the value on the X-axis, then it is checked whether there is a change in the value on the Y-axis.

直線の場合は、Y軸の単位方向ベクトルが“0"以外な
らY軸の値の変化が有ると判定し、円弧の場合は始点と
終点間でY軸の値の変化があるかを調べる。
In the case of a straight line, if the unit direction vector of the Y-axis is other than "0", it is determined that there is a change in the value of the Y-axis. In the case of an arc, it is checked whether the value of the Y-axis has changed between the start point and the end point.

Y軸の値に変化があれば、第7図(B)で後述する
ように、輪郭線は斜めのため、輪郭線とX軸との間の部
分を三角形部分と四角形部分に分け、両者の面積を計算
する。
If there is a change in the value of the Y-axis, the portion between the contour and the X-axis is divided into a triangular portion and a quadrangular portion as described later with reference to FIG. Calculate the area.

一方、Y軸の値に変化がないと、輪郭線はX軸に平行
のため、第5図(A)等で後述するように輪郭線とX軸
との間の四角形部分の面積を計算する。
On the other hand, if there is no change in the value of the Y-axis, the outline is parallel to the X-axis. Therefore, the area of the square portion between the outline and the X-axis is calculated as described later with reference to FIG. .

次に、CPU2は、係る読み出した輪郭線データの線分
種別より、円弧か否かを判定し、円弧なら、中心座標、
半径、始角、終角より円弧部分の面積を計算する。
Next, the CPU 2 determines whether or not the arc is an arc based on the line segment type of the contour data thus read out.
Calculate the area of the arc from the radius, start angle and end angle.

円弧でなければ、又はステップの終了後、ステッ
プ、で計算した面積を累積内容Aに加算して更新
し、ステップに戻る。
If it is not a circular arc, or after the end of the step, the area calculated in the step is added to the accumulated content A, updated, and the process returns to the step.

このようにして、CPU2はメモリ1の全てのデータの
処理を終了すると、累積内容Aの絶対値|A|を求め、こ
れを閉領域の面積とし、終了する。
When the CPU 2 completes the processing of all data in the memory 1 in this way, it calculates the absolute value | A | of the accumulated content A, sets this as the area of the closed area, and ends the processing.

以上の処理を第3図の図形を例に第5図乃至第7図に
よって説明する。
The above processing will be described with reference to FIGS. 5 to 7 by taking the figure of FIG. 3 as an example.

(i)先づ、メモリ1の輪郭線(l1)データNo.1を調べ
ると、ステップでデータは、X軸の値の変化のみであ
るから、第5図(A)に示すように、四角形の面積S1
計算する。
(I) First, when the contour (l 1 ) data No. 1 in the memory 1 is examined, since the data is only the change in the value of the X axis in the step, as shown in FIG. calculating the area S 1 of the rectangle.

即ち、始点P1のy座標y1を高さ、線分の長さL1を幅と
して、S1=L1・y1によって計算するL1=(x2−x6)。こ
れによってA=S1となる。
That, y coordinates y 1 the height of the starting point P 1, a line segment of length L 1 as width, L 1 = (x 2 -x 6) calculated by S 1 = L 1 · y 1. This becomes A = S 1.

(ii)次に、輪郭線(l2)データNo.2については、円弧
であるが、円弧を無視し、第5図(B)の如く、線分P2
P3として考える。
(Ii) Next, the contour (l 2 ) data No. 2 is a circular arc, but the circular arc is ignored and the line segment P 2 as shown in FIG.
Considered as P 3.

この時始点、終点間の傾きは、X軸“1"であるので計
算対象とし、ステップ、によって、四角形の面積S2
を求める。
At this time, since the slope between the start point and the end point is the X-axis “1”, it is set as a calculation target, and the area of the square S 2 is determined by the step.
Ask for.

面積S2は、中心座標のy座標y1と半径r1とから、S2
(x3−x2)・y1でえる。
The area S 2 is obtained from the y coordinate y 1 of the center coordinate and the radius r 1 as S 2 =
(X 3 −x 2 ) · y 1

更に、ステップで円弧であるから、円弧の面積を求
める。
Further, since the step is a circular arc, the area of the circular arc is determined.

この時、円弧の端点P2、P3のまわり方は、始角、終角
より左回りと判るので、面積S3は第5図(C)のように
「マイナス」とする。
At this time, the area around the end points P 2 and P 3 of the arc is determined to be counterclockwise from the start angle and the end angle, so the area S 3 is set to “minus” as shown in FIG. 5 (C).

尚、以下の図で右から左の斜線部は、「プラス」の面
積、左から右の斜線部は「マイナス」の面積を示す。
In the following figures, the hatched portion from right to left indicates the area of “plus”, and the hatched portion from left to right indicates the area of “minus”.

S3は、π・r1 2/2でえられ、ステップで加算する
と、第5図(D)に示すように、A=S1+S2+(−S3
となる。
S 3 is obtained example by π · r 1 2/2, when added in step, as shown in FIG. 5 (D), A = S 1 + S 2 + (- S 3)
Becomes

(iii)次に、輪郭線(l3)データNo.3については、ス
テップ(i)で示した輪郭線データNo.1と同一の手法
で、面積S4=L2・y1を得(L2=x4−x3)、累積により、
第5図(E)の如く、A=S1+S2+(−S3)+S4とな
る。
(Iii) Next, for the contour (l 3 ) data No. 3, the area S 4 = L 2 · y 1 is obtained by the same method as the contour data No. 1 shown in step (i) ( L 2 = x 4 −x 3 )
As shown in FIG. 5 (E), A = S 1 + S 2 + (− S 3 ) + S 4 .

(iv)次に、輪郭線データ(l4)No.4については、X軸
の傾きが「−1」のため、四角形の面積S5は、第6図
(A)の如く、S5=L3・y3によって得、且つ「マイナ
ス」の面積となる。何故ならばL3=x5−x4であり、x5
x4より小さい。従ってL3は「マイナス」となるからであ
る。
(Iv) Next, for the contour line data (l 4 ) No. 4, since the inclination of the X axis is “−1”, the area S 5 of the square is S 5 = It is obtained by L 3 · y 3 and has a “minus” area. Because L 3 = x 5 −x 4 and x 5 is
x 4 smaller. Therefore L 3 is because the "minus".

これを、第5図(E)の面積Aに加算すると、第5図
(B)に示すように、A=S1+S2+(−S3)+S4+(−
S5)となる。
When this is added to the area A in FIG. 5 (E), as shown in FIG. 5 (B), A = S 1 + S 2 + (− S 3 ) + S 4 + (−
The S 5).

(v)次に輪郭線(l5)データNo.5については、ステッ
プ(ii)に示した円弧の輪郭線データNo.2と同一の手法
で、第6図(C)に示すように、円弧を無視した線分と
P5P6として考え、四角形の面積S6をS6=y3・(x6−x5
より求める。
(V) Next, with respect to the contour (l 5 ) data No. 5, in the same manner as the arc contour data No. 2 shown in step (ii), as shown in FIG. Line segments that ignore arcs
Considering P 5 P 6 , the square area S 6 is S 6 = y 3 · (x 6 −x 5 )
Find more.

この時、端点P6とP5の座標を比べると、P6のx座標が
P5のx座標より小のため、面積は「マイナス」となる。
At this time, when comparing the coordinates of the end points P 6 and P 5, x-coordinate of P 6 is
For less than the x-coordinate of P 5, the area is "negative".

更に、円弧の面積を求める。円弧l2の端点P5P6のまわ
り方は、ステップ(ii)と同様の判定で右回りなので、
面積S7=π・r2 2/2は「プラス」となる。
Further, the area of the arc is determined. Since the direction around the end point P 5 P 6 of the arc l 2 is clockwise in the same judgment as in step (ii),
Area S 7 = π · r 2 2 /2 is "positive".

これらを、第6図(B)の面積Aに加算すると、第6
図(D)の如く、A=S1+S2+(−S3)+S4+(−S5
+(−S6)+S7となる。
When these are added to the area A in FIG.
As shown in FIG. (D), A = S 1 + S 2 + (− S 3 ) + S 4 + (− S 5 )
+ (− S 6 ) + S 7 .

(vi)次に、輪郭線(l6)データNo.6については、ステ
ップ(i)、(iv)と同一で、四角形の面施S8=y3・y4
によって得(L4=x7−x6)、ステップ(iv)と同一で面
積は「マイナス」となるから、第6図(D)の面積Aに
加算すると、第7図(A)の如く、A=S1+S2+(−
S3)+S4+(−S5)+(−S6)+S7+(−S8)となる。
(Vi) Next, the contour (l 6 ) data No. 6 is the same as the steps (i) and (iv), and the square surface application S 8 = y 3 · y 4
(L 4 = x 7 −x 6 ), and the area is “minus” in the same manner as in the step (iv). When the area is added to the area A in FIG. 6 (D), as shown in FIG. 7 (A) , A = S 1 + S 2 + (−
S 3) + S 4 + ( - S 5) + (- S 6) + S 7 + (- a S 8).

(vii)更に輪郭線(l7)データNo.7については、第7
図(B)の如く、斜め線分のため、図形を三角形のS9
四角形のS10に分解する。四角形の面積S10は、y3(x8
x7)によって求め、ステップ(iv)と同一で「マイナ
ス」の面積となる。
(Vii) Further, regarding the contour (l 7 ) data No. 7,
Figure as (B), because of the oblique line segment, decomposes shapes to S 10 of S 9 and a square triangle. The area S 10 of the square is y 3 (x 8
x 7 ), which is the same as step (iv) and has a “minus” area.

一方、三角形の面積S9は、この三角形は直角三角形の
ため、線分l7の始点P7、終点P8の座標から、S9=(x8
x7)・(y4−y3)/2より求め、「プラス」の面積とな
る。
On the other hand, the area S 9 of the triangle, because of this triangle right triangle, the start point P 7 of the line segment l 7, the coordinates of the end point P 8, S 9 = (x 8 -
x 7 ) · (y 4 −y 3 ) / 2, which is a “plus” area.

これを第7図(A)の面積Aに加えると、第7図
(C)の如く、A=S1+S2+(−S3)+S4+(−S5)+
(−S6)+S7+(−S8)+S9+(−S10)となる。
When this is added to the area A in FIG. 7 (A), as shown in FIG. 7 (C), A = S 1 + S 2 + (− S 3 ) + S 4 + (− S 5 ) +
(−S 6 ) + S 7 + (− S 8 ) + S 9 + (− S 10 ).

(viii)次に、輪郭線(l8)データNo.8については、基
本的にはステップ(ii)の円弧の処理と同一である。
(Viii) Next, the outline (l 8 ) data No. 8 is basically the same as the arc processing in step (ii).

この時、円弧l8を無視したとき斜め線であるので、第
7図(D)の如く、先づ第7図(B)と同様、四角形の
面積S11(「マイナス」の面積)、三角形の面積S
12(「プラス」の面積)を求め、次に円弧l8の面積S13
をステップ(ii)と同様に求める。円弧l8は左回りなの
で面積S13は「マイナス」の面積である。
In this case, since a diagonal line when ignoring the arc l 8, as FIG. 7 (D), similarly to the above Dzu Figure 7 (B), the area of the rectangle S 11 (the area of the "negative"), the triangle Area S
12 (the area of “plus”) and then the area S 13 of the arc l 8
Is obtained in the same manner as in step (ii). Arc l 8 is so counterclockwise area S 13 is the area of the "minus".

これを第7図(C)の面積Aに加えると、第7図
(E)の如く、A=S1+S2+(−S3)+S4+(−S5)+
(−S6)+S7+(−S8)+S9+(−S10)+(−S11)+
S12+(−S13)となる。
When this is added to the area A in FIG. 7 (C), as shown in FIG. 7 (E), A = S 1 + S 2 + (− S 3 ) + S 4 + (− S 5 ) +
(−S 6 ) + S 7 + (− S 8 ) + S 9 + (− S 10 ) + (− S 11 ) +
S 12 + (− S 13 ).

(ix)最後に、輪郭線(l9)データNo.9については、ス
テップ(vii)の斜め線l7と同様、「マイナス」の四角
形面積S14と「プラス」の三角形面積S15を計算し、第7
図(E)の面積Aに加えると、第7図(F)の如く、 A=S1+S2+(−S3)+S4+(−S5)+(−S6) +S7+(−S8)+S9+(−S10)+(−S11) +S12+S13+(S14)+S15 ……(1) となり、閉領域の全面積が得られる。
(Ix) Finally, for the contour (l 9 ) data No. 9, similarly to the diagonal line l 7 in the step (vii), the “minus” square area S 14 and the “plus” triangle area S 15 are calculated. And the seventh
In addition to the area A in FIG. (E), as shown in FIG. 7 (F), A = S 1 + S 2 + (− S 3 ) + S 4 + (− S 5 ) + (− S 6 ) + S 7 + ( −S 8 ) + S 9 + (− S 10 ) + (− S 11 ) + S 12 + S 13 + (S 14 ) + S 15 (1), and the total area of the closed region is obtained.

この例では、左回りに図形要素を計算したため、面積
Aは「マイナス」となる。
In this example, since the figure element is calculated counterclockwise, the area A is “minus”.

従って、第4図のステップで求めた値Aの絶対値を
とり、符号を正とする。
Accordingly, the absolute value of the value A obtained in the step of FIG. 4 is taken, and the sign is made positive.

この実施例では結局、第(1)式より、 A=(S1+S2+S4−S5−S6−S8+S9−S10 +S11+S12−S14+S15)+(−S3+S7+S13) ……(2) となり、前者は円弧を無視した第1図(B)の閉領域の
面積であり、後者は全円弧の面積である。
In this embodiment, after all, from the equation (1), A = (S 1 + S 2 + S 4 −S 5 −S 6 −S 8 + S 9 −S 10 + S 11 + S 12 −S 14 + S 15 ) + (− S 3 + S 7 + S 13) ...... (2) , and the former is the area of a closed region of the first view which ignores an arc (B), the latter is the area of all arcs.

従って、円弧を無視した面積と全円弧の面積を求めて
いることになる。
Therefore, the area ignoring the arc and the area of all the arcs are obtained.

そして、輪郭線を順番に処理しているため、前述の順
で各図形要素の面積が計算される。
Since the contours are processed in order, the area of each graphic element is calculated in the order described above.

この方法は輪郭線を順に処理すればよいため、処理が
簡単で且つ処理時間が短くて済む他に、他の輪郭線のデ
ータを参照せずにX軸との関係だけで各図形要素の面積
が求まり、処理を一層簡単化できる。
Since this method only needs to process contours in order, the processing is simple and the processing time is short. In addition, the area of each graphic element is determined only by the relationship with the X axis without referring to other contour data. And the processing can be further simplified.

(c)他の実施例の説明 上述の実施例では、左回りに図形要素を計算したが、
右回りで計算してもよく、この場合求まる面積Aは「プ
ラス」となり、X軸を基準とする代わりにY軸を基準に
面積を求めてもよい。
(C) Description of Another Embodiment In the above-described embodiment, the graphic element is calculated counterclockwise.
The calculation may be performed clockwise. In this case, the area A obtained is “plus”, and the area may be calculated based on the Y axis instead of the X axis.

又、第(2)式のように円弧を無視した面積を求めた
後に全円弧の面積を求めるようにしてもよく、円弧を無
視した閉領域の面積の求め方は他の方法によってもよ
い。
Alternatively, the area of all the circular arcs may be obtained after calculating the area ignoring the circular arc as in Equation (2), and the method of obtaining the area of the closed region ignoring the circular arc may be another method.

更に、円弧も半円に限らず、部分円にも適用でき、閉
領域の形状も種々のものを用いることができ、第1象限
の図形で説明したが、他の象限又は複数象限に股がる図
形についても同一の半径で面積を求めることができる。
Further, the arc is not limited to a semicircle, but can be applied to a partial circle, and various shapes of the closed region can be used, and the figure in the first quadrant has been described. The figure can be calculated with the same radius.

以上本発明を実施例により説明したが、本発明は本発
明の主旨に従い種々の変形が可能であり、本発明からこ
れらを排除するものではない。
Although the present invention has been described with reference to the embodiments, the present invention can be variously modified in accordance with the gist of the present invention, and these are not excluded from the present invention.

〔発明の効果〕〔The invention's effect〕

以上説明した様に、本発明によれば、円弧部分の凹凸
を意識することなく、そのものの形状(方向)によっ
て、閉領域に対し、加えるか減じるかを判定でき、面積
演算とともにできるという効果を奏し、面積演算の処理
ロジックを簡単にし、プログラムサイズを小とし、処理
時間を少なくて済む。
As described above, according to the present invention, it is possible to determine whether to add to or subtract from a closed region based on the shape (direction) of the arc, without being aware of the unevenness of the arc portion, and to obtain the effect that the area can be calculated. Therefore, the processing logic of the area calculation can be simplified, the program size can be reduced, and the processing time can be reduced.

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

第1図は本発明の原理説明図、 第2図は本発明の一実施例ブロック図、 第3図は本発明の一実施例対象閉領域の説明図、 第4図は本発明の一実施例処理フロー図、 第5図乃至第7図は本発明の一実施例説明図、 第8図は従来技術の説明図である。 図中、1……メモリ、 2……処理部、 l1〜l9……輪郭線。FIG. 1 is a diagram for explaining the principle of the present invention, FIG. 2 is a block diagram of an embodiment of the present invention, FIG. 3 is an explanatory diagram of a closed region to be subjected to an embodiment of the present invention, and FIG. FIGS. 5 to 7 are explanatory diagrams of an embodiment of the present invention, and FIG. 8 is an explanatory diagram of a conventional technique. In the figure, 1... Memory, 2... Processing unit, l 1 to l 9 .

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】円弧を含む図形を示す図形情報を処理する
情報処理システムにおいて、 図形の図形情報および各円弧の変位方向を示す情報を記
憶する記憶手段と、 該図形情報に基づき、円弧を除いた閉領域の面積を計算
する第一計算手段と、該図形情報に基づき、各円弧の面
積を計算する第二計算手段と、 各円弧の変位方向情報に基づき、該円弧の面積の符号を
決定する符号決定手段と、 当該符号を付与した対応する第二計算手段により計算さ
れる円弧の面積を、第一計算手段により計算される円弧
を除いた閉領域の面積に加算して、円弧を含む図形の面
積を計算する第三計算手段と、 を有することを特徴とした情報処理システム。
1. An information processing system for processing graphic information indicating a graphic including an arc, comprising: storage means for storing graphic information of the graphic and information indicating a direction of displacement of each arc; First calculating means for calculating the area of the closed area, second calculating means for calculating the area of each arc based on the graphic information, and determining the sign of the area of the arc based on the displacement direction information of each arc. Sign determining means, and adding the area of the arc calculated by the corresponding second calculating means with the sign to the area of the closed region excluding the arc calculated by the first calculating means, including the arc An information processing system, comprising: third calculation means for calculating the area of a figure.
JP62318232A 1987-12-16 1987-12-16 Information processing system Expired - Fee Related JP2641877B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62318232A JP2641877B2 (en) 1987-12-16 1987-12-16 Information processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62318232A JP2641877B2 (en) 1987-12-16 1987-12-16 Information processing system

Publications (2)

Publication Number Publication Date
JPH01159773A JPH01159773A (en) 1989-06-22
JP2641877B2 true JP2641877B2 (en) 1997-08-20

Family

ID=18096897

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62318232A Expired - Fee Related JP2641877B2 (en) 1987-12-16 1987-12-16 Information processing system

Country Status (1)

Country Link
JP (1) JP2641877B2 (en)

Also Published As

Publication number Publication date
JPH01159773A (en) 1989-06-22

Similar Documents

Publication Publication Date Title
CN113077548B (en) Collision detection method, device, equipment and storage medium for objects
CN101398938B (en) Image processing apparatus, image processing system and image processing method
JPH07254075A (en) Three-dimensional object deformation method and modeling system
JP2641877B2 (en) Information processing system
CN114723803A (en) Dynamic scene change degree evaluation method and device and storage medium
CN118521772A (en) Three-dimensional detection frame processing method, system, device and medium for target detection
JP4034926B2 (en) Focus navigation table creation device
CN117195334B (en) A multi-segment line width expansion method, device, storage medium and computer equipment
CN119131227B (en) Three-dimensional object data processing methods, devices, equipment and storage media
JP3305395B2 (en) Figure division device
JPS60163162A (en) How to define the shape of a three-dimensional connected body
JP2004030135A (en) Method and program for drawing part of circle in cad system
JP3099620B2 (en) How to draw 3D drawings
CN117934342A (en) Method for quickly correcting and cutting standard scale grids
JP2001067497A (en) Method for determining inclusion relation of closed area and recording medium storing program for implementing the method
JP3637638B2 (en) Ellipse plotter
JPH08202341A (en) Graphic editing device
JP2852044B2 (en) Symbol recognition device
JP2001109883A (en) Information processing apparatus, control method thereof, and storage medium
CN119027487A (en) Image processing method, device, electronic device and storage medium
JP2000235649A (en) Figure inside / outside judgment method
CN117633973A (en) CAD file identification method, device, electronic equipment and storage medium
CN114638025A (en) Graphic processing method, apparatus, terminal device and storage medium
CN115115739A (en) Data processing method and equipment and information display method
JPH04123452U (en) drawing processing device

Legal Events

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