JP2002245485A - Device and method for figure top/reverse setting - Google Patents

Device and method for figure top/reverse setting

Info

Publication number
JP2002245485A
JP2002245485A JP2001042475A JP2001042475A JP2002245485A JP 2002245485 A JP2002245485 A JP 2002245485A JP 2001042475 A JP2001042475 A JP 2001042475A JP 2001042475 A JP2001042475 A JP 2001042475A JP 2002245485 A JP2002245485 A JP 2002245485A
Authority
JP
Japan
Prior art keywords
plane
normal vector
rectangular parallelepiped
vector
reference vector
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.)
Granted
Application number
JP2001042475A
Other languages
Japanese (ja)
Other versions
JP3900839B2 (en
Inventor
Yasushi Kanazawa
泰 金沢
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.)
Nissan Motor Co Ltd
Original Assignee
Nissan Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nissan Motor Co Ltd filed Critical Nissan Motor Co Ltd
Priority to JP2001042475A priority Critical patent/JP3900839B2/en
Publication of JP2002245485A publication Critical patent/JP2002245485A/en
Application granted granted Critical
Publication of JP3900839B2 publication Critical patent/JP3900839B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To put the top/reverse directions of planes constituting a body in order fast with practical precision. SOLUTION: Plane data on the planes constituting the body are inputted from a data input part 10 and a rectangular parallelepiped generation part generates normal vectors of the planes constituting the body according to the plane data. A view plane area arithmetic part 13 generates a rectangular parallelepiped of the minimum volume including the planes constituting the body or a rectangular parallelepiped similar to the rectangular parallelepiped. A maximum-area view plane selection part 14 selects the plane having the largest area out of the planes constituting the generated rectangular parallelepiped and a view plane reference vector generation part 15 generates the reference vector of the selected plane. A plane normal vector arrangement part 16 puts the directions of normal vectors generated by the generation part 12 in order according to the angles of intersection of the normal vectors and the reference vector.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、3次元コンピュー
タグラフィックス描画装置や3次元CADなどの図形描
画装置に適用する図形表裏設定装置および図形表裏設定
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic front / back setting apparatus and a graphic front / back setting method applied to a graphic drawing apparatus such as a three-dimensional computer graphics drawing apparatus and a three-dimensional CAD.

【0002】[0002]

【従来の技術】3次元コンピュータグラフィックス描画
装置や3次元CADなどの図形描画装置において、3次
元立体の幾何モデルの表現方法として、ワイヤーフレー
ムモデル、サーフェスモデル、ソリッドモデルの3種類
の表現方法が用いられている。これらの表現方法のう
ち、シェーディング処理(隠線消去、隠面消去)が可能
なのは、サーフェスモデルとソリッドモデルの2種類の
表現方法である。サーフェスモデルの表現方法は、ソリ
ッドモデルの表現方法とは違って、厚みを表現すること
はできないが、表示に必要なデータ量が少なくて済み、
また、表示のための計算量も少なくて済むという利点が
ある。したがって、自動車の車体パネルのような薄板物
は、厚みを表現できなくとも実用上の問題は発生しない
ため、サーフェスモデルの表現方法を用いて描画してい
る。
2. Description of the Related Art In a graphic drawing apparatus such as a three-dimensional computer graphics drawing apparatus or a three-dimensional CAD, there are three methods of expressing a three-dimensional solid geometric model: a wire frame model, a surface model, and a solid model. Used. Of these expression methods, two types of expression methods, that is, a surface model and a solid model, that can perform shading processing (elimination of hidden lines and elimination of hidden surfaces) are possible. Unlike the method of expressing a solid model, the method of expressing a surface model cannot express the thickness, but the amount of data required for display is small,
Further, there is an advantage that the amount of calculation for display is small. Therefore, a thin plate such as a car body panel does not cause a practical problem even if the thickness cannot be expressed, and is drawn using a surface model expression method.

【0003】サーフェスモデルの表現方法を用いて物体
を描画する場合、その物体を構成する面として、平面、
円筒面、自由曲面が一般的に用いられる。なお、サーフ
ェスモデルの表現方法は、1つの物体を表現する場合
に、その物体を構成する面と面とが離れていてもモデル
としては成立するという特徴を持っている。
When an object is drawn using a surface model expression method, a plane, a plane,
A cylindrical surface or a free-form surface is generally used. The method of expressing a surface model has a feature that, when one object is expressed, the model is established even if the surfaces constituting the object are far from each other.

【0004】サーフェスモデルの表現方法を用いて描画
した物体にシェーディング処理を施して、その物体を3
次元立体として表示できるようにするためには、まず、
その物体を構成しているそれぞれの面の表裏がわからな
ければならない。視点に対するそれぞれの面の表裏の判
断は、たとえば、特開平5−67219号公報に開示さ
れているように、3次元図形に対する視方向ベクトルと
3次元図形を構成する面の法線ベクトルとがなす角度か
ら行うものがある。そして、それぞれの面についての表
裏の設定は、特開平10−172007号公報に開示さ
れているように、基準パッチの表裏を基準として基準パ
ッチ以外のすべてのパッチの表裏を設定するものがあ
る。また、物体を速く描画できるようにするためには、
シェーディング処理が高速で行われるのが好ましい。シ
ェーディング処理の高速化は、たとえば、特開平7−3
20087号公報に開示されているように、無駄な表示
判定処理を行わないようにすることで達成される。
[0004] Shading processing is performed on an object drawn using the surface model expression method, and the object is subjected to 3D shading.
To be able to display as a three-dimensional solid, first,
You must know the front and back of each surface that makes up the object. For example, as disclosed in Japanese Patent Application Laid-Open No. 5-67219, the determination of the front and back of each surface with respect to the viewpoint is made by the viewing direction vector for the three-dimensional graphic and the normal vector of the surface constituting the three-dimensional graphic. There are things to do from an angle. As disclosed in Japanese Patent Application Laid-Open No. 10-172007, the setting of the front and back of each surface includes setting of the front and back of all patches other than the reference patch based on the front and back of the reference patch. Also, in order to be able to draw objects quickly,
Preferably, the shading process is performed at high speed. The speeding up of the shading process is described in, for example,
As disclosed in Japanese Patent Application Publication No. 20087, this is achieved by not performing useless display determination processing.

【0005】サーフェスモデルの表現方法を用いて物体
を描画する場合、その物体を描画するための面のデータ
には、必ずその面の表裏を表すためのデータを含んでい
る。一般的には、その面の法線ベクトルの方向が表とな
る。面の法線ベクトルの方向は、面ごとに存在するた
め、1つの物体を構成する各面の法線ベクトルの方向が
必ず揃うとは限らない。
When an object is drawn using the surface model expression method, data of a surface for drawing the object always includes data for representing the front and back of the surface. In general, the direction of the normal vector of the surface becomes a table. Since the direction of the surface normal vector exists for each surface, the direction of the normal vector of each surface constituting one object is not always the same.

【0006】たとえば、図7(a)に示してあるよう
な、折れ曲がった板を構成する3つの面のデータ(面の
頂点座標や稜線データ)を入力するときに、面の表裏を
そろえることを意識していないでその入力を行ってしま
うと、データの入力の順序によっては、本来は表と判断
されなければならない面が裏と判断されてしまう場合が
ある。
For example, as shown in FIG. 7A, when inputting data of three faces (vertex coordinates and ridgeline data of faces) constituting a bent plate, it is necessary to align the front and back of the faces. If the user performs the input without being conscious of the data, the surface that should be determined to be the front may be determined to be the back depending on the order of data input.

【0007】視点から見て表と判断されるべき面が表と
判断されれば、面の法線ベクトルの方向が光線方向を向
くことになるので、シェーディング処理後は、図7
(b)のように3つの面がきれいに表れ、3つの面が立
体的に表示されるが、本来は表と判断されるべき面が間
違って裏と判断されてしまうと、その面の法線ベクトル
の方向は光線方向とは反対の方向を向くことになり、そ
の面には光が当たらなくなる。このため、たとえば、3
つの面のうちの真中の面が裏と判断されたときには、シ
ェーディング処理後は、図7(c)のように1つの面が
存在していないかのような表示がされ、面の抜けが発生
してしまう。
If the surface to be determined to be a table from the viewpoint is determined to be a table, the direction of the normal vector of the surface is directed to the light ray direction.
As shown in (b), three surfaces are clearly displayed and the three surfaces are three-dimensionally displayed. However, if a surface that should be originally determined to be a front is incorrectly determined to be a back, a normal of the surface is determined. The direction of the vector will be in the opposite direction to the ray direction, and no light will hit the surface. Thus, for example, 3
When it is determined that the middle surface of the two surfaces is the back, after the shading processing, a display as if one surface does not exist is displayed as shown in FIG. Resulting in.

