JP2003288377A - Method for acquiring shortest distance between objects - Google Patents

Method for acquiring shortest distance between objects

Info

Publication number
JP2003288377A
JP2003288377A JP2002091511A JP2002091511A JP2003288377A JP 2003288377 A JP2003288377 A JP 2003288377A JP 2002091511 A JP2002091511 A JP 2002091511A JP 2002091511 A JP2002091511 A JP 2002091511A JP 2003288377 A JP2003288377 A JP 2003288377A
Authority
JP
Japan
Prior art keywords
distance
shortest distance
elements
target element
dmin
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
JP2002091511A
Other languages
Japanese (ja)
Other versions
JP4031942B2 (en
Inventor
Shigenobu Tsutsumi
重信 堤
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2002091511A priority Critical patent/JP4031942B2/en
Publication of JP2003288377A publication Critical patent/JP2003288377A/en
Application granted granted Critical
Publication of JP4031942B2 publication Critical patent/JP4031942B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To shorten the processing time for acquiring the shortest distance between objects formed of a plurality of elements. <P>SOLUTION: This method includes the step for setting the shortest distance Dmin to an initial value; the step for determining an element of object based on a prescribed reading order differed from alignment order from a plurality elements constituting the object, and reading the position information of the element of object; the step for roughly determining the distance between the element of object and a prescribed point based on the position information of the element of object and setting it as a roughly determined distance Drgh; the step for comparing the roughly determined Drgh with the shortest distance Dmin and, when the roughly determined Drgh is the shortest distance Dmin or less, precisely determining the distance between the element of object and a prescribed point based on the position information of the element of object, and setting it as an element distance Dobj; and the step for substituting the element distance Dobj for the shortest distance Dmin when the element distance Dobj is the shortest distance Dmin or less. <P>COPYRIGHT: (C)2004,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、CAD/CAMやCGなど
のコンピュータ技術計算に関するものであり、特に、複
数の要素で構成されるオブジェクトと所定点との最短距
離を取得するためのオブジェクト間の最短距離取得方法
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to computer technology calculations such as CAD / CAM and CG, and in particular, between objects for obtaining the shortest distance between an object composed of a plurality of elements and a predetermined point. The shortest distance acquisition method.

【0002】[0002]

【従来の技術】CAD/CAMやコンピュータグラフィックス
では、独立した複数のオブジェクトより構成されてお
り、各オブジェクトの衝突や接触などの相互作用を決定
して表現する必要がある。特に、CAD/CAMにより製品の
デザインを設計する場合、各部品同士または製造工具と
の干渉状態を認識するために、オブジェクト間の最短距
離を算出する必要がある。
2. Description of the Related Art CAD / CAM and computer graphics are composed of a plurality of independent objects, and it is necessary to determine and represent interactions such as collision and contact of each object. In particular, when designing a product design by CAD / CAM, it is necessary to calculate the shortest distance between objects in order to recognize the state of interference between parts or manufacturing tools.

【0003】各オブジェクトのフェースが所定の数式で
表現されているような場合には、この数式を解析してオ
ブジェクト間の最短距離を算出するように構成すること
ができる。また、各オブジェクトを多面体(polyhedro
n)と想定し、この多面体を構成する簡易形状要素に分
解し、各要素の位置情報に基づいて最短距離を求めるよ
うに構成することができる。
When the face of each object is expressed by a predetermined mathematical expression, the mathematical expression can be analyzed to calculate the shortest distance between the objects. In addition, each object is a polyhedron (polyhedro
n), the polyhedron can be decomposed into simple shape elements, and the shortest distance can be obtained based on the position information of each element.

【0004】[0004]

【発明が解決しようとする課題】各オブジェクトのフェ
ースを表現している数式を解析して最短距離を求める場
合には、収束演算などを用いる必要があるために、演算
に多大な時間を要するという問題を内包している。各オ
ブジェクトを簡易形状要素に分解する場合には、多面体
を構成する三角形ポリゴンの位置情報に基づいて、各オ
ブジェクトを構成するポリゴンの最短距離を逐次的に求
めることが行われる。
When the shortest distance is obtained by analyzing the mathematical expression expressing the face of each object, it is necessary to use the convergence operation and the like, which requires a lot of time for the operation. It contains a problem. When each object is decomposed into simple shape elements, the shortest distance of the polygons forming each object is sequentially obtained based on the position information of the triangular polygons forming the polyhedron.

【0005】三角形ポリゴンは、要素の境界を示すエッ
ジ(edge)、エッジの端部対を構成する頂点(verte
x)、要素の面を表すフェース(face)で構成されてい
る。この三角形ポリゴンは、幾何学的に連続性がある状
態で分割され、その要素データはその連続性に基づく順
で整列されていることが一般的である。通常、このよう
なポリゴンデータをその整列順で読み出して最短距離の
算出を行っているため、その処理に多大な時間を要す
る。
A triangular polygon is an edge that indicates the boundary between elements, and a vertex that constitutes an end pair of edges.
x), a face representing the face of the element. This triangular polygon is divided in a geometrically continuous state, and its element data are generally arranged in an order based on the continuity. Usually, such polygon data is read in the order of alignment and the shortest distance is calculated, so that the processing takes a lot of time.

【0006】本発明では、複数の要素で構成されるオブ
ジェクト間の最短距離を取得するための処理時間を短縮
することを目的とする。
An object of the present invention is to shorten the processing time for acquiring the shortest distance between objects composed of a plurality of elements.

【0007】[0007]

【課題を解決するための手段】本発明に係るオブジェク
ト間の最短距離取得方法は、複数の要素で構成されるオ
ブジェクトと所定点との最短距離を取得するためのオブ
ジェクト間の最短距離取得方法であって、A)最短距離
Dminを初期値に設定する段階と、B)オブジェクトを
構成する複数の要素のうちから配列順と異なる所定の読
出順に基づいて対象要素を決定し、対象要素の位置情報
を読み出す段階と、C)対象要素の位置情報に基づい
て、対象要素と所定点との距離を簡易判定して、簡易判
定距離Drghに設定する段階と、D)簡易判定距離Drgh
と最短距離Dminとを比較し、簡易判定距離Drghが最短
距離Dminを超えている場合にはB段階に移行し、簡易
判定距離Drghが最短距離Dmin以下である場合には、対
象要素の位置情報に基づいて対象要素と所定点との距離
を詳細判定し要素距離Dobjに設定する段階と、E)要
素距離Dobjと最短距離Dminとを比較し、要素距離Dob
jが最短距離Dminを超えている場合にはB段階に移行
し、要素距離Dobjが最短距離Dmin以下である場合に
は、要素距離Dobjを最短距離Dminに代入する段階と、
F)オブジェクトを構成する複数の要素のうち対象要素
になっていないものがある場合にはB段階に移行し、全
ての要素が対象要素になったと判断される場合には処理
を終了する段階とを含む。
A method for obtaining the shortest distance between objects according to the present invention is a method for obtaining the shortest distance between objects for obtaining the shortest distance between an object composed of a plurality of elements and a predetermined point. Therefore, the target element is determined based on A) a step of setting the shortest distance Dmin to an initial value, and B) a plurality of elements forming the object based on a predetermined reading order different from the arrangement order, and position information of the target element. And C) a step of simply determining the distance between the target element and a predetermined point based on the position information of the target element and setting the distance to the simple determination distance Drgh, and D) a simple determination distance Drgh.
And the shortest distance Dmin are compared with each other. If the simple determination distance Drgh exceeds the shortest distance Dmin, the process shifts to the B stage, and if the simple determination distance Drgh is the shortest distance Dmin or less, the position information of the target element is calculated. And E) comparing the element distance Dobj with the shortest distance Dmin, and making a detailed determination of the distance between the target element and the predetermined point based on
When j exceeds the shortest distance Dmin, the process shifts to the B step, and when the element distance Dobj is less than or equal to the shortest distance Dmin, the element distance Dobj is substituted for the shortest distance Dmin.
F) If there is one of the plurality of elements forming the object that is not the target element, the step moves to step B, and if it is determined that all the elements have become the target elements, the step of ending the process including.

