JP5878907B2 - Interference determination apparatus, interference determination method, and interference determination program - Google Patents

Interference determination apparatus, interference determination method, and interference determination program Download PDF

Info

Publication number
JP5878907B2
JP5878907B2 JP2013225697A JP2013225697A JP5878907B2 JP 5878907 B2 JP5878907 B2 JP 5878907B2 JP 2013225697 A JP2013225697 A JP 2013225697A JP 2013225697 A JP2013225697 A JP 2013225697A JP 5878907 B2 JP5878907 B2 JP 5878907B2
Authority
JP
Japan
Prior art keywords
interference
determination
polygon
unit
line segment
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.)
Active
Application number
JP2013225697A
Other languages
Japanese (ja)
Other versions
JP2015087943A (en
Inventor
永田 隆司
隆司 永田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Computer Engineering and Consulting Ltd
Original Assignee
Computer Engineering and Consulting 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 Computer Engineering and Consulting Ltd filed Critical Computer Engineering and Consulting Ltd
Priority to JP2013225697A priority Critical patent/JP5878907B2/en
Publication of JP2015087943A publication Critical patent/JP2015087943A/en
Application granted granted Critical
Publication of JP5878907B2 publication Critical patent/JP5878907B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Manipulator (AREA)
  • Processing Or Creating Images (AREA)

Description

本発明は、干渉判定装置、干渉判定方法、及び干渉判定プログラムに関する。   The present invention relates to an interference determination device, an interference determination method, and an interference determination program.

従来、3次元仮想空間内に複数の物体を配置して、当該物体同士の干渉や近接の検証を行うシミュレーションが行われている。なお、本明細書において、干渉とは複数の物体が同じ空間を占有することであり、近接とは複数の物体が所定距離以内まで接近することである。このような干渉や近接の検証は、設備やロボットなどの間での衝突の防止の他、機械による物体の把持の判定、光センサーの判定など幅広い用途に用いられている。   Conventionally, a simulation is performed in which a plurality of objects are arranged in a three-dimensional virtual space, and interference and proximity verification between the objects are performed. In this specification, interference means that a plurality of objects occupy the same space, and proximity means that a plurality of objects approach within a predetermined distance. Such verification of interference and proximity is used in a wide range of applications such as determination of gripping of an object by a machine and determination of an optical sensor, in addition to prevention of a collision between equipment and a robot.

3次元仮想空間内の物体の表面の形状は、三角形などの多角形(ポリゴン)を繋ぎ合わせることで表現されることがある。このような物体同士の干渉を判定する方法の1つは、一方の物体の表面の形状を示す多角形と、もう一方の物体の表面の形状を示す多角形の辺とが交差するか否かという幾何学的計算を行うことである。また、その他にも物体間の干渉をより高速に判定するための技術が開示されている(特許文献1)。   The shape of the surface of an object in the three-dimensional virtual space may be expressed by connecting polygons (polygons) such as triangles. One of the methods for determining such interference between objects is whether or not a polygon indicating the shape of the surface of one object intersects with a polygon side indicating the shape of the surface of the other object. Is to perform a geometric calculation. In addition, a technique for determining interference between objects at higher speed is disclosed (Patent Document 1).

特開平11−250122号公報JP 11-250122 A

しかしながら、従来の技術では、物体同士の干渉や近接の判定に要する計算量が多い場合があった。例えば、三角形を繋ぎ合わせて曲面を表現する場合、その精密さを高めれば高めるほど、必要な三角形の数は飛躍的に増加する。そのため、上記のような幾何学的な計算を用いて干渉や近接の判定を行うと、その計算量は膨大となってしまう。このように、複数の物体間の干渉や近接を少ない計算量で判定することができない場合があった。   However, in the conventional technique, there are cases where the amount of calculation required for the determination of the interference and proximity of objects is large. For example, when a curved surface is expressed by connecting triangles, the number of necessary triangles increases dramatically as the precision increases. Therefore, if interference or proximity determination is performed using the geometric calculation as described above, the amount of calculation becomes enormous. As described above, there are cases where it is not possible to determine interference or proximity between a plurality of objects with a small amount of calculation.

本発明は上記の点に鑑みてなされたものであり、複数の物体間の干渉や近接を少ない計算量で判定する干渉判定装置、干渉判定方法、及び干渉判定プログラムを提供する。   The present invention has been made in view of the above points, and provides an interference determination apparatus, an interference determination method, and an interference determination program for determining interference and proximity between a plurality of objects with a small amount of calculation.

本発明は上記の課題を解決するためになされたものであり、本発明の一態様は、複数の物体のうちの第1の物体の表面の形状を示す複数の多角形のうち、少なくとも1つの多角形を判定対象の多角形として選択する選択部と、前記選択された判定対象の多角形を包含する閉曲面であって、前記判定対象の多角形に対応する或る点又は前記判定対象の多角形に対応する第1の線分との距離が一定である閉曲面と、前記複数の物体のうちの第2の物体の表面の形状を示す第2の線分との干渉を前記距離に基づいて判定する判定部と、を備える干渉判定装置である。   SUMMARY An advantage of some aspects of the invention is that at least one of a plurality of polygons indicating a shape of a surface of a first object among the plurality of objects is selected. A selection unit that selects a polygon as a polygon to be determined; and a closed curved surface that includes the selected polygon to be determined, the point corresponding to the polygon to be determined or the determination target Interference between the closed curved surface having a constant distance from the first line segment corresponding to the polygon and the second line segment indicating the shape of the surface of the second object among the plurality of objects is defined as the distance. An interference determination apparatus comprising: a determination unit configured to perform determination based on the determination unit.

また、本発明の一態様は、上記の干渉判定装置において、前記第2の線分とは、前記第2の物体の表面の形状を示す複数の多角形のうちの1つの多角形の1つの辺である。   According to another aspect of the present invention, in the interference determination apparatus, the second line segment is one of a plurality of polygons indicating a shape of a surface of the second object. It is an edge.

また、本発明の一態様は、上記の干渉判定装置において、前記判定対象の多角形のうちの少なくとも1つの多角形が三角形である。   According to another aspect of the present invention, in the interference determination apparatus, at least one of the polygons to be determined is a triangle.

また、本発明の一態様は、上記の干渉判定装置において、前記第1の線分とは、前記判定対象の三角形の3辺のうちの2辺各々の中点を通る線分である。   Further, according to one aspect of the present invention, in the interference determination apparatus, the first line segment is a line segment that passes through a midpoint of each of two sides of the three sides of the determination target triangle.

また、本発明の一態様は、上記の干渉判定装置において、前記第1の線分の長さは、前記判定対象の三角形の1つの辺の長さである。   According to another aspect of the present invention, in the interference determination apparatus, the length of the first line segment is a length of one side of the determination target triangle.

また、本発明の一態様は、上記の干渉判定装置において、前記或る点とは、前記判定対象の三角形の外心である。   Further, according to one aspect of the present invention, in the interference determination apparatus, the certain point is an outer center of the determination target triangle.

また、本発明の一態様は、上記の干渉判定装置において、前記選択部は、複数の物体のうちの第1の物体の表面の形状を示す複数の多角形のうち、前記判定部が前記第2の線分との干渉を判定するための前記閉曲面としての第1の閉曲面に包含されない少なくとも1つの多角形を、前記判定対象の多角形として選択し、前記判定部は、前記閉曲面としての第2の閉曲面と前記第2の線分との干渉を判定する。   Further, according to one aspect of the present invention, in the interference determination apparatus, the selection unit includes a plurality of polygons that indicate a shape of a surface of a first object among the plurality of objects, and the determination unit includes the first At least one polygon that is not included in the first closed curved surface as the closed curved surface for determining interference with the two line segments is selected as the polygon to be determined, and the determining unit includes the closed curved surface The interference between the second closed curved surface and the second line segment is determined.

また、本発明の一態様は、上記の干渉判定装置において、前記第1の物体の表面の形状を示す複数の多角形のうちの少なくとも1つの多角形を、前記距離に基づいて複数の多角形に分割する分割部を備え、前記選択部は、前記分割部による分割後の複数の多角形のうちの少なくとも1つの多角形を、前記判定対象として選択する。   One embodiment of the present invention is the above-described interference determination device, wherein at least one of the plurality of polygons indicating the shape of the surface of the first object is converted into a plurality of polygons based on the distance. The selection unit selects at least one polygon among the plurality of polygons after the division by the division unit as the determination target.

また、本発明の一態様は、上記の干渉判定装置において、前記分割部は、前記第1の物体の表面の形状を示す複数の多角形のうちの少なくとも1つの多角形を、前記距離に基づいて2つから5つの多角形に分割する。   Further, according to one aspect of the present invention, in the interference determination apparatus, the division unit uses at least one polygon among a plurality of polygons indicating the shape of the surface of the first object based on the distance. Divide into 2 to 5 polygons.

また、本発明の一態様は、上記の干渉判定装置において、前記分割部による分割前の複数の多角形のうちの少なくとも1つの多角形とは、三角形であり、前記分割部は、前記分割前の多角形のうちの少なくとも1つの三角形を、当該三角形の1つの中線により前記分割後の複数の多角形としての2つの三角形に分割する。   Further, according to one aspect of the present invention, in the interference determination apparatus, at least one of the plurality of polygons before division by the division unit is a triangle, and the division unit is before the division. Are divided into two triangles as a plurality of polygons after the division by one middle line of the triangles.

また、本発明の一態様は、上記の干渉判定装置において、前記判定部は、前記或る点又は前記第1の線分と前記閉曲面との距離、及び前記或る点又は前記第1の線分と前記第2の線分との距離の比較に基づいて前記干渉を判定する。   According to another aspect of the present invention, in the interference determination apparatus, the determination unit includes a distance between the certain point or the first line segment and the closed curved surface, and the certain point or the first point. The interference is determined based on a comparison of the distance between the line segment and the second line segment.

また、本発明の一態様は、選択部が、複数の物体のうちの第1の物体の表面の形状を示す複数の多角形のうちの少なくとも1つの多角形を判定対象として選択する選択過程と、判定部が、前記選択された判定対象の多角形を包含する閉曲面であって、前記判定対象の多角形に対応する或る点又は前記判定対象の多角形に対応する第1の線分との距離が一定である閉曲面と、前記複数の物体のうちの第2の物体の表面の形状を示す第2の線分との干渉を前記距離に基づいて判定する判定過程と、を有する干渉判定方法である。   One aspect of the present invention is a selection process in which the selection unit selects, as a determination target, at least one of the plurality of polygons indicating the shape of the surface of the first object among the plurality of objects. The determination unit is a closed curved surface including the selected determination target polygon, and a certain point corresponding to the determination target polygon or a first line segment corresponding to the determination target polygon And a determination process for determining interference between the closed curved surface having a constant distance to the second line segment indicating the shape of the surface of the second object among the plurality of objects based on the distance. This is an interference determination method.

また、本発明の一態様は、コンピュータに、複数の物体のうちの第1の物体の表面の形状を示す複数の多角形のうちの少なくとも1つの多角形を判定対象として選択する選択手順と、前記選択された判定対象の多角形を包含する閉曲面であって、前記判定対象の多角形に対応する或る点又は前記判定対象の多角形に対応する第1の線分との距離が一定である閉曲面と、前記複数の物体のうちの第2の物体の表面の形状を示す第2の線分との干渉を前記距離に基づいて判定する判定手順と、を実行させるための干渉判定プログラムである。   According to one aspect of the present invention, a selection procedure for causing a computer to select at least one polygon among a plurality of polygons indicating a shape of a surface of a first object among a plurality of objects as a determination target; A closed curved surface including the selected polygon to be determined, and a distance from a certain point corresponding to the polygon to be determined or a first line segment corresponding to the polygon to be determined is constant. And a determination procedure for determining, based on the distance, an interference between the closed curved surface and the second line segment indicating the shape of the surface of the second object among the plurality of objects. It is a program.

本発明によれば、複数の物体間の干渉や近接を少ない計算量で判定することができる。   According to the present invention, interference and proximity between a plurality of objects can be determined with a small amount of calculation.

本発明の第1の実施形態に係る干渉判定装置の使用環境の一例を説明する概要図である。It is a schematic diagram explaining an example of the use environment of the interference determination apparatus which concerns on the 1st Embodiment of this invention. 第1の実施形態に係る干渉判定装置の機能構成の一例を示すブロック図である。It is a block diagram which shows an example of a function structure of the interference determination apparatus which concerns on 1st Embodiment. 第1の実施形態に係る干渉判定装置が行う干渉の判定の処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process of the interference determination which the interference determination apparatus which concerns on 1st Embodiment performs. 第1の実施形態に係る三次元仮想空間内の物体の表面の形状を示す判定対象の三角形を包含する閉曲面の一例を示す模式図である。It is a schematic diagram which shows an example of the closed curved surface containing the triangle of the determination target which shows the shape of the surface of the object in the three-dimensional virtual space which concerns on 1st Embodiment. 第1の実施形態に係る判定部の閉曲面設定部が判定対象の多角形に閉曲面を設定する処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process in which the closed surface setting part of the determination part which concerns on 1st Embodiment sets a closed surface in the polygon of determination object. 本発明の第2の実施形態に係る干渉判定装置の機能構成の一例を示すブロック図である。It is a block diagram which shows an example of a function structure of the interference determination apparatus which concerns on the 2nd Embodiment of this invention. 第2の実施形態に係る三次元仮想空間内の物体の表面の形状を示す判定対象の多角形の分割方法の一例を示す模式図である。It is a schematic diagram which shows an example of the division | segmentation method of the polygon of the determination target which shows the shape of the surface of the object in the three-dimensional virtual space which concerns on 2nd Embodiment. 第2の実施形態に係る干渉判定装置が判定対象の多角形に閉曲面を設定する処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process in which the interference determination apparatus which concerns on 2nd Embodiment sets a closed curved surface in the polygon of determination object. 本発明の第3の実施形態に係る干渉判定装置の機能構成の一例を示すブロック図である。It is a block diagram which shows an example of a function structure of the interference determination apparatus which concerns on the 3rd Embodiment of this invention. 第3の実施形態に係る閉曲面設定テーブルの一例を示す表である。It is a table | surface which shows an example of the closed surface setting table which concerns on 3rd Embodiment.

<第1の実施形態>
[干渉判定装置の使用環境]
以下、図面を参照しながら本発明の第1の実施形態について詳しく説明する。図1は、本発明の第1の実施形態に係る干渉判定装置100の使用環境の一例を説明する概要図である。本実施形態における干渉判定装置100は、製造ラインの設計に係る製造ラインシミュレーターである。干渉判定装置100が干渉や近接の判定を行う対象は、3次元仮想空間内に製造ラインを再現したポリゴンデータ200である。例えば、ポリゴンデータ200には、その表面の形状が多角形(ポリゴン)で表現された製造ラインの各設備やロボット210(A)〜210(B)、製品220(A)〜220(B)などが仮想空間内に配置された様子が記述されている。干渉判定装置100は、ポリゴンデータ200について、仮想空間内に配置されている各物体同士の干渉や近接を判定することで、製造ラインを構成する各要素を正しく動作・移動・配置させることができる。
<First Embodiment>
[Usage environment of interference judgment device]
Hereinafter, a first embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a schematic diagram illustrating an example of an environment in which the interference determination apparatus 100 according to the first embodiment of the present invention is used. The interference determination apparatus 100 in the present embodiment is a production line simulator related to the design of a production line. The object for which the interference determination apparatus 100 determines interference or proximity is polygon data 200 that reproduces a production line in a three-dimensional virtual space. For example, the polygon data 200 includes equipment on a production line whose surface shape is represented by polygons (polygons), robots 210 (A) to 210 (B), products 220 (A) to 220 (B), and the like. Is described in a virtual space. The interference determination apparatus 100 can correctly operate / move / place each element constituting the production line by determining the interference and proximity of the objects arranged in the virtual space with respect to the polygon data 200. .

実際の製造ラインでは、各要素が適切なタイミングで連続して動作したり、移動したりすることが求められる。このような動きのある製造ラインについてのシミュレーションに対して、干渉判定装置100は、干渉や近接の判定を行う。従って、干渉判定装置100は、製造ライン300の各構成要素の配置が適切か否かを判定し、当該構成要素を動作・移動させる制御プログラムが適切か否かを判定することができる。   In an actual production line, each element is required to continuously operate or move at an appropriate timing. The interference determination apparatus 100 determines interference and proximity for a simulation of a production line with such movement. Therefore, the interference determination apparatus 100 can determine whether the arrangement of each component of the production line 300 is appropriate, and can determine whether the control program for operating and moving the component is appropriate.

[構成]
図2は、干渉判定装置100の機能構成の一例を示すブロック図である。干渉判定装置100は、ポリゴン取得部110と、選択部120と、判定部140と、出力部150とを備える。さらに、判定部140は、閉曲面設定部142と、干渉演算部144と、干渉判定部146と、を備える。なお、図示はしていないが、干渉判定装置100は、コンピュータが一般的に備えるCPU(Central Processing Unit)や記憶部、入力部、出力部などを備えている。近接判定値400は、記憶部に格納されており、判定部140の処理に使用される。
[Constitution]
FIG. 2 is a block diagram illustrating an example of a functional configuration of the interference determination apparatus 100. The interference determination apparatus 100 includes a polygon acquisition unit 110, a selection unit 120, a determination unit 140, and an output unit 150. Furthermore, the determination unit 140 includes a closed curved surface setting unit 142, an interference calculation unit 144, and an interference determination unit 146. Although not shown, the interference determination apparatus 100 includes a CPU (Central Processing Unit), a storage unit, an input unit, an output unit, and the like that are generally included in a computer. The proximity determination value 400 is stored in the storage unit and used for the processing of the determination unit 140.

干渉判定装置100の各機能部は、例えば、干渉判定装置100が備えるCPUが記憶部に格納されたプログラムを実行することにより機能するソフトウェア機能部である。また、これらの機能部の一部又は全部は、LSI(Large Scale Integration)やASIC(Application Specific Integrated Circuit)等のハードウェア機能部であってもよい。記憶部は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ、レジスタなどであり、HDD(Hard Disk Drive)などのドライブ装置や外部メモリなどであってもよい。記憶部には、近接判定値400の他、各機能部の処理結果や処理の途中で生じる一時的なデータ、CPUによって実行されるプログラムなどが記憶される。   Each functional unit of the interference determination apparatus 100 is, for example, a software function unit that functions when a CPU included in the interference determination apparatus 100 executes a program stored in a storage unit. In addition, some or all of these functional units may be hardware functional units such as LSI (Large Scale Integration) and ASIC (Application Specific Integrated Circuit). The storage unit is, for example, a RAM (Random Access Memory), a ROM (Read Only Memory), a flash memory, a register, or the like, and may be a drive device such as an HDD (Hard Disk Drive) or an external memory. In addition to the proximity determination value 400, the storage unit stores processing results of each functional unit, temporary data generated during the processing, a program executed by the CPU, and the like.

[処理の概要]
以下、各機能ブロックによる処理の概要を示す。ポリゴン取得部110は、3次元空間内にポリゴンで表現される複数の物体が配置されたポリゴンデータ202を取得し、選択部120に出力する。選択部120は、ポリゴン取得部110から入力されたポリゴンデータに記述されている複数の物体から、干渉や近接の判定を行う2つの物体を選択する。次に、選択部120は、選択した2つの物体のうちの1つの物体(第1の物体)の表面の形状を示す複数の多角形のうち、少なくとも1つの多角形を判定対象の多角形として選択する。すなわち、選択部120は、複数の物体のうちの第1の物体の表面の形状を示す複数の多角形のうち、少なくとも1つの多角形を判定対象の多角形として選択する。そして、選択部120は、選択した判定対象の多角形を示す情報を判定部140の閉曲面設定部142に出力する。また、選択部120は、干渉や近接の判定を行う2つの物体のうちのもう1つの物体(第2の物体)から、その表面の形状を示す線分(第2の線分)を選択し、当該第2の線分を示す情報を判定部140の干渉演算部144に出力する。
[Process overview]
The outline of processing by each functional block will be described below. The polygon acquisition unit 110 acquires polygon data 202 in which a plurality of objects represented by polygons are arranged in a three-dimensional space, and outputs the polygon data 202 to the selection unit 120. The selection unit 120 selects two objects for performing interference and proximity determination from a plurality of objects described in the polygon data input from the polygon acquisition unit 110. Next, the selection unit 120 sets at least one polygon as a polygon to be determined among a plurality of polygons indicating the shape of the surface of one of the two selected objects (first object). select. That is, the selection unit 120 selects at least one polygon as a polygon to be determined from among a plurality of polygons indicating the shape of the surface of the first object among the plurality of objects. Then, the selection unit 120 outputs information indicating the selected polygon to be determined to the closed surface setting unit 142 of the determination unit 140. Further, the selection unit 120 selects a line segment (second line segment) indicating the shape of the surface from another object (second object) of the two objects that perform interference and proximity determination. The information indicating the second line segment is output to the interference calculation unit 144 of the determination unit 140.

なお、判定対象の多角形を示す情報とは、例えば、当該多角形に固有に定められた識別子(後述)や当該多角形の頂点の座標などである。また、第2の線分とは、例えば、第2の物体の表面の形状を示す稜線である。また、第2の線分を示す情報とは、例えば、当該線分の2つの端点の座標である。   The information indicating the polygon to be determined is, for example, an identifier (described later) that is uniquely determined for the polygon, coordinates of the vertex of the polygon, and the like. The second line segment is, for example, a ridge line indicating the shape of the surface of the second object. The information indicating the second line segment is, for example, the coordinates of the two end points of the line segment.

閉曲面設定部142は、まず、選択部120から判定対象の多角形を示す情報と、記憶部に格納されている近接判定値400とを取得する。次に、閉曲面設定部142は、選択された判定対象の多角形を包含する閉曲面を設定する。また、この閉曲面は、当該閉曲面と判定対象の多角形に対応する点又は判定対象の多角形に対応する線分(第1の線分)との距離が近接判定値400が示す距離になるように設定される。すなわち、判定部140の閉曲面設定部142は、選択された判定対象の多角形を包含する閉曲面であって、判定対象の多角形に対応する或る点又は判定対象の多角形に対応する第1の線分との距離が一定である閉曲面を設定する。そして、閉曲面設定部142は、設定した閉曲面を示す情報を干渉演算部144に出力する。ここで、閉曲面を示す情報とは、例えば、当該閉曲面の中心に位置する或る点の座標や、当該閉曲面の中心に位置する第1の線分の2つの端点の座標などである。   The closed curved surface setting unit 142 first acquires information indicating the polygon to be determined from the selection unit 120 and the proximity determination value 400 stored in the storage unit. Next, the closed curved surface setting unit 142 sets a closed curved surface including the selected polygon to be determined. In addition, the distance between the closed curved surface and a point corresponding to the polygon to be determined or a line segment (first line segment) corresponding to the polygon to be determined is a distance indicated by the proximity determination value 400. Is set to be That is, the closed surface setting unit 142 of the determination unit 140 is a closed surface including the selected determination target polygon, and corresponds to a certain point corresponding to the determination target polygon or the determination target polygon. A closed curved surface having a constant distance from the first line segment is set. Then, the closed curved surface setting unit 142 outputs information indicating the set closed curved surface to the interference calculating unit 144. Here, the information indicating the closed surface is, for example, the coordinates of a certain point located at the center of the closed surface, the coordinates of two end points of the first line segment located at the center of the closed surface, or the like. .

干渉演算部144は、選択部120から第2の線分を示す情報と、閉曲面設定部142から閉曲面を示す情報とを取得する。次に、干渉演算部144は、第2の線分と判定対象の多角形に対応する或る点又は第1の線分との距離を算出する。干渉演算部144は、算出した距離を干渉判定部146に出力する。   The interference calculation unit 144 acquires information indicating the second line segment from the selection unit 120 and information indicating the closed curved surface from the closed curved surface setting unit 142. Next, the interference calculation unit 144 calculates the distance between the second line segment and a certain point corresponding to the polygon to be determined or the first line segment. The interference calculation unit 144 outputs the calculated distance to the interference determination unit 146.

干渉判定部146は、干渉演算部144から干渉演算部144が算出した距離を取得し、記憶部から近接判定値400を取得する。次に、干渉判定部146は、干渉演算部144により算出された距離と近接判定値400が示す距離とを比較する。そして、干渉判定部146は、算出された距離が近接判定値400が示す距離以下であれば、判定対象の三角形に対応する閉曲面と第2の線分とが「干渉する」と判定する。算出された距離が近接判定値400が示す距離より大きければ、干渉判定部146は、判定対象の三角形に対応する閉曲面と第2の線分とが「干渉しない」と判定する。   The interference determination unit 146 acquires the distance calculated by the interference calculation unit 144 from the interference calculation unit 144, and acquires the proximity determination value 400 from the storage unit. Next, the interference determination unit 146 compares the distance calculated by the interference calculation unit 144 with the distance indicated by the proximity determination value 400. If the calculated distance is equal to or less than the distance indicated by the proximity determination value 400, the interference determination unit 146 determines that the closed curved surface corresponding to the determination target triangle and the second line segment “interfere”. If the calculated distance is larger than the distance indicated by the proximity determination value 400, the interference determination unit 146 determines that the closed curved surface corresponding to the determination target triangle and the second line segment do not interfere.

すなわち、判定部140は、選択された判定対象の多角形を包含する閉曲面であって、判定対象の多角形に対応する或る点又は判定対象の多角形に対応する第1の線分との距離が一定である閉曲面と、複数の物体のうちの第2の物体の表面の形状を示す第2の線分との干渉を近接判定値400が示す距離に基づいて判定する。また、判定部140は、或る点又は第1の線分と閉曲面との距離、及び或る点又は第1の線分と第2の線分との距離の比較に基づいて干渉を判定する。干渉判定部146は、判定結果を出力部150に出力する。   That is, the determination unit 140 is a closed curved surface including the selected determination target polygon, and a certain point corresponding to the determination target polygon or a first line segment corresponding to the determination target polygon Is determined based on the distance indicated by the proximity determination value 400. The interference between the closed curved surface having a constant distance and the second line segment indicating the shape of the surface of the second object among the plurality of objects is determined. Further, the determination unit 140 determines interference based on a comparison of a distance between a certain point or first line segment and the closed curved surface, and a distance between a certain point or first line segment and the second line segment. To do. The interference determination unit 146 outputs the determination result to the output unit 150.

出力部150は、干渉判定部146から判定結果を取得する。出力部150は、取得した判定結果に基づいて、干渉を示した物体やその部品を報知するための情報を生成し、出力する。或いは、出力部150は、干渉しないことを報知するための情報を生成し、出力する。出力部150は、例えば、液晶ディスプレイや有機EL(Electroluminescence)ディスプレイなどを備え、視覚的に上記判定結果を表示してもよい。   The output unit 150 acquires a determination result from the interference determination unit 146. Based on the acquired determination result, the output unit 150 generates and outputs information for notifying the object and its parts that have shown interference. Alternatively, the output unit 150 generates and outputs information for notifying that there is no interference. The output unit 150 may include, for example, a liquid crystal display, an organic EL (Electroluminescence) display, and the like, and visually display the determination result.

なお、ポリゴン取得部110が取得するポリゴンデータ202は、例えば、CAD(Computer aided design、コンピュータ支援設計)システムやCAM(Computer aided manufacturing、コンピュータ支援製造)システムなどによって用意されるが、そのデータ構造は、特定の形式に限定されない。また、ポリゴンデータ内で記述される物体の表面の形状を示す多角形の頂点の数は、特定の数に限定されない。本発明は、当該多角形が四角形や五角形などであったとしても適用することができるが、以下では、当該多角形が三角形である場合について説明する。すなわち、判定対象の多角形のうちの少なくとも1つの多角形が三角形である。   The polygon data 202 acquired by the polygon acquisition unit 110 is prepared by, for example, a CAD (Computer Aided Design) system or a CAM (Computer Aided Manufacturing) system. , Not limited to a particular format. Further, the number of vertices of a polygon indicating the shape of the surface of the object described in the polygon data is not limited to a specific number. Although the present invention can be applied even if the polygon is a quadrangle or a pentagon, a case where the polygon is a triangle will be described below. That is, at least one of the polygons to be determined is a triangle.

また、ポリゴンデータ202において、例えば、個々の物体やその表面の形状を示す複数の多角形各々、或いは当該多角形の辺や頂点などには、それぞれを示す識別子が割り当てられている。従って、干渉判定装置100各機能部は、各物体やその一部を識別し、選択することや座標を取得することができる。また、ポリゴン取得部110が、ポリゴンデータ202を取得した後で、上記のような識別子の割り当てを行ってもよい。また、干渉判定装置100は、多角形以外で表現される、例えば、自由曲面で表現される物体のデータを、ポリゴンによる表現に変換する機能を有していてもよい。また、干渉判定装置100は、CADシステムやCAMシステムを備え、装置内でポリゴンデータ202や干渉の判定結果の授受を行い、ポリゴンデータ202の内容を変更してもよい。   In the polygon data 202, for example, each of a plurality of polygons indicating the shape of an individual object or its surface, or an edge or vertex of the polygon is assigned an identifier. Therefore, each functional unit of the interference determination apparatus 100 can identify and select each object or part thereof and obtain coordinates. Further, after the polygon acquisition unit 110 acquires the polygon data 202, the identifier may be assigned as described above. Moreover, the interference determination apparatus 100 may have a function of converting data of an object expressed by a shape other than a polygon, for example, expressed by a free-form surface into a representation by a polygon. The interference determination apparatus 100 may include a CAD system or a CAM system, and may exchange polygon data 202 and interference determination results within the apparatus to change the contents of the polygon data 202.

また、第2の線分は、第2の物体の表面の形状を示すものであればよい。従って、第2の線分は、例えば、第2の物体の表面の形状を示す三角形について、当該三角形の内部或いは近傍に位置する2つの点を結んだ線分であったり、当該三角形の中点を結んだ線分であったりしてもよい。   The second line segment only needs to indicate the shape of the surface of the second object. Accordingly, the second line segment is, for example, a line segment connecting two points located inside or near the triangle of the triangle indicating the shape of the surface of the second object, or the midpoint of the triangle It may be a line segment connecting

[具体的な処理の流れ]
以下、干渉判定装置100が行う具体的な処理の一例について説明する。図3は、干渉判定装置100による干渉の判定の処理の一例を示すフローチャートである。
(ステップS300)まず、ポリゴン取得部110は、ポリゴンデータ202を取得し、選択部120に出力する。
(ステップS302)次に、選択部120は、ポリゴン取得部110から入力されたポリゴンデータに記述されている複数の物体から、干渉や近接の判定を行う対象としての2つの物体の第1の物体と第2の物体とを選択する。
(ステップS304)次に、選択部120は、第1の物体について、その表面の形状を示す複数の三角形のうちの1つの三角形を判定対象として選択する。選択部120は、選択した判定対象の三角形の3つの頂点の座標を閉曲面設定部142に出力する。この判定対象の三角形の3つの頂点の座標とは、上記の判定対象の多角形を示す情報の一例である。
[Specific processing flow]
Hereinafter, an example of specific processing performed by the interference determination apparatus 100 will be described. FIG. 3 is a flowchart illustrating an example of interference determination processing by the interference determination apparatus 100.
(Step S300) First, the polygon acquisition unit 110 acquires the polygon data 202 and outputs it to the selection unit 120.
(Step S <b> 302) Next, the selection unit 120 is a first object of two objects that are targets for interference / proximity determination from a plurality of objects described in the polygon data input from the polygon acquisition unit 110. And a second object.
(Step S304) Next, the selection unit 120 selects one of the plurality of triangles indicating the shape of the surface of the first object as a determination target. The selection unit 120 outputs the coordinates of the three vertices of the selected determination target triangle to the closed surface setting unit 142. The coordinates of the three vertices of the determination target triangle are examples of information indicating the determination target polygon.

(ステップS306)次に、閉曲面設定部142は、選択部から入力された判定対象の三角形の3つの頂点の座標と、記憶部から取得した近接判定値400とに基づいて、閉曲面を設定する。閉曲面の設定については、後述する。そして、閉曲面設定部142は、設定した閉曲面の中心に位置する点の座標又は第1の線分の2つの端点の座標を干渉演算部144に出力する。これら閉曲面の中心に位置する点の座標又は第1の線分の2つの端点の座標とは、上記の閉曲面を示す情報の一例である。   (Step S306) Next, the closed surface setting unit 142 sets a closed surface based on the coordinates of the three vertices of the determination target triangle input from the selection unit and the proximity determination value 400 acquired from the storage unit. To do. The setting of the closed curved surface will be described later. Then, the closed curved surface setting unit 142 outputs the coordinates of the point located at the center of the set closed curved surface or the coordinates of the two end points of the first line segment to the interference calculating unit 144. The coordinates of the point located at the center of these closed surfaces or the coordinates of the two end points of the first line segment are examples of information indicating the above-described closed surface.

(ステップS308)次に、選択部120は、第2の物体の稜線の1つを第2の線分として選択する。すなわち、この一例において、第2の線分とは、第2の物体の表面の形状を示す複数の多角形のうちの1つの多角形の1つの辺である。そして、選択部120は、選択した第2の線分の2つの端点の座標を干渉演算部144に出力する。この第2の線分の2つの端点の座標とは、上記の第2の線分を示す情報の一例である。   (Step S308) Next, the selection unit 120 selects one of the ridge lines of the second object as the second line segment. That is, in this example, the second line segment is one side of one polygon among a plurality of polygons indicating the shape of the surface of the second object. Then, the selection unit 120 outputs the coordinates of the two end points of the selected second line segment to the interference calculation unit 144. The coordinates of the two end points of the second line segment are an example of information indicating the second line segment.

(ステップS310)次に、干渉演算部144は、選択部120から入力された第2の線分を示す情報と、閉曲面設定部142から入力された閉曲面を示す情報とに基づいて、第2の線分と閉曲面の中心に位置する或る点又は第1の線分との距離を算出する。当該距離の算出については、後述する。干渉演算部144は、算出した第2の線分と閉曲面との距離を干渉判定部146に出力する。   (Step S310) Next, the interference calculation unit 144 performs the first operation based on the information indicating the second line segment input from the selection unit 120 and the information indicating the closed curved surface input from the closed curved surface setting unit 142. The distance between the second line segment and a certain point or the first line segment located at the center of the closed curved surface is calculated. The calculation of the distance will be described later. The interference calculation unit 144 outputs the calculated distance between the second line segment and the closed curved surface to the interference determination unit 146.

(ステップS312)次に、干渉判定部146は、近接判定値400が示す距離と干渉演算部144が算出した距離との比較を行う。干渉演算部144が算出した距離が近接判定値400が示す距離以下のとき(ステップS312;YES)、干渉判定部146は、判定対象の三角形と第2の線分は干渉すると判定し、出力部150に判定結果を出力する。その後、ステップS314に遷移する。干渉演算部144が算出した距離が近接判定値400が示す距離より大きいとき(ステップS312;NO)、干渉判定部146は、判定対象の三角形と第2の線分は干渉しないと判定し、ステップS316に遷移する。   (Step S312) Next, the interference determination unit 146 compares the distance indicated by the proximity determination value 400 with the distance calculated by the interference calculation unit 144. When the distance calculated by the interference calculation unit 144 is equal to or smaller than the distance indicated by the proximity determination value 400 (step S312; YES), the interference determination unit 146 determines that the determination target triangle and the second line segment interfere with each other, and the output unit The determination result is output to 150. Then, the process proceeds to step S314. When the distance calculated by the interference calculation unit 144 is larger than the distance indicated by the proximity determination value 400 (step S312; NO), the interference determination unit 146 determines that the determination target triangle and the second line segment do not interfere with each other, and step The process proceeds to S316.

(ステップS314)次に、出力部150は、干渉判定部146の判定結果に基づいて、干渉があることを示す情報を出力する。当該情報は、例えば、判定対象の三角形や第2の線分の識別子や座標を含んでもよく、干渉演算部144が算出した閉曲面の中心と第2の線分との距離などの干渉の程度を示す情報を含んでもよい。
(ステップS316)次に、選択部120は、第2の物体の表面の形状を示すすべての稜線について、第1の物体の判定対象の三角形と干渉を調べたかを確認する。第2の表面の形状を示すすべての稜線について調べているとき(ステップS316;YES)、ステップS318に遷移する。第2の物体の表面の形状を示すすべての稜線について調べていないとき(ステップS316;NO)、ステップS308に戻る。
(Step S314) Next, the output unit 150 outputs information indicating that there is interference based on the determination result of the interference determination unit 146. The information may include, for example, a triangle to be determined, an identifier or coordinates of the second line segment, and the degree of interference such as the distance between the center of the closed curved surface calculated by the interference calculation unit 144 and the second line segment. May be included.
(Step S316) Next, the selection unit 120 confirms whether all the ridge lines indicating the shape of the surface of the second object have been checked for interference with the triangle to be determined of the first object. When all the ridge lines indicating the shape of the second surface are being examined (step S316; YES), the process proceeds to step S318. When all the ridge lines indicating the shape of the surface of the second object have not been examined (step S316; NO), the process returns to step S308.

(ステップS318)次に、選択部120は、第1の物体の表面の形状を示すすべての三角形について、第2の物体との干渉を調べたか否かを確認する。第1の物体の表面の形状を示すすべての三角形について干渉を調べているとき(ステップS318;YES)、ステップS320に遷移する。第1の物体の表面の形状を示すすべての三角形について干渉を調べていないとき(ステップS318;NO)、ステップS304に戻る。
(ステップS320)出力部150は、干渉判定部146の判定結果に基づいて、干渉がないことを報知する情報を出力する。
(Step S318) Next, the selection unit 120 confirms whether or not the interference with the second object has been examined for all the triangles indicating the shape of the surface of the first object. When interference is examined for all triangles indicating the shape of the surface of the first object (step S318; YES), the process proceeds to step S320. When interference is not examined for all triangles indicating the shape of the surface of the first object (step S318; NO), the process returns to step S304.
(Step S320) The output unit 150 outputs information notifying that there is no interference based on the determination result of the interference determination unit 146.

なお、上記のフローチャートには図示していないが、ステップS306において、閉曲面設定部142が判定対象の三角形に対して閉曲面を設定しなかった場合、干渉演算部144は、従来技術に則って、当該三角形と第2の線分との交差を計算する。これについても、詳しくは後述する。また、上記のフローチャートは、仮想空間内に配置された複数の物体のうちの2つの物体についての干渉を調べる場合について記述している。仮想空間内の構成要素全体について干渉の判定を行う場合は、判定対象とする2つの物体の組み合わせを網羅的に選択し、各組み合わせで干渉を判定すればよい。この場合、干渉が検出されるたびに判定結果を出力してもよいし、すべての構成要素について干渉を判定してから、まとめて判定結果を出力してもよい。   Although not shown in the above flowchart, when the closed curved surface setting unit 142 does not set a closed curved surface for the determination target triangle in step S306, the interference calculating unit 144 follows the conventional technique. Calculate the intersection of the triangle and the second line segment. This will also be described in detail later. Further, the above-described flowchart describes a case where the interference of two objects among a plurality of objects arranged in the virtual space is examined. When determining interference for the entire component in the virtual space, it is only necessary to comprehensively select combinations of two objects to be determined and determine interference for each combination. In this case, the determination result may be output every time interference is detected, or the determination result may be output collectively after determining the interference for all the components.

また、構成要素を動かす制御プログラムのテストを行う場合は、まず、例えば、制御プログラムの指示に従って、ポリゴンデータ202の内容を更新し、仮想空間内の構成要素を動かす。次に、干渉判定装置100は、上記の処理により第1の物体と第2の物体を選択し、当該物体同士の干渉や近接を判定する。このように、ポリゴンデータ202の更新と干渉や近接の判定を繰り返すことで、制御プログラムのテストを行うことができる。   When testing a control program that moves a component, first, for example, according to an instruction of the control program, the content of the polygon data 202 is updated to move the component in the virtual space. Next, the interference determination apparatus 100 selects the first object and the second object by the above processing, and determines interference or proximity between the objects. In this way, the control program can be tested by repeating the updating of the polygon data 202 and the determination of interference and proximity.

[閉曲面の設定]
以下、閉曲面の設定について詳述する。図4は、三次元仮想空間内の物体の表面の形状を示す判定対象の三角形を包含する閉曲面の一例を示す模式図である。図4において示されているx軸y軸z軸は、それぞれ直交する3次元仮想空間の座標を示す軸である。図4(a)及び(b)の模式図は、それぞれz軸方向から見たものであり、本例では、三角形230の法線と三角形240の法線とは、z軸方向にそれぞれ一致している。dは近接判定値400によって示される距離である。図4(a)は、判定対象の三角形を包含する閉曲面が球型であるときを示している。d2は判定対象の三角形の外接円の半径の大きさである。図4(b)は、判定対象の三角形を包含する閉曲面がカプセル型であるときを示している。d3は、判定対象の三角形の最も長い辺(最長辺)の端点ではない頂点から最長辺に下ろした垂線の長さである。ただし、三角形が最長辺を2つ以上持つときは、そのいずれか1つを最長辺とする。
[Closed surface setting]
Hereinafter, the setting of the closed curved surface will be described in detail. FIG. 4 is a schematic diagram illustrating an example of a closed curved surface including a determination target triangle indicating the shape of the surface of the object in the three-dimensional virtual space. The x-axis, y-axis, and z-axis shown in FIG. 4 are axes that indicate the coordinates of the orthogonal three-dimensional virtual space. The schematic diagrams of FIGS. 4A and 4B are respectively viewed from the z-axis direction. In this example, the normal line of the triangle 230 and the normal line of the triangle 240 coincide with each other in the z-axis direction. ing. d is a distance indicated by the proximity determination value 400. FIG. 4A illustrates a case where the closed curved surface including the determination target triangle is spherical. d2 is the radius of the circumscribed circle of the triangle to be determined. FIG. 4B illustrates a case where the closed curved surface including the determination target triangle is a capsule type. d3 is the length of a perpendicular drawn from the vertex that is not the end point of the longest side (longest side) of the triangle to be judged to the longest side. However, when the triangle has two or more longest sides, one of them is the longest side.

図4(a)において、判定対象の三角形230は、判定対象の三角形の外接円の半径の大きさd2が近接判定値400によって示される距離d以下(d2≦d)である三角形である。当該三角形230を包含する閉曲面234は、当該三角形230の外心232からの距離がdとなるように設定される球型の閉曲面である。すなわち、この一例において、或る点とは、判定対象の三角形230の外心である。   In FIG. 4A, the determination target triangle 230 is a triangle whose radius d2 of the circumscribed circle of the determination target triangle is equal to or less than the distance d indicated by the proximity determination value 400 (d2 ≦ d). The closed curved surface 234 that includes the triangle 230 is a spherical closed curved surface that is set so that the distance from the outer center 232 of the triangle 230 is d. That is, in this example, a certain point is the outer center of the triangle 230 to be determined.

なお、以下においては、判定対象の三角形に対応する或る点とは、三角形の外心であるとして説明するが、当該或る点は三角形の外心でなくてもよく、例えば、垂心や重心などであってもよい。また、判定対象の三角形に対応する或る点は、当該三角形と同一平面上になくてもよい。ただし、近接判定値400が同一の条件で、判定対象の三角形に対応する或る点が外心である閉曲面は、他の方法で設定される球型の閉曲面よりも多様な形状の三角形を包含できるため、計算量をさらに低減することができる。   In the following description, a certain point corresponding to the triangle to be determined is described as being an outer center of the triangle. However, the certain point may not be an outer center of the triangle. It may be. Also, a certain point corresponding to the triangle to be determined may not be on the same plane as the triangle. However, a closed curved surface in which a certain point corresponding to the triangle to be determined is an outer center under the same proximity determination value 400 is a triangle having a variety of shapes as compared to a spherical closed curved surface set by another method. Therefore, the amount of calculation can be further reduced.

図4(b)において、判定対象の三角形240は、判定対象の三角形の最長辺の端点ではない頂点から最長辺に下ろした垂線の長さd3が近接判定値400によって示される距離dの2倍以下(d3≦2×d)である三角形である。当該三角形240に対応する第1の線分242は、当該三角形240の最長辺以外の2辺それぞれの中点を通る線分である。また、第1の線分242の長さは、当該三角形240の最長辺の長さである。また、第1の線分242の中点は、当該三角形240の最長辺の垂直2等分線上に存在する。そして、判定対象の三角形240を包含する閉曲面244は、第1の線分242からの距離がdとなるように設定されるカプセル型の閉曲面である。すなわち、この一例において、第1の線分242とは、判定対象の三角形240の3辺のうちの2辺各々の中点を通る線分である。また、この一例において、第1の線分242の長さは、判定対象の三角形240の1つの辺の長さである。   In FIG. 4B, the determination target triangle 240 has a length d3 of a perpendicular line extending from the vertex that is not the end point of the longest side of the determination target triangle to the longest side, twice the distance d indicated by the proximity determination value 400. The following is a triangle (d3 ≦ 2 × d). The first line segment 242 corresponding to the triangle 240 is a line segment that passes through the midpoint of each of the two sides other than the longest side of the triangle 240. Further, the length of the first line segment 242 is the length of the longest side of the triangle 240. Further, the midpoint of the first line segment 242 exists on the perpendicular bisector of the longest side of the triangle 240. The closed curved surface 244 that includes the determination target triangle 240 is a capsule-type closed curved surface that is set so that the distance from the first line segment 242 is d. That is, in this example, the first line segment 242 is a line segment that passes through the midpoint of each of two sides of the three sides of the triangle 240 to be determined. In this example, the length of the first line segment 242 is the length of one side of the triangle 240 to be determined.

なお、以下においては、第1の線分は、判定対象の三角形240の3辺のうちの2辺各々の中点を通る線分であり、その長さが判定対象の三角形240の最長辺の長さの線分であるとして説明するが、判定対象の三角形に対応する第1の線分は上記の通りでなくてもよく、例えば、最長辺と別の一辺それぞれの中点を結ぶ線分であってもよい。また、第1の線分は、例えば、上述の図4(b)の例のものよりも長い線分であってもよい。また、第1の線分は、判定対象の三角形と同一平面上になくてもよい。ただし、近接判定値400が同一の条件で、判定対象の三角形に対応する第1の線分が上述の図4(b)の例のように設定される閉曲面は、他の方法で設定されるカプセル型の閉曲面よりも多様な形状の三角形を包含できるため、計算量をさらに低減することができる。また、当該閉曲面は、過剰に大きくないため、判定対象の三角形の干渉や近接を過大に評価しない。   In the following, the first line segment is a line segment passing through the midpoint of each of two sides of the three sides of the determination target triangle 240, and the length of the first line segment is the longest side of the determination target triangle 240. The first line segment corresponding to the determination target triangle may not be as described above, for example, a line segment that connects the longest side and the midpoint of each other side. It may be. Further, the first line segment may be, for example, a line segment longer than that in the example of FIG. 4B described above. In addition, the first line segment may not be on the same plane as the determination target triangle. However, a closed curved surface in which the first line segment corresponding to the determination target triangle is set as in the above-described example of FIG. 4B under the same proximity determination value 400 is set by another method. Since triangles with various shapes can be included rather than a capsule-type closed curved surface, the amount of calculation can be further reduced. In addition, since the closed curved surface is not excessively large, interference and proximity of the determination target triangle are not excessively evaluated.

以下、干渉判定装置100による閉曲面の設定方法について説明する。この処理は、図3のステップS306に対応する。図5は、判定部140の閉曲面設定部142による判定対象の多角形に閉曲面を設定する処理の一例を示すフローチャートである。
(ステップS500)閉曲面設定部142は、記憶部から近接判定値400を取得する。
(ステップS502)次に、閉曲面設定部142は、選択部120が選択した判定対象の三角形の各頂点の座標から、当該三角形の外接円の半径の大きさd2とを算出する。
Hereinafter, a method for setting a closed curved surface by the interference determination apparatus 100 will be described. This process corresponds to step S306 in FIG. FIG. 5 is a flowchart illustrating an example of processing for setting a closed curved surface to a polygon to be determined by the closed curved surface setting unit 142 of the determination unit 140.
(Step S500) The closed curved surface setting unit 142 acquires the proximity determination value 400 from the storage unit.
(Step S502) Next, the closed surface setting unit 142 calculates the radius d2 of the circumscribed circle of the triangle from the coordinates of each vertex of the determination target triangle selected by the selection unit 120.

(ステップS504)次に、閉曲面設定部142は、近接判定値400によって示される距離dと算出した外接円の半径の大きさd2とを比較し、外接円の半径の大きさd2が距離d以下(d2≦d)か否かを判定する。d2≦dであるとき(ステップS504;YES)、ステップS506に遷移する。d2≦dではないとき(ステップS504;NO)、ステップS508に遷移する。
(ステップS506)次に、閉曲面設定部142は、判定対象の三角形の頂点の座標から、当該三角形の外心の座標を算出する。そして、閉曲面設定部142は、当該三角形の識別子と算出した外心の座標とを対応付けて記憶部に記憶させ、干渉演算部144に出力する。
(Step S504) Next, the closed curved surface setting unit 142 compares the distance d indicated by the proximity determination value 400 with the calculated circumscribed circle radius d2, and the circumscribed circle radius d2 is the distance d. It is then determined whether (d2 ≦ d). When d2 ≦ d (step S504; YES), the process proceeds to step S506. When d2 ≦ d is not satisfied (step S504; NO), the process proceeds to step S508.
(Step S506) Next, the closed surface setting unit 142 calculates the coordinates of the outer center of the triangle from the coordinates of the vertex of the triangle to be determined. Then, the closed curved surface setting unit 142 associates the identifier of the triangle with the calculated outer-center coordinates, stores them in the storage unit, and outputs them to the interference calculation unit 144.

(ステップS508)次に、閉曲面設定部142は、判定対象の三角形の頂点のうちの最長辺の端点ではない頂点から最長辺に下ろした垂線の長さd3を算出する。
(ステップS510)次に、閉曲面設定部142は、近接判定値400によって示される距離dとステップS508で算出した垂線の長さd3とを比較し、垂線の長さd3が距離dの2倍以下(d3≦2×d)か否かを判定する。d3≦2×dであるとき(ステップS510;YES)、ステップS512に遷移する。d3≦2×dではないとき(ステップS510;NO)、ステップS514に遷移する。
(Step S508) Next, the closed curved surface setting unit 142 calculates the length d3 of the perpendicular drawn from the vertex that is not the end point of the longest side of the vertices of the triangle to be determined to the longest side.
(Step S510) Next, the closed curved surface setting unit 142 compares the distance d indicated by the proximity determination value 400 with the perpendicular length d3 calculated in Step S508, and the perpendicular length d3 is twice the distance d. It is then determined whether (d3 ≦ 2 × d). When d3 ≦ 2 × d is satisfied (step S510; YES), the process proceeds to step S512. When d3 ≦ 2 × d is not satisfied (step S510; NO), the process proceeds to step S514.

(ステップS512)次に、閉曲面設定部142は、最長辺以外の2辺それぞれの中点を通る線分であり、その長さが最長辺の長さであり、その中点が最長辺の垂直2等分線上に存在する線分の2つの端点の座標を算出する。そして、閉曲面設定部142は、当該三角形の識別子と算出した線分の2つの端点の座標とを対応付けて記憶部に記憶させ、干渉演算部144に出力する。
(ステップS514)次に、閉曲面設定部142は、判定対象の三角形に適する閉曲面はないと判定する。そして、閉曲面設定部142は、当該三角形の識別子と閉曲面を設定しないことを示す情報とを対応付けて記憶部に記憶させ、干渉演算部144に出力する。
(Step S512) Next, the closed surface setting unit 142 is a line segment passing through the midpoint of each of the two sides other than the longest side, the length of which is the length of the longest side, and the midpoint is the longest side The coordinates of the two end points of the line segment existing on the vertical bisector are calculated. Then, the closed curved surface setting unit 142 associates the identifier of the triangle with the calculated coordinates of the two end points of the line segment, stores them in the storage unit, and outputs them to the interference calculation unit 144.
(Step S514) Next, the closed surface setting unit 142 determines that there is no closed surface suitable for the triangle to be determined. Then, the closed curved surface setting unit 142 associates the identifier of the triangle with information indicating that the closed curved surface is not set in the storage unit, and outputs the information to the interference calculation unit 144.

なお、ステップS502とステップS504との間に、ステップS503として、閉曲面設定部142は、判定対象の三角形の3つの辺の長さが距離dの2倍以下か否かを判定してもよい。不図示のステップS503において、当該各辺の長さが距離dの2倍以下の場合、ステップS504に遷移する。不図示のステップS503において、当該各辺の長さが距離dの2倍以下ではない場合、ステップS508に遷移する。このようにすることで、計算量の多い外接円の半径の大きさd2の算出処理を避けることができる場合があり、干渉判定装置100は、計算量をさらに低減することができる。   In addition, between step S502 and step S504, as step S503, the closed curved surface setting unit 142 may determine whether the lengths of the three sides of the determination target triangle are twice or less than the distance d. . In step S503 (not shown), if the length of each side is not more than twice the distance d, the process proceeds to step S504. In step S503 (not shown), if the length of each side is not less than twice the distance d, the process proceeds to step S508. By doing in this way, the calculation process of the radius d2 of the circumscribed circle having a large calculation amount may be avoided, and the interference determination apparatus 100 can further reduce the calculation amount.

[干渉演算]
以下、図3のステップS310における第2の線分と閉曲面の中心に位置する或る点又は第1の線分との距離の算出について説明する。干渉演算部144は、閉曲面設定部142による処理結果(図3のステップS306及び図5)に基づいて、以下の3つの計算(ア)〜(ウ)のうちのいずれかを行う。
[Interference calculation]
Hereinafter, calculation of the distance between the second line segment and a certain point located at the center of the closed curved surface or the first line segment in step S310 in FIG. 3 will be described. The interference calculation unit 144 performs any of the following three calculations (A) to (C) based on the processing result (Step S306 in FIG. 3 and FIG. 5) by the closed curved surface setting unit 142.

なお、以下に示す式において、計算の量は、乗除算の回数で示す。これは、コンピュータに数値計算を行わせる場合、加減算に比較して乗除算の負荷は極めて大きいため、計算の量は乗除算の回数で比較されることが多いためである。また、閉曲面と第2の線分との干渉の演算(図3のステップS310)の前に予め算出可能な値は、記憶部に記憶しておくことにより計算を省略することができるため、計算回数に数えない。このような値には、例えば、第1の線分の長さの2乗や第2の線分の長さの2乗、判定対象の三角形の面積の2倍、近接判定値400が示す距離の2乗などがある。また、計算の過程で同じ値同士の乗除算が複数回ある場合は、当該乗除算の結果を記憶部に記憶し、計算を省略することができるため、1回の乗除算とみなす。また、以下に示す式では、ベクトルの内積計算を用いるが、各ベクトルは3次元ベクトルであるため、1回の内積計算は3回の乗算に相当する。   In the following equation, the amount of calculation is indicated by the number of multiplications / divisions. This is because when a computer performs a numerical calculation, the load of multiplication and division is much larger than addition and subtraction, and the amount of calculation is often compared by the number of multiplications and divisions. Further, since the value that can be calculated in advance before the calculation of the interference between the closed curved surface and the second line segment (step S310 in FIG. 3) can be omitted by storing the value in the storage unit, Not counted in the number of calculations. Examples of such values include the square of the length of the first line segment, the square of the length of the second line segment, twice the area of the triangle to be determined, and the distance indicated by the proximity determination value 400. There are squares of. Further, when there are multiple multiplications / divisions between the same values in the course of calculation, the result of the multiplication / division is stored in the storage unit, and the calculation can be omitted. Further, in the following expression, vector inner product calculation is used. Since each vector is a three-dimensional vector, one inner product calculation corresponds to three multiplications.

また、以下の計算(ア)及び(イ)では、それぞれ、点と線分の距離及び2本の線分間の距離を算出する。干渉判定部146は、当該算出された距離と近接判定値400が示す距離と比較し、当該算出された距離が近接判定値400が示す距離以下の場合に干渉すると判定する。当該算出された距離が近接判定値400が示す距離以下ではない場合に干渉しないと判定する。なお、近接判定値400が示す距離の2乗は予め計算しておくことができるため、上記距離の比較は距離の2乗同士で行う。   In the following calculations (a) and (b), the distance between a point and a line segment and the distance between two line segments are calculated. The interference determination unit 146 compares the calculated distance with the distance indicated by the proximity determination value 400, and determines that interference occurs when the calculated distance is equal to or less than the distance indicated by the proximity determination value 400. When the calculated distance is not less than or equal to the distance indicated by the proximity determination value 400, it is determined that there is no interference. Since the square of the distance indicated by the proximity determination value 400 can be calculated in advance, the above distance comparison is performed between the squares of the distances.

(ア)閉曲面設定部142が判定対象の三角形に球型の閉曲面を設定したとき(図5のステップS506)、干渉演算部144は、以下の式(1)〜(4)に基づいて、第2の線分と判定対象の三角形の外心との距離を算出する。この演算処理は、点と線分との距離を求めることに相当する。P及びPを第2の線分の2つの端点のベクトルとし、Qを判定対象の三角形の外心を示すベクトルとする。また、第2の線分のベクトルをP10とする。第2の線分の延長線に点Qから下ろした垂線と第2の線分とは直交する。従って、第2の線分のベクトルP10の内分パラメータtを用いて、当該垂線の足をPとすると、以下の式(1)が成り立つ。 (A) When the closed curved surface setting unit 142 sets a spherical closed curved surface as the determination target triangle (step S506 in FIG. 5), the interference calculating unit 144 is based on the following equations (1) to (4). The distance between the second line segment and the outer center of the determination target triangle is calculated. This calculation process corresponds to obtaining a distance between a point and a line segment. Let P 0 and P 1 be vectors of the two end points of the second line segment, and let Q be a vector indicating the outer center of the triangle to be determined. Furthermore, the vector of the second segment and P 10. The perpendicular line extending from the point Q to the extended line of the second line segment is perpendicular to the second line segment. Thus, by using the internal division parameter t of the vector P 10 of the second segment, when the foot of the perpendicular line and P t, the following equation (1) holds.

内分パラメータtは、式(1)を展開することで得られる以下の式(2)により算出される。   The internal parameter t is calculated by the following formula (2) obtained by expanding the formula (1).

式(2)のうちのP10・P10の値は予め算出しておくことができるため、上述の通り、計算回数に含めない。そのため、内分パラメータtは、1回の内積計算と1回の除算で算出される。従って、内分パラメータtの算出に掛かる乗除算の回数は4回である。内分パラメータtが0より小さいとき(t<0)、点Pは第2の線分のベクトルP10上に存在しないため、点Qから最も近い点Pとの距離が、点Qと第2の線分との距離となる。従って、当該距離の2乗Dは点ベクトルQと点ベクトルPとの内積であり、この計算に基づく乗除算の回数は3回である。 Since the values of P 10 and P 10 in Equation (2) can be calculated in advance, they are not included in the number of calculations as described above. Therefore, the internal division parameter t is calculated by one inner product calculation and one division. Therefore, the number of multiplications / divisions required for calculating the internal parameter t is four. When the internal parameter t is smaller than 0 (t <0), since the point P t does not exist on the vector P 10 of the second line segment, the distance from the point Q to the closest point P 0 is This is the distance to the second line segment. Therefore, the square D 2 of the distance is the inner product of the point vector Q and the point vector P 0, and the number of multiplications / divisions based on this calculation is three.

内分パラメータtが1より大きいとき(t>1)、点Pは第2の線分のベクトルP10上に存在しないため、点Qから最も近い点Pと点Qとの距離が点Qと第2の線分との距離となる。従って、当該距離の2乗Dは点ベクトルQと点ベクトルPとの内積であり、この計算に基づく乗除算の回数は3回である。内分パラメータtが0以上1以下(0≦t≦1)のとき、点Pは第2の線分上に存在する。点Pのベクトルは、以下の式(3)で算出される。 When the internal parameter t is larger than 1 (t> 1), the point P t does not exist on the vector P 10 of the second line segment, so the distance between the point P 1 closest to the point Q and the point Q is a point. This is the distance between Q and the second line segment. Therefore, the square D 2 of the distance is the inner product of the point vector Q and the point vectors P 1, the number of multiplication and division based on this calculation is 3 times. When the internal parameter t is not less than 0 and not more than 1 (0 ≦ t ≦ 1), the point P t exists on the second line segment. Vector of the point P t is calculated by the following equation (3).

点Qと第2の線分との最短距離は、点Qから第2の線分に下ろした垂線の長さとなり、当該最短距離の2乗Dは以下の式(4)で算出される。 The shortest distance between the point Q and the second line segment is the length of the perpendicular drawn from the point Q to the second line segment, and the square D 2 of the shortest distance is calculated by the following equation (4). .

式(3)に基づくPの算出に掛かる乗除算の回数は3回である。また、式(4)に基づく距離の2乗Dの算出に掛かる乗除算の回数は3回である。従って、(ア)の計算全体に掛かる乗除算の回数は、内分パラメータtが0以上1以下のときは10回であり、内分パラメータtが0より小さい又は1より大きいときは7回である。 The number of multiplication and division applied to the calculation of P t according to equation (3) is three times. Further, the number of multiplication and division applied to the calculation of the square D 2 of the distance based on Equation (4) is 3 times. Therefore, the number of multiplications / divisions for the entire calculation of (a) is 10 when the internal division parameter t is 0 or more and 1 or less, and 7 when the internal division parameter t is less than 0 or greater than 1. is there.

(イ)閉曲面設定部142が判定対象の三角形にカプセル型の閉曲面を設定したとき(図5のステップS512)、干渉演算部144は、以下の式(5)〜(13)に基づいて、第2の線分と判定対象の三角形に対応付けられた第1の線分との距離を算出する。この演算処理は、2本の線分間の距離を求めることに相当する。P及びPを第2の線分の2つの端点を示すベクトルとし、Q及びQを第1の線分の2つの端点を示すベクトルとすると、2つの線分の延長線の最短距離を結ぶ線分は、第2の線分のベクトルP10の及び第1の線分のベクトルQ10の両方に直交する。従って、第2の線分のベクトルP10の及び第1の線分のベクトルQ10について、それぞれの内分パラメータs、tを用いることにより、以下の式(5)及び(6)が成り立つ。 (A) When the closed curved surface setting unit 142 sets a capsule-shaped closed curved surface as a determination target triangle (step S512 in FIG. 5), the interference calculating unit 144 is based on the following equations (5) to (13). The distance between the second line segment and the first line segment associated with the determination target triangle is calculated. This calculation process corresponds to obtaining the distance between two line segments. If P 0 and P 1 are vectors indicating the two end points of the second line segment, and Q 0 and Q 1 are vectors indicating the two end points of the first line segment, the shortest of the extension lines of the two line segments The line segment connecting the distances is orthogonal to both the vector P 10 of the second line segment and the vector Q 10 of the first line segment. Accordingly, the following equations (5) and (6) are established by using the internal division parameters s and t for the second line segment vector P 10 and the first line segment vector Q 10 .

この式を展開すると、以下の式(7)及び(8)が得られる。   When this equation is expanded, the following equations (7) and (8) are obtained.

従って、内分パラメータs、tは以下の式(9)及び(10)で算出される。   Therefore, the internal division parameters s and t are calculated by the following equations (9) and (10).

なお、式(9)及び(10)において、a=P10・P10、b=−P10・Q10、c=(Q―P)・P10、d=P10・Q10、e=―Q10・Q10、f=(Q―P)・Q10であり、a〜fは式(9)及び(10)の各項に対応している。このうちのa及びeは、予め算出しておくことができるため、上述の通り、計算回数に含めない。また、b及びdは、重複する計算を含むため、上述の通り、合わせて1回の内積計算とする。従って、a〜fの内積計算は3回であり、a〜fの算出に掛かる乗除算の回数は9回である。また、式(9)及び(10)の右辺の分母は重複しているため、上述の通り、式(9)及び(10)の分母の値の算出は合わせて数える。そのため、式(9)及び(10)の分母の値の算出に掛かる乗算の回数は、bd及びaeの計算に掛かる2回である。従って、式(9)及び(10)に基づいて行われる計算の乗除算の回数は合わせて5回である。以上より、内分パラメータs、tの算出にかかる乗除算の回数は、合計17回である。 In the equations (9) and (10), a = P 10 · P 10, b = −P 10 · Q 10, c = (Q 0 −P 0 ) · P 10, d = P 10 · Q 10, e = −Q 10 · Q 10, f = (Q 0 −P 0 ) · Q 10 , and a to f correspond to the terms of the equations (9) and (10). Of these, a and e can be calculated in advance, and thus are not included in the number of calculations as described above. Further, since b and d include overlapping calculations, as described above, they are combined into one inner product calculation. Therefore, the inner product calculation of a to f is three times, and the number of multiplications and divisions required for the calculation of a to f is nine. Further, since the denominators on the right side of Expressions (9) and (10) overlap, the calculation of the denominator values of Expressions (9) and (10) is counted together as described above. For this reason, the number of multiplications required to calculate the denominator values of the equations (9) and (10) is two times required to calculate bd and ae. Therefore, the total number of multiplications and divisions performed based on equations (9) and (10) is five. From the above, the number of multiplications / divisions required for calculating the internal parameters s, t is 17 in total.

次に、干渉演算部144は、内分パラメータs、tの値に応じて異なる計算を行う。内分パラメータsとtがともに0より小さい又は1より大きいとき、第1の線分と第2の線分との最短距離はそれぞれの線分の端点同士の距離である。従って、当該最短距離の2乗Dは、点ベクトル同士の内積計算により算出される。この計算に基づく乗除算の回数は3回である。 Next, the interference calculation unit 144 performs different calculations depending on the values of the internal parameters s and t. When the internal parameters s and t are both smaller than 0 or larger than 1, the shortest distance between the first line segment and the second line segment is the distance between the end points of the respective line segments. Accordingly, the square D 2 of the shortest distance is calculated by calculating the inner product between the point vectors. The number of multiplications / divisions based on this calculation is three.

内分パラメータsが0以上1以下且つ、tが0より小さい又は1より大きいとき、第1の線分と第2の線分との最短距離は、第1の線分の端点と第2の線分との距離である。従って、上記の計算(ア)と同様の計算を行うことで第1の線分と第2の線分との距離の2乗Dを求めることができる。この計算に基づく乗除算の回数は、最も多いとき、10回である。内分パラメータtが0以上1以下且つ、sが0より小さい又は1より大きいときも同様であり、この計算に基づく乗除算の回数は、最も多いとき、10回である。 When the internal division parameter s is 0 or more and 1 or less and t is smaller than 0 or larger than 1, the shortest distance between the first line segment and the second line segment is the end point of the first line segment and the second line segment. The distance from the line segment. Accordingly, the square D 2 of the distance between the first line segment and the second line segment can be obtained by performing the same calculation as the above calculation (A). The number of multiplications / divisions based on this calculation is 10 when it is the largest. The same applies when the internal parameter t is 0 or more and 1 or less and s is less than 0 or greater than 1, and the number of multiplications / divisions based on this calculation is 10 when it is the largest.

内分パラメータsとtがともに0以上1以下のとき、干渉演算部144は、第1の線分と第2の線分との最短距離を示す線分の両端のベクトルPとQを以下の式(11)及び(12)に基づいて算出する。式(11)及び(12)の計算の乗除算回数はそれぞれ3回である。 When the internal parameters s and t are both 0 or more and 1 or less, the interference calculation unit 144 calculates vectors P s and Q t at both ends of the line segment indicating the shortest distance between the first line segment and the second line segment. It calculates based on the following formula | equation (11) and (12). The number of multiplications / divisions in the calculations of Expressions (11) and (12) is three.

従って、第1の線分と第2の線分との最短距離の2乗Dは以下の式(13)に基づいて算出される。 Therefore, the square D 2 of the shortest distance between the first line segment and the second line segment is calculated based on the following equation (13).

式(13)に基づく距離の2乗Dの算出に掛かる乗除算の回数は3回である。そのため、内分パラメータsとtがともに0以上1以下のとき、式(11)〜(13)に基づく計算の乗除算の回数は9回である。従って、(イ)の計算全体に掛かる乗除算の回数は、内分パラメータsとtがともに0より小さい又は1より大きいときは、最も多いとき、20回である。また、内分パラメータsが0以上1以下且つtが0より小さい又は1より大きいときは27回である。また、内分パラメータtが0以上1以下且つsが0より小さい又は1より大きいときは27回である。また、内分パラメータsとtがともに0以上1以下のときは26回である。 Number of applied multiplication and division in the calculation of the square D 2 of the distance based on Equation (13) is three times. Therefore, when the internal division parameters s and t are both 0 or more and 1 or less, the number of multiplications / divisions in calculations based on the equations (11) to (13) is nine. Accordingly, the number of multiplications / divisions for the entire calculation of (A) is 20 when the internal division parameters s and t are both smaller than 0 or larger than 1 and the largest. When the internal division parameter s is 0 or more and 1 or less and t is smaller than 0 or larger than 1, 27 times. Also, when the internal parameter t is 0 or more and 1 or less and s is less than 0 or greater than 1, it is 27 times. When the internal division parameters s and t are both 0 or more and 1 or less, it is 26 times.

(ウ)閉曲面設定部142が判定対象の三角形に閉曲面を設定しなかったとき(図5のステップS514)、干渉演算部144は、以下の式(14)〜(16)に基づいて、判定対象の三角形が属する平面と第2の線分と交点を算出し、その座標を干渉判定部146に出力する。干渉判定部146は、干渉演算部144によって算出された交点の座標が、判定対象の三角形の内部の点か否かを判定することで、判定対象の三角形との干渉を判定する。なお、この計算は従来技術に属する一般的なものであるが、以下に一例を示す。   (C) When the closed curved surface setting unit 142 does not set a closed curved surface for the triangle to be determined (step S514 in FIG. 5), the interference calculating unit 144 is based on the following equations (14) to (16). The plane to which the determination target triangle belongs, the second line segment, and the intersection are calculated, and the coordinates are output to the interference determination unit 146. The interference determination unit 146 determines interference with the determination target triangle by determining whether or not the coordinates of the intersection calculated by the interference calculation unit 144 are a point inside the determination target triangle. This calculation is a general one belonging to the prior art, but an example is shown below.

判定対象の三角形の各頂点のベクトルをQ、Q、及びQとし、第2の線分の2つの端点のベクトルをP及びPとすると、判定対象の三角形が属する平面と第2の線分との交点Pは、内分パラメータtを用いて、上述の式(3)で表される。Pは、判定対象の三角形と同一平面上に存在する。従って、判定対象の三角形の法線ベクトルNとの間に、以下の式(14)が成り立つ。なお、判定対象の三角形の法線ベクトルNの値は予め算出しておくことができるため、上述の通り、計算回数に含めない。 If the vectors of the vertices of the determination target triangle are Q 0 , Q 1 , and Q 2 and the vectors of the two end points of the second line segment are P 0 and P 1 , the plane to which the determination target triangle belongs and the The intersection point P t with the line segment 2 is expressed by the above-described equation (3) using the internal division parameter t. P t is present on the determination target of the triangle and the same plane. Therefore, the following equation (14) is established between the normal vector N of the triangle to be determined. Since the value of the normal vector N of the triangle to be determined can be calculated in advance, it is not included in the number of calculations as described above.

次に、式(14)をtについて解くことで、以下の式(15)からtが算出される。   Next, t is calculated from the following equation (15) by solving equation (14) for t.

式(3)に基づくPの算出に掛かる乗除算の回数は3回である。また、式(15)に基づくtの算出に掛かる計算は、内積計算2回と除算1回であり、これらを合わせた乗除算の回数は7回である。従って、Pの算出までに掛かる乗除算の回数は、式(3)及び(15)に基づき、合わせて10回である。次に、判定対象の三角形の各頂点Q、Q、Q各々の組と交点Pが作る三角形(Q、Q、Q)の面積S、S、Sの和を算出し、判定対象の三角形Qの面積Sと比較する。そして、面積Sが面積S、S、Sの和よりも大きいとき(S>S+S+S)、干渉判定部146は、判定対象の三角形と第2の線分とが干渉しないと判定する。面積Sが面積S、S、Sの和以下のとき(S≦S+S+S)、干渉判定部146は、判定対象の三角形と第2の線分とが干渉しないと判定する。 The number of multiplication and division applied to the calculation of P t according to equation (3) is three times. Further, the calculation for calculating t based on the equation (15) is two times of inner product calculation and one time of division, and the number of times of multiplication / division combining these is seven. Therefore, the number of applied multiplication and division by the calculation of P t, based on the equation (3) and (15), which is 10 times in total. Next, a triangle (Q 0 Q 1 P t , Q 1 Q 2 P t , Q 0 Q 2 P t ) formed by a set of each vertex Q 0 , Q 1 , Q 2 of each triangle to be determined and an intersection point P t The sum of the areas S 0 , S 1 , S 2 is calculated and compared with the area S of the determination target triangle Q 0 Q 1 Q 2 . When the area S is larger than the sum of the areas S 0 , S 1 and S 2 (S> S 0 + S 1 + S 2 ), the interference determination unit 146 causes the determination target triangle and the second line segment to interfere with each other. Judge that not. When the area S is less than or equal to the sum of the areas S 0 , S 1 , S 2 (S ≦ S 0 + S 1 + S 2 ), the interference determination unit 146 determines that the determination target triangle and the second line segment do not interfere with each other. To do.

三角形の面積は、三角形の2辺を示す線分のベクトルの外積を2で除算することで算出される。3次元ベクトル同士の外積の算出には、1回当り6回の乗除算が必要となる。また、干渉判定部146は、三角形の面積同士を比較するので、上記三角形の面積の算出における2で除算する処理を省くことができる。また、予め算出しておくことができる判定対象の三角形Qの面積Sの2倍(2×S)の算出に必要な計算を除いた、3つの三角形(Q、Q、Q)の面積S、S、S各々の2倍(2×S、2×S、2×S)の算出には、1回の外積計算と1回の内積計算とが掛かるため、9回の乗除算が必要となる。以上より(ウ)の計算には、Pの算出までの10回と3つの三角形の面積の2倍の算出に掛かる27回とを合わせた37回の乗除算が必要となる。 The area of the triangle is calculated by dividing the outer product of the vector of line segments indicating the two sides of the triangle by 2. Calculation of the outer product of three-dimensional vectors requires 6 multiplications and divisions per time. Moreover, since the interference determination unit 146 compares the areas of the triangles, the process of dividing by 2 in the calculation of the area of the triangles can be omitted. In addition, three triangles (Q 0 Q 1 P) excluding the calculation required for calculating twice the area S (2 × S) of the determination target triangle Q 0 Q 1 Q 2 that can be calculated in advance. t , Q 1 Q 2 P t , Q 0 Q 2 P t ) area S 0 , S 1 , S 2 each double (2 × S 0 , 2 × S 1 , 2 × S 2 ) Since one outer product calculation and one inner product calculation are required, nine multiplications and divisions are required. The calculation of from (c) above, it is necessary to 10 times and 27 times and 37 times of multiplication and division of the combined applied twice the calculation of the area of the three triangles to calculate the P t.