【0008】実際の物体に対してシェーディング処理を
行った結果、上記のような面の抜けが発生してしまう
と、たとえば図8に示すように、表示される物体のう
ち、面の抜けた部分はまだらな模様となって表示される
ため、物体は、きれいな3次元立体としては表示されな
くなってしまう。
[0008] As a result of performing the shading process on an actual object, if the above-mentioned surface dropout occurs, for example, as shown in FIG. Is displayed as a mottled pattern, and the object is not displayed as a beautiful three-dimensional solid.

【0009】シェーディング後の物体がきれいな3次元
立体として表示されるようにするため、面の抜けが発生
した面の法線ベクトルの方向をオペレータが手作業で反
転させたり、コンピュータによって自動的に反転させた
りして、間違って裏と判断されてしまった面を、強制的
に表と判断させるための作業を行っている。
In order to display the object after shading as a clean three-dimensional solid, the operator manually inverts the direction of the normal vector of the surface on which the surface is missing, or automatically inverts the direction by a computer. For example, a side that has been mistakenly determined to be the back side is forcibly determined to be the front side.

【0010】コンピュータによって、面の法線ベクトル
の方向を揃える作業は、具体的には、次のような手順で
行っている。まず、面を揃えるために基準の面を決定す
る。基準の面の決定は、人間が任意の面を適当に選択す
ることによって行う。つぎに、選択した基準の面と隣り
合う面を探す。隣り合っているかどうかは、面同士の頂
点座標の一致、稜線の一致に基づいて図形描画装置が自
動的に行う。なお、基準の面と隣り合う面を探すため
は、物体を構成している基準の面以外のすべての面に対
して、面同士の頂点座標が一致しているか否か、稜線が
一致しているか否か、を調べなければならない。このた
め、隣り合う面を探すために、たとえば自動車の車体パ
ネルを例に取れば、数千の面を対象とすることになり、
隣り合う面を探すためにも多くの時間を要する。
The operation of aligning the direction of the normal vector of the surface by the computer is specifically performed in the following procedure. First, a reference plane is determined to align the planes. The determination of the reference plane is performed by a human appropriately selecting an arbitrary plane. Next, a surface adjacent to the selected reference surface is searched. Whether or not they are adjacent to each other is automatically determined by the graphic drawing apparatus based on the coincidence of vertex coordinates of faces and the coincidence of edges. Note that in order to search for a surface that is adjacent to the reference surface, it is necessary to check whether the vertex coordinates of the surfaces match with respect to all surfaces other than the reference surface that constitutes the object. You have to check if it is. For this reason, in order to search for adjacent surfaces, for example, taking the body panel of an automobile as an example, thousands of surfaces will be targeted,
It takes a lot of time to find the adjacent surface.

【0011】隣り合う面が見つかると、隣り合う面の向
きを基準の面の向きと同じくする。つまり、両面の法線
ベクトルの方向を揃える。法線ベクトルの方向を揃える
処理が終了した面には、処理済みの印を付けて、基準の
面に処理済の面を含める。つまり、処理済の面の集合が
基準の面となる。以上のような処理を、物体を構成する
すべての面に対して行う。この処理によれば、物体を構
成する面がすべて隣接していれば、鋭角的な折れがあっ
たとしても、すべての面の法線ベクトルの方向を揃える
ことができる。
When an adjacent surface is found, the direction of the adjacent surface is made the same as the direction of the reference surface. That is, the directions of the normal vectors on both sides are aligned. A processed surface is marked on the surface on which the process of aligning the directions of the normal vectors is completed, and the processed surface is included in the reference surface. That is, the set of processed surfaces is the reference surface. The above-described processing is performed on all surfaces constituting the object. According to this processing, if all the surfaces constituting the object are adjacent to each other, even if there is a sharp bend, the directions of the normal vectors of all the surfaces can be aligned.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、上記の
ような従来の図形描画装置では、ある面を基準として、
面同士の頂点座標の一致、稜線の一致に基づいて隣り合
う面を見つけるようにしていたため、演算誤差などによ
って、物体を構成するすべての面の内、隣り合っていな
い面(交差、離れなど)が生じてしまった場合には、法
線ベクトルの方向を揃える処理がすべての面に対して実
行されず、すべての面の方向を揃えることができなくな
ってしまうという問題がある。
However, in the conventional graphic drawing apparatus as described above, a certain plane is used as a reference.
Adjacent planes are found based on the coincidence of vertex coordinates and ridge lines of the planes. Therefore, due to arithmetic errors, non-adjacent planes (intersection, separation, etc.) among all the planes that compose the object Has occurred, the process of aligning the direction of the normal vector is not performed on all surfaces, and there is a problem that the directions of all surfaces cannot be aligned.

【0013】また、上記のような従来の図形描画装置で
は、隣り合う面を面同士の頂点座標の一致、稜線の一致
に基づいて順次探し出さなければならなかったため、隣
り合う面を探し出すのに時間がかかるという問題があっ
た。特に、自動車の車体パネルのように自由曲面の数が
大きい大規模な物体では、多大の時間がかかることにな
る。また、面の数が多いと、法線ベクトルの方向を揃え
る処理にも多大な時間がかかる。
Further, in the conventional graphic drawing apparatus as described above, it is necessary to sequentially search for adjacent surfaces based on the coincidence of vertex coordinates of the surfaces and the coincidence of ridge lines. There was a problem that it took time. In particular, a large-scale object having a large number of free-form surfaces, such as a vehicle body panel, takes a lot of time. Also, if the number of surfaces is large, it takes a lot of time to align the directions of the normal vectors.

【0014】本発明は、このような従来の図形描画装置
の問題点を解決するために成されたものであり、物体を
構成する面の表裏方向を高速に、かつ、実用的な精度で
揃えることが可能な、図形表裏設定装置および図形表裏
設定方法の提供を目的とする。
The present invention has been made in order to solve such problems of the conventional graphic drawing apparatus, and aligns the front and back sides of a surface constituting an object at high speed with practical accuracy. It is an object of the present invention to provide a figure front and back setting apparatus and a figure front and back setting method, which are capable of setting.

【0015】[0015]

【課題を解決するための手段】上記した課題を解決し、
目的を達成するため、請求項1に記載の発明にかかる図
形表裏設定装置は、物体を構成する面の面データを入力
する入力手段と、前記面データに基づいて、前記物体を
構成する面の法線ベクトルを作成する面法線ベクトル作
成手段と、前記面データに基づいて、前記物体を構成す
る面を包含する最小体積の直方体、あるいは当該直方体
と相似形状の直方体を作成する直方体作成手段と、作成
された直方体を構成する面のうち、最も面積が大きい面
を選択する最大面積ビュー面選択手段と、選択された面
の基準ベクトルを作成するビュー面基準ベクトル作成手
段と、前記面法線ベクトル作成手段によって作成された
法線ベクトルと前記ビュー面基準ベクトル作成手段によ
って作成された基準ベクトルとの交差角度に基づいて、
前記法線ベクトルの方向を揃える面法線ベクトル揃え手
段とを有することを特徴とする。
[MEANS FOR SOLVING THE PROBLEMS] To solve the above-mentioned problems,
In order to achieve the object, a figure front / back setting apparatus according to the invention according to claim 1 includes input means for inputting surface data of a surface constituting an object, and inputting means for inputting surface data of a surface constituting the object based on the surface data. Surface normal vector creating means for creating a normal vector, and a rectangular parallelepiped creating means for creating, based on the surface data, a rectangular solid having a minimum volume including a surface constituting the object or a rectangular parallelepiped similar to the rectangular solid. A maximum area view plane selecting unit for selecting a plane having the largest area among the planes constituting the created rectangular parallelepiped, a view plane reference vector generating unit for generating a reference vector of the selected plane, and the surface normal Based on the intersection angle between the normal vector created by the vector creation means and the reference vector created by the view plane reference vector creation means,
Surface normal vector aligning means for aligning the direction of the normal vector.