【0008】ここで、B段階において、要素数Nの所定
配列順(1〜N)に対して、所定数aおきに対象要素と
することができる。また、B段階において、要素数Nの
所定配列順(1〜N)に対して、1,N,(1+N)/2,(1+N)/4,
3(1+N)/4・・・の順で対象要素を決定することができ
る。さらに、オブジェクトは、三次元空間上に配置され
る複数のポリゴン平面を要素とすることができる。
Here, in the B stage, the target elements can be set every predetermined number a in the predetermined arrangement order (1 to N) of the number N of elements. In the B stage, 1, N, (1 + N) / 2, (1 + N) / 4, for the predetermined array order (1 to N) with the number of elements N,
The target element can be determined in the order of 3 (1 + N) / 4. Further, the object can have a plurality of polygon planes arranged in a three-dimensional space as elements.

【0009】また、本発明に係るオブジェクト間のの最
短距離取得方法は、複数の要素で構成される第1オブジ
ェクトおよび第2オブジェクトの最短距離を取得するた
めのオブジェクト間の最短距離取得方法であって、A)
最短距離Dminを初期値に設定する段階と、B)第1オ
ブジェクトを構成する複数の要素のうちから配列順と異
なる所定の読出順に基づいて第1対象要素を決定し、第
1対象要素の位置情報を読み出す段階と、C)第2オブ
ジェクトを構成する複数の要素のうちから配列順と異な
る所定の読出順に基づいて第2対象要素を決定し、第2
対象要素の位置情報を読み出す段階と、D)第1対象要
素および第2対象要素の位置情報に基づいて、第1対象
要素と第2対象要素の距離を簡易判定して、簡易判定距
離Drghに設定する段階と、E)簡易判定距離Drghと最
短距離Dminとを比較し、簡易判定距離Drghが最短距離
Dminを超えている場合にはC段階に移行し、簡易判定
距離Drghが最短距離Dmin以下である場合には、第1対
象要素と第2対象要素の位置情報に基づいて第1対象要
素と第2対象要素の距離を詳細判定し要素距離Dobjに
設定する段階と、F)要素距離Dobjと最短距離Dminと
を比較し、要素距離Dobjが最短距離Dminを超えている
場合にはC段階に移行し、要素距離Dobjが最短距離Dm
in以下である場合には、要素距離Dobjを最短距離Dmin
に代入する段階と、G)第2オブジェクトを構成する複
数の要素のうち第2対象要素になっていないものがある
場合にはC段階に移行し、全ての要素が第2対象要素に
なったと判断される場合にはH段階に移行する段階と、
H)第1オブジェクトを構成する複数の要素のうち第1
対象要素になっていないものがある場合にはB段階に移
行し、全ての要素が第1対象要素になったと判断される
場合には処理を終了する段階とを含む。
The method for acquiring the shortest distance between objects according to the present invention is a method for acquiring the shortest distance between objects for acquiring the shortest distance between a first object and a second object that are composed of a plurality of elements. A)
The step of setting the shortest distance Dmin to an initial value, and B) determining the first target element based on a predetermined reading order different from the array order among the plurality of elements forming the first object, and determining the position of the first target element. The step of reading information, and C) determining the second target element based on a predetermined reading order different from the arrangement order from among the plurality of elements forming the second object, and
And a step of reading the position information of the target element, and D) simply determining the distance between the first target element and the second target element based on the position information of the first target element and the second target element to obtain the simple determination distance Drgh. The setting step and E) the simple determination distance Drgh and the shortest distance Dmin are compared, and when the simple determination distance Drgh exceeds the shortest distance Dmin, the process shifts to step C, and the simple determination distance Drgh is the shortest distance Dmin or less. If it is, the step of making a detailed determination of the distance between the first target element and the second target element based on the position information of the first target element and the second target element and setting it as the element distance Dobj, and F) the element distance Dobj Is compared with the shortest distance Dmin, and when the element distance Dobj exceeds the shortest distance Dmin, the process shifts to the C stage, and the element distance Dobj is the shortest distance Dm.
If it is less than or equal to in, the element distance Dobj is set to the shortest distance Dmin.
G), and if there is one of the plurality of elements constituting the second object that is not the second target element, the process proceeds to step C and all the elements become the second target element. If it is judged, the stage to shift to the H stage,
H) The first of the plurality of elements forming the first object
If there is any element that is not the target element, the process proceeds to step B, and if it is determined that all the elements have become the first target element, the process ends.

【0010】[0010]

【発明の実施の形態】本発明に係るオブジェクト間の最
短距離取得方法は、CAD/CAMやCGなどのグラフィックス
処理を行うコンピュータのアプリケーションの一部とし
て搭載されるものであり、その1実施形態を以下に説明
する。図1に示すように、第1オブジェクト10と第2
オブジェクト20の最短距離を取得する場合について考
える。
BEST MODE FOR CARRYING OUT THE INVENTION The shortest distance acquisition method between objects according to the present invention is installed as a part of an application of a computer that performs graphics processing such as CAD / CAM or CG. Will be described below. As shown in FIG. 1, the first object 10 and the second object 10
Consider a case where the shortest distance of the object 20 is acquired.

【0011】図示した第1オブジェクト10および第2
オブジェクト20は、それぞれポリゴン平面が連続した
多面体で構成されている。第1オブジェクト10は、三
角形ポリゴンでなる第1要素101、第2要素102、
第3要素103・・・を備えており、同様にして、第2
オブジェクト20も三角形ポリゴンである第1要素20
1、第2要素202、第3要素203・・・で構成され
ているものとする。
The illustrated first object 10 and second object
The object 20 is composed of a polyhedron in which polygon planes are continuous. The first object 10 includes a first element 101, a second element 102, and a triangle polygon.
The third element 103 ...
The first element 20 in which the object 20 is also a triangular polygon
It is assumed that it is composed of 1, a second element 202, a third element 203 ...

【0012】第1オブジェクト10の第1要素101、
第2要素102、第3要素103・・・の位置情報は、
幾何学的な連続性を考慮して所定の配列順で整列されて
おり、たとえば、図1の最も左下に位置する第1要素1
01から隣接する要素が順次整列するようにデータ配列
が構成される。また、同様に第2オブジェクト20の第
1要素201、第2要素202、第3要素203・・・
の位置情報も幾何学的な連続性を考慮して所定の配列順
で整列されており、たとえば、図1の最も右上に位置す
る第1要素201から隣接する要素が順次整列するよう
にデータ配列が構成される。
A first element 101 of the first object 10,
The position information of the second element 102, the third element 103, ...
The first elements 1 are arranged in a predetermined arrangement order in consideration of geometrical continuity, and are located, for example, at the bottom left of FIG.
The data array is configured so that adjacent elements are sequentially arranged from 01. Similarly, the first element 201, the second element 202, the third element 203, ... Of the second object 20.
Position information is also arranged in a predetermined array order in consideration of geometrical continuity, and for example, the data array is arranged so that adjacent elements are sequentially arranged from the first element 201 located at the upper right of FIG. Is configured.

