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
JPH0758508B2 - Calculation method of figure area by CAD - Google Patents
[go: Go Back, main page]

JPH0758508B2 - Calculation method of figure area by CAD - Google Patents

Calculation method of figure area by CAD

Info

Publication number
JPH0758508B2
JPH0758508B2 JP63267724A JP26772488A JPH0758508B2 JP H0758508 B2 JPH0758508 B2 JP H0758508B2 JP 63267724 A JP63267724 A JP 63267724A JP 26772488 A JP26772488 A JP 26772488A JP H0758508 B2 JPH0758508 B2 JP H0758508B2
Authority
JP
Japan
Prior art keywords
search
area
triangle
dots
cad
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
JP63267724A
Other languages
Japanese (ja)
Other versions
JPH02113379A (en
Inventor
昭廣 山本
英宏 岡田
Original Assignee
株式会社伊予エンジニアリング
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 株式会社伊予エンジニアリング filed Critical 株式会社伊予エンジニアリング
Priority to JP63267724A priority Critical patent/JPH0758508B2/en
Publication of JPH02113379A publication Critical patent/JPH02113379A/en
Publication of JPH0758508B2 publication Critical patent/JPH0758508B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 発明の目的; (産業上の利用分野) この発明は、建築,土木の敷地面積、機械資材の重量、
或いはそれらの費用計算等の面積計算を基本とするCAD
による図形面積の算出方法に関する。ここでいうCADと
は、コンピュータグラフィックス技法のことである。
DETAILED DESCRIPTION OF THE INVENTION Object of the invention; (Industrial field of application) This invention relates to construction, site area of civil engineering, weight of mechanical materials,
Or CAD based on area calculation such as cost calculation
The present invention relates to a method of calculating the figure area by CAD here is a computer graphics technique.

(従来の技術) 通常、CADによる描画図形の面積を計算するには、図形
の形状が数学的な解析で公式化された対象に相当する場
合は、これを用いて手作業によって算出している。又、
図形の形状が複雑な場合でもそれを分割化して幾何学的
な規則性を見い出せるならば、それぞれの分割域の面積
を計算した後に加算することによって元の図形を面積算
出するようにしている。CAD自体によってその描画図形
の面積を算出するには、簡単な図形であればその公式を
入力しておくことで可能になるが、予め入力された公式
内容に従属するものとして点列や線分要素を各辺毎に指
定しながら図形自体を描画して読込ませなければならな
い。又、例えば枠組みのような図形の面積を算出するに
は内側に相当する空白部分を差し引く為に、所定方向に
関する演算符号を決定しておく必要がある。
(Prior Art) Normally, in order to calculate the area of a drawing figure by CAD, when the shape of the figure corresponds to the object formalized by mathematical analysis, it is calculated manually using this. or,
Even if the shape of a figure is complicated, if it can be divided and geometrical regularity can be found, the area of the original figure is calculated by adding the area after calculating the area of each divided area. . To calculate the area of the drawing figure by CAD itself, if it is a simple figure, it is possible to enter the formula, but as a subordinate to the formula contents entered in advance, point sequences and line segments The element itself must be specified for each side and the figure itself must be drawn and read. In addition, in order to calculate the area of a figure such as a framework, it is necessary to determine the operation code for the predetermined direction in order to subtract the blank portion corresponding to the inside.

(発明が解決しようとする課題) 上述のようにして図形面積を算出する場合、公式が入力
されているものや、それらを組合わせることによって適
用可能な図形であれば使用価値が高いが、実際には形状
に多様性を持った任意な図形への対応が望まれている。
しかし、様々な図形の面積算出を可能にするには膨大な
数の公式を入力しておかなければならない上、更に公式
で定められない不規則な図形が対象外として残ってしま
う為、実用化が難題になっている。即ち、従来の公式を
入力して演算化する方法には限度があり、任意図形の面
積を算出するまでの使用範囲には及んでいない。この発
明はかかる事情よりなされたものであり、この発明の目
的は、図形の面積算出を数学的或いは幾何学的に解析さ
れた公式の入力手段に負うことなく、任意な形状に対し
て迅速にして容易に行ない得ると共に、利用価値の高い
CADによる図形面積の算出方法を提供することにある。
(Problems to be solved by the invention) When calculating the figure area as described above, if the formula is entered or if the figure can be applied by combining them, it is highly useful. Is required to support arbitrary figures with various shapes.
However, in order to be able to calculate the area of various figures, it is necessary to enter a huge number of formulas, and irregular figures that are not defined by the formulas will be excluded from the target, so it will be put to practical use. Is a challenge. That is, there is a limit to the conventional method of inputting a formula and calculating it, and it does not reach the range of use until the area of an arbitrary figure is calculated. The present invention has been made in view of the above circumstances, and an object of the present invention is to quickly calculate an area of a figure for an arbitrary shape without relying on a mathematical or geometrically analyzed formula input means. Easy to use and highly useful
It is to provide a method of calculating the figure area by CAD.

発明の構成; (課題を解決するための手段) この発明は、形状をドット単位で描画表示するCRT及びC
PUを備えたCADによる図形面積の算出方法に関するもの
で、この発明の上記目的は、形状をドット単位で描画表
示するCRT及びCPUを備えたCADによる図形面積の算出方
法において、前記CRTの単位ドットを前記CPUにより所定
の単位面積に換算するように設定しておき、前記CRT画
面内に予め着色された描画図形に対して対象となる図形
を検索するための検索開始点及び検索終了点を設定し、
前記検索開始点から前記検索終了点まで斜め方向に1列
ずつ平行に往復検索するようにして前記着色の2番目の
ドットから着色ドット数をカウントするようにした前記
CPUによるカウント処理から任意形状の前記描画図形の
面積が算出され得るように構成することによって達成さ
れる。
Configuration of the Invention; (Means for Solving the Problems) The present invention relates to a CRT and a CRT that draw and display a shape in dot units.
The present invention relates to a method for calculating a figure area by CAD including a PU, and the above-mentioned object of the present invention is a CRT for drawing and displaying a shape in dot units and a method for calculating a figure area by CAD including a CPU, in which the unit dot of the CRT is used. Is set by the CPU so as to be converted into a predetermined unit area, and a search start point and a search end point for searching a target graphic for a previously colored drawing graphic in the CRT screen are set. Then
The number of colored dots is counted from the second dot of the coloring by performing a parallel reciprocal search in parallel in a diagonal direction from the search start point to the search end point.
This is achieved by configuring so that the area of the drawn figure having an arbitrary shape can be calculated from the count processing by the CPU.

(作用) CADによって描画された図形はドット単位で構成されて
おり、この発明においては、これを着色することによっ
て判定要素にせしめてカウント処理を容易にしている。
描画図形に対して検索エリアを設けるのは、算出対象の
図形を選択できるようにするためと、描画図形がCRT画
面上に占める割合を考慮し、検索範囲を規定して効率的
なカウント処理をするためである。つまり、検索エリア
枠内の範囲だけがカウント処理の対象となり、検索エリ
ア枠の検索開始点から検索終了点までが検索されて、図
形を構成するドットのカウント処理が行なわれる。一
方、検索エリアを設けない場合は、CRT画面の枠内全て
の範囲がカウント処理の対象となる。又、ドット数のカ
ウントに関するその検索方向を斜め方向とするのは斜視
を含めて一般的な平面(2次元)表示図がX−Y軸を基
準とするのに対し、これとの平行検索を避けるためであ
り、実用上の便宜配慮に依る。しかし、CRT画面上で尺
度をドット単位表示するには性質的な問題点があり、そ
れは1次元で定義される間隔概念の距離に対して境界点
を含めてしまうことであり、実際には単位尺度分が増加
される。従って、この発明では図形面積を算出するため
のドット数のカウントを所定斜め方向へ1列ずつ行なう
に際して、2番目のドットから読込むようにしたり、例
えば三角形にはこの点を充分考慮して一旦、四角形とみ
なして解析処理している。即ち、単位ドットが所定の単
位面積に換算されれば着色された描画図形のドット数を
カウント加算することにより、図形面積の算出ができる
し、四角形として算出された三角形も半数化処理で面積
計算されるものである。
(Operation) A figure drawn by CAD is formed in dot units, and in the present invention, the figure is colored to make it a judgment element to facilitate the counting process.
The search area is provided for drawing figures so that the figure to be calculated can be selected and the ratio of drawing figures on the CRT screen is taken into consideration, and the search range is specified for efficient counting processing. This is because That is, only the range within the search area frame is the target of the counting process, the search start point to the search end point of the search area frame are searched, and the process of counting the dots forming the figure is performed. On the other hand, when the search area is not provided, the entire range within the frame of the CRT screen is subject to the counting process. In addition, the fact that the search direction regarding the count of the number of dots is set to the diagonal direction is based on the XY axis as a standard plane (two-dimensional) display diagram including perspective, whereas parallel search is performed. This is for avoidance and depends on practical convenience. However, there is a characteristic problem in displaying the scale in dot units on the CRT screen, which is that the boundary points are included in the distance of the interval concept defined in one dimension. The scale is increased. Therefore, according to the present invention, when the number of dots for calculating the figure area is counted row by row in the predetermined oblique direction, the second dot is read, or, for example, a triangle is fully considered, Analysis processing is performed assuming that it is a rectangle. That is, if the unit dot is converted into a predetermined unit area, the figure area can be calculated by counting and adding the number of dots of the colored drawing figure, and the area of the triangle calculated as a quadrangle can be calculated by halving. It is what is done.

(実施例) 以下に実施例を挙げてこの発明を詳細に説明する。(Example) Hereinafter, the present invention will be described in detail with reference to examples.

第2図はこの発明のCADによる図形面積の算出方法に関
する総括的な動作処理を示すフローチャートであり、便
宜上この動作過程に処理要素を折り込んで説明する。CA
Dにより図形を描画するためにはCRT及びCPU、マウス、
ライトペン、キーボード、コマンド選択用のタブレッ
ト、描画出力用のプロッター、形状入力用のデジタイザ
等を主な構成の一例に挙げることができる。こうして、
デジタイザ等によって第2図のように描画図形が入力さ
れると(ステップS1)、先ずその形状が三角形であるか
否かがその辺の数によって判定される(ステップS2)。
三角形でない場合はそのままペイントによって着色され
る(ステップS4)。又、三角形の場合は更に長さが最大
の辺(以下、“斜辺”と呼ぶ)が選定され、この斜辺に
対する線対称三角形が描画され、更に元の三角形と合体
した形状の四角形が造形された上(ステップS3)、ペイ
ントによって着色される(ステップS4)。ここで、三角
形の場合に別途の処理による四角形の造形が必要になる
理由を説明する。一般にCADによりCRT画面上に寸法を表
示する場合、例えば第10図(B)のようなスケールの5m
mに対してCRT上に描画されたドット単位のラインは同図
(A)のように基準点の零を含めて6ドット分になり、
同図(B)のスケールと照合すれば実際には6mmになっ
ている。これはドット数がスケール目盛自体の数に対応
するからであり、そこでこの余分に加算される単位ドッ
ト分を差し引いてドット数をカウントするように設定す
ることによって、単位ドットが単位面積に換算されれ
ば、殆どの形状の図形に関する面積算出が可能になるの
であるが、三角形の場合は更に例外的な様相を呈するか
らである。例えば第9図(A)のような直角二等辺三角
形がCRT画面上に表示されると同図(B)のように規則
的であったり、或いは第6図(A)のような直角三角形
の場合は同図(B)のように不規則になったり、三角形
に対してはまちまちに描画される為、この発明のドット
数のカウント方法に依っては面積算出の適用が難かし
い。しかし、四角形とみなして処理した後に、ドット数
のカウント合計を半数化することによってこの発明のド
ット数のカウント方法が適用可能になる。更には、入力
図形が三角形である場合に造形する四角形の処理方法
(ステップS3)について、第3図(A)にはそれが直角
三角形でない場合を、同図(B)には直角三角形である
場合をそれぞれについて解析説明している。
FIG. 2 is a flow chart showing a general operation process relating to the method of calculating the figure area by CAD according to the present invention, and for convenience sake, the process elements will be described in the following description. CA
To draw a figure by D, CRT, CPU, mouse,
A light pen, a keyboard, a tablet for command selection, a plotter for drawing output, a digitizer for shape input, and the like can be given as an example of the main configuration. Thus
When a drawing figure is input by a digitizer or the like as shown in FIG. 2 (step S1), it is first determined whether the shape is a triangle or not based on the number of sides (step S2).
If it is not a triangle, it is colored with paint as it is (step S4). In the case of a triangle, the side with the maximum length (hereinafter referred to as the “hypotenuse”) was selected, a line-symmetrical triangle for this hypotenuse was drawn, and a quadrangle having a shape united with the original triangle was formed. Above (step S3), it is colored with paint (step S4). Here, the reason why it is necessary to form a quadrangle by a separate process in the case of a triangle will be described. Generally, when displaying dimensions on a CRT screen by CAD, for example, a scale of 5 m as shown in Fig. 10 (B)
The line of dots drawn on the CRT for m is 6 dots including the reference point zero as shown in FIG.
If it is compared with the scale of FIG. 6B, it is actually 6 mm. This is because the number of dots corresponds to the number of scale scales themselves.Therefore, the unit dots are converted to unit areas by setting the number of dots to be counted by subtracting the extra unit dots. This makes it possible to calculate the area of most shapes, but in the case of a triangle, the appearance becomes even more exceptional. For example, when an isosceles right triangle as shown in FIG. 9 (A) is displayed on the CRT screen, it is regular as shown in FIG. 9 (B), or as a right triangle as shown in FIG. 6 (A). In this case, the area is irregular as shown in FIG. 7B, or the triangles are drawn differently. Therefore, it is difficult to apply the area calculation according to the dot number counting method of the present invention. However, the dot number counting method of the present invention can be applied by halving the total dot number count after processing as a square. Furthermore, regarding the processing method (step S3) of a quadrangle formed when the input figure is a triangle, the case where it is not a right triangle in FIG. 3A and the right triangle is shown in FIG. Each case is explained in terms of analysis.

先ず、いずれの場合も辺の数が認識された上で各辺の長
さが各図共、各頂点P,Q,Rの座標に基づいて、PQ間,RQ
間,RP間に対応するL1,L2,L3として求められ、斜辺選定
が行なわれる。次に斜辺の両端座標が取込まれ、Y軸の
値が低い方を基準点とし、各図中のX−Y座標方向のX
軸方向に対して斜辺とこれに夾角を成す辺の方向角が求
められる。
First, in each case, after the number of sides is recognized, the length of each side is based on the coordinates of the vertices P, Q, and R in each figure.
, L3 corresponding to the space and RP are calculated, and the hypotenuse is selected. Next, the coordinates of both ends of the hypotenuse are taken in, and the lower Y-axis value is used as the reference point, and the X-axis in the XY coordinate direction in each figure is used.
The direction angles of the hypotenuse and the sides forming an included angle with respect to the axial direction are obtained.

第3図(A)においては∠aと∠(a+b)であり、同
図(B)では∠bのみである。こうして直線PQと直線RQ
の位置関係が得られるが、各図共∠cが得られれば線対
称移動が容易になる。∠cとは各図共斜辺に直交する直
線とX軸方向との成す角であり、第3図(A)では∠a
と∠bが求められれば∠c={π/2−(∠a+∠
b)}、同図(B)では∠bが与えられれば∠c=(π
/2−∠b)と算出される。即ち、各図共斜辺に対する直
交線が斜辺とに作る交点DとR点とを結ぶ線分L4の長さ
が求められることによって、これを延長した直線上の2
倍分の距離にE点が得られるようになる。このE点とは
各図共、斜辺に対して線対称移動したときにR点が変換
される座標点に他ならない。こうして点Eが求められれ
ば各図共、これにP点及びQ点と結線した四角形PRQEが
造形される。
In FIG. 3 (A), ∠a and ∠ (a + b), and in FIG. 3 (B), only ∠b. Thus straight line PQ and straight line RQ
The positional relationship of is obtained, but if ∠c is obtained for each figure, the line symmetric movement becomes easy. ∠c is an angle formed by a straight line orthogonal to the hypotenuse and the X-axis direction in each figure, and in FIG. 3 (A), ∠a
And ∠b are obtained, ∠c = {π / 2− (∠a + ∠
b)}, in the figure (B), if ∠b is given, ∠c = (π
/ 2−∠b) is calculated. That is, the length of the line segment L4 that connects the intersection point D and the point R, which is formed by the orthogonal line with respect to the hypotenuse in each figure, is obtained, and the length of the straight line 2 is extended.
E point can be obtained at a distance of double. In each figure, the point E is nothing but the coordinate point to which the point R is converted when it moves line-symmetrically with respect to the hypotenuse. When the point E is obtained in this way, a quadrangle PRQE connected to the points P and Q is formed on each figure.

以上は入力図形の三角形が四角形として処理されたり、
その他の図形のようにペイントへ至る過程までを説明し
てきたが、続いて第8図に示すようなCRT画面cに描画
された図形Aに対する任意な検索エリア枠Bの入力設定
(ステップS5)が行なわれる。ここで図形Aとは三角形
を除く任意図形であり、これを面積算出する(ステップ
S6)ために、この発明の面積算出の処理方法に関する動
作例をフローチャートによって示したのが第1図であ
り、第4図〜第7図ではその処理による幾つかの基本図
形の面積算出の例を説明している。
In the above, the triangle of the input figure is processed as a quadrangle,
Although the process up to painting like other figures has been described, the input setting of an arbitrary search area frame B for the figure A drawn on the CRT screen c as shown in FIG. 8 is performed (step S5). Done. Here, the figure A is an arbitrary figure excluding a triangle, and the area of this figure is calculated (step
For the purpose of S6), FIG. 1 shows an operation example relating to the area calculation processing method of the present invention by a flowchart, and FIGS. 4 to 7 show examples of area calculation of some basic figures by the processing. Is explained.

第4図は入力図形が四角形の場合、第5図は円の場合、
第6図は四角形に造形変換された三角形の場合である。
各図共、寸法表示した図(A)と、それに対してCRT画
面上にドット単位で表示された図(B)を呈示している
が、第6図に関しては同図(D)のように三角形がその
斜辺に対して線対称移動した三角形とで合体成形された
四角形として扱われることを意味しており、ドット数の
カウントを説明する図(c)には、各々着色された図形
を含む検索エリア枠に対する検索方向Dによるカウント
開始点S及び終了点Gと、カウント数の模様が描かれて
いる。尚、カウントの検索方向Dに関しては各図に共通
して示した方向以外に、検索エリア枠の他の四隅から選
定しても良いし、その方向性も問わないが、実際の設定
に際しては何れかの方向に決定して一貫させて行なうも
のである。又、1列ずつの斜め方向の検索方向は検索エ
リア枠に含まれるドット数の配列によって従属設定され
るが、その着色ドット数のカウント方法を1列毎に2番
目から読込むようにすることが重要になっている。こう
して単位ドットを仮に単位面積1mm2に換算されるよう
に設定しておくと、ドット数のカウントから面積算出が
可能になる。例えば第4図には四角形としての台形を挙
げており、同図(A)で与えられた寸法表示からその面
積を(6+14)×4/2=40mm2と計算しておき、同図
(B)のようにCRT画面上ではドット数が55に表示され
ている場合について、同図(c)によるこの発明のカウ
ント方法に依る面積算出を照合してみれば正確に40mm2
が得られることがわかる。又、第5図の円の場合は直径
が10mmのとき、面積はπr2=25π=78.5mm2であり、同
図(B)のCRT画面表示ではドット数が92に表示される
が、この発明のカウント方法では同図(C)の如く82mm
2と算出される。図形が曲率を有する場合に関しては円
に同様、CRTにおけるドット単位表示からの面積算出は
近似計算になり、誤差を生じるが、それでも円であれば
径がもっと大きく、例えば第7図のように直径が30mm程
もあれば計算上の面積がπr2=225π=706.5mm2である
のに対し、第5図(C)のような検索方向Dのドット数
のカウントによるこの発明の面積算出法に依れば705mm2
と近似性が高まり、その誤差が抑えられるようになる。
尚、この図のドット数のカウント表示は100を含む2桁
となっている。更に第6図のような三角形の場合は、面
積が5×10/2=25mm2であるのに対し、CRT画面上では同
図(B)の如くドット数が41にも及んで変形されて形状
が不安定になるが、これは第6図(D)のような面積が
50mm2の斜辺に対する線対称移動図形との合体四角形に
してから同図(C)のようにカウントする。ちなみに、
この四角形のCRT画面上のドット数は63に表示される
が、この発明のカウント方法に依ればその計算面積値で
ある50mm2が得られる。即ち、三角形は一旦四角形を造
形してから四角形とみなしてカウントし、総計数を半数
化することによって正確に面積算出されるわけである。
Fig. 4 shows the case where the input figure is a square, and Fig. 5 shows the case where it is a circle.
FIG. 6 shows the case of a triangle whose shape is converted into a quadrangle.
Each figure presents a figure (A) in which dimensions are displayed and a figure (B) displayed in dot units on the CRT screen, while FIG. 6 shows the same figure (D). This means that a triangle is treated as a quadrangle that is formed by coalescing with a triangle that is line-symmetrically moved with respect to its hypotenuse, and the figure (c) for explaining the counting of the number of dots includes each colored figure. A count start point S and an end point G in the search direction D with respect to the search area frame and a pattern of the count number are drawn. Note that the count search direction D may be selected from the other four corners of the search area frame other than the direction commonly shown in each figure, and the directionality thereof does not matter. It is decided in one direction and is performed consistently. The diagonal search direction of each column is set dependently by the array of the number of dots included in the search area frame, but it is important to read the counting method of the number of colored dots from the second for each column. It has become. In this way, if the unit dots are set to be converted into a unit area of 1 mm 2 , the area can be calculated from the number of dots. For example, FIG. 4 shows a trapezoid as a quadrangle, and the area is calculated as (6 + 14) × 4/2 = 40 mm 2 from the dimensional display given in FIG. If the CRT screen displayed on the number of dots 55 for as), FIG (c) in accordance with precise Come to match area calculation due to counting method of the present invention 40 mm 2
It can be seen that Also, in the case of the circle in FIG. 5, when the diameter is 10 mm, the area is πr 2 = 25π = 78.5 mm 2 , and the dot number is displayed at 92 in the CRT screen display of FIG. According to the counting method of the invention, 82 mm as shown in FIG.
Calculated as 2 . Similar to a circle when the figure has a curvature, the area calculation from the dot unit display on the CRT is an approximate calculation, which causes an error, but even if it is a circle, the diameter is larger, for example, as shown in Fig. If there is about 30 mm, the calculated area is πr 2 = 225π = 706.5 mm 2 , whereas the area calculation method of the present invention by counting the number of dots in the search direction D as shown in FIG. According to 705 mm 2
And the closeness increases, and the error can be suppressed.
In addition, the count display of the number of dots in this figure is a two-digit number including 100. Further, in the case of a triangle as shown in FIG. 6, the area is 5 × 10/2 = 25 mm 2, but on the CRT screen, the number of dots is changed to 41 as shown in FIG. The shape becomes unstable, but this is due to the area shown in Fig. 6 (D).
Count as shown in (C) of the figure after forming a quadrangle that is merged with a line-symmetrical moving figure with respect to the hypotenuse of 50 mm 2 . By the way,
Although the number of dots on the CRT screen of this quadrangle is displayed at 63, the calculated area value of 50 mm 2 can be obtained by the counting method of the present invention. That is, the area of a triangle is accurately calculated by first modeling a quadrangle, counting it as a quadrangle, and counting the total count in half.