【0016】この請求項1に記載の発明では、法線ベク
トルと基準ベクトルの交差角度にしたがって、その面の
法線ベクトルの方向が正しいか、正しくないかを自動的
に判断し、法線ベクトルの方向を揃えている。したがっ
て、演算誤差などによって、物体を構成するすべての面
の内、隣り合っていない面(交差、離れなど)が生じて
いる場合でも、その面の法線ベクトルの方向を揃えるこ
とができるようになり、また、面の方向を揃えるため
に、面同士の頂点座標の一致、稜線の一致に基づいて、
隣り合う面を順次探し出す必要もなくなる。このため
に、物体を構成する面の表裏方向を高速に、かつ、実用
的な精度で揃えることが可能になる。
According to the first aspect of the present invention, whether the direction of the normal vector on the surface is correct or not is automatically determined according to the intersection angle between the normal vector and the reference vector, and the normal vector is determined. The direction is aligned. Therefore, even if a non-adjacent surface (intersection, separation, etc.) of all the surfaces constituting the object occurs due to an arithmetic error or the like, the direction of the normal vector of the surface can be aligned. In addition, in order to align the directions of the faces, based on the matching of the vertex coordinates of the faces,
There is no need to search for adjacent surfaces in order. For this reason, it is possible to align the front and back directions of the surface constituting the object at high speed and with practical accuracy.

【0017】請求項2に記載の発明にかかる図形表裏設
定装置は、請求項1に記載の図形表裏設定装置におい
て、前記直方体作成手段は、直方体を構成する各辺が、
3次元直交座標系のX軸、Y軸、Z軸のいずれかの軸に
平行になるように、前記最小体積の直方体、あるいは当
該直方体と相似形状の直方体を作成することを特徴とす
る。
According to a second aspect of the present invention, in the graphic front and back setting apparatus according to the first aspect, the rectangular parallelepiped creating means includes:
A rectangular parallelepiped having the minimum volume or a rectangular parallelepiped similar to the rectangular parallelepiped is created so as to be parallel to any one of the X axis, the Y axis, and the Z axis of the three-dimensional rectangular coordinate system.

【0018】この請求項2に記載の発明では、面の方向
を揃えるための基準方向を、X、Y、Zの3軸に平行な
方向に限定しているので、基準方向の選択を容易に行う
ことができ、面の表裏方向を揃える処理の高速化を図る
ことができる。
According to the second aspect of the present invention, since the reference direction for aligning the directions of the surfaces is limited to the directions parallel to the three axes of X, Y and Z, the selection of the reference direction is easy. The speed of the process for aligning the front and back surfaces can be increased.

【0019】請求項3に記載の発明にかかる図形表裏設
定装置は、請求項1に記載の図形表裏設定装置におい
て、前記ビュー面基準ベクトル作成手段は、前記最大面
積ビュー面選択手段によって選択された面が、X、Yビ
ュー、Y、Zビュー、Z、Xビューのいずれから見た面
であるのかを判断し、X、Yビューであれば、+Zの方
向を基準ベクトルの方向に設定し、Y、Zビューであれ
ば、前記選択された面の凸方向を判断して凸方向である
+Xまたは−Xの方向を基準ベクトルの方向に設定し、
Z、Xビューであれば、+Yの方向を基準ベクトルの方
向に設定することを特徴とする。
According to a third aspect of the present invention, in the graphic front and back setting apparatus according to the first aspect, the view plane reference vector creating means is selected by the maximum area view plane selecting means. It is determined whether the plane is viewed from any of the X, Y views, Y, Z views, Z, and X views. If the plane is an X, Y view, the direction of + Z is set as the direction of the reference vector, If the view is a Y or Z view, the convex direction of the selected surface is determined, and the direction of + X or -X, which is the convex direction, is set as the direction of the reference vector,
In the case of the Z and X views, the direction of + Y is set to the direction of the reference vector.

【0020】請求項3に記載の発明では、X、Y、Zの
3軸のいずれかの方向を、面を揃える方向として選択し
ているので、実用的な精度で面の方向を揃えることがで
きる。車体パネルは、X、Y、Zの軸平行な方向のビュ
ー(X、Yビュー、Y、Zビュー、Z、Xビュー)のう
ちのいずれかから見れば、車体パネルの構成面は、ほと
んど重なることなく見ることができるからである。
According to the third aspect of the present invention, any one of the three axes of X, Y, and Z is selected as the direction for aligning the surfaces, so that the directions of the surfaces can be aligned with practical accuracy. it can. When viewed from any of the views (X, Y view, Y, Z view, Z, X view) in the direction parallel to the X, Y, and Z axes, the constituent surfaces of the body panel almost overlap. Because you can see it without any.

【0021】請求項4に記載の発明にかかる図形表裏設
定装置は、請求項1に記載の図形表裏設定装置におい
て、前記ビュー面基準ベクトル作成手段は、前記最大面
積ビュー面選択手段によって選択された面の面積に基づ
いて、前記物体が大物部品であるか、小物部品であるか
を判断し、小物部品であれば、前記選択された面の凸方
向を判断して凸方向であるX、Y、Zのいずれかの+ま
たは−方向を基準ベクトルの方向に設定することを特徴
とする。
According to a fourth aspect of the present invention, in the graphic front and back setting apparatus according to the first aspect, the view plane reference vector creating means is selected by the maximum area view plane selecting means. Based on the area of the surface, it is determined whether the object is a large part or a small part. If the object is a small part, the convex direction of the selected surface is determined by determining the convex direction of X, Y. , Z are set in the direction of the reference vector.

【0022】請求項4に記載の発明では、面の方向を揃
えるための基準の方向(表側の方向)を車体パネルの大
きさや形状の特徴によって決定している。車体パネルの
場合、大物部品は形状の特徴よりもビューで、小物部品
はビューよりも形状の特徴で表裏を判断するのが望まし
い。このような判断に基づいて面の方向を決定すれば、
どのような部品でも確実に面の方向を判定することがで
きる。
According to the fourth aspect of the present invention, the reference direction (front side direction) for aligning the directions of the surfaces is determined by characteristics of the size and shape of the vehicle body panel. In the case of a vehicle body panel, it is desirable to determine the front and back of a large component by a view rather than a feature of the shape, and to determine a small component by the feature of the shape than the view. If the direction of the surface is determined based on such judgment,
The direction of the surface can be reliably determined for any part.

【0023】請求項5に記載の発明にかかる図形表裏設
定装置は、請求項1に記載の図形表裏設定装置におい
て、前記面法線ベクトル揃え手段は、法線ベクトルと基
準ベクトルとの交差角度が90度を超えていれば前記法
線ベクトルの方向を180度反転させ、90度以下であ
れば前記法線ベクトルの方向をそのままとすることを特
徴とする。
According to a fifth aspect of the present invention, there is provided the graphic front and back setting apparatus according to the first aspect, wherein the plane normal vector aligning means is arranged so that the intersection angle between the normal vector and the reference vector is equal to or smaller than the normal angle. If it exceeds 90 degrees, the direction of the normal vector is inverted by 180 degrees, and if it is 90 degrees or less, the direction of the normal vector is kept as it is.

【0024】請求項5に記載の発明では、隣接する面の
表裏とは無関係に、法線ベクトルと基準ベクトルとの交
差角度によって、その面の法線ベクトルの方向が正しい
か、正しくないかを自動的に判断し、法線ベクトルの方
向を揃えている。したがって、演算誤差などによって、
物体を構成するすべての面の内、隣り合っていない面
(交差、離れなど)が生じている場合でも、その面の法
線ベクトルの方向を揃えることができるようになり、ま
た、面の表裏方向を揃えるために、面同士の頂点座標の
一致、稜線の一致に基づいて、隣り合う面を順次探し出
す必要もなくなる。このために、物体を構成する面の表
裏方向を高速に、かつ、実用的な精度で揃えることが可
能になる。
According to the fifth aspect of the present invention, whether the direction of the normal vector of the surface is correct or not is determined by the intersection angle between the normal vector and the reference vector regardless of the front and back of the adjacent surface. Judgment is made automatically and the direction of the normal vector is aligned. Therefore, due to calculation errors, etc.
Even when non-adjacent planes (intersection, separation, etc.) occur among all the planes that compose the object, the direction of the normal vector of the plane can be aligned, and the front and back of the plane can be aligned. In order to align the directions, it is not necessary to sequentially search for adjacent surfaces based on the coincidence of vertex coordinates of surfaces and the coincidence of ridge lines. For this reason, it is possible to align the front and back directions of the surface constituting the object at high speed and with practical accuracy.