【0013】このような第1オブジェクト10と第2オ
ブジェクト20の最短距離を取得するためには、たとえ
ば、第2オブジェクト20の第1要素201から第1オ
ブジェクト10までの距離を第1オブジェクト10の各
要素の配列順に算出していき、最短となるものをオブジ
ェクト間の暫定的な最短距離とする。さらに、第2オブ
ジェクト20の次の要素である第2要素202から第2
オブジェクト10までの距離を第1オブジェクト10の
各要素の配列順に算出していき、暫定的な最短距離より
も小さい値のものがあれば逐次データの更新を行う。
In order to obtain the shortest distance between the first object 10 and the second object 20 as described above, for example, the distance from the first element 201 of the second object 20 to the first object 10 is calculated as follows. It is calculated in the order of arrangement of each element, and the shortest one is set as the provisional shortest distance between the objects. Further, from the second element 202, which is the next element of the second object 20, to the second element
The distance to the object 10 is calculated in the order in which the elements of the first object 10 are arranged, and if there is a value smaller than the provisional shortest distance, the data is updated sequentially.

【0014】このようにして第2オブジェクト20の最
終要素まで処理を実行し、得られた最短距離を第1オブ
ジェクト10と第2オブジェクト20との最短距離とす
る。ここで、説明を簡略化するために、所定点とオブジ
ェクトとの最短距離を求める場合について考察する。図
2に示すように、第1オブジェクト10は、図1と同様
に、第1要素101、第2要素102、第3要素103
・・・で構成されており、第2オブジェクト上の所定点
21から第1オブジェクト10までの最短距離を取得す
る場合を考える。
In this way, the processing is executed up to the final element of the second object 20, and the obtained shortest distance is set as the shortest distance between the first object 10 and the second object 20. Here, in order to simplify the explanation, a case where the shortest distance between the predetermined point and the object is obtained will be considered. As shown in FIG. 2, the first object 10 has a first element 101, a second element 102, and a third element 103, as in FIG.
Consider the case where the shortest distance from the predetermined point 21 on the second object to the first object 10 is acquired.

【0015】このような所定点21から第1オブジェク
ト10までの最短距離取得方法の従来例を図3のフロー
チャートに示す。ステップS11では、最短距離Dmin
を所定の最大値に設定する。ここでは、計算に用いる変
数の桁数に対応した最大値を既定値として設定すること
ができ、たとえば、1.0E+38とすることができる。
A conventional example of the method for obtaining the shortest distance from the predetermined point 21 to the first object 10 is shown in the flowchart of FIG. In step S11, the shortest distance Dmin
Is set to a predetermined maximum value. Here, the maximum value corresponding to the number of digits of the variable used for calculation can be set as a default value, and can be set to 1.0E + 38, for example.

【0016】ステップS12では、所定点21から現在
対象となっている第i番目の要素100(i)までの簡
易判定距離Drghを取得する。第1オブジェクト10の
第i要素100(i)が、図4に示すように、3つの頂
点V1(x1,y2,z3),V2(x2,y2,z2),V3(x3,y3,z3)を
備える場合、最大領域座標Vmax(xmax,ymax,zmax)およ
び最小領域座標Vmin(xmin,ymin,zmin)と所定点21と
の距離を算出し、いずれか小さいものを簡易判定距離D
rghとする。
In step S12, the simple determination distance Drgh from the predetermined point 21 to the currently targeted i-th element 100 (i) is acquired. The i-th element 100 (i) of the first object 10 has three vertices V1 (x1, y2, z3), V2 (x2, y2, z2), V3 (x3, y3, z3) as shown in FIG. , The distance between the maximum area coordinate Vmax (xmax, ymax, zmax) and the minimum area coordinate Vmin (xmin, ymin, zmin) and the predetermined point 21 is calculated, and the smaller one is calculated by the simple determination distance D.
rgh.

【0017】ステップS13では、簡易判定距離Drgh
が最短距離Dminを超えているか否かを判別する。簡易
判定距離Drghが最短距離Dminを超えていると判断した
場合にはステップS12に移行し、簡易判定距離Drgh
が最短距離Dmin以下であると判断した場合にはステッ
プS14に移行する。ステップS14では、所定点21
と第i要素100(i)との詳細な距離を算出して、所
定点21と第i要素100(i)との要素距離Dobjを
取得する。ここで、所定点21と第i要素100(i)
との距離を取得する方法は、種々提案されている方法を
用いて処理するものであり、ここではその詳細について
は言及しない。
In step S13, the simple determination distance Drgh
Is above the shortest distance Dmin. When it is determined that the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to step S12, and the simple determination distance Drgh
When it is determined that is less than or equal to the shortest distance Dmin, the process proceeds to step S14. In step S14, the predetermined point 21
And the i-th element 100 (i) are calculated in detail to obtain the element distance Dobj between the predetermined point 21 and the i-th element 100 (i). Here, the predetermined point 21 and the i-th element 100 (i)
The method of obtaining the distance between and is performed by using various proposed methods, and details thereof will not be mentioned here.

【0018】ステップS15では、要素距離Dobjが最
短距離Dminより小さいか否かを判別する。要素距離Do
bjが最短距離Dminより小さいと判断した場合にはステ
ップS16に移行し、要素距離Dobjが最短距離Dobj以
上であると判断した場合にはステップS12に移行す
る。ステップS16では、要素距離Dobjの値を最短距
離Dminに代入して、最短距離Dminのデータを更新す
る。
In step S15, it is determined whether the element distance Dobj is smaller than the shortest distance Dmin. Element distance Do
When bj is determined to be smaller than the shortest distance Dmin, the process proceeds to step S16, and when it is determined that the element distance Dobj is equal to or greater than the shortest distance Dobj, the process proceeds to step S12. In step S16, the value of the element distance Dobj is substituted for the shortest distance Dmin, and the data of the shortest distance Dmin is updated.

【0019】ステップS17では、第1オブジェクト1
0の全ての要素について処理を実行したか否かを判断す
る。第1オブジェクト10の要素のうち処理が実行され
ていない要素があると判断した場合には、変数iをイン
クリメントして次の要素について同様の処理を実行す
る。このように、第1オブジェクト10の各要素の配列
順に処理を実行した場合には、全ての要素について詳細
な距離算出の処理を実行しなければならない場合が生じ
る。
In step S17, the first object 1
It is determined whether or not the processing has been executed for all the elements of 0. If it is determined that some of the elements of the first object 10 have not been processed, the variable i is incremented and the same processing is executed for the next element. In this way, when the processing is executed in the order of arrangement of the elements of the first object 10, there may be a case where detailed distance calculation processing must be executed for all the elements.

【0020】たとえば、図5に示すように、第1オブジ
ェクト10の各要素のうち筆頭に配列されている第1要
素101までの距離が最短であるような場合には、詳細
な距離測定は、最初の第1要素101についてのみ処理
することだけでよい。しかしながら、図6に示すよう
に、第1オブジェクト10の各要素のうち筆頭に配列さ
れている第1要素101までの距離が最大であり、各要
素の距離が配列順に順次短くなるような場合には、全て
の要素について詳細な距離測定を行う必要がある。
For example, as shown in FIG. 5, when the distance to the first element 101 arranged at the head among the elements of the first object 10 is the shortest, detailed distance measurement is Only the first first element 101 need be processed. However, as shown in FIG. 6, in the case where the distance to the first element 101 arranged at the head among the respective elements of the first object 10 is the maximum and the distance of each element becomes shorter in the order of arrangement, Needs to make detailed distance measurements for all elements.

