JP2015158778A - Solid molding data optimization device - Google Patents

Solid molding data optimization device Download PDF

Info

Publication number
JP2015158778A
JP2015158778A JP2014032914A JP2014032914A JP2015158778A JP 2015158778 A JP2015158778 A JP 2015158778A JP 2014032914 A JP2014032914 A JP 2014032914A JP 2014032914 A JP2014032914 A JP 2014032914A JP 2015158778 A JP2015158778 A JP 2015158778A
Authority
JP
Japan
Prior art keywords
polygon
data
surface data
deletion target
polygons
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014032914A
Other languages
Japanese (ja)
Inventor
茂出木 敏雄
Toshio Modegi
敏雄 茂出木
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2014032914A priority Critical patent/JP2015158778A/en
Publication of JP2015158778A publication Critical patent/JP2015158778A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a solid molding data optimization device capable of efficiently obtaining solid molding data while reducing polygons from a surface data formed from the polygons without deteriorating the quality of an output molded object.SOLUTION: An area and a circumferential length of each of polygons forming surface data are calculated (S21), a polygon with a minimum area×circumferential length is defined as a deletion target polygon (S22), and a side to be deleted is selected on the basis of lengths of sides of the deletion target polygon (S23). The deletion target polygon is deleted (S24), polygons sharing an apex of the side to be deleted are successively selected (S25), and polygons sharing two apexes are deleted (S26). For the polygons sharing only one apex, the shared apex is corrected into a midpoint, and an area and a circumferential length of that polygon are calculated again (S27). After processing of the polygons sharing the apex, it is determined whether the number of all polygons is equal to or less than a target value (S28) and if it is not equal to or less than the target value, polygon deletion processing is performed iteratively until the number becomes equal to or less than the target value.

Description

本発明は、立体物を表すデータを基に、樹脂等を加工して立体物を造形する3Dプリンタ等の立体物造形装置の利用に際して、立体物造形装置への出力用データを最適化するための技術に関する。   The present invention optimizes data for output to a three-dimensional object forming apparatus when using a three-dimensional object forming apparatus such as a 3D printer that processes a resin or the like to form a three-dimensional object based on data representing the three-dimensional object. Related to technology.

近年、立体物を表すデータをもとに、樹脂や石膏等を加工して造形する3Dプリンタが立体物造形装置として普及してきている。3Dプリンタの医療応用として、医療診断で撮影されるCT/MRI画像(DICOM形式3次元ボクセルデータ)を基に3Dプリンタ出力用モデリングデータを作成し、手術シミュレーション・医学教育・インフォームドコンセント向けの臓器模型を出力したり、体内埋め込み用の人工臓器(血管、骨、関節など)を作成したりする試みが始まっている。   In recent years, 3D printers that process and model resin, gypsum, and the like based on data representing a three-dimensional object have become widespread as three-dimensional object modeling apparatuses. As a medical application of 3D printers, modeling data for 3D printer output is created based on CT / MRI images (DICOM format 3D voxel data) taken by medical diagnosis, and organs for surgical simulation, medical education, and informed consent Attempts have been made to output models and create artificial organs (blood vessels, bones, joints, etc.) for implantation in the body.

CT/MRI画像から臓器模型の3Dプリンタ出力用モデリングデータを作成する方法としては、特許文献1、特許文献2に示されるように、対象とする臓器領域のボクセルを抽出し、Marching Cube法(特許文献3など)により臓器領域の境界面を多面体(三角形の集合)で近似したサーフェースに変換して表面形状を表現したサーフェースデータを得る手法が一般的である。   As a method for creating modeling data for 3D printer output of an organ model from a CT / MRI image, as shown in Patent Document 1 and Patent Document 2, a voxel of a target organ region is extracted and the Marching Cube method (patent In general, a technique for converting the boundary surface of an organ region into a surface approximated by a polyhedron (a set of triangles) and obtaining surface data expressing the surface shape is used.

特許第3690501号公報Japanese Patent No. 3690501 特開2012−216102号公報JP 2012-216102 A 米国特許第7209136号公報US Pat. No. 7,209,136 特開平8−153211号公報Japanese Patent Laid-Open No. 8-153211 特許第3350473号公報Japanese Patent No. 3350473 特許第4463597号公報Japanese Patent No. 4463597 特許第5018721号公報Japanese Patent No. 5018721 特開平11−232489号公報Japanese Patent Laid-Open No. 11-232489

上記のサーフェース変換手法では512の3乗程度のボクセルを基に、3次元的に三角形を生成する方法をとるため、三角形ポリゴンが膨大になり、CG分野においては、画面描画の際に時間がかかり対話操作の応答性が悪くなるという問題が指摘されている。これは3Dプリンタ出力においても問題を起こし、プリンタ出力前処理(ポリゴンから積層造形用のデータに変換する処理)に時間がかかり、場合によりワークメモリーオーバーフローを引き起こして出力不能になる。   In the above surface conversion method, a method of generating a triangle three-dimensionally based on a voxel of about the power of 512 is used, so the triangle polygon becomes enormous, and in the CG field, time is required for screen drawing. It has been pointed out that there is a problem that the responsiveness of the interactive operation becomes worse. This also causes a problem in 3D printer output, and it takes time for printer output preprocessing (processing for converting polygons into data for additive manufacturing), and in some cases causes a work memory overflow and disables output.

これに対してCG分野においては、画面の解像度に合せてポリゴン分割を粗くして曲面を表現したり、可視化に供しないポリゴンを事前に削除したりする方法がとられる。例えば、平板オブジェクトでは、単一面だけで表現し裏面を構成するポリゴンを省略したり、特許文献4のように、視点方向から隠面にあたり可視化に供しないポリゴンを事前に削除したり、特許文献5のように、他のポリゴンによって隠される内側のポリゴンを判定して事前に削除し、描画対象ポリゴンを削減する方法が提案されている。また、特許文献6のように、微細な凹凸表現に対してポリゴンを用いず、テクスチャやバンプマッピングで代用する方法が提案されている。   On the other hand, in the CG field, a method is used in which polygonal division is roughened in accordance with the resolution of the screen to express a curved surface, or polygons that are not used for visualization are deleted in advance. For example, in a flat object, polygons that represent only a single surface and constitute the back surface are omitted, or polygons that are hidden from the viewpoint direction and are not used for visualization are deleted in advance, as in Patent Document 4, or Patent Document 5 As described above, a method has been proposed in which inner polygons hidden by other polygons are determined and deleted in advance to reduce the drawing target polygons. Further, as disclosed in Patent Document 6, a method of substituting texture or bump mapping instead of using polygons for a fine uneven expression has been proposed.

しかし、3Dプリンタ出力においては、画面より細かい解像度が要求され、ポリゴンにより閉空間を構成する必要があるため、平板オブジェクトにおいて、裏面を構成するポリゴンを省略することはできない。また、造形物は種々のアングルから鑑賞されるため基本的に隠面は存在せず、造形物内部にも別の形状を造形可能なため、CG分野で提案されているオクルージョンカリングという手法は意味をもたない。微細な凹凸に対しても陰影などで視覚的に擬似表現することはできず、ポリゴン形状で表現せざるを得ない。特許文献7のように、建築模型においては極端にポリゴンを削減したデフォルメされた表現が要望される場合もあるが、医療応用ではそれなりにリアリティが要求される。そのため、特許文献8のように、造形物の外観を損なわない程度に、三角形ポリゴン自体を削減する手法をとらざるを得ない。   However, in 3D printer output, a resolution finer than that of the screen is required, and since it is necessary to form a closed space with polygons, it is not possible to omit the polygons constituting the back surface in a flat object. In addition, since the model is viewed from various angles, there is basically no hidden surface, and another shape can be modeled inside the model, so the occlusion culling method proposed in the CG field means Does not have Even minute irregularities cannot be visually expressed by shading or the like, and must be expressed by polygonal shapes. As in Patent Document 7, there are cases where a deformed expression with extremely reduced polygons is required in an architectural model, but in medical applications, reality is required as such. Therefore, as in Patent Document 8, there is no choice but to take a technique of reducing the triangular polygons themselves to such an extent that the appearance of the shaped object is not impaired.

三角形ポリゴンの削減にあたっては、特許文献8の手法が基本になる。これは、(1)与えられたポリゴンから削減しても全体形状にあまり影響を与えない三角形および稜線を探索する処理と、(2)対象稜線を削減するとともにそれと頂点を共有する隣接三角形を探索し補正を行う処理との2種の探索処理を所望のデータ量に削減されるまで繰り返す。特許文献8の手法では、双方の処理において削除候補とする稜線と頂点を共有する隣接三角形を探索する処理を必要とし、与えられたポリゴン数の2乗に比例して処理負荷が増大するという問題を抱えていた。   In the reduction of triangular polygons, the method of Patent Document 8 is fundamental. This includes (1) processing to search for triangles and ridges that do not affect the overall shape even if they are reduced from a given polygon, and (2) search for neighboring triangles that share vertices with the target ridges while reducing them. The two types of search processing including correction processing are repeated until the data amount is reduced to a desired amount. The technique of Patent Document 8 requires processing for searching for adjacent triangles that share ridgelines and vertices that are candidates for deletion in both processes, and the processing load increases in proportion to the square of the number of polygons given. Was holding.

処理負荷を削減する方法として、削減対象の入力ポリゴンセットを少なくすれば良いため、入力ポリゴンセットを分割して処理をすればよい。特許文献1では、ポリゴンに変換前のボクセル画像の段階で分割を行い、分割されたボクセルデータごとにサーフェース変換を行ってポリゴンを削減する手法を提案している。これにより確かに高速化は実現できるが、ボクセル分割された境界部にサーフェースが形成されてしまうため、ポリゴンデータを統合させると、造形物上において分割境界部に対応する不連続な亀裂が発生してしまうという問題がある(ただし、CG用途においては、レンダリングにより境界部は目立たない。)。   As a method for reducing the processing load, it is only necessary to reduce the number of input polygon sets to be reduced. Therefore, the input polygon set may be divided and processed. Japanese Patent Application Laid-Open No. 2004-228620 proposes a method of performing polygon conversion at the stage of a voxel image before conversion into polygons, and performing surface conversion for each divided voxel data to reduce polygons. Although this can certainly increase the speed, a surface is formed at the boundary part divided by voxel, so when polygon data is integrated, discontinuous cracks corresponding to the divided boundary part occur on the modeled object. (However, in CG applications, the boundary portion is not noticeable due to rendering).

また、見かけ上は単一の閉空間にまとまって見えても、データ的には複数の閉空間に分離されている場合があり、主たる閉空間に接触した小空間が存在する場合、そのままプリンタ出力すれば支障無いが、特許文献8等によりポリゴン削減を施すと、小空間が削られて主たる閉空間からの距離が長くなり、完全に遊離した状態になることがある。この状態でプリンタ出力すると、プリンタ出力前処理でエラー停止したり、空中に浮遊するよう造形指示された小空間が出力途上で落下し出力トラブルを発生させたりする可能性がある(ただし、CG用途においては、特に問題を生じない。)。   Also, even if it looks as if it is a single closed space, it may be separated into multiple closed spaces in terms of data. If there is a small space in contact with the main closed space, it will be output directly to the printer. However, if polygon reduction is performed according to Patent Document 8 or the like, the small space may be cut away, and the distance from the main closed space may become longer, resulting in a completely free state. If the printer is output in this state, there is a possibility that an error will be stopped in the printer output pre-processing, or that a small space instructed to float in the air may fall in the middle of output and cause an output trouble (however, for CG applications) In particular, there is no problem.)

そこで、本発明は、出力造形物の品質を劣化させることなく、ポリゴンで構成されたサーフェースデータから、効率的にポリゴンを削減して立体物造形用データを得ることが可能な立体物造形用データ最適化装置を提供することを課題とする。   Therefore, the present invention is for three-dimensional object modeling that can efficiently reduce polygons and obtain three-dimensional object modeling data from surface data composed of polygons without degrading the quality of the output modeling object. It is an object to provide a data optimization device.