【0025】請求項6に記載の発明にかかる図形表裏設
定方法は、物体を構成する面の面データを入力する段階
と、前記面データに基づいて、前記物体を構成する面の
法線ベクトルを作成する段階と、前記面データに基づい
て、前記物体を構成する面を包含する最小体積の直方
体、あるいは当該直方体と相似形状の直方体を作成する
段階と、作成された直方体を構成する面のうち、最も面
積が大きい面を選択する段階と、選択された面の基準ベ
クトルを作成する段階と、作成された法線ベクトルと基
準ベクトルとの交差角度に基づいて、前記法線ベクトル
の方向を揃える段階とを含むことを特徴とする。
According to a sixth aspect of the present invention, there is provided a graphic front / back setting method, comprising the steps of inputting surface data of a surface forming an object, and obtaining a normal vector of a surface forming the object based on the surface data. Creating, and, based on the surface data, creating a rectangular solid having a minimum volume including the surface constituting the object, or creating a rectangular parallelepiped having a shape similar to the rectangular solid, and a surface constituting the created rectangular solid Selecting a plane having the largest area, creating a reference vector of the selected face, and aligning the directions of the normal vectors based on the intersection angle between the created normal vector and the reference vector. And a step.

【0026】この請求項6に記載の発明では、法線ベク
トルと基準ベクトルの交差角度にしたがって、その面の
法線ベクトルの方向が正しいか、正しくないかを自動的
に判断し、法線ベクトルの方向を揃えている。したがっ
て、演算誤差などによって、物体を構成するすべての面
の内、隣り合っていない面(交差、離れなど)が生じて
いる場合でも、その面の法線ベクトルの方向を揃えるこ
とができるようになり、また、面の表裏方向を揃えるた
めに、面同士の頂点座標の一致、稜線の一致に基づい
て、隣り合う面を順次探し出す必要もなくなる。このた
めに、物体を構成する面の表裏方向を高速に、かつ、実
用的な精度で揃えることが可能になる。
According to the present invention, whether the direction of the normal vector on the surface is correct or not is automatically determined according to the intersection angle between the normal vector and the reference vector, and the normal vector is determined. The direction is aligned. Therefore, even if a non-adjacent surface (intersection, separation, etc.) of all the surfaces constituting the object occurs due to an arithmetic error or the like, the direction of the normal vector of the surface can be aligned. In addition, in order to align the front and back directions of the surfaces, it is not necessary to sequentially search for adjacent surfaces based on the coincidence of vertex coordinates of the surfaces and the coincidence of ridge lines. For this reason, it is possible to align the front and back directions of the surface constituting the object at high speed and with practical accuracy.

【0027】[0027]

【発明の効果】以上説明したように、請求項1に記載の
発明によれば、演算誤差などによって、物体を構成する
すべての面の内、隣り合っていない面(交差、離れな
ど)が生じている場合でも、その面の法線ベクトルの方
向を揃えることができるようになり、また、面の表裏方
向を揃えるために、面同士の頂点座標の一致、稜線の一
致に基づいて、隣り合う面を順次探し出す必要もなくな
る。このために、物体を構成する面の表裏方向を高速
に、かつ、実用的な精度で揃えることが可能になるとい
う効果を奏する。
As described above, according to the first aspect of the present invention, non-adjacent planes (intersection, separation, etc.) of all the planes constituting an object occur due to an arithmetic error or the like. Even if it is, it becomes possible to align the direction of the normal vector of the surface, and to align the front and back direction of the surface, adjacent to each other based on the matching of vertex coordinates of the surfaces and the matching of ridge lines There is no need to search for faces one after another. For this reason, there is an effect that the front and back directions of the surface constituting the object can be aligned at high speed and with practical accuracy.

【0028】請求項2に記載の発明によれば、面の方向
を揃えるための基準方向を、X、Y、Zの3軸に平行な
方向に限定しているので、基準方向の選択を容易に行う
ことができ、面の表裏方向を揃える処理の高速化を図る
ことができるという効果を奏する。
According to the second aspect of the present invention, since the reference direction for aligning the directions of the surfaces is limited to the directions parallel to the three axes of X, Y, and Z, the selection of the reference direction is easy. And the speed of the process of aligning the front and back sides of the surface can be increased.

【0029】請求項3に記載の発明によれば、X、Y、
Zの3軸のいずれかの方向を、面を揃える方向として選
択しているので、実用的な精度で面の方向を揃えること
ができるという効果を奏する。
According to the third aspect of the present invention, X, Y,
Since any one of the three axes of Z is selected as the direction in which the surfaces are aligned, there is an effect that the directions of the surfaces can be aligned with practical accuracy.

【0030】請求項4に記載の発明によれば、面の方向
を揃えるための基準の方向(表側の方向)を車体パネル
の大きさや形状の特徴によって決定しているので、どの
ような部品でも確実に面の方向を判定することができ
る。
According to the fourth aspect of the present invention, the reference direction (front side direction) for aligning the directions of the surfaces is determined by the size and shape characteristics of the vehicle body panel. The direction of the surface can be reliably determined.

【0031】請求項5に記載の発明によれば、隣接する
面の表裏とは無関係に、法線ベクトルと基準ベクトルと
の交差角度によって、その面の法線ベクトルの方向が正
しいか、正しくないかを自動的に判断し、法線ベクトル
の方向を揃えているので、物体を構成する面の表裏方向
を高速に、かつ、実用的な精度で揃えることが可能にな
る。
According to the fifth aspect of the present invention, the direction of the normal vector of the surface is correct or incorrect depending on the intersection angle between the normal vector and the reference vector regardless of the front and back of the adjacent surface. Since the direction is automatically determined and the direction of the normal vector is aligned, it is possible to align the front and back directions of the surface constituting the object at high speed and with practical accuracy.

【0032】請求項6に記載の発明によれば、演算誤差
などによって、物体を構成するすべての面の内、隣り合
っていない面(交差、離れなど)が生じている場合で
も、その面の法線ベクトルの方向を揃えることができる
ようになり、また、面同士の頂点座標の一致、稜線の一
致に基づいて、隣り合う面を順次探し出す必要もなくな
る。このために、物体を構成する面の表裏方向を高速
に、かつ、実用的な精度で揃えることが可能になるとい
う効果を奏する。
According to the sixth aspect of the present invention, even if non-adjacent planes (intersection, separation, etc.) of all the planes constituting an object are generated due to an arithmetic error or the like, the planes are not affected. The direction of the normal vector can be made uniform, and it is not necessary to sequentially search for adjacent faces based on the coincidence of vertex coordinates of faces and the coincidence of edges. For this reason, there is an effect that the front and back directions of the surface constituting the object can be aligned at high speed and with practical accuracy.

【0033】[0033]

【発明の実施の形態】以下に添付図面を参照して、本発
明にかかる図形表裏設定装置および図形表裏設定方法の
好適な実施の形態を詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of a figure front / back setting apparatus and a figure front / back setting method according to the present invention will be described below in detail with reference to the accompanying drawings.

【0034】図1は、本発明にかかる図形表裏設定装置
の概略構成を示すブロック図である。本発明にかかる図
形表裏設定装置は、たとえば、3次元コンピュータグラ
フィックス描画装置や3次元CADなどの図形描画装置
内に設置される。
FIG. 1 is a block diagram showing a schematic configuration of a figure front / back setting apparatus according to the present invention. The figure front / back setting apparatus according to the present invention is installed in a figure drawing apparatus such as a three-dimensional computer graphics drawing apparatus or a three-dimensional CAD.

【0035】データ入力部10は、物体を構成する面の
面データ(たとえば、頂点座標データ、稜線に関するデ
ータ)を入力し、入力した面データを、後段の直方体作
成部11と面法線ベクトル作成部12に出力する。
The data input unit 10 receives surface data (for example, vertex coordinate data and data relating to ridge lines) of a surface constituting an object, and inputs the input surface data to a subsequent rectangular parallelepiped forming unit 11 and a surface normal vector forming unit. Output to the unit 12.

【0036】直方体作成部11は、データ入力部10か
ら出力された面データから、その面データで構成される
物体を包含する、最も体積の小さな直方体、あるいは当
該直方体と相似形状の直方体を作成する。なお、直方体
作成部11は、その直方体を構成する各辺が、3次元直
交座標系のX軸、Y軸、Z軸のいずれかの軸に平行にな
るように直方体を作成する。たとえば、物体が図2の車
体パネル20であれば、図3のように、その車体パネル
20を包含する直方体30を作成する。車体パネル20
に関するデータと作成された直方体30に関するデータ
は、後段のビュー面面積演算部13に送られる。
The rectangular parallelepiped creating section 11 creates, from the plane data output from the data input section 10, a rectangular parallelepiped having the smallest volume or an analogous shape to the rectangular parallelepiped including the object constituted by the plane data. . The rectangular parallelepiped creating unit 11 creates a rectangular parallelepiped such that each side constituting the rectangular parallelepiped is parallel to any one of the X axis, the Y axis, and the Z axis of the three-dimensional orthogonal coordinate system. For example, if the object is the vehicle body panel 20 of FIG. 2, a rectangular parallelepiped 30 including the vehicle body panel 20 is created as shown in FIG. Body panel 20
The data relating to the rectangular parallelepiped 30 and the data relating to the created rectangular parallelepiped 30 are sent to the view surface area calculation unit 13 at the subsequent stage.