【0021】また、図7に示すように、第5要素105
までの距離が最短となる場合と、図8に示すように、第
10要素110までの距離が最短となる場合とでは、詳
細な距離測定の処理回数が異なってくる。このような従
来の逐次距離取得により図5〜図8の各モデルについて
最短距離の取得を行った場合の処理回数を表1に示す。
Further, as shown in FIG. 7, the fifth element 105
The number of detailed distance measurement processes differs between the case where the distance to the shortest distance is the shortest and the case where the distance to the tenth element 110 is the shortest, as shown in FIG. Table 1 shows the number of processes when the shortest distance is acquired for each model of FIGS. 5 to 8 by such conventional sequential distance acquisition.

【0022】[0022]

【表1】 このような逐次距離取得の方法における詳細な距離測定
の処理回数の平均値は、第1オブジェクト10の要素数
をNとした場合、(N/2)*K1で表すことができる。ここ
で、K1は、第1オブジェクト10の形状のタイプや形状
の複雑さに応じて決定される係数である。
[Table 1] When the number of elements of the first object 10 is N, the average value of the number of processings of detailed distance measurement in such a sequential distance acquisition method can be represented by (N / 2) * K1. Here, K1 is a coefficient determined according to the type of shape of the first object 10 and the complexity of the shape.

【0023】本発明に係るオブジェクト間の最短距離取
得方法のフローチャートを図9に示す。ステップS21
では、最短距離Dminを既定の最大値に設定する。前述
と同様にして、計算に用いる変数の桁数に対応した最大
値を既定値として設定することができ、たとえば、1.0E
+38とすることができる。
FIG. 9 shows a flowchart of the method for acquiring the shortest distance between objects according to the present invention. Step S21
Then, the shortest distance Dmin is set to a predetermined maximum value. In the same way as above, the maximum value corresponding to the number of digits of the variable used for calculation can be set as the default value.
It can be +38.

【0024】ステップS22では、第1オブジェクト1
0のうちの各要素について、処理順を決定するための処
理順テーブルNoTblを作成する。処理順テーブルNoTblの
作成は、たとえば、第1オブジェクト10の各要素の配
列順に対して2以上の所定数おきに処理を行うように処
理順テーブルNoTblを設定することが可能であり、ま
た、第1オブジェクト10の各要素(1〜N)の配列順
に対して第1要素、第N要素、第N/2要素、第N/4要素、
第3N/4要素・・・のように2分割位置を順次処理するよ
うに処理順テーブルNoTblを設定することができる。
In step S22, the first object 1
A processing order table NoTbl for determining the processing order is created for each element of 0. The processing order table NoTbl can be created, for example, by setting the processing order table NoTbl so that processing is performed every predetermined number of 2 or more with respect to the array order of each element of the first object 10. The first element, the Nth element, the N / 2th element, the N / 4th element, with respect to the arrangement order of each element (1 to N) of one object 10.
The processing order table NoTbl can be set so as to sequentially process the two-divided positions like the third N / 4th element.

【0025】ステップS23では、処理順テーブルNoTb
lを参照して処理を実行する要素番号no=NoTbl(i)を
取得する。ステップS24では、所定点21と現在対象
となっている第no要素の簡易判定距離Drghを取得す
る。前述と同様にして、図4の最大領域座標Vmax(xma
x,ymax,zmax)および最小領域座標Vmin(xmin,ymin,zmi
n)と所定点21との距離を算出し、いずれか小さいも
のを簡易判定距離Drghとすることができる。
In step S23, the processing order table NoTb
The element number no = NoTbl (i) for executing the process is acquired by referring to l. In step S24, the predetermined point 21 and the simple determination distance Drgh of the currently targeted no element are acquired. Similarly to the above, the maximum area coordinates Vmax (xma of FIG.
x, ymax, zmax) and minimum area coordinates Vmin (xmin, ymin, zmi
The distance between n) and the predetermined point 21 can be calculated, and the smaller one can be set as the simple determination distance Drgh.

【0026】ステップS25では、簡易判定距離Drgh
が最短距離Dminを超えているか否かを判別する。簡易
判定距離Drghが最短距離Dminを超えていると判断した
場合にはステップS23に移行し、簡易判定距離Drgh
が最短距離Dmin以下であると判断した場合にはステッ
プS26に移行する。ステップS26では、所定点21
と第no要素100(no)との詳細な距離を算出して、所
定点21と第no要素100(no)との要素距離Dobjを
取得する。
In step S25, the simple determination distance Drgh
Is above the shortest distance Dmin. When it is determined that the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to step S23, and the simple determination distance Drgh
When it is determined that is less than the shortest distance Dmin, the process proceeds to step S26. At step S26, the predetermined point 21
And the no-th element 100 (no) are calculated in detail, and the element distance Dobj between the predetermined point 21 and the no-th element 100 (no) is acquired.

【0027】ステップS27では、要素距離Dobjが最
短距離Dminより小さいか否かを判別する。要素距離Do
bjが最短距離Dminより小さいと判断した場合にはステ
ップS28に移行し、要素距離Dobjが最短距離Dobj以
上であると判断した場合にはステップS23に移行す
る。ステップS28では、要素距離Dobjの値を最短距
離Dminに代入して、最短距離Dminのデータを更新す
る。
In step S27, it is determined whether the element distance Dobj is smaller than the shortest distance Dmin. Element distance Do
When it is determined that bj is smaller than the shortest distance Dmin, the process proceeds to step S28, and when it is determined that the element distance Dobj is equal to or more than the shortest distance Dobj, the process proceeds to step S23. In step S28, the value of the element distance Dobj is substituted for the shortest distance Dmin, and the data of the shortest distance Dmin is updated.

【0028】ステップS29では、第1オブジェクト1
0の全ての要素について処理を実行したか否かを判断す
る。第1オブジェクト10の要素のうち処理が実行され
ていない要素があると判断した場合には、変数iをイン
クリメントして次の要素について同様の処理を実行す
る。処理順テーブルNoTblは、第1オブジェクト10の
各要素の配列順に対して所定数おきに処理を実行するよ
うに設定することができる。たとえば、図5〜図8に示
すような第1要素101〜第15要素115が配列され
る第1オブジェクト10に対して5つおきに処理を実行
する場合、図10に示すような処理順テーブルNoTblを
設定することができる。この場合、第1要素101から
初めて5つおきに要素を並べていき、次に5つ先の要素
が最終要素を超えるような場合には第2要素102に戻
ってそこから5つおきに要素を配列している。
In step S29, the first object 1
It is determined whether or not the processing has been executed for all the elements of 0. If it is determined that some of the elements of the first object 10 have not been processed, the variable i is incremented and the same processing is executed for the next element. The processing order table NoTbl can be set so that the processing is executed every predetermined number in the arrangement order of the elements of the first object 10. For example, when processing is performed on the first object 10 in which the first element 101 to the fifteenth element 115 as shown in FIGS. 5 to 8 are arranged every fifth, a processing order table as shown in FIG. NoTbl can be set. In this case, the elements are arranged every 5th element from the first element 101 for the first time, and when the element 5th ahead exceeds the final element, the process returns to the 2nd element 102 and every 5th element thereafter. Are arranged.

【0029】5つおきに処理順テーブルNoTblを設定し
た場合に、図5〜図8のモデルを実行した場合のそれぞ
れの処理回数を表2に示す。
Table 2 shows the number of times of processing when the models of FIGS. 5 to 8 are executed when the processing order table NoTbl is set every five times.