以上のように、(ア)球型の閉曲面を用いたときの計算の量は、最多の場合で10回、(イ)カプセル型の閉曲面を用いたときの計算の量は、最多の場合で27回、(ウ)従来技術を用いたときの計算の量は37回である。そのため、干渉演算部144は、従来技術である(ウ)の計算量に比較して(ア)の場合は1/4程度、(イ)の場合は2/3程度の計算量で干渉の判定に必要な値を算出することができる。従って、干渉判定装置100は、少ない計算量で、第1の物体と第2の物体の干渉や近接を判定することができる。   As described above, (a) the amount of calculation when using a spherical closed surface is 10 times at the maximum, and (b) the amount of calculation when using a capsule-type closed surface is the largest. In some cases, 27 times. (C) The amount of calculation when using the prior art is 37 times. Therefore, the interference calculation unit 144 determines the interference with a calculation amount of about 1/4 in the case of (a) and about 2/3 in the case of (b) compared with the calculation amount of (c) which is the conventional technique. A necessary value can be calculated. Therefore, the interference determination apparatus 100 can determine the interference and proximity between the first object and the second object with a small amount of calculation.

また、干渉判定装置100は、より多くの三角形を閉曲面で包含することで、干渉の判定に必要な計算の量をさらに少なくすることができる。そのためには、近接判定値400を大きく設定し、大きな三角形も閉曲面で包含できるようにすればよい。その一方、近接判定値400が大きくなると閉曲面と稜線との干渉判定が甘くなり、第1の物体と第2の物体の近接の判定精度が低くなる。従って、干渉判定装置100は、近接判定値400が小さくても、多くの三角形が閉曲面により包含されるような表面形状を持つ物体の干渉や近接の判定に最適である。   Moreover, the interference determination apparatus 100 can further reduce the amount of calculation necessary for determining the interference by including more triangles in the closed curved surface. For this purpose, the proximity determination value 400 may be set large so that a large triangle can be included in the closed curved surface. On the other hand, when the proximity determination value 400 increases, the determination of the interference between the closed curved surface and the ridge line becomes unsatisfactory, and the determination accuracy of the proximity between the first object and the second object decreases. Therefore, even when the proximity determination value 400 is small, the interference determination apparatus 100 is optimal for determining interference and proximity of an object having a surface shape in which many triangles are covered by a closed curved surface.

