JPH05324555A - Already executed operation canceller - Google Patents

Already executed operation canceller

Info

Publication number
JPH05324555A
JPH05324555A JP4152678A JP15267892A JPH05324555A JP H05324555 A JPH05324555 A JP H05324555A JP 4152678 A JP4152678 A JP 4152678A JP 15267892 A JP15267892 A JP 15267892A JP H05324555 A JPH05324555 A JP H05324555A
Authority
JP
Japan
Prior art keywords
undo
stack
information
redo
time
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
JP4152678A
Other languages
Japanese (ja)
Inventor
Yoshiharu Toguchi
佳治 戸口
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.)
Mutoh Industries Ltd
Original Assignee
Mutoh Industries 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 Mutoh Industries Ltd filed Critical Mutoh Industries Ltd
Priority to JP4152678A priority Critical patent/JPH05324555A/en
Publication of JPH05324555A publication Critical patent/JPH05324555A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To restore data by retracting an arbitrary past operation even after plural operations are executed. CONSTITUTION:An element data base 3 is provided with an undo stack and a redo stack, and the former is provided to save information before the change of elements changed by execution of an operation, and the latter is provided to save information of elements changed by the just preceding operation at the time of undo execution, and information corresponding to plural operations can be stored in both of them. A write/read control part 12 successively saves information before the change of elements to be changed in the undo stack at each time of executing the operation. The write/read control part 12 restores elements based on information from the undo stack after saving information of elements as the restore object in the redo stack at each time of execution of undo and restores elements based on information from the redo stack after saving information of elements as the restore object in the undo stack at each time of executing redo.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、CADシステム等にお
いて、実行されたオペレーションを取消して、オペレー
ション実行前のデータを復元するアンドゥ処理を実行す
る既実行オペレーションの取消装置に関し、特に連続的
なアンドゥ処理を実現するようにした既実行オペレーシ
ョンの取消装置にに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for canceling an executed operation in a CAD system or the like, which executes an undo process for canceling an executed operation and restoring the data before the operation is executed, and particularly to a continuous undo operation. The present invention relates to a device for canceling an already-executed operation that realizes processing.

【0002】[0002]

【従来の技術】CADシステム等で、図面を誤って消去
してしまったり、複写すべき部分を移動してしまった場
合、直前のオペレーションを取消して、前の画面を復元
するためのアンドゥ処理が知られている。従来のアンド
ゥ処理は、図面を構成する要素データの変更時に、その
要素データの変更前の情報をコピーして保存しておき、
アンドゥ実行時には、保存していた前情報を復元するこ
とにより、データの復元を行うようにしている。
2. Description of the Related Art In a CAD system or the like, if a drawing is accidentally erased or a portion to be copied is moved, an undo process for canceling the immediately preceding operation and restoring the previous screen is required. Are known. In the conventional undo process, when the element data that makes up the drawing is changed, the information before the change of the element data is copied and saved,
When the undo is executed, the data is restored by restoring the saved previous information.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上述し
た従来の既実行オペレーションの取消方式では、取消可
能なオペレーションが直前のオペレーションに限られて
いるため、操作ミスに気が付かないでオペレーションを
続けて実行してしまうと、もはや過去のデータを復元す
ることはできないという問題点がある。
However, in the above-mentioned conventional canceling method for executed operations, since the cancelable operation is limited to the immediately preceding operation, the operation is continuously executed without noticing the operation error. If it happens, there is a problem that past data can no longer be restored.

【0004】本発明はかかる問題点に鑑みてなされたも
ので、複数のオペレーションを実行した後でも、任意の
過去のオペレーションまで遡ってデータを復元すること
ができる既実行オペレーションの取消装置を提供するこ
とを目的とする。また、本発明は、複数のオペレーショ
ンを実行した後、所望するオペレーションまで遡った
り、また、直前のオペレーションまで元に戻ったりする
ことができ、システムの操作性を大幅に向上させること
ができる既実行オペレーションの取消装置を提供するこ
とを他の目的とする。
The present invention has been made in view of the above problems, and provides a canceling device for an already-executed operation that can restore data to any past operation even after executing a plurality of operations. The purpose is to In addition, the present invention can execute a plurality of operations and then trace back to a desired operation or return to the previous operation, which can greatly improve the operability of the system. It is another object to provide an operation canceling device.

【0005】[0005]

【課題を解決するための手段】本発明に係る既実行オペ
レーションの取消装置は、オペレーションの実行によっ
て変更される要素の変更前の情報を退避させるためのも
のであって、複数オペレーション分の前記情報を格納可
能なアンドゥスタックと、オペレーションを実行する毎
に前記アンドゥスタックへ前記変更される要素の変更前
の情報を順次退避させ、アンドゥを実行する毎に前記ア
ンドゥスタックからの情報に基づいて前記要素を復元す
る手段とを備えたことを特徴とする。
An apparatus for canceling an already-executed operation according to the present invention is for saving the information before the change of the element changed by the execution of the operation, and the information for a plurality of operations. And an undo stack capable of storing the elements, and each time an operation is executed, the information before the change of the changed element is sequentially saved, and each time the undo is executed, the element is changed based on the information from the undo stack. And means for restoring.

【0006】また、本発明に係る他の既実行オペレーシ
ョンの取消装置は、オペレーションの実行によって変更
される要素の変更前の情報を退避させるためのものであ
って、複数オペレーション分の前記情報を格納可能なア
ンドゥスタックと、アンドゥ実行時に直前のオペレーシ
ョンによって変更された要素の情報を退避させるための
ものであって、複数オペレーション分の前記情報を格納
可能なリドゥスタックと、オペレーションを実行する毎
に前記アンドゥスタックへ前記変更される要素の変更前
の情報を順次退避させ、アンドゥを実行する毎に復元の
対象となる要素の情報を前記リドゥスタックに退避した
のち、前記アンドゥスタックからの情報に基づいて前記
要素を復元し、リドゥを実行する毎に復元の対象となる
要素の情報を前記アンドゥスタックに退避したのち、前
記リドゥスタックからの情報に基づいて前記要素を復元
する手段とを備えたことを特徴とする。
Further, another undoing device for an already-executed operation according to the present invention is for saving the information before the change of the element changed by the execution of the operation, and storing the information for a plurality of operations. A possible undo stack, a redo stack for saving the information of the element changed by the previous operation at the time of undo execution, and a redo stack capable of storing the information for a plurality of operations, and The information before the change of the changed element is sequentially saved to the undo stack, and the information of the element to be restored is saved to the redo stack each time undo is executed, and then based on the information from the undo stack. The information of the element to be restored is restored each time the element is restored and redo is executed. After saving the down de stack, characterized by comprising a means for restoring the element based on information from the redo stack.

【0007】[0007]

【作用】本発明に係る既実行オペレーションの取消装置
によれば、オペレーションの実行の度に、変更される要
素の変更前の情報がアンドゥスタックに格納されてい
く。アンドゥスタックは、複数オペレーション分の前記
情報が格納可能な容量を持つ。そして、アンドゥ実行の
度に、前記アンドゥスタックから順次情報が読み出さ
れ、この情報に基づいて要素が復元される。したがっ
て、この発明によれば、複数のオペレーションが実行さ
れた後でも、任意のオペレーションまで遡って要素を復
元することができる。
According to the cancel device for an already-executed operation according to the present invention, the information before the change of the changed element is stored in the undo stack every time the operation is executed. The undo stack has a capacity capable of storing the information for a plurality of operations. Then, each time the undo is executed, information is sequentially read from the undo stack, and the element is restored based on this information. Therefore, according to the present invention, even after a plurality of operations have been executed, it is possible to restore elements to any operation.

【0008】また、本発明に係る他の既実行オペレーシ
ョンの取消装置によれば、アンドゥスタックに加えてリ
ドゥスタックが設けられ、アンドゥ実行時に、直前のオ
ペレーションによって変更された要素の情報が上記リド
ゥスタックに退避される。このリドゥスタックも、複数
オペレーション分の情報を格納可能な容量を有してい
る。そして、アンドゥ実行時には、復元の対象となる要
素の情報がリドゥスタックに退避される。このため、ア
ンドゥの連続的な実行により、任意のオペレーション実
行時までデータが復元された後に、リドゥを実行するこ
とにより、再度、直前のオペレーション実行後のデータ
まで戻ることができる。したがって、この発明によれ
ば、複数のオペレーションの実行後に、任意のオペレー
ションまで遡ったり、また元に戻すといった操作が可能
になり、システムの操作性が向上し、作業効率もアップ
する。
Further, according to another undoing device for an already executed operation according to the present invention, a redo stack is provided in addition to the undo stack, and at the time of undo execution, the information of the element changed by the immediately preceding operation is added to the redo stack. Are evacuated to. This redo stack also has a capacity capable of storing information for a plurality of operations. Then, at the time of executing the undo, the information of the element to be restored is saved in the redo stack. Therefore, by continuously executing the undo, the data is restored until the arbitrary operation is executed, and then by executing the redo, it is possible to return to the data after the immediately previous operation is executed again. Therefore, according to the present invention, after executing a plurality of operations, it is possible to perform operations such as going back to an arbitrary operation and returning to the original operation, which improves the operability of the system and improves work efficiency.

【0009】[0009]

【実施例】以下、添付の図面を参照して本発明の一実施
例に係るCADシステムについて説明する。図1は本実
施例に係るCADシステムの機能ブロック図である。こ
のシステムは、入力装置1、CAD処理部2、要素デー
タベース3、表示装置4及び図面出力装置5を備えて構
成されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A CAD system according to an embodiment of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a functional block diagram of a CAD system according to this embodiment. This system includes an input device 1, a CAD processing unit 2, an element database 3, a display device 4, and a drawing output device 5.

【0010】入力装置1は、キーボード及びマウス等か
ら構成されたもので、表示装置4に表示されるコマンド
メニューから必要なコマンドを指定したり、表示装置4
上で作図及び編集作業を行う際のポイント、図形要素及
び領域等を指定するものである。また、入力装置1に
は、アンドゥ処理の実行を指示するためのアンドゥキー
と、リドゥ処理の実行を指示するためのリドゥキーが備
えられている。
The input device 1 is composed of a keyboard, a mouse, etc., and specifies a necessary command from a command menu displayed on the display device 4, or the display device 4
It is intended to specify points, graphic elements, areas, etc. when the above drawing and editing work is performed. Further, the input device 1 is provided with an undo key for instructing execution of undo processing and a redo key for instructing execution of redo processing.

【0011】CAD処理部2は、作図・編集処理部1
1、書込・読出制御部12、表示制御部13及び図面出
力制御部14を備えて構成されている。作図・編集処理
部11は、入力装置1によって指示されたコマンドを解
釈して入力装置1によって指示された位置に必要な図形
要素データを発生させたり、指定された要素データや入
力された付加情報に対して削除、複写、移動等の編集処
理を施す。書込・読出制御部12は、作図・編集処理部
11で作成及び編集された要素データ及び付加情報を要
素データベース3に書込んだり、作図・編集処理部11
の制御のもとに要素データベース3から必要な要素デー
タや付加情報を読み出す機能を有している。また、書込
・読出制御部12は、オペレーションの実行の度に後述
するアンドゥスタック24に必要な情報を退避させた
り、アンドゥ実行時やリドゥ実行時にアンドゥスタック
24や後述するリドゥスタック25に必要な情報を退避
させたり、これらのスタック24,25から必要な情報
を取り出してデータを復元する機能を有している。表示
制御部13は、作図・編集処理部11で生成・編集され
た図形要素データ、付加情報及びコマンドメニュー等を
CRTディスプレイ等の表示装置4に表示させるための
表示制御を行う。図面出力制御部14は、作図・編集処
理部11で生成・編集された図形要素データをペンプロ
ッタ等の図面出力装置5に出図する際の出力制御を行
う。
The CAD processing unit 2 is a drawing / editing processing unit 1.
1, a writing / reading control unit 12, a display control unit 13, and a drawing output control unit 14. The drawing / editing processing unit 11 interprets a command instructed by the input device 1 to generate necessary graphic element data at a position instructed by the input device 1, or specifies specified element data or input additional information. Edit processing such as deleting, copying, moving, etc. The writing / reading control unit 12 writes the element data and the additional information created and edited by the drawing / editing processing unit 11 into the element database 3, and the drawing / editing processing unit 11
Under the control of 1), it has a function of reading necessary element data and additional information from the element database 3. The writing / reading control unit 12 saves necessary information in an undo stack 24 described later each time an operation is executed, and is necessary in the undo stack 24 and a redo stack 25 described later during undo execution or redo execution. It has a function of saving information and retrieving data by taking out necessary information from these stacks 24 and 25. The display control unit 13 performs display control for displaying the graphic element data, the additional information, the command menu, etc. generated / edited by the drawing / editing processing unit 11 on the display device 4 such as a CRT display. The drawing output control unit 14 performs output control when drawing the graphic element data generated and edited by the drawing / editing processing unit 11 to the drawing output device 5 such as a pen plotter.

【0012】要素データベース3は、作成された図面を
構成する要素データを登録するデータベースで、例えば
図2に示すように、エントノード21、セグメント2
2、ポイントデータベース23、アンドゥスタック24
及びリドゥスタック25から構成されている。エントノ
ード21には、要素番号、セグメントへのアドレス、要
素タイプ及び選択フラグ等が格納される。セグメント2
2には、両端点を示すデータ(直線)や中心点、長径ベ
クトル、短径ベクトル(円及び楕円)等を示すデータが
格納される。点及びベクトルデータには、ポイントデー
タベース23へのインデックスが格納され、その座標値
自体はポイントデータベース23に格納される。アンド
ゥスタック24には、オペレーションの実行の度に変更
される要素の情報、具体的にはエントノード21の要素
番号(No. )、セグメント22へのアドレス(AD)及び
要素タイプ(TYP )等の要素の情報が格納される。アン
ドゥスタック24は、例えば20オペレーション分の要
素の情報を格納することができる容量を備えている。ま
た、リドゥスタック25もアンドゥスタック24と同様
の構造を有しており、アンドゥ実行時に、復元される要
素の情報、即ちエントノード21の要素番号(No. )、
セグメント22へのアドレス(AD)及び要素タイプ(TY
P )等の要素の情報が格納されるようになっている。
The element database 3 is a database for registering element data constituting the created drawing. For example, as shown in FIG.
2, point database 23, undo stack 24
And a redo stack 25. The element number, the segment address, the element type, the selection flag, and the like are stored in the ent node 21. Segment 2
2 stores data (straight lines) indicating both end points, data indicating a center point, a major axis vector, a minor axis vector (circle and ellipse), and the like. Indexes to the point database 23 are stored in the point and vector data, and the coordinate values themselves are stored in the point database 23. The undo stack 24 stores information on elements that change each time the operation is executed, specifically, the element number (No.) of the ent node 21, the address (AD) to the segment 22 and the element type (TYP). Element information is stored. The undo stack 24 has a capacity capable of storing element information for 20 operations, for example. The redo stack 25 also has a structure similar to that of the undo stack 24, and the information of the element to be restored when the undo is executed, that is, the element number (No.) of the ent node 21,
Address (AD) to segment 22 and element type (TY
Information of elements such as P) is stored.

【0013】次にこのように構成された本システムの動
作を説明する。まず、図3〜図5を参照して新たに要素
が追加される場合の処理について説明する。要素データ
ベース3に要素データが全く記憶されていない状態を図
3に示す。エントノード21のセグメントへのアドレス
及び要素タイプには“NULL”コードが格納され、フラグ
は“0”に設定されている。また、アンドゥスタック2
4のスタックポインタASP及びリドゥスタック25の
スタックポインタRSPは、共にスタック24,25の
0番目を指している。この状態で、入力装置1のマウス
等を使用して、図4(a)に示すように、直線P1−P
2が新規に描かれると、まず、エントノード21の要素
番号“1”の領域に新たにデータが書込まれるので、こ
の書込に先立って、図4(b)に示すように、ASPが
1つ進められ、エントノード21の要素番号“1”の領
域のデータ(要素番号“1”、セグメント22へのアド
レス“NULL”及び要素タイプ“NULL”)がアンドゥスタ
ック24に退避される。次に点P1,P2の座標値がポ
インデータベース23に書込まれ、セグメント22に
は、ポイントデータベース23の点P1,P2の格納場
所へのインデックスが登録される。そして、エントノー
ド21の要素番号“1”の領域には、点P1,P2のイ
ンデックスが格納されたセグメント22へのアドレス
“AD1 ”が格納され、要素タイプとして“Line”が書込
まれる。
Next, the operation of the present system configured as described above will be described. First, the processing when a new element is added will be described with reference to FIGS. FIG. 3 shows a state in which no element data is stored in the element database 3. The "NULL" code is stored in the address to the segment of the ent node 21 and the element type, and the flag is set to "0". Also, undo stack 2
The stack pointer ASP of No. 4 and the stack pointer RSP of the redo stack 25 both point to the 0th stack 24, 25. In this state, using the mouse or the like of the input device 1, as shown in FIG.
When 2 is newly drawn, first, data is newly written in the area of the element number “1” of the ent node 21. Therefore, prior to this writing, as shown in FIG. The data is advanced by one, and the data (element number “1”, address “NULL” to segment 22 and element type “NULL”) in the area of the element number “1” of the ent node 21 is saved in the undo stack 24. Next, the coordinate values of the points P1 and P2 are written in the point database 23, and the index to the storage location of the points P1 and P2 of the point database 23 is registered in the segment 22. Then, in the area of the element number "1" of the ent node 21, the address "AD1" to the segment 22 storing the indexes of the points P1 and P2 is stored, and "Line" is written as the element type.

【0014】続いて、図5(a)に示すように、直線P
1−P3が描かれると、同図(b)に示すように、AS
Pが1つ進められ、要素番号“2”の領域のデータ(要
素番号“1”、セグメント22へのアドレス“NULL”及
び要素タイプ“NULL”)がアンドゥスタック24に退避
されたのち、点P3の座標値がポイントデータベース2
3に書込まれ、点P1,P3へのインデックスがセグメ
ント22に登録される。そして、エントノード21の要
素番号“2”の領域には、点P1,P3のインデックス
が格納されたセグメント22へのアドレス“AD2 ”が格
納され、要素タイプとして“Line”が格納される。
Then, as shown in FIG. 5A, a straight line P
When 1-P3 is drawn, as shown in FIG.
After P is advanced by 1 and the data (element number “1”, address “NULL” to segment 22 and element type “NULL”) in the area of element number “2” is saved in the undo stack 24, point P3 Coordinate values of point database 2
3 and the indexes to the points P1 and P3 are registered in the segment 22. Then, in the area of the element number "2" of the ent node 21, the address "AD2" to the segment 22 storing the indexes of the points P1 and P3 is stored, and "Line" is stored as the element type.

【0015】次に、この状態でアンドゥキーが2回押さ
れた場合の処理を図6及び図7を参照して説明する。ア
ンドゥキーが押されると、図6(a)に示すように、A
SPの現在指している(点線)内容からアンドゥの対象
が要素番号“2”の要素であることが分かるので、エン
トノード21の要素番号“2”のフラグを“1”にす
る。次に、RSPを1つ進め、エントノード21のフラ
グが“1”の要素の要素番号“2”、セグメントへのア
ドレス“AD2 ”及び要素タイプ“Line”をリドゥスタッ
ク25に退避させる。続いて、アンドゥスタック24の
ASPが指している内容(要素番号“2”、セグメント
22へのアドレス“NULL”及び要素タイプ“NULL”)を
エントノード21に復元させ、ASPを1つ戻す。この
結果、セグメント22へのアドレスが“NULL”になり、
図6(b)の点線で示す直線P1−P3が消去される。
即ち、2番目の直線が描かれる前の状態に戻る。
Next, the processing when the undo key is pressed twice in this state will be described with reference to FIGS. 6 and 7. When the undo key is pressed, as shown in FIG.
Since it is known from the contents of SP currently indicated (dotted line) that the undo target is the element of the element number "2", the flag of the element number "2" of the ent node 21 is set to "1". Next, the RSP is advanced by one and the element number “2” of the element having the flag of the ent node 21 of “1”, the address “AD2” to the segment and the element type “Line” are saved in the redo stack 25. Then, the contents pointed by the ASP of the undo stack 24 (element number “2”, address “NULL” to segment 22 and element type “NULL”) are restored in the ent node 21, and one ASP is returned. As a result, the address to segment 22 becomes "NULL",
The straight line P1-P3 shown by the dotted line in FIG. 6B is deleted.
That is, it returns to the state before the second straight line was drawn.

【0016】更に、もう一度アンドゥキーが押される
と、図7(a)に示すように、ASPの現在指している
(点線)内容からアンドゥの対象が要素番号“1”の要
素であることが分かるので、エントノード21の要素番
号“1”のフラグを“1”にする。次に、RSPを1つ
進め、エントノード21のフラグが“1”の要素の要素
番号“1”、セグメントへのアドレス“AD1 ”及び要素
タイプ“Line”をリドゥスタック25に退避させる。続
いて、アンドゥスタック24のASPが指している内容
(要素番号“1”、セグメント22へのアドレス“NUL
L”及び要素タイプ“NULL”)をエントノード21に復
元させ、ASPを1つ戻す。この結果、セグメント22
へのアドレスが“NULL”になり、図7(b)の点線で示
す直線P1−P2が消去される。即ち、1番目の直線が
描かれる前の状態に戻る。
Further, when the undo key is pressed again, as shown in FIG. 7A, it can be understood from the contents of the ASP currently indicated (dotted line) that the undo target is the element having the element number "1". Therefore, the flag of the element number "1" of the ent node 21 is set to "1". Next, the RSP is advanced by one, and the element number “1” of the element having the flag of the ent node 21 of “1”, the address “AD1” to the segment and the element type “Line” are saved in the redo stack 25. Then, the contents indicated by the ASP of the undo stack 24 (element number "1", address "NUL to segment 22"
L "and element type" NULL ") are restored to the ent node 21, and one ASP is returned.
Address becomes "NULL", and the straight line P1-P2 shown by the dotted line in FIG. 7B is erased. That is, it returns to the state before the first straight line was drawn.

【0017】次に、この状態でリドゥキーが押された場
合の処理を図8を参照して説明する。リドゥキーが押さ
れると、図8に示すように、RSPの現在指している
(点線)内容からリドゥの対象が要素番号“1”の要素
であることが分かるので、エントノード21の要素番号
“1”のフラグを“1”にする。次に、ASPを1つ進
め、エントノード21のフラグが“1”の要素の要素番
号“1”、セグメントへのアドレス“NULL”及び要素タ
イプ“NULL”をアンドゥスタック24に退避させる。続
いて、リドゥスタック25のRSPが指している内容
(要素番号“1”、セグメント22へのアドレス“AD1
”及び要素タイプ“Line”)をエントノード21に復
元させ、RSPを1つ戻す。この結果、セグメント22
へのアドレスが“AD1 ”になり、図4(a)に示した直
線P1−P2が復活する。即ち、1番目の直線が描かれ
た後の状態に戻る。
Next, the processing when the redo key is pressed in this state will be described with reference to FIG. When the redo key is pressed, as shown in FIG. 8, it can be known from the contents of the RSP currently indicated (dotted line) that the redo target is the element with the element number “1”, and therefore the element number “1” of the enent node 21. The "flag" is set to "1". Next, the ASP is advanced by one, and the element number “1” of the element having the flag “1” of the ent node 21, the address “NULL” to the segment, and the element type “NULL” are saved in the undo stack 24. Then, the contents pointed to by the RSP of the redo stack 25 (element number “1”, address “AD1 to segment 22
, And the element type “Line”) are restored to the ent node 21 and one RSP is returned. As a result, the segment 22
Address becomes "AD1", and the straight line P1-P2 shown in FIG. 4A is restored. That is, it returns to the state after the first straight line is drawn.

【0018】以上の処理は、基本的には複写及び削除の
オペレーション時にも全く同様に行われるので、その説
明は割愛する。
The above-mentioned processing is basically performed in the same manner at the time of copying and deleting operations, and the description thereof will be omitted.

【0019】次に、図9(a)に示すように、直線P1
−P2を直線P1′−P2′の位置に移動させた場合の
処理について説明する。この場合には、直線自体は残っ
ており、その端点の座標のみが変更になるので、ポイン
トデータベース23の内容が書き替えられる。したがっ
て、この書き替えに先立って、図9(b)に示すよう
に、アドレスAD1 に登録されていたセグメント22の内
容がアドレス AD1′の位置にコピーされる。ASPが1
つ進められ、要素番号“1”の領域のデータが退避され
る。このとき、セグメント22のアドレスとしては、コ
ピー先のアドレス“ AD1′”をアンドゥスタック24に
格納する。次に、点P1′,P2′の座標値がポイント
データベース23に書込まれ、アドレスAD1 のセグメン
トのポイントデータベース23へのインデックスが“P
1′,P2′”に書き替えられる。エントノード21の
要素番号“1”の領域の内容は変わらない。
Next, as shown in FIG. 9A, a straight line P1
The processing when -P2 is moved to the position of the straight line P1'-P2 'will be described. In this case, since the straight line itself remains and only the coordinates of the end points are changed, the contents of the point database 23 are rewritten. Therefore, prior to this rewriting, as shown in FIG. 9B, the contents of the segment 22 registered at the address AD1 are copied to the position of the address AD1 '. 1 ASP
Then, the data in the area of the element number “1” is saved. At this time, as the address of the segment 22, the copy destination address “AD1 ′” is stored in the undo stack 24. Next, the coordinate values of the points P1 'and P2' are written in the point database 23, and the index of the segment of the address AD1 into the point database 23 is "P.
1 ', P2'". The contents of the area of the element number" 1 "of the ent node 21 do not change.

【0020】この場合にも、アンドゥキーが押される
と、元の点座標のデータが復元されることになるので、
移動前の状態に戻すことができる。なお、この処理は、
一方の端点の位置が変更になったり、図形を回転させた
ような場合にも全く同様に行われるので、その説明は割
愛する。
Also in this case, when the undo key is pressed, the data of the original point coordinates will be restored.
You can return to the state before moving. In addition, this process is
Since the same operation is performed when the position of one end point is changed or when the figure is rotated, the description thereof will be omitted.

【0021】以上は、直線1本の描画といった単一オペ
レーション時の処理について説明したが、例えば、複数
の要素を一度に移動させたり、長方形を1回の操作で描
くといったマルチオペレーションを含む場合には、アン
ドゥスタック24及びリドゥスタック25の構造を次の
ように設定しておけばよい。図10は、この場合のアン
ドゥスタック24の要部構造を示す図である。なお、リ
ドゥスタック25もこれと同様の構造になっている。即
ち、アンドゥスタック24の各ASPが指す単位をアン
ドゥスタック要素31とすると、このアンドゥスタック
要素31には、前のアンドゥスタック要素31へのポイ
ンタBP及び次のアンドゥスタック要素31へのポイン
タAPが含まれている。これらポインタBP,APは、
アンドゥスタック要素31のアドレスが不連続である場
合に、スタック更新の際のASPの次アドレスを与える
のに使用される。
In the above, the processing in a single operation such as drawing one straight line has been described. For example, in the case of including a multi-operation in which a plurality of elements are moved at a time or a rectangle is drawn by one operation. For example, the structures of the undo stack 24 and the redo stack 25 may be set as follows. FIG. 10 is a diagram showing a main structure of the undo stack 24 in this case. The redo stack 25 has the same structure as this. That is, assuming that the unit pointed to by each ASP of the undo stack 24 is the undo stack element 31, this undo stack element 31 includes a pointer BP to the previous undo stack element 31 and a pointer AP to the next undo stack element 31. Has been. These pointers BP and AP are
Used to give the next address of the ASP when updating the stack when the addresses of the undo stack element 31 are discontinuous.

【0022】また、アンドゥスタック要素31には、そ
の実際の内容を記憶するためのアンドゥノード32への
ポインタNPが含まれている。アンドゥノード32に
は、前述した退避要素の情報、即ち要素番号No.、セ
グメントへのアドレスAD、要素タイプTYPが格納さ
れる他、次のアンドゥノード32へのポインタNPも格
納される。このポインタNPを介して図示のように複数
のアンドゥノード32をチェイン状に結合すれば、マル
チオペレーション実行時の複数要素の変更に対処するこ
とができる。
The undo stack element 31 also includes a pointer NP to the undo node 32 for storing its actual content. The undo node 32 contains information on the above-mentioned evacuation element, that is, the element number No. , The address AD to the segment, the element type TYP, and the pointer NP to the next undo node 32 are also stored. By connecting a plurality of undo nodes 32 in a chain via the pointer NP as shown in the figure, it is possible to cope with a change in a plurality of elements during execution of multi-operation.

【0023】図11〜図13は、以上の点を含めた書込
・読出制御部12の本発明で関係する部分についての処
理を説明するためのフローチャートである。図11は作
図・編集オペレーション実行時の処理を示している。作
図・編集オペレーション時には、まずリドゥスタック2
5の内容がクリアされる(S1)。具体的には、RSP
を0番目の位置に戻せばよい。続いて、オペレーション
がマルチオペレーションであるかどうかが判断される
(S2)。単一オペレーションの場合にはASPを1つ
進め(S3)、マルチオペレーションの場合には一連の
オペレーションの間はASPを固定したままにしてお
く。つまり、図10のアンドゥノード32のポインタN
Pを介した結合で各オペレーションを関連付ける。オペ
レーションが“変更”及び“移動”以外であれば(S
4)、エントノード21の所定情報をアンドゥスタック
24のポインタNPが指すアンドゥノード32にPUS
Hして(P5)、エントノード21の情報を書き替える
(S6)。また、オペレーションが“変更”又は“移
動”である場合には(S4)、セグメント22の情報を
コピーし(S7)、エントノード21の所定情報をアン
ドゥスタック24のポインタNPが指すアンドゥノード
32にPUSHする。但し、セグメント22へのアドレ
スは、コピー先アドレスとする(S8)。そして、セグ
メント22の情報を書き替える。
11 to 13 are flow charts for explaining the processing of the part of the write / read controller 12 including the above points, which is relevant to the present invention. FIG. 11 shows the processing when the drawing / editing operation is executed. During drawing / editing operations, first Redo Stack 2
The contents of 5 are cleared (S1). Specifically, RSP
Should be returned to the 0th position. Then, it is determined whether the operation is multi-operation (S2). In the case of a single operation, the ASP is advanced by one (S3), and in the case of multi-operation, the ASP remains fixed during a series of operations. That is, the pointer N of the undo node 32 in FIG.
Associate each operation with a join through P. If the operation is other than "change" and "move" (S
4) PUS the predetermined information of the ent node 21 to the undo node 32 pointed to by the pointer NP of the undo stack 24.
After H (P5), the information of the ent node 21 is rewritten (S6). When the operation is “change” or “move” (S4), the information of the segment 22 is copied (S7), and the predetermined information of the ennode node 21 is stored in the undo node 32 pointed to by the pointer NP of the undo stack 24. PUSH. However, the address to the segment 22 is the copy destination address (S8). Then, the information of the segment 22 is rewritten.

【0024】図12は、アンドゥ実行時の処理を示して
いる。アンドゥ実行時には、RSPを1つ進め(S1
1)、アンドゥスタック24のASPが指す内容からア
ンドゥの対象となる要素番号を抽出し、エントノード2
1の該当要素にフラグを立てる(S12)。次に、エン
トノード21のフラグが立った要素の所定情報をリドゥ
スタック25にPUSHする(S13)。そして、アン
ドゥスタック24の内容をエントノード21にPOPし
(S14)、ASPを一つ戻す(S15)。
FIG. 12 shows the processing at the time of executing undo. When executing undo, advance RSP by one (S1
1) Extract the element number to be undone from the contents indicated by the ASP of the undo stack 24, and
A flag is set to the corresponding element of 1 (S12). Next, the predetermined information of the flagged element of the ent node 21 is PUSHed to the redo stack 25 (S13). Then, the contents of the undo stack 24 are POP'd to the ent node 21 (S14), and one ASP is returned (S15).

【0025】図13は、リドゥ実行時の処理を示してい
る。リドゥ実行時には、ASPを1つ進め(S21)、
リドゥスタック25のRSPが指す内容からリドゥの対
象となる要素番号を抽出し、エントノード21の該当要
素にフラグを立てる(S22)。次に、エントノード2
1のフラグが立った要素の所定情報をアンドゥスタック
24にPUSHする(S23)。そして、リドゥスタッ
ク25の内容をエントノード21にPOPし(S2
4)、RSPを一つ戻す(S25)。
FIG. 13 shows a process at the time of executing redo. When executing redo, advance ASP by 1 (S21),
The element number to be redoed is extracted from the content indicated by the RSP of the redo stack 25, and a flag is set to the corresponding element of the ent node 21 (S22). Next, ent node 2
The predetermined information of the element for which the flag of 1 is set is pushed to the undo stack 24 (S23). Then, the contents of the redo stack 25 are popped to the ent node 21 (S2
4) Return one RSP (S25).

【0026】[0026]

【発明の効果】以上述べたように、本発明によれば、複
数のオペレーションが実行された後でも、任意のオペレ
ーションまで遡って要素を復元することができるので、
システムの操作性が向上し、作業効率が向上するという
効果を奏する。
As described above, according to the present invention, even after a plurality of operations are executed, it is possible to restore the elements by tracing back to an arbitrary operation.
The operability of the system is improved and the work efficiency is improved.

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

【図1】 本発明の一実施例に係るCADシステムの要
部を示す機能ブロック図である。
FIG. 1 is a functional block diagram showing a main part of a CAD system according to an embodiment of the present invention.

【図2】 同システムにおける要素データベースの内容
を説明するための図である。
FIG. 2 is a diagram for explaining the contents of an element database in the system.

【図3】 同システムにおける要素書込時の処理を説明
するための図である。
FIG. 3 is a diagram for explaining a process at the time of element writing in the system.

【図4】 同システムにおける要素書込時の処理を説明
するための図である。
FIG. 4 is a diagram for explaining a process at the time of element writing in the system.

【図5】 同システムにおける要素書込時の処理を説明
するための図である。
FIG. 5 is a diagram for explaining a process at the time of element writing in the same system.

【図6】 同システムにおけるアンドゥ実行時の処理を
説明するための図である。
FIG. 6 is a diagram for explaining processing at the time of executing undo in the system.

【図7】 同システムにおけるアンドゥ実行時の処理を
説明するための図である。
FIG. 7 is a diagram for explaining a process during undo execution in the system.

【図8】 同システムにおけるリドゥ実行時の処理を説
明するための図である。
FIG. 8 is a diagram for explaining a process at the time of executing redo in the system.

【図9】 同システムにおける要素移動時の処理を説明
するための図である。
FIG. 9 is a diagram for explaining a process when moving an element in the system.

【図10】 同システムにおけるマルチオペレーション
対応が可能なアンドゥスタックの要部構造を示す図であ
る。
FIG. 10 is a diagram showing a main structure of an undo stack capable of supporting multiple operations in the system.

【図11】 同システムにおける作図・編集オペレーシ
ョン実行時の書込・読出制御部の処理を説明するための
フローチャートである。
FIG. 11 is a flowchart for explaining a process of a writing / reading control unit when executing a drawing / editing operation in the system.

【図12】 同システムにおけるアンドゥ実行時の書込
・読出制御部の処理を説明するためのフローチャートで
ある。
FIG. 12 is a flowchart for explaining processing of a writing / reading control unit at the time of executing undo in the system.

【図13】 同システムにおけるリドゥ実行時の書込・
読出制御部の処理を説明するためのフローチャートであ
る。
[Fig. 13] Writing at the time of redo execution in the system
7 is a flowchart for explaining the processing of the read control unit.

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

1…入力装置、2…CAD処理部、3…要素データベー
ス、4…表示装置、5…図面出力装置、11…作図・編
集処理部、12…書込・読出制御部、13…表示制御
部、14…図面出力制御部。
DESCRIPTION OF SYMBOLS 1 ... Input device, 2 ... CAD processing part, 3 ... Element database, 4 ... Display device, 5 ... Drawing output device, 11 ... Drawing / editing processing part, 12 ... Write / read control part, 13 ... Display control part, 14 ... Drawing output control unit.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 オペレーションの実行によって変更され
る要素の変更前の情報を退避させるためのものであっ
て、複数オペレーション分の前記情報を格納可能なアン
ドゥスタックと、 オペレーションを実行する毎に前記アンドゥスタックへ
前記変更される要素の変更前の情報を順次退避させ、ア
ンドゥを実行する毎に前記アンドゥスタックからの情報
に基づいて前記要素を復元する手段とを備えたことを特
徴とする既実行オペレーションの取消装置。
1. An undo stack capable of storing information before change of an element changed by execution of an operation, the undo stack capable of storing the information for a plurality of operations, and the undo stack each time an operation is executed. A previously executed operation, comprising means for sequentially saving information before change of the element to be changed to a stack and restoring the element based on the information from the undo stack each time undo is executed. Cancellation device.
【請求項2】 オペレーションの実行によって変更され
る要素の変更前の情報を退避させるためのものであっ
て、複数オペレーション分の前記情報を格納可能なアン
ドゥスタックと、 アンドゥ実行時に直前のオペレーションによって変更さ
れた要素の情報を退避させるためのものであって、複数
オペレーション分の前記情報を格納可能なリドゥスタッ
クと、 オペレーションを実行する毎に前記アンドゥスタックへ
前記変更される要素の変更前の情報を順次退避させ、ア
ンドゥを実行する毎に復元の対象となる要素の情報を前
記リドゥスタックに退避したのち、前記アンドゥスタッ
クからの情報に基づいて前記要素を復元し、リドゥを実
行する毎に復元の対象となる要素の情報を前記アンドゥ
スタックに退避したのち、前記リドゥスタックからの情
報に基づいて前記要素を復元する手段とを備えたことを
特徴とする既実行オペレーションの取消装置。
2. An undo stack capable of storing information before change of an element changed by execution of an operation, the undo stack capable of storing the information for a plurality of operations, and a change by an operation immediately before undo execution. And a redo stack capable of storing the information of a plurality of operations, and information before the change of the changed element to the undo stack each time an operation is executed. After sequentially saving and saving the information of the element to be restored each time undo is performed to the redo stack, restore the element based on the information from the undo stack, and restore each time redo is performed. After saving the information of the target element to the undo stack, from the redo stack Cancellation device already executing operations, characterized in that a means for restoring the element based on the information.
JP4152678A 1992-05-20 1992-05-20 Already executed operation canceller Pending JPH05324555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4152678A JPH05324555A (en) 1992-05-20 1992-05-20 Already executed operation canceller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4152678A JPH05324555A (en) 1992-05-20 1992-05-20 Already executed operation canceller

Publications (1)

Publication Number Publication Date
JPH05324555A true JPH05324555A (en) 1993-12-07

Family

ID=15545725

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4152678A Pending JPH05324555A (en) 1992-05-20 1992-05-20 Already executed operation canceller

Country Status (1)

Country Link
JP (1) JPH05324555A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005310116A (en) * 1993-04-22 2005-11-04 Microsoft Corp Computer system and undo/redo method therefor
JP2006209543A (en) * 2005-01-28 2006-08-10 Canon Inc Image editing device and image editing method
JP2013242849A (en) * 2012-04-23 2013-12-05 Kyocera Document Solutions Inc Electronic device and image forming apparatus
CN105528334A (en) * 2015-12-17 2016-04-27 广州视睿电子科技有限公司 Method for processing document operation and terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005310116A (en) * 1993-04-22 2005-11-04 Microsoft Corp Computer system and undo/redo method therefor
JP2006209543A (en) * 2005-01-28 2006-08-10 Canon Inc Image editing device and image editing method
JP4587461B2 (en) * 2005-01-28 2010-11-24 キヤノン株式会社 Image editing apparatus and control method thereof
JP2013242849A (en) * 2012-04-23 2013-12-05 Kyocera Document Solutions Inc Electronic device and image forming apparatus
CN105528334A (en) * 2015-12-17 2016-04-27 广州视睿电子科技有限公司 Method for processing document operation and terminal

Similar Documents

Publication Publication Date Title
US4905185A (en) Apparatus for transferring block data in original form and editing the block data
JPH04181423A (en) Version control system
JP2707175B2 (en) Graphic processing system
JPH05324555A (en) Already executed operation canceller
JPH05324556A (en) Already executed operation canceller
JPS6026235B2 (en) How to protect diagram data
JPH0318224B2 (en)
JPH02165353A (en) Conversation type data processing system
JPS62264329A (en) Screen text editor processing system
JP2646518B2 (en) Processing method in graphic data processing device
JP3501483B2 (en) Document processing apparatus and document processing method
JPS62239396A (en) Icon display control system
JPH03294960A (en) Data editing device
JPH096981A (en) Drawing production and editing device
JP3216951B2 (en) Finite element mesh generator
JPH07160560A (en) System and method for managing data storage version
JPH0765186A (en) Graphic editing device
JPH0325235Y2 (en)
JPH01181164A (en) Graphic editing processing system
JP3077158B2 (en) Document editing processor
JPH0480821A (en) Source program editing system
JPH08137976A (en) Document processor
JPH02250166A (en) Information processor
JPH0384674A (en) Cad device
JPH07191990A (en) Document processor with specifying function for area