上記課題を解決するため、本発明第1の態様では、立体物の構造をポリゴンの集合体で表現したサーフェースデータを、立体物の造形のために最適化する装置であって、前記サーフェースデータを構成する各ポリゴンの面積を基に、削除するべきポリゴンを削除対象ポリゴンとして選定する削除対象ポリゴン選定手段と、前記削除対象ポリゴンを構成する辺の長さに基づいて、削除するべき辺を削除対象辺として選定する削除対象辺選定手段と、前記削除対象ポリゴン以外のポリゴンから、前記削除対象辺の2頂点(辺の両端点)のいずれか1頂点を共有するポリゴンである削除頂点共有ポリゴンを探索する削除頂点共有ポリゴン探索手段と、前記削除対象辺の2頂点の双方を共有する削除頂点共有ポリゴンを、前記削除対象ポリゴンとともに削除し、前記探索された削除対象辺のいずれか1頂点のみを共有する削除頂点共有ポリゴンに対して、前記共有する1頂点を前記削除対象辺の2頂点の中点の位置に補正することによって更新するサーフェースデータ更新手段と、前記サーフェースデータ更新手段により更新されたサーフェースデータを構成するポリゴン数が所定の目標値より大きい場合、前記削除対象ポリゴン選定手段、前記削除対象辺選定手段、削除頂点共有ポリゴン探索手段、サーフェースデータ更新手段に対して繰り返して処理を実行させる制御を行う制御手段と、を備えることを特徴とする立体物造形用データ最適化装置を提供する。   In order to solve the above-described problem, according to a first aspect of the present invention, there is provided an apparatus for optimizing surface data representing a structure of a three-dimensional object by an aggregate of polygons for modeling a three-dimensional object, Based on the area of each polygon constituting the data, the deletion target polygon selection means for selecting the polygon to be deleted as the deletion target polygon, and the side to be deleted based on the length of the side constituting the deletion target polygon. Deletion vertex shared polygon that is a polygon that shares one of the two vertices of the deletion target side (both end points of the side) from a polygon other than the deletion target polygon, and a deletion target side selection unit that selects as a deletion target side A deleted vertex shared polygon search means for searching for a deleted vertex shared polygon that shares both two vertices of the side to be deleted together with the deleted target polygon. By deleting and correcting one shared vertex to the position of the midpoint of the two vertices of the deletion target side with respect to the deleted vertex sharing polygon that shares only one vertex of the searched deletion target side A surface data updating means for updating, and when the number of polygons constituting the surface data updated by the surface data updating means is larger than a predetermined target value, the deletion target polygon selecting means, the deletion target edge selecting means, There is provided a three-dimensional object modeling data optimizing device comprising: a deleted vertex shared polygon search unit and a control unit that performs control to repeatedly execute processing on a surface data update unit.

本発明第1の態様によれば、サーフェースデータを構成する各ポリゴンの面積を基に、削除対象ポリゴンを選定し、削除対象ポリゴンを構成する辺の長さに基づいて、削除対象辺を選定し、削除対象ポリゴン以外のポリゴンから、削除対象辺の2頂点のいずれか1頂点を共有する削除頂点共有ポリゴンを探索し、削除対象辺の2頂点の双方を共有する削除頂点共有ポリゴンを、削除対象ポリゴンとともに削除し、削除対象辺のいずれか1頂点のみを共有する削除頂点共有ポリゴンに対して、共有する1頂点を削除対象辺の2頂点の中点の位置に補正することによりサーフェースデータを更新し、更新されたサーフェースデータを構成するポリゴン数が所定の目標値より大きい場合、削除対象ポリゴンの選定、削除対象辺の選定、削除頂点共有ポリゴンの探索、サーフェースデータの更新を、繰り返して行うようにしたので、出力造形物の品質を劣化させることなく、ポリゴンで構成されたサーフェースデータから、ポリゴン数に単純比例した少ない処理負荷で、効率的にポリゴンを削減して立体物造形用データを得ることが可能となる。特に、医療用のCT/MRI画像をもとに生成されたサーフェースデータを効率良く3Dプリンタ等の立体物造形装置に出力することが可能となる。   According to the first aspect of the present invention, the deletion target polygon is selected based on the area of each polygon constituting the surface data, and the deletion target side is selected based on the length of the side constituting the deletion target polygon. Then, from the polygons other than the deletion target polygon, a deleted vertex shared polygon that shares one of the two vertices of the deletion target side is searched, and the deleted vertex shared polygon that shares both the two vertices of the deletion target side is deleted. Surface data by deleting together with the target polygon and correcting one shared vertex to the midpoint of the two vertices of the deleted target side for the deleted vertex shared polygon that shares only one vertex of the deleted target side If the number of polygons constituting the updated surface data is greater than the predetermined target value, selection of polygons to be deleted, selection of edges to be deleted, and shared vertex for deletion Since the search for Lygon and the update of the surface data are performed repeatedly, the surface data composed of polygons can be used with less processing load that is simply proportional to the number of polygons without degrading the quality of the output molding. Therefore, it is possible to efficiently reduce polygons and obtain data for modeling a three-dimensional object. In particular, it is possible to efficiently output surface data generated based on medical CT / MRI images to a three-dimensional object forming apparatus such as a 3D printer.

また、本発明第2の態様では、前記削除対象ポリゴン選定手段が、前記サーフェースデータを構成するポリゴンに対して、面積と周長を算出し、面積と周長の積が最小となるポリゴンを前記削除対象ポリゴンとして選定することを特徴とする。   Further, in the second aspect of the present invention, the deletion target polygon selection means calculates an area and a perimeter for the polygon constituting the surface data, and selects a polygon having a minimum product of the area and the perimeter. It is selected as the polygon to be deleted.

本発明第2の態様によれば、サーフェースデータを構成するポリゴンに対して、面積と周長を算出し、面積と周長の積が最小となるポリゴンを削除対象ポリゴンとして選定するようにしたので、細長くて面積が小さいサーフェースを形成する上で重要なポリゴンを削ることなく、適切な削除対象ポリゴンの選定を行うことが可能となる。   According to the second aspect of the present invention, the area and perimeter are calculated for the polygons constituting the surface data, and the polygon that minimizes the product of the area and perimeter is selected as the polygon to be deleted. Therefore, it is possible to select an appropriate polygon to be deleted without cutting a polygon that is important for forming a long and small surface.

また、本発明第3の態様では、前記削除対象辺選定手段が、前記削除対象ポリゴンの各辺の長さを算出し、最も短い辺を削除対象辺として選定することを特徴とする。   The third aspect of the present invention is characterized in that the deletion target side selecting means calculates the length of each side of the deletion target polygon and selects the shortest side as the deletion target side.

本発明第3の態様によれば、選定された削除対象ポリゴンの各辺の長さを算出し、最も短い辺を削除対象辺として選定するようにしたので、サーフェースを形成する上で重要な辺を削ることなく、適切な削除対象辺の選定を行うことが可能となる。   According to the third aspect of the present invention, since the length of each side of the selected polygon to be deleted is calculated and the shortest side is selected as the deletion target side, it is important in forming the surface. It is possible to select an appropriate deletion target edge without cutting the edge.

また、本発明第4の態様では、前記サーフェースデータが複数の領域に分割されたボクセル形式の3D医療画像データに対応して複数セット存在しており、前記制御手段は、各サーフェースデータに対して、前記削除対象ポリゴン選定手段、前記削除対象辺選定手段、削除頂点共有ポリゴン探索手段、サーフェースデータ更新手段に対して処理を実行させ、複数セットの更新されたサーフェースデータを作成させるものであって、前記複数セットの更新されたサーフェースデータを単一のサーフェースデータに合成するサーフェースデータ合成手段を、更に備えることを特徴とする。   Further, in the fourth aspect of the present invention, there are a plurality of sets corresponding to the voxel format 3D medical image data divided into a plurality of regions, and the control means includes each surface data. On the other hand, the deletion target polygon selection means, the deletion target edge selection means, the deletion vertex shared polygon search means, and the surface data update means execute processing to create a plurality of sets of updated surface data. The method further comprises surface data synthesizing means for synthesizing the plurality of sets of updated surface data into a single surface data.

本発明第4の態様によれば、サーフェースデータが複数の領域に分割されたボクセル形式の3D医療画像データに対応して複数セット存在し、各サーフェースデータに対して、削除対象ポリゴンの選定、削除対象辺の選定、削除頂点共有ポリゴンの探索、サーフェースデータの更新を実行させ、複数セットの更新されたサーフェースデータを作成し、複数セットの更新されたサーフェースデータを単一のサーフェースデータに合成するようにしたので、領域ごとに分割された少ないポリゴン数で構成されるサーフェースデータを基に前記一連の処理が高速に実行され、人体の各部位領域ごとに処理したデータを一括して出力するためのサーフェースデータを立体物造形用データとして効率良く得ることが可能となる。   According to the fourth aspect of the present invention, a plurality of sets exist corresponding to the voxel format 3D medical image data in which the surface data is divided into a plurality of regions, and the polygon to be deleted is selected for each surface data. , Select the deletion target edge, search the deleted vertex shared polygon, update the surface data, create multiple sets of updated surface data, and create multiple sets of updated surface data on a single surface Since it is synthesized with the face data, the series of processes are executed at high speed based on the surface data composed of a small number of polygons divided for each area, and the data processed for each part area of the human body is obtained. Surface data for batch output can be efficiently obtained as three-dimensional object modeling data.

また、本発明第5の態様では、前記削除対象ポリゴン選定手段を実行させる対象のサーフェースデータに対して、各グループに属するポリゴンが当該グループ内の他のいずれかのポリゴンと、ポリゴンを構成する辺(2頂点)を共有するようにグループ分類するサーフェースデータのグループ分類手段と、前記分類された各グループに対する前記削除対象ポリゴン選定手段、前記削除対象辺選定手段、削除頂点共有ポリゴン探索手段、サーフェースデータ更新手段による処理の実行により得られた複数のグループの更新されたサーフェースデータに対して、単一のサーフェースデータに合成するグループ合成手段と、を更に備えることを特徴とする。   In the fifth aspect of the present invention, for the surface data to be executed by the deletion target polygon selection means, polygons belonging to each group constitute a polygon with any other polygon in the group. Surface data group classification means for grouping so as to share edges (two vertices), the deletion target polygon selection means for each of the classified groups, the deletion target edge selection means, a deletion vertex shared polygon search means, It further comprises group combining means for combining a plurality of groups of updated surface data obtained by execution of processing by the surface data updating means into a single surface data.

本発明第5の態様によれば、削除対象ポリゴン選定対象のサーフェースデータに対して、各グループに属するポリゴンが当該グループ内の他のいずれかのポリゴンと、ポリゴンを構成する辺を共有するようにグループ分類し、分類された各グループに対する削除対象ポリゴンの選定、削除対象辺の選定、削除頂点共有ポリゴンの探索、サーフェースデータの更新の実行により作成された複数のグループの更新されたサーフェースデータに対して、単一のサーフェースデータに合成するようにしたので、1度に削減するポリゴン数がグループ単位となって少なくなるため、全体として処理を高速化することが可能となる。   According to the fifth aspect of the present invention, with respect to the surface data to be deleted polygon selection target, a polygon belonging to each group shares a side constituting the polygon with any other polygon in the group. The updated surface of the multiple groups created by selecting the deletion target polygon, selecting the deletion target edge, searching for the deleted vertex shared polygon, and updating the surface data for each classified group Since the data is combined into a single surface data, the number of polygons to be reduced at a time is reduced in units of groups, so that the overall processing speed can be increased.

また、本発明第6の態様では、前記グループ合成手段は、前記複数のグループの更新されたサーフェースデータに対して、外接直方体の体積を算出し、算出された体積が所定のしきい値未満である場合、当該グループのサーフェースデータを合成対象から除外することを特徴とする。   In the sixth aspect of the present invention, the group combining means calculates the volume of a circumscribed cuboid for the updated surface data of the plurality of groups, and the calculated volume is less than a predetermined threshold value. In this case, the surface data of the group is excluded from the synthesis targets.

本発明第6の態様によれば、複数のグループの更新されたサーフェースデータに対して、外接直方体の体積を算出し、算出された体積が所定のしきい値未満である場合、そのグループのサーフェースデータを合成対象から除外することによりグループの合成を行うようにしたので、遊離した小体積の物体を3Dプリンタ等の立体物造形装置で出力してしまい、立体物造形装置内に詰まってしまう等の不具合の発生を低減することが可能となる。   According to the sixth aspect of the present invention, the volume of a circumscribed cuboid is calculated for the updated surface data of a plurality of groups, and when the calculated volume is less than a predetermined threshold value, Since the group is synthesized by excluding the surface data from the synthesis target, the released small volume object is output by a 3D object shaping apparatus such as a 3D printer, and is clogged in the 3D object shaping apparatus. It is possible to reduce the occurrence of problems such as end.

本発明によれば、出力造形物の品質を劣化させることなく、ポリゴンで構成されたサーフェースデータから、効率的にポリゴンを削減して円滑に3Dプリンタで出力が可能になる立体物造形用データを得ることが可能となる。   According to the present invention, three-dimensional object modeling data that can be efficiently output by a 3D printer by efficiently reducing polygons from surface data composed of polygons without degrading the quality of the output modeled object. Can be obtained.

本発明の一実施形態に係る立体物造形用データ最適化装置のハードウェア構成図である。It is a hardware block diagram of the data optimization apparatus for solid object modeling which concerns on one Embodiment of this invention. 本発明の一実施形態に係る立体物造形用データ最適化装置の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the data optimization apparatus for solid object shaping which concerns on one Embodiment of this invention. DICOM形式ボクセルデータからサーフェースデータへの変換の様子を示す図である。It is a figure which shows the mode of the conversion from DICOM format voxel data to surface data. DICOM形式ボクセルデータを、複数のスライス画像として示した図である。It is the figure which showed the DICOM format voxel data as several slice images. DICOM形式ボクセルデータを、4つの形態で表示した例である。This is an example in which DICOM format voxel data is displayed in four forms. 図5に示したDICOM形式ボクセルデータを「3D-Slicer」により変換して得られたSTLデータを示す図である。FIG. 6 is a diagram showing STL data obtained by converting the DICOM format voxel data shown in FIG. 5 by “3D-Slicer”. 領域別サーフェースデータ(STLデータ)を示す図である。It is a figure which shows the surface data according to area | region (STL data). 領域別STLデータを合成したサーフェースデータ(STLデータ)のレンダリング像を示す図である。It is a figure which shows the rendering image of the surface data (STL data) which synthesize | combined STL data according to area | region. 本発明の一実施形態に係る立体物造形用データ最適化装置の処理概要を示すフローチャートである。It is a flowchart which shows the process outline | summary of the data optimization apparatus for solid object modeling which concerns on one Embodiment of this invention. グループ分類手段20によるグループ分類処理の詳細を示すフローチャートである。4 is a flowchart showing details of group classification processing by group classification means 20. ポリゴン削減の基本原理を示す図である。It is a figure which shows the basic principle of polygon reduction. ポリゴン削減処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a polygon reduction process. ポリゴン削減処理により生じる問題を説明するための図である。It is a figure for demonstrating the problem which arises by a polygon reduction process. 隔離された小体積グループの削除処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the deletion process of the isolated small volume group. 図14のステップS44における最小間隔の算出処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the calculation process of the minimum space | interval in FIG.14 S44. 図8に示したサーフェースデータ(STLデータ)の正面からのレンダリング像を示す図である。It is a figure which shows the rendering image from the front of the surface data (STL data) shown in FIG. 図16に示したレンダリング像の拡大図である。FIG. 17 is an enlarged view of the rendered image shown in FIG. 16. 図16に示したレンダリング像の拡大図である。FIG. 17 is an enlarged view of the rendered image shown in FIG. 16. 図16に示したレンダリング像の拡大図である。FIG. 17 is an enlarged view of the rendered image shown in FIG. 16. 図19に示したレンダリング像拡大図のワイヤーフレーム図である。It is a wire frame figure of the rendering image enlarged view shown in FIG. 図7に示した領域別サーフェースデータのうち、左眼球に対応する段階的削減事例を示す図である。It is a figure which shows the stepwise reduction example corresponding to a left eyeball among the surface data according to area | region shown in FIG. 図7に示した領域別サーフェースデータのうち、左眼球に対応する段階的削減事例を示す図である。It is a figure which shows the stepwise reduction example corresponding to a left eyeball among the surface data according to area | region shown in FIG. 図7に示した領域別サーフェースデータのうち、左眼球に対応する段階的削減事例を示す図である。It is a figure which shows the stepwise reduction example corresponding to a left eyeball among the surface data according to area | region shown in FIG. 図21に示したレンダリング像のワイヤーフレーム図である。FIG. 22 is a wire frame diagram of the rendered image shown in FIG. 21. 図22に示したレンダリング像のワイヤーフレーム図である。It is a wire frame figure of the rendering image shown in FIG. 図23に示したレンダリング像のワイヤーフレーム図である。FIG. 24 is a wire frame diagram of the rendered image shown in FIG. 23.

以下、本発明の好適な実施形態について図面を参照して詳細に説明する。
<1.装置構成>
図1は、本発明の一実施形態に係る立体物造形用データ最適化装置のハードウェア構成図である。本実施形態に係る立体物造形用データ最適化装置は、汎用のコンピュータで実現することができ、図1に示すように、CPU(Central Processing Unit)1と、コンピュータのメインメモリであるRAM(Random Access Memory)2と、CPU1が実行するプログラムやデータを記憶するためのハードディスク、フラッシュメモリ等の大容量の記憶装置3と、キーボード、マウス等のキー入力I/F(インターフェース)4と、3Dプリンタやデータ記憶媒体等の外部装置とデータ通信するためのデータ入出力I/F(インターフェース)5と、液晶ディスプレイ等の表示デバイスである表示部6と、を備え、互いにバスを介して接続されている。3Dプリンタ7は、汎用の3Dプリンタであり、立体物を表すデータをもとに樹脂、石膏等の素材を加工して立体物を造形する立体物造形装置である。3Dプリンタ7は、データ入出力I/F5に接続されており、データ入出力I/F5から受け取った最適化された出力用データをもとに、立体物を造形するようになっている。
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the drawings.
<1. Device configuration>
FIG. 1 is a hardware configuration diagram of a three-dimensional object modeling data optimizing device according to an embodiment of the present invention. The three-dimensional object modeling data optimizing device according to the present embodiment can be realized by a general-purpose computer. As shown in FIG. 1, a CPU (Central Processing Unit) 1 and a RAM (Random) which is a main memory of the computer. Access Memory) 2, a large-capacity storage device 3 such as a hard disk or flash memory for storing programs and data executed by the CPU 1, a key input I / F (interface) 4 such as a keyboard and a mouse, and a 3D printer And a data input / output I / F (interface) 5 for data communication with an external device such as a data storage medium and a display unit 6 which is a display device such as a liquid crystal display, and are connected to each other via a bus. Yes. The 3D printer 7 is a general-purpose 3D printer, and is a three-dimensional object forming apparatus that forms a three-dimensional object by processing a material such as resin or gypsum based on data representing the three-dimensional object. The 3D printer 7 is connected to a data input / output I / F 5 and forms a three-dimensional object based on optimized output data received from the data input / output I / F 5.

図2は、本実施形態に係る立体物造形用データ最適化装置の構成を示す機能ブロック図である。図2において、10は制御手段、20はグループ分類手段、30は削除対象ポリゴン選定手段、40は削除対象辺選定手段、50は削除頂点共有ポリゴン探索手段、60はサーフェースデータ更新手段、70はグループ合成手段、80はサーフェースデータ合成手段、90は領域別サーフェースデータ記憶手段、100は合成サーフェースデータ記憶手段である。   FIG. 2 is a functional block diagram showing the configuration of the three-dimensional object formation data optimizing device according to the present embodiment. In FIG. 2, 10 is a control means, 20 is a group classification means, 30 is a deletion target polygon selection means, 40 is a deletion target edge selection means, 50 is a deletion vertex shared polygon search means, 60 is a surface data update means, and 70 is Group combining means, 80 is surface data combining means, 90 is area-specific surface data storage means, and 100 is combined surface data storage means.

制御手段10は、立体物造形用データ最適化装置全体の制御を行う。グループ分類手段20は、削除対象ポリゴンの選定対象のサーフェースデータに対して、各グループに属するポリゴンがそのグループ内の他のいずれかのポリゴンと、ポリゴンを構成する辺(2頂点)を共有するようにグループ分類する。削除対象ポリゴン選定手段30は、サーフェースデータを構成する全てのポリゴンに対して、面積と周長を算出し、面積と周長の積が最小となるポリゴンを削除対象ポリゴンとして選定する。削除対象辺選定手段40は、削除対象ポリゴンの各辺の長さを算出し、最も短い辺を削除対象辺として選定する。削除頂点共有ポリゴン探索手段50は、サーフェースデータを構成する削除対象ポリゴン以外の全てのポリゴンから、削除対象辺の2頂点(辺の端点)のいずれか1頂点を共有する削除頂点共有ポリゴンを探索する。サーフェースデータ更新手段60は、削除対象辺の2頂点の双方を共有する削除頂点共有ポリゴンを、削除対象ポリゴンとともに削除し、削除対象辺のいずれか1頂点のみを共有する削除頂点共有ポリゴンに対して、共有する1頂点を削除対象辺の2頂点の中点の位置に補正する。   The control means 10 controls the entire three-dimensional object modeling data optimizing device. In the group classification means 20, the polygons belonging to each group share the sides (two vertices) constituting the polygon with any other polygon in the group for the surface data to be selected as the deletion target polygon. Group as follows. The deletion target polygon selection means 30 calculates an area and a circumference for all the polygons constituting the surface data, and selects a polygon having a minimum product of the area and the circumference as a deletion target polygon. The deletion target side selecting means 40 calculates the length of each side of the deletion target polygon and selects the shortest side as the deletion target side. The deleted vertex shared polygon search means 50 searches for a deleted vertex shared polygon that shares one of the two vertices (end points of the side) of the deletion target side from all the polygons other than the deletion target polygon constituting the surface data. To do. The surface data update unit 60 deletes the deleted vertex shared polygon that shares both of the two vertices of the deletion target side together with the deletion target polygon, and applies to the deleted vertex shared polygon that shares only one vertex of the deletion target side. Thus, one shared vertex is corrected to the midpoint position of the two vertices of the deletion target side.

グループ合成手段70は、分類された各グループに対する削除対象ポリゴン選定手段30、削除対象辺選定手段40、削除頂点共有ポリゴン探索手段50、サーフェースデータ更新手段60による一連の処理の実行により作成された複数のグループの更新されたサーフェースデータを、領域別に単一の領域別サーフェースデータに合成する。サーフェースデータ合成手段80は、複数セットの更新された領域別サーフェースデータを単一の合成サーフェースデータに合成する。制御手段10、グループ分類手段20、削除対象ポリゴン選定手段30、削除対象辺選定手段40、削除頂点共有ポリゴン探索手段50、サーフェースデータ更新手段60、グループ合成手段70、サーフェースデータ合成手段80は、CPU1が、記憶装置3に記憶されているプログラムを実行することにより実現される。領域別サーフェースデータ記憶手段90は、領域別サーフェースデータを記憶した記憶手段であり、記憶装置3により実現される。領域別サーフェースデータとは、1つの領域を1セットとして構成されたサーフェースデータである。合成サーフェースデータ記憶手段100は、複数セットの領域別サーフェースデータを合成した単一のサーフェースデータである合成サーフェースデータを記憶する記憶手段であり、記憶装置3により実現される。合成サーフェースデータ記憶手段100に記憶される合成サーフェースデータは、3Dプリンタ7への出力に最適化された立体物造形用データとなる。   The group synthesizing unit 70 is created by executing a series of processes by the deletion target polygon selecting unit 30, the deletion target side selecting unit 40, the deleted vertex shared polygon searching unit 50, and the surface data updating unit 60 for each classified group. The updated surface data of a plurality of groups is synthesized into a single area-specific surface data for each area. The surface data synthesizing unit 80 synthesizes a plurality of sets of updated area-specific surface data into a single synthesized surface data. The control means 10, group classification means 20, deletion target polygon selection means 30, deletion target edge selection means 40, deletion vertex shared polygon search means 50, surface data update means 60, group composition means 70, and surface data composition means 80 The CPU 1 is realized by executing a program stored in the storage device 3. The area-specific surface data storage unit 90 is a storage unit that stores area-specific surface data, and is realized by the storage device 3. The area-specific surface data is surface data configured with one area as one set. The combined surface data storage unit 100 is a storage unit that stores combined surface data that is a single surface data obtained by combining a plurality of sets of area-specific surface data, and is realized by the storage device 3. The composite surface data stored in the composite surface data storage unit 100 is solid object modeling data optimized for output to the 3D printer 7.

図2に示した各構成手段は、現実には図1に示したように、コンピュータおよびその周辺機器等のハードウェアに専用のプログラムを搭載することにより実現される。すなわち、コンピュータが、専用のプログラムに従って各手段の内容を実行することになる。なお、本明細書において、コンピュータとは、CPU等の演算処理部を有し、データ処理が可能な装置を意味する。   Each component shown in FIG. 2 is actually realized by installing a dedicated program in hardware such as a computer and its peripheral devices as shown in FIG. That is, the computer executes the contents of each means according to a dedicated program. Note that in this specification, a computer means a device that has an arithmetic processing unit such as a CPU and is capable of data processing.

図1に示した記憶装置3には、CPU1を動作させ、コンピュータを、立体物造形用データ最適化装置として機能させるための専用のプログラムが実装されている。この専用のプログラムを実行することにより、CPU1は、制御手段10、グループ分類手段20、削除対象ポリゴン選定手段30、削除対象辺選定手段40、削除頂点共有ポリゴン探索手段50、サーフェースデータ更新手段60、グループ合成手段70、サーフェースデータ合成手段80としての機能を実現することになる。また、記憶装置3は、領域別サーフェースデータ記憶手段90、合成サーフェースデータ記憶手段100として機能するだけでなく、立体物造形用データ最適化装置としての処理に必要な様々なデータを記憶する。   In the storage device 3 shown in FIG. 1, a dedicated program for operating the CPU 1 and causing the computer to function as a three-dimensional object modeling data optimizing device is mounted. By executing this dedicated program, the CPU 1 controls the control means 10, the group classification means 20, the deletion target polygon selection means 30, the deletion target edge selection means 40, the deletion vertex shared polygon search means 50, and the surface data update means 60. The functions as the group synthesizing unit 70 and the surface data synthesizing unit 80 are realized. The storage device 3 not only functions as the area-specific surface data storage unit 90 and the composite surface data storage unit 100, but also stores various data necessary for processing as the three-dimensional object modeling data optimization device. .

<2.処理動作>
<2.1.前処理>
次に、図1、図2に示した立体物造形用データ最適化装置の処理動作について説明する。まず、医療用ボクセルデータから領域別サーフェースデータを作成する前処理について説明する。サーフェースデータとは、サーフェースモデリングにより立体構造を表面形状として表現したデータであり、多角形のデータであるポリゴンにより構成される。前処理は、コンピュータが公知のプログラムを実行することにより行われる。ここでは、公知のプログラムとして、米国ハーバード大学が中心に開発したオープンソースソフトウェアである「3D-Slicer」を用いた場合を例にとって説明する。まず、コンピュータが、全体ボクセルデータから、特定臓器領域のボクセルデータを抽出する。次に、コンピュータが、特定臓器領域のボクセルデータをサーフェースデータに変換する。このようにして得られた領域別サーフェースデータは、領域別サーフェースデータ記憶手段90に格納される。前処理は、図1に示した立体物造形用データ最適化装置を実現するコンピュータに、上記プログラムを実行させることにより行ってもよいし、図1に示した立体物造形用データ最適化装置を実現するコンピュータとは別のコンピュータにより実行し、得られた領域別サーフェースデータを記憶装置3により実現される領域別サーフェースデータ記憶手段90に格納するようにしてもよい。
<2. Processing action>
<2.1. Pretreatment>
Next, the processing operation of the three-dimensional object modeling data optimizing apparatus shown in FIGS. 1 and 2 will be described. First, pre-processing for creating region-specific surface data from medical voxel data will be described. The surface data is data representing a three-dimensional structure as a surface shape by surface modeling, and is composed of polygons that are polygon data. Preprocessing is performed by a computer executing a known program. Here, a case where “3D-Slicer” which is open source software developed mainly by Harvard University in the United States is used as a known program will be described as an example. First, the computer extracts voxel data of a specific organ region from the whole voxel data. Next, the computer converts the voxel data of the specific organ region into surface data. The area-specific surface data obtained in this manner is stored in the area-specific surface data storage means 90. The pre-processing may be performed by causing the computer that realizes the three-dimensional object modeling data optimizing device shown in FIG. 1 to execute the program, or the three-dimensional object modeling data optimizing device shown in FIG. It may be executed by a computer different from the computer to be realized, and the obtained area-specific surface data may be stored in the area-specific surface data storage means 90 realized by the storage device 3.

本実施形態では、医療用ボクセルデータとして医用画像データ交換に関する国際標準規格であるDICOM形式のボクセルデータを用いる。また、サーフェースデータとしてSTL(Standard Triangulated Language)データを用いる。STLデータとは、元来3Dグラフィックス分野におけるモデリングデータ交換に関する業界標準で、最近では3Dプリンターでも標準的に使用されるようになったもので、三次元形状を三角形ポリゴンの集合体で表現したデータである。そして、コンピュータが上記「3D-Slicer」を実行することにより、図3(a)に示すようなDICOM形式ボクセルデータから、図3(b)に示すような領域別のボクセルデータを抽出し、サーフェースモデル変換を行って図3(c)に示すようなサーフェースデータ(STLデータ)が得られる。領域別のボクセルデータの抽出、サーフェースモデル変換には、特許文献3等に記載されたMarching Cube法が用いられている。   In the present embodiment, voxel data in DICOM format, which is an international standard for medical image data exchange, is used as medical voxel data. Also, STL (Standard Triangulated Language) data is used as the surface data. STL data was originally an industry standard for modeling data exchange in the field of 3D graphics, and recently it has come to be used as a standard in 3D printers. Three-dimensional shapes are represented by a collection of triangular polygons. It is data. Then, when the computer executes “3D-Slicer”, the voxel data for each area as shown in FIG. 3B is extracted from the DICOM format voxel data as shown in FIG. By performing face model conversion, surface data (STL data) as shown in FIG. 3C is obtained. The Marching Cube method described in Patent Document 3 or the like is used for extraction of voxel data for each region and surface model conversion.

図4〜図8に、「3D-Slicer」による処理画面の一例を示す。図4は、「3D-Slicer」の処理対象となるDICOM形式ボクセルデータを、複数のスライス画像として示した図である。図4の例では、人体頭部のサジタル像を256個のスライス画像で示している。各スライス画像は、512×512画素で構成されている。   4 to 8 show examples of processing screens by “3D-Slicer”. FIG. 4 is a diagram illustrating the DICOM format voxel data to be processed by “3D-Slicer” as a plurality of slice images. In the example of FIG. 4, the sagittal image of the human head is shown by 256 slice images. Each slice image is composed of 512 × 512 pixels.

図5は、DICOM形式ボクセルデータを、4つの形態で表示した例である。図5において、上部に表示されているのは、ボリュームレンダリング像である。下部に表示されているのは、左側から順にアキシャル像、サジタル像、コロナル像である。   FIG. 5 is an example in which DICOM format voxel data is displayed in four forms. In FIG. 5, a volume rendering image is displayed at the top. The axial image, the sagittal image, and the coronal image are displayed in order from the left side.

図6は、図5に示したDICOM形式ボクセルデータを「3D-Slicer」により変換して得られたSTLデータを示す図である。図6において、上部に表示されているのは、STLデータのレンダリング像である。図6の例では、眼球・脳領域しきい値:626.75以上(MRI撮影でボクセル値10bits幅の場合)、眼球結合組織Lしきい値:298.36-458.74、眼球結合組織Rしきい値:298.36-431.32を設定することにより、領域(組織)別に分類された領域別STLデータをレンダリングしたものを示している。   FIG. 6 is a diagram showing STL data obtained by converting the DICOM format voxel data shown in FIG. 5 by “3D-Slicer”. In FIG. 6, what is displayed at the top is a rendering image of STL data. In the example of FIG. 6, the eyeball / brain region threshold value: 626.75 or more (when the voxel value is 10 bits width in MRI imaging), the eyeball connective tissue L threshold value: 298.36-458.74, the eyeball connective tissue R threshold value: 298.36- By setting 431.32, the STL data classified by region classified by region (tissue) is rendered.

図7は、「3D-Slicer」により得られた領域別STLデータをシェーディングにより陰影表現した図である。図8は、領域別STLデータを合成したサーフェースデータ(STLデータ)のレンダリング像を示す図である。図8に示すFront Viewは、図6の上部に示したものと同一である。前処理の後は、図7に示したような領域別サーフェースデータが領域別サーフェースデータ記憶手段90に記憶される。   FIG. 7 is a diagram in which the STL data for each region obtained by “3D-Slicer” is represented by shading by shading. FIG. 8 is a diagram showing a rendering image of the surface data (STL data) obtained by combining the STL data for each region. The Front View shown in FIG. 8 is the same as that shown in the upper part of FIG. After the preprocessing, the area-specific surface data as shown in FIG. 7 is stored in the area-specific surface data storage means 90.

<2.2.処理概要>
次に、図1、図2に示した立体物造形用データ最適化装置の処理動作について説明する。図9は、本発明の一実施形態に係る立体物造形用データ最適化装置の処理概要を示すフローチャートである。まず、グループ分類手段20が、領域別サーフェースデータ記憶手段90から、1つの領域についての領域別サーフェースデータを読み込み、複数のグループに分類する(ステップS10)。次に、各グループのサーフェースデータに対して、削除対象ポリゴン選定手段30、削除対象辺選定手段40、削除頂点共有ポリゴン探索手段50、サーフェースデータ更新手段60が、ポリゴン削減処理を実行する(ステップS20)。制御手段10が、全グループについてポリゴン削減処理が終了したか否かを判定し(ステップS30)、全グループについて終了していない場合は、未処理のグループに対してステップS20のポリゴン削減処理を実行する。全グループに対するポリゴン削減処理が終了した場合は、グループ合成手段70が、隔離された小体積グループの削除を行う(ステップS40)。続いて、グループ合成手段70は、全グループのサーフェースデータの合成を行う(ステップS50)。制御手段10が、全領域について処理が終了したか否かを判定し(ステップS60)、全領域について終了していない場合は、未処理の領域に対してステップS10〜S50の処理を実行する。全領域に対する処理が終了した場合は、サーフェースデータ合成手段80が、全領域の領域別サーフェースデータの合成を行う(ステップS70)。
<2.2. Process Overview>
Next, the processing operation of the three-dimensional object modeling data optimizing apparatus shown in FIGS. 1 and 2 will be described. FIG. 9 is a flowchart showing a processing outline of the three-dimensional object modeling data optimizing device according to the embodiment of the present invention. First, the group classification means 20 reads the area-specific surface data for one area from the area-specific surface data storage means 90, and classifies it into a plurality of groups (step S10). Next, the deletion target polygon selection means 30, the deletion target edge selection means 40, the deletion vertex shared polygon search means 50, and the surface data update means 60 execute polygon reduction processing on the surface data of each group ( Step S20). The control means 10 determines whether or not the polygon reduction process has been completed for all groups (step S30). If the polygon reduction process has not been completed for all groups, the polygon reduction process of step S20 is executed for the unprocessed group. To do. When the polygon reduction processing for all the groups is completed, the group composition unit 70 deletes the isolated small volume group (step S40). Subsequently, the group combining means 70 combines the surface data of all groups (step S50). The control means 10 determines whether or not the processing has been completed for all the areas (step S60). If the processing has not been completed for all the areas, the processing of steps S10 to S50 is executed for the unprocessed areas. When the processing for all areas is completed, the surface data synthesizing unit 80 synthesizes area-specific surface data for all areas (step S70).

<2.3.グループ分類処理>
まず、ステップS10におけるグループ分類手段20によるグループ分類処理について説明する。図10は、グループ分類手段20によるグループ分類処理の詳細を示すフローチャートである。グループ分類手段20は、まず、初期設定を行う(ステップS11)。具体的には、読み込んだ領域別サーフェースデータを構成するポリゴン数P、ポリゴンを特定する変数p(p=0,・・・,P−1)、探索ステータスS(p)、グループ属性G(p)、グループを特定する変数gを設定する。探索ステータスS(p)は、0、1、2のいずれかの値をとる。S(p)=0はグループに未分類の状態、S(p)=1はグループに分類された状態、S(p)=2は、そのポリゴンに隣接するポリゴンである隣接ポリゴンがグループに分類された状態を示す。さらに、ステップS11においては、p=0,・・・,P−1の全てのpについてS(p)=G(p)=0、g=1と初期設定する。
<2.3. Group classification processing>
First, the group classification process by the group classification means 20 in step S10 will be described. FIG. 10 is a flowchart showing details of group classification processing by the group classification means 20. The group classification means 20 first performs an initial setting (step S11). Specifically, the number of polygons P constituting the read area-specific surface data, variables p (p = 0,..., P−1) for specifying polygons, search status S (p), group attribute G ( p) A variable g for specifying the group is set. The search status S (p) takes one of 0, 1, and 2. S (p) = 0 is a state not classified into a group, S (p) = 1 is a state classified into a group, and S (p) = 2 is a polygon adjacent to the polygon is classified into a group. Indicates the state that has been performed. Further, in step S11, S (p) = G (p) = 0 and g = 1 are initially set for all p of p = 0,..., P-1.

次に、全ポリゴンより、S(p)=G(p)=0となるポリゴンpを1つ抽出する(ステップS12)。初期状態では、全てS(p)=G(p)=0であるので、初回は必ず抽出が行われる。S(p)=G(p)=0となるポリゴンpが複数存在する場合は、例えばpの値が最も小さいものを抽出する。ステップS12において、S(p)=G(p)=0となるポリゴンpが存在しない場合、すなわち、全てのp=0,・・・,P−1について、S(p)=2である場合、g−1個のグループに分離できたものとしてグループ分類処理を終了する。なお、ステップS12において、S(p)=1である状態は存在しないため、S(p)は“0”か“2”のいずれかの状態である。S(p)=G(p)=0となるポリゴンpが抽出できた場合は、抽出したポリゴンpに対応する探索ステータスS(p)=1、グループ属性G(p)=gに設定する。   Next, one polygon p satisfying S (p) = G (p) = 0 is extracted from all the polygons (step S12). In the initial state, all S (p) = G (p) = 0, so that the extraction is always performed at the first time. When there are a plurality of polygons p with S (p) = G (p) = 0, for example, the one having the smallest value of p is extracted. In step S12, when there is no polygon p satisfying S (p) = G (p) = 0, that is, when S (p) = 2 for all p = 0,..., P−1. , The group classification process is terminated assuming that it has been separated into g−1 groups. In step S12, since there is no state where S (p) = 1, S (p) is either “0” or “2”. When a polygon p satisfying S (p) = G (p) = 0 can be extracted, the search status S (p) = 1 corresponding to the extracted polygon p is set to G (p) = g.

ステップS12において、S(p)=G(p)=0となるポリゴンpを1つ抽出し、抽出したポリゴンpに対応する探索ステータスS(p)=1、グループ属性G(p)=gに設定した場合は、全ポリゴンより、S(q)=1となるポリゴンqを1つ抽出する(ステップS13)。qはポリゴンを特定する変数であり、ポリゴンpと同様、q=0,・・・,P−1内のいずれかの整数値をとる。S(q)=1となるポリゴンqが複数存在する場合は、例えばqの値が最も小さいものを抽出する。ステップS13において、S(q)=1となるポリゴンqが存在しない場合、すなわち、全てのS(q)=0または2である場合、グループを特定する変数gを1インクリメント(g←g+1)する(ステップS14)。そしてステップS12に戻り、次のグループへの分類を行う。   In step S12, one polygon p satisfying S (p) = G (p) = 0 is extracted, the search status S (p) = 1 corresponding to the extracted polygon p, and the group attribute G (p) = g are set. If set, one polygon q with S (q) = 1 is extracted from all polygons (step S13). q is a variable for specifying a polygon, and takes an integer value in q = 0,... When there are a plurality of polygons q with S (q) = 1, for example, the one having the smallest q value is extracted. In step S13, when there is no polygon q satisfying S (q) = 1, that is, when all S (q) = 0 or 2, the variable g for specifying the group is incremented by 1 (g ← g + 1). (Step S14). And it returns to step S12 and classify | categorizes into the following group.

ステップS13において、S(q)=1となるポリゴンqを1つ抽出した場合、全ポリゴンより、S(r)=G(r)=0であって、抽出されたポリゴンqと2頂点を共有する隣接ポリゴンrを全て抽出する(ステップS15)。rはポリゴンを特定する変数であり、ポリゴンp、qと同様、r=0,・・・,P−1内のいずれかの整数値をとる。“ポリゴンqと2頂点を共有する”とは、ポリゴンqと一つの辺を共有することを意味する。すなわち、隣接ポリゴンrは一つの辺を共有することによりポリゴンqと隣接するポリゴンである。抽出された隣接ポリゴンについては、それぞれ探索ステータスS(r)=1、グループ属性G(r)=gに設定する。   In step S13, when one polygon q satisfying S (q) = 1 is extracted, S (r) = G (r) = 0 from all the polygons, and two vertices are shared with the extracted polygon q. All adjacent polygons r are extracted (step S15). r is a variable for specifying a polygon, and takes an integer value in r = 0,..., P−1, similarly to polygons p and q. “Share two vertices with polygon q” means that one side is shared with polygon q. That is, the adjacent polygon r is a polygon adjacent to the polygon q by sharing one side. The extracted adjacent polygons are set to search status S (r) = 1 and group attribute G (r) = g, respectively.

次に、ポリゴンqの探索ステータスS(q)=2に設定する(ステップS16)。すなわち、ポリゴンqについては、隣接ポリゴンを設定した後の状態とする。そして、ステップS13に戻って、全ポリゴンの中から、S(q)=1となるポリゴンqを1つ抽出する。   Next, the search status S (q) = 2 of the polygon q is set (step S16). That is, the polygon q is in a state after the adjacent polygon is set. Then, returning to step S13, one polygon q satisfying S (q) = 1 is extracted from all the polygons.

図10に示したフローチャートでは、ステップS12、S13、S14で構成されるループと、ステップS13、S15、S16で構成されるループの2つのループ処理が存在する。ステップS12、S13、S14で構成されるループでは、グループに未分類のポリゴンを抽出してグループに分類し(ステップS12)、グループに分類済みのポリゴンの中から1つを隣接ポリゴン探索用のポリゴンとして抽出できない場合(ステップS13)は、そのグループに分類すべきポリゴンは、存在しないものとして、次のグループに移行(g←g+1)する(ステップS14)。ステップS12、S13、S14で構成されるループでは、連続する一塊のポリゴン群を一つのグループとして分類する。したがって、ステップS13において、S(q)=1となるポリゴンが存在しない場合には、グループに分類済みのいずれかのポリゴンに隣接するポリゴンが存在しないことになるので、グループgへの分類を終え、グループg+1への分類に移行するのである。   In the flowchart shown in FIG. 10, there are two loop processes: a loop constituted by steps S12, S13, and S14 and a loop constituted by steps S13, S15, and S16. In the loop composed of steps S12, S13, and S14, polygons that are not classified into groups are extracted and classified into groups (step S12), and one of the polygons that have been classified into groups is searched for adjacent polygons. If it cannot be extracted as (step S13), it is assumed that there is no polygon to be classified into the group, and the process proceeds to the next group (g ← g + 1) (step S14). In the loop composed of steps S12, S13, and S14, a group of continuous polygons is classified as one group. Therefore, in step S13, if there is no polygon with S (q) = 1, there is no polygon adjacent to any polygon already classified in the group, so the classification into group g is finished. , The process proceeds to the group g + 1 classification.

ステップS13、S15、S16で構成されるループでは、グループに分類済みのポリゴンの中から1つを隣接ポリゴン探索用のポリゴンqとして抽出し(ステップS13)、全ポリゴンの中からポリゴンqと2頂点を共有するポリゴンを隣接ポリゴンrとして抽出し(ステップS15)、抽出できた場合も抽出できない場合も、探索用のポリゴンqの探索ステータスS(q)を、ポリゴンqに隣接するポリゴンの探索を終えた状態であるS(q)=2に設定する。   In the loop composed of steps S13, S15, and S16, one of the polygons classified into groups is extracted as a polygon q for searching for adjacent polygons (step S13), and polygon q and two vertices are extracted from all the polygons. Is extracted as the adjacent polygon r (step S15), and the search status S (q) of the search polygon q is set to the search of the polygon adjacent to the polygon q, whether or not it can be extracted. S (q) = 2, which is the state of

ステップS12、S13、S14で構成されるループと、ステップS13、S15、S16で構成されるループの2つのループ処理を用いることにより、全P個のポリゴンが、2頂点を共有して連続するポリゴン群ごとにグループに分類される。1頂点しか共有しないポリゴンのみで隣接している場合は、別のグループとして分類されることになる。図10に従った処理を実行することにより領域別サーフェースデータを構成するポリゴンは複数のグループに分類されることになる。   By using two loop processes, a loop composed of steps S12, S13, and S14, and a loop composed of steps S13, S15, and S16, all P polygons are continuous polygons sharing two vertices. Each group is classified into groups. When only polygons that share only one vertex are adjacent to each other, they are classified as another group. By executing the processing according to FIG. 10, the polygons constituting the area-specific surface data are classified into a plurality of groups.

<2.4.ポリゴン削減処理>
次に、ステップS20における削除対象ポリゴン選定手段30、削除対象辺選定手段40、削除頂点共有ポリゴン探索手段50、サーフェースデータ更新手段60によるポリゴン削減処理について説明する。図11は、ポリゴン削減の基本原理を示す図である。サーフェースデータは、現実には、空間における三次元の値をもつポリゴン群であるが、図11の例では、説明の便宜上、二次元の値をもつポリゴン群を示している。図11(a)の例では、削減前、18個のポリゴンからなるポリゴン群を示している。
<2.4. Polygon reduction processing>
Next, the polygon reduction processing by the deletion target polygon selection unit 30, the deletion target side selection unit 40, the deletion vertex shared polygon search unit 50, and the surface data update unit 60 in step S20 will be described. FIG. 11 is a diagram showing the basic principle of polygon reduction. The surface data is actually a polygon group having a three-dimensional value in space, but the example of FIG. 11 shows a polygon group having a two-dimensional value for convenience of explanation. In the example of FIG. 11A, a polygon group consisting of 18 polygons before reduction is shown.

図12は、削除対象ポリゴン選定手段30、削除対象辺選定手段40、削除頂点共有ポリゴン探索手段50、サーフェースデータ更新手段60によるポリゴン削減処理の詳細を示すフローチャートである。まず、削除対象ポリゴン選定手段30が、サーフェースデータを構成する全ポリゴンを対象として、各ポリゴンの面積および周長を算出する(ステップS21)。次に、削除対象ポリゴン選定手段30は、算出された面積と周長を乗じた値が最小となるポリゴンを削除対象ポリゴンとして選定する(ステップS22)。図11の例では、図11(b)に示すように、3個の頂点E、J、Kで構成されるポリゴンEJKが削除対象ポリゴンとして選定される。   FIG. 12 is a flowchart showing details of polygon reduction processing by the deletion target polygon selection unit 30, the deletion target side selection unit 40, the deletion vertex shared polygon search unit 50, and the surface data update unit 60. First, the deletion target polygon selection means 30 calculates the area and perimeter of each polygon for all the polygons constituting the surface data (step S21). Next, the deletion target polygon selection means 30 selects the polygon having the smallest value obtained by multiplying the calculated area and the circumference as the deletion target polygon (step S22). In the example of FIG. 11, as shown in FIG. 11B, a polygon EJK composed of three vertices E, J, and K is selected as a deletion target polygon.

続いて、削除対象辺選定手段40が削除対象ポリゴンの3辺のうち最短の1辺を削除対象辺として選定し、選定した削除対象辺の中点を算出する(ステップS23)。図11の例では、図11(c)に示すように、削除対象ポリゴンEJKの辺JKが削除対象辺として選定される。さらに、辺JKの中点Oが算出される。   Subsequently, the deletion target side selecting means 40 selects the shortest one of the three sides of the deletion target polygon as the deletion target side, and calculates the midpoint of the selected deletion target side (step S23). In the example of FIG. 11, as shown in FIG. 11C, the side JK of the deletion target polygon EJK is selected as the deletion target side. Further, the midpoint O of the side JK is calculated.

次に、サーフェースデータ更新手段60が、削除対象ポリゴンを削除する(ステップS24)。これによりポリゴン数が1つ削減されることになる。次に、削除頂点共有ポリゴン探索手段50が、削除対象ポリゴンの削除対象辺と頂点を共有していた削除頂点共有ポリゴンを順次選定する(ステップS25)。削除対象ポリゴンの削除対象辺と2頂点を共有(すなわち辺を共有)している削除頂点共有ポリゴンが選定された場合には、サーフェースデータ更新手段60が、その削除頂点共有ポリゴンを削除する(ステップS26)。図11の例では、3個の頂点J、K、Nで構成されるポリゴンJKNが削除される。これによりさらにポリゴン数が1つ削減されることになる。削除対象ポリゴンの削除対象辺と1頂点を共有している削除頂点共有ポリゴンが選定された場合には、サーフェースデータ更新手段60が、共有頂点をステップS23で算出された中点に補正し、面積および周長を再算出する(ステップS27)。図11の例では、図11(c)と図11(d)を比較するとわかるように、ポリゴンEHJ→ポリゴンEHO、ポリゴンEFK→ポリゴンEFO、ポリゴンHJM→ポリゴンHOM、ポリゴンJMN→ポリゴンOMN、ポリゴンFKN→ポリゴンFONに変更される。この結果、図11の例では、図11(a)の時点では、18個あったポリゴンが、図11(d)の時点では、16個に削減される。   Next, the surface data update unit 60 deletes the deletion target polygon (step S24). As a result, the number of polygons is reduced by one. Next, the deleted vertex shared polygon search means 50 sequentially selects the deleted vertex shared polygon that shared the vertex with the deletion target side of the deletion target polygon (step S25). When a deleted vertex shared polygon that shares two vertices with the deletion target side of the polygon to be deleted (that is, the side is shared) is selected, the surface data update unit 60 deletes the deleted vertex shared polygon ( Step S26). In the example of FIG. 11, the polygon JKN composed of three vertices J, K, and N is deleted. This further reduces the number of polygons by one. When a deleted vertex shared polygon that shares one vertex with the deletion target side of the deletion target polygon is selected, the surface data update unit 60 corrects the shared vertex to the midpoint calculated in step S23, The area and circumference are recalculated (step S27). In the example of FIG. 11, as can be seen by comparing FIG. 11C and FIG. 11D, the polygon EHJ → polygon EHO, the polygon EFK → polygon EFO, the polygon HJM → polygon HOM, the polygon JMN → polygon OMN, and the polygon FKN. → Changed to polygon FON. As a result, in the example of FIG. 11, the 18 polygons at the time of FIG. 11A are reduced to 16 at the time of FIG. 11D.

ステップS25〜ステップS27の処理を終えたら、制御手段10が、削減後の全ポリゴン数が、設定された目標値以下となっているか否かを判定する(ステップS28)。目標値としては、事前に任意の値を設定することができる。判定の結果、全ポリゴン数が目標値以下となっていない場合は、ステップS22に戻って、削除対象ポリゴン選定手段30が、残っているポリゴンの中から、面積と周長を乗じた値が最小となるポリゴンを削除対象ポリゴンとして選定する。ステップS28における判定の結果、全ポリゴン数が目標値以下である場合は、ポリゴン削減処理を終了する。図12のフローチャートに従った処理を実行することにより、各グループについて設定された目標値以下になるように、ポリゴン数が削減されることになる。   When the processing of step S25 to step S27 is completed, the control means 10 determines whether or not the total number of polygons after the reduction is equal to or less than the set target value (step S28). As the target value, an arbitrary value can be set in advance. As a result of the determination, if the total number of polygons is not less than or equal to the target value, the process returns to step S22, and the deletion target polygon selecting means 30 has the smallest value obtained by multiplying the remaining polygons by the area and the circumference. Is selected as a polygon to be deleted. If the result of determination in step S28 is that the total number of polygons is less than or equal to the target value, the polygon reduction process is terminated. By executing the processing according to the flowchart of FIG. 12, the number of polygons is reduced so as to be equal to or less than the target value set for each group.

<2.5.小体積グループ削除処理>
次に、ステップS40におけるグループ合成手段70による隔離された小体積グループの削除処理について説明する。ここで、隔離された小体積グループの削除処理の説明に先立ち、隔離された小体積グループの削除処理を行う理由について説明しておく。図13は、ポリゴン削減処理により生じる問題を説明するための図である。図13(a)は、ステップS10のグループ分類処理を終えた直後の2グループのポリゴン群を示している。図13(a)の例では、頂点D、E、Kを含む左側のグループと、頂点D’、E’、K’を含む右側のグループが存在する。頂点DとD’、頂点EとE’、頂点KとK’がそれぞれ3Dプリンタの解像度以下である場合、この2グループのポリゴン群を3Dプリンタで出力すると、頂点DとD’、頂点EとE’、頂点KとK’は樹脂等により連結され、2グループは連結した物体として出力される。すなわち、2グループは物理的には接着されている。
<2.5. Small volume group deletion processing>
Next, the process of deleting the isolated small volume group by the group combining means 70 in step S40 will be described. Here, prior to the description of the processing for deleting the isolated small volume group, the reason for performing the processing for deleting the isolated small volume group will be described. FIG. 13 is a diagram for explaining a problem caused by the polygon reduction process. FIG. 13A shows two groups of polygon groups immediately after the group classification processing in step S10 is completed. In the example of FIG. 13A, there are a left group including vertices D, E, and K and a right group including vertices D ′, E ′, and K ′. If the vertices D and D ′, the vertices E and E ′, and the vertices K and K ′ are less than the resolution of the 3D printer, respectively, when these two groups of polygons are output by the 3D printer, the vertices D and D ′, E ′, vertices K and K ′ are connected by resin or the like, and the two groups are output as connected objects. That is, the two groups are physically bonded.

図13(a)に示した右側のグループのポリゴン群に対して、ステップS20における三角形ポリゴン削減処理を実行すると、図13(b)に示すように、ポリゴンE’FK’が削除対象ポリゴンとして選定される。さらに、図13(c)に示すように、削除対象ポリゴンE’FK’の最短辺E’Fが削除対象辺として選定され、辺E’Fの中点Oが算出される。そして、図13(d)に示すように、削除対象ポリゴンE’FK’と、削除頂点共有ポリゴンD’E’Fが削除される。   When the triangle polygon reduction process in step S20 is executed on the right side group of polygons shown in FIG. 13A, the polygon E'FK 'is selected as the deletion target polygon as shown in FIG. 13B. Is done. Further, as shown in FIG. 13C, the shortest side E′F of the deletion target polygon E′FK ′ is selected as the deletion target side, and the midpoint O of the side E′F is calculated. Then, as shown in FIG. 13 (d), the deletion target polygon E'FK 'and the deletion vertex shared polygon D'E'F are deleted.

図13(a)と図13(d)を比較するとわかるように、左右の2つのグループは、ポリゴン削減処理前に比べて、ポリゴン削減処理後には、より離れてしまっている。図13(d)に示した2グループの距離が、3Dプリンタの解像度を超えると、2グループのポリゴン群を3Dプリンタで出力した場合、2グループは別の物体として出力される。2つのグループがともに大きな物体となれば、問題はない。しかし、一つが非常に小さな物体となる場合、例えば、一方のグループが本体であって、他方のグループが本体に付属するヒゲのようなものである場合、本体と別に出力されたヒゲは、3Dプリンタ内に紛れ込み、機械詰まり等の問題を引き起こす恐れがある。このような問題を除去するため、上述のヒゲのような隔離された小体積グループの削除処理を行うのである。   As can be seen by comparing FIG. 13A and FIG. 13D, the two groups on the left and right sides are further separated after the polygon reduction processing than before the polygon reduction processing. When the distance between the two groups shown in FIG. 13D exceeds the resolution of the 3D printer, when the two groups of polygons are output by the 3D printer, the two groups are output as different objects. If the two groups are both large objects, there is no problem. However, when one becomes a very small object, for example, when one group is a main body and the other group is like a beard attached to the main body, the whiskers output separately from the main body are 3D. There is a risk that it may get into the printer and cause problems such as machine clogging. In order to eliminate such a problem, an isolated small volume group such as the above-mentioned beard is deleted.

図14は、グループ合成手段70による隔離された小体積グループの削除処理の詳細を示すフローチャートである。グループ合成手段70は、まず、グループごとに全ポリゴンの全頂点を対象として、X、Y、Zぞれぞれの方向の最大値および最小値を算出する(ステップS41)。この結果、グループgに対して、最小値Xmin(g)、最大値Xmax(g)、最小値Ymin(g)、最大値Ymax(g)、最小値Zmin(g)、最大値Zmax(g)が得られる。次に、グループ合成手段70は、グループごとに外接直方体の体積を算出する(ステップS42)。具体的には、以下の〔数式1〕に従った処理を実行することにより、グループgの外接直方体の体積V(g)を算出する。   FIG. 14 is a flowchart showing details of the processing for deleting the isolated small volume group by the group combining means 70. First, the group composition means 70 calculates the maximum value and the minimum value in the X, Y, and Z directions for all vertices of all polygons for each group (step S41). As a result, for group g, minimum value Xmin (g), maximum value Xmax (g), minimum value Ymin (g), maximum value Ymax (g), minimum value Zmin (g), maximum value Zmax (g) Is obtained. Next, the group composition means 70 calculates the volume of the circumscribed cuboid for each group (step S42). Specifically, the volume V (g) of the circumscribed cuboid of the group g is calculated by executing the processing according to the following [Formula 1].

〔数式1〕
V(g)=(Xmax(g)−Xmin(g))×(Ymax(g)−Ymin(g))×(Zmax(g)−Zmin(g))
[Formula 1]
V (g) = (Xmax (g) −Xmin (g)) × (Ymax (g) −Ymin (g)) × (Zmax (g) −Zmin (g))

グループ合成手段70は、全グループに対してステップS41、S42の処理を実行する。これにより、全グループについて、外接直方体の体積が得られる。次に、グループ合成手段70は、全グループの中で外接直方体の体積が最小となるグループを特定する(ステップS43)。そして、グループ合成手段70は、特定したグループと他の全てのグループとの最小間隔を算出する(ステップS44)。ステップS44における最小間隔の算出処理の詳細については後述する。   The group synthesizing unit 70 executes the processes of steps S41 and S42 for all groups. Thereby, the volume of a circumscribed rectangular parallelepiped is obtained for all groups. Next, the group synthesizing unit 70 specifies a group in which the volume of the circumscribed rectangular parallelepiped is the smallest among all the groups (Step S43). Then, the group synthesizing unit 70 calculates the minimum interval between the identified group and all other groups (step S44). Details of the minimum interval calculation process in step S44 will be described later.

続いて、グループ合成手段70は、ステップS44において算出された最小間隔が所定のしきい値以上か否かを判定する(ステップS45)。最小間隔と比較するための所定のしきい値としては、3Dプリンタ出力時に0.2mmに相当する数値とすることが好ましい。判定の結果、最小間隔が所定のしきい値以上である場合は、体積最小のグループが、最も近いグループとも所定の距離以上離れていることになるので、グループ合成手段70は、体積最小のグループを削除する処理を行う(ステップS46)。ステップS45における判定の結果、最小間隔が所定のしきい値未満である場合は、体積最小のグループが、最も近いグループと3Dプリンタの解像度以下に近接していることになるので、グループ合成手段70は、体積最小のグループを削除する処理を行わない。   Subsequently, the group composition means 70 determines whether or not the minimum interval calculated in step S44 is equal to or greater than a predetermined threshold value (step S45). The predetermined threshold for comparison with the minimum interval is preferably a numerical value corresponding to 0.2 mm at the time of 3D printer output. As a result of the determination, if the minimum interval is equal to or greater than a predetermined threshold, the group with the smallest volume is separated from the nearest group by a predetermined distance or more. Is deleted (step S46). If the result of determination in step S45 is that the minimum interval is less than the predetermined threshold, the group with the smallest volume is close to the closest group and below the resolution of the 3D printer. Does not perform the process of deleting the smallest volume group.

ステップS46におけるグループの削除を行った場合、削除を行わなかった場合のいずれにおいても、そのグループについては処理済みとする。そして、ステップS43に戻って、未処理のグループの中で外接直方体の体積が最小となるグループを特定する。ステップS43〜ステップS46の処理を繰り返し、全てのグループに対する処理を終えたら、隔離された小体積グループの削除処理を終了する。   When the group is deleted in step S46, the group is processed in any case where the deletion is not performed. And it returns to step S43 and specifies the group from which the volume of a circumscribed rectangular parallelepiped becomes the smallest among unprocessed groups. When the processing of step S43 to step S46 is repeated and the processing for all the groups is completed, the processing for deleting the isolated small volume group is ended.

ステップS44における最小間隔の算出処理の詳細について説明する。図15は、図14のステップS44における最小間隔の算出処理の詳細を示すフローチャートである。グループ合成手段70は、初期値として、最小間隔を示す変数dminに所定以上の値を設定する。dminに与える初期値としては、グループ間の最小間隔としてあり得ない大きな値を設定しておけばよい。そして、グループ合成手段70は、全グループの中から、グループgより体積が大きい1つのグループhを抽出する(ステップS47)。この結果、グループhについて、最小値Xmin(h)、最大値Xmax(h)、最小値Ymin(h)、最大値Ymax(h)、最小値Zmin(h)、最大値Zmax(h)が得られる。次に、グループ合成手段70は、X、Y、Zの各方向別に2グループ間の差分の最小値を算出する(ステップS48)。具体的には、以下の〔数式2〕に従った処理を実行することにより、X方向の差分の最小値dx、Y方向の差分の最小値dy、Z方向の差分の最小値dzを算出する。   Details of the minimum interval calculation processing in step S44 will be described. FIG. 15 is a flowchart showing details of the minimum interval calculation processing in step S44 of FIG. The group synthesizing unit 70 sets a predetermined value or more as a variable dmin indicating the minimum interval as an initial value. As an initial value given to dmin, a large value that cannot be set as a minimum interval between groups may be set. Then, the group synthesizing unit 70 extracts one group h having a volume larger than that of the group g from all the groups (Step S47). As a result, the minimum value Xmin (h), the maximum value Xmax (h), the minimum value Ymin (h), the maximum value Ymax (h), the minimum value Zmin (h), and the maximum value Zmax (h) are obtained for the group h. It is done. Next, the group synthesizing unit 70 calculates the minimum value of the difference between the two groups for each of the X, Y, and Z directions (step S48). Specifically, the minimum value dx of the difference in the X direction, the minimum value dy of the difference in the Y direction, and the minimum value dz of the difference in the Z direction are calculated by executing processing according to the following [Equation 2]. .

〔数式2〕
dx=Min{|Xmax(g)−Xmin(h)|,|Xmin(g)−Xmax(h)|}
dy=Min{|Ymax(g)−Ymin(h)|,|Ymin(g)−Ymax(h)|}
dz=Min{|Zmax(g)−Zmin(h)|,|Zmin(g)−Zmax(h)|}
[Formula 2]
dx = Min {| Xmax (g) -Xmin (h) |, | Xmin (g) -Xmax (h) |}
dy = Min {| Ymax (g) -Ymin (h) |, | Ymin (g) -Ymax (h) |}
dz = Min {| Zmax (g) -Zmin (h) |, | Zmin (g) -Zmax (h) |}

続いて、グループ合成手段70は、算出された方向別最小値のうち最大のものをグループ間最小値とし、グループ間最小値を、既に処理済みの他のグループ間における全グループ間最小値と比較し、小さい方を全グループ間最小値とする処理を行う(ステップS49)。具体的には、ステップS48において算出された3つの方向別最小値dx、dy、dzのうち、最大の値をとるグループ間最小値Max(dx、dy、dz)とdminを比較し、Max(dx、dy、dz)<dminの場合、dmin=Max(dx、dy、dz)とする。これにより、dminには、グループ間最小値の中で最小の値となる全グループ間最小値が記録されることになる。   Subsequently, the group synthesizing unit 70 sets the maximum among the calculated direction-specific minimum values as the inter-group minimum value, and compares the inter-group minimum value with the all-group minimum value among other groups that have already been processed. Then, the process of setting the smaller one as the minimum value between all groups is performed (step S49). Specifically, among the three direction-specific minimum values dx, dy, and dz calculated in step S48, the inter-group minimum value Max (dx, dy, dz) that takes the maximum value is compared with dmin, and Max ( When dx, dy, dz) <dmin, dmin = Max (dx, dy, dz). As a result, the minimum value between all groups, which is the minimum value among the minimum values between groups, is recorded in dmin.

ステップS47、S48、S49の処理を繰り返して実行し、グループgより体積が大きい全てのグループに対する処理を終えたら、図15に示した最小間隔の算出処理を終了し、図14のステップS45に進んで、最小間隔dminとしきい値との比較を行うことになる。   When the processes of steps S47, S48, and S49 are repeatedly executed and the processes for all the groups having a volume larger than the group g are finished, the minimum interval calculation process shown in FIG. 15 is terminated, and the process proceeds to step S45 of FIG. Thus, the minimum interval dmin is compared with the threshold value.

<2.6.サーフェースデータの合成>
図9の処理概要に示したように、ステップS50においては、グループ合成手段70が、全グループのサーフェースデータの合成を行って更新された領域別サーフェースデータを得る。また、ステップS70においては、サーフェースデータ合成手段80が、全領域の領域別サーフェースデータの合成を行って合成サーフェースデータを得る。いずれの合成処理も、ヘッダ部を除く領域別サーフェースデータを単純に結合し、ヘッダ部に合算されたポリゴン数を記録することにより行われる。合成サーフェースデータ記憶手段100に記憶された合成サーフェースデータを3Dプリンタ7に出力することにより、3Dプリンタ7は効率的に立体物を造形することができる。造形された立体物については、ほとんど劣化は見られなかった。
<2.6. Composition of surface data>
As shown in the processing outline of FIG. 9, in step S50, the group synthesizing unit 70 synthesizes the surface data of all the groups to obtain updated surface data by area. In step S70, the surface data synthesizing unit 80 synthesizes the area-specific surface data of all areas to obtain synthesized surface data. Any combination processing is performed by simply combining the surface data for each area excluding the header portion and recording the total number of polygons in the header portion. By outputting the composite surface data stored in the composite surface data storage unit 100 to the 3D printer 7, the 3D printer 7 can efficiently form a three-dimensional object. For the three-dimensional object that was shaped, there was almost no deterioration.

<3.ポリゴン削減事例>
図16〜図26に、本実施形態に係る立体物造形用データ最適化装置によりポリゴンを削減したサーフェースデータの事例を示す。図16は、図8に示したサーフェースデータ(STLデータ)の正面からのレンダリング像を示す図である。図16(a)は、削減前のサーフェースデータのレンダリング像、図16(b)は、削減後のサーフェースデータのレンダリング像である。図16(b)に示す削減後のデータは、図16(a)の削減前のデータに比べてポリゴン数およびデータ量が1/10程度に削減されているが、見た目に大きな変化はない。同様に、造形される立体物についても大きな変化はない。造形される立体物には、実質的に劣化はない。
<3. Polygon reduction example>
FIGS. 16 to 26 show examples of surface data obtained by reducing polygons using the three-dimensional object modeling data optimizing apparatus according to the present embodiment. FIG. 16 is a diagram showing a rendering image from the front of the surface data (STL data) shown in FIG. FIG. 16A shows a rendered image of surface data before reduction, and FIG. 16B shows a rendered image of surface data after reduction. In the data after reduction shown in FIG. 16B, the number of polygons and the data amount are reduced to about 1/10 compared to the data before reduction in FIG. 16A, but there is no significant change in appearance. Similarly, there is no big change also about the solid thing modeled. There is substantially no deterioration in the three-dimensional object to be shaped.

図17〜図19は、図16に示したレンダリング像の拡大図である。図17が最も拡大率が小さく、図19が最も拡大率が大きいものとなっている。図20は、図19に示したレンダリング像拡大図のワイヤーフレーム図である。図19においては、削減前と削減後で大きな変化は見られないが、図20のワイヤーフレーム図を比較すると、図20(b)においては、ポリゴン数が大きく削減されていることがわかる。   17 to 19 are enlarged views of the rendered image shown in FIG. FIG. 17 shows the smallest enlargement ratio, and FIG. 19 shows the largest enlargement ratio. 20 is a wire frame diagram of the enlarged rendering image shown in FIG. In FIG. 19, there is no significant change before and after the reduction, but comparing the wire frame diagrams of FIG. 20, it can be seen that the number of polygons is greatly reduced in FIG. 20B.

図21〜図23は、図7に示した領域別サーフェースデータ(STLデータ)のうち、左眼球に対応する段階的削減事例を示す図である。図21は、削減前および1/2に削減した状態、図22は、1/4および1/8に削減した状態、図23は、1/10および1/20に削減した状態、をそれぞれ示している。図22(a)に示した1/4に削減した状態で、隔離小領域が発生し、図22(b)に示した1/8に削減した状態で、隔離小領域が消失している。図24〜図26は、図21〜図23に示したレンダリング像のワイヤーフレーム図である。   FIG. 21 to FIG. 23 are diagrams showing a gradual reduction example corresponding to the left eyeball in the surface data by area (STL data) shown in FIG. 21 shows the state before reduction and 1/2 reduction, FIG. 22 shows the state reduced to 1/4 and 1/8, and FIG. 23 shows the state reduced to 1/10 and 1/20, respectively. ing. In the state reduced to 1/4 shown in FIG. 22A, an isolated small area is generated, and in the state reduced to 1/8 shown in FIG. 22B, the isolated small area disappears. 24 to 26 are wire frame diagrams of the rendered images illustrated in FIGS. 21 to 23.

<4.変形例等>
以上、本発明の好適な実施形態について説明したが、本発明は上記実施形態に限定されず、種々の変形が可能である。例えば、上記実施形態では、処理対象のポリゴンを三角形としたが、四角形以上の多角形であってもよい。
<4. Modified example>
The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above embodiments, and various modifications can be made. For example, in the above embodiment, the processing target polygon is a triangle, but it may be a quadrilateral or more.

また、上記実施形態では、ポリゴンに対して面積と周長を算出し、面積と周長の積が最小となるポリゴンを削除対象ポリゴンとして選定するようにしたが、周長を用いず面積のみを用いるようにしてもよい。   Further, in the above embodiment, the area and perimeter are calculated for the polygon, and the polygon having the smallest product of the area and perimeter is selected as the polygon to be deleted, but only the area is used without using the perimeter. You may make it use.

また、上記実施形態では、ポリゴンに対して面積と周長を算出し、面積と周長の積が最小となるポリゴンを削除対象ポリゴンとして選定するようにしたが、周長を用いず面積のみを用いるようにしてもよい。   Further, in the above embodiment, the area and perimeter are calculated for the polygon, and the polygon having the smallest product of the area and perimeter is selected as the polygon to be deleted, but only the area is used without using the perimeter. You may make it use.

また、上記実施形態では、複数のグループの更新されたサーフェースデータに対して、外接直方体の体積が所定のしきい値未満であるものを削除するようにしたが、削除しないようにすることも可能である。   Further, in the above embodiment, the circumscribed cuboid volume whose volume is less than the predetermined threshold is deleted from the updated surface data of a plurality of groups. Is possible.

1・・・CPU(Central Processing Unit)
2・・・RAM(Random Access Memory)
3・・・記憶装置
4・・・キー入力I/F
5・・・データ入出力I/F
6・・・表示部
7・・・3Dプリンタ(立体物造形装置)
10・・・制御手段
20・・・グループ分類手段
30・・・削除対象ポリゴン選定手段
40・・・削除対象辺選定手段
50・・・削除頂点共有ポリゴン探索手段
60・・・サーフェースデータ更新手段
70・・・グループ合成手段
80・・・サーフェースデータ合成手段
90・・・領域別サーフェースデータ記憶手段
100・・・合成サーフェースデータ記憶手段
1 ... CPU (Central Processing Unit)
2 ... RAM (Random Access Memory)
3 ... Storage device 4 ... Key input I / F
5. Data input / output I / F
6 ... Display unit 7 ... 3D printer (three-dimensional object modeling device)
DESCRIPTION OF SYMBOLS 10 ... Control means 20 ... Group classification | category means 30 ... Deletion target polygon selection means 40 ... Deletion target edge selection means 50 ... Deletion vertex shared polygon search means 60 ... Surface data update means 70... Group synthesizing means 80... Surface data synthesizing means 90... Area-specific surface data storing means 100.

Claims (7)

立体物の構造をポリゴンの集合体で表現したサーフェースデータを、立体物の造形のために最適化する装置であって、
前記サーフェースデータを構成する各ポリゴンの面積を基に、削除するべきポリゴンを削除対象ポリゴンとして選定する削除対象ポリゴン選定手段と、
前記削除対象ポリゴンを構成する辺の長さに基づいて、削除するべき辺を削除対象辺として選定する削除対象辺選定手段と、
前記削除対象ポリゴン以外のポリゴンから、前記削除対象辺の2頂点のいずれか1頂点を共有するポリゴンである削除頂点共有ポリゴンを探索する削除頂点共有ポリゴン探索手段と、
前記削除対象辺の2頂点の双方を共有する削除頂点共有ポリゴンを、前記削除対象ポリゴンとともに削除し、前記探索された削除対象辺のいずれか1頂点のみを共有する削除頂点共有ポリゴンに対して、前記共有する1頂点を前記削除対象辺の2頂点の中点の位置に補正することによって更新するサーフェースデータ更新手段と、
前記サーフェースデータ更新手段により更新されたサーフェースデータを構成するポリゴン数が所定の目標値より大きい場合、前記削除対象ポリゴン選定手段、前記削除対象辺選定手段、削除頂点共有ポリゴン探索手段、サーフェースデータ更新手段に対して繰り返して処理を実行させる制御を行う制御手段と、
を備えることを特徴とする立体物造形用データ最適化装置。
A device that optimizes the surface data representing the structure of a three-dimensional object as a collection of polygons for modeling a three-dimensional object,
A deletion target polygon selection means for selecting a polygon to be deleted as a deletion target polygon based on the area of each polygon constituting the surface data;
Based on the length of the sides constituting the deletion target polygon, a deletion target side selection means for selecting a side to be deleted as a deletion target side;
A deleted vertex shared polygon search means for searching for a deleted vertex shared polygon which is a polygon sharing one of the two vertices of the deletion target side from polygons other than the deleted target polygon;
The deleted vertex shared polygon that shares both two vertices of the deletion target side is deleted together with the deletion target polygon, and the deleted vertex shared polygon that shares only one vertex of the searched deletion target side, Surface data update means for updating the shared one vertex by correcting it to the position of the midpoint of the two vertices of the side to be deleted;
When the number of polygons constituting the surface data updated by the surface data update unit is larger than a predetermined target value, the deletion target polygon selection unit, the deletion target side selection unit, the deleted vertex shared polygon search unit, the surface Control means for controlling the data updating means to repeatedly execute processing;
A data optimizing device for modeling a three-dimensional object.
前記削除対象ポリゴン選定手段は、前記サーフェースデータを構成するポリゴンに対して面積と周長を算出し、面積と周長の積が最小となるポリゴンを前記削除対象ポリゴンとして選定することを特徴とする請求項1に記載の立体物造形用データ最適化装置。   The deletion target polygon selection means calculates an area and a perimeter for the polygon constituting the surface data, and selects a polygon having a minimum product of the area and the perimeter as the deletion target polygon. The data optimization apparatus for modeling a three-dimensional object according to claim 1. 前記削除対象辺選定手段は、前記削除対象ポリゴンの各辺の長さを算出し、最も短い辺を前記削除対象辺として選定することを特徴とする請求項1または請求項2に記載の立体物造形用データ最適化装置。   3. The three-dimensional object according to claim 1, wherein the deletion target side selecting unit calculates a length of each side of the deletion target polygon and selects the shortest side as the deletion target side. Modeling data optimization device. 前記サーフェースデータが複数の領域に分割されたボクセル形式の3D医療画像データに対応して複数セット存在しており、
前記制御手段は、各サーフェースデータに対して、前記削除対象ポリゴン選定手段、前記削除対象辺選定手段、削除頂点共有ポリゴン探索手段、サーフェースデータ更新手段に対して処理を実行させ、複数セットの更新されたサーフェースデータを作成させるものであって、
前記複数セットの更新されたサーフェースデータを単一のサーフェースデータに合成するサーフェースデータ合成手段を、
更に備えることを特徴とする請求項1から請求項3のいずれか一項に記載の立体物造形用データ最適化装置。
There are a plurality of sets corresponding to the voxel format 3D medical image data in which the surface data is divided into a plurality of regions,
The control means causes the deletion target polygon selection means, the deletion target edge selection means, the deletion vertex shared polygon search means, and the surface data update means to execute processing for each surface data, and sets a plurality of sets. To create updated surface data,
Surface data synthesizing means for synthesizing the plurality of sets of updated surface data into a single surface data;
The three-dimensional object modeling data optimizing device according to any one of claims 1 to 3, further comprising:
前記削除対象ポリゴン選定手段を実行させる対象のサーフェースデータに対して、各グループに属するポリゴンが当該グループ内の他のいずれかのポリゴンと、ポリゴンを構成する辺を共有するようにグループ分類するサーフェースデータのグループ分類手段と、
前記分類された各グループに対する前記削除対象ポリゴン選定手段、前記削除対象辺選定手段、削除頂点共有ポリゴン探索手段、サーフェースデータ更新手段による処理の実行により得られた複数のグループの更新されたサーフェースデータに対して、単一のサーフェースデータに合成するグループ合成手段と、
を更に備えることを特徴とする請求項1から請求項4のいずれか一項に記載の立体物造形用データ最適化装置。
For the surface data to be executed by the deletion target polygon selection means, the group classification is performed so that the polygons belonging to each group share the sides constituting the polygon with any other polygon in the group. A grouping means for face data;
Updated surfaces of a plurality of groups obtained by executing processing by the deletion target polygon selection means, the deletion target edge selection means, the deletion vertex shared polygon search means, and the surface data update means for each of the classified groups. A group combining means for combining data with a single surface data;
The data optimization device for three-dimensional object modeling according to any one of claims 1 to 4, further comprising:
前記グループ合成手段は、前記複数のグループの更新されたサーフェースデータに対して、外接直方体の体積を算出し、算出された体積が所定のしきい値未満である場合、当該グループのサーフェースデータを合成対象から除外することを特徴とする請求項5に記載の立体物造形用データ最適化装置。   The group synthesizing unit calculates a volume of a circumscribed rectangular parallelepiped for the updated surface data of the plurality of groups, and when the calculated volume is less than a predetermined threshold value, the surface data of the group The data optimizing device for three-dimensional object modeling according to claim 5, wherein コンピュータを、請求項1から請求項6のいずれか一項に記載の立体物造形用データ最適化装置として機能させるためのプログラム。   A program for causing a computer to function as the three-dimensional object modeling data optimizing device according to any one of claims 1 to 6.
JP2014032914A 2014-02-24 2014-02-24 Solid molding data optimization device Pending JP2015158778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014032914A JP2015158778A (en) 2014-02-24 2014-02-24 Solid molding data optimization device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014032914A JP2015158778A (en) 2014-02-24 2014-02-24 Solid molding data optimization device

Publications (1)

Publication Number Publication Date
JP2015158778A true JP2015158778A (en) 2015-09-03

Family

ID=54182726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014032914A Pending JP2015158778A (en) 2014-02-24 2014-02-24 Solid molding data optimization device

Country Status (1)

Country Link
JP (1) JP2015158778A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017073702A1 (en) * 2015-10-29 2017-05-04 キヤノン株式会社 Medical image processing device, program installable on medical image processing device, and medical image processing method
JP2017084191A (en) * 2015-10-29 2017-05-18 キヤノンマーケティングジャパン株式会社 Medical image processing device, program mountable on medical image processing device, and medical image processing method
JP2017080193A (en) * 2015-10-29 2017-05-18 キヤノンマーケティングジャパン株式会社 Medical image processing apparatus, program mountable on medical image processing apparatus, and medical image processing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017073702A1 (en) * 2015-10-29 2017-05-04 キヤノン株式会社 Medical image processing device, program installable on medical image processing device, and medical image processing method
JP2017084191A (en) * 2015-10-29 2017-05-18 キヤノンマーケティングジャパン株式会社 Medical image processing device, program mountable on medical image processing device, and medical image processing method
JP2017080193A (en) * 2015-10-29 2017-05-18 キヤノンマーケティングジャパン株式会社 Medical image processing apparatus, program mountable on medical image processing apparatus, and medical image processing method
US10984906B2 (en) 2015-10-29 2021-04-20 Canon Kabushiki Kaisha Medical image processing apparatus, program installable into medical image processing apparatus, and medical image processing method

Similar Documents

Publication Publication Date Title
JP7084686B2 (en) Compression of 3D modeled objects
JP4780106B2 (en) Information processing apparatus and information processing method, image processing apparatus and image processing method, and computer program
US10186079B2 (en) Adaptively joining meshes
CN108352082B (en) Techniques to crowd 3D objects into a plane
US8593455B2 (en) Method and system for compressing and decoding mesh data with random accessibility in three-dimensional mesh model
CN111462318B (en) Three-dimensional tree model real-time simplification method based on viewpoint mutual information
CN116051708A (en) Three-dimensional scene lightweight model rendering method, equipment, device and storage medium
CN109003333B (en) Interactive grid model cutting method and device based on texture and modeling equipment
CN108597038B (en) Three-dimensional surface modeling method and device and computer storage medium
JP6569389B2 (en) Polygon model structuring device and three-dimensional object shaping data reduction device
JP2016099648A (en) Data reduction device for three-dimensional object molding
JP2015158778A (en) Solid molding data optimization device
JP4714444B2 (en) Tetrahedral mesh generation method and program
Qiu et al. An efficient and collision-free hole-filling algorithm for orthodontics
JP6565494B2 (en) Data reduction device for 3D object modeling
JP6294700B2 (en) Image processing apparatus and image processing method
Krishnamurthy et al. Optimized GPU evaluation of arbitrary degree NURBS curves and surfaces
CN109754469B (en) Method and system for surface mesh cutting and kerf boundary optimization
JP6613727B2 (en) Data reduction device for 3D object modeling
Pakdel et al. Incremental subdivision for triangle meshes
US11645813B2 (en) Techniques for sculpting digital faces based on anatomical modeling
JP2003228725A (en) 3d image processing system
US10636210B2 (en) Dynamic contour volume deformation
Pal Fast freeform hybrid reconstruction with manual mesh segmentation
JP2016099841A (en) Data reduction device for three-dimensional object molding