JP2004030135A - Method and program for drawing part of circle in cad system - Google Patents

Method and program for drawing part of circle in cad system Download PDF

Info

Publication number
JP2004030135A
JP2004030135A JP2002184353A JP2002184353A JP2004030135A JP 2004030135 A JP2004030135 A JP 2004030135A JP 2002184353 A JP2002184353 A JP 2002184353A JP 2002184353 A JP2002184353 A JP 2002184353A JP 2004030135 A JP2004030135 A JP 2004030135A
Authority
JP
Japan
Prior art keywords
circle
coordinates
points
display area
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002184353A
Other languages
Japanese (ja)
Inventor
Katsuaki Hiromatsu
廣松 克明
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.)
Ando Electric Co Ltd
Original Assignee
Ando Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ando Electric Co Ltd filed Critical Ando Electric Co Ltd
Priority to JP2002184353A priority Critical patent/JP2004030135A/en
Publication of JP2004030135A publication Critical patent/JP2004030135A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently draw part (circular arc) of an extremely expanded circle in a two-dimensional CAD system. <P>SOLUTION: The method for drawing part of the circle in the CAD system includes the steps for: determining the coordinates of four points indicating a rectangular display area for displaying a circle element which is part of the circle being a drawing target; operating the coordinates of intersections of the individual sides of the rectangle and the circle; and operating the coordinates of the part of the circle within the display area with angles formed of the coordinates of the intersections and the central coordinates of the circle as a starting angle and a final angle. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
この発明は、CADシステムにおける図形の描画方法に関する。
【0002】
【従来の技術】
最近の様々な分野における設計業務には、コンピュータの高機能、低価格化の影響を受けてCAD(Computer−Aided−Design)システムが普及している。
普及に伴い、当初は簡単な線分の集合から様々な形状(円、曲線等)を多用する図面が増えている。
CADシステムのソフトウエアにおいて、円要素を描画する際には、通常はプログラムを記述するコンパイラ言語に装備されている円描画コマンドを使用して実現する。
【0003】
しかしながら、円の描画は、表示を拡大していくごとに微妙ななめらかさが必要になってくるため、描画に必要な演算量が増加していく。
したがって、これらのコマンドは、円の一部を極端に拡大した場合等には対応していないことが多い。
この場合、三角関数を用いた計算により円座標を計算し、その座標同士を線分にて細かく描画するのが一般的である。
即ち、中心座標(X0,Y0)半径rの円は、
X=r×Cosθ+X0  ,Y=r×Sinθ+Y0    (θ=0〜2π)
によりθを一定の割合で刻み、得られる座標群を線分でつないで擬似的に描画する。
【0004】
円の一部(円弧)を描画する手法としては、特開平2001−14357号公報に記載のものが知られている。
該公報には、円の一部を描画方法として、図7〜図10で示す技術が開示されている。
図7は描画する円の一部を含む図形を示す図である。
図8は、図7の図形の描画のための1段階を示す図である。
図9は、図7の図形の直角部を拡大した図である。
図10は、図7の図形の描画方法の手順を示すフローチャートである。
【0005】
図7に示す図形で、円の一部(円弧)を含む図形を作図するには、先ず、図8に示すように罫線32,33とで直角部34を構成する図8の31aを作図する。
先ず、罫線32,33をキーボード2を用いて画面上のカーソルで指定し保存する。(ステップ11)
次に、直角部34を識別させ保存する。(ステップ12)
次に、直角部34の第1の端点34aの座標を算出させる。(ステップ13)
次に、端点34aの座標中心に第1の円弧35の半径値を入力する。(ステップ14)
続いて、直角部34に入力した第1の円弧35を描かせる。(ステップ15)
次に、円弧35と罫線32,33との第1,2の接点36,37で各々の線分を切断し、第1の端点34a領域側の第1,2の直線38,39と第1の円40を削除する。(ステップ16)
上記公報に開示されている技術は、、円の一部を描画する場合にも、円全体を描画する演算処理を実行して、その後に不必要な部分を削除する処理をおこなっていたため、描画に要する演算処理の負担が極めて大きかった。
【0006】
【発明が解決しようとする課題】
しかしながら、この手法は三角関数を多用するため、更に描画座標の演算量が増加してしまい、コンピュータには多大な負担を強いる。
ひいては、描画スピードが遅くなり、作業の快適性が失われたり、極端にメモリリソースを消費して動作を不安定にする。
特に極端に拡大された円の一部のみを描画する場合にも、上述の如く円全体を描画する計算を行って、必要な部分以外を削除していたために、表示には必要無い部分の演算までも行っていた。
【0007】
本発明の課題
(目的)は、二次元のCADシステムにおいて、極端に拡大された円の一部(円弧)を描画を効率的に実施することにある。
【0008】
【課題を解決するための手段】
前記課題を解決するために、CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、前記矩形の各辺と前記円との交点座標を演算するステップと、 前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップとで、円の一部を描画する。(請求項1)
【0009】
また、CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、前記4点の座標が前記円内に存在するか否かを判定するステップと、前記4点の座標の内の1〜3点の座標が前記円内に存在すると判断された場合にのみ、前記矩形の各辺と前記円との交点座標を演算するステップと、前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップとで、円の一部を描画する。(請求項2)
【0010】
また、CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、前記4点の座標が前記円内に存在するか否かを判定するステップと、前記4点の座標の内の1点の座標が前記円内に存在すると判断された場合に、円内に存在する点を挟んだ2辺と円との交点座標を演算し、該交点座標と円の中心が構成する2つの角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップとで、円の一部を描画する。(請求項3)
【0011】
また、CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、前記4点の座標が前記円内に存在するか否かを判定するステップと、前記4点の座標の内の2点の座標が前記円内に存在すると判断された場合に、円内に存在する点を通る平行線2辺と円との交点座標を演算し、該交点座標と円の中心が構成する2つの角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップとで、円の一部を描画する。(請求項4)
【0012】
また、CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、前記4点の座標が前記円内に存在するか否かを判定するステップと、前記4点の座標の内の3点の座標が前記円内に存在すると判断された場合に、円外に存在する1点を挟んだ2辺と円との交点座標を演算し、該交点座標と円の中心が構成する2つの角度を始角、終角として、前記表示領域内における円の一部の座標を演算するステップとで、円の一部を描画する。(請求項5)
【0013】
また、CADシステムにおいて、円の一部を描画するプログラムであって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定する処理と、前記矩形の各辺と前記円との交点座標を演算する処理と、前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算する処理とをCADシステムのコンピュータに実行させる円の一部を描画するプログラム。(請求項6)
【0014】
また、CADシステムにおいて、円の一部を描画するプログラムであって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定する処理と、前記4点の座標が前記円内に存在するか否かを判定する処理と、前記4点の座標の内の1〜3点の座標が前記円内に存在すると判断された場合にのみ、前記矩形の各辺と前記円との交点座標を演算する処理と、前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算する処理とをCADシステムのコンピュータに実行させる円の一部を描画するプログラム。(請求項7)
【0015】
【発明の実施の形態】
CADシステムにおいて、円1を極端に拡大して一部を表示する場合、表示される円の一部(円弧)は4点(P!,P2,P3,P4)で決定される表示領域2の4辺のうち、いずれかの2辺〜3辺にその円周の一部がかかるように描画される。
その際に、表示領域2を示す4点座標(P1〜P4)と円1との関係は、以下のように分類できる。
表示領域2を示す4座標(P1,P2,P3,P4)のうち、
(a)  図1に示す如く、1点のみが円1の内部に存在する。
(b)  図2に示す如く、2点が円1の内部に存在する。
(c)  図3に示す如く、3点が円1の内部に存在する。
(d)  図4に示す如く、4点全てが円1の内部に存在する。
(e)  図5に示す如く、4点全てが円1の外部に存在すると共に、円1は表示領域2の内部に存在する。
(f)  図6に示す如く、4点全てが円1の外部に存在すると共に、円1は表示領域2の外部に存在する。
【0016】
(e)の図5の場合には、4点全てが円1の外部にあるが、円1の中心が表示領域2の内部にあるので、円の全てを描画することになるので、通常のコマンドを使用して描画する。
また、(f)の図6の場合には、4点全てが円1の外部にあるが、円1の中心が表示領域2の外部にあるので、円1は表示領域2の外部であるので、円1を描画する必要はない。
また、(d)の図4の場合も、4点とも円1の内部にある場合も、表示領域2には円がはいらないので、描画する必要がない。
【0017】
したがって、表示領域2内に円の一部を描画するのは図1〜図3に示す(a),(b),(c)のケースである。
以下、上記3ケースについて、それぞれ必要な演算処理と描画方法の説明を詳細に行う。
【0018】
・1点のみが円1内部に存在する場合。(図1)
円1内部に存在する点を挟んだ2辺と円1との交点2点を計算する。
その2点と円1の中心が構成する2つの角度を始角、終角として、その範囲についてのみ座標を算出して円弧を描画する。
【0019】
・2点が円1内部に存在する場合。(図2)
円1内部に存在する点を通る平行線2辺と円1との交点2点を計算する。
その2点と円1の中心が構成する2つの角度を始角、終角として、その範囲についてのみ座標を算出して円弧を描画する。
【0020】
・3点が円1内部に存在する場合。(図2)
円1外部に存在する1点を挟んだ2辺と円1との交点2点を計算する。
その2点と円1の中心が構成する2つの角度を始角、終角として、その範囲についてのみ座標を算出して円弧を描画する。
【0021】
以上のような振り分けを実施することによって、拡大された円1の一部(円弧)を描画する際に、実際に表示されている部分のみを計算、描画することによって描画に必要な演算総量を削減でき、描画を効率的に実施することができる。
【0022】
【発明の効果】
請求項1に記載の発明では、CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、前記矩形の各辺と前記円との交点座標を演算するステップと、 前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップとで、円の一部を描画するので、実際に表示される部分のみを計算、描画することによって描画に必要な演算総量を削減でき、描画を効率的に実施することができる。
【0023】
また、請求項2に記載の発明では、CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、前記4点の座標が前記円内に存在するか否かを判定するステップと、前記4点の座標の内の1〜3点の座標が前記円内に存在すると判断された場合にのみ、前記矩形の各辺と前記円との交点座標を演算するステップと、前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップとで、円の一部を描画するので、通常のコマンドを使用して描画する場合と、円を描画する必要がない場合に対応できる。
【0024】
請求項3〜5に記載の発明では、描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップの判断結果に応じた処理ができる。
【0025】
請求項6及び7に記載の発明では、実際に表示される部分のみを計算、描画することによって描画に必要な演算総量を削減でき、描画を効率的に実施するプログラムが得られる。
【図面の簡単な説明】
【図1】表示領域の4点座標うち1点のみが円1の内部に存在する状態を示す図である。
【図2】表示領域の4点座標うち2点が円の内部に存在する状態を示す図である。
【図3】表示領域の4点座標うち3点が円の内部に存在する状態を示す図である。
【図4】表示領域の4点座標うち4点全てが円の内部に存在する状態を示す図である。
【図5】表示領域の4点座標の4点全てが円の外部に存在すると共に、円は表示領域の内部に存在する状態を示す図である。
【図6】表示領域の4点座標の4点全てが円の外部に存在すると共に、円は表示領域の外部に存在する状態を示す図である。
【図7】描画する円の一部を含む図形を示す図である。
【図8】図7の図形の描画のための1段階を示す図である。
【図9】図7の図形の直角部を拡大した図である。
【図10】図7の図形の描画方法の手順を示すフローチャートである。
【符号の説明】
1    円
2    矩形の表示領域
P1〜P4    4点座標
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a drawing method of a graphic in a CAD system.
[0002]
[Prior art]
2. Description of the Related Art Recently, CAD (Computer-Aided-Design) systems have become widespread in design work in various fields under the influence of high performance and low price of computers.
Along with the spread, drawings that initially use various shapes (circles, curves, etc.) from a set of simple line segments are increasing.
When drawing a circle element in the CAD system software, it is usually realized by using a circle drawing command provided in a compiler language for describing a program.
[0003]
However, since the drawing of a circle requires delicate smoothness as the display is enlarged, the amount of calculation required for drawing increases.
Therefore, these commands often do not correspond to a case where a part of a circle is extremely enlarged.
In this case, it is common to calculate circular coordinates by calculation using a trigonometric function, and draw the coordinates finely by line segments.
That is, a circle having a center coordinate (X0, Y0) radius r is
X = r × Cos θ + X0, Y = r × Sin θ + Y0 (θ = 0 to 2π)
, The coordinate group obtained is connected by a line segment and pseudo-drawn.
[0004]
As a method of drawing a part (arc) of a circle, a method described in Japanese Patent Application Laid-Open No. 2001-14357 is known.
This publication discloses the technique shown in FIGS. 7 to 10 using a part of a circle as a drawing method.
FIG. 7 is a diagram illustrating a graphic including a part of a circle to be drawn.
FIG. 8 is a diagram showing one stage for drawing the figure of FIG.
FIG. 9 is an enlarged view of a right angle portion of the figure of FIG.
FIG. 10 is a flowchart showing the procedure of the drawing method of the figure shown in FIG.
[0005]
In order to draw a figure including a part of a circle (arc) in the figure shown in FIG. 7, first, as shown in FIG. 8, a square 31a of FIG. .
First, the ruled lines 32 and 33 are designated by the cursor on the screen using the keyboard 2 and saved. (Step 11)
Next, the right angle portion 34 is identified and stored. (Step 12)
Next, the coordinates of the first end point 34a of the right angle portion 34 are calculated. (Step 13)
Next, the radius value of the first circular arc 35 is input to the coordinate center of the end point 34a. (Step 14)
Subsequently, the first circular arc 35 input to the right-angled portion 34 is drawn. (Step 15)
Next, each line segment is cut at the first and second contact points 36 and 37 between the arc 35 and the ruled lines 32 and 33, and the first and second straight lines 38 and 39 on the side of the first end point 34a are connected to the first and second straight lines 38 and 39. Is deleted. (Step 16)
In the technique disclosed in the above publication, even when a part of a circle is drawn, an arithmetic processing for drawing the entire circle is executed, and thereafter, a processing for deleting an unnecessary part is performed. The computational processing load required for was extremely large.
[0006]
[Problems to be solved by the invention]
However, since this method uses a lot of trigonometric functions, the amount of calculation of the drawing coordinates further increases, and a heavy load is imposed on the computer.
As a result, the drawing speed becomes slow, the work comfort is lost, and the operation is unstable due to extremely consuming memory resources.
Especially when drawing only a part of an extremely enlarged circle, the calculation of drawing the whole circle is performed as described above, and the unnecessary parts are deleted. I was even going.
[0007]
An object (object) of the present invention is to efficiently draw a part (arc) of an extremely enlarged circle in a two-dimensional CAD system.
[0008]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, a method of drawing a part of a circle in a CAD system,
Determining coordinates of four points indicating a rectangular display area that displays a circle element that is a part of a drawing target circle; calculating intersection coordinates of each side of the rectangle and the circle; Calculating the coordinates of a part of the circle in the display area, using the angle formed by the coordinates and the center coordinate of the circle as a start angle and an end angle, to render the part of the circle. (Claim 1)
[0009]
Also, in the CAD system, a method of drawing a part of a circle,
A step of determining coordinates of four points indicating a rectangular display area that displays a circle element that is a part of a circle to be drawn; and a step of determining whether or not the coordinates of the four points are within the circle. Calculating the intersection coordinates of each side of the rectangle and the circle only when it is determined that the coordinates of the first to third points among the coordinates of the four points are present in the circle; And calculating the coordinates of a part of the circle in the display area, using the angle formed by the coordinates of the circle and the center coordinates of the circle as a start angle and an end angle. (Claim 2)
[0010]
Also, in the CAD system, a method of drawing a part of a circle,
A step of determining coordinates of four points indicating a rectangular display area that displays a circle element that is a part of a circle to be drawn; and a step of determining whether or not the coordinates of the four points are within the circle. If it is determined that one of the coordinates of the four points is within the circle, the coordinates of the intersection of the circle with two sides sandwiching the point within the circle are calculated, and the intersection coordinates are calculated. And calculating the coordinates of a part of the circle in the display area with the two angles formed by the center of the circle as the start angle and the end angle, thereby rendering the part of the circle. (Claim 3)
[0011]
Also, in the CAD system, a method of drawing a part of a circle,
A step of determining coordinates of four points indicating a rectangular display area that displays a circle element that is a part of a circle to be drawn; and a step of determining whether or not the coordinates of the four points are within the circle. If it is determined that the coordinates of two of the coordinates of the four points are within the circle, the intersection coordinates of two parallel lines passing through the points existing in the circle and the circle are calculated. Calculating the coordinates of a part of the circle in the display area with the two angles formed by the coordinates and the center of the circle as the start angle and the end angle, and rendering the part of the circle. (Claim 4)
[0012]
Also, in the CAD system, a method of drawing a part of a circle,
A step of determining coordinates of four points indicating a rectangular display area that displays a circle element that is a part of a circle to be drawn; and a step of determining whether or not the coordinates of the four points are within the circle. If it is determined that the coordinates of three of the four coordinates are within the circle, the coordinates of the intersection of the circle and two sides sandwiching one point that is outside the circle are calculated. Calculating the coordinates of a part of the circle in the display area with the two angles formed by the coordinates and the center of the circle as the start angle and the end angle, and rendering the part of the circle. (Claim 5)
[0013]
In a CAD system, a program for drawing a part of a circle,
A process of determining coordinates of four points indicating a rectangular display area for displaying a circle element which is a part of a circle to be drawn; a process of calculating coordinates of intersections of each side of the rectangle with the circle; A part of the circle that causes a computer of a CAD system to execute a process of calculating a coordinate of a part of the circle in the display area with an angle formed by the coordinates and the center coordinate of the circle as a start angle and an end angle. The program to draw. (Claim 6)
[0014]
In a CAD system, a program for drawing a part of a circle,
A process of determining coordinates of four points indicating a rectangular display area that displays a circle element that is a part of a circle to be drawn; and a process of determining whether or not the coordinates of the four points are present in the circle A process of calculating intersection coordinates between each side of the rectangle and the circle only when it is determined that one to three coordinates of the four coordinates are present in the circle; Drawing a part of the circle that causes a computer of a CAD system to execute a process of calculating coordinates of a part of the circle in the display area, with the angle formed by the center coordinate of the circle as a start angle and an end angle. Program to do. (Claim 7)
[0015]
BEST MODE FOR CARRYING OUT THE INVENTION
In the CAD system, when the circle 1 is extremely enlarged and a part is displayed, a part (arc) of the displayed circle is in a display area 2 determined by four points (P !, P2, P3, P4). The drawing is performed such that a part of the circumference of any of the two or three sides of the four sides.
At this time, the relationship between the four-point coordinates (P1 to P4) indicating the display area 2 and the circle 1 can be classified as follows.
Among the four coordinates (P1, P2, P3, P4) indicating the display area 2,
(A) As shown in FIG. 1, only one point exists inside the circle 1.
(B) Two points exist inside the circle 1 as shown in FIG.
(C) Three points exist inside the circle 1 as shown in FIG.
(D) All four points are inside the circle 1 as shown in FIG.
(E) As shown in FIG. 5, all four points exist outside the circle 1, and the circle 1 exists inside the display area 2.
(F) As shown in FIG. 6, all four points exist outside the circle 1, and the circle 1 exists outside the display area 2.
[0016]
In the case of FIG. 5E of FIG. 5, all four points are outside the circle 1, but since the center of the circle 1 is inside the display area 2, all the circles are drawn. Draw using commands.
In FIG. 6F, all four points are outside the circle 1, but since the center of the circle 1 is outside the display area 2, the circle 1 is outside the display area 2. , Circle 1 need not be drawn.
Also, in the case of FIG. 4 (d) and in the case where all four points are inside the circle 1, there is no need to draw since the display area 2 does not include a circle.
[0017]
Therefore, a part of a circle is drawn in the display area 2 in the cases (a), (b), and (c) shown in FIGS.
Hereinafter, for each of the above three cases, the necessary arithmetic processing and drawing method will be described in detail.
[0018]
-When only one point exists inside the circle 1. (Fig. 1)
Two points of intersection between the two sides of the point existing inside the circle 1 and the circle 1 are calculated.
The two angles formed by the two points and the center of the circle 1 are defined as a start angle and an end angle, and coordinates are calculated only in that range to draw an arc.
[0019]
-When two points exist inside the circle 1. (Fig. 2)
Two points of intersection between the two parallel lines passing through the points inside the circle 1 and the circle 1 are calculated.
The two angles formed by the two points and the center of the circle 1 are defined as a start angle and an end angle, and coordinates are calculated only in that range to draw an arc.
[0020]
-When three points exist inside the circle 1. (Fig. 2)
Calculate two intersections between two sides of one point existing outside the circle 1 and the circle 1.
The two angles formed by the two points and the center of the circle 1 are defined as a start angle and an end angle, and coordinates are calculated only in that range to draw an arc.
[0021]
By performing the above-described sorting, when drawing a part (arc) of the enlarged circle 1, only the part actually displayed is calculated and drawn, thereby reducing the total amount of calculation necessary for drawing. Thus, the drawing can be efficiently performed.
[0022]
【The invention's effect】
The invention according to claim 1 is a method for drawing a part of a circle in a CAD system,
Determining coordinates of four points indicating a rectangular display area that displays a circle element that is a part of a drawing target circle; calculating intersection coordinates of each side of the rectangle and the circle; Calculating the coordinates of a part of the circle in the display area, with the angle formed by the coordinates and the center coordinates of the circle as the start angle and the end angle, the part of the circle is drawn. By calculating and drawing only the displayed portion, the total amount of calculation required for drawing can be reduced, and drawing can be performed efficiently.
[0023]
In the invention according to claim 2, a method of drawing a part of a circle in a CAD system,
A step of determining coordinates of four points indicating a rectangular display area that displays a circle element that is a part of a circle to be drawn; and a step of determining whether or not the coordinates of the four points are within the circle. Calculating the intersection coordinates of each side of the rectangle and the circle only when it is determined that the coordinates of one to three of the coordinates of the four points are within the circle; And calculating the coordinates of a part of the circle in the display area, with the angle formed by the angle formed by the center coordinates of the circle as the start angle and the end angle. And the case where there is no need to draw a circle.
[0024]
According to the third to fifth aspects of the present invention, it is possible to perform a process according to the determination result of the step of determining the coordinates of four points indicating a rectangular display area that displays a circle element that is a part of the circle to be drawn.
[0025]
According to the sixth and seventh aspects of the present invention, by calculating and drawing only the part that is actually displayed, the total amount of calculation required for drawing can be reduced, and a program for efficiently executing drawing can be obtained.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a state in which only one of four coordinates of a display area exists inside a circle 1;
FIG. 2 is a diagram illustrating a state in which two of four coordinates of a display area exist inside a circle;
FIG. 3 is a diagram showing a state where three points out of four coordinates of a display area exist inside a circle;
FIG. 4 is a diagram showing a state in which all four points of four-point coordinates in a display area are present inside a circle;
FIG. 5 is a diagram showing a state in which all four points of the four-point coordinates of the display area exist outside the circle, and the circle exists inside the display area.
FIG. 6 is a diagram showing a state in which all four points of the four-point coordinates of the display area exist outside the circle, and the circle exists outside the display area.
FIG. 7 is a diagram illustrating a graphic including a part of a circle to be drawn.
FIG. 8 is a diagram showing one stage for drawing the graphic in FIG. 7;
FIG. 9 is an enlarged view of a right angle portion of the graphic in FIG. 7;
FIG. 10 is a flowchart illustrating a procedure of a drawing method of the graphic in FIG. 7;
[Explanation of symbols]
1 circle 2 rectangular display area P1 to P4 4 point coordinates

Claims (7)

CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、
前記矩形の各辺と前記円との交点座標を演算するステップと、
前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップと、
を含むことを特徴とする円の一部を描画する方法。
A method of drawing a part of a circle in a CAD system,
Determining coordinates of four points indicating a rectangular display area for displaying a circle element that is a part of a circle to be drawn;
Calculating intersection coordinates of each side of the rectangle and the circle;
Calculating the coordinates of a part of the circle in the display area, with the angle formed by the intersection coordinates and the center coordinates of the circle as the start angle and the end angle;
A method of drawing a part of a circle, comprising:
CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、
前記4点の座標が前記円内に存在するか否かを判定するステップと、
前記4点の座標の内の1〜3点の座標が前記円内に存在すると判断された場合にのみ、前記矩形の各辺と前記円との交点座標を演算するステップと、
前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップと、
を含むことを特徴とする円の一部を描画する方法。
A method of drawing a part of a circle in a CAD system,
Determining coordinates of four points indicating a rectangular display area for displaying a circle element that is a part of a circle to be drawn;
Determining whether the coordinates of the four points are within the circle;
Calculating the intersection coordinates of each side of the rectangle and the circle only when it is determined that the coordinates of the first to third points among the coordinates of the four points are present in the circle;
Calculating the coordinates of a part of the circle in the display area, with the angle formed by the intersection coordinates and the center coordinates of the circle as the start angle and the end angle;
A method of drawing a part of a circle, comprising:
CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、
前記4点の座標が前記円内に存在するか否かを判定するステップと、
前記4点の座標の内の1点の座標が前記円内に存在すると判断された場合に、円内に存在する点を挟んだ2辺と円との交点座標を演算し、該交点座標と円の中心が構成する2つの角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップと、
を含むことを特徴とする円の一部を描画する方法。
A method of drawing a part of a circle in a CAD system,
Determining coordinates of four points indicating a rectangular display area for displaying a circle element that is a part of a circle to be drawn;
Determining whether the coordinates of the four points are within the circle;
When it is determined that one of the coordinates of the four points is present in the circle, the coordinates of the intersection of the circle and two sides sandwiching the point present in the circle are calculated, and the intersection coordinates are calculated. Calculating the coordinates of a part of the circle in the display area, with the two angles formed by the center of the circle as the start angle and the end angle;
A method of drawing a part of a circle, comprising:
CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、
前記4点の座標が前記円内に存在するか否かを判定するステップと、
前記4点の座標の内の2点の座標が前記円内に存在すると判断された場合に、円内に存在する点を通る平行線2辺と円との交点座標を演算し、該交点座標と円の中心が構成する2つの角度を始角及び終角として、前記表示領域内における円の一部の座標を演算するステップと、
を含むことを特徴とする円の一部を描画する方法。
A method of drawing a part of a circle in a CAD system,
Determining coordinates of four points indicating a rectangular display area for displaying a circle element that is a part of a circle to be drawn;
Determining whether the coordinates of the four points are within the circle;
When it is determined that the coordinates of two of the coordinates of the four points are present in the circle, the coordinates of the intersection between the two parallel lines passing through the points existing in the circle and the circle are calculated. Calculating the coordinates of a part of the circle in the display area, using the two angles formed by the center of the circle as the start angle and the end angle;
A method of drawing a part of a circle, comprising:
CADシステムにおいて、円の一部を描画する方法であって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定するステップと、
前記4点の座標が前記円内に存在するか否かを判定するステップと、
前記4点の座標の内の3点の座標が前記円内に存在すると判断された場合に、円外に存在する1点を挟んだ2辺と円との交点座標を演算し、該交点座標と円の中心が構成する2つの角度を始角、終角として、前記表示領域内における円の一部の座標を演算するステップと、
を含むことを特徴とする円の一部を描画する方法。
A method of drawing a part of a circle in a CAD system,
Determining coordinates of four points indicating a rectangular display area for displaying a circle element that is a part of a circle to be drawn;
Determining whether the coordinates of the four points are within the circle;
When it is determined that the coordinates of three of the four coordinates are within the circle, the coordinates of the intersection of the circle and two sides sandwiching one point outside the circle are calculated, and the intersection coordinates are calculated. Calculating the coordinates of a part of the circle in the display area, using the two angles formed by the center of the circle as the start angle and the end angle,
A method of drawing a part of a circle, comprising:
CADシステムにおいて、円の一部を描画するプログラムであって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定する処理と、
前記矩形の各辺と前記円との交点座標を演算する処理と、
前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算する処理と、
をCADシステムのコンピュータに実行させることを特徴とする円の一部を描画するプログラム。
A program for drawing a part of a circle in a CAD system,
A process of determining coordinates of four points indicating a rectangular display area for displaying a circle element which is a part of a circle to be drawn;
A process of calculating intersection coordinates of each side of the rectangle and the circle;
A process of calculating coordinates of a part of the circle in the display area, with an angle formed by the intersection coordinates and the center coordinates of the circle as a start angle and an end angle;
Which causes a computer of a CAD system to execute the program.
CADシステムにおいて、円の一部を描画するプログラムであって、
描画対象の円の一部である円要素を表示する矩形の表示領域を示す4点の座標を決定する処理と、
前記4点の座標が前記円内に存在するか否かを判定する処理と、
前記4点の座標の内の1〜3点の座標が前記円内に存在すると判断された場合にのみ、前記矩形の各辺と前記円との交点座標を演算する処理と、
前記交点座標及び前記円の中心座標とで形成された角度を始角及び終角として、前記表示領域内における円の一部の座標を演算する処理と、
をCADシステムのコンピュータに実行させることを特徴とする円の一部を描画するプログラム。
A program for drawing a part of a circle in a CAD system,
A process of determining coordinates of four points indicating a rectangular display area for displaying a circle element which is a part of a circle to be drawn;
Processing for determining whether or not the coordinates of the four points are within the circle;
Only when it is determined that the coordinates of 1-3 points among the coordinates of the four points are present in the circle, a process of calculating intersection coordinates of each side of the rectangle and the circle;
A process of calculating coordinates of a part of the circle in the display area, with an angle formed by the intersection coordinates and the center coordinates of the circle as a start angle and an end angle;
Which causes a computer of a CAD system to execute the program.
JP2002184353A 2002-06-25 2002-06-25 Method and program for drawing part of circle in cad system Pending JP2004030135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002184353A JP2004030135A (en) 2002-06-25 2002-06-25 Method and program for drawing part of circle in cad system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002184353A JP2004030135A (en) 2002-06-25 2002-06-25 Method and program for drawing part of circle in cad system

Publications (1)

Publication Number Publication Date
JP2004030135A true JP2004030135A (en) 2004-01-29

Family

ID=31180293

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002184353A Pending JP2004030135A (en) 2002-06-25 2002-06-25 Method and program for drawing part of circle in cad system

Country Status (1)

Country Link
JP (1) JP2004030135A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103893A (en) * 2017-06-30 2017-08-29 上海天马有机发光显示技术有限公司 It is a kind of to improve the circular method for showing platen edge display effect
CN107833227A (en) * 2017-10-31 2018-03-23 苏州乐米信息科技股份有限公司 A kind of method for drafting and its system of circular clipping region
CN113706658A (en) * 2021-08-18 2021-11-26 江苏红豆工业互联网有限公司 Discretization parameter drawing method based on clothing arc curve

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103893A (en) * 2017-06-30 2017-08-29 上海天马有机发光显示技术有限公司 It is a kind of to improve the circular method for showing platen edge display effect
US10482844B2 (en) 2017-06-30 2019-11-19 Shanghai Tianma AM-OLED Co., Ltd. Method to improve display performance at edges of circular display screen
CN107833227A (en) * 2017-10-31 2018-03-23 苏州乐米信息科技股份有限公司 A kind of method for drafting and its system of circular clipping region
CN113706658A (en) * 2021-08-18 2021-11-26 江苏红豆工业互联网有限公司 Discretization parameter drawing method based on clothing arc curve
CN113706658B (en) * 2021-08-18 2023-09-05 江苏红豆工业互联网有限公司 Discretization parameter drawing method based on clothing circular arc curve

Similar Documents

Publication Publication Date Title
JP4028031B2 (en) Method for transforming curve of arbitrary shape link and method for maintaining topology of node link diagram
US8525854B2 (en) Display device and screen display method
JP2004030135A (en) Method and program for drawing part of circle in cad system
JP2616353B2 (en) Input indicating device
JPS61133432A (en) Cursor controller
JPH1031757A (en) Graphic processor and method for calculating shortest distance between elements
JP2003085569A (en) Inside and outside point discrimination algorithm
JP2000251081A (en) Inner point deciding method, graphic drawing device, and program storage medium
JP2020060930A (en) Input device
JP2786098B2 (en) Figure enlargement editing method
WO2004111887A1 (en) Three-dimensional design assisting program
JP3451293B2 (en) Figure transformation device
JP2001109883A (en) Information processor and its control method, and storage medium
JPH06243217A (en) Graphic generating device
JP4089806B2 (en) Curve generating device and method, and storage medium
JPH1186008A (en) Method and equipment for drawing processing
JPH03257682A (en) Three-dimensional graphic display processing method
JP2005099935A5 (en)
JPH1031760A (en) Graphic processor
JPH07282285A (en) Graphic editing device
JPS6254375A (en) Graphic input system
JPH06348813A (en) Graphic processor
JPH06243218A (en) Circular arc generating method and device
JPH03238568A (en) Clipping circuit
JPH07200857A (en) Graphic deforming device

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20041001