【0030】[0030]

【表2】 このような所定数おきに処理順テーブルNoTblを設定し
た場合における詳細な距離測定の処理回数は、第1オブ
ジェクト10の要素数をNとし所定数をMとした場合、
その最大値が(N/M+M)*K2で表すことができる。ここ
で、K2は、第1オブジェクト10の形状のタイプや形状
の複雑さに応じて決定される係数である。
[Table 2] When the processing order table NoTbl is set at every predetermined number, the number of detailed distance measurement processes is N when the number of elements of the first object 10 is N and the predetermined number is M,
The maximum value can be represented by (N / M + M) * K2. Here, K2 is a coefficient determined according to the type of shape of the first object 10 and the complexity of the shape.

【0031】このように、所定数おきに処理順テーブル
NoTblを設定し、この処理順テーブルNoTblに沿って処理
を実行することにより、詳細な距離測定の処理回数を減
らすことが可能となり、処理の高速化を図ることができ
る。処理順テーブルNoTblは、第1オブジェクト10の
各要素の配列順に対して、第1要素、第N要素、第(1+
N)/2要素・・・の順で、2分割毎に設定することが可能
である。
In this way, the processing order table is set every predetermined number.
By setting NoTbl and executing the processing in accordance with the processing order table NoTbl, it is possible to reduce the number of times of detailed distance measurement processing, and it is possible to speed up the processing. The processing order table NoTbl is the first element, the Nth element, the (1+) th element in the arrangement order of the elements of the first object 10.
It is possible to set every two divisions in the order of N) / 2 elements.

【0032】たとえば、図5〜図8に示すような第1要
素101〜第15要素115が配列される第1オブジェ
クト10に対して、第1要素101、第15要素115
(N)を処理した後、第8要素108((1+N)/2)の処
理を実行し、さらに、第4要素104((1+N)/4)、第
12要素(3(1+N)/4)の処理を実行し、その後の処理は
元々の配列順に処理を行うように設定することができ
る。
For example, with respect to the first object 10 in which the first element 101 to the fifteenth element 115 are arranged as shown in FIGS.
After processing (N), the processing of the eighth element 108 ((1 + N) / 2) is executed, and further, the fourth element 104 ((1 + N) / 4) and the twelfth element (3 (1 + N) / 4) processing can be executed, and subsequent processing can be set to perform processing in the original array order.

【0033】このような2分割順と逐次処理を組み合わ
せた処理順テーブルNoTblを設定した場合に、図5〜図
8のモデルを実行した場合のそれぞれの処理回数を表3
に示す。
When the processing order table NoTbl, which is a combination of the two-division order and the sequential processing, is set, the number of times each processing is performed when the model of FIGS. 5 to 8 is executed is shown in Table 3.
Shown in.

【0034】[0034]

【表3】 2分割順を含む処理順テーブルNoTblの作成方法につい
て、図12〜図15に基づいて説明する。処理順テーブ
ルNoTblに含まれる各要素のデータは、リンクリスト構
造を使用して記述される。処理順テーブルNoTblを構成
する各データ格納部300(1)〜300(N)は、そ
れぞれID格納部301とNEXTポインタ302とを備え
ている。ID格納部301には、第1オブジェクト10
の要素番号が格納され、NEXTポインタ302には次に処
理を実行する要素のデータアドレスが格納される。最終
のデータ格納部300(N)のNEXTポインタ302
(N)には"END"が格納される。
[Table 3] A method of creating the processing order table NoTbl including the order of two divisions will be described with reference to FIGS. The data of each element included in the processing order table NoTbl is described using a linked list structure. Each of the data storage units 300 (1) to 300 (N) forming the processing order table NoTbl includes an ID storage unit 301 and a NEXT pointer 302. In the ID storage unit 301, the first object 10
Is stored, and the NEXT pointer 302 stores the data address of the element to be processed next. NEXT pointer 302 of final data storage unit 300 (N)
"END" is stored in (N).

【0035】第1オブジェクト10の要素数Nが17の
場合について考察する。まず、図13に示すように、第
1オブジェクト10の第1要素(最初)と第17要素
(最終)のデータを設定し、第1要素のNEXTポインタ3
02に第17要素のデータアドレスを格納し、第17要
素のNEXTポインタに"END"を格納する。このことによ
り、処理順テーブルNoTblに、第1要素、第17要素の
処理順がセットされる。
Consider a case where the number N of elements of the first object 10 is 17. First, as shown in FIG. 13, the data of the first element (first) and the seventeenth element (final) of the first object 10 is set, and the NEXT pointer 3 of the first element is set.
The data address of the 17th element is stored in 02, and "END" is stored in the NEXT pointer of the 17th element. As a result, the processing order of the first element and the seventeenth element is set in the processing order table NoTbl.

【0036】次に、第1要素および第17要素の中間に
位置する第9要素のデータを挿入する。ここでは、第1
要素のNEXTポインタ302を第9要素のデータアドレス
に更新し、第9要素のNEXTポインタ302には第17要
素のデータアドレスを格納する。このことにより、図1
4に示すように、処理順テーブルNoTblに、第1要素、
第9要素、第17要素の処理順がセットされる。
Next, the data of the ninth element located between the first element and the seventeenth element is inserted. Here, the first
The NEXT pointer 302 of the element is updated to the data address of the ninth element, and the NEXT pointer 302 of the ninth element stores the data address of the seventeenth element. As a result, FIG.
As shown in 4, the processing order table NoTbl contains the first element,
The processing order of the ninth element and the seventeenth element is set.

【0037】さらに、各要素間の中間に位置する要素の
データを挿入する。ここでは、第1要素と第9要素の間
に第5要素を挿入し、第9要素と第17要素との間に第
13要素を挿入する。各要素のNEXTポインタ302を更
新することにより、図15に示すような各要素の処理順
が処理順テーブルNoTblにセットされる。このようにし
て、隣り合う要素の要素番号の差が1になるまで、デー
タの挿入を繰り返すことで、処理順テーブルNoTblを設
定することができる。このときの各要素の決定順を表4
に示す。
Further, the data of the element located in the middle of each element is inserted. Here, the 5th element is inserted between the 1st element and the 9th element, and the 13th element is inserted between the 9th element and the 17th element. By updating the NEXT pointer 302 of each element, the processing order of each element as shown in FIG. 15 is set in the processing order table NoTbl. In this way, by repeatedly inserting the data until the difference between the element numbers of the adjacent elements becomes 1, the processing order table NoTbl can be set. Table 4 shows the decision order of each element at this time.
Shown in.

【0038】[0038]

【表4】 このようにして決定された処理順テーブルNoTblを用い
て最短距離の取得処理を実行した場合の詳細な距離測定
の処理回数を表5に示す。
[Table 4] Table 5 shows the number of detailed distance measurement processes when the shortest distance acquisition process is executed using the process order table NoTbl determined in this way.

【0039】[0039]