このような物体には、例えば、曲面を持つ物体が挙げられる。製造ラインにおける設備やロボットは、人との衝突時の安全性や強度などを考慮して、面取りがなされている。このような面取りがなされている曲面をポリゴンで表現する場合、当該曲面部には、平面部に比べて、極めて大量の小さな三角形や針状の細長い三角形が存在する。そのため、干渉判定装置100は、面取りがなされている物体の表面の形状を示す三角形に対して、多くの閉曲面を設定する。従って、干渉判定装置100は、面取りがなされている物体の干渉や近接の判定に要する計算量を低減することができる。また、面取りは、上記に挙げた設備やロボット以外にも、美観などを考慮して、工業製品一般に行われる。従って、製造ラインシミュレータに限らず、異なる技術分野に適用した場合においても、干渉判定装置100は、計算量を低減する効果を奏することができる。   Examples of such an object include an object having a curved surface. Equipment and robots in the production line are chamfered in consideration of safety and strength in the event of a collision with a person. When a curved surface with such chamfering is expressed by a polygon, the curved surface portion includes a very large number of small triangles and needle-like elongated triangles as compared with the flat surface portion. Therefore, the interference determination apparatus 100 sets many closed curved surfaces for the triangle indicating the shape of the surface of the object that is chamfered. Therefore, the interference determination apparatus 100 can reduce the amount of calculation required for determining the interference and proximity of the chamfered object. In addition to the equipment and robots listed above, chamfering is generally performed on industrial products in consideration of aesthetics and the like. Therefore, the interference determination apparatus 100 can produce an effect of reducing the amount of calculation even when applied to different technical fields as well as the production line simulator.

以上説明したように、第1の実施形態の干渉判定装置100によれば、選択部120は、複数の物体のうちの第1の物体の表面の形状を示す複数の三角形のうち、少なくとも1つの三角形を判定対象の三角形として選択し、判定部140は、選択された判定対象の三角形を包含する閉曲面であって、判定対象の三角形に対応する或る点又は判定対象の三角形に対応する第1の線分との距離が一定である閉曲面と、複数の物体のうちの第2の物体の表面の形状を示す第2の線分との干渉を近接判定値400が示す距離に基づいて判定する。従って、干渉判定装置100は、少ない計算量で第1の物体と第2の物体の干渉や近接を判定することができる。   As described above, according to the interference determination apparatus 100 of the first embodiment, the selection unit 120 includes at least one of a plurality of triangles indicating the shape of the surface of the first object among the plurality of objects. The triangle is selected as a determination target triangle, and the determination unit 140 is a closed curved surface including the selected determination target triangle, and corresponds to a certain point corresponding to the determination target triangle or a determination target triangle. Based on the distance indicated by the proximity determination value 400, the interference between the closed curved surface having a constant distance from the first line segment and the second line segment indicating the shape of the surface of the second object among the plurality of objects. judge. Therefore, the interference determination apparatus 100 can determine the interference and proximity between the first object and the second object with a small amount of calculation.

また、第1の実施形態の判定部140の閉曲面設定部142によれば、第1の線分とは判定対象の三角形の3辺のうちの2辺各々の中点を通る線分である。従って、閉曲面設定部142は、より多くの三角形を包含する閉曲面を設定することができるため、干渉判定装置100は、さらに少ない計算量で第1の物体と第2の物体の干渉や近接を判定することができる。   Further, according to the closed curved surface setting unit 142 of the determination unit 140 of the first embodiment, the first line segment is a line segment that passes through the midpoint of each of the two sides of the three sides of the determination target triangle. . Accordingly, since the closed surface setting unit 142 can set a closed surface including more triangles, the interference determination apparatus 100 can reduce the amount of calculation and the interference and proximity between the first object and the second object. Can be determined.

また、第1の実施形態の判定部140の閉曲面設定部142によれば、第1の線分の長さは、前記判定対象の三角形の1つの辺の長さである。従って、閉曲面設定部142は、過度に大きな閉曲面を設定しないため、干渉判定装置100は、設定した近接距離を、干渉や近接の判定に正しく反映することができる。また、干渉判定装置100は、第1の線分の長さを改めて算出しなくてよく、計算量を低減できる。   In addition, according to the closed curved surface setting unit 142 of the determination unit 140 of the first embodiment, the length of the first line segment is the length of one side of the determination target triangle. Accordingly, since the closed curved surface setting unit 142 does not set an excessively large closed curved surface, the interference determination apparatus 100 can correctly reflect the set proximity distance in the determination of interference or proximity. Moreover, the interference determination apparatus 100 does not need to calculate the length of a 1st line segment anew, and can reduce calculation amount.

また、第1の実施形態の判定部140の閉曲面設定部142によれば、判定対象の三角形に対応する或る点とは、判定対象の三角形の外心である。従って、閉曲面設定部142は、より多くの三角形を包含する閉曲面を設定することができるため、干渉判定装置100は、さらに少ない計算量で第1の物体と第2の物体の干渉や近接を判定することができる。   Further, according to the closed curved surface setting unit 142 of the determination unit 140 of the first embodiment, the certain point corresponding to the determination target triangle is the outer center of the determination target triangle. Accordingly, since the closed surface setting unit 142 can set a closed surface including more triangles, the interference determination apparatus 100 can reduce the amount of calculation and the interference and proximity between the first object and the second object. Can be determined.

なお、近接判定の精度と計算量の低減効果を両立させるために、干渉判定装置100は、近接判定値400を適切に設定する機能を備えていてもよい。例えば、干渉判定装置100は、第1の物体の表面の形状を示す三角形の大きさ(例えば、外接円の半径など)を予め調べておき、そのうちの、例えば、2割から3割の三角形を包含できるように近接判定値400を設定してもよい。また、干渉判定装置100は、当該三角形を大きさなどに基づいてクラスタリングし、大きさの小さな三角形のクラスを閉曲面が包含できるように近接判定値400を設定してもよい。また、近接判定値400は、干渉判定装置100のユーザが任意に設定してもよく、物体毎や三角形毎などで変更してもよい。   In order to achieve both the accuracy of proximity determination and the effect of reducing the amount of calculation, the interference determination apparatus 100 may have a function of appropriately setting the proximity determination value 400. For example, the interference determination apparatus 100 checks in advance the size of a triangle (for example, the radius of a circumscribed circle) indicating the shape of the surface of the first object, and, for example, the triangle of 20% to 30% is selected. The proximity determination value 400 may be set so that it can be included. Further, the interference determination apparatus 100 may cluster the triangles based on the size or the like, and set the proximity determination value 400 so that the closed curved surface can include a small triangle class. Further, the proximity determination value 400 may be arbitrarily set by the user of the interference determination apparatus 100, or may be changed for each object, for each triangle, or the like.

<第2の実施形態>
[構成]
以下、第2の実施形態に係る干渉判定装置について詳しく説明する。図6は、第2の実施形態に係る干渉判定装置100bの機能構成の一例を示すブロック図である。本実施形態に係る干渉判定装置100b(図6)と第1の実施形態に係る干渉判定装置100(図2)とを比較すると、干渉判定装置100bが分割部130を備える点が異なる。また、本実施形態の干渉判定装置100bが分割部130を備えることによって、選択部120b及び判定部140bの閉曲面設定部142bが行う処理が、第1の実施形態の対応する機能部である選択部120及び判定部140の閉曲面設定部142とは異なっている。具体的には、干渉判定装置100bの選択部120bは、判定対象の多角形を選択し、当該多角形を示す情報を、分割部130に出力する機能を備える。また、判定部140bの閉曲面設定部142bは、分割部130から分割後の多角形を示す情報を取得する機能を備える。
<Second Embodiment>
[Constitution]
Hereinafter, the interference determination apparatus according to the second embodiment will be described in detail. FIG. 6 is a block diagram illustrating an example of a functional configuration of the interference determination apparatus 100b according to the second embodiment. When the interference determination apparatus 100b (FIG. 6) according to the present embodiment is compared with the interference determination apparatus 100 (FIG. 2) according to the first embodiment, the difference is that the interference determination apparatus 100b includes a dividing unit 130. In addition, since the interference determination apparatus 100b of the present embodiment includes the dividing unit 130, the selection unit 120b and the process performed by the closed curved surface setting unit 142b of the determination unit 140b are selections corresponding to the functional units of the first embodiment. This is different from the closed surface setting unit 142 of the unit 120 and the determination unit 140. Specifically, the selection unit 120b of the interference determination apparatus 100b has a function of selecting a polygon to be determined and outputting information indicating the polygon to the dividing unit 130. Further, the closed curved surface setting unit 142b of the determination unit 140b has a function of acquiring information indicating the polygon after the division from the dividing unit 130.

しかし、他の機能部(ポリゴン取得部110、干渉演算部144、干渉判定部146、及び出力部150)が持つ機能は第1の実施形態と同じである。第1の実施形態と同じ機能の説明は省略する。また、これらの機能部は、例えば、干渉判定装置100bが備えるCPUが記憶部に格納されたプログラムを実行することにより機能するソフトウェア機能部である。また、これらの機能部の一部又は全部は、LSIやASIC等のハードウェア機能部であってもよい。   However, the functions of other function units (polygon acquisition unit 110, interference calculation unit 144, interference determination unit 146, and output unit 150) are the same as those in the first embodiment. A description of the same functions as those in the first embodiment is omitted. Moreover, these function parts are software function parts which function when CPU with which the interference determination apparatus 100b is provided executes the program stored in the memory | storage part, for example. In addition, some or all of these functional units may be hardware functional units such as an LSI or an ASIC.

[処理の概要]
判定対象の多角形を包含する閉曲面の設定に際して、干渉判定装置100bは、当該多角形に複数の閉曲面を設定する機能を有する。以下、干渉判定装置100bによる処理の概要を説明する。選択部120bは、判定対象の多角形を選択し、当該多角形を示す情報を分割部130に出力する。分割部130は、まず、選択部120bから判定対象の多角形を示す情報を、記憶部から近接判定値400を取得する。次に、分割部130は、判定対象の多角形を近接判定値400が示す距離に基づいて、複数の多角形に分割する。すなわち、分割部130は、第1の物体の表面の形状を示す複数の多角形のうちの少なくとも1つの多角形を、距離に基づいて複数の多角形に分割する。そして、分割部130は、閉曲面設定部142bに分割後の多角形を示す情報を出力する。なお、分割後の多角形を示す情報とは、例えば、分割後の多角形の各頂点の座標や分割後の多角形に固有に割り当てられた識別子である。
[Process overview]
When setting a closed surface including a polygon to be determined, the interference determination device 100b has a function of setting a plurality of closed surfaces in the polygon. Hereinafter, an outline of processing by the interference determination apparatus 100b will be described. The selection unit 120b selects a polygon to be determined, and outputs information indicating the polygon to the division unit 130. The dividing unit 130 first acquires information indicating the polygon to be determined from the selection unit 120b and the proximity determination value 400 from the storage unit. Next, the dividing unit 130 divides the determination target polygon into a plurality of polygons based on the distance indicated by the proximity determination value 400. That is, the dividing unit 130 divides at least one of a plurality of polygons indicating the shape of the surface of the first object into a plurality of polygons based on the distance. Then, the dividing unit 130 outputs information indicating the polygon after the division to the closed surface setting unit 142b. Note that the information indicating the polygon after division is, for example, the coordinates of each vertex of the polygon after division or an identifier uniquely assigned to the polygon after division.

選択部120bは、分割部による分割後の複数の多角形のうちの1つの多角形を判定対象として選択する。すなわち、選択部120bは、分割部130による分割後の複数の多角形のうちの少なくとも1つの多角形を、判定対象として選択する。閉曲面設定部142bは、分割部130から分割後の多角形を示す情報を取得する。そして、閉曲面設定部142bは、分割後の多角形のうち選択部120bによって判定対象として選択された多角形に対して、第1の実施形態における閉曲面設定部142と同様に、閉曲面を設定する。以降の処理は、第1の実施形態と同様であるため省略する。   The selection unit 120b selects one polygon among a plurality of polygons after division by the division unit as a determination target. That is, the selection unit 120b selects at least one polygon among a plurality of polygons after the division by the division unit 130 as a determination target. The closed curved surface setting unit 142b acquires information indicating the polygon after the division from the dividing unit 130. Then, the closed curved surface setting unit 142b applies a closed curved surface to the polygon selected as the determination target by the selection unit 120b among the divided polygons, similarly to the closed curved surface setting unit 142 in the first embodiment. Set. Subsequent processing is the same as that in the first embodiment, and is therefore omitted.

[多角形の分割と閉曲面の設定]
以下、多角形の分割と閉曲面の設定について詳述する。図7は、三次元仮想空間内の物体の表面の形状を示す判定対象の多角形の分割方法の一例を示す模式図である。図7において示されているx軸y軸z軸は、それぞれ直交する3次元仮想空間の座標を示す軸である。図7(a)及び(b)の模式図は、それぞれz軸方向から見たものであり、本例では、三角形250の法線と三角形260の法線とは、z軸方向にそれぞれ一致している。図7(a)は、判定対象の三角形を2つの三角形に分割する様子を説明する図である。図7(b)は、判定対象の三角形を3つの三角形に分割する様子を説明する図である。
[Polygon division and closed surface setting]
Hereinafter, polygon division and setting of a closed curved surface will be described in detail. FIG. 7 is a schematic diagram illustrating an example of a method of dividing a polygon to be determined that indicates the shape of the surface of an object in the three-dimensional virtual space. The x-axis, y-axis, and z-axis shown in FIG. 7 are axes that indicate the coordinates of the orthogonal three-dimensional virtual space. The schematic diagrams in FIGS. 7A and 7B are respectively viewed from the z-axis direction. In this example, the normal line of the triangle 250 and the normal line of the triangle 260 coincide with the z-axis direction, respectively. ing. FIG. 7A is a diagram for explaining how the triangle to be determined is divided into two triangles. FIG. 7B is a diagram for explaining how the triangle to be determined is divided into three triangles.

図7(a)において、判定対象の三角形250は、最長辺の長さが近接判定値400によって示される距離dの2倍より大きく4倍以下であり、残りの2辺の長さが距離dの2倍以下である三角形である。このような三角形は閉曲面の設定条件を満たさないため、第1の実施形態における干渉判定装置100は当該三角形には閉曲面を設定しない。干渉判定装置100bの分割部130は、判定対象の三角形250を、当該三角形250の最長辺の中点と最長辺の端点ではない頂点とを結ぶ線分256によって2つの三角形に分割する。すなわち、分割部130による分割前の複数の多角形のうちの少なくとも1つの多角形とは、三角形であり、分割部130は、分割前の多角形のうちの少なくとも1つの三角形を、当該三角形の1つの中線により分割後の複数の多角形としての2つの三角形に分割する。   In FIG. 7A, the determination target triangle 250 has a length of the longest side that is greater than twice and less than or equal to four times the distance d indicated by the proximity determination value 400, and the length of the remaining two sides is the distance d. It is a triangle that is 2 times or less. Since such a triangle does not satisfy the condition for setting a closed surface, the interference determination apparatus 100 according to the first embodiment does not set a closed surface for the triangle. The dividing unit 130 of the interference determination apparatus 100b divides the determination target triangle 250 into two triangles by a line segment 256 that connects a midpoint of the longest side of the triangle 250 and a vertex that is not an end point of the longest side. That is, at least one polygon among the plurality of polygons before division by the division unit 130 is a triangle, and the division unit 130 selects at least one triangle of the polygons before division as the triangle. It is divided into two triangles as a plurality of polygons after division by one central line.

分割後の2つの三角形の各辺の長さは、いずれも距離dの2倍以下である。従って、分割後の三角形の外心258(A)及び258(B)を中心とする閉曲面を設定すると、当該閉曲面は、分割後の三角形各々を包含することができる場合がある。上記の通り、球型の閉曲面について干渉演算部144が行う計算量は、最も多い場合、10回である。そのため、図7(a)のように三角形を2つに分割したとしても、分割後の三角形各々に球型の閉曲面を設定したときの計算量は、最も多い場合、20回である。従って、干渉演算部144は、従来技術の37回の計算量よりも少ない計算量で干渉の判定に必要な値を算出することができる。   The length of each side of the two triangles after the division is less than twice the distance d. Therefore, when a closed curved surface centering on the outer centers 258 (A) and 258 (B) of the divided triangles is set, the closed curved surface may include each of the divided triangles. As described above, the amount of calculation performed by the interference calculation unit 144 for a spherical closed curved surface is 10 times in the largest case. Therefore, even if the triangle is divided into two as shown in FIG. 7A, the calculation amount when a spherical closed surface is set for each of the divided triangles is 20 times in the largest case. Therefore, the interference calculation unit 144 can calculate a value necessary for determination of interference with a calculation amount smaller than the calculation amount of 37 times of the prior art.

図7(b)において、判定対象の三角形260は、2辺の長さが近接判定値400によって示される距離dの2倍より大きく4倍以下であり、残りの1辺の長さが距離dの2倍以下である三角形である。このような三角形は閉曲面の設定条件を満たさないため、第1の実施形態における干渉判定装置100は当該三角形には閉曲面を設定しない。干渉判定装置100bの分割部130は、判定対象の三角形260を、当該三角形260の最長辺の中点269と最長辺の端点ではない頂点とを結ぶ線分266によって、閉曲面の設定条件を満たす2つの三角形に分割する。さらに、分割部130は、当該分割後の2つの三角形のうち、最長辺の長さが近接判定値400によって示される距離dの2倍より大きい三角形を、当該三角形の最長辺の中点と最長辺の端点ではない頂点269とを結ぶ線分267によって分割する。すなわち、分割部130は、第1の物体の表面の形状を示す複数の多角形のうちの少なくとも1つの多角形を、距離に基づいて2つから5つのうちの3つの多角形に分割する。   In FIG. 7B, the triangle 260 to be determined has a length of two sides that is greater than twice the distance d indicated by the proximity judgment value 400 and not more than four times, and the length of the remaining one side is the distance d. It is a triangle that is 2 times or less. Since such a triangle does not satisfy the condition for setting a closed surface, the interference determination apparatus 100 according to the first embodiment does not set a closed surface for the triangle. The dividing unit 130 of the interference determination apparatus 100b satisfies the closed curved surface setting condition by the line segment 266 that connects the triangle 260 to be determined to the midpoint 269 of the longest side of the triangle 260 and the vertex that is not the end point of the longest side. Divide into two triangles. Further, the dividing unit 130 selects a triangle having a longest side length longer than twice the distance d indicated by the proximity determination value 400 from the two triangles after the division. A line segment 267 is connected to a vertex 269 that is not an end point of the side. That is, the dividing unit 130 divides at least one of a plurality of polygons indicating the shape of the surface of the first object into three of two to five polygons based on the distance.

分割後の3つの三角形の各辺の長さは、いずれも距離dの2倍以下である。従って、分割後の三角形の外心268(A)〜268(C)を中心とする閉曲面を設定すると、当該閉曲面は、分割後の三角形各々を包含することができる場合がある。上記の通り、球型の閉曲面について干渉演算部144が行う計算量は、最も多いとき、10回である。そのため、図7(a)のように三角形を3つに分割したとしても、分割後の三角形各々に球型の閉曲面を設定したときの計算量は、最も多いとき、20回である。従って、干渉演算部144は、従来技術の37回の計算量よりも少ない計算量で干渉の判定に関する値を算出することができる。   The length of each side of the three triangles after the division is not more than twice the distance d. Accordingly, when a closed curved surface centering on the outer centers 268 (A) to 268 (C) of the divided triangles is set, the closed curved surface may include each of the divided triangles. As described above, the calculation amount performed by the interference calculation unit 144 for a spherical closed curved surface is 10 times when it is the largest. Therefore, even if the triangle is divided into three as shown in FIG. 7A, the calculation amount when a spherical closed curved surface is set for each of the divided triangles is 20 times when it is the largest. Therefore, the interference calculation unit 144 can calculate a value related to the determination of interference with a calculation amount smaller than the calculation amount of 37 times of the conventional technique.

[三角形の分割と閉曲面の設定処理]
以下、干渉判定装置100bによる三角形の分割と閉曲面の設定方法について説明する。図8は、干渉判定装置100bによる判定対象の三角形に閉曲面を設定する処理の一例を示すフローチャートである。図8において、ステップS800、S802、S804、S806、S820、S822、S824、及びS826各々は、図5のステップS500、S502、S504、S506、S508、S510、S512、及びS514にそれぞれ対応するため、説明を省略する。また、ステップS804における判定がNOのときは、ステップS808に遷移する。
[Triangulation and closed surface setting processing]
Hereinafter, a method for dividing a triangle and setting a closed curved surface by the interference determination apparatus 100b will be described. FIG. 8 is a flowchart illustrating an example of processing for setting a closed curved surface to a determination target triangle by the interference determination apparatus 100b. 8, each of steps S800, S802, S804, S806, S820, S822, S824, and S826 corresponds to steps S500, S502, S504, S506, S508, S510, S512, and S514 of FIG. Description is omitted. If the determination in step S804 is no, the process proceeds to step S808.

(ステップS808)分割部130は、近接判定値400によって示される距離dと判定対象の三角形の各辺の長さとを比較し、当該三角形の最長辺の長さが距離dの2倍より大きく4倍以下(2×d<最長辺≦4×d)であり、1辺の長さが距離dの2倍以下(1辺≦2×d)か否かを判定する。2×d<最長辺≦4×d且つ1辺≦2×dであるとき(ステップS808;YES)、ステップS810に遷移する。2×d<最長辺≦4×d且つ1辺≦2×dであるときではないとき(ステップS808;NO)、ステップS814に遷移する。   (Step S808) The dividing unit 130 compares the distance d indicated by the proximity determination value 400 with the length of each side of the triangle to be determined, and the length of the longest side of the triangle is larger than twice the distance d. It is determined whether or not the length is less than twice (2 × d <longest side ≦ 4 × d), and the length of one side is less than or equal to twice the distance d (1 side ≦ 2 × d). When 2 × d <longest side ≦ 4 × d and 1 side ≦ 2 × d (step S808; YES), the process proceeds to step S810. When 2 × d <longest side ≦ 4 × d and 1 side ≦ 2 × d are not satisfied (step S808; NO), the process proceeds to step S814.

(ステップS810)次に、分割部130は、判定対象の三角形を、当該三角形の最長辺の中点と最長辺の端点ではない頂点とを結ぶ線分で2つの三角形に分割し、それぞれの三角形に識別子を割り当てる。分割部130は、分割後の三角形各々の頂点の座標と識別子とを対応付けて記憶部に記憶させる。選択部120bは、分割後の2つの三角形各々を判定対象として選択する。   (Step S810) Next, the dividing unit 130 divides the determination target triangle into two triangles by a line segment connecting the midpoint of the longest side of the triangle and the vertex that is not the end point of the longest side, and each triangle is divided. Assign an identifier to. The dividing unit 130 stores the coordinates of the vertices of each divided triangle and the identifier in the storage unit in association with each other. The selection unit 120b selects each of the two divided triangles as a determination target.

(ステップS812)次に、分割部130は、近接判定値400によって示される距離dと分割後の判定対象の三角形の最長辺の長さとを比較し、当該三角形の最長辺の長さが距離dの2倍より大きく4倍以下(2×d<最長辺≦4×d)であるか否かを判定する。2×d<最長辺≦4×dであるとき(ステップS812;YES)、ステップS810に戻る。2×d<最長辺≦4×dではないとき(ステップS812;NO)、ステップS814に遷移する。
(ステップS814)次に、閉曲面設定部142bは、判定対象の三角形の頂点の座標から、当該三角形の外心の半径の大きさd2’を算出する。
(Step S812) Next, the dividing unit 130 compares the distance d indicated by the proximity determination value 400 with the length of the longest side of the triangle to be determined after the division, and the length of the longest side of the triangle is the distance d. It is determined whether or not it is greater than twice and less than or equal to 4 times (2 × d <longest side ≦ 4 × d). When 2 × d <longest side ≦ 4 × d (step S812; YES), the process returns to step S810. When 2 × d <longest side ≦ 4 × d is not satisfied (step S812; NO), the process proceeds to step S814.
(Step S814) Next, the closed surface setting unit 142b calculates the size d2 ′ of the radius of the outer center of the triangle from the coordinates of the vertex of the triangle to be determined.

(ステップS816)次に、閉曲面設定部142bは、近接判定値400によって示される距離dとステップS814で算出された判定対象の三角形の外接円の半径の大きさd2’とを比較し、当該三角形の外接円の半径の大きさd2’が距離dより小さい(d2’≦d)か否かを判定する。d2’≦dのとき(ステップS816;YES)、ステップS818に遷移する。d2’≦dではないとき(ステップS816;NO)、ステップS820に遷移する。
(ステップS818)次に、閉曲面設定部142bは、識別子と算出した外心の座標とを対応付けて記憶部に記憶させ、干渉演算部144に出力する。
(Step S816) Next, the closed curved surface setting unit 142b compares the distance d indicated by the proximity determination value 400 with the radius d2 ′ of the circumscribed circle of the determination target triangle calculated in Step S814, and It is determined whether the radius d2 ′ of the circumscribed circle of the triangle is smaller than the distance d (d2 ′ ≦ d). When d2 ′ ≦ d (step S816; YES), the process proceeds to step S818. When d2 ′ ≦ d is not satisfied (step S816; NO), the process proceeds to step S820.
(Step S818) Next, the closed curved surface setting unit 142b associates the identifier with the calculated coordinates of the outer center, stores them in the storage unit, and outputs them to the interference calculation unit 144.

なお、多角形の分割方法は、上記の方法に限定されない。三角形であれば、例えば、中線で分割してもよいし、重心から各辺に下ろした垂線で分割してもよい。また、分割後の複数の多角形それぞれに形状の異なる閉曲面を設定してもよい。例えば、球型の閉曲面について干渉演算部144が行う計算の量は、最も多いとき、10回であり、カプセル型の閉曲面について干渉演算部144が行う計算の量は、最も多いとき、27回であるため、多角形を2つに分割し、分割後の多角形をそれぞれ球型の閉曲面とカプセル型の閉曲面で包含した場合の計算量は、最も多いとき、37回である。従って、従来の37回よりも少ない計算量で干渉を判定できる場合がある。   The polygon dividing method is not limited to the above method. If it is a triangle, for example, it may be divided by a middle line, or may be divided by a perpendicular drawn from the center of gravity to each side. Moreover, you may set the closed curved surface from which a shape differs to each of the some polygon after a division | segmentation. For example, when the amount of calculation performed by the interference calculation unit 144 for the spherical closed surface is the largest, it is 10 times, and when the amount of calculation performed by the interference calculation unit 144 for the closed capsule surface is the largest, 27 is calculated. Since the polygon is divided into two, and the divided polygon is included by a spherical closed surface and a capsule closed surface, respectively, the calculation amount is 37 times at the maximum. Therefore, there are cases where interference can be determined with a smaller calculation amount than the conventional 37 times.

また、分割部130は、多角形をより細かく分割してもよい。例えば、球型の閉曲面について干渉演算部144が行う計算の量は、最も少ないとき、7回である。そのため、5つに分割された三角形を球型の閉曲面で包含したときの計算量は、最も少なくて35回であり、計算量の低減が見込める場合がある。従って、干渉判定装置100bは、多角形を2つから5つに分割することで、より多くの多角形に対して閉曲面を設定し、計算量の低減することができる。また、分割を行う際の条件は、分割の方法に合わせて適宜設定してよい。   Further, the dividing unit 130 may divide the polygon more finely. For example, the amount of calculation performed by the interference calculation unit 144 for a spherical closed curved surface is 7 times when it is the smallest. For this reason, the calculation amount when the triangle divided into five is included by a spherical closed curved surface is the smallest 35 times, and a reduction in the calculation amount may be expected. Therefore, the interference determination apparatus 100b can set closed surfaces for more polygons by dividing the polygon from two to five, and can reduce the amount of calculation. Moreover, the conditions for performing the division may be appropriately set according to the division method.

[まとめ]
以上のように、第2の実施形態の干渉判定装置100bによれば、分割部130は、第1の物体の表面の形状を示す複数の多角形のうちの少なくとも1つの多角形を、前記距離に基づいて複数の多角形に分割し、選択部120bは、分割部130による分割後の複数の多角形のうちの少なくとも1つの多角形を、判定対象として選択する。従って、干渉判定装置100bは、第1の実施形態における干渉判定装置100よりも、大きな三角形に対して閉曲面を設定できるため、さらに少ない計算量で第1の物体と第2の物体の干渉や近接を判定することができる。
[Summary]
As described above, according to the interference determination apparatus 100b of the second embodiment, the dividing unit 130 determines at least one polygon among the plurality of polygons indicating the shape of the surface of the first object as the distance. The selection unit 120b selects at least one polygon among the plurality of polygons after the division by the division unit 130 as a determination target. Therefore, since the interference determination apparatus 100b can set a closed curved surface for a large triangle as compared with the interference determination apparatus 100 in the first embodiment, the interference between the first object and the second object can be reduced with a smaller amount of calculation. Proximity can be determined.

<第3の実施形態>
[干渉判定装置の使用環境]
以下、第3の実施形態に係る干渉判定装置について詳しく説明する。本実施形態に係る干渉判定装置100cは、第1及び第2の実施形態に係る干渉判定装置100及び100bと同様に取得したポリゴンデータについて干渉の判定を行う製造ラインシミュレータであるが、その運用方法が異なる。本実施形態に係る干渉判定装置100cは、例えば、製造ラインの動きと同期しており、製造ラインの構成要素の動きを先駆けて模擬する。例えば、図1に示す製造ラインにおいて、ロボット310(A)が右向きに回転し、ロボット310(B)が左向きに回転するとする。ロボット310(A)とロボット310(B)は位置が近いため、回転のタイミングによっては衝突する危険性がある。この動きをシミュレータで、実際の製造ラインの動きに先駆けて模擬し、干渉を判定することができれば、ロボット310(A)又はロボット(B)の動きを遅くしたり、停止したりすることで、ロボット同士の衝突を避けることができる。このように、第3の実施形態に係る干渉判定装置100cは、製造ラインの動きと同期して行うシミュレーションにおいて、リアルタイムでの干渉判定を行う。
<Third Embodiment>
[Usage environment of interference judgment device]
Hereinafter, the interference determination apparatus according to the third embodiment will be described in detail. The interference determination apparatus 100c according to the present embodiment is a production line simulator that performs interference determination on polygon data acquired in the same manner as the interference determination apparatuses 100 and 100b according to the first and second embodiments. Is different. For example, the interference determination apparatus 100c according to the present embodiment is synchronized with the movement of the production line, and simulates the movement of the components of the production line. For example, in the production line shown in FIG. 1, it is assumed that the robot 310 (A) rotates to the right and the robot 310 (B) rotates to the left. Since the robot 310 (A) and the robot 310 (B) are close in position, there is a risk of collision depending on the timing of rotation. If this movement can be simulated with a simulator prior to the actual movement of the production line and interference can be determined, the movement of the robot 310 (A) or the robot (B) can be slowed or stopped, Collisions between robots can be avoided. Thus, the interference determination apparatus 100c according to the third embodiment performs real-time interference determination in a simulation performed in synchronization with the movement of the production line.

このような使用環境において、干渉判定装置100cは、より短時間に干渉の判定を完了させることが求められる。従って、事前に行うことができる処理は、予め完了させておくことが望ましい。そこで、干渉判定装置100cは、第1の物体の表面の形状を示す多角形について、予め閉曲面を設定する。   In such a use environment, the interference determination apparatus 100c is required to complete the determination of interference in a shorter time. Therefore, it is desirable to complete in advance processing that can be performed in advance. Therefore, the interference determination apparatus 100c sets a closed curved surface in advance for a polygon indicating the shape of the surface of the first object.

[構成]
図9は、第3の実施形態に係る干渉判定装置100cの機能構成の一例を示すブロック図である。本実施形態に係る干渉判定装置100c(図9)は、第2の実施形態に係る干渉判定装置100b(図6)に対応する各機能部を備えており、選択部120cは選択部120bに、判定部140cは判定部140bに、閉曲面設定部142cは閉曲面設定部142bに、干渉演算部144cは干渉演算部144にそれぞれ対応する。また、干渉判定装置100cは、例えば、移動ベクトル取得部160と、座標変換部170とを備える。また、閉曲面設定テーブル410は、記憶部に格納されている。干渉判定装置100cの各機能部(ポリゴン取得部110、分割部130、干渉判定部146、及び出力部150)が持つ機能は第1及び第2の実施形態における各機能部が持つ機能と同じであり、同じ機能の説明は省略する。これらの機能部は、例えば、干渉判定装置100cが備えるCPUが記憶部に格納されたプログラムを実行することにより機能するソフトウェア機能部である。また、これらの機能部の一部又は全部は、LSIやASIC等のハードウェア機能部であってもよい。
[Constitution]
FIG. 9 is a block diagram illustrating an example of a functional configuration of the interference determination apparatus 100c according to the third embodiment. The interference determination device 100c (FIG. 9) according to the present embodiment includes functional units corresponding to the interference determination device 100b (FIG. 6) according to the second embodiment, and the selection unit 120c includes the selection unit 120b. The determination unit 140c corresponds to the determination unit 140b, the closed surface setting unit 142c corresponds to the closed surface setting unit 142b, and the interference calculation unit 144c corresponds to the interference calculation unit 144. Moreover, the interference determination apparatus 100c includes, for example, a movement vector acquisition unit 160 and a coordinate conversion unit 170. The closed curved surface setting table 410 is stored in the storage unit. The functions of each function unit (polygon acquisition unit 110, division unit 130, interference determination unit 146, and output unit 150) of the interference determination apparatus 100c are the same as the functions of each function unit in the first and second embodiments. Yes, the description of the same function is omitted. These functional units are, for example, software functional units that function when a CPU included in the interference determination apparatus 100c executes a program stored in the storage unit. In addition, some or all of these functional units may be hardware functional units such as an LSI or an ASIC.

[処理の概要]
以下、干渉判定装置100cによる処理について説明する。干渉判定装置100cは、第2の実施形態における処理と同様に、判定対象の多角形に対応する閉曲面を設定する。ただし、干渉判定装置100cは、重複した処理を減らすため、或る多角形に対して既に設定された閉曲面に、別の多角形が包含される場合は、その多角形について干渉計算を行わない機能を持つ。この処理については後述する。閉曲面設定部142cは、判定対象の多角形の識別子と対応する閉曲面の設定情報とを対応付けて、閉曲面設定テーブル410(後述)として記憶部に記憶させる。選択部120cは、閉曲面設定テーブル410を参照して第1の物体のうちの判定対象と第2の線分とを選択し、当該判定対象を示す情報を干渉演算部144cに出力する。干渉演算部144cは、当該判定対象について、第1の実施形態の式(1)〜(15)で示した計算を行う。
[Process overview]
Hereinafter, processing by the interference determination apparatus 100c will be described. The interference determination device 100c sets a closed curved surface corresponding to the polygon to be determined, similarly to the processing in the second embodiment. However, the interference determination apparatus 100c does not perform interference calculation for a polygon when another polygon is included in the closed curved surface already set for the certain polygon in order to reduce overlapping processing. Has function. This process will be described later. The closed surface setting unit 142c associates the identifier of the polygon to be determined with the corresponding closed surface setting information, and stores it in the storage unit as a closed surface setting table 410 (described later). The selection unit 120c selects the determination target and the second line segment of the first object with reference to the closed curved surface setting table 410, and outputs information indicating the determination target to the interference calculation unit 144c. The interference calculation unit 144c performs the calculation shown by the equations (1) to (15) of the first embodiment for the determination target.

製造ラインの動きと同期するリアルタイムの干渉判定では、仮想空間内の各構成要素及びその一部の動きに関する移動ベクトルデータが随時更新され、更新された移動ベクトルデータは、移動ベクトル取得部160によって取得される。移動ベクトル取得部160は、取得した移動ベクトルデータを記憶部に記憶させ、座標変換部170に出力する。座標変換部170は、移動ベクトル取得部160から取得した移動ベクトルデータが示す移動ベクトルに基づいて、閉曲面設定テーブル内に記憶された閉曲面の座標や三角形の座標を変換し、製造ラインの動きを仮想空間の構成要素の配置に反映させる。選択部120cは、更新された閉曲面設定テーブルを参照し、判定対象を選択する。以上を繰り返し行うことで、干渉判定装置100cは、リアルタイムの干渉判定を行うことができる。   In the real-time interference determination synchronized with the movement of the production line, the movement vector data regarding each component in the virtual space and a part of the movement is updated as needed, and the updated movement vector data is acquired by the movement vector acquisition unit 160. Is done. The movement vector acquisition unit 160 stores the acquired movement vector data in the storage unit and outputs it to the coordinate conversion unit 170. The coordinate conversion unit 170 converts the coordinates of the closed curved surface and the coordinates of the triangle stored in the closed curved surface setting table based on the movement vector indicated by the movement vector data acquired from the movement vector acquisition unit 160, and moves the production line. Is reflected in the arrangement of the components of the virtual space. The selection unit 120c refers to the updated closed surface setting table and selects a determination target. By repeating the above, the interference determination apparatus 100c can perform real-time interference determination.

図10は、閉曲面設定テーブルの一例を示す表である。図10において、列t100は三角形の識別子、列t102は閉曲面の種類、列t104は閉曲面の中心の座標、列t106は干渉演算を低減するための事前計算値、列t108は干渉判定を行ったか否かを示す。この例において、「1」の識別子で示される三角形は、図8のステップS806において球型の閉曲面を設定されている。このとき、列t104の該当項目には、例えば、当該三角形の外心の座標が記憶される。「2」の識別子で示される三角形は、図8のステップS824においてカプセル型の閉曲面を設定されている。このとき、列t104の該当項目には、例えば、当該閉曲面の第1の線分の2つの端点の座標が記憶される。また、列t106の該当項目には、当該閉曲面の第1の線分の長さの2乗が記憶されている。干渉判定部146は、この値を利用することで、判定対象の三角形「2」と第2の線分との干渉を少ない計算量で判定することができる。   FIG. 10 is a table showing an example of a closed curved surface setting table. In FIG. 10, a column t100 is a triangular identifier, a column t102 is a type of a closed surface, a column t104 is a coordinate of the center of the closed surface, a column t106 is a pre-calculated value for reducing interference calculation, and a column t108 is performing interference determination. Indicates whether or not In this example, the triangle indicated by the identifier “1” has a spherical closed surface set in step S806 in FIG. At this time, for example, coordinates of the outer center of the triangle are stored in the corresponding item in the column t104. For the triangle indicated by the identifier “2”, a capsule-type closed curved surface is set in step S824 in FIG. At this time, for example, the coordinates of the two end points of the first line segment of the closed curved surface are stored in the corresponding item of the column t104. In addition, the corresponding item in the column t106 stores the square of the length of the first line segment of the closed curved surface. By using this value, the interference determination unit 146 can determine the interference between the determination target triangle “2” and the second line segment with a small amount of calculation.

「3」の識別子で示される三角形は、図8のステップS810において2つに分割され、図8のステップS818においてそれぞれに対応する球型の閉曲面を設定をされている。本実施形態では、分割後の2つの三角形各々に新たに識別子「3−1」及び「3−2」が割り当てられ、当該三角形各々に閉曲面が対応付けられている。従って、列t104の該当項目には、例えば、同一の識別子「3」に分割後の2つの三角形の外心の座標が記憶される。   The triangle indicated by the identifier “3” is divided into two in step S810 of FIG. 8, and a spherical closed surface corresponding to each is set in step S818 of FIG. In this embodiment, identifiers “3-1” and “3-2” are newly assigned to each of the two divided triangles, and a closed surface is associated with each of the triangles. Therefore, for example, the coordinates of the outer centers of the two triangles after being divided into the same identifier “3” are stored in the corresponding item in the column t104.

「4」の識別子で示される三角形は、図8のステップS826において閉曲面を設定されなかった三角形である。列t104の該当項目には、例えば、当該三角形の3つの頂点の座標が記憶される。また、列t106の該当項目には、当該三角形の面積の2倍の値が記憶されている。判定部140cは、この値を利用することで、判定対象の三角形「4」と第2の線分との干渉を少ない計算量で判定することができる。「5」の識別子で示される三角形は、或る多角形に対して既に設定された閉曲面に包含されるため、干渉や近接の判定を行わないとして判定された三角形である。   The triangle indicated by the identifier “4” is a triangle for which a closed curved surface has not been set in step S826 in FIG. For example, the coordinates of the three vertices of the triangle are stored in the corresponding item of the column t104. In addition, a value twice the area of the triangle is stored in the corresponding item in the column t106. By using this value, the determination unit 140c can determine the interference between the triangle “4” to be determined and the second line segment with a small amount of calculation. Since the triangle indicated by the identifier “5” is included in the closed curved surface already set for a certain polygon, it is a triangle determined not to determine interference or proximity.

例えば、「5」の識別子で示される三角形が「1」の識別子で示される三角形に対応する閉曲面に包含されるか否かを判定する場合、閉曲面設定部142cは、「1」の閉曲面の座標(t104)と「5」の三角形の各頂点との距離を算出する。閉曲面設定部142cは、当該算出した距離を近接判定値400が示す距離と比較して、そのいずれも近接判定値400が示す距離よりも小さければ、「5」の三角形は、「1」の三角形に対応する閉曲面に包含されると判定する。「2」のようなカプセル型の閉曲面の場合も同様に、閉曲面に対応する第1の線分と判定対象の三角形の各頂点との距離を算出し、当該算出した距離を近接判定値400が示す距離と比較することで、判定対象の三角形が既に設定されている閉曲面に包含されるか否かを判定することができる。   For example, when determining whether or not the triangle indicated by the identifier “5” is included in the closed surface corresponding to the triangle indicated by the identifier “1”, the closed surface setting unit 142c closes the triangle “1”. The distance between the coordinate (t104) of the curved surface and each vertex of the triangle “5” is calculated. The closed curved surface setting unit 142c compares the calculated distance with the distance indicated by the proximity determination value 400, and if any of them is smaller than the distance indicated by the proximity determination value 400, the triangle “5” indicates “1”. It is determined to be included in the closed curved surface corresponding to the triangle. Similarly, in the case of a capsule-type closed curved surface such as “2”, the distance between the first line segment corresponding to the closed curved surface and each vertex of the triangle to be determined is calculated, and the calculated distance is used as the proximity determination value. By comparing with the distance indicated by 400, it can be determined whether or not the determination target triangle is included in the already set closed curved surface.

このように、第3の実施形態において、既に判定対象として選択された三角形に設定された閉曲面に包含される三角形は、判定対象とはされない。すなわち、選択部120cは、複数の物体のうちの第1の物体の表面の形状を示す複数の多角形のうち、判定部140cが第2の線分との干渉を判定するための第1の閉曲面に包含されない少なくとも1つの多角形を、判定対象の多角形として選択し、判定部140cは、当該多角形を包含する第2の閉曲面と第2の線分との干渉を判定する。従って、干渉判定装置100cは、第2の実施形態における干渉判定装置100bに比べて干渉や近接の判定を行う対象となる三角形を少なくすることができるため、第1の物体と第2の物体との干渉や近接の判定に行う計算の量を、さらに少なくすることができる。   As described above, in the third embodiment, the triangle included in the closed curved surface set to the triangle that has already been selected as the determination target is not determined. That is, the selection unit 120c is a first unit for the determination unit 140c to determine the interference with the second line segment among the plurality of polygons indicating the shape of the surface of the first object among the plurality of objects. At least one polygon not included in the closed curved surface is selected as a polygon to be determined, and the determination unit 140c determines interference between the second closed curved surface including the polygon and the second line segment. Therefore, since the interference determination device 100c can reduce the number of triangles that are subject to interference and proximity determination compared to the interference determination device 100b in the second embodiment, the first object, the second object, and the like. It is possible to further reduce the amount of calculation performed for the determination of interference and proximity.

また、干渉判定装置100cは、干渉判定を行う対象となる多角形を予め絞り込んでよい。例えば、干渉判定装置100cは、取得した移動ベクトルを解析し、干渉が発生する恐れのある物体やその一部分を特定したうえで、特定された物体やその一部分を構成する多角形に対してのみ干渉や近接の判定を行ってもよい。また、干渉判定装置100cは、例えば、物体全体或いはその一部を覆う閉曲面で簡単に干渉や近接の判定を行うことでさらに詳細な判定を行う物体やその一部分を特定し、特定された物体やその一部分を構成する多角形に対してのみ干渉や近接の判定を行ってもよい。このような判定対象の多角形の絞り込みは、特定の方法に限定せずに、利用してよい。   Moreover, the interference determination apparatus 100c may narrow down the polygon used as the object which performs interference determination previously. For example, the interference determination apparatus 100c analyzes the acquired movement vector, identifies an object or a part thereof that may cause interference, and then interferes only with the identified object or a polygon that forms the part. Or proximity determination may be performed. In addition, the interference determination apparatus 100c specifies, for example, an object or a part of the object to be determined in more detail by simply determining interference or proximity on a closed curved surface covering the entire object or a part of the object, and the specified object. Alternatively, interference or proximity may be determined only for a polygon that forms a part of the polygon. Such narrowing down of polygons to be determined may be used without being limited to a specific method.

以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上記のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。例えば、本発明の干渉判定装置は、製造ラインシミュレータの他にも機構設計システムや工業製品の設計、3次元マップ、ゲームソフトなどコンピュータグラフィックスを利用する様々な分野に適用することができる。また、以上説明した3つの実施形態の各機能を、組み合わせてもよい。例えば、第3の実施形態で説明した閉曲面を予め設定する方法は、第1の実施形態でも適用することができる。また、例えば、閉曲面同士で干渉や近接を判定してもよい。   As described above, the embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. It is possible to For example, the interference determination apparatus of the present invention can be applied to various fields using computer graphics such as a mechanism design system, industrial product design, three-dimensional map, and game software in addition to a production line simulator. Moreover, you may combine each function of three embodiment demonstrated above. For example, the method for presetting the closed curved surface described in the third embodiment can also be applied to the first embodiment. Further, for example, interference or proximity may be determined between closed curved surfaces.

100、100b、100c…干渉判定装置、110…ポリゴン取得部、120、120b、120c…選択部、130…分割部、140、140b、140c…判定部、142、142b、142c…閉曲面設定部、144、144c…干渉演算部、146…干渉判定部、150…出力部、160…移動ベクトル取得部、170…座標変換部、202…ポリゴンデータ、204…移動ベクトルデータ、400…近接判定値、410…閉曲面設定テーブル   DESCRIPTION OF SYMBOLS 100, 100b, 100c ... Interference determination apparatus, 110 ... Polygon acquisition part, 120, 120b, 120c ... Selection part, 130 ... Dividing part, 140, 140b, 140c ... Determination part, 142, 142b, 142c ... Closed curved surface setting part, 144, 144c ... interference calculation unit, 146 ... interference determination unit, 150 ... output unit, 160 ... movement vector acquisition unit, 170 ... coordinate conversion unit, 202 ... polygon data, 204 ... movement vector data, 400 ... proximity determination value, 410 ... Closed surface setting table

Claims (12)

複数の物体のうちの面取りされた第1の物体の表面の形状を示す複数の多角形のうちの一部の多角形を判定対象の多角形として選択する選択部と、
前記選択された判定対象の多角形を包含する閉曲面であって、前記判定対象の多角形に対応する或る点又は前記判定対象の多角形に対応する第1の線分との距離が一定である閉曲面と、前記複数の物体のうちの第2の物体の表面の形状を示す第2の線分との干渉を前記距離に基づいて判定する判定部と、
を備える干渉判定装置。
A selection unit that selects, as a polygon to be determined, a polygon of a part of the plurality of polygons indicating the shape of the surface of the chamfered first object among the plurality of objects;
A closed curved surface including the selected polygon to be determined, and a distance from a certain point corresponding to the polygon to be determined or a first line segment corresponding to the polygon to be determined is constant. A determination unit that determines interference between the closed curved surface and a second line segment indicating the shape of the surface of the second object among the plurality of objects based on the distance;
An interference determination device comprising:
前記第2の線分とは、前記第2の物体の表面の形状を示す複数の多角形のうちの1つの多角形の1つの辺である
請求項1に記載の干渉判定装置。
The interference determination apparatus according to claim 1, wherein the second line segment is one side of one polygon among a plurality of polygons indicating the shape of the surface of the second object.
前記判定対象の多角形の形状に基づいて、前記或る点との距離が一定である閉曲面と、前記第1の線分との距離が一定である閉曲面とのいずれか一方を、前記判定対象の多角形を包含する閉曲面として設定する閉曲面設定部、
を備える請求項1又は2に記載の干渉判定装置。
Based on the polygonal shape to be determined, either a closed curved surface having a constant distance to the certain point or a closed curved surface having a constant distance to the first line segment, A closed surface setting unit for setting as a closed surface including a polygon to be judged,
The interference determination apparatus according to claim 1, further comprising:
前記閉曲面設定部は、前記距離を表す近接判定値に基づいて、前記或る点との距離が一定である閉曲面と、前記第1の線分との距離が一定である閉曲面とのいずれか一方を、前記判定対象の多角形を包含する閉曲面として設定する
請求項3に記載の干渉判定装置。
The closed curved surface setting unit includes a closed curved surface having a constant distance from the certain point and a closed curved surface having a constant distance from the first line segment based on a proximity determination value representing the distance. The interference determination apparatus according to claim 3, wherein either one is set as a closed curved surface including the polygon to be determined.
前記選択部は、複数の物体のうちの第1の物体の表面の形状を示す複数の多角形のうち、前記判定部による前記干渉の判定に用いられた前記閉曲面に包含されていない多角形を、前記判定対象の多角形として選択する
請求項1から4のいずれか一項に記載の干渉判定装置。
The selection unit is a polygon that is not included in the closed curved surface used for the determination of the interference by the determination unit among the plurality of polygons indicating the shape of the surface of the first object among the plurality of objects. The interference determination device according to any one of claims 1 to 4, wherein a polygon is selected as the polygon to be determined.
前記第1の物体の表面の形状を示す複数の多角形のうちの一部の多角形を、前記距離に基づいて複数の多角形に分割する分割部
を備え、
前記選択部は、前記分割部による分割後の複数の多角形のうちの少なくとも1つの多角形を、前記判定対象の多角形として選択する
請求項1から5のいずれか一項に記載の干渉判定装置。
A dividing unit that divides some of the plurality of polygons indicating the shape of the surface of the first object into a plurality of polygons based on the distance;
The interference determination according to any one of claims 1 to 5, wherein the selection unit selects at least one of a plurality of polygons after division by the division unit as the polygon to be determined. apparatus.
前記分割部は、前記第1の物体の表面の形状を示す複数の多角形のうちの一部の多角形を複数の多角形に分割するか否かを、前記距離に基づいて判定する
請求項6に記載の干渉判定装置。
The division unit determines, based on the distance, whether or not to divide a part of the plurality of polygons indicating the shape of the surface of the first object into a plurality of polygons. 6. The interference determination device according to 6.
前記分割部は、前記第1の物体の表面の形状を示す複数の多角形のうちの一部の多角形を、前記距離に基づいて2つから5つの多角形に分割する
請求項6又は7に記載の干渉判定装置。
The division unit divides a part of a plurality of polygons indicating the shape of the surface of the first object into two to five polygons based on the distance. The interference determination apparatus described in 1.
前記分割部による分割前の複数の多角形のうちの一部の多角形とは、三角形であり、
前記分割部は、前記分割前の多角形のうちの一部の三角形を、当該三角形の1つの中線により前記分割後の複数の多角形としての2つの三角形に分割する
請求項6から8のいずれか一項に記載の干渉判定装置。
Some polygons of the plurality of polygons before division by the division unit are triangles,
9. The division unit divides a part of the polygons before the division into two triangles as a plurality of polygons after the division by one middle line of the triangles. The interference determination apparatus according to any one of claims.
前記判定部は、前記或る点又は前記第1の線分と前記閉曲面との距離、及び前記或る点又は前記第1の線分と前記第2の線分との距離の比較に基づいて前記干渉を判定する
請求項1から9のいずれか一項に記載の干渉判定装置。
The determination unit is based on a comparison between a distance between the certain point or the first line segment and the closed curved surface, and a distance between the certain point or the first line segment and the second line segment. The interference determination apparatus according to any one of claims 1 to 9, wherein the interference is determined.
選択部が、複数の物体のうちの面取りされた第1の物体の表面の形状を示す複数の多角形のうちの一部の多角形を判定対象として選択する選択過程と、
判定部が、前記選択された判定対象の多角形を包含する閉曲面であって、前記判定対象の多角形に対応する或る点又は前記判定対象の多角形に対応する第1の線分との距離が一定である閉曲面と、前記複数の物体のうちの第2の物体の表面の形状を示す第2の線分との干渉を前記距離に基づいて判定する判定過程と、
を有する干渉判定方法。
A selection process in which the selection unit selects, as a determination target, a part of the plurality of polygons indicating the shape of the surface of the chamfered first object among the plurality of objects;
The determination unit is a closed curved surface including the selected determination target polygon, and a certain point corresponding to the determination target polygon or a first line segment corresponding to the determination target polygon A determination process for determining an interference between a closed curved surface having a constant distance and a second line segment indicating a shape of a surface of a second object of the plurality of objects based on the distance;
An interference determination method.
コンピュータに、
複数の物体のうちの面取りされた第1の物体の表面の形状を示す複数の多角形のうちの一部の多角形を判定対象として選択する選択手順と、
前記選択された判定対象の多角形を包含する閉曲面であって、前記判定対象の多角形に対応する或る点又は前記判定対象の多角形に対応する第1の線分との距離が一定である閉曲面と、前記複数の物体のうちの第2の物体の表面の形状を示す第2の線分との干渉を前記距離に基づいて判定する判定手順と、
を実行させるための干渉判定プログラム。
On the computer,
A selection procedure for selecting a part of the plurality of polygons indicating the shape of the surface of the chamfered first object among the plurality of objects as a determination target;
A closed curved surface including the selected polygon to be determined, and a distance from a certain point corresponding to the polygon to be determined or a first line segment corresponding to the polygon to be determined is constant. A determination procedure for determining interference between the closed curved surface and a second line segment indicating the shape of the surface of the second object among the plurality of objects based on the distance;
Interference determination program for executing
JP2013225697A 2013-10-30 2013-10-30 Interference determination apparatus, interference determination method, and interference determination program Active JP5878907B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013225697A JP5878907B2 (en) 2013-10-30 2013-10-30 Interference determination apparatus, interference determination method, and interference determination program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013225697A JP5878907B2 (en) 2013-10-30 2013-10-30 Interference determination apparatus, interference determination method, and interference determination program

Publications (2)

Publication Number Publication Date
JP2015087943A JP2015087943A (en) 2015-05-07
JP5878907B2 true JP5878907B2 (en) 2016-03-08

Family

ID=53050675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013225697A Active JP5878907B2 (en) 2013-10-30 2013-10-30 Interference determination apparatus, interference determination method, and interference determination program

Country Status (1)

Country Link
JP (1) JP5878907B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6559492B2 (en) * 2015-07-27 2019-08-14 株式会社Fuji CAD system and unit arrangement method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04236676A (en) * 1991-01-21 1992-08-25 Hitachi Ltd Method for checking interference of articulated structure
JP3083701B2 (en) * 1994-03-22 2000-09-04 本田技研工業株式会社 Part model data check device
JP3425760B2 (en) * 1999-01-07 2003-07-14 富士通株式会社 Interference check device
JP3954909B2 (en) * 2002-06-19 2007-08-08 インターナショナル・ビジネス・マシーンズ・コーポレーション Recognition model generation system, recognition model generation method, program for causing computer to execute recognition model generation method, computer-readable recording medium on which program is recorded, and structural mesh generation system
JP4714444B2 (en) * 2004-08-31 2011-06-29 国立大学法人北海道大学 Tetrahedral mesh generation method and program
JP4740644B2 (en) * 2005-05-11 2011-08-03 任天堂株式会社 Image processing program and image processing apparatus
JP5025598B2 (en) * 2008-08-29 2012-09-12 三菱電機株式会社 Interference check control apparatus and interference check control method

Also Published As

Publication number Publication date
JP2015087943A (en) 2015-05-07

Similar Documents

Publication Publication Date Title
US9550295B2 (en) Interference check device
EP3031585A2 (en) Collision avoidance method, control device, and program
Kaloorazi et al. Determination of the maximal singularity-free workspace of 3-DOF parallel mechanisms with a constructive geometric approach
US8768661B2 (en) Method for creating finite element model of rubber composite
JP2010237843A (en) Computer program for machining error prediction, machining error detection device and device for correcting tool path based on the same prediction result
TWI506243B (en) System and method for simulating a calibration path of a probe of a measuring machine
TWI506244B (en) System and method for computing distances between curved surfaces
Masselli et al. A new geometric approach for faster solving the perspective-three-point problem
JP5878907B2 (en) Interference determination apparatus, interference determination method, and interference determination program
EP2522952A2 (en) Method for generating error image and system for generating error image
Lin et al. Automated sequence arrangement of 3D point data for surface fitting in reverse engineering
CN102841951A (en) System and method for building three-dimensional safety surface
JP6917096B1 (en) Information processing method, information processing system, program
JP2019197333A (en) Path correction method and control device of multiple spindle processing machine
JP2008059375A (en) Information processing method, and information processor
Filimonov et al. Constructing Equidistant Curve for Planar Composite Curve in CAD Systems
JP2010009143A (en) Deformed shape calculation method and program of flexible object
JP6915237B2 (en) Information processing device, simulator result display method, and simulator result display program
Ye et al. An improved algorithm for triangle to triangle intersection test
JP2014059621A (en) Analysis device and analysis method
JP2017228234A (en) Information processor, region division method, and region division program
KR101193441B1 (en) Method for measuring deviation of machine with 3 axes moving table
JP6265811B2 (en) Draw model generation method and draw model generation system
CN109598011B (en) Method for interpreting tube layout by using three-dimensional coordinates and recording medium thereof
WO2024105847A1 (en) Control device, three-dimensional position measuring system, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150721

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150916

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151020

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151211

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160129

R150 Certificate of patent or registration of utility model

Ref document number: 5878907

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250