次に、第1図に示したこの発明の任意図形の面積算出に
関する上述した処理方法の動作性を、フローチャートに
よって説明する。これは第2図中の面積算出(ステップ
S6)に含有される内容である。先ず、前処理で入力され
た検索エリア枠(ステップS5)に対して、例えば左下隅
の座標を検索開始点、右上隅を検索終了点としてそれぞ
れ座標を設定する(ステップS6−1)。検索エリア枠内
のドット数のカウント動作が検索開始点から開始される
と、次にこの検索ポイントのドットが着色されているか
否かを調べ(ステップS6−2)、着色されていない場合
は動作上の無色判定用としてレジスタAに1を代入する
(ステップS6−3)が、着色済みのドットであっても図
形の端部や単一ドットであればカウントしないので続い
て検索ポイントが移動するための座標算出を行なう(ス
テップS6−4)。そして、検索ポイントが検索エリア枠
を過出していないかどうかをその座標からチェックし
(ステップS6−5)、過出していれば次の行を検索して
これに切換え(ステップS6−6)、終了ポイントか否か
の判定を経て(ステップS6−7)、それに到達しない間
はこの検索方向の動作が斜め方向に平行して1列ずつ往
復検索できるように、再び着色ドットの判定(ステップ
S6−2)の前に帰還される。又、検索エリア枠内であれ
ば、引き続きレジスタAの内容が1であるか否かが照合
され(ステップS6−8)、これが1である場合にはレジ
スタAに0を代入するようにした(ステップS6−9)
後、着色ドットの判定(ステップS6−2)の前へ帰還さ
れる。これは検索動作による着色ドットを2番目から読
取るようにすると共に、レジスタAが1列移動されて往
復検索する場合の着色ドットに対しても同じ働きを保つ
ための処理である。こうしてレジスタAが1でない場合
には、着色されたドットが存在する列の2番目以降を対
象に検索して、それが着色ドットか否かを判定(ステッ
プS6−10)し、着色ドットである場合はその数をカウン
トするようにして(ステップS6−11)、動作上は他の列
にも順次行ない得るように続いて検索ポイント移動のた
めの座標算出(ステップS6−4)の前段へ帰還するよう
にする。又、着色ドットが存在する列の2番目以降が着
色されていない場合(ステップS6−10)は、やはり検索
ポイントの移動のために座標計算して(ステップS6−1
2)、着色ドットの判定(ステップS6−2)の前に帰還
することにより、この発明の主要な動作処理が成立す
る。尚、検索ポイントが検索終了点に至って終了ポイン
トとみなされた場合(ステップS6−7)には、更に第2
図で三角形が四角形に造形処理されたように(ステップ
S3)、元の入力図形が三角形であるか否かを判定し(ス
テップS6−13)、三角形であった場合はカウンタ総計数
を半数化して(ステップS6−4)、三角形でない図形の
場合と同様に面積算出が完了する。
Next, the operability of the above-described processing method relating to the area calculation of the arbitrary figure of the present invention shown in FIG. 1 will be described with a flowchart. This is the area calculation (step
It is the content contained in S6). First, for the search area frame (step S5) input in the preprocessing, for example, the coordinates of the lower left corner are set as the search start point and the upper right corner is set as the search end point, and the coordinates are set respectively (step S6-1). When the operation of counting the number of dots in the search area frame is started from the search start point, it is next checked whether or not the dot at this search point is colored (step S6-2). If not, the operation is performed. Although 1 is substituted into the register A for the above colorless determination (step S6-3), even if it is a colored dot, it is not counted if it is the end of the figure or a single dot, so the search point moves subsequently. Coordinates are calculated (step S6-4). Then, it is checked from the coordinates whether or not the search point is out of the search area frame (step S6-5), and if it is out, the next line is searched and switched to this (step S6-6). After it is judged whether it is the end point (step S6-7), while it is not reached, it is judged again for the colored dot so that the operation in this search direction can be searched back and forth one row at a time in parallel to the diagonal direction (step S6-7).
Returned before S6-2). If it is within the search area frame, it is continuously checked whether or not the content of the register A is 1 (step S6-8), and if it is 1, 0 is substituted into the register A ( Step S6-9)
After that, the process is returned to before the determination of the colored dot (step S6-2). This is a process for reading the colored dots by the search operation from the second position, and for maintaining the same function for the colored dots when the register A is moved by one column and is searched back and forth. In this way, when the register A is not 1, the second and subsequent rows in the row in which the colored dots are present are searched, and it is determined whether or not the colored dots are colored dots (step S6-10). In that case, the number is counted (step S6-11), and then the coordinates are returned to the previous stage of the coordinate calculation (step S6-4) for moving the search point so that the other columns can be sequentially operated. To do so. If the second and subsequent columns in the row where the colored dots are present are not colored (step S6-10), the coordinates are calculated to move the search point (step S6-1).
2) By returning before the determination of the colored dots (step S6-2), the main operation processing of the present invention is established. If the search point reaches the search end point and is regarded as the end point (step S6-7), the second
In the figure, the triangle is shaped like a quadrangle (step
S3), it is determined whether or not the original input figure is a triangle (step S6-13), and if it is a triangle, the counter total count is halved (step S6-4) to determine whether the figure is not a triangle. Similarly, the area calculation is completed.

このような構成によって検索エリア枠に納められた着色
図形の面積は、検索エリア枠の一端から対角状の他端へ
と斜め方向に1列ずつ平行に往復検索して、2番目の着
色ドットから連続的に行なうようにしたドット数のカウ
ント処理から、第4図〜第6図に示したように殆ど正確
に算出されると共に面積表示されて(ステップS7)全処
理動作が終了する。なお、上述した実施例では、算出対
象の描画図形を、検索開始点及び検索終了点を設定して
検索範囲を指定した場合の例を示したが、検索範囲を指
定しなかった場合は、CRT画面内の該当色の全ての図形
が算出対象となり、CRT画面の枠内全ての範囲が検索範
囲として処理される。
With such a configuration, the area of the colored figure stored in the search area frame is reciprocally searched in parallel in one row diagonally from one end of the search area frame to the other end of the diagonal, and the second colored dot is searched. From the dot number counting process which is continuously performed from the above, the calculation is performed almost accurately as shown in FIGS. 4 to 6 and the area is displayed (step S7), and all the processing operations are completed. In the above-described embodiment, the drawing figure to be calculated is an example in which the search start point and the search end point are set and the search range is specified. However, when the search range is not specified, the CRT is used. All figures of the corresponding color on the screen are targets for calculation, and the entire range within the frame of the CRT screen is processed as the search range.

発明の効果; 以上のように、この発明によればCRT画面上に描画され
る任意形状の図形面積の算出に関し、CRTのドット単位
による尺度表示が、通常の距離表示に対して余分に単位
ドット分つけ加えられることに留意し、ドット単位で表
示された図形を線分化してカウントするという画期的な
手法によって、迅速にして正確なCADによる図形面積の
算出方法を実現している。殊に、CRT画面上においては
複雑な形状の図形であっても表示構成であるドット数が
多ければ、計算上では面積算出が難解な場合においても
容易に算出可能になっており、面積算出を基本とする産
業界への便宜貢献は図り得ない。
EFFECTS OF THE INVENTION As described above, according to the present invention, with respect to the calculation of the figure area of an arbitrary shape drawn on the CRT screen, the scale display in the dot unit of the CRT has an extra unit dot in comparison with the normal distance display. With the epoch-making method of line-dividing and counting the figures displayed in dots, keeping in mind that they are added, a rapid and accurate method of calculating the figure area by CAD is realized. In particular, even if a figure with a complicated shape on the CRT screen has a large number of dots in the display configuration, it is possible to easily calculate the area even if it is difficult to calculate the area. Contribution to the basic industry cannot be made.

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

第1図はこの発明の面積算出に関する処理方法の動作例
を示したフローチャート、第2図はこの発明の総括的な
処理動作を示したフローチャート、第3図はこの発明に
関わる予備処理を説明するための図、第4図は四角形を
この発明で処理した一例を説明するための図、第5図は
円をこの発明で処理した一例を説明するための図、第6
図は三角形をこの発明で処理するための方法とその結果
の一例を説明するための図、第7図は円をこの発明で処
理した他の例を示した図、第8図はCRT画面上でこの発
明の構成要素を簡易呈示した図、第9図は三角形をCRT
画面上に表示する場合について説明した図、第10図はこ
の発明に関わるCRT上の尺度表示と実際の距離表示との
関係を説明するための図である。 A…任意図形、B…検索エリア枠、C…CRT画面、S…
検索開始点、G…検索終了点。
FIG. 1 is a flow chart showing an operation example of a processing method relating to area calculation of the present invention, FIG. 2 is a flow chart showing a general processing operation of the present invention, and FIG. 3 is a preparatory process relating to the present invention. FIG. 4 is a diagram for explaining an example of processing a quadrangle according to the present invention, FIG. 5 is a diagram for explaining an example of processing a circle according to the present invention, and FIG.
FIG. 7 is a diagram for explaining a method for processing a triangle according to the present invention and an example of the result, FIG. 7 is a diagram showing another example for processing a circle according to the present invention, and FIG. 8 is on a CRT screen. Fig. 9 shows a simplified representation of the components of this invention. Fig. 9 shows a CRT with a triangle.
FIG. 10 is a diagram for explaining the display on the screen, and FIG. 10 is a diagram for explaining the relationship between the scale display and the actual distance display on the CRT according to the present invention. A ... Arbitrary figure, B ... Search area frame, C ... CRT screen, S ...
Search start point, G ... Search end point.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】形状をドット単位で描画表示するCRT及びC
PUを備えたCADによる図形面積の算出方法において、前
記CRTの単位ドットを前記CPUにより所定の単位面積に換
算するように設定しておき、前記CRT画面内に予め着色
された描画図形に対して対象となる図形を検索するため
の検索開始点及び検索終了点を設定し、前記検索開始点
から前記検索終了点まで斜め方向に1列ずつ平行に往復
検索するようにして前記着色の2番目のドットから着色
ドット数をカウントするようにした前記CPUによるカウ
ント処理から任意形状の前記描画図形の面積が算出され
得るように構成したことを特徴とするCADによる図形面
積の算出方法。
1. A CRT and a C that draw and display a shape in dot units.
In the method of calculating the figure area by CAD with PU, the unit dot of the CRT is set to be converted into a predetermined unit area by the CPU, and the drawn figure pre-colored in the CRT screen is set. A search start point and a search end point for searching for a target graphic are set, and a reciprocal search is performed in parallel in a diagonal direction from the search start point to the search end point one column at a time. A method of calculating a figure area by CAD, wherein the area of the drawing figure of an arbitrary shape can be calculated from the counting process by the CPU that counts the number of colored dots from dots.
【請求項2】前記対象となる図形が納められるような検
索エリア枠を設けた後に前記検索開始点及び検索終了点
を設定し、前記往復検索を際、検索ポイントのドットが
前記検索エリア枠を過出していないかどうかを前記検索
エリア枠及び前記検索ポイントの座標情報から判定し、
前記検索エリア枠内を検索範囲として前記カウント処理
を行なうようにした請求項1に記載のCADによる図形面
積の算出方法。
2. The search start point and the search end point are set after a search area frame for accommodating the target graphic is provided, and when the round trip search is performed, the dots of the search points indicate the search area frame. It is determined from the search area frame and the coordinate information of the search point whether or not it has gone out,
The method of calculating a figure area by CAD according to claim 1, wherein the counting process is performed with the search area frame being a search range.
【請求項3】前記CPUによって前記描画図形が三角形で
あるか否かを辺の数から判定し、前記描画図形が三角形
である場合、各頂点の座標に基づき各辺の長さを算出し
て最大の辺を選定し、この選定された最大の辺に基づく
前記三角形の線対称移動による被変換三角形と、前記三
角形との間で合体形成される四角形を前記対象となる図
形として前記CRT画面上に造形してから前記検索開始点
及び検索終了点を設定し、これに対して前記CPUが前記
カウント処理をした後に前記着色ドット数の総計数を半
数化するようにした請求項1又は2に記載のCADによる
図形面積の算出方法。
3. The CPU determines whether or not the drawing figure is a triangle from the number of sides, and when the drawing figure is a triangle, calculates the length of each side based on the coordinates of each vertex. On the CRT screen, a maximum side is selected, and a quadrangle formed by combining the converted triangle by the line symmetric movement of the triangle based on the selected maximum side and the triangle is used as the target figure on the CRT screen. 3. The printing start point and the search end point are set after the printing is performed, and the total count of the number of colored dots is halved after the CPU performs the counting process. Calculation method of figure area by CAD described.
JP63267724A 1988-10-24 1988-10-24 Calculation method of figure area by CAD Expired - Fee Related JPH0758508B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63267724A JPH0758508B2 (en) 1988-10-24 1988-10-24 Calculation method of figure area by CAD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63267724A JPH0758508B2 (en) 1988-10-24 1988-10-24 Calculation method of figure area by CAD

Publications (2)

Publication Number Publication Date
JPH02113379A JPH02113379A (en) 1990-04-25
JPH0758508B2 true JPH0758508B2 (en) 1995-06-21

Family

ID=17448685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63267724A Expired - Fee Related JPH0758508B2 (en) 1988-10-24 1988-10-24 Calculation method of figure area by CAD

Country Status (1)

Country Link
JP (1) JPH0758508B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5515255B2 (en) * 2008-09-01 2014-06-11 富士通株式会社 Automatic wiring device, automatic wiring method and automatic wiring program

Also Published As

Publication number Publication date
JPH02113379A (en) 1990-04-25

Similar Documents

Publication Publication Date Title
JP3126029B2 (en) Computer-aided drafting apparatus supporting creation and editing of illustrations and computer-aided drafting apparatus
US20070242073A1 (en) Robot simulation apparatus
US4879667A (en) Process for generating a computer model of an alterable structure
US5712965A (en) Three-dimensional solid arranging/editing method in a computer graphic system and system
US5852442A (en) Method of drawing a three-dimensional object
JPH0758508B2 (en) Calculation method of figure area by CAD
JP3361652B2 (en) 3D figure arrangement input method and graphic system
JP2570858B2 (en) How to enter discrete quantities
JP4053642B2 (en) Coordinate system setting method and image measuring apparatus
JPH05324777A (en) CAD system
US5444831A (en) Developed product shape deciding method for a computer-aided design system
KR102480316B1 (en) Planning method for cut angle processing of steel structure
JP3637638B2 (en) Ellipse plotter
JPH0664589B2 (en) Drawing method in CAD system
JP2000259848A (en) Three-dimensional graph display device, three-dimensional graph display method, and storage medium storing three-dimensional graph display program
JPH01206467A (en) Rectangular parallelepiped domain designating method
CN120653215A (en) Display method of display control device and display control device
JPH0620022A (en) Data creation device
JP3387561B2 (en) Triangle creation method in figure editing system
JPH04326114A (en) Three-dimensional coordinate value input system
KR100224799B1 (en) How to display solid graphic
JPH01142921A (en) Mouse type input device
JP2004280543A (en) How to set structural analysis conditions
JPH0683540A (en) Cursor position designating method
JPH0546707A (en) Information processor

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees