JP2897541B2 - Closed figure extraction method - Google Patents

Closed figure extraction method

Info

Publication number
JP2897541B2
JP2897541B2 JP4221105A JP22110592A JP2897541B2 JP 2897541 B2 JP2897541 B2 JP 2897541B2 JP 4221105 A JP4221105 A JP 4221105A JP 22110592 A JP22110592 A JP 22110592A JP 2897541 B2 JP2897541 B2 JP 2897541B2
Authority
JP
Japan
Prior art keywords
line segment
closed
line
procedure
traced
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 - Lifetime
Application number
JP4221105A
Other languages
Japanese (ja)
Other versions
JPH0668202A (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.)
NEC Corp
Original Assignee
Nippon 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP4221105A priority Critical patent/JP2897541B2/en
Publication of JPH0668202A publication Critical patent/JPH0668202A/en
Application granted granted Critical
Publication of JP2897541B2 publication Critical patent/JP2897541B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は閉図形抽出方法に関し、
特にレイアウト系CAE(Computer Aided Engineering)
における、プリント基板や集積回路などのCAD(Compu
ter Aided Design) で、面積を持つ導体領域や禁止エリ
アのパターンメンテンス方法の閉図形抽出方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a closed figure extracting method,
In particular, layout CAE (Computer Aided Engineering)
Of CAD (Compu
ter Aided Design), and relates to a closed figure extraction method of a pattern maintenance method for a conductor region having an area or a prohibited area.

【0002】[0002]

【従来の技術】従来の閉図形抽出方法は、独立に与えら
れた線分群に対し、それぞれの端点を共有する線分を順
次トレースし、分岐点に達した場合は始めに見つけた線
分を優先してトレースし、他の分岐線分はトレースは行
わない。例として図4の様な線分群が与えられた場合、
順次トレースして閉図形300を検出する。また、トレ
ースしながらトレース済みの線分にフラグを立て、二度
とトレースしない様にする。この様なシーケンスをフラ
グの立っていない線分がなくなるまで繰り返す。
2. Description of the Related Art In a conventional closed figure extraction method, a line segment sharing each end point is sequentially traced for an independently given line segment group, and when a branch point is reached, the line segment found first is traced. Tracing is performed with priority, and tracing is not performed for other branch line segments. For example, if a group of line segments as shown in FIG. 4 is given,
The closed figure 300 is detected by sequentially tracing. In addition, while tracing, a flag is set on the traced line segment so that the trace is not traced again. Such a sequence is repeated until there is no line segment without a flag.

【0003】図4において、1回目のトレースが行われ
なかった線分群301は閉図形を形成しないため、2回
目のトレース時においてコの字型の閉じていない線分と
見なされ閉図形としてはキャンセルされる。
In FIG. 4, a line segment group 301 for which the first tracing has not been performed does not form a closed figure. Canceled.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の閉図形
抽出方法は、与えられた線分群の中に分岐点が存在した
場合、その中の1つのみを有効にしてトレースしていた
ため、場合によっては検出できない閉図形があった。し
たがって、コンピュータが理解できるように、データ入
力者が慎重にデータ入力を行っていた。また、閉図形内
にもう一つの閉図形が含まれているドーナツ状の閉図形
表現として図2の様に変形した凹図形は扱えないという
難点があった。
In the above-described conventional closed figure extraction method, when a branch point exists in a given line segment group, only one of the branch points is enabled and traced. Some closed figures could not be detected. Therefore, the data entry person carefully entered the data so that the computer could understand. Further, there is a drawback in that a concave figure deformed as shown in FIG. 2 cannot be handled as a donut-shaped closed figure expression in which another closed figure is included in the closed figure.

【0005】[0005]

【課題を解決するための手段】本発明の閉図形抽出方法
は、両端点の座標が与えられた複数の線分に対し任意の
線分を抽出しその片側を開始点として記憶する手順と、
もう一方の端点に接続する他の線分を探索する事を繰り
返し線分を連鎖的にトレースする手順と、トレース時に
トレース済みのフラグを立てていく手順と、端点を共有
する線分が複数存在した場合に手前の線分とのなす角度
が最も大きくなる線分を選び出す手順と、他の線分をス
タックしておく手順と、トレースによって開始点に戻っ
た場合トレースした線分を閉図形を構成する辺として出
力する手順と、スタックしておいた線分を開始線分とし
て同様にトレースをする手順と、スタックしておいた線
分にトレース済みのフラグが立っているものをキャンセ
ルする手順を備えて構成される。
A closed figure extracting method according to the present invention comprises the steps of extracting an arbitrary line segment from a plurality of line segments given the coordinates of both end points and storing one of the line segments as a starting point;
A procedure to repeatedly search for another line segment connected to the other end point, trace the line segments in a chain, set a traced flag at the time of tracing, and there are multiple line segments sharing the end point In this case, the procedure to select the line segment that makes the largest angle with the previous line segment, the procedure to stack other line segments, and the procedure to close the traced line when returning to the starting point by tracing Procedure to output as constituent sides, procedure to trace similarly with stacked line segment as start line segment, and procedure to cancel stacking line segment with traced flag set It is comprised including.

【0006】[0006]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

【0007】図1に本発明の閉図形抽出方法の一実施例
を示すSPD(Structur Program Diagram)形式のフロー
チャートである。
FIG. 1 is a flowchart of an SPD (Structur Program Diagram) format showing an embodiment of a closed figure extracting method according to the present invention.

【0008】図1は本発明が提案するアルゴリズムのフ
ローチャートを示し、この図1のアルゴリズムにしたが
って、図2以降で具体的に説明する。
FIG. 1 shows a flow chart of the algorithm proposed by the present invention. The algorithm of FIG.

【0009】図2の様な線分群が与えられた場合、任意
の線分をまず抽出する事になるが、ここでは後に続くト
レース処理を反時計方向に進めるため、できるだけ左下
の端点を抽出する事とする。そのために最小のy座標を
含む線分をまず求め、さらに水平線とのなす角度が小さ
い線分を更に選択する。図2では最小のy座標を含む線
分として線分101、線分112、線分102が候補に
上がるが、水平線とのなす角度が小さい線分101なの
でこれを開始線分として選出する。次に開始点を端点1
に決定し、端点2を共有する線分102を検出する。さ
らに反対側の端点3を共有する線分を検出するが、これ
は線分103、線分107、線分108が存在する。こ
れらの内、線分102とのなす角度が最大のものは、線
分103および線分107であるが、さらに長さの短い
線分103が採用される。したがって、トレースとして
は端点4を共有する線分を探す事になる。なお、この際
線分107と線分108をスタックしておく。このよう
にしてトレースを続けると線分107に到達するが、端
点3にも同様の分岐が存在することから、上記と同様の
規則を適用すると線分108がトレース線分として選び
出され、かつ線分102と線分103がスタックされ
る。この様にして線分110に至り、開始点1に到達し
て閉図形200が出力される。また、出力時に閉図形の
辺をなす線分にはそれを表現するフラグを立てておく。
When a group of line segments as shown in FIG. 2 is given, an arbitrary line segment is extracted first. Here, in order to proceed the subsequent trace processing in a counterclockwise direction, the lower left end point is extracted as much as possible. Things. For this purpose, a line segment including the minimum y coordinate is first obtained, and a line segment with a smaller angle with the horizontal line is further selected. In FIG. 2, the line segments 101, 112, and 102 are candidates as the line segments including the minimum y coordinate. However, since the line segment 101 has a small angle with the horizontal line, this is selected as the start line segment. Next, start point is endpoint 1.
And the line segment 102 sharing the end point 2 is detected. Further, line segments sharing the opposite end point 3 are detected, and there are line segments 103, 107, and 108. Among these, the line segment 103 and the line segment 107 have the largest angle with the line segment 102, but the line segment 103 having a shorter length is adopted. Therefore, a line segment sharing the end point 4 is searched for as a trace. At this time, the line segment 107 and the line segment 108 are stacked. When tracing is continued in this manner, the line segment 107 is reached. However, since a similar branch also exists at the end point 3, if the same rule as above is applied, the line segment 108 is selected as a trace line segment, and Line segment 102 and line segment 103 are stacked. Thus, the line segment 110 is reached, the start point 1 is reached, and the closed figure 200 is output. At the time of output, a line segment forming a side of the closed figure is set with a flag for expressing it.

【0010】次に、スタックされている線分より再度、
閉図形の検出を開始するが、線分107と線分108お
よび線分102、線分103はすでに閉図形として検出
済みであることが上記のフラグで判明するので、開始線
分としての候補からははずされ、スタックが空になった
事から処理が終了する。
Next, again from the stacked line segments,
The detection of the closed figure is started, but since the above-mentioned flag shows that the line segment 107, the line segment 108, the line segment 102, and the line segment 103 have already been detected as the closed figure, it is determined from the candidates as the start line segment. Is removed, and the process ends because the stack is empty.

【0011】もう一例として、図3の場合で説明する。
図3の様な図形が入力される局面としては、入力者がま
ず、線分120、線分121、線分122、線分123
で構成される閉図形を作成した後、この図形を大きくす
るように修正しようと試み線分124、線分125、線
分126を追加した状況で起こる。この際、線分122
を消去しておけば問題はないが、閉図形としての実体
は、線分122があろうがなかろうが関係はないので、
図面としてはそのままにしても、問題はない。まず、開
始点として端点20が選ばれ、開始線分として線分12
0が選ばれる。トレースを開始して線分121に至るが
ここで線分124がスタックされ、線分122でトレー
スが進められる。さらに、線分126がスタックされ、
線分123にて開始点20に到達するので閉図形201
が出力される。
As another example, the case of FIG. 3 will be described.
As a phase in which a graphic as shown in FIG. 3 is input, first, the input person first inputs a line segment 120, a line segment 121, a line segment 122, and a line segment 123.
After creating the closed graphic composed of the following, an attempt is made to modify the graphic so as to increase the size of the graphic. At this time, the line segment 122
There is no problem if is deleted, but since the entity as a closed figure does not matter whether the line segment 122 exists or not,
There is no problem if the drawings are left as they are. First, the end point 20 is selected as the starting point, and the segment 12 is selected as the starting segment.
0 is chosen. The tracing is started to reach the line segment 121, where the line segment 124 is stacked, and the trace is advanced at the line segment 122. Further, the line segment 126 is stacked,
Since the start point 20 is reached at the line segment 123, the closed figure 201
Is output.

【0012】次にスタック内の線分124から開始点を
端点22としてトレースが開始される。線分125、線
分126と進み、ここで分岐点である端点23に到達す
るので、線分123がスタックされ、線分122でトレ
ースが再開される。この段階で開始点である端点22に
到達するので、2つ目の閉図形202が出力される。
Next, tracing is started from the line segment 124 in the stack with the start point as the end point 22. Proceeding to the line segment 125 and the line segment 126 and reaching the end point 23 which is a branch point, the line segment 123 is stacked and the trace is restarted at the line segment 122. At this stage, since the end point 22 which is the start point is reached, the second closed figure 202 is output.

【0013】さて、残されたスタックには線分123と
線分126が存在しているが、すでに出力された閉図形
の辺の構成要素としてのフラグが立っているので、開始
線分としての候補とはならず処理が終了する。
Although the remaining stack includes the line segment 123 and the line segment 126, since the flag as a component of the side of the already output closed figure is set, the line segment as the start line segment is set. The process ends without being a candidate.

【0014】[0014]

【発明の効果】以上説明したように、本発明の閉図形抽
出方法は、複数の線分が端点を共有する際、その分岐点
をスタックしておくことで、閉図形となりうる図形は漏
らさず検出することが可能である。さらに、分岐におけ
る複数の線分から、どれをトレース対象とし、どれをス
タックするかを一意的に決定する方法を与える事で、実
行時の偶然性を排除することが可能である。また、分岐
におけるトレース対象の抽出において、直前の線分との
角度が最大であるものという条件と、トレース開始の線
分の決定方法とで、極力小刻みに閉図形を出力する様に
なり、与えられた線分群の情報を漏らさず閉図形にする
考慮が可能となる。
As described above, according to the closed figure extracting method of the present invention, when a plurality of line segments share an end point, by stacking the branch points, a figure which can be a closed figure is not leaked. It is possible to detect. Furthermore, by providing a method for uniquely determining which of the plurality of line segments in the branch is to be traced and which is to be stacked, it is possible to eliminate contingency at the time of execution. Also, in the extraction of the trace target in the branch, the condition that the angle with the immediately preceding line segment is the maximum and the method of determining the line segment at the start of the trace output the closed figure as little as possible. It is possible to consider the information of the obtained line segment group as a closed figure without leaking.

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

【図1】本発明の閉図形抽出方法の一実施例を示すSP
D(Structur Program Diagram)形式のフローチャートで
ある。
FIG. 1 is an SP showing an embodiment of a closed figure extracting method according to the present invention;
It is a flowchart of D (Structur Program Diagram) format.

【図2】本実施例の閉図形抽出方法における動作の一例
を示す図である。
FIG. 2 is a diagram illustrating an example of an operation in the closed figure extracting method according to the embodiment;

【図3】本実施例の閉図形抽出方法における動作の一例
を示す図である。
FIG. 3 is a diagram illustrating an example of an operation in the closed figure extracting method according to the embodiment;

【図4】従来の閉図形抽出方法における動作を示す図で
ある。
FIG. 4 is a diagram showing an operation in a conventional closed figure extracting method.

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

1〜25 端点 101〜126 線分 200〜300 閉図形 301 線分群 1 to 25 Endpoint 101 to 126 Line segment 200 to 300 Closed figure 301 Line segment group

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】両端点の座標が与えられた複数の線分に対
し任意の線分を抽出しその片側を開始点として記憶する
手順と、もう一方の端点に接続する他の線分を探索する
事を繰り返し線分を連鎖的にトレースする手順と、トレ
ース時にトレース済みのフラグを立てていく手順と、端
点を共有する線分が複数存在した場合に手前の線分との
なす角度が最も大きくなる線分を選び出す手順と、他の
線分をスタックしておく手順と、トレースによって開始
点に戻った場合トレースした線分を閉図形を構成する辺
として出力する手順と、スタックしておいた線分を開始
線分として同様にトレースをする手順と、スタックして
おいた線分にトレース済みのフラグが立っているものを
キャンセルする手順を備えることを特徴とする閉図形抽
出方法。
1. A procedure for extracting an arbitrary line segment from a plurality of line segments given the coordinates of both end points and storing one of the line segments as a start point, and searching for another line segment connected to the other end point. Repeat the steps to trace the line segments in a chain, to set the traced flag at the time of tracing, and to make the angle between the line segment in front when there are multiple line segments sharing the end point the most. A procedure to select a line segment to be enlarged, a procedure to stack other line segments, a procedure to output a traced line segment as a closed figure when returning to the starting point by tracing, A closed figure extracting method characterized by comprising a procedure of similarly performing a trace using a line segment as a start line segment and a procedure of canceling a stuck line segment having a traced flag set.
JP4221105A 1992-08-20 1992-08-20 Closed figure extraction method Expired - Lifetime JP2897541B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4221105A JP2897541B2 (en) 1992-08-20 1992-08-20 Closed figure extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4221105A JP2897541B2 (en) 1992-08-20 1992-08-20 Closed figure extraction method

Publications (2)

Publication Number Publication Date
JPH0668202A JPH0668202A (en) 1994-03-11
JP2897541B2 true JP2897541B2 (en) 1999-05-31

Family

ID=16761569

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4221105A Expired - Lifetime JP2897541B2 (en) 1992-08-20 1992-08-20 Closed figure extraction method

Country Status (1)

Country Link
JP (1) JP2897541B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7113517B2 (en) 2001-09-27 2006-09-26 International Business Machines Corporation Configurable hardware scheduler calendar search algorithm
US7020657B2 (en) 2001-09-27 2006-03-28 International Business Machines Corporation Scalable hardware scheduler time based calendar search algorithm
JP2007128173A (en) * 2005-11-01 2007-05-24 Fuji Heavy Ind Ltd Area calculation method using cad

Also Published As

Publication number Publication date
JPH0668202A (en) 1994-03-11

Similar Documents

Publication Publication Date Title
US9633063B2 (en) Methods and apparatus for automated redaction of content in a document
US6888542B1 (en) Error recovery in a computer aided design environment
JP2897541B2 (en) Closed figure extraction method
US20040105583A1 (en) Segmenting a composite image via minimum areas
CN115147442A (en) Grid pattern vectorization method, mobile terminal, electronic device, and medium
JP2878194B2 (en) Partial erasure and partial detection method of image data
US10157485B2 (en) Method and system for merging of polygons in adjacent tiles
JP3185342B2 (en) Figure pattern data processing method
JP2805538B2 (en) Printed wiring board connection verification device
JP2010152863A (en) System and method for extracting boundary node, and program
JP3305395B2 (en) Figure division device
JP2734107B2 (en) Image data centering processing method
CN116994002B (en) Image feature extraction method, device, equipment and storage medium
KR102395671B1 (en) Electronic device that provides improved file management function using management folder and operating method thereof
JPS59189471A (en) Wiring route searching system
JPH0588357A (en) Method for inspecting mask pattern
JP2009015774A (en) Information processing unit and information processing method
JPH064600A (en) Method and device for image retrieval
JP3759357B2 (en) Data creation method
JP3657725B2 (en) Line figure image processing method
JP2804347B2 (en) Image thinning method
EP1439484B1 (en) Segmenting an image via shortest cycles
JPH04246785A (en) Graphic preparing device
KR20220053988A (en) Apprartus and method for detecting objects of interest based on scalable deep neural networks
JP2867650B2 (en) Symbol candidate area detection method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990209

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20080312

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090312

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20100312

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100312

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20110312

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20110312

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20120312

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 14

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 14