【0037】面法線ベクトル作成部12は、データ入力
部10から出力された面データから、その面の中心付近
(中心付近でなくても良いが)の法線ベクトルを、たと
えば、特開平5−67219号公報にも開示されている
ような従来の方法で作成する。面の法線ベクトルの方向
は、その面の表裏を表す。たとえば、法線ベクトルの方
向がその面から外側に向かう方向であれば、その面は光
線の当たる表の面であり、逆に、法線ベクトルの方向が
その面に向かう方向であれば、その面は光線の当たらな
い裏の面である。
The surface normal vector creating unit 12 calculates a normal vector near the center of the surface (although not necessarily near the center) from the surface data output from the data input unit 10 according to, for example, It is created by a conventional method as disclosed in Japanese Unexamined Patent Publication No. 67219/67. The direction of the normal vector of a surface represents the front and back of the surface. For example, if the direction of the normal vector is outward from the surface, the surface is the surface on which the light beam hits. Conversely, if the direction of the normal vector is direction toward the surface, The surface is the back surface that does not hit the light beam.

【0038】ビュー面面積演算部13は、直方体作成部
11によって作成された直方体30の各頂点の座標デー
タに基づいて、図4のように、各ビュー(X、Y、Zの
3方向)から見た、直方体30を構成する3つの面
(a、b、c)の面積を求める。求めたそれぞれの面の
面積は、後段の最大面積ビュー面選択部14に送られ
る。
As shown in FIG. 4, the view surface area calculation unit 13 calculates the coordinates of each vertex of the rectangular parallelepiped 30 created by the rectangular parallelepiped creation unit 11 from each view (three directions of X, Y, and Z). The areas of the three surfaces (a, b, c) constituting the rectangular parallelepiped 30 are determined. The determined area of each plane is sent to the maximum area view plane selection unit 14 in the subsequent stage.

【0039】最大面積ビュー面選択部14は、ビュー面
面積演算部13から送られてきた3つの面(a、b、
c)の面積の内、最も面積の大きい面を選択し、その面
がどのビューから見たものであるかを判断する。ビュー
面面積演算部13から送られてきた3つの面(a、b、
c)の面積が図4に示すようなものであれば、最大面積
ビュー面選択部14は、最も面積が大きいbの面を選択
し、bの面は、YZビューから見た面であると判断す
る。選択された面の面積と、判断されたビューは、後段
のビュー面基準ベクトル作成部15に送られる。
The maximum area view plane selection unit 14 receives the three planes (a, b,
A surface having the largest area is selected from the areas in c), and it is determined from which view the surface is viewed. The three planes (a, b, and
If the area c) is as shown in FIG. 4, the maximum area view plane selecting unit 14 selects the plane b having the largest area, and the plane b is the plane viewed from the YZ view. to decide. The area of the selected plane and the determined view are sent to the view plane reference vector creation unit 15 in the subsequent stage.

【0040】ビュー面基準ベクトル作成部15は、最大
面積ビュー面選択部14から送られてきた面の面積に基
づいて、その物体が大物部品であるか、大物部品でない
かを判断する。大物部品であるか、大物部品でないかの
判断は、たとえば面の面積が1m2よりも大きいか、小
さいかによって行う。大物部品と判断されたときには、
最大面積ビュー面選択部14から送られてきたビューに
基づいて、基準ベクトルを作成する。なお、基準ベクト
ルの方向は、X軸、Y軸、Z軸のいずれかの軸に沿う方
向である。また、大物部品でないと判断されたときに
は、直方体作成部11が持っている、その物体の面デー
タを入力し、その面データに基づいて、その物体が最大
面積ビュー面選択部14から送られてきたビューのどち
ら側(手前側、奥側)に凸であるかが判断され、その判
断に基づいて基準ベクトルを作成する。作成された基準
ベクトルは、後段の面法線ベクトル揃え部16に送られ
る。
The view plane reference vector creation unit 15 determines whether the object is a large part or not, based on the area of the plane sent from the maximum area view plane selection unit 14. The determination as to whether the component is a large component or not is made based on, for example, whether the surface area is larger or smaller than 1 m 2 . When it is judged as a big part,
Based on the view sent from the maximum area view plane selection unit 14, a reference vector is created. Note that the direction of the reference vector is a direction along any one of the X axis, the Y axis, and the Z axis. When it is determined that the object is not a large part, the plane data of the object held by the rectangular parallelepiped creation unit 11 is input, and the object is sent from the maximum area view plane selection unit 14 based on the plane data. It is determined which side (front side, back side) of the view is convex, and a reference vector is created based on the determination. The created reference vector is sent to the subsequent surface normal vector alignment unit 16.

【0041】面法線ベクトル揃え部16は、ビュー面基
準ベクトル作成部15によって作成された任意の面の基
準ベクトルと、面法線ベクトル作成部12によって作成
されたその面の法線ベクトルとが成す角度を求める。そ
の角度が90度よりも大きければ、その面に対する表裏
の判断が逆である可能性が高いので、その面の法線ベク
トルの向きを180度反転させる。法線ベクトルの向き
が揃えられた後の法線ベクトルの方向に関するデータお
よびその面の面データは、データ出力部17に送られ
る。
The surface normal vector alignment unit 16 compares the reference vector of an arbitrary surface created by the view surface reference vector creation unit 15 with the normal vector of the surface created by the surface normal vector creation unit 12. Find the angle formed. If the angle is greater than 90 degrees, there is a high possibility that the determination of the front and back of the surface is reversed, so the direction of the normal vector of the surface is reversed by 180 degrees. The data on the direction of the normal vector after the direction of the normal vector is aligned and the surface data of the surface are sent to the data output unit 17.

【0042】データ出力部17は、送られてきた、法線
ベクトルの方向に関するデータおよび面データを外部に
出力する。
The data output unit 17 outputs the transmitted data relating to the direction of the normal vector and the plane data to the outside.

【0043】図形表裏設定装置を構成する各ブロックの
概略の機能は以上のとおりである。つぎに、図5および
図6のフローチャートに基づいて、図形表裏設定装置の
一連の動作を具体的に説明する。
The schematic functions of each block constituting the figure front / back setting device are as described above. Next, a series of operations of the figure front / back setting apparatus will be specifically described based on the flowcharts of FIGS.

【0044】図形表裏設定装置の動作には、大きく分け
て2つの動作がある。1つは、物体を構成する各面の形
状を調べて、各面の基準ベクトルの方向を求める第1の
処理である。そしてもう1つは、求めた基準ベクトルの
方向から、各面の法線ベクトルの方向を揃える第2の処
理である。
The operation of the figure front / back setting device is roughly divided into two operations. One is a first process of examining the shape of each surface constituting the object and obtaining the direction of the reference vector of each surface. The other is a second process for aligning the direction of the normal vector of each surface from the direction of the obtained reference vector.

【0045】第1の処理は、図5のフローチャートに示
されている処理であり、図1に示した、直方体作成部1
1、ビュー面面積演算部13、最大面積ビュー面選択部
14およびビュー面基準ベクトル作成部15によって実
行される。
The first process is a process shown in the flowchart of FIG. 5, and is performed by the rectangular parallelepiped forming unit 1 shown in FIG.
1, executed by the view plane area calculation unit 13, the maximum area view plane selection unit 14, and the view plane reference vector creation unit 15.

【0046】第2の処理は、図6のフローチャートに示
されている処理であり、図1に示した、面法線ベクトル
作成部12、面法線ベクトル揃え部16によって実行さ
れる。
The second process is a process shown in the flowchart of FIG. 6, and is executed by the surface normal vector creating unit 12 and the surface normal vector aligning unit 16 shown in FIG.

【0047】まず、第1の処理について説明する。この
処理は、図5に示してあるフローチャートの手順で実行
される。ここでは、処理の対象となる物体を、図2に示
した車体パネル20とする。
First, the first process will be described. This process is executed according to the procedure of the flowchart shown in FIG. Here, the object to be processed is the vehicle body panel 20 shown in FIG.

【0048】データ入力部10は、車体パネル20の面
データ(たとえば、頂点座標データ、稜線に関するデー
タ)を入力し、この面データを、後段の直方体作成部1
1と面法線ベクトル作成部12に出力する。直方体作成
部11は、データ入力部10から出力された面データか
ら、車体パネル20を包含する、最も体積の小さな直方
体(あるいは、当該直方体と相似形状の直方体)30
(図3参照)を作成する。なお、本実施の形態では、座
標系は、図3に示すように幅方向をX、長さ方向をY、
高さ方向をZとする3次元の直交座標系を用いている。
座標系は、この直交座標系以外に、極座標系、円筒座標
系を用いても良い(S1)。
The data input unit 10 receives surface data (for example, vertex coordinate data and data relating to ridge lines) of the vehicle body panel 20 and inputs the surface data to the subsequent rectangular parallelepiped forming unit 1.
1 and output to the surface normal vector creation unit 12. Based on the surface data output from the data input unit 10, the rectangular parallelepiped creating unit 11 includes a rectangular parallelepiped having the smallest volume (or a rectangular parallelepiped similar to the rectangular parallelepiped) including the vehicle body panel 20.
(See FIG. 3). In the present embodiment, the coordinate system has a width direction of X, a length direction of Y, and a length direction of Y, as shown in FIG.
A three-dimensional orthogonal coordinate system in which the height direction is Z is used.
As the coordinate system, a polar coordinate system or a cylindrical coordinate system may be used in addition to the rectangular coordinate system (S1).

【0049】つぎに、ビュー面面積演算部13は、直方
体作成部11によって作成された直方体30の8つの頂
点の座標から、図4のように、各ビュー(X、Y、Zの
3方向)から見た、直方体30を構成する3つの面
(a、b、c)それぞれの面積を求める。(S2)。
Next, as shown in FIG. 4, the view surface area calculation unit 13 calculates each view (three directions of X, Y, Z) from the coordinates of the eight vertices of the rectangular solid 30 created by the rectangular solid creation unit 11. , The area of each of the three surfaces (a, b, c) constituting the rectangular parallelepiped 30 is determined. (S2).

【0050】最大面積ビュー面選択部14は、ビュー面
面積演算部13から送られてきた3つの面(a、b、
c)それぞれの面積の内、最も面積の大きい面を選択
し、その面がどのビューから見たものであるかを判断す
る。ビュー面面積演算部13から送られてきた3つの面
(a、b、c)の面積の大きさが、図4に示すようなも
のであれば、最大面積ビュー面選択部14は、最も面積
が大きいbの面を選択し、bの面は、YZビューから見
た面であると判断する。このように、最も大きな面積の
面を、基準ベクトルを作成するための候補として選択す
るのは、車体パネル20の場合、面積の大きい面が通常
は表面または裏面となる可能性が高いからである(S
3)。
The maximum area view plane selection unit 14 receives the three planes (a, b,
c) Among the respective areas, a plane having the largest area is selected, and it is determined from which view the plane is viewed. If the size of the three planes (a, b, c) sent from the view plane area calculation unit 13 is as shown in FIG. 4, the maximum area view plane selection unit 14 determines Is selected, and the surface b is determined to be the surface viewed from the YZ view. The reason why the plane having the largest area is selected as a candidate for creating the reference vector is that, in the case of the vehicle body panel 20, the plane having the larger area is usually likely to be the front surface or the back surface. (S
3).

【0051】ビュー面基準ベクトル作成部15は、最大
面積ビュー面選択部14から送られてきた面の面積か
ら、その物体が大物部品であるか、大物部品でないかを
判断する。大物部品であるか、大物部品でないかの判断
は、たとえば面の面積が1m2よりも大きいか、小さい
かによって行われる(S4)。
The view plane reference vector creation unit 15 determines whether the object is a large part or not, based on the area of the plane sent from the maximum area view plane selection unit 14. The determination as to whether the component is a large component or not is made based on, for example, whether the surface area is larger or smaller than 1 m 2 (S4).

【0052】大物部品であると判断されたときには、ビ
ュー面基準ベクトル作成部15は、最大面積ビュー面選
択部14から送られてきたビューを調べる(S5)。
If it is determined that the part is a large part, the view plane reference vector creation unit 15 checks the view sent from the maximum area view plane selection unit 14 (S5).

【0053】判断されたビューが平面ビュー(X、Yビ
ュー)であれば、+Z方向を基準ベクトルに設定する。
図4でみれば、面cが選択された場合であり、基準ベク
トルBcは、cの面から上に離れる方向に設定される
(S6)。一方、認識されたビューが側面ビュー(Y、
Zビュー)であれば、さらに、車体パネル20の面デー
タから、車体パネル20を構成するすべての面のX座標
の平均値を求め(S7)、求めた平均値が正の値であれ
ば(S8)、+X方向を基準ベクトルに設定する(S
9)。一方、求めた平均値が負の値であれば(S8)、
−X方向を基準ベクトルに設定する(S10)。このよ
うに、X座標の平均値が+か−かを求めるのは、車体パ
ネル20がどちらの方向に凸形状になっているかを判断
するためである。また、X座標の平均値が+か−かによ
って基準ベクトルの方向を決めているのは、車体パネル
20の場合、一般的に、凸形状になっている方が表側と
なる可能性が高いからである。さらに、認識されたビュ
ーが正面ビュー(Z、Xビュー)であれば、+Y方向を
基準ベクトルに設定する。図4でみれば、面aが選択さ
れた場合であり、基準ベクトルBaは、aの面から離れ
る方向(車両の後ろ方向)に設定される(S11)。
If the determined view is a plane view (X, Y view), the + Z direction is set as a reference vector.
FIG. 4 shows a case where the plane c is selected, and the reference vector Bc is set in a direction away from the plane of the c upward (S6). On the other hand, the recognized view is a side view (Y,
(Z view), the average value of the X coordinates of all the surfaces constituting the vehicle body panel 20 is obtained from the surface data of the vehicle body panel 20 (S7), and if the obtained average value is a positive value (S7). S8), + X direction is set as a reference vector (S8)
9). On the other hand, if the obtained average value is a negative value (S8),
-Set the X direction as a reference vector (S10). The reason for determining whether the average value of the X coordinate is + or-is to determine in which direction the vehicle body panel 20 has a convex shape. The reason why the direction of the reference vector is determined depending on whether the average value of the X coordinate is + or-is that, in the case of the vehicle body panel 20, generally, the convex side is more likely to be the front side. It is. Further, if the recognized view is the front view (Z, X view), the + Y direction is set as the reference vector. Referring to FIG. 4, this is the case where plane a is selected, and the reference vector Ba is set in a direction away from the plane of a (backward direction of the vehicle) (S11).

【0054】大物部品でないと判断されたときには(S
4)、ビュー面基準ベクトル作成部15は、直方体作成
部11が持っている、車体パネル20の面データを入力
し、その面データに基づいて、最大面積ビュー面選択部
14から送られてきたビューのどちら側(手前側、奥
側)に凸であるかが判断され、その判断に基づいて基準
ベクトルを作成する。どちら側に凸であるかの判断は、
S8からS10のステップの説明と同じく、車体パネル
20を構成するすべての面のX座標の平均値が+か−か
を求めることによって行う(S12)。求めた平均値が
正の値であれば、+X方向を基準ベクトルに設定する。
一方、求めた平均値が負の値であれば、−X方向を基準
ベクトルに設定する。つまり、凸形状になっている方の
面が表側になるように基準ベクトルを設定する(S1
3)。
When it is determined that the component is not a large part (S
4) The view plane reference vector creation unit 15 inputs the plane data of the vehicle body panel 20 of the rectangular parallelepiped creation unit 11 and is sent from the maximum area view plane selection unit 14 based on the plane data. It is determined which side (front side or back side) of the view is convex, and a reference vector is created based on the determination. To determine which side is convex,
As in the description of the steps from S8 to S10, the determination is made by determining whether the average value of the X coordinates of all the surfaces constituting the vehicle body panel 20 is + or-(S12). If the obtained average value is a positive value, the + X direction is set as the reference vector.
On the other hand, if the obtained average value is a negative value, the −X direction is set as the reference vector. That is, the reference vector is set such that the surface having the convex shape is on the front side (S1).
3).

【0055】車体パネル20の場合、ほとんどは金型プ
レスで形成されるため、形状の特徴を単品で見ると、ど
ちらかの側が膨らんでいて、閉じているものはほとんど
ない。また、車体パネル20は、その膨らんでいる面の
方を外側にして組みつけられる場合が一般的であり、膨
らんでいる面の方を表になるように基準ベクトルを設定
したほうが面の抜けが生じる確率が少なくなる。ただ
し、このような基準ベクトルの設定を、すべてのパネル
に対して適用してしまうと、たとえば、ホイールハウス
系やフロアー系のパネルでは、必ずしも面の抜けが生じ
る確率が少なくなるとは限らなくなる。また、一般に、
大物と呼ばれる部品は、前述のように、ビューによって
表の方向を決定しても、面の抜けが生じる確率は少な
い。このように、車体部品の特性を考慮して面の表の方
向を決定すれば、本来は表と判断されるべき面が間違っ
て裏と判断されることが少なくなり、現実的な方向の決
定ができるようになる。
In the case of the vehicle body panel 20, most of the shape is formed by a die press. Therefore, when the features of the shape are viewed as a single product, either side is swelled and there is almost no closed one. In addition, the body panel 20 is generally assembled with its bulging surface facing outward, and setting the reference vector so that the bulging surface becomes the front will make the surface drop out. The probability of occurrence is reduced. However, if the setting of such a reference vector is applied to all panels, for example, in a wheel house system or a floor system panel, the probability of occurrence of a surface drop does not always decrease. Also, in general,
As described above, even if the direction of the table is determined by the view, there is little possibility that a part called a big one will lose a surface. As described above, if the direction of the front side of the surface is determined in consideration of the characteristics of the body parts, the surface that should be originally determined to be the front side is less likely to be erroneously determined to be the back side, and the realistic direction is determined. Will be able to

【0056】つぎに、第2の処理について説明する。こ
の処理は、図6に示してあるフローチャートの手順で実
行される。
Next, the second process will be described. This process is executed according to the procedure of the flowchart shown in FIG.

【0057】面法線ベクトル作成部12は、データ入力
部10から出力された面データから、1つの面に相当す
る面データを入手し、その面の中心付近の法線ベクトル
を、たとえば、特開平5−67219号公報にも開示さ
れているような従来の方法で作成する。なお、中心付近
の法線ベクトルを求めるのは、車体パネル20の場合、
たとえば90度以上の角度で曲がっているような、極端
に曲がった曲面を有していることはほとんど考えられな
いからであり、中心付近の法線ベクトルを求めれば、ほ
とんどの場合、車体パネル20の面の方向を特定するこ
とができるからである。面の法線ベクトルの方向は、そ
の面の表裏を表す。たとえば、法線ベクトルの方向がそ
の面から外側に向かう方向であれば、その面は光線の当
たる表の面となり、逆に、法線ベクトルの方向がその面
に向かう方向であれば、その面は光線の当たらない裏の
面となる(S21)。
The surface normal vector creating unit 12 obtains surface data corresponding to one surface from the surface data output from the data input unit 10, and obtains a normal vector near the center of the surface, for example, It is prepared by a conventional method as disclosed in Japanese Unexamined Patent Publication No. Hei 5-67219. The normal vector near the center is determined by the case of the vehicle body panel 20.
This is because it is hardly conceivable to have an extremely curved surface, such as a curve at an angle of 90 degrees or more. This is because the direction of the surface can be specified. The direction of the normal vector of a surface represents the front and back of the surface. For example, if the direction of the normal vector goes outward from the surface, the surface becomes the surface of the table hit by the light beam. Conversely, if the direction of the normal vector goes to the surface, the surface becomes the surface. Is the back surface that does not hit the light beam (S21).

【0058】つぎに、面法線ベクトル揃え部16は、面
法線ベクトル作成部12によって作成された任意の面の
法線ベクトルと、図5に示した、第1の処理で求められ
たその面の基準ベクトル(X、Y、Zの3方向のいずれ
か)とが成す角度を求める。つまり、ある面の法線ベク
トルと基準ベクトルとの交差角度を求める(S22)。
Next, the surface normal vector alignment unit 16 compares the normal vector of an arbitrary surface created by the surface normal vector creation unit 12 with the normal vector obtained in the first process shown in FIG. An angle formed between the plane and a reference vector (any one of three directions of X, Y, and Z) is obtained. That is, the intersection angle between the normal vector of a certain surface and the reference vector is obtained (S22).

【0059】面法線ベクトル揃え部16は、求めた交差
角度が90度を超える場合には(S23)、面法線ベク
トル作成部12によって作成された法線ベクトルの方向
が反対であると判断し、その法線ベクトルの向きを18
0度反転させる。つまり、その面の表方向と判断された
方向を、裏方向と判断させるようにする(S24)。一
方、求めた交差角度が90度よりも小さければ(S2
3)、作成された法線ベクトルの方向は正しいと判断
し、法線ベクトルの方向はそのままにする(S24)。
If the determined intersection angle exceeds 90 degrees (S23), the surface normal vector alignment unit 16 determines that the directions of the normal vectors created by the surface normal vector creation unit 12 are opposite. And the direction of the normal vector is 18
Invert 0 degrees. That is, the direction determined to be the front direction of the surface is determined to be the back direction (S24). On the other hand, if the obtained intersection angle is smaller than 90 degrees (S2
3), it is determined that the direction of the created normal vector is correct, and the direction of the normal vector is left as it is (S24).

【0060】以上の処理は、車体パネル20を構成する
すべての面について1面ずつ行われる。
The above processing is performed for each of all the surfaces constituting the vehicle body panel 20 one by one.

【0061】このように、本実施の形態では、法線ベク
トルと基準ベクトルの交差角度にしたがって、その面の
法線ベクトルの方向が正しいか、正しくないかを自動的
に判断し、法線ベクトルの方向を揃えるようにしたの
で、演算誤差などによって、物体を構成するすべての面
の内、隣り合っていない面(交差、離れなど)が生じて
いる場合でも、その面の法線ベクトルの方向を揃えるこ
とができるようになり、また、面の表裏を揃えるため
に、面同士の頂点座標の一致、稜線の一致に基づいて、
隣り合う面を順次探し出す必要もなくなる。このため、
物体を構成する面の表裏方向を高速に、かつ、実用的な
精度で揃えることが可能になる。
As described above, in the present embodiment, whether the direction of the normal vector of the surface is correct or not is automatically determined according to the intersection angle between the normal vector and the reference vector, and the normal vector The direction of the normal vector of the non-adjacent surface (intersection, separation, etc.) of all the surfaces that compose the object due to calculation errors, etc. Can be aligned, and in order to align the front and back of the surface, based on the matching of the vertex coordinates of the surfaces and the matching of the edges,
There is no need to search for adjacent surfaces in sequence. For this reason,
It is possible to align the front and back directions of the surface forming the object at high speed and with practical accuracy.

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

【図1】本発明にかかる図形表裏設定装置の概略構成を
示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a figure front / back setting apparatus according to the present invention.

【図2】自動車の車体パネルの形状の一例を示す図であ
る。
FIG. 2 is a diagram showing an example of the shape of a vehicle body panel of an automobile.

【図3】車体パネルを包含する直方体を作成する処理の
説明に供する図である。
FIG. 3 is a diagram for explaining a process of creating a rectangular parallelepiped including a vehicle body panel;

【図4】直方体の各ビューの面積を求める処理の説明に
供する図である。
FIG. 4 is a diagram provided for describing a process of obtaining an area of each view of a rectangular parallelepiped.

【図5】基準ベクトルの方向を求める第1の処理を示す
フローチャートである。
FIG. 5 is a flowchart showing a first process for obtaining a direction of a reference vector.

【図6】各面の法線ベクトルの方向を揃える第2の処理
を示すフローチャートである。
FIG. 6 is a flowchart illustrating a second process for aligning the direction of the normal vector of each surface.

【図7】従来のシェーディング処理の説明に供する図で
ある。
FIG. 7 is a diagram provided for explanation of a conventional shading process.

【図8】従来のシェーディング処理の問題点の説明に供
する図である。
FIG. 8 is a diagram provided for describing a problem of a conventional shading process.