【表5】 ここでは、処理順テーブルNoTblの処理順を横軸に示
し、所定点21(検査点)から最も近い要素が第2要
素、第4要素、第6要素、第8要素、第10要素、第1
2要素、第14要素、第16要素のそれぞれについて詳
細な距離測定の回数を算出している。ただし、所定点2
1に最も近い要素が第2要素、第4要素であるものにつ
いて次に近い要素が第3要素である場合、所定点21に
最も近い要素が第6要素、第8要素であるものについて
次に近い要素が第7要素である場合、所定点21に最も
近い要素が第10要素、第12要素であるものについて
次に近い要素が第11要素である場合、所定点21に最
も近い要素が第14要素、第16要素であるものについ
て次に近い要素が第15要素である場合について考察し
ている。
[Table 5] Here, the processing order of the processing order table NoTbl is shown on the horizontal axis, and the elements closest to the predetermined point 21 (inspection point) are the second element, the fourth element, the sixth element, the eighth element, the tenth element, and the first element.
The number of detailed distance measurements is calculated for each of the two elements, the fourteenth element, and the sixteenth element. However, predetermined point 2
When the element closest to 1 is the second element and the fourth element, and the next closest element is the third element, the element closest to the predetermined point 21 is the sixth element and the eighth element If the closest element is the seventh element, the element closest to the predetermined point 21 is the tenth element, and if the next closest element is the eleventh element for the twelfth element, the element closest to the predetermined point 21 is the first element. The case where the element next to the 14th element and the 16th element is the 15th element is considered.

【0040】このように、処理順テーブルNoTblが2分
割順のみで構成され逐次順を含まない場合の距離計算回
数の最大値は、(log2N+2〜3)*K3で表すことができ
る。ここで、K3は、第1オブジェクト10の形状のタイ
プや形状の複雑さに応じて決定される係数である以上の
ようにして、所定点21と第1オブジェクト10との最
短距離を算出することにより、従来の逐次詳細な距離測
定の処理を実行する場合に比して、処理時間を大幅に短
縮することが可能となる。
As described above, the maximum value of the number of distance calculations when the processing order table NoTbl is composed of only the two-division order and does not include the sequential order can be represented by (log 2 N + 2-3) * K3. Here, K3 is a coefficient determined according to the type of shape of the first object 10 and the complexity of the shape. The shortest distance between the predetermined point 21 and the first object 10 is calculated as described above. As a result, the processing time can be significantly shortened as compared with the case where the processing of the conventional detailed distance measurement is executed.

【0041】第2オブジェクト20を構成する複数の要
素201,202,203・・・のそれぞれについて、
同様の方法を用いて第1オブジェクト10までの最短距
離を求めることにより、第1オブジェクト10と第2オ
ブジェクト20との間の最短距離を取得することが可能
であり、この場合にも処理時間を大幅に短縮することが
可能となる。
For each of the plurality of elements 201, 202, 203, ... Which constitute the second object 20,
By obtaining the shortest distance to the first object 10 using the same method, it is possible to obtain the shortest distance between the first object 10 and the second object 20, and in this case as well, the processing time is reduced. It can be shortened significantly.

【0042】このような第1オブジェクト10と第2オ
ブジェクト20との最短距離を取得する方法について、
図16のフローチャートに基づいて説明する。ステップ
S31では、最短距離Dminを既定の最大値に設定す
る。前述と同様にして、計算に用いる変数の桁数に対応
した最大値を既定値として設定することができ、たとえ
ば、1.0E+38とすることができる。
Regarding the method for obtaining the shortest distance between the first object 10 and the second object 20 as described above,
This will be described based on the flowchart of FIG. In step S31, the shortest distance Dmin is set to a predetermined maximum value. Similarly to the above, the maximum value corresponding to the number of digits of the variable used for calculation can be set as a default value, and can be set to 1.0E + 38, for example.

【0043】ステップS32では、第1オブジェクト1
0のうちの各要素について処理順を決定するための処理
順テーブルNoTbl1および第2オブジェクトのうちの各要
素について処理順を決定するための処理順テーブルNoTb
l2を作成する。処理順テーブルNoTbl1,NoTbl2の作成
は、前述の処理順テーブルNoTblと同様に設定すること
ができる。
In step S32, the first object 1
Processing order table NoTbl1 for determining the processing order for each element of 0 and processing order table NoTb for determining the processing order for each element of the second object
Create l2. The processing order tables NoTbl1 and NoTbl2 can be created in the same manner as the processing order table NoTbl described above.

【0044】ステップS33では、処理順テーブルNoTb
l1,NoTbl2を参照して処理を実行する要素番号no1=NoT
bl1(i1),no2=NoTbl2(i2)を取得する。ステップS
34では、第1オブジェクト10および第2オブジェク
ト20のそれぞれ現在対象となっている要素番号no1お
よび要素番号no2の簡易判定距離Drghを取得する。前述
と同様にして、各要素の最大領域座標Vmax(xmax,ymax,
zmax)および最小領域座標Vmin(xmin,ymin,zmin)に基
づいて簡易判定距離Drghを算出する。
In step S33, the processing order table NoTb
Element number no1 = NoT that executes processing by referring to l1 and NoTbl2
Acquires bl1 (i1), no2 = NoTbl2 (i2). Step S
At 34, the simple determination distances Drgh of the element number no1 and the element number no2 which are the current targets of the first object 10 and the second object 20, respectively, are acquired. Similar to the above, the maximum area coordinates Vmax (xmax, ymax,
zmax) and the minimum area coordinate Vmin (xmin, ymin, zmin), and the simple determination distance Drgh is calculated.

【0045】ステップS35では、簡易判定距離Drgh
が最短距離Dminを超えているか否かを判別する。簡易
判定距離Drghが最短距離Dminを超えていると判断した
場合にはステップS33に移行し、簡易判定距離Drgh
が最短距離Dmin以下であると判断した場合にはステッ
プS36に移行する。ステップS36では、第1オブジ
ェクト10の第no1要素100(no1)と第2オブジェク
ト20の第no2要素200(no2)の詳細な距離を算出し
て、第no1要素100(no1)と第no2要素200(no2)
との要素距離Dobjを取得する。
In step S35, the simple determination distance Drgh
Is above the shortest distance Dmin. When it is determined that the simple determination distance Drgh exceeds the shortest distance Dmin, the process proceeds to step S33, and the simple determination distance Drgh
When it is determined that is less than or equal to the shortest distance Dmin, the process proceeds to step S36. In step S36, the detailed distance between the no1 element 100 (no1) of the first object 10 and the no2 element 200 (no2) of the second object 20 is calculated, and the no1 element 100 (no1) and the no2 element 200 are calculated. (No2)
And obtain the element distance Dobj with.

【0046】ステップS37では、要素距離Dobjが最
短距離Dminより小さいか否かを判別する。要素距離Do
bjが最短距離Dminより小さいと判断した場合にはステ
ップS38に移行し、要素距離Dobjが最短距離Dobj以
上であると判断した場合にはステップS33に移行す
る。ステップS38では、要素距離Dobjの値を最短距
離Dminに代入して、最短距離Dminのデータを更新す
る。
In step S37, it is determined whether the element distance Dobj is smaller than the shortest distance Dmin. Element distance Do
When bj is determined to be smaller than the shortest distance Dmin, the process proceeds to step S38, and when it is determined that the element distance Dobj is equal to or greater than the shortest distance Dobj, the process proceeds to step S33. In step S38, the value of the element distance Dobj is substituted for the shortest distance Dmin, and the data of the shortest distance Dmin is updated.

【0047】ステップS39では、第2オブジェクト2
0の全ての要素について処理を実行したか否かを判断す
る。第2オブジェクト20の要素のうち処理が実行され
ていない要素があると判断した場合には、変数i2をイン
クリメントして次の要素について同様の処理を実行す
る。また、第2オブジェクト20の要素の全てのついて
処理を実行したと判断した場合にはステップS40に移
行する。
In step S39, the second object 2
It is determined whether or not the processing has been executed for all the elements of 0. When it is determined that some of the elements of the second object 20 have not been processed, the variable i2 is incremented and the same processing is executed for the next element. If it is determined that the process has been executed for all the elements of the second object 20, the process proceeds to step S40.

【0048】ステップS40では、第1オブジェクト1
0の全ての要素について処理を実行した否かを判断す
る。第1オブジェクト10の要素のうち処理が実行され
ていない要素があると判断した場合には、変数i1をイン
クリメントするとともに変数i2を初期値に設定し、次の
要素について同様の処理を実行する。第1オブジェクト
10の全ての要素について処理が完了したと判断した場
合には、この処理ルーチンを終了し、現在の最短距離D
minの値を第1オブジェクト10と第2オブジェクト2
0の最短距離として出力する。
In step S40, the first object 1
It is determined whether or not the processing has been executed for all the elements of 0. When it is determined that some of the elements of the first object 10 have not been processed, the variable i1 is incremented, the variable i2 is set to the initial value, and the same processing is executed for the next element. When it is determined that the processing has been completed for all the elements of the first object 10, this processing routine is ended and the current shortest distance D
The value of min is the first object 10 and the second object 2
Output as the shortest distance of 0.

【0049】[0049]

【発明の効果】本発明によれば、オブジェクト間の最短
距離を取得する際に、詳細な距離測定の処理回数を減少
することができ、最短距離の取得処理を高速に行うこと
を可能とする。
According to the present invention, when the shortest distance between objects is acquired, it is possible to reduce the number of detailed distance measurement processes, and it is possible to perform the shortest distance acquisition process at high speed. .

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

【図1】本発明に係るオブジェクト間の最短距離取得方
法が採用されるモデルの例を示す説明図。
FIG. 1 is an explanatory diagram showing an example of a model in which a method for acquiring the shortest distance between objects according to the present invention is adopted.

【図2】本発明に係るオブジェクト間の最短距離取得方
法が採用されるモデルの例を示す説明図。
FIG. 2 is an explanatory diagram showing an example of a model in which the shortest distance acquisition method between objects according to the present invention is adopted.

【図3】従来手法のフローチャート。FIG. 3 is a flowchart of a conventional method.

【図4】簡易判定処理の説明図。FIG. 4 is an explanatory diagram of a simple determination process.

【図5】本発明に係るオブジェクト間の最短距離取得方
法が採用されるモデルの例を示す説明図。
FIG. 5 is an explanatory diagram showing an example of a model in which the shortest distance acquisition method between objects according to the present invention is adopted.

【図6】本発明に係るオブジェクト間の最短距離取得方
法が採用されるモデルの例を示す説明図。
FIG. 6 is an explanatory diagram showing an example of a model in which the shortest distance acquisition method between objects according to the present invention is adopted.

【図7】本発明に係るオブジェクト間の最短距離取得方
法が採用されるモデルの例を示す説明図。
FIG. 7 is an explanatory diagram showing an example of a model in which the shortest distance acquisition method between objects according to the present invention is adopted.

【図8】本発明に係るオブジェクト間の最短距離取得方
法が採用されるモデルの例を示す説明図。
FIG. 8 is an explanatory diagram showing an example of a model in which the shortest distance acquisition method between objects according to the present invention is adopted.

【図9】本発明の1実施形態によるフローチャート。FIG. 9 is a flowchart according to one embodiment of the present invention.

【図10】処理順テーブルの一例を示す説明図。FIG. 10 is an explanatory diagram showing an example of a processing order table.

【図11】処理順テーブルの一例を示す説明図。FIG. 11 is an explanatory diagram showing an example of a processing order table.

【図12】リンクリスト構造の説明図。FIG. 12 is an explanatory diagram of a link list structure.

【図13】2分割順による処理順テーブルの作成過程を
示す説明図。
FIG. 13 is an explanatory diagram showing a process of creating a processing order table based on a two-division order.

【図14】2分割順による処理順テーブルの作成過程を
示す説明図。
FIG. 14 is an explanatory diagram showing a process of creating a processing order table in the order of two divisions.

【図15】2分割順による処理順テーブルの作成過程を
示す説明図。
FIG. 15 is an explanatory diagram showing a process of creating a processing order table based on a two-division order.

【図16】ポリゴン間の最短距離を取得する方法のフロ
ーチャート。
FIG. 16 is a flowchart of a method for acquiring the shortest distance between polygons.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】複数の要素で構成されるオブジェクトと所
定点との最短距離を取得するためのオブジェクト間の最
短距離取得方法であって、 A)最短距離Dminを初期値に設定する段階と、 B)前記オブジェクトを構成する複数の要素のうちから
配列順と異なる所定の読出順に基づいて対象要素を決定
し、前記対象要素の位置情報を読み出す段階と、 C)前記対象要素の位置情報に基づいて、対象要素と所
定点との距離を簡易判定して、簡易判定距離Drghに設
定する段階と、 D)前記簡易判定距離Drghと最短距離Dminとを比較
し、簡易判定距離Drghが最短距離Dminを超えている場
合にはB段階に移行し、簡易判定距離Drghが最短距離
Dmin以下である場合には、対象要素の位置情報に基づ
いて対象要素と所定点との距離を詳細判定し要素距離D
objに設定する段階と、 E)前記要素距離Dobjと最短距離Dminとを比較し、要
素距離Dobjが最短距離Dminを超えている場合にはB段
階に移行し、要素距離Dobjが最短距離Dmin以下である
場合には、要素距離Dobjを最短距離Dminに代入する段
階と、 F)前記オブジェクトを構成する複数の要素のうち対象
要素になっていないものがある場合にはB段階に移行
し、全ての要素が対象要素になったと判断される場合に
は処理を終了する段階と、を含むオブジェクト間の最短
距離取得方法。
1. A method for obtaining the shortest distance between objects for obtaining the shortest distance between an object composed of a plurality of elements and a predetermined point, the method comprising: A) setting the shortest distance Dmin to an initial value; B) determining a target element from a plurality of elements constituting the object based on a predetermined reading order different from the arrangement order, and reading the position information of the target element; and C) based on the position information of the target element. Then, the simple determination of the distance between the target element and the predetermined point and the setting of the simple determination distance Drgh is performed, and D) the simple determination distance Drgh is compared with the shortest distance Dmin, and the simple determination distance Drgh is the shortest distance Dmin. If it exceeds, the process proceeds to the B stage, and if the simple determination distance Drgh is the shortest distance Dmin or less, the distance between the target element and the predetermined point is determined in detail based on the position information of the target element, and the element distance is determined. D
E) comparing the element distance Dobj with the shortest distance Dmin, and if the element distance Dobj exceeds the shortest distance Dmin, shifts to the B step, and the element distance Dobj is equal to or shorter than the shortest distance Dmin. If there is, then the step of substituting the element distance Dobj into the shortest distance Dmin, and F) if there is any element that is not the target element among the plurality of elements that make up the object, move to step B, and A method of acquiring the shortest distance between objects, including the step of terminating the processing when the element of is determined to be the target element.
【請求項2】前記B段階において、要素数Nの所定配列
順(1〜N)に対して、所定数aおきに対象要素とす
る、請求項1に記載のオブジェクト間の最短距離取得方
法。
2. The method for acquiring the shortest distance between objects according to claim 1, wherein in the step B, the target elements are arranged every predetermined number a in the predetermined arrangement order (1 to N) of the number N of elements.
【請求項3】前記B段階において、要素数Nの所定配列
順(1〜N)に対して、1,N,(1+N)/2,(1+N)/4,3(1+N)/4
・・・の順で対象要素を決定する、請求項1に記載のオ
ブジェクト間の最短距離取得方法。
3. In the step B, 1, N, (1 + N) / 2, (1 + N) / 4,3 (1+) for a predetermined arrangement order (1 to N) of the number N of elements. N) / 4
The shortest distance acquisition method between objects according to claim 1, wherein the target element is determined in the order of.
【請求項4】前記オブジェクトは、三次元空間上に配置
される複数のポリゴン平面を要素とする、請求項1〜3
のいずれかに記載のオブジェクト間の最短距離取得方
法。
4. The object comprises a plurality of polygon planes arranged in a three-dimensional space as elements.
The method for obtaining the shortest distance between objects according to any one of 1.
【請求項5】複数の要素で構成される第1オブジェクト
および第2オブジェクトの最短距離を取得するためのオ
ブジェクト間の最短距離取得方法であって、 A)最短距離Dminを初期値に設定する段階と、 B)前記第1オブジェクトを構成する複数の要素のうち
から配列順と異なる所定の読出順に基づいて第1対象要
素を決定し、前記第1対象要素の位置情報を読み出す段
階と、 C)前記第2オブジェクトを構成する複数の要素のうち
から配列順と異なる所定の読出順に基づいて第2対象要
素を決定し、前記第2対象要素の位置情報を読み出す段
階と、 D)前記第1対象要素および第2対象要素の位置情報に
基づいて、第1対象要素と第2対象要素の距離を簡易判
定して、簡易判定距離Drghに設定する段階と、 E)前記簡易判定距離Drghと最短距離Dminとを比較
し、簡易判定距離Drghが最短距離Dminを超えている場
合にはC段階に移行し、簡易判定距離Drghが最短距離
Dmin以下である場合には、前記第1対象要素と第2対
象要素の位置情報に基づいて第1対象要素と第2対象要
素の距離を詳細判定し要素距離Dobjに設定する段階
と、 F)前記要素距離Dobjと最短距離Dminとを比較し、要
素距離Dobjが最短距離Dminを超えている場合にはC段
階に移行し、要素距離Dobjが最短距離Dmin以下である
場合には、要素距離Dobjを最短距離Dminに代入する段
階と、 G)前記第2オブジェクトを構成する複数の要素のうち
第2対象要素になっていないものがある場合にはC段階
に移行し、全ての要素が第2対象要素になったと判断さ
れる場合にはH段階に移行する段階と、 H)前記第1オブジェクトを構成する複数の要素のうち
第1対象要素になっていないものがある場合にはB段階
に移行し、全ての要素が第1対象要素になったと判断さ
れる場合には処理を終了する段階と、を含むオブジェク
ト間の最短距離取得方法。
5. A method for obtaining the shortest distance between objects for obtaining the shortest distance between a first object and a second object composed of a plurality of elements, the method comprising: A) setting the shortest distance Dmin to an initial value. B) determining a first target element from a plurality of elements constituting the first object based on a predetermined reading order different from the arrangement order, and reading the position information of the first target element; and C). Determining a second target element from a plurality of elements forming the second object based on a predetermined reading order different from the arrangement order, and reading the position information of the second target element; D) the first target Easily determining the distance between the first target element and the second target element based on the positional information of the element and the second target element, and setting the distance to the simple determination distance Drgh; and E) the simple determination distance Drgh. The short distance Dmin is compared, and when the simple determination distance Drgh exceeds the shortest distance Dmin, the process shifts to the C stage, and when the simple determination distance Drgh is the shortest distance Dmin or less, the first target element A step of making a detailed determination of the distance between the first target element and the second target element based on the position information of the second target element and setting it as the element distance Dobj; If the distance Dobj exceeds the shortest distance Dmin, the process shifts to the step C; if the element distance Dobj is less than or equal to the shortest distance Dmin, the element distance Dobj is substituted for the shortest distance Dmin; If there is any element that does not become the second target element among the plurality of elements that make up the two objects, move to stage C. If it is determined that all the elements have become the second target element, go to stage H. H) the first object If there is any element that does not become the first target element among the plurality of elements that make up the object, the process moves to stage B, and if it is determined that all of the elements have become the first target element, the processing ends. A method for obtaining the shortest distance between objects including a step and a step.
JP2002091511A 2002-03-28 2002-03-28 How to get the shortest distance between objects Expired - Fee Related JP4031942B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002091511A JP4031942B2 (en) 2002-03-28 2002-03-28 How to get the shortest distance between objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002091511A JP4031942B2 (en) 2002-03-28 2002-03-28 How to get the shortest distance between objects

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2007240899A Division JP4589369B2 (en) 2007-09-18 2007-09-18 How to get the shortest distance between objects

Publications (2)

Publication Number Publication Date
JP2003288377A true JP2003288377A (en) 2003-10-10
JP4031942B2 JP4031942B2 (en) 2008-01-09

Family

ID=29236577

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002091511A Expired - Fee Related JP4031942B2 (en) 2002-03-28 2002-03-28 How to get the shortest distance between objects

Country Status (1)

Country Link
JP (1) JP4031942B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020217440A1 (en) * 2019-04-26 2020-10-29 三菱電機エンジニアリング株式会社 Collision sensing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020217440A1 (en) * 2019-04-26 2020-10-29 三菱電機エンジニアリング株式会社 Collision sensing device

Also Published As

Publication number Publication date
JP4031942B2 (en) 2008-01-09

Similar Documents

Publication Publication Date Title
EP1710720B1 (en) Method of computer-aided design of a modeled object having several faces
US20080246766A1 (en) Numerical analysis mesh generating method and apparatus
CN103649856A (en) Method for simulating machining of objects by motion of tool and system and computer program product therefor
CN103871102B (en) A kind of road three-dimensional fine modeling method based on elevational point and road profile face
CA2168917A1 (en) Virtual machining techniques for modifying computer models of parts
EP3563353A1 (en) Systems and methods for lightweight precise 3d visual format
US20100194766A1 (en) Apparatus, method, and program for structuring visualization object data; and apparatus, method, and program for visualizing visualization object data
CN101901503A (en) Use the mesh parameterization of the stretching, extension driving of spectral analysis
CN110134752A (en) Three-dimensional large scene modeling data processing method and processing device
US20040001060A1 (en) Accurate boolean operations for subdivision surfaces and relaxed fitting
CN112233249A (en) B spline surface fitting method and device based on dense point cloud
US7348976B2 (en) Three-dimensional shape display program, three-dimensional shape display method, and three-dimensional shape display apparatus
CN105760570A (en) Viewpoint selection in the redering of a set of objects
JP3968056B2 (en) Shape creation apparatus, control method for operating computer apparatus as shape creation apparatus, and computer-executable program for causing computer apparatus to execute control method
JP3786410B2 (en) Fillet creation method and 3D CAD program
JP4628160B2 (en) 3D model processing method
JP2020115338A (en) Generation of structured 3d model from raw mesh
JP2003288377A (en) Method for acquiring shortest distance between objects
JP4589369B2 (en) How to get the shortest distance between objects
US7304642B2 (en) Analysis model producing/assisting apparatus
CN113674294A (en) 3D model slice processing method and device
CN109509249B (en) Virtual scene light source intelligent generation method based on components
US20040102938A1 (en) Method and device for creating analytical mesh data
CN115087983A (en) Method and system for hybrid modeling using geometric patches
JP3798672B2 (en) Deformed shape calculation apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070424

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070625

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070724

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070918

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: 20071016

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071022

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101026

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101026

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111026

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111026

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121026

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121026

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131026

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees