JPH06314317A - Stereoscopic diagram drawing method for cad data - Google Patents
Stereoscopic diagram drawing method for cad dataInfo
- Publication number
- JPH06314317A JPH06314317A JP5102936A JP10293693A JPH06314317A JP H06314317 A JPH06314317 A JP H06314317A JP 5102936 A JP5102936 A JP 5102936A JP 10293693 A JP10293693 A JP 10293693A JP H06314317 A JPH06314317 A JP H06314317A
- Authority
- JP
- Japan
- Prior art keywords
- projected
- cad data
- distance
- dimensional
- determined
- 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
Links
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、板金CAD/CAMシ
ステムにおいて作成された3次元のCADデータをもと
に隠面処理を施した立体図を描画するCADデータに対
する立体図の描画方法に関し、特にパーソナルコンピュ
ータを用いたCAD/CAMシステムでのCADデータ
に対する立体図の描画方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for drawing a three-dimensional drawing for CAD data for drawing a three-dimensional drawing with hidden surface processing based on three-dimensional CAD data created in a sheet metal CAD / CAM system. In particular, the present invention relates to a method of drawing a three-dimensional diagram for CAD data in a CAD / CAM system using a personal computer.
【0002】[0002]
【従来の技術】従来、コンピュータの支援による設計
(CAD:Computer-Aided Design)を行い、該設計結
果をもとにコンピュータを利用して製造(CAM:Comp
uter-Aided Manufacturing)を行うCAD/CAMシス
テムが知られている。2. Description of the Related Art Conventionally, a computer-aided design (CAD: Computer-Aided Design) is performed, and a computer is used based on the design result (CAM: Comp-Aided Design).
A CAD / CAM system for performing uter-Aided Manufacturing is known.
【0003】すなわち、CADは、コンピュータの支援
のもとにディスプレイ上で図面データ(CADデータ)
を作成し、該作成したCADデータを記憶装置等に出力
する。そして、CAMがCADに連動して、CADで出
力されたCADデータをもとに数値制御(NC)工作機
械で自動加工するためのNCテープを作成したり、直接
加工データを加工機械に送り、直接製造を行う。このC
ADは、手書きで図面を起こすのに比べて修正が簡単で
あり、作成したCADデータを記憶装置に蓄積すること
ができるため、随時取り出して使え、過去の資産を有効
に活用することができるとともに、手作業に比べて作図
用の器具に習熟する必要がないため、短期間に作業者を
養成することができる利点を有する。That is, CAD is drawing data (CAD data) on a display with the support of a computer.
Is created, and the created CAD data is output to a storage device or the like. Then, the CAM interlocks with the CAD, creates an NC tape for automatic machining with a numerical control (NC) machine tool based on the CAD data output by the CAD, or sends the machining data directly to the machine tool. Direct manufacturing. This C
AD is easier to correct than drawing by hand and the created CAD data can be stored in a storage device. Therefore, it can be taken out at any time and used effectively in the past. As compared with manual work, there is no need to be proficient in drawing tools, which has the advantage of being able to train workers in a short period of time.
【0004】ところで、CADにより作成されるCAD
データの作成処理は、まず1つの平面のCADデータを
作成する面作成処理を行い、この作成した複数の平面の
CADデータを3次元に合成する面合成処理を行い、最
後に合成したCADデータを2次元に展開する展開処理
を行って、最終的なCADデータとしてCAMに出力さ
れることになる。そして、この面合成処理されたCAD
データを視点を変えながら立体図に描画して形状等の確
認を行っていた。By the way, CAD created by CAD
In the data creation process, first, a plane creation process for creating CAD data for one plane is performed, then a surface synthesis process for three-dimensionally synthesizing the created CAD data for a plurality of planes is performed, and finally the CAD data that is synthesized is created. A two-dimensional expansion process is performed and the final CAD data is output to the CAM. Then, this surface-synthesized CAD
While changing the viewpoint, the data was drawn on a three-dimensional view to check the shape.
【0005】また、板金CAD/CAMシステムは、そ
の取り扱う対象が比較的簡易なものであるため、パーソ
ナルコンピュータ等を用いて処理されることが多かっ
た。Further, since the sheet metal CAD / CAM system is a relatively simple object to be handled, it is often processed by using a personal computer or the like.
【0006】このため、視点を変えた立体図を描画し
て、最終的なCADデータの形状等の確認を行う場合、
パーソナルコンピュータであるがゆえに、物理的な処理
速度が遅く、描画される立体図の隠線処理を行わないワ
イヤフレーム表示が一般的であった。For this reason, when drawing a three-dimensional diagram with different viewpoints and confirming the final CAD data shape, etc.,
Since it is a personal computer, its physical processing speed is slow, and wire-frame display in which the hidden line processing is not performed on a stereoscopic drawing to be drawn is common.
【0007】この隠線処理を行わないワイヤフレーム表
示によれば、線で囲まれたところに、実際に面が存在す
るか否かを知ることができなかったり、線の数が多くな
れば、どこに面が存在するかを知ることが困難であると
いう不具合が生じていた。According to the wire frame display without the hidden line processing, if it is not possible to know whether or not a surface is actually surrounded by a line, or if the number of lines is large, There was a problem that it was difficult to know where the surface existed.
【0008】一方、3次元のCADデータに対して隠面
処理を行って立体図を描画する方法が知られている(今
宮淳美、隠面除去アルゴリズム、情報処理学会誌、Vol.
24,No.4,Apr.1983.p539ー546)。On the other hand, there is known a method of performing a hidden surface processing on three-dimensional CAD data to draw a stereoscopic drawing (Atsumi Imamiya, hidden surface removal algorithm, Journal of Information Processing Society, Vol.
24, No. 4, Apr. 1983. p539-546).
【0009】この隠面消去処理の代表的なものには、対
象となる面の全てを奥行きの順にソートする奥行きソー
ト法と、面を構成する全ての画素に対し、奥行座標をZ
バッファとしてもたせて処理するZバッファ法がある。A typical example of this hidden surface removal processing is a depth sorting method in which all the target surfaces are sorted in the order of depth, and the depth coordinate is set to Z for all pixels forming the surface.
There is a Z-buffer method in which a buffer is used for processing.
【0010】前者の奥行きソート法では、対象となるC
ADデータの面の数が少ない場合、少ない処理時間で隠
面消去処理を行うことができるが、面の数の増大ととも
に、ソートを行う処理が複雑となり、時間もかかるとい
う問題点がある。In the former depth sorting method, the target C
When the number of surfaces of AD data is small, the hidden surface removal processing can be performed in a short processing time. However, as the number of surfaces increases, the sorting processing becomes complicated and time-consuming.
【0011】また、後者のZバッファ法では、対象とな
るCADデータの面の数が増大しても、画素単位で処理
を行うためにほぼ一定の処理時間で隠面消去処理を行う
ことができるが、面の少ない場合でも、一定の処理時間
がかかるとともに、画素の数が多い場合は、Zバッファ
のメモリ量が膨大となるという問題点がある。Further, in the latter Z buffer method, even if the number of surfaces of the target CAD data increases, the hidden surface erasing processing can be performed in a substantially constant processing time because the processing is performed in pixel units. However, there is a problem that a certain amount of processing time is required even if the number of surfaces is small, and that if the number of pixels is large, the memory amount of the Z buffer becomes enormous.
【0012】この後者のZバッファ法による隠面消去処
理に関するものとしては、特開昭60−128574号
公報、特開昭60−198690号公報、特開昭61−
241882号公報、特開昭62−42280号公報、
特開昭62−42281号公報、特開昭63−2238
86号公報、特開平1−112472号公報、特開平1
−140384号公報、特開平1−207886号公
報、特開平1−223580号公報、特開平2−734
79号公報、特開平2−163886号公報、および特
開平2−307172号公報がある。Regarding the latter hidden surface erasing processing by the Z buffer method, there are JP-A-60-128574, JP-A-60-198690, and JP-A-61-161.
No. 241882, JP-A No. 62-42280,
JP-A-62-42281, JP-A-63-2238
No. 86, No. 1-112472, No. 1
-140384, JP-A-1-207886, JP-A-1-223580, and JP-A-2-734.
79, JP-A-2-163886, and JP-A-2-307172.
【0013】一方、前者の奥行きソート法によるCAD
データの隠面消去処理に関するものはなく、特に対象が
比較的簡易なものであるパーソナルコンピュータによる
板金CAD/CAMシステムに対しては採用されていな
かった。このパーソナルコンピュータ等によりCADデ
ータを作成する場合、多少時間がかかっても、一定の処
理時間で隠面消去処理を行うことができるZバッファ法
を採用するのは、処理面数の増大とともに処理時間が膨
大になる奥行きソート法に比べて有利であるからであ
る。On the other hand, the CAD by the former depth sorting method
There is nothing related to the hidden surface erasing process of data, and it has not been adopted particularly for a sheet metal CAD / CAM system using a personal computer whose object is relatively simple. When CAD data is created by this personal computer or the like, the Z buffer method that can perform hidden surface removal processing in a fixed processing time even if it takes some time is adopted as the processing time increases as the number of processing surfaces increases. This is because it is more advantageous than the depth sorting method, which requires a huge amount of.
【0014】なお、隠線処理に関するものとしては、例
えば特開平1−106176号公報あるいは特開平1−
136279号公報がある。As for the hidden line processing, for example, JP-A-1-106176 or JP-A-1-106176.
There is a Japanese Patent No. 136279.
【0015】また、板金CAD/CAMシステムのCA
Dデータに対する立体図の描画方法に関するものとして
例えば、特開昭55−116160号公報には、2次元
3角法に基づいて描かれた板金構成体の図形に対する図
形立体化処理方法が記載されている。さらに、特開昭6
3−165970号公報には、金型モデルの作成に関す
るものが記述されている。また、特開昭62−2105
80号公報には、板金部品のサーフェスモデルの作成に
関するものが記述されている。In addition, sheet metal CAD / CAM system CA
As a method of drawing a three-dimensional diagram for D data, for example, Japanese Patent Application Laid-Open No. 55-116160 describes a three-dimensional figure processing method for a figure of a sheet metal construct drawn based on the two-dimensional three-angle method. There is. Furthermore, JP-A-6
Japanese Patent Laid-Open No. 3-165970 describes a method for creating a mold model. Also, JP-A-62-2105
Japanese Patent No. 80 describes a method for creating a surface model of a sheet metal part.
【0016】さらに、特開平2−103687号公報に
は、B−Rep法(Boudary Representation)による立
体図形の描画方法に関する記述がある。Further, Japanese Patent Laid-Open No. 2-103687 describes a method of drawing a three-dimensional figure by the B-Rep method (Boudary Representation).
【0017】[0017]
【発明が解決しようとする課題】前述したように、パー
ソナルコンピュータを用いて作成されたCADデータに
対して、視点を変えた立体図を描画して、最終的なCA
Dデータの形状等の確認を行う場合、パーソナルコンピ
ュータであるがゆえに、物理的な処理速度が遅いため、
描画される立体図は隠線処理を行わないワイヤフレーム
表示が一般的であった。このため、線で囲まれたところ
に、実際に面が存在するか否かを知ることができなかっ
たり、面の増加により線の数が多くなれば、実際にどこ
の面が存在するかを知ることが困難であるという問題点
が生じていた。As described above, a final CA is drawn by drawing a three-dimensional view from a different viewpoint on CAD data created using a personal computer.
When checking the shape of D data, etc., the physical processing speed is slow because it is a personal computer.
The three-dimensional drawing to be drawn was generally a wireframe display without hidden line processing. For this reason, it is not possible to know whether or not a surface actually exists in the area surrounded by the line, and if the number of lines increases due to the increase of the surface, which surface actually exists. The problem was that it was difficult to know.
【0018】これに対し、パーソナルコンピュータを用
いたCAD/CAMシステムでのCADデータに対する
立体図の描画方法に、Zバッファ法により隠面消去処理
を行って、CADデータの立体図を描画することが考え
られた。On the other hand, in the CAD / CAM system using a personal computer, a hidden surface erasing process is performed by the Z buffer method in the CAD data drawing method for CAD data to draw a CAD data stereoscopic drawing. it was thought.
【0019】しかし、このZバッファ法による隠面消去
処理は、画素単位で隠面消去処理を行うため、板金CA
Dデータのように比較的簡易な図形に対しても一定の処
理時間を必要とし、迅速なCADデータによる立体図の
描画処理を行うことができないという問題点があった。However, since the hidden surface erasing process by the Z buffer method is performed on a pixel-by-pixel basis, the sheet metal CA is used.
There is a problem in that a fixed processing time is required even for a relatively simple figure such as D data, and rapid drawing processing of a stereoscopic drawing by CAD data cannot be performed.
【0020】そこで、本発明は、上記問題点を除去し、
奥行きソート法をもとに、迅速にCADデータの立体図
を描画することができるCADデータに対する立体図の
描画方法を提供することを目的とする。Therefore, the present invention eliminates the above problems,
It is an object of the present invention to provide a stereoscopic drawing method for CAD data that can quickly draw a stereoscopic drawing of CAD data based on the depth sorting method.
【0021】[0021]
【課題を解決するための手段】本発明は、CAD/CA
Mシステムで作成された直線要素で構成される2次元C
ADデータおよび曲げ情報をもとに3次元CADデータ
の立体図を描画するCADデータの立体図描画方法にお
いて、所定の視点からみた所望の3次元CADデータと
すべく前記3次元CADデータを回転し、該回転後の前
記所望の3次元CADデータを構成する複数の面を投影
する投影面から前記複数の面のそれぞれの最小距離を比
較して該最小距離の小さい順に前記複数の面を並び換え
る第1ステップと、前記複数の面の前記投影面に対する
上下関係を求め、該上下関係をもとに前記第1ステップ
で並び換えた順序を並び換える第2ステップと、前記第
2ステップにより並び換えられた順序で、前記複数の面
の前記投影面に対する投影図形の内外線を描画し、該投
影図形の外線の内側と該投影図形の内線の外側を該投影
図形に対応する面の法線ベクトルの値をもとに所定の色
・模様で塗りつぶし、上書きする第3ステップとを具備
したことを特徴とする。The present invention is a CAD / CA system.
Two-dimensional C composed of linear elements created by M system
In a CAD data three-dimensional drawing drawing method for drawing a three-dimensional CAD data three-dimensional drawing based on AD data and bending information, the three-dimensional CAD data is rotated to obtain desired three-dimensional CAD data from a predetermined viewpoint. , Comparing the minimum distance of each of the plurality of surfaces from a projection surface projecting the plurality of surfaces forming the desired three-dimensional CAD data after the rotation, and rearranging the plurality of surfaces in ascending order of the minimum distance. A first step, a second step of obtaining a vertical relationship of the plurality of surfaces with respect to the projection plane, and rearranging the order rearranged in the first step based on the vertical relationship, and a rearrangement by the second step. Drawing the inside and outside lines of the projection figure of the plurality of surfaces with respect to the projection plane, and the inside of the outside line of the projection figure and the outside of the inside line of the projection figure corresponding to the projection figure. Filled with a predetermined color and pattern on the basis of the value of the normal vector, characterized by comprising a third step of overwriting.
【0022】また、本発明では、前記第2ステップは、
前記複数の面のうちの第1の面の所定の投影面からの最
大距離と第2の面の前記所定の投影面からの最小距離と
を比較して前記最大距離が前記最小距離以下であるか否
かを判断する第1ステップと、前記第1ステップで前記
最大距離が前記最小距離以下でない場合は、前記第1の
面の無限平面と前記第2の面の無限平面との交線を求
め、前記第1の面の投影図形と前記第2の面の投影図形
のうち少なくとも1つが前記交線に重複しない片側投影
図形であるか否かを判断する第2ステップと、前記第2
ステップで片側投影図形がある場合は、1つの片側投影
図形と、他の片側投影図形である場合を含む他の投影図
形とが重複する部分を有するか否かを判断する第3ステ
ップと、前記第3ステップで重複する部分を有する場合
は、該重複する部分に相当する前記1つの片側投影図形
に対応する面上の点と、該点を通り視点方向に平行な直
線と前記他の投影図形に対応する面との交点とを求め、
前記所定の投影面から前記点までの距離と前記所定の投
影面から前記交点までの距離を比較して、前記点までの
距離の方が大きいか否かを判断する第4ステップと、前
記第1ステップで前記第1の面の最大距離が前記第2の
面の最小距離以下であると判断された場合は、前記第1
の面は前記第2の面の下にあると判定し、前記第4ステ
ップで前記点までの距離の方が大きいと判断された場合
は、前記1つの片側投影図形に対応する面が前記他の投
影図形に対応する面より上にあると判定し、前記第4ス
テップで前記点までの距離の方が大きくないと判断され
た場合は、前記1つの片側投影図形に対応する面が前記
他の投影図形に対応する面より下にあると判定する第5
ステップとを具備したことを特徴とする。In the present invention, the second step is
The maximum distance is equal to or less than the minimum distance by comparing the maximum distance of the first surface from the predetermined projection surface of the plurality of surfaces and the minimum distance of the second surface from the predetermined projection surface. If the maximum distance is not less than or equal to the minimum distance in the first step, a line of intersection between the infinite plane of the first surface and the infinite plane of the second surface is determined. A second step of determining whether or not at least one of the projected figure of the first surface and the projected figure of the second surface is a one-sided projected figure that does not overlap the intersection line;
If there is a one-sided projected figure in the step, a third step of determining whether or not one one-sided projected figure and another projected figure including a case of another one-sided projected figure have a overlapping portion, When there is an overlapping portion in the third step, a point on the surface corresponding to the one-sided projected figure corresponding to the overlapping portion, a straight line passing through the point and parallel to the viewpoint direction, and the other projected figure Find the intersection with the surface corresponding to
A fourth step of comparing the distance from the predetermined projection plane to the point with the distance from the predetermined projection plane to the intersection, and determining whether or not the distance to the point is larger; If it is determined in one step that the maximum distance of the first surface is less than or equal to the minimum distance of the second surface, then the first
Is determined to be below the second surface, and when it is determined that the distance to the point is larger in the fourth step, the surface corresponding to the one one-side projected figure is the other surface. If it is determined that the distance to the point is not larger in the fourth step, the surface corresponding to the one one-sided projected figure is Fifth, which is determined to be below the plane corresponding to the projected figure of
And a step.
【0023】[0023]
【作用】本発明は、CAD/CAMシステムで作成され
た直線要素で構成される2次元CADデータおよび曲げ
情報をもとに3次元CADデータの立体図を描画する
際、まず第1ステップで、所定の視点からみた所望の3
次元CADデータとすべく前記3次元CADデータを回
転し、該回転後の前記所望の3次元CADデータを構成
する複数の面を投影する投影面から前記複数の面のそれ
ぞれの最小距離を比較して該最小距離の小さい順に前記
複数の面を並び換える。そして、第2ステップで、前記
複数の面の前記投影面に対する上下関係を求め、該上下
関係をもとに前記第1ステップで並び換えた順序を並び
換える。最後に、第3ステップで、前記第2ステップに
より並び換えられた順序で、前記複数の面の前記投影面
に対する投影図形の内外線を描画し、該投影図形の外線
の内側と該投影図形の内線の外側を該投影図形に対応す
る面の法線ベクトルの値をもとに所定の色・模様で塗り
つぶし、上書きする処理を行って前記所望の3次元CA
Dデータの立体図を描画する。According to the present invention, when a three-dimensional drawing of three-dimensional CAD data is drawn based on two-dimensional CAD data and bending information composed of linear elements created by the CAD / CAM system, first of all, in the first step, Desired 3 from a given viewpoint
The three-dimensional CAD data is rotated to be three-dimensional CAD data, and the respective minimum distances of the plurality of surfaces from the projection plane projecting the plurality of surfaces forming the desired three-dimensional CAD data after the rotation are compared. Then, the plurality of surfaces are rearranged in the ascending order of the minimum distance. Then, in the second step, the vertical relationship of the plurality of surfaces with respect to the projection plane is obtained, and the order rearranged in the first step is rearranged based on the vertical relationship. Finally, in a third step, the inner and outer lines of the projection figure of the plurality of surfaces with respect to the projection plane are drawn in the order rearranged in the second step, and the inside of the outer line of the projection figure and the projection figure are drawn. The outside of the internal line is filled with a predetermined color / pattern based on the value of the normal vector of the surface corresponding to the projected figure, and the overwriting process is performed to perform the desired three-dimensional CA.
Draw a stereoscopic view of D data.
【0024】これにより、所望の3次元CADデータの
隠面消去処理がなされた立体図ができるとともに、塗り
つぶしにより、立体感を有した立体図を描画できるた
め、3次元CADデータを構成する各面の位置関係を容
易、かつ迅速に把握することができる。As a result, a three-dimensional figure in which the hidden surface removal processing of the desired three-dimensional CAD data is performed and a three-dimensional figure having a three-dimensional effect can be drawn by painting, so that each surface constituting the three-dimensional CAD data can be drawn. The positional relationship of can be easily and quickly grasped.
【0025】また、本発明は、前記第2ステップの処理
を次のようなステップで処理する。まず第1ステップ
で、前記複数の面のうちの第1の面の所定の投影面から
の最大距離と第2の面の前記所定の投影面からの最小距
離とを比較して前記最大距離が前記最小距離以下である
か否かを判断する。次に、第2ステップでは、前記第1
ステップで前記最大距離が前記最小距離以下でない場合
は、前記第1の面の無限平面と前記第2の面の無限平面
との交線を求め、前記第1の面の投影図形と前記第2の
面の投影図形のうち少なくとも1つが前記交線に重複し
ない片側投影図形であるか否かを判断する。次に、第3
ステップでは、前記第2ステップで片側投影図形がある
場合は、1つの片側投影図形と、他の片側投影図形であ
る場合を含む他の投影図形とが重複する部分を有するか
否かを判断する。次に、第4ステップでは、前記第3ス
テップで重複する部分を有する場合は、該重複する部分
に相当する前記1つの片側投影図形に対応する面上の点
と、該点を通り視点方向に平行な直線と前記他の投影図
形に対応する面との交点とを求め、前記所定の投影面か
ら前記点までの距離と前記所定の投影面から前記交点ま
での距離を比較して、前記点までの距離の方が大きいか
否かを判断する。最後に、第5ステップとして、前記第
1ステップで前記第1の面の最大距離が前記第2の面の
最小距離以下であると判断された場合は、前記第1の面
は前記第2の面の下にあると判定し、前記第4ステップ
で前記点までの距離の方が大きいと判断された場合は、
前記1つの片側投影図形に対応する面が前記他の投影図
形に対応する面より上にあると判定し、前記第4ステッ
プで前記点までの距離の方が大きくないと判断された場
合は、前記1つの片側投影図形に対応する面が前記他の
投影図形に対応する面より下にあると判定する。Further, according to the present invention, the processing of the second step is processed in the following steps. First, in a first step, the maximum distance is determined by comparing a maximum distance of a first surface of the plurality of surfaces from a predetermined projection surface and a minimum distance of a second surface of the plurality of surfaces from the predetermined projection surface. It is determined whether the distance is less than the minimum distance. Next, in the second step, the first
If the maximum distance is not less than or equal to the minimum distance in step, the line of intersection between the infinite plane of the first surface and the infinite plane of the second surface is obtained, and the projected figure of the first surface and the second plane are obtained. It is determined whether or not at least one of the projected figures on the surface is a one-sided projected figure that does not overlap the intersection line. Next, the third
In the step, if there is a one-sided projected figure in the second step, it is determined whether or not one one-sided projected figure and another projected figure including a case of another one-sided projected figure have an overlapping portion. . Next, in the fourth step, when there is an overlapping portion in the third step, a point on the surface corresponding to the one-sided projected figure corresponding to the overlapping portion and a point passing through the point in the viewpoint direction The intersection of a parallel straight line and the surface corresponding to the other projected figure is obtained, and the distance from the predetermined projection surface to the point is compared with the distance from the predetermined projection surface to the intersection, and the point Determine if the distance to is greater. Finally, as a fifth step, if it is determined in the first step that the maximum distance of the first surface is less than or equal to the minimum distance of the second surface, the first surface is set to the second distance. If it is determined that the distance to the point is larger in the fourth step,
When it is determined that the surface corresponding to the one one-sided projected figure is above the surface corresponding to the other projected figure, and it is determined that the distance to the point is not larger in the fourth step, It is determined that the surface corresponding to the one projection graphic is below the surface corresponding to the other projection graphic.
【0026】このような判定処理により、3次元CAD
データを構成する複数の面の上下関係を常に迅速に判定
することができる。By such determination processing, three-dimensional CAD
It is possible to always quickly determine the vertical relationship of the plurality of surfaces that form the data.
【0027】[0027]
【実施例】以下、図面を参照して本発明の一実施例につ
いて説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.
【0028】図2は、本発明の一実施例である板金CA
D/CAMシステムの構成を示す図である。FIG. 2 shows a sheet metal CA which is an embodiment of the present invention.
It is a figure which shows the structure of a D / CAM system.
【0029】図2において、板金CAD/CAMシステ
ムは、全体の制御を行うCPU1、メモリ2、表示部
3、キーボード4、マウス5、フロッピーディスク装置
6、ハードディスク装置7から構成される。In FIG. 2, the sheet metal CAD / CAM system comprises a CPU 1 for controlling the whole, a memory 2, a display unit 3, a keyboard 4, a mouse 5, a floppy disk device 6 and a hard disk device 7.
【0030】そして、板金CAD/CAM処理を行う場
合は、キーボード4あるいはマウス5からの所定の入力
指示により、ハードディスク装置7に記憶されている板
金CAD/CAM処理のためのアプリケーションがメモ
リ2に読み込まれ、CPU1の制御のもと、このアプリ
ケーションが表示部3に表示され、この表示されたアプ
リケーションに対してユーザがキーボード4あるいはマ
ウス5からの指示入力により、処理が実行されることに
なる。そして、CADデータの処理が終了すると、ハー
ドディスク装置7に処理結果が出力され記憶される。そ
の後、このCADデータをもとにCAM処理が実行さ
れ、加工データが作成され、フロッピーディスク装置6
のフロッピーディスクに作成された加工データが記憶さ
れることになる。When performing sheet metal CAD / CAM processing, an application for sheet metal CAD / CAM processing stored in the hard disk device 7 is read into the memory 2 by a predetermined input instruction from the keyboard 4 or the mouse 5. Then, under the control of the CPU 1, this application is displayed on the display unit 3, and the process is executed by the user inputting an instruction from the keyboard 4 or the mouse 5 to the displayed application. Then, when the processing of the CAD data is completed, the processing result is output and stored in the hard disk device 7. After that, CAM processing is executed based on this CAD data, processed data is created, and the floppy disk device 6
The processed data created on the floppy disk will be stored.
【0031】さて、このような板金CAD/CAMシス
テムにおいて、CADデータの作成処理は、まず1つの
平面のCADデータを作成する面作成処理を行い、この
作成した複数の平面のCADデータを3次元に合成する
面合成処理を行い、最後に合成したCADデータを2次
元に展開する展開処理を行って、最終的なCADデータ
を出力することになる。この面合成処理における3次元
CADデータの立体図描画方法について以下説明する。In the sheet metal CAD / CAM system as described above, the CAD data creating process first performs a plane creating process for creating CAD data of one plane, and the created CAD data of a plurality of planes is three-dimensionally processed. The surface synthesizing process for synthesizing the CAD data is performed, the developing process for finally synthesizing the CAD data in two dimensions is performed, and the final CAD data is output. A three-dimensional CAD data stereoscopic drawing drawing method in this surface synthesis processing will be described below.
【0032】図1は、本発明の一実施例である立体図の
描画手順を示す全体フローチャートである。FIG. 1 is an overall flow chart showing a procedure for drawing a three-dimensional diagram which is an embodiment of the present invention.
【0033】ここで、本発明による立体図の描画方法の
対象は、板金CAD/CAMに関するものであり、描画
対象となる面は、直線のみから構成され、円弧等の被直
線のものは、予め微小な直線群により変換されている。
また、立体図の描画に際し、XYZ座標を用い、XY座
標面を、対象となるCADデータの投影面とし、視点は
Z座標の+∞(無限大)とする。また、基本的には、奥
行きソート法に基づいて立体図の描画手順を行うもので
ある。Here, the object of the method for drawing a three-dimensional drawing according to the present invention relates to the sheet metal CAD / CAM, and the surface to be drawn is composed of only straight lines, and the straight lines such as arcs are previously set. It is converted by a group of minute lines.
Also, when drawing a three-dimensional diagram, XYZ coordinates are used, the XY coordinate plane is the projection plane of the target CAD data, and the viewpoint is + ∞ (infinity) of the Z coordinate. Further, basically, the drawing procedure of the stereoscopic diagram is performed based on the depth sorting method.
【0034】また、説明時に使用する符号は次のような
意味をもつものである。すなわち、 A:3次元の面(S)のZ座標の最小値 B:3次元の面(S)のZ座標の最大値 I:3次元の面(S)を無限平面と考えた場合の3次元
の面 M:3次元の面(S)の法線ベクトルのZ成分 P:3次元の面(S)上の点 S:3次元の面 T:SをXY座標平面に投影した2次元の面 Z:PのZ座標値 a :上記I〜Zに添えられ、複数ある内の全てを意味す
る i :上記I〜Zに添えられ、複数ある内の1つを意味す
る j :上記I〜Zに添えられ、複数ある内の1つを意味す
る である。The symbols used at the time of explanation have the following meanings. That is, A: minimum value of Z coordinate of three-dimensional surface (S) B: maximum value of Z coordinate of three-dimensional surface (S) I: 3 when the three-dimensional surface (S) is considered as an infinite plane Dimensional surface M: Z component of the normal vector of the three-dimensional surface (S) P: Point on the three-dimensional surface (S) S: Three-dimensional surface T: Two-dimensional surface projected on the XY coordinate plane Surface Z: Z coordinate value of P a: attached to the above I to Z, meaning all of a plurality i: attached to the above I to Z, meaning one of a plurality j: I above It is attached to Z and means one of a plurality.
【0035】さて、図1において、対象となる面(S
a)を初期状態とするソートを行う(ステップ10
1)。すなわち、面Saを構成する頂点のZ座標値の最
小値Aaをもとに面Saを最小値Aaの小さい順にソート
する。Now, in FIG. 1, the target surface (S
Sort with a) as the initial state (step 10)
1). That is, the surface Sa is sorted in the ascending order of the minimum value Aa based on the minimum value Aa of the Z coordinate values of the vertices forming the surface Sa.
【0036】次に、ステップ101でソートされた面S
aの初期状態の順序を描画すべき順に並び変える(ステ
ップ102)。すなわち、面Saを単位として、視点か
らみた場合に重複する面の上下関係を求め、その面の上
下関係をもとに面Saを視点から遠い順にソートする。Next, the surface S sorted in step 101
The order of the initial state of a is rearranged in the drawing order (step 102). That is, using the surface Sa as a unit, the vertical relationship of overlapping surfaces when viewed from the viewpoint is obtained, and the surface Sa is sorted in the order of increasing distance from the viewpoint based on the vertical relationship of the surfaces.
【0037】そして、最後にステップ102でソートさ
れた順に面Saを投影面(XY面)に描画する(ステッ
プ103)。Finally, the surface Sa is drawn on the projection surface (XY surface) in the order sorted in step 102 (step 103).
【0038】従って、視点から各面Saをみた場合、重
複する面がない場合は、ステップ101の初期状態の順
序でステップ103の描画処理がなされ、結果的に隠面
消去処理はされない。そして、視点から各面Saをみた
場合、重複する面の集合が存在するときは、その面の集
合ごとにステップ102のソート処理が行われ、その面
の集合ごとに隠面消去処理がなされることになる。Therefore, when each surface Sa is viewed from the viewpoint, if there is no overlapping surface, the drawing processing of step 103 is performed in the order of the initial state of step 101, and consequently the hidden surface removal processing is not performed. Then, when looking at each surface Sa from the viewpoint, if there is a set of overlapping surfaces, the sorting processing of step 102 is performed for each set of the surfaces, and the hidden surface removal processing is performed for each set of the surfaces. It will be.
【0039】次に、図1の各ステップを詳細に説明す
る。Next, each step of FIG. 1 will be described in detail.
【0040】図3は、図1のステップ101における初
期並び換え処理の詳細フローチャートである。FIG. 3 is a detailed flowchart of the initial rearrangement process in step 101 of FIG.
【0041】図3において、まず対象となる2次元の面
データと曲げ情報とから3次元のCADデータを作成す
る(ステップ201)。そして、視点が固定のZ座標の
+∞であることから、この3次元のCADデータに対す
る所望の投影面がXY平面となるように回転処理を行う
(ステップ202)。このステップ202による回転処
理後の3次元データを構成する複数の面データが、面S
aである。そして、面Saをチェーンにつなぐ処理を行う
(ステップ203)。このステップ203のチェーンの
接続順序は任意であり、特別の指定はされない。In FIG. 3, first, three-dimensional CAD data is created from the target two-dimensional surface data and bending information (step 201). Then, since the viewpoint is + ∞ of the fixed Z coordinate, the rotation processing is performed so that the desired projection plane for this three-dimensional CAD data becomes the XY plane (step 202). A plurality of surface data forming the three-dimensional data after the rotation processing in step 202 is the surface S
is a. Then, processing for connecting the surface Sa to the chain is performed (step 203). The order of connecting the chains in step 203 is arbitrary and is not specified.
【0042】そして、変数iおよび変数jの初期値をi=
1,j=2とする(ステップ204)。ここで、iおよび
jの値は、チェーンの順序を示す値でもある。従って、
面Siとは、チェーンのi番目の面Sを示す。さて、その
後、面SiのZ座標の最小値Ziが、面SjのZ座標の最
小値Zjより大きいか否かを判断し(ステップ20
5)、大きい場合は、ステップ203で作成したチェー
ンのSiとSjとの順序を入れ換えた後(ステップ20
6)、ステップ207に移行し、大きくない場合は、そ
のままステップ207に移行する。The initial values of the variables i and j are i =
1, j = 2 (step 204). Where i and
The value of j is also a value indicating the order of chains. Therefore,
The surface Si indicates the i-th surface S of the chain. Now, after that, it is judged whether or not the minimum value Zi of the Z coordinate of the surface Si is larger than the minimum value Zj of the Z coordinate of the surface Sj (step 20).
5) If it is larger, after changing the order of Si and Sj of the chain created in step 203 (step 20)
6) The procedure moves to step 207, and if not larger, the procedure moves directly to step 207.
【0043】ステップ207では、全てのiおよびjに対
する処理が終了したか否かを判断し、終了しない場合
は、iとjの値を更新し(ステップ208)、ステップ2
05に移行して上記処理を繰り返す。一方、ステップ2
07で全てのiおよびjに対する処理が終了した場合は、
本処理を終了する。In step 207, it is judged whether or not the processing for all i and j has been completed. If not completed, the values of i and j are updated (step 208), and step 2
The procedure shifts to 05 and the above processing is repeated. On the other hand, step 2
If the processing for all i and j is completed in 07,
This process ends.
【0044】このようにして、対象のCADデータを構
成する面を、Z座標の+∞の視点からの立体図とすべく
CADデータを回転処理し、各面Saに対するZ座標の
最小値Aaをもとにソートした初期状態のチェーンを作
成する。In this way, the CAD data is rotated so that the surface forming the target CAD data becomes a stereoscopic view from the viewpoint of + ∞ of the Z coordinate, and the minimum value Aa of the Z coordinate for each surface Sa is calculated. Create a sorted initial chain.
【0045】次に、図1のステップ102の処理につい
て詳細に説明する。Next, the processing of step 102 in FIG. 1 will be described in detail.
【0046】図4は、図1のステップ102における描
画順の並び換え処理の詳細フローチャートである。FIG. 4 is a detailed flowchart of the process of rearranging the drawing order in step 102 of FIG.
【0047】図4において、まずiおよびjを初期値i=
1,j=2に設定する(ステップ301)。ここで、iお
よびjの値は、上述したようにチェーンの順序を示す値
である。In FIG. 4, first, i and j are initialized to i =
1, j = 2 is set (step 301). Here, the values of i and j are values indicating the order of chains as described above.
【0048】そして、図1のステップ101で作成され
た面Siと面Sjとの上下関係を調べる処理を行う(ステ
ップ302)。なお、このステップ302の処理の詳細
については、後述する。そして、ステップ302の結
果、面Siが面Sjの上にあるか否かを判断し(ステップ
303)、面Siが面Sjの上にある場合は、面Siと面
Sjとを入れ換える処理を行った後(ステップ30
4)、ステップ305に移行する。一方面Siが面Sjの
上にない場合は、そのままステップ305に移行する。Then, a process for checking the vertical relationship between the surfaces Si and Sj created in step 101 of FIG. 1 is performed (step 302). The details of the process of step 302 will be described later. Then, as a result of step 302, it is determined whether or not the surface Si is on the surface Sj (step 303), and when the surface Si is on the surface Sj, a process of exchanging the surface Si and the surface Sj is performed. After (Step 30
4) and shifts to step 305. On the other hand, when the surface Si is not on the surface Sj, the process directly proceeds to step 305.
【0049】そして、ステップ305では、全てのiお
よびjに対する処理が終了したか否かを判断し、全ての
処理が終了した場合は、iとjとを更新し(ステップ30
6)、ステップ302に移行して上記処理を繰り返す。
一方、ステップ305において、全てのiおよびjに対す
る処理が終了した場合は、本処理を終了する。Then, in step 305, it is determined whether or not the processing for all i and j is completed, and if all the processing is completed, i and j are updated (step 30
6) The procedure moves to step 302 and the above processing is repeated.
On the other hand, when the processing for all i and j is completed in step 305, this processing is completed.
【0050】このようにして、面Saの上下関係を調
べ、この上下関係をもとに最終的な、描画すべき順のソ
ートが行われる。In this way, the vertical relationship of the surfaces Sa is checked, and based on this vertical relationship, the final sorting in the drawing order is performed.
【0051】次に、図1のステップ103の処理につい
て詳細に説明する。Next, the processing of step 103 in FIG. 1 will be described in detail.
【0052】図5は、図1のステップ103における立
体図の描画処理の詳細フローチャートである。FIG. 5 is a detailed flowchart of the stereoscopic drawing processing in step 103 of FIG.
【0053】図5において、まず初期値として変数iをi
=1と設定する(ステップ401)。ここで、変数i
は、ステップ102において作成されたチェーンの順序
である。次に、面SiのXY平面への投影された2次元
面Tiの内外線を描画する(ステップ402)。その
後、面Siの法線ベクトルのZ成分Miをもとに異なる色
で、面Tiの内線の外側と、面Tiの外線の内側とを塗り
つぶす(ステップ403)。すなわち、視点からみた場
合、対象のCADデータの立体形状の表面側である面と
裏面側である面とを異なる色で塗りつぶす。In FIG. 5, first, the variable i is set to i as an initial value.
= 1 is set (step 401). Where the variable i
Is the order of the chains created in step 102. Next, the inner and outer lines of the two-dimensional surface Ti projected on the XY plane of the surface Si are drawn (step 402). After that, the outside of the internal line of the surface Ti and the inside of the external line of the surface Ti are filled with different colors based on the Z component Mi of the normal vector of the surface Si (step 403). That is, when viewed from the viewpoint, the surface that is the front surface side and the surface that is the back surface side of the three-dimensional shape of the target CAD data are filled with different colors.
【0054】そして、ステップ102で作成されたチェ
ーンをもとに次の面Sが存在するか否かを判断し(ステ
ップ404)、次の面Sが存在する場合は、変数iをi+
1にして(ステップ405)、ステップ402に移行
し、上記処理を繰り返す。一方、ステップ404におい
て、次の面Sが存在しない場合は、本処理を終了する。Then, it is determined whether or not the next surface S exists based on the chain created in step 102 (step 404). If the next surface S exists, the variable i is set to i +
The value is set to 1 (step 405), the process proceeds to step 402, and the above process is repeated. On the other hand, in step 404, if the next surface S does not exist, this processing ends.
【0055】これにより、対象のCADデータを構成す
る面Saの投影図形が、立体形状の表面側か裏面側かに
より異なる色で塗りつぶされ、しかも視点から遠い面か
ら順次、上書きされた立体図が描画されることになる。
そして、この上書きにより隠面消去処理がなされること
になる。As a result, the projected figure of the surface Sa which constitutes the target CAD data is filled with a different color depending on whether it is the front side or the back side of the three-dimensional shape, and the three-dimensional drawing is overwritten sequentially from the surface far from the viewpoint. Will be drawn.
Then, the hidden surface removal processing is performed by this overwriting.
【0056】次に、図4のステップ302の面の上下関
係を調べる処理について詳細に説明する。Next, the process of checking the vertical relationship of the surfaces in step 302 of FIG. 4 will be described in detail.
【0057】図6〜図9は、図4のステップ302にお
ける面Sの上下関係を調べる処理の詳細フローチャート
である。FIGS. 6 to 9 are detailed flowcharts of the processing for checking the vertical relationship of the surface S in step 302 of FIG.
【0058】また、図10〜図15は、図4のステップ
302の面の上下関係を調べる処理を説明する図であ
る。Further, FIGS. 10 to 15 are views for explaining the processing for checking the vertical relationship of the surfaces in step 302 of FIG.
【0059】まず、図6において、面SiのZ座標の最
大値Biが、面SjのZ座標の最小値Aj以下であるか否
かを判断する(ステップ501)。そして、最大値Bi
が最小値Aj以下である場合は、面Siが面Sjの下に位
置すると判定される(ステップ502)。First, in FIG. 6, it is determined whether or not the maximum value Bi of the Z coordinate of the surface Si is less than or equal to the minimum value Aj of the Z coordinate of the surface Sj (step 501). And the maximum value Bi
Is smaller than the minimum value Aj, it is determined that the surface Si is located below the surface Sj (step 502).
【0060】一方、ステップ501において、最大値B
iが最小値Aj以下でない場合は、さらに面Siと面Sjが
平行であるか否かを判断する(ステップ503)。そし
て、面Siと面Sjとが平行である場合は、図7のステッ
プ521に移行する。On the other hand, in step 501, the maximum value B
If i is not less than the minimum value Aj, it is further determined whether or not the surface Si and the surface Sj are parallel to each other (step 503). Then, when the surface Si and the surface Sj are parallel to each other, the process proceeds to step 521 in FIG.
【0061】ステップ521においてはまず、面Siを
XY平面に投影した2次元の面Tiと、面SjをXY平面
に投影した2次元の面Tjとが重なるか否かを判断す
る。そして、重ならない場合は、面Siと面Sjとの上下
関係は不定であると判定される(ステップ524)。一
方、重なる場合(図10(a))はさらに、面Si上の
点Piを通り、Z軸に平行な直線L1と、面Sjを無限平
面と考えた場合の3次元の面Ijとの交点Pjを求める
(ステップ522、図10(b))。従って、点Piお
よび交点PjのXY平面への投影は、面Tiおよび面Tj
の重複する部分に位置する関係にある。なお、後述する
PiおよびPjについても同様である。In step 521, first, it is determined whether or not the two-dimensional surface Ti obtained by projecting the surface Si on the XY plane and the two-dimensional surface Tj obtained by projecting the surface Sj on the XY plane overlap. If they do not overlap, it is determined that the vertical relationship between the surface Si and the surface Sj is indefinite (step 524). On the other hand, in the case of overlapping (FIG. 10A), the intersection of a straight line L1 that passes through the point Pi on the surface Si and is parallel to the Z axis and the three-dimensional surface Ij when the surface Sj is considered to be an infinite plane. Pj is obtained (step 522, FIG. 10B). Therefore, the projections of the point Pi and the intersection point Pj on the XY plane are the plane Ti and the plane Tj.
It is located in the overlapping part of. The same applies to Pi and Pj described later.
【0062】そして、点PiのZ座標値Ziが点PjのZ
座標値Zjより大きいか否かを判断する(ステップ52
3)。そして、座標値Ziが大きいと判断された場合
は、面Siは面Sjの上に位置すると判定され(ステップ
525)、座標値Ziが大きくないと判断された場合
は、面Siは面Sjの下に位置すると判断される(ステッ
プ526)。The Z coordinate value Zi of the point Pi is Z of the point Pj.
It is determined whether or not the coordinate value is larger than Zj (step 52).
3). If it is determined that the coordinate value Zi is large, it is determined that the surface Si is located on the surface Sj (step 525). If it is determined that the coordinate value Zi is not large, the surface Si is the surface Sj of the surface Sj. It is determined to be located below (step 526).
【0063】さて、図6のステップ503において、面
Siと面Sjとが平行でない場合は、さらに面Siを無限
平面と考えた場合の3次元の面Iiと面Sjを無限平面と
考えた場合の3次元の面Ijとの交線をXY平面に投影
した直線Lを求める(ステップ504)。そして、面S
iをXY平面に投影した2次元の面Tiと面SjをXY平
面に投影した2次元の面Tjとのどちらも直線Lの片側
にある、すなわち直線Lと重複していないか否かを判断
し(ステップ505)、重複していない場合は、さらに
面Tiと面Tjとがともに直線Lに分離された面の同じ面
側にあるか否かを判断する(ステップ506)。そし
て、面Tiと面Tjとが同じ面側にない場合は、面Siと
面Sjとの上下関係は不定であると判定され(ステップ
507、図12)、面Tiと面Tjとが同じ面側にある場
合(図11(a))は、さらに図8のステップ531に
移行する。Now, in step 503 of FIG. 6, when the surface Si and the surface Sj are not parallel, when the surface Si is considered as an infinite plane, and when the three-dimensional surface Ii and surface Sj are considered as infinite planes. A straight line L obtained by projecting a line of intersection with the three-dimensional surface Ij on the XY plane is obtained (step 504). And surface S
It is determined whether both the two-dimensional surface Ti obtained by projecting i on the XY plane and the two-dimensional surface Tj obtained by projecting the surface Sj on the XY plane are on one side of the straight line L, that is, do not overlap with the straight line L. However, if they do not overlap each other (step 505), it is further determined whether or not both the surface Ti and the surface Tj are on the same surface side of the surfaces separated by the straight line L (step 506). Then, when the surface Ti and the surface Tj are not on the same surface side, it is determined that the vertical relationship between the surface Si and the surface Sj is indefinite (step 507, FIG. 12), and the surface Ti and the surface Tj are the same surface. If it is on the side (FIG. 11A), the process further proceeds to step 531 of FIG.
【0064】図8のステップ531においてはまず、面
Tiと面Tjとが重なるか否かを判断し、重ならない場合
は、面Siと面Sjとの上下関係は不定であると判定され
る(ステップ534)。一方、重なる場合(図11
(a))は、さらに直線L上にない面Si上の点Piを通
り、Z軸に平行な直線L2と面Sjを無限平面と考えた場
合の3次元の面Ijとの交点Pjを求める(ステップ53
2、図11(b))。In step 531 of FIG. 8, first, it is determined whether or not the surface Ti and the surface Tj overlap each other. If they do not overlap, it is determined that the vertical relationship between the surface Si and the surface Sj is indefinite ( Step 534). On the other hand, if they overlap (Fig. 11
(A)) Further, the intersection point Pj between the straight line L2 passing through the point Pi on the surface Si which is not on the straight line L and parallel to the Z axis and the three-dimensional surface Ij when the surface Sj is considered to be an infinite plane is obtained. (Step 53
2, FIG. 11 (b)).
【0065】そして、点PiのZ座標値Ziが点PjのZ
座標値Zjより大きいか否かを判断する(ステップ53
3)。そして、座標値Ziが大きいと判断された場合
は、面Siは面Sjの上に位置すると判定され(ステップ
535)、座標値Ziが大きくないと判断された場合
は、面Siは面Sjの下に位置すると判断される(ステッ
プ536)。Then, the Z coordinate value Zi of the point Pi is Z of the point Pj.
It is determined whether the coordinate value is larger than Zj (step 53).
3). If it is determined that the coordinate value Zi is large, it is determined that the surface Si is located on the surface Sj (step 535). If it is determined that the coordinate value Zi is not large, the surface Si is the surface Sj of the surface Sj. It is determined to be located below (step 536).
【0066】さて、図6のステップ505において、少
なくとも面Tiと面Tjとの一方が直線Lに重複している
場合は、さらに面Tiが直線Lに重複していないか否か
を判断し(ステップ508)、面Tiが直線Lに重複し
ていない場合(図13(a))は、ステップ506にお
いて、面Tiと面Tjとが同じ面側にある場合と同様に、
図8のフローチャートに基づいて上下関係を調べる処理
を行う(図13(b))。In step 505 of FIG. 6, if at least one of the surface Ti and the surface Tj overlaps the straight line L, it is further determined whether or not the surface Ti does not overlap the straight line L ( If the surface Ti does not overlap the straight line L (step 508) (FIG. 13A), as in the case where the surface Ti and the surface Tj are on the same surface side in step 506,
Processing for checking the vertical relationship is performed based on the flowchart of FIG. 8 (FIG. 13B).
【0067】すなわち、図8のステップ531におい
て、面Tiと面Tjとが重なるか否かを判断し、重ならな
い場合は、面Siと面Sjとの上下関係は不定であると判
定される(ステップ534)。一方、重なる場合(図1
3(a))は、さらに直線L上にない面Si上の点Piを
通りZ軸に平行な直線L3と、面Sjを無限平面と考えた
場合の3次元の面Ijとの交点Pjを求める(ステップ5
32、図13(b))。That is, in step 531 of FIG. 8, it is determined whether or not the surface Ti and the surface Tj overlap. If they do not overlap, it is determined that the vertical relationship between the surface Si and the surface Sj is indeterminate ( Step 534). On the other hand, if they overlap (Fig. 1
3 (a) is the intersection point Pj between the straight line L3 passing through the point Pi on the surface Si that is not on the straight line L and parallel to the Z axis, and the three-dimensional surface Ij when the surface Sj is considered to be an infinite plane. Ask (Step 5)
32, FIG. 13B).
【0068】そして、点PiのZ座標値Ziが点PjのZ
座標値Zjより大きいか否かを判断する(ステップ53
3)。そして、座標値Ziが大きいと判断された場合
は、面Siは面Sjの上に位置すると判定され(ステップ
535)、座標値Ziが大きくないと判断された場合
は、面Siは面Sjの下に位置すると判断される(ステッ
プ536)。Then, the Z coordinate value Zi of the point Pi is Z of the point Pj.
It is determined whether the coordinate value is larger than Zj (step 53).
3). If it is determined that the coordinate value Zi is large, it is determined that the surface Si is located on the surface Sj (step 535). If it is determined that the coordinate value Zi is not large, the surface Si is the surface Sj of the surface Sj. It is determined to be located below (step 536).
【0069】一方、ステップ508において、面Tiが
直線Lに重複している場合(図14(a))は、さらに
面Tjが直線Lに重複していないか否かを判断し(ステ
ップ509)、重複している場合、すなわち面Tiおよ
び面Tjのいずれも直線Lに重複している場合は、面Si
と面Sjとの上下関係は不定であると判定される(ステ
ップ510、図15)。一方、面Tjが直線Lに重複し
ていない場合(図14(a))は、図9のステップ54
1に移行する。On the other hand, when the surface Ti overlaps the straight line L in step 508 (FIG. 14A), it is further determined whether or not the surface Tj overlaps the straight line L (step 509). , If both of the surfaces Ti and Tj overlap the straight line L, the surface Si
Is determined to be indefinite (step 510, FIG. 15). On the other hand, when the surface Tj does not overlap the straight line L (FIG. 14A), step 54 in FIG.
Move to 1.
【0070】図9のステップ541においてはまず、面
Tiと面Tjとが重なるか否かを判断し、重ならない場合
は、面Siと面Sjとの上下関係は不定であると判定され
る(ステップ544)。一方、重なる場合(図14
(a))は、さらに直線L上にない面Sj上の点Pjを通
りZ軸に平行な直線L4と、面Tiを無限平面と考えた場
合の3次元の面Iiとの交点Piを求める(ステップ54
2、図14(b))。In step 541 of FIG. 9, first, it is determined whether or not the surface Ti and the surface Tj overlap. If they do not overlap, it is determined that the vertical relationship between the surface Si and the surface Sj is indeterminate ( Step 544). On the other hand, if they overlap (Fig.
(A)) Further, the intersection point Pi between the straight line L4 that passes through the point Pj on the surface Sj that is not on the straight line L and is parallel to the Z axis and the three-dimensional surface Ii when the surface Ti is considered as an infinite plane is obtained. (Step 54
2, FIG. 14 (b)).
【0071】そして、点PiのZ座標値Ziが点PiのZ
座標値Zjより大きいか否かを判断する(ステップ54
3)。そして、座標値Ziが大きいと判断された場合
は、面Siは面Sjの上に位置すると判定され(ステップ
545)、座標値Ziが大きくないと判断された場合
は、面Siは面Sjの下に位置すると判断される(ステッ
プ546)。Then, the Z coordinate value Zi of the point Pi is Z
It is determined whether or not the coordinate value is larger than Zj (step 54).
3). If it is determined that the coordinate value Zi is large, it is determined that the surface Si is located on the surface Sj (step 545). If it is determined that the coordinate value Zi is not large, the surface Si is the surface Sj of the surface Sj. It is determined to be located below (step 546).
【0072】このようにして、面Siと面Sjとの上下関
係を容易に取得することができる。In this way, the vertical relationship between the surfaces Si and Sj can be easily obtained.
【0073】次に、具体的なCADデータの例をもと
に、全体の処理について説明する。Next, the entire processing will be described based on a specific example of CAD data.
【0074】図16は、具体的なCADデータを示す図
である。そして、図16(a)は、図3のステップ20
1により作成された3次元データを示す図であり、図1
6(b)は、図3のステップ202により作成された回
転後の3次元データのXY平面への2次元の投影図を示
す図である。FIG. 16 is a diagram showing concrete CAD data. Then, FIG. 16A shows step 20 of FIG.
1 is a diagram showing three-dimensional data created by the method shown in FIG.
6B is a diagram showing a two-dimensional projection view of the three-dimensional data after rotation, which is created in step 202 of FIG. 3, on the XY plane.
【0075】図16(a)において、作成される3次元
のCADデータは、底面S1、前面S2、右側面S3、
後面S4、および左側面S5から構成される。そして、
前面S2は面の内部に打抜面SI2を有し、右側面S3
は面の内部に打抜面SI3を有し、後面S4は面の内部
に打抜面SI4を有し、左側面は面の内部に打抜面SI
5を有している。このような上面のない5つの面から構
成される3次元のCADデータの立体図の描画は次のよ
うにして処理される。In FIG. 16 (a), the three-dimensional CAD data to be created includes bottom surface S1, front surface S2, right side surface S3,
It is composed of a rear surface S4 and a left side surface S5. And
The front surface S2 has a punched surface SI2 inside the surface, and the right side surface S3
Has a punched surface SI3 inside the surface, the rear surface S4 has a punched surface SI4 inside the surface, and the left side surface has a punched surface SI4 inside the surface.
Have five. Drawing of a stereoscopic view of three-dimensional CAD data composed of five surfaces without such an upper surface is processed as follows.
【0076】まず、図3のステップ202により、3次
元のCADデータの立体図を所望の方向からみた場合に
相当するように、図16(a)のようにZ方向の無限大
とする視点を固定し、3次元のCADデータを回転す
る。これにより、相対的に所望の視点を移動したと同様
の処理を行ったことになる。そして、図16(b)が、
この所望の回転がなされた3次元のCADデータに対し
てXY平面に投影された2次元図形である。First, in step 202 of FIG. 3, the viewpoint of infinity in the Z direction is set as shown in FIG. 16A so as to correspond to the case where the three-dimensional CAD data is viewed from a desired direction. Fix and rotate 3D CAD data. As a result, the same processing as when the desired viewpoint is moved relatively is performed. And FIG. 16 (b) shows
This is a two-dimensional figure projected on the XY plane with respect to the three-dimensional CAD data that has been rotated as desired.
【0077】図17は、チェーン状態の変化を示す図で
ある。FIG. 17 is a diagram showing changes in the chain state.
【0078】まず図17(a)は、ステップ203によ
り作成された面S1〜S5のチェーンを示しており、こ
のチェーンの接続順序は任意である。ここでは、面S1
からS5の順序で接続されている。First, FIG. 17A shows a chain of the surfaces S1 to S5 created in step 203, and the connecting order of this chain is arbitrary. Here, the surface S1
To S5 in this order.
【0079】次に図17(b)は、ステップ204〜2
08により作成された最終的なチェーン状態を示してお
り、面S1〜S5のZ座標の最小値Aをもとに、この最
小値Aの値の小さい順に接続される。ここでは、面S2
が視点に最も近いためチェーンの最後に並び換えられて
いる。これにより、図1のステップ101の初期状態の
チェーンが作成されたことになる。Next, in FIG. 17B, steps 204 to 2 are executed.
8 shows the final chain state created by No. 08, and the surfaces are connected in ascending order of the minimum value A based on the minimum value A of the Z coordinates of the surfaces S1 to S5. Here, the surface S2
Is rearranged at the end of the chain because it is closest to the viewpoint. As a result, the initial chain in step 101 of FIG. 1 is created.
【0080】次に図17(c)は、図1のステップ10
2により並び換えられたチェーン状態を示しており、図
4のステップ302により調べられた各面S1〜S5の
上下関係をもとに並び換えが行われる。例えば、最初は
図17(b)により面S1と面S3の上下関係が調べら
れ、面S1は面S3の下にあると判定され、チェーンの
入れ換えはない。次に、面S1と面S4の上下関係が調
べられ、面S1と面S4の上下関係は不定であると判定
され、チェーンの入れ換えはない。このようにして、全
ての面の上下関係をもとに、チェーンの入れ換えを行う
と最終的に面S3と面S4とが入れ換わったチェーン状
態となる。このチェーンの順序は、各面が重複する場合
は、視点から遠い順序となり、この順序が描画すべき順
序となる。Next, FIG. 17C shows step 10 of FIG.
2 shows the chain state rearranged, and the rearrangement is performed based on the vertical relationship of the surfaces S1 to S5 examined in step 302 of FIG. For example, first, the vertical relationship between the surface S1 and the surface S3 is checked by FIG. 17B, the surface S1 is determined to be below the surface S3, and the chains are not replaced. Next, the vertical relationship between the surfaces S1 and S4 is examined, it is determined that the vertical relationship between the surfaces S1 and S4 is indefinite, and the chains are not replaced. In this way, when the chains are exchanged on the basis of the vertical relation of all the surfaces, the surface S3 and the surface S4 are finally exchanged into a chain state. The order of this chain is the order farther from the viewpoint when each surface overlaps, and this order is the order to draw.
【0081】次に図18は、図1のステップ103によ
る立体図の描画状態を示す図である。Next, FIG. 18 is a diagram showing a drawing state of a three-dimensional drawing in step 103 of FIG.
【0082】図18においてまず、図17(c)のチェ
ーンの最初の面S1のXY平面への投影面T1を取り出
して内外線を描画する。この場合は、打抜面がないた
め、外線のみである。そして、面S1の法線ベクトルの
Z成分M1が負であることから、内側を示す色に塗りつ
ぶす。ここでは、内側を示す模様で塗りつぶしている。
次に、図17(c)のチェーン順から面S4のXY平面
への投影面T4を取り出して内外線を描画する。そし
て、この場合も面S4の法線ベクトルのZ成分M4が負
であることから、内側を示す模様で塗りつぶされる。こ
の塗りつぶしは、内線の外側と外線の内側とが処理され
る。次に、面S3のXY平面への投影面T3を取り出し
て内外線を描画する。この場合、面S3の法線ベクトル
のZ成分M3は正であるため、外側を示す模様で塗りつ
ぶされる。そして、この場合上書きされることになる。
同様にチェーンの順序に対応する面の投影面T5の内外
線が描画され、上書きされる(図18(d))、そし
て、最終的に、投影面T2の内外線が描画され、塗りつ
ぶしがされ、上書きが行われた立体図が描画されること
になる(図18(e))。In FIG. 18, first, the projection plane T1 of the first surface S1 of the chain of FIG. 17C onto the XY plane is taken out and the inner and outer lines are drawn. In this case, since there is no punched surface, only the outside line is used. Then, since the Z component M1 of the normal vector of the surface S1 is negative, it is painted in a color showing the inside. Here, it is filled with a pattern showing the inside.
Next, the projection plane T4 of the plane S4 onto the XY plane is taken out from the chain order of FIG. Also in this case, since the Z component M4 of the normal vector of the surface S4 is negative, it is filled with a pattern showing the inside. This fill is processed on the outside of the internal line and the inside of the external line. Next, the projection surface T3 of the surface S3 onto the XY plane is taken out and the inside and outside lines are drawn. In this case, since the Z component M3 of the normal vector of the surface S3 is positive, it is filled with a pattern showing the outside. And in this case, it is overwritten.
Similarly, the inner and outer lines of the projection plane T5 corresponding to the order of the chains are drawn and overwritten (FIG. 18D), and finally the inner and outer lines of the projection surface T2 are drawn and filled. , The overwritten solid view is drawn (FIG. 18 (e)).
【0083】このように本実施例においては、迅速なソ
ート処理を行うことができる奥行きソート法の利点と、
板金CADデータの特性を生かしたものであり、作成さ
れたCADデータの立体図(図18(e))は、隠面消
去処理されるとともに、表示されている面が表か裏かを
表示することができ、作成されたCADデータを把握し
易い立体図として描画することができる。特に、板金C
ADデータの場合は、打抜面が存在するため、この打抜
面から内面をみることができるため、さらに視覚的に立
体図として把握し易いものとなる。また、上述したよう
に板金CADデータの特性を生かした簡易な奥行きソー
ト法であるため、様々な視点からの立体図を迅速に、か
つ連続的に描画することができる。As described above, in the present embodiment, the advantage of the depth sorting method that can perform a quick sorting process,
The three-dimensional view of the created CAD data (FIG. 18 (e)) is subjected to hidden surface removal processing, and whether the displayed surface is front or back is displayed by utilizing the characteristics of the sheet metal CAD data. Therefore, the created CAD data can be drawn as a stereoscopic view that is easy to understand. Especially, sheet metal C
In the case of AD data, since the punching surface exists, the inner surface can be seen from this punching surface, which makes it easier to visually grasp as a three-dimensional diagram. In addition, as described above, the simple depth sorting method that makes use of the characteristics of the sheet metal CAD data makes it possible to draw solid views from various viewpoints quickly and continuously.
【0084】[0084]
【発明の効果】以上説明したように、本発明では、CA
D/CAMシステムで作成された直線要素で構成される
2次元CADデータおよび曲げ情報をもとに3次元CA
Dデータの立体図を描画する際、まず第1ステップで、
所定の視点からみた所望の3次元CADデータとすべく
前記3次元CADデータを回転し、該回転後の前記所望
の3次元CADデータを構成する複数の面を投影する投
影面から前記複数の面のそれぞれの最小距離を比較して
該最小距離の小さい順に前記複数の面を並び換える。そ
して、第2ステップで、前記複数の面の前記投影面に対
する上下関係を求め、該上下関係をもとに前記第1ステ
ップで並び換えた順序を並び換える。最後に、第3ステ
ップで、前記第2ステップにより並び換えられた順序
で、前記複数の面の前記投影面に対する投影図形の内外
線を描画し、該投影図形の外線の内側と該投影図形の内
線の外側を該投影図形に対応する面の法線ベクトルの値
をもとに所定の色・模様で塗りつぶし、上書きする処理
を行って前記所望の3次元CADデータの立体図を描画
する。As described above, according to the present invention, CA
3D CA based on 2D CAD data and bending information composed of linear elements created by the D / CAM system
When drawing a stereoscopic view of D data, first, in the first step,
The three-dimensional CAD data is rotated so as to obtain the desired three-dimensional CAD data from a predetermined viewpoint, and the plurality of surfaces forming the desired three-dimensional CAD data after the rotation are projected from the projection surface to the plurality of surfaces. The respective minimum distances are compared and the plurality of surfaces are rearranged in the ascending order of the minimum distance. Then, in the second step, the vertical relationship of the plurality of surfaces with respect to the projection plane is obtained, and the order rearranged in the first step is rearranged based on the vertical relationship. Finally, in a third step, the inner and outer lines of the projection figure of the plurality of surfaces with respect to the projection plane are drawn in the order rearranged in the second step, and the inside of the outer line of the projection figure and the projection figure are drawn. The outside of the internal line is filled with a predetermined color / pattern based on the value of the normal vector of the surface corresponding to the projected figure, and an overwriting process is performed to draw the three-dimensional diagram of the desired three-dimensional CAD data.
【0085】従って、所望の3次元CADデータの隠面
消去処理がなされた立体図ができるとともに、塗りつぶ
しにより、立体感を有した立体図を描画できるため、3
次元CADデータを構成する各面の位置関係を容易、か
つ迅速に把握することができるという利点を有する。Therefore, a three-dimensional figure in which the hidden surface removal processing of the desired three-dimensional CAD data is performed and a three-dimensional figure having a three-dimensional effect can be drawn by painting, and thus the three-dimensional figure can be drawn.
This has an advantage that the positional relationship between the surfaces forming the three-dimensional CAD data can be easily and quickly grasped.
【0086】また、本発明では、前記第2ステップの処
理を次のようなステップで処理する。すなわち、まず第
1ステップで、前記複数の面のうちの第1の面の所定の
投影面からの最大距離と第2の面の前記所定の投影面か
らの最小距離とを比較して前記最大距離が前記最小距離
以下であるか否かを判断する。次に、第2ステップで
は、前記第1ステップで前記最大距離が前記最小距離以
下でない場合は、前記第1の面の無限平面と前記第2の
面の無限平面との交線を求め、前記第1の面の投影図形
と前記第2の面の投影図形のうち少なくとも1つが前記
交線に重複しない片側投影図形であるか否かを判断す
る。次に、第3ステップでは、前記第2ステップで片側
投影図形がある場合は、1つの片側投影図形と、他の片
側投影図形である場合を含む他の投影図形とが重複する
部分を有するか否かを判断する。次に、第4ステップで
は、前記第3ステップで重複する部分を有する場合は、
該重複する部分に相当する前記1つの片側投影図形に対
応する面上の点と、該点を通り視点方向に平行な直線と
前記他の投影図形に対応する面との交点とを求め、前記
所定の投影面から前記点までの距離と前記所定の投影面
から前記交点までの距離を比較して、前記点までの距離
の方が大きいか否かを判断する。最後に、第5ステップ
として、前記第1ステップで前記第1の面の最大距離が
前記第2の面の最小距離以下であると判断された場合
は、前記第1の面は前記第2の面の下にあると判定し、
前記第4ステップで前記点までの距離の方が大きいと判
断された場合は、前記1つの片側投影図形に対応する面
が前記他の投影図形に対応する面より上にあると判定
し、前記第4ステップで前記点までの距離の方が大きく
ないと判断された場合は、前記1つの片側投影図形に対
応する面が前記他の投影図形に対応する面より下にある
と判定する。Further, in the present invention, the processing of the second step is processed in the following steps. That is, first, in the first step, the maximum distance of the first surface of the plurality of surfaces from the predetermined projection surface is compared with the minimum distance of the second surface from the predetermined projection surface to determine the maximum distance. It is determined whether or not the distance is less than or equal to the minimum distance. Next, in the second step, if the maximum distance is not less than or equal to the minimum distance in the first step, an intersection line between the infinite plane of the first surface and the infinite plane of the second surface is obtained, and It is determined whether at least one of the projected figure of the first surface and the projected figure of the second surface is a one-sided projected figure that does not overlap the intersection line. Next, in the third step, if there is a one-sided projected figure in the second step, does one portion of the one-sided projected figure overlap with another projected figure including the case of another one-sided projected figure? Determine whether or not. Next, in the fourth step, if there is an overlapping part in the third step,
The point on the surface corresponding to the one-sided projected figure corresponding to the overlapping portion and the intersection point of the straight line passing through the point and parallel to the viewpoint direction and the surface corresponding to the other projected figure are obtained, and The distance from the predetermined projection plane to the point is compared with the distance from the predetermined projection plane to the intersection, and it is determined whether or not the distance to the point is larger. Finally, as a fifth step, if it is determined in the first step that the maximum distance of the first surface is less than or equal to the minimum distance of the second surface, the first surface is set to the second distance. Determined to be below the surface,
When it is determined that the distance to the point is larger in the fourth step, it is determined that the surface corresponding to the one projection graphic on one side is above the surface corresponding to the other projection graphic, When it is determined in the fourth step that the distance to the point is not larger, it is determined that the surface corresponding to the one one-sided projected figure is below the surface corresponding to the other projected figure.
【0087】従って、この判定処理を用いることによ
り、3次元CADデータを構成する複数の面の上下関係
を常に迅速に判定することができるという利点を有す
る。Therefore, by using this determination processing, there is an advantage that it is possible to always quickly determine the vertical relationship of the plurality of surfaces forming the three-dimensional CAD data.
【図1】本発明の一実施例である立体図の描画手順を示
す全体フローチャート。FIG. 1 is an overall flowchart showing a drawing procedure of a stereoscopic diagram which is an embodiment of the present invention.
【図2】本発明の一実施例である板金CAD/CAMシ
ステムの構成を示す図。FIG. 2 is a diagram showing the configuration of a sheet metal CAD / CAM system that is an embodiment of the present invention.
【図3】図1のステップ101の詳細処理を示すフロー
チャート。FIG. 3 is a flowchart showing detailed processing of step 101 in FIG.
【図4】図1のステップ102の詳細処理を示すフロー
チャート。FIG. 4 is a flowchart showing detailed processing of step 102 in FIG.
【図5】図1のステップ103の詳細処理を示すフロー
チャート。5 is a flowchart showing the detailed processing of step 103 in FIG.
【図6】図4のステップ302における面Sの上下関係
を調べる処理の詳細フローチャート。FIG. 6 is a detailed flowchart of processing for checking the vertical relationship of the surface S in step 302 of FIG.
【図7】図4のステップ302における面Sの上下関係
を調べる処理の詳細フローチャート。FIG. 7 is a detailed flowchart of processing for checking the vertical relationship of the surface S in step 302 of FIG.
【図8】図4のステップ302における面Sの上下関係
を調べる処理の詳細フローチャート。FIG. 8 is a detailed flowchart of processing for checking the vertical relationship of the surface S in step 302 of FIG.
【図9】図4のステップ302における面Sの上下関係
を調べる処理の詳細フローチャート。9 is a detailed flowchart of a process of checking the vertical relationship of the surface S in step 302 of FIG.
【図10】図4のステップ302の面の上下関係を調べ
る処理を説明する図。FIG. 10 is a diagram for explaining the processing for checking the vertical relationship of the surfaces in step 302 of FIG.
【図11】図4のステップ302の面の上下関係を調べ
る処理を説明する図。FIG. 11 is a diagram for explaining the process of checking the vertical relationship of the surfaces in step 302 of FIG.
【図12】図4のステップ302の面の上下関係を調べ
る処理を説明する図。FIG. 12 is a diagram for explaining the processing for checking the vertical relationship of the surfaces in step 302 of FIG.
【図13】図4のステップ302の面の上下関係を調べ
る処理を説明する図。FIG. 13 is a diagram for explaining the processing for checking the vertical relationship of the surfaces in step 302 of FIG.
【図14】図4のステップ302の面の上下関係を調べ
る処理を説明する図。FIG. 14 is a diagram for explaining the processing for checking the vertical relationship of the surfaces in step 302 of FIG.
【図15】図4のステップ302の面の上下関係を調べ
る処理を説明する図。FIG. 15 is a diagram for explaining the processing for checking the vertical relationship of the surfaces in step 302 of FIG.
【図16】具体的なCADデータを示す図。FIG. 16 is a diagram showing specific CAD data.
【図17】チェーン状態の変化を示す図。FIG. 17 is a diagram showing a change in chain state.
【図18】図1のステップ103による立体図の描画状
態を示す図。FIG. 18 is a diagram showing a drawing state of a stereoscopic diagram in step 103 of FIG. 1;
1 CPU 2 メモリ 3 表示部 4 キーボード 5 マウス 6 フロッピーディスク装置 7 ハードディスク装置 B バス 1 CPU 2 Memory 3 Display 4 Keyboard 5 Mouse 6 Floppy Disk Device 7 Hard Disk Device B Bus
Claims (2)
要素で構成される2次元CADデータおよび曲げ情報を
もとに3次元CADデータの立体図を描画するCADデ
ータの立体図描画方法において、 所定の視点からみた所望の3次元CADデータとすべく
前記3次元CADデータを回転し、該回転後の前記所望
の3次元CADデータを構成する複数の面を投影する投
影面から前記複数の面のそれぞれの最小距離を比較して
該最小距離の小さい順に前記複数の面を並び換える第1
ステップと、 前記複数の面の前記投影面に対する上下関係を求め、該
上下関係をもとに前記第1ステップで並び換えた順序を
並び換える第2ステップと、 前記第2ステップにより並び換えられた順序で、前記複
数の面の前記投影面に対する投影図形の内外線を描画
し、該投影図形の外線の内側と該投影図形の内線の外側
を該投影図形に対応する面の法線ベクトルの値をもとに
所定の色・模様で塗りつぶし、上書きする第3ステップ
とを具備したことを特徴とするCADデータの立体図描
画方法。1. A CAD data three-dimensional drawing method for drawing a three-dimensional CAD data three-dimensional drawing based on bending information and two-dimensional CAD data composed of linear elements created by a CAD / CAM system. Of the plurality of surfaces from the projection surface that rotates the three-dimensional CAD data so as to obtain the desired three-dimensional CAD data viewed from the viewpoint, and projects a plurality of surfaces forming the desired three-dimensional CAD data after the rotation. Comparing the respective minimum distances and rearranging the plurality of surfaces in ascending order of the minimum distances.
A step, a second step of obtaining a vertical relationship of the plurality of surfaces with respect to the projection surface, and rearranging the order rearranged in the first step based on the vertical relationship; and a rearrangement by the second step. In order, the inside and outside lines of the projection figure of the plurality of planes with respect to the projection plane are drawn, and the inside of the outside line of the projection figure and the outside of the extension line of the projection figure are the values of the normal vector of the plane corresponding to the projection figure. A CAD data three-dimensional drawing method, which comprises a third step of filling in a predetermined color and pattern based on the above and overwriting.
大距離と第2の面の前記所定の投影面からの最小距離と
を比較して前記最大距離が前記最小距離以下であるか否
かを判断する第1ステップと、 前記第1ステップで前記最大距離が前記最小距離以下で
ない場合は、前記第1の面の無限平面と前記第2の面の
無限平面との交線を求め、前記第1の面の投影図形と前
記第2の面の投影図形のうち少なくとも1つが前記交線
に重複しない片側投影図形であるか否かを判断する第2
ステップと、 前記第2ステップで片側投影図形がある場合は、1つの
片側投影図形と、他の片側投影図形である場合を含む他
の投影図形とが重複する部分を有するか否かを判断する
第3ステップと、 前記第3ステップで重複する部分を有する場合は、該重
複する部分に相当する前記1つの片側投影図形に対応す
る面上の点と、該点を通り視点方向に平行な直線と前記
他の投影図形に対応する面との交点とを求め、前記所定
の投影面から前記点までの距離と前記所定の投影面から
前記交点までの距離を比較して、前記点までの距離の方
が大きいか否かを判断する第4ステップと、 前記第1ステップで前記第1の面の最大距離が前記第2
の面の最小距離以下であると判断された場合は、前記第
1の面は前記第2の面の下にあると判定し、前記第4ス
テップで前記点までの距離の方が大きいと判断された場
合は、前記1つの片側投影図形に対応する面が前記他の
投影図形に対応する面より上にあると判定し、前記第4
ステップで前記点までの距離の方が大きくないと判断さ
れた場合は、前記1つの片側投影図形に対応する面が前
記他の投影図形に対応する面より下にあると判定する第
5ステップとを具備したことを特徴とする前記請求項1
記載のCADデータの立体図描画方法。2. The second step compares a maximum distance of a first surface of the plurality of surfaces from a predetermined projection surface and a minimum distance of a second surface of the plurality of surfaces from the predetermined projection surface. A first step of determining whether the maximum distance is less than or equal to the minimum distance; and, if the maximum distance is not less than or equal to the minimum distance in the first step, an infinite plane of the first surface and the The line of intersection of the second surface with the infinite plane is determined, and whether or not at least one of the projected figure of the first surface and the projected figure of the second surface is a one-sided projected figure that does not overlap with the line of intersection is determined. Second to judge
When there is a one-sided projected figure in step 2 and the second step, it is determined whether or not one one-sided projected figure and another projected figure including the case of another one-sided projected figure have an overlapping portion. If there is a third step and a portion that overlaps in the third step, a point on the surface corresponding to the one-sided projected figure corresponding to the overlapping portion, and a straight line that passes through the point and is parallel to the viewpoint direction. And the intersection point with the surface corresponding to the other projected figure, and by comparing the distance from the predetermined projection surface to the point and the distance from the predetermined projection surface to the intersection point, the distance to the point Is larger than the second distance, and the maximum distance of the first surface is the second distance in the first step.
When it is determined that the distance is less than or equal to the minimum distance of the surface of the first surface, it is determined that the first surface is below the second surface, and it is determined that the distance to the point is larger in the fourth step. If it is determined that the surface corresponding to the one-sided projected figure is above the surface corresponding to the other projected figure, the fourth
If it is determined in step that the distance to the point is not larger, it is determined that the surface corresponding to the one one-side projected figure is below the surface corresponding to the other projected figure. The above-mentioned claim 1 characterized by comprising:
3D drawing method of CAD data described.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5102936A JPH06314317A (en) | 1993-04-28 | 1993-04-28 | Stereoscopic diagram drawing method for cad data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5102936A JPH06314317A (en) | 1993-04-28 | 1993-04-28 | Stereoscopic diagram drawing method for cad data |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH06314317A true JPH06314317A (en) | 1994-11-08 |
Family
ID=14340730
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP5102936A Pending JPH06314317A (en) | 1993-04-28 | 1993-04-28 | Stereoscopic diagram drawing method for cad data |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH06314317A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002342786A (en) * | 2001-05-11 | 2002-11-29 | Amada Co Ltd | Hidden line processing method |
JP2009271915A (en) * | 2008-04-07 | 2009-11-19 | Mitsubishi Electric Corp | Device for generating pseudo three-dimensional screen |
CN110377959A (en) * | 2019-06-21 | 2019-10-25 | 上海数设科技有限公司 | Determine the corresponding finite element of aircraft reinforced flat plate and stability checking method and device |
-
1993
- 1993-04-28 JP JP5102936A patent/JPH06314317A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002342786A (en) * | 2001-05-11 | 2002-11-29 | Amada Co Ltd | Hidden line processing method |
JP4630485B2 (en) * | 2001-05-11 | 2011-02-09 | 株式会社アマダ | Hidden line processing method |
JP2009271915A (en) * | 2008-04-07 | 2009-11-19 | Mitsubishi Electric Corp | Device for generating pseudo three-dimensional screen |
CN110377959A (en) * | 2019-06-21 | 2019-10-25 | 上海数设科技有限公司 | Determine the corresponding finite element of aircraft reinforced flat plate and stability checking method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5003498A (en) | Graphic display method | |
EP2486462B1 (en) | Method, computer system and computer program product for machining simulation and for visually presenting such simulation | |
Hsu et al. | Realtime 3D simulation of 3-axis milling using isometric projection | |
US7561164B2 (en) | Texture map editing | |
EP2750109B1 (en) | Tessellation of a parameterized 3D modeled object | |
CN100418108C (en) | Graphics Reconstruction Method in 3D Scanning System | |
Balasubramaniam et al. | Generation of collision-free 5-axis tool paths using a haptic surface | |
CN103649856A (en) | Method for simulating machining of objects by motion of tool and system and computer program product therefor | |
EP2241988B1 (en) | Method, program and product edition system for visualizing objects displayed on a computer screen | |
KR100861161B1 (en) | Computer-readable recording media recording three-dimensional display programs, three-dimensional display devices, and three-dimensional display methods | |
US6862560B1 (en) | Machining simulation method and apparatus | |
JP2000235407A (en) | Display method, computer readable recording medium recorded with display program and display device | |
JPH06314317A (en) | Stereoscopic diagram drawing method for cad data | |
JP3792584B2 (en) | Tool path surface calculation method, tool path surface calculation program, and recording medium recording tool path surface calculation program | |
JPS62251905A (en) | Interactive graphic input system | |
JPH03138784A (en) | 3D model reconstruction method and display method | |
JPS62251965A (en) | Solid model form defining system in cad/cam system | |
Lee et al. | Local mesh decimation for view-Independent three-axis NC milling simulation | |
Wickman et al. | Defining quality appearance index weights by combining VR and CAT technologies | |
JPH04309187A (en) | Mapping method for stereoscopic model | |
JPH09305791A (en) | Device and method for generating three-dimensional image | |
JP2001242919A (en) | Calculation method for cutter reference surface, computer readable storage medium to store program of cutter reference surface calculation and computer equipment for it | |
Inui et al. | Milling Simulation-Based Method to Evaluate Manufacturability of Machine Parts | |
KR20170096400A (en) | Method, computer system and computer program product for machining simulation and for visually presenting such simulation | |
Besl | Hybrid modeling for manufacturing using NURBS, polygons, and 3D scanner data |