【符号の説明】 10…データ入力部、 11…直方体作成部、 12…面法線ベクトル作成部、 13…ビュー面面積演算部、 14…最大面積ビュー面選択部、 15…ビュー面基準ベクトル作成部、 16…面法線ベクトル揃え部、 17…データ出力部、 20…車体パネル、 30…直方体。[Description of Signs] 10 data input unit, 11 cuboid creation unit, 12 surface normal vector creation unit, 13 view area calculation unit, 14 maximum area view plane selection unit, 15 view plane reference vector creation 16: surface normal vector alignment unit: 17: data output unit: 20: body panel, 30: rectangular parallelepiped

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 物体を構成する面の面データを入力する
入力手段と、 前記面データに基づいて、前記物体を構成する面の法線
ベクトルを作成する面法線ベクトル作成手段と、 前記面データに基づいて、前記物体を構成する面を包含
する最小体積の直方体、あるいは当該直方体と相似形状
の直方体を作成する直方体作成手段と、作成された直方
体を構成する面のうち、最も面積が大きい面を選択する
最大面積ビュー面選択手段と、 選択された面の基準ベクトルを作成するビュー面基準ベ
クトル作成手段と、 前記面法線ベクトル作成手段によって作成された法線ベ
クトルと前記ビュー面基準ベクトル作成手段によって作
成された基準ベクトルとの交差角度に基づいて、前記法
線ベクトルの方向を揃える面法線ベクトル揃え手段とを
有することを特徴とする図形表裏設定装置。
An input unit for inputting surface data of a surface forming the object; a surface normal vector generating unit for generating a normal vector of a surface forming the object based on the surface data; Based on the data, a rectangular parallelepiped having a minimum volume including the surface constituting the object, or a rectangular parallelepiped creating means for creating a rectangular parallelepiped having a shape similar to the rectangular parallelepiped, and the largest area among the surfaces constituting the created rectangular solid. Maximum area view plane selecting means for selecting a plane, view plane reference vector generating means for generating a reference vector of the selected plane, normal vector generated by the plane normal vector generating means, and the view plane reference vector Surface normal vector aligning means for aligning the direction of the normal vector based on the intersection angle with the reference vector created by the creating means. Graphic front and back setting device and butterflies.
【請求項2】 前記直方体作成手段は、直方体を構成す
る各辺が、3次元直交座標系のX軸、Y軸、Z軸のいず
れかの軸に平行になるように、前記最小体積の直方体、
あるいは当該直方体と相似形状の直方体を作成すること
を特徴とする請求項1に記載の図形表裏設定装置。
2. The rectangular parallelepiped having the minimum volume so that each side constituting the rectangular parallelepiped is parallel to any one of the X-axis, the Y-axis, and the Z-axis of a three-dimensional rectangular coordinate system. ,
2. The apparatus according to claim 1, wherein a rectangular parallelepiped having a shape similar to the rectangular parallelepiped is created. 3.
【請求項3】 前記ビュー面基準ベクトル作成手段は、
前記最大面積ビュー面選択手段によって選択された面
が、X、Yビュー、Y、Zビュー、Z、Xビューのいず
れから見た面であるのかを判断し、X、Yビューであれ
ば、+Zの方向を基準ベクトルの方向に設定し、Y、Z
ビューであれば、前記選択された面の凸方向を判断して
凸方向である+Xまたは−Xの方向を基準ベクトルの方
向に設定し、Z、Xビューであれば、+Yの方向を基準
ベクトルの方向に設定することを特徴とする請求項1に
記載の図形表裏設定装置。
3. The view plane reference vector creating means,
It is determined whether the plane selected by the maximum area view plane selecting means is a plane viewed from any of the X, Y, Y, Z, Z, and X views. Is set to the direction of the reference vector, and Y, Z
If it is a view, the convex direction of the selected surface is determined and the direction of + X or -X, which is the convex direction, is set as the direction of the reference vector. The figure front / back setting apparatus according to claim 1, wherein the setting is made in the direction of (1).
【請求項4】 前記ビュー面基準ベクトル作成手段は、
前記最大面積ビュー面選択手段によって選択された面の
面積に基づいて、前記物体が大物部品であるか、小物部
品であるかを判断し、小物部品であれば、前記選択され
た面の凸方向を判断して凸方向であるX、Y、Zのいず
れかの+または−方向を基準ベクトルの方向に設定する
ことを特徴とする請求項1に記載の図形表裏設定装置。
4. The view plane reference vector creating means,
Based on the area of the surface selected by the maximum area view plane selecting means, it is determined whether the object is a large part or a small part. If the object is a small part, the convex direction of the selected surface is determined. 2. The figure front / back setting apparatus according to claim 1, wherein a positive or negative one of X, Y, and Z, which is the convex direction, is set as the direction of the reference vector.
【請求項5】 前記面法線ベクトル揃え手段は、法線ベ
クトルと基準ベクトルとの交差角度が90度を超えてい
れば前記法線ベクトルの方向を180度反転させ、90
度以下であれば前記法線ベクトルの方向をそのままとす
ることを特徴とする請求項1に記載の図形表裏設定装
置。
5. The plane normal vector aligning means inverts the direction of the normal vector by 180 degrees if the intersection angle between the normal vector and the reference vector exceeds 90 degrees.
2. The figure front / back setting apparatus according to claim 1, wherein the direction of the normal vector is kept as it is if the degree is equal to or less than the degree.
【請求項6】 物体を構成する面の面データを入力する
段階と、 前記面データに基づいて、前記物体を構成する面の法線
ベクトルを作成する段階と、 前記面データに基づいて、前記物体を構成する面を包含
する最小体積の直方体、あるいは当該直方体と相似形状
の直方体を作成する段階と、 作成された直方体を構成する面のうち、最も面積が大き
い面を選択する段階と、 選択された面の基準ベクトルを作成する段階と、 作成された法線ベクトルと基準ベクトルとの交差角度に
基づいて、前記法線ベクトルの方向を揃える段階とを含
むことを特徴とする図形表裏設定方法。
6. A step of inputting surface data of a surface forming an object; a step of creating a normal vector of a surface forming the object based on the surface data; A step of creating a cuboid having the minimum volume including the planes constituting the object or a cuboid having a shape similar to the cuboid; selecting a plane having the largest area among the planes constituting the created cuboid; Generating a reference vector of the generated surface, and aligning the direction of the normal vector based on the intersection angle between the generated normal vector and the reference vector. .
JP2001042475A 2001-02-19 2001-02-19 Graphic front / back setting device and graphic front / back setting method Expired - Fee Related JP3900839B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001042475A JP3900839B2 (en) 2001-02-19 2001-02-19 Graphic front / back setting device and graphic front / back setting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001042475A JP3900839B2 (en) 2001-02-19 2001-02-19 Graphic front / back setting device and graphic front / back setting method

Publications (2)

Publication Number Publication Date
JP2002245485A true JP2002245485A (en) 2002-08-30
JP3900839B2 JP3900839B2 (en) 2007-04-04

Family

ID=18904764

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001042475A Expired - Fee Related JP3900839B2 (en) 2001-02-19 2001-02-19 Graphic front / back setting device and graphic front / back setting method

Country Status (1)

Country Link
JP (1) JP3900839B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096940A (en) * 2010-12-14 2011-06-15 威盛电子股份有限公司 Pre-sorting method and system for removing hidden surface of image object
GB2572996A (en) * 2018-04-19 2019-10-23 Nokia Technologies Oy Processing video patches for three-dimensional content

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096940A (en) * 2010-12-14 2011-06-15 威盛电子股份有限公司 Pre-sorting method and system for removing hidden surface of image object
CN102096940B (en) * 2010-12-14 2013-04-03 威盛电子股份有限公司 Pre-sorting method and system for removing hidden surface of image object
GB2572996A (en) * 2018-04-19 2019-10-23 Nokia Technologies Oy Processing video patches for three-dimensional content

Also Published As

Publication number Publication date
JP3900839B2 (en) 2007-04-04

Similar Documents

Publication Publication Date Title
CN101351823B (en) Method for generating three-dimensional shape data, apparatus for generating three-dimensional shape data
CN102184572A (en) Three-dimensional picture clipping method, representing method and processing device thereof
JPH0749960A (en) Solid model synthesizing device and method therefor
JP2000235407A (en) Display method, computer readable recording medium recorded with display program and display device
JP2002245485A (en) Device and method for figure top/reverse setting
JPH08153205A (en) Device for plotting polygon
JP4032828B2 (en) Graphic front / back setting device and graphic front / back setting method
JPS6219910A (en) Rounding method
JP4931038B2 (en) Stereoscopic image device, game device, stereoscopic image projection device, stereoscopic image data generation method, control program, and readable recording medium
Docampo-Sánchez et al. A regularization approach for automatic quad mesh generation
JPS625482A (en) Hidden-line processing method for three-dimensional wire frame model
JP3137776B2 (en) Object data creation device from perspective view
CN107871043B (en) Singular point identification method and device
JPH08108345A (en) Cutting route preparing method and cutting simulation method for tool for nc machine tool
JP2001092992A (en) Three-dimensional shape processing method and recording medium recording program for executing the same
JPH01190193A (en) Stereoscopic display device
CA1237524A (en) Geometric processing system
JP3823596B2 (en) Data compression method for motion simulation
JPH0895627A (en) Teaching method for shape measurement procedure
JPH01155403A (en) Method for generating processing path
JPH06103360A (en) Three-dimensional image display system
CN117611720A (en) Three-dimensional model texture processing method and device, electronic equipment and storage medium
CN103985152A (en) Three-dimensional symmetrical free body generation method based on two-dimensional hand-painted line drawing
JPH1133955A (en) Two-dimensional simulation method for teaching robot
JPH11195055A (en) Method for generating draft

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060906

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060919

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061117

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061212

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061225

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees