Three-dimensional shape data processing device and three-dimensional shape data processing program
The three-dimensional shape data processing device optimizes region subdivision based on surface interference to efficiently represent object characteristics, reducing unnecessary divisions and computational time.
Patent Information
- Application Number
- JP2020147070
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-09-01
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2040-09-01
AI Technical Summary
Existing methods for processing three-dimensional shape data face challenges in efficiently dividing a three-dimensional space to accurately represent object characteristics while minimizing data size and processing time, particularly when using octrees, which can lead to unnecessary region divisions and increased computational demands.
A three-dimensional shape data processing device that subdivides regions based on interference with forming surfaces, determining the required size to reproduce characteristics, and recursively re-divides regions as necessary to maintain accuracy and reduce unnecessary processing.
This approach allows for efficient setting of region sizes to accurately represent three-dimensional shapes, reducing unnecessary re-divisions and computational time, while maintaining detail in shape representation.
Smart Images

Figure 0007615574000001 
Figure 0007615574000002 
Figure 0007615574000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a three-dimensional shape data processing device and a three-dimensional shape data processing program. [Background technology]
[0002] Patent Document 1 discloses a method for stacking slice data of a captured image containing voxels of different sizes to form a three-dimensional model of a captured subject, the method including a first step of dividing the slice data of the captured image into a plurality of regions such that each region contains a predetermined number of pixels; a second step of combining pixels contained in one divided region to replace them with one voxel data when all pixels contained in the divided region represent tissues or substances having the same characteristics; a third step of defining the pixel data in one divided region as mixed voxel data when one divided region contains pixels representing tissues or substances having different characteristics; a fourth step of repeating the second and third steps to obtain slice data including the replaced voxel data and the mixed voxel data; and a fifth step of stacking the plurality of slice data obtained in the fourth step in multiple stages.
[0003] Patent document 2 discloses an information processing device that initially divides multiple three-dimensional shapes into equal numbers in each of the vertical, horizontal, and height directions at a coarse resolution, narrows down the areas that require processing at a fine resolution, and generates differential models of each of the three-dimensional shapes.
[0004] Patent Document 3 discloses an information processing device that represents the data structure of a three-dimensional shape using an N-ary cubic tree in which the three-dimensional shape is divided into equal parts in each of the vertical, horizontal, and height directions, and in which the top node and intermediate nodes of the N-ary cubic tree each have index bits indicating pointers to memory locations that hold data at each layer and occupancy bits indicating the presence or absence of a subcube at the next layer. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2012-88771 A [Patent Document 2] U.S. Pat. No. 9,600,929 [Patent Document 3] U.S. Patent No. 9,754,405 Summary of the Invention [Problem to be solved by the invention]
[0006] When processing the three-dimensional shape of an object, a three-dimensional space containing the object may be divided, and processing related to the three-dimensional shape of the object may be performed for each divided three-dimensional region.
[0007] For example, in order to define the characteristics of an object in detail by associating the characteristics of the object with each three-dimensional region, it is possible to divide the three-dimensional space as finely as possible to reduce the size of the three-dimensional regions; however, this increases the number of three-dimensional regions, resulting in an increase in the data size of the data used for processing and an increase in processing time.
[0008] Therefore, when dividing a three-dimensional space, a method is sometimes used in which an octree is used to divide the three-dimensional space into smaller regions as one approaches the surface of the object from the inside of the object.
[0009] For example, when the surface of an object is composed of a plane, the characteristics of the range may be associated with one three-dimensional region. However, when an octree is used to divide a three-dimensional space, the surface of the object may be divided into the smallest three-dimensional region used in the octree, and as a result, the plane of the object may be divided into multiple three-dimensional regions. In addition, when an octree is used to divide a three-dimensional space, even if the three-dimensional regions are adjacent in terms of location, they may belong to a subtree of a different parent (branching point). In that case, in order to select adjacent three-dimensional regions, it is necessary to trace the tree structure back to the parent common to the adjacent three-dimensional regions, or to calculate which subtree each three-dimensional region is located in. In addition, when an octree is used to divide a three-dimensional space, the larger the size of the object, the more types of three-dimensional regions the object is divided into. Therefore, even if the three-dimensional shape of the object can be processed using three types of three-dimensional regions, such as coarse, medium, and fine, the object may be divided into more types of three-dimensional regions depending on the size of the object. Furthermore, when the three-dimensional shape of an object is changed, it is necessary to re-segment not only the three-dimensional area corresponding to the changed area, but also other three-dimensional areas corresponding to the subtree to which the three-dimensional area corresponding to the changed area belongs.
[0010] The present invention aims to provide a three-dimensional shape data processing device and processing program that can set the size of a three-dimensional area containing each part of a three-dimensional shape in accordance with the characteristics of each part of the three-dimensional shape required for processing the three-dimensional shape when processing a three-dimensional shape using a combination of multiple three-dimensional areas of different sizes. [Means for solving the problem]
[0011] A three-dimensional shape data processing device according to a first embodiment includes a processor, which divides a three-dimensional space including a three-dimensional shape constructed using at least one of a planar and a curved forming surface into a plurality of three-dimensional regions having a specified size, identifies the forming surface that interferes with the three-dimensional region for each of the divided three-dimensional regions, and further divides each of the three-dimensional regions until the size of the three-dimensional region reaches a size required to reproduce the characteristics of the portion of the three-dimensional shape represented by the interfering forming surface.
[0012] The three-dimensional shape data processing device of the second embodiment is the three-dimensional shape data processing device of the first embodiment, in which the processor determines that the size of the three-dimensional region has reached the size required to reproduce the characteristics at the part of the three-dimensional shape represented by the interfering forming surface when the variation in characteristics within the area of the forming surface that interferes with the three-dimensional region falls within a predetermined tolerance range, and stops redividing the three-dimensional region.
[0013] A three-dimensional shape data processing device according to a third aspect is a three-dimensional shape data processing device according to the second aspect, in which the processor determines that the size of the three-dimensional region has reached the size required to reproduce the characteristics of the part of the three-dimensional shape represented by the interfering forming surface when the forming surface that interferes with the three-dimensional region constitutes one plane of the three-dimensional shape, or when there is no forming surface that interferes with the three-dimensional region, and stops redividing the three-dimensional region.
[0014] A fourth aspect of the three-dimensional shape data processing device is the three-dimensional shape data processing device of the third aspect, in which the processor considers each of the forming surfaces that interfere with the three-dimensional region to constitute one plane of the three-dimensional shape when the variance of normal vectors of each of the forming surfaces that interfere with the three-dimensional region is below a predetermined threshold.
[0015] A three-dimensional shape data processing device according to a fifth aspect is a three-dimensional shape data processing device according to any one of the first to fourth aspects, in which the processor stops the redivision of the three-dimensional region even if the situation requires redivision of the three-dimensional region when the state of at least one of the forming surface, the three-dimensional region, and characteristics related to the forming surface and the three-dimensional region satisfy a predetermined redivision stop condition.
[0016] A three-dimensional shape data processing device according to a sixth aspect is a three-dimensional shape data processing device according to any one of the first to fifth aspects, in which the processor places three-dimensional elements in the three-dimensional area involved in reproducing the characteristics of the three-dimensional shape according to a positional relationship between the three-dimensional area and the formation surface.
[0017] A seventh aspect of the three-dimensional shape data processing device is the three-dimensional shape data processing device of the sixth aspect, in which the processor places the three-dimensional element in the three-dimensional area where the subdivision has stopped when a reference point that has been preset in the three-dimensional area where the subdivision has stopped is inside the three-dimensional shape.
[0018] A three-dimensional shape data processing device according to an eighth aspect is a three-dimensional shape data processing device according to the sixth or seventh aspect, in which, when the processor re-divides the three-dimensional area, it executes a recursive process that recursively performs a process relating to identifying the forming surface for each of the divided three-dimensional areas and a process relating to the arrangement of the three-dimensional elements in the three-dimensional area.
[0019] A ninth aspect of the three-dimensional shape data processing device is the three-dimensional shape data processing device of the eighth aspect, in which, when the processor recursively re-divides the three-dimensional region, for each of the re-divided three-dimensional regions, the forming surfaces that interfere with the re-divided three-dimensional region are identified from among the forming surfaces that interfere with the original three-dimensional region.
[0020] A three-dimensional shape data processing device according to a tenth aspect is the three-dimensional shape data processing device according to the eighth or ninth aspect, in which the processor displays the arrangement result of the three-dimensional elements each time the recursive processing is executed.
[0021] A three-dimensional shape data processing device according to an eleventh aspect is a three-dimensional shape data processing device according to any one of the first to tenth aspects, in which the processor sequentially selects all of the forming surfaces constituting the three-dimensional shape, and for each of the selected forming surfaces, sets any one of the three-dimensional areas that interfere with the selected forming surface as a reference three-dimensional area, and then determines whether each of the adjacent three-dimensional areas that are the three-dimensional areas adjacent to the reference three-dimensional area interferes with the selected forming surface, and sets the adjacent three-dimensional area that interferes with the selected forming surface as the new reference three-dimensional area until there are no more adjacent three-dimensional areas that interfere with the selected forming surface, and repeatedly executes a process of identifying the adjacent three-dimensional area that interferes with the selected forming surface for each of the remaining adjacent three-dimensional areas that are adjacent to the new reference three-dimensional area and are adjacent to the new reference three-dimensional area, excluding the adjacent three-dimensional areas whose interference state with the selected forming surface has been determined, thereby identifying the forming surfaces that interfere with each of the three-dimensional areas.
[0022] A three-dimensional shape data processing device according to a 12th aspect is a three-dimensional shape data processing device according to any one of the first to 11th aspects, in which the processor sets an interference range set with respect to a reference point of the three-dimensional area so as to include reference points of adjacent three-dimensional areas, and identifies the forming surface that interferes with the set interference range as the forming surface that interferes with the three-dimensional area.
[0023] A three-dimensional shape data processing device according to a thirteenth aspect is a three-dimensional shape data processing device according to any one of the first to twelfth aspects, in which the processor associates with each of the three-dimensional regions an attribute value representing an attribute of at least one of the forming surface and the space related to the three-dimensional region.
[0024] A three-dimensional shape data processing device according to a fourteenth aspect is a three-dimensional shape data processing device according to any one of the first to thirteenth aspects, in which the processor causes each of the processes that execute processing in parallel to perform a process of redividing each of the three-dimensional regions.
[0025] A three-dimensional shape data processing program according to a fifteenth aspect is a program for causing a computer to execute a process of dividing a three-dimensional space including a three-dimensional shape constructed using at least one of one or more planar and curved forming surfaces into a plurality of three-dimensional regions having a specified size, identifying, for each of the divided three-dimensional regions, a forming surface that interferes with the three-dimensional region, and further dividing each of the three-dimensional regions until the size of the three-dimensional region reaches a size required to reproduce the characteristics of the portion of the three-dimensional shape represented by the interfering forming surface. Effect of the Invention
[0026] According to the first and fifteenth aspects, when a three-dimensional shape is processed using a combination of multiple three-dimensional regions of different sizes, the size of the three-dimensional region containing each part of the three-dimensional shape can be set in accordance with the characteristics of each part of the three-dimensional shape required for processing the three-dimensional shape.
[0027] According to the second aspect, it is possible to determine whether or not the three-dimensional region needs to be re-divided based on the variation in characteristics in the range of the forming surface that interferes with the three-dimensional region.
[0028] According to the third aspect, it is possible to determine whether or not re-division of a three-dimensional area is necessary based on the positional relationship between the three-dimensional area and the three-dimensional shape.
[0029] According to the fourth aspect, it is possible to determine whether the range to be considered in the three-dimensional region corresponds to a plane of the three-dimensional shape, without being aware of the combination of forming surfaces that constitute the three-dimensional shape.
[0030] According to the fifth aspect, there is an effect that it is possible to prevent unnecessary subdivision of a three-dimensional area from being performed.
[0031] According to the sixth aspect, there is an effect that it is possible to reproduce a three-dimensional shape by arranging three-dimensional elements in a three-dimensional area according to the size of the three-dimensional area.
[0032] According to the seventh aspect, there is an advantage that it is possible to determine whether or not to place a three-dimensional element based on the positional relationship between a reference point of a three-dimensional area and a three-dimensional shape.
[0033] According to the eighth aspect, there is an advantage that the processing logic for redividing a three-dimensional area can be simplified, compared to a case in which different processing logic is prepared for each redivision of a three-dimensional area.
[0034] According to the ninth aspect, when redividing a three-dimensional region, the time required to identify forming surfaces that interfere with the three-dimensional region can be shortened compared to identifying forming surfaces that interfere with the three-dimensional region from among all forming surfaces that constitute the three-dimensional shape.
[0035] According to the tenth aspect, it is possible to reduce the waiting time experienced by the user until the final placement result of the three-dimensional elements is displayed, compared to when the final placement result of the three-dimensional elements is displayed after the division of all three-dimensional areas has been completed.
[0036] According to the 11th aspect, it has the advantage that the time required to identify forming surfaces that interfere with a three-dimensional region can be shortened compared to a case in which, for each three-dimensional region, forming surfaces that interfere with the three-dimensional region are identified one by one from among all forming surfaces that constitute the three-dimensional shape.
[0037] According to the 12th aspect, compared to a case where the relationship between adjacent three-dimensional regions is not taken into consideration, it has the advantage that it is possible to appropriately determine whether or not subdivision of a three-dimensional region is necessary even if the three-dimensional shape passes between the reference points of adjacent three-dimensional regions.
[0038] According to the thirteenth aspect, there is an effect that it is possible to associate an attribute value for each attribute even with a three-dimensional area in which no three-dimensional element is arranged.
[0039] According to the fourteenth aspect, even when the subdivisions of three-dimensional regions are executed in parallel in order to reduce the time required for the subdivision, the subdivisions can be processed independently without affecting the subdivision of other three-dimensional regions. [Brief description of the drawings]
[0040] [Figure 1] FIG. 1 illustrates an example of the configuration of a three-dimensional shape data processing device. [Diagram 2] FIG. 1 is a diagram showing an example of a three-dimensional shape of an object. [Diagram 3] FIG. 1 is a diagram showing an example of a three-dimensional shape of an object composed of voxels. [Figure 4] FIG. 1 is a diagram showing an example of a cross section of a three-dimensional shape of an object composed of voxels of a single size. [Diagram 5] 13 is a flowchart illustrating an example of a process for dividing a three-dimensional space. [Figure 6] FIG. 13 is a diagram showing an example in which a three-dimensional space including a three-dimensional shape of an object is divided by an initial division size. [Figure 7] FIG. 13 is a diagram showing an example of an adjacent region for a specific three-dimensional region that interferes with a polygon. [Figure 8] 11A and 11B are diagrams illustrating an example of setting an interference range in a three-dimensional area. [Figure 9] FIG. 13 is a diagram illustrating an example of an interference range in a three-dimensional area. [Figure 10] FIG. 13 is a diagram illustrating an example of an adjacent region. [Figure 11]FIG. 13 is a diagram illustrating an example of an adjacent region after the target region is changed. [Figure 12] FIG. 13 illustrates an example of an adjacent region after further modification of the target region. [Figure 13] 13 is a flowchart showing an example of the flow of a re-division process. [Figure 14] 13 is a flowchart showing an example of the flow of a cell block process. [Figure 15] FIG. 1 is a diagram showing an example of a three-dimensional shape of an object composed of voxels of three different sizes. [Figure 16] FIG. 1 is a diagram showing an example of a three-dimensional shape of an object composed of voxels of four different sizes. [Figure 17] 1A and 1B are diagrams illustrating examples of situations in which reproduction of a three-dimensional shape may fail. [Figure 18] 1A and 1B are diagrams showing an example of reproduction of a three-dimensional shape of a protrusion protruding from an object. [Figure 19] 11 is a diagram showing an example of an interference range used when reproducing a three-dimensional shape of a protrusion protruding from an object. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0041] Hereinafter, the present embodiment will be described with reference to the drawings. Note that the same components and processes are given the same reference numerals throughout the drawings, and duplicated explanations will be omitted.
[0042] First, the configuration of a three-dimensional shape data processing device 1 according to this embodiment will be described with reference to FIG.
[0043] The processing device 1 is configured, for example, by a computer 10. The computer 10 includes a CPU (Central Processing Unit) 11, which is an example of a processor, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a non-volatile memory 14, and an input / output interface (I / O) 15. The CPU 11, the ROM 12, the RAM 13, the non-volatile memory 14, and the I / O 15 are connected to each other via a bus 16.
[0044] The nonvolatile memory 14 is an example of a storage device that maintains stored information even if the power supplied to the nonvolatile memory 14 is cut off, and is, for example, a semiconductor memory or a hard disk. The nonvolatile memory 14 does not necessarily need to be built into the computer 10, and may be a portable storage device that is detachable from the computer 10, such as a memory card.
[0045] On the other hand, an operation unit 17, a display unit 18, and a communication unit 19 are connected to the I / O 15.
[0046] The operation unit 17 is a unit that receives instructions from a user of the processing device 1, and includes at least one of an input device such as a keyboard, a pointing device such as a mouse or a touch panel, and a button.
[0047] The display unit 18 is a unit that displays information processed by the CPU 11, and includes at least one of display devices such as a liquid crystal display, an organic EL (Electro Luminescence) display, and a projector.
[0048] The communication unit 19 is connected to a communication line such as the Internet and a LAN (Local Area Network), and includes an interface for performing data communication with an external device connected to the communication line.
[0049] 2 is a diagram showing an example of the three-dimensional shape of an object 2 represented by three-dimensional shape data. A three-dimensional space including the three-dimensional shape of the object 2 is defined by three-dimensional coordinates represented by an X-axis, a Y-axis, and a Z-axis, and each position in the three-dimensional space is represented by a coordinate value of the three-dimensional coordinates. Note that the direction along the X-axis is sometimes called width, the direction along the Y-axis is sometimes called depth, and the direction along the Z-axis is sometimes called height.
[0050] As a data format for three-dimensional shape data representing the three-dimensional shape of the object 2, for example, a data format for forming the contour of the object 2 by combining polygons 4 may be used.
[0051] The polygon 4 refers to each of the planes or curved surfaces that make up the shape of the object 2. There are no restrictions on the shape of the polygon 4, but polygons such as triangles and quadrangles are used, and the shape of the object 2 is formed by combining multiple polygons 4.
[0052] The three-dimensional shape data that defines the shape of the object 2 using polygons 4 includes information about the shape of the object 2 and information about the attributes of the object 2.
[0053] The information on the shape of the object 2 includes information expressing the shape of the object 2, such as the shape, position, and arrangement direction of each polygon 4, and information on connections with adjacent polygons 4. The information on the attributes of the object 2 includes properties of each part of the object 2 represented by each polygon 4, such as the color, material, and strength of the object 2, and the properties of each part of the object 2 are managed in association with the polygon 4 arranged in the corresponding part. Hereinafter, the features or tendencies of things represented by the information on the shape and the information on the attributes will be referred to as "characteristics."
[0054] The three-dimensional shape data representing the three-dimensional shape of the object 2 may use a data format in which the contour of the object 2 is formed by combining polygons 4, as well as a data format in which the contour of the object 2 is formed by combining functional surfaces such as spline surfaces and Bezier surfaces. Furthermore, a functional surface such as B-rep (Boundary Representation) used in CAD (Computer-Aided Design) may be used as a data format in which the contour of the object 2 is formed. In other words, such a functional surface also forms the shape of the object 2 and is therefore an example of a forming surface. In the following, as an example, a case in which polygons 4 are used for the forming surface of the object 2 will be described.
[0055] Adjacent polygons 4 share vertices and edges to represent the shape of the object 2. Therefore, if the user deforms the shape of the object 2 at a desired location while the object 2 is composed of polygons 4, the effect of the deformation will spread to the polygons 4 adjacent to the deformed location, and the shape of the object 2 may be deformed even in locations that were not intended to be deformed.
[0056] Therefore, the processing device 1 may, for example, convert three-dimensional shape data defining the shape of the object 2 using polygons 4 into three-dimensional shape data defined using voxels 6, and deform the shape of the object 2 by processing the three-dimensional shape data composed of the voxels 6.
[0057] FIG. 3 is a diagram showing an example of the three-dimensional shape of the object 2 when the object 2 is composed of voxels 6. As shown in FIG.
[0058] A voxel 6 is an example of a three-dimensional element that constitutes the three-dimensional shape of the object 2, and for example, a cube is used, but other three-dimensional elements such as a rectangular parallelepiped, a triangular pyramid, a sphere, and a cylinder may also be used. In the following, as an example, a case where a cube is used as the voxel 6 will be described.
[0059] The three-dimensional shape of the desired object 2 is expressed by stacking the voxels 6. Each voxel 6 may be set with attributes that represent the properties of the voxel 6, such as color, strength, material, and texture. The presence or absence of a voxel 6 represents the shape of the object 2, and the attributes of the voxel 6 represent attributes of the object 2, such as color and material, at the location where the voxel 6 is placed.
[0060] In addition, "material" includes at least one of the following information: information representing the material genre, such as resin, metal, and rubber; information representing the material name, such as ABS and PLA; information representing the product name and product number of a commercially available material; information representing the material name, abbreviation, number, etc. defined in standards such as ISO and JIS; and information representing the material properties, such as thermal conductivity, electrical conductivity, and magnetism.
[0061] Moreover, the term "texture" refers to physical property information other than color, such as reflectance, transmittance, gloss, and surface properties of the object 2, as well as attributes that represent the feel to the touch.
[0062] The attributes of the object 2 include an attribute pattern that is set using at least one of information such as a period, a mathematical formula, and other three-dimensional shape data. The attribute pattern includes at least one of the following: repetition of a certain period, gradation, expression by a slope or a pole represented by a mathematical formula, continuous change of the color, material, texture, etc. of the three-dimensional shape data according to other three-dimensional shape data, filling a specified range of the three-dimensional shape data with a specified shape, and continuous change.
[0063] As described above, the three-dimensional shape of object 2 is represented by a collection of voxels 6 in three-dimensional space, and more specifically, by, for example, the coordinates of the three-dimensional coordinate system that defines the three-dimensional space and element values corresponding to each coordinate.
[0064] If coordinates in three-dimensional space are represented as (X, Y, Z), then if a voxel 6 exists at coordinates (X, Y, Z), then, for example, the element value at coordinates (X, Y, Z) is set to 1 or more. On the other hand, if a voxel 6 does not exist at coordinates (X, Y, Z), then, for example, the element value at coordinates (X, Y, Z) is set to 0. In other words, the three-dimensional shape data that defines the three-dimensional shape of object 2 using voxels 6 includes element values of coordinates (X, Y, Z) that indicate the presence or absence of voxel 6, and attributes associated with voxel 6.
[0065] Note that a position in three-dimensional space does not necessarily have to be expressed by coordinates (X, Y, Z) in the three-dimensional space, but may be expressed, for example, by the index number of each divided section that is virtually generated in the three-dimensional space by dividing the three-dimensional space, i.e., the index number of the three-dimensional area.
[0066] For example, if the three-dimensional space including the object 2 is divided into 100 sections along the X-axis, Y-axis, and Z-axis directions, index numbers from "0" to "99" are assigned to the three-dimensional regions along the X-axis, Y-axis, and Z-axis directions, respectively. The combinations of index numbers along the X-axis, Y-axis, and Z-axis directions are expressed as [I X , I Y , I Z ], then 1,000,000 three-dimensional regions in a three-dimensional space divided into 100x100x100 are expressed as index numbers [0, 0, 0] to [99, 99, 99]. In this case, for example, index numbers [I X , I Y , I Z If the value associated with [Index number] is 1 or greater, it indicates that voxel 6 is present at the position represented by the index number, and if the value is 0, it indicates that voxel 6 is not present at the position represented by the index number.
[0067] The coordinate system of the three-dimensional space is not limited to three-dimensional Cartesian coordinates, and may be expressed, for example, as polar coordinates using a distance r from the origin and an angle θ. In this case, just as the three-dimensional space can be expressed by index numbers 1, 2, 3... for each pitch of the coordinates (X, Y, Z), an index number can be associated with each pitch of the distance r and angle θ, and a value of 1 or greater can be specified at the position represented by the index number to indicate the presence of voxel 6.
[0068] If a voxel 6 of a different shape is associated with each value of 1 or more, the voxel 6 of the shape corresponding to the set value will be placed at a specified position in the three-dimensional space.
[0069] When representing microscopic shapes such as unevenness and narrow surfaces contained in object 2 using voxels 6, using as small a voxel 6 as possible allows the three-dimensional shape of object 2 to be represented in detail. For example, if the microscopic shape contained in object 2 is 0.5 mm, the three-dimensional shape of object 2 can be represented in detail by representing the microscopic shape using a cubic voxel 6 of 0.2 mm square, which is smaller than the microscopic shape of object 2, rather than using a cubic voxel 6 of 1 mm square.
[0070] FIG. 4 is a diagram showing an example of a cross section when the three-dimensional shape of the object 2 shown in FIG. 2, which has a microscopic shape of 0.5 mm, is cut at a cutting plane 3 relative to the three-dimensional shape of FIG. 3, which is represented using cubic voxels 6 of 0.2 mm square.
[0071] Since the three-dimensional shape of object 2 is represented using voxels 6 having sides shorter than the fine shape, the three-dimensional shape of object 2 shown in Figure 4 is close to the original three-dimensional shape of object 2, including the fine shape.
[0072] However, if all of the object 2 is represented by voxels 6 of the same size, the interior of the object 2 shown in Fig. 4, for example, will be represented by cubic voxels 6 of 0.2 mm square. On the other hand, since the interior of the object 2 shown in Fig. 4 has a larger volume than the fine shape portion, there is no problem in representing the three-dimensional shape of the object 2 even if the interior of the object 2 is composed of cubic voxels 6 of, for example, 1 cm square.
[0073] In this way, when the three-dimensional shape of the object 2 is represented by voxels 6, if all parts of the object 2 are composed of voxels 6 of the same predetermined size, there may be parts composed of voxels 6 that are smaller than necessary for representing the three-dimensional shape of the object 2. If the number of voxels 6 increases more than necessary in this way, problems such as a longer processing time for processing related to the three-dimensional shape of the object 2, an increase in the data size of the voxels 6 representing the three-dimensional shape of the object 2, and a shortage of storage capacity required to handle the three-dimensional shape of the object 2 are likely to occur.
[0074] Therefore, the three-dimensional shape data processing device 1 according to this embodiment sets the size of the voxels 6 to be arranged in accordance with the characteristics of each location in the three-dimensional shape of the object 2, which is necessary for processing the three-dimensional shape of the object 2.
[0075] FIG. 5 is a flowchart showing an example of a three-dimensional space division process executed by the CPU 11 of the processing device 1 when converting three-dimensional shape data in which the shape of an object 2 is defined using polygons 4 into three-dimensional shape data defined using voxels 6.
[0076] 5 is stored in advance in, for example, the ROM 12 of the processing device 1. The CPU 11 of the processing device 1 reads the processing program stored in the ROM 12 and executes the division processing of the three-dimensional space.
[0077] Before executing the division process of the three-dimensional space, the CPU 11 analyzes the three-dimensional shape of the object 2 to be divided in advance, and identifies a portion (called an "uneven portion") in the three-dimensional shape of the object 2 where the degree of change in shape is greater than other portions, such as a portion where the curvature of the contour is greatest. Then, the CPU 11 sets the size of the three-dimensional region in which the voxels 6 are arranged so that the three-dimensional shape of the uneven portion can be expressed, that is, the final size of the three-dimensional region, and stores it in the non-volatile memory 14, for example.
[0078] CPU 11 may set the final reach size of the three-dimensional region by calculation using the dimensions of the three-dimensional shape, for example, by setting one side of the final reach size of the three-dimensional region to half the minimum dimension of the three-dimensional shape expressed in the uneven portion. For example, in the case of the three-dimensional shape of object 2 shown in Fig. 4, in which the minimum fine shape is 0.5 mm, the final reach size of the three-dimensional region may be set to a size of 0.2 mm square, which is smaller than the fine shape, and voxels 6 of the same size as the final reach size of the three-dimensional region may be arranged in the three-dimensional region.
[0079] The final reach size of the three-dimensional area is not limited to being set by calculation of the CPU 11, and a value designated by the user may be used as the final reach size of the three-dimensional area.
[0080] It is possible to select whether or not to set the final arrival size of the three-dimensional area in advance, and the CPU 11 does not necessarily have to set the final arrival size of the three-dimensional area.
[0081] In step S10, the CPU 11 divides the three-dimensional space in which the object 2, whose outline is formed by polygons 4, is placed at predetermined intervals along each of the X-axis, Y-axis, and Z-axis directions, for example, to generate a plurality of three-dimensional regions in the three-dimensional space.
[0082] FIG. 6 is a diagram showing an example in which the three-dimensional shape of the object 2 shown in FIG. 2 arranged in a three-dimensional space is divided at predetermined intervals along each of the X-axis, Y-axis, and Z-axis directions. For convenience of explanation, FIG. 6 shows the divided state of the object 2 two-dimensionally when viewed from a direction perpendicular to the XZ plane. Note that in reality, the object 2 has depth in the Y-axis direction, and the object 2 is also divided in the Y-axis direction by planes along the XZ plane. Hereinafter, each divided three-dimensional region will be referred to as "region 8."
[0083] The specified division interval along each axis direction used when initially dividing the three-dimensional space is referred to as the "initial division size." For example, when the final reach size of region 8 is set, CPU 11 may set the initial division size by calculating backwards from the final reach size of region 8. For example, CPU 11 may set the initial division size to N times (N is a real number greater than 1) the length of one side of the final reach size of region 8.
[0084] In step S10, the CPU 11 divides the three-dimensional space in which the object 2 is placed into a plurality of regions 8 using the initial division size.
[0085] As will be described later, the CPU 11 divides the three-dimensional space hierarchically. Therefore, the CPU 11 sets in advance the division size in each hierarchy including the initial division size before starting division of the object 2, taking into consideration the final size of the region 8, the number of hierarchies into which the three-dimensional space is divided, and the division number of the region 8, which is the number of divisions along each axis direction of the region 8 when the region 8 divided in each hierarchy is further divided.
[0086] For example, if the final size of each side of region 8 is 0.2 mm, and the size of the three-dimensional space to be divided is 1000 mm along each of the X-axis, Y-axis, and Z-axis directions, and the number of levels for dividing the three-dimensional space is four, CPU 11 sets, for example, the first division size to 100 mm, the second division size to 20 mm, and the third division size to 2 mm. Then, in the first level, CPU 11 divides the three-dimensional space including object 2 into regions 8 represented by cubes with sides of 100 mm according to the first division size, and in the second level, divides region 8 represented by the cube with sides of 100 mm into regions 8 represented by cubes with sides of 20 mm according to the second division size. Furthermore, in the third hierarchy, CPU 11 divides area 8 represented by a cube with sides of 20 mm into area 8 represented by a cube with sides of 2 mm according to the third division size, and in the fourth hierarchy, CPU 11 divides area 8 represented by a cube with sides of 2 mm into area 8 represented by a cube with sides of 0.2 mm according to the final reached size of area 8.
[0087] Also, even if the final reach size of each side of the region 8 is the same 0.2 mm, if the number of division hierarchies is 5, the CPU 11 sets the first division size to 200 mm, the second division size to 50 mm, the third division size to 10 mm, and the fourth division size to 1 mm. Then, in the first hierarchy, the CPU 11 divides the three-dimensional space including the object 2 into regions 8 represented by cubes with sides of 200 mm according to the first division size, and in the second hierarchy, the CPU 11 divides the region 8 represented by the cubes with sides of 200 mm into regions 8 represented by cubes with sides of 50 mm according to the second division size. Furthermore, in the third hierarchy, the CPU 11 divides the region 8 represented by the cubes with sides of 50 mm into regions 8 represented by cubes with sides of 10 mm according to the third division size, and in the fourth hierarchy, the CPU 11 divides the region 8 represented by the cubes with sides of 10 mm into regions 8 represented by cubes with sides of 1 mm according to the fourth division size. Finally, CPU 11 divides area 8 represented by a cube with sides of 1 mm into area 8 represented by a cube with sides of 0.2 mm according to the final achieved size of area 8.
[0088] In order to obtain areas 8 of the same size in each hierarchy, it is preferable that the CPU 11 sets the size of the three-dimensional space to be divided before division to a size that is divisible by the division size corresponding to each hierarchy.
[0089] It should be noted that CPU 11 does not necessarily need to set in advance the number of hierarchical levels into which the three-dimensional space is divided and the division size of each hierarchical level before starting to divide the three-dimensional space, and may set the number of hierarchical levels and the division size of each hierarchical level for each division of area 8.
[0090] For example, if the size of the three-dimensional space to be divided is 1000 mm along each of the X-axis, Y-axis, and Z-axis directions, the initial division size is set to 1000 mm reduced by a predetermined ratio (for example, 1 / 10) (100 mm if the ratio is 1 / 10). The CPU 11 divides the region 8 at a predetermined ratio for each division of the region 8, and when the size of the divided region 8 becomes smaller than the minimum dimension of the three-dimensional shape expressed in the uneven parts of the object 2, it may end the division assuming that the size of the divided region 8 has reached a size that can express the uneven parts of the object 2. In this case, the size of the region 8 at the time when the division is ended is the final reached size.
[0091] Here, as an example, an example in which the three-dimensional space is divided so that the shape of the region 8 is a cube has been described, but the shape of the region 8 is not limited to a cube. The shape of the region 8 may be other shapes such as a rectangular parallelepiped, a triangular pyramid, a sphere, and a cylinder, as with the voxel 6. If the intervals at which the three-dimensional space is divided along each of the X-axis, Y-axis, and Z-axis directions are set to be different for each axis, the three-dimensional space is divided into rectangular parallelepiped regions 8, for example, 1 mm wide x 2 mm deep x 0.5 mm high. In addition, the CPU 11 may set the number of divisions of the region 8 along each of the X-axis, Y-axis, and Z-axis directions to different numbers of divisions, for example, 5 divisions along the X-axis direction, 4 divisions along the Y-axis direction, and 2 divisions along the Z-axis direction. In addition, the CPU 11 may divide the region 8 into regions of different shapes for each division of each layer.
[0092] In addition, when the CPU 11 divides the three-dimensional space into regions 8 that differ in at least one of the width, depth, and height, it is preferable that the size of the three-dimensional space to be divided is set in advance to a size that is divisible by the division size corresponding to each hierarchical level.
[0093] In step S20, the CPU 11 identifies, for each divided area 8, polygons 4 that interfere with the area 8.
[0094] The state in which region 8 interferes with polygon 4 refers to a state in which polygon 4, which represents the surface of object 2, i.e., the outline, is in contact with or is included within a predetermined range (called the "interference range") that is set for region 8. For example, when region 8 itself is set as the interference range, the state in which at least a part of polygon 4 is in contact with or included within region 8 is said to be that polygon 4 interferes with region 8.
[0095] A method using index numbers is used to associate the regions 8 with the polygons 4 that interfere with the regions 8. For example, assume that the three-dimensional shape of the object 2 is composed of 5,000 polygons 4. Also assume that the three-dimensional space including the object 2 is divided into 100 along each of the X-axis, Y-axis, and Z-axis directions in the first division, i.e., the first-level division, and the three-dimensional space is divided into 1,000,000 regions 8.
[0096] In this case, the CPU 11 associates index numbers P1 to P5000 with each polygon 4, and associates index numbers [0, 0, 0] to [99, 99, 99] with each region 8. The CPU 11 identifies all polygons 4 that interfere with each region 8, and stores in the RAM 13 the index number of the region 8 and the index numbers of all polygons 4 that interfere with the region 8 in association with each other.
[0097] When the contour of the object 2 is represented by a function surface rather than by polygons 4, it may be difficult to determine the range of the function surface that interferes with the region 8. Therefore, the CPU 11 may divide the function surface into a plurality of partial surfaces (also called "patches") and identify the function surface that interferes with the region 8 on a patch-by-patch basis.
[0098] Next, a method for identifying the polygon 4 interfering with the region 8 will be specifically described.
[0099] FIG. 7 is a diagram showing an example in which one of the polygons 4 constituting the contour of the object 2 is selected, and a plurality of regions 8 in a specific range around the selected polygon 4 are extracted from a three-dimensional space so as to include the selected polygon 4. For convenience of explanation, FIG. 7 shows the arrangement of the selected polygon 4 and the plurality of regions 8 in a two-dimensional manner when viewed from a direction perpendicular to the XZ plane. In addition, in FIG. 7, in order to specify a specific region 8 from among the plurality of regions 8, position numbers 1 to 5 are assigned to the plurality of regions 8 along the X-axis direction, and position numbers α to δ are assigned along the Z-axis direction. Hereinafter, using these position numbers, for example, the region 8 located at the upper left corner at the intersection of the row of position number α and the column of position number 1 is specified as the "region 8 of position number α1".
[0100] First, the CPU 11 specifies any one of the regions 8 interfering with the selected polygon 4 as a target region 8A. Specifically, any one of the three-dimensional vertices P constituting the polygon 4 is selected, and the region 8 containing the three-dimensional vertex P is specified. The quotient, excluding the remainder, obtained by dividing the coordinates Px, Py, Pz of the three-dimensional vertex P by the size Dx, Dy, Dz of the region 8 can be specified as the index of the target region 8A containing the three-dimensional vertex P. Dx represents the width of the region 8, Dy represents the depth of the region 8, and Dz represents the height of the region 8.
[0101] For example, as shown in FIG. 8, the CPU 11 sets the center of the region 8, which is located equidistant from each vertex of the region 8, as a reference point Q, and determines whether the selected polygon 4 interferes with the region 8 based on whether the selected polygon 4 is in contact with or contained within a sphere 9 (see FIG. 9) that has the reference point Q as its center and a radius equal to the distance th (called the "threshold th") from the reference point Q to the vertex of the region 8.
[0102] The CPU 11 does not necessarily need to set the reference point Q at the center of the region 8, and may set any position, including inside or outside the region 8, as the reference point Q of the region 8. In this case, whether or not the selected polygon 4 interferes with the region 8 may be determined based on whether the selected polygon 4 is in contact with or included in a sphere 9 having the reference point Q as its center and a radius of a predetermined distance from the reference point Q. Furthermore, the reference point Q is not limited to one location for one region 8, and multiple reference points Q may be set. For example, each vertex of the region 8 may be set as the reference point Q, and the CPU 11 may determine that the selected polygon 4 interferes with the region 8 when the selected polygon 4 is in contact with or included in any one of the spheres 9 having a radius of a threshold value th centered on each reference point Q.
[0103] 9, the interference range is set to a range wider than the region 8. In contrast, the CPU 11 may set the region 8 itself as the interference range, perform a known collision determination to determine whether the selected polygon 4 will collide with the region 8, and determine that the selected polygon 4 will interfere with the region 8 if the selected polygon 4 collides with the region 8.
[0104] If the center of the region 8 is taken as the reference point Q, the threshold value th is expressed by the formula (1). Note that "√" indicates the square root, and "*" indicates multiplication.
[0105] <Number 1> th=√(Dx 2 +Dy 2 +Dz 2 ))*0.5 ···(1)
[0106] That is, when region 8 is a rectangular parallelepiped, CPU 11 sets the range of a circumscribing sphere for the rectangular parallelepiped as the interference range. Even if the shape of region 8 is not limited to a cube or a rectangular parallelepiped and is any shape, CPU 11 may associate a virtual cube with region 8 and set the range of a circumscribing sphere for the virtual cube as the interference range of region 8. Naturally, CPU 11 may set the range of region 8 itself as the interference range, regardless of the shape of region 8.
[0107] The method of identifying the polygon 4 interfering with the region 8 is not limited to the above method. For example, the CPU 11 may take the inner product of a vector from the reference point Q to the closest polygon 4 and a vector to each vertex forming the region 8, and identify the polygon 4 interfering with the region 8 based on whether the signs match. Also, a point cloud may be generated on the polygon 4, and the region 8 containing the points may be identified as the region 8 interfering with the polygon 4.
[0108] 7, the CPU 11 sets the region 8 with position number β2 indicated by a double frame as the target region 8A among the multiple regions 8 interfering with the selected polygon 4. The target region 8A is an example of the reference three-dimensional region.
[0109] The CPU 11 sets all the regions 8 that are located so as to surround the target region 8A and are adjacent to the target region 8A as adjacent regions 8B. In the example shown in FIG. 7, the shaded region 8 shaded with diagonal lines is included in the adjacent region 8B. Note that since the actual regions 8 are arranged three-dimensionally, nine regions 8 adjacent to the front and rear of the target region 8A and the shaded region 8 along the Y axis, i.e., a total of 18 regions 8, are also set as adjacent regions 8B. Therefore, in the example shown in FIG. 7, 26 adjacent regions 8B are set for one target region 8A. The adjacent regions 8B are an example of an adjacent three-dimensional region.
[0110] The CPU 11 determines whether or not the selected polygon 4 interferes with each of the adjacent regions 8B.
[0111] Fig. 10 is a diagram showing an example of the result of identifying whether or not each of the adjacent regions 8B shown in Fig. 7 interferes with the selected polygon 4. In Fig. 10, "○" indicates that there is interference with the selected polygon 4, and "×" indicates that there is no interference with the selected polygon 4. Since it is clear that the target region 8A interferes with the selected polygon 4, "○" is also written on the target region 8A.
[0112] The CPU 11 associates the selected polygon 4 with the region 8 in which the selected polygon 4 interferes. Specifically, the CPU 11 associates the index number of the selected polygon 4 with the index number of the target region 8A and stores them in the RAM 13.
[0113] For the target area 8A and the adjacent area 8B whose interference state with the selected polygon 4 has been identified at least once, the interference state with the selected polygon 4 has already been determined, so the target area 8A and the adjacent area 8B are associated with end information indicating that the interference state with the selected polygon 4 has already been determined.
[0114] Fig. 11 is a diagram showing an example of a state in which completion information is associated with the target area 8A and the adjacent area 8B in response to the identification result shown in Fig. 10. In Fig. 11, the word "Done" is written in the area 8 associated with the completion information.
[0115] The CPU 11 sets, as a new target region 8A, the adjacent region 8B that interferes with the selected polygon 4, among the adjacent regions 8B for the target region 8A with position number β2. In the example of Fig. 11, the adjacent region 8B with position number β3 and the adjacent region 8B with position number γ3 are set as the new target region 8A.
[0116] The CPU 11 sets an adjacent region 8B for each of the new target regions 8A, and determines whether or not the selected polygon 4 interferes with each of the remaining adjacent regions 8B, excluding the adjacent region 8B associated with the end information, among the set adjacent regions 8B.
[0117] As shown in FIG. 11, when there are multiple new target areas 8A, the CPU 11 sets an adjacent area 8B for any one of the new target areas 8A, determines whether or not the selected polygon 4 interferes, and then performs the same processing sequentially for the other new target areas 8A.
[0118] As shown in the example of Figure 11, the CPU 11 determines that the selected polygon 4 interferes with the adjacent regions 8B at position numbers γ4 and δ4 of the target region 8A at position number β3 and the adjacent regions 8B at position numbers γ3.
[0119] The CPU 11 repeatedly executes a process of identifying adjacent regions 8B that interfere with the selected polygon 4 among the adjacent regions 8B of the new target region 8A and setting the adjacent regions 8B that interfere with the selected polygon 4 as the new target region 8A until there are no adjacent regions 8B that interfere with the selected polygon 4. "There are no adjacent regions 8B that interfere with the selected polygon 4" refers to a state in which end information is associated with all adjacent regions 8B, or the selected polygon 4 does not interfere with any of the remaining adjacent regions 8B excluding the adjacent regions 8B that are associated with end information.
[0120] Next, as shown in Fig. 12, when the adjacent region 8B with position number γ4 and the adjacent region 8B with position number δ4 are set as new target regions 8A, the regions 8 with position numbers β5, γ5, and δ5 are set as adjacent regions 8B by each of these new target regions 8A. If the adjacent region 8B with position number δ5 is identified as interfering with the selected polygon 4 among the set adjacent regions 8B, then the adjacent region 8B with position number δ5 is set as the new target region 8A. However, since there is no adjacent region 8B interfering with the selected polygon 4 in the new target region 8A, identification of the region 8 interfering with the selected polygon 4 is terminated.
[0121] From the above, it is determined that the selected polygon 4 interferes with position numbers β2, β3, γ3, γ4, δ4, and δ5.
[0122] Therefore, the CPU 11 sequentially selects the polygons 4 constituting the contour of the object 2 until all polygons 4 constituting the contour of the object 2 have been selected, and identifies all regions 8 that interfere with each polygon 4 using the method described above. As a result, the index numbers of all interfering polygons 4 are associated with the index numbers of the regions 8 for each region 8, and the interfering polygons 4 are identified for each region 8. The number of polygons 4 that interfere with a region 8 may be 0 or 1, or it may be multiple.
[0123] After identifying the interfering polygons 4 for each region 8, in step S30 of the three-dimensional space division process shown in Figure 5, the CPU 11 performs a subdivision process to further divide each of the regions 8 until the size of the region 8 reaches a size required to reproduce the characteristics of the portion of the three-dimensional shape of the object 2 represented by the interfering polygons 4.
[0124] FIG. 13 is a flowchart showing an example of the process of re-division in step S30 of FIG.
[0125] Since polygons 4 interfering with each region 8 are identified for each region 8, an example will be described here in which the CPU 11 executes the re-division process shown in Fig. 13 in parallel for each region 8. That is, the CPU 11 executes the re-division process in parallel for each divided region 8 by inputting each region 8 divided by the initial division size one by one to each of the re-division processes executed by processes prepared in the same number as the number of divided regions 8.
[0126] In addition, whether or not the re-division process is executed in parallel in each process is selected by the user's setting, and when the re-division process is not executed in parallel, for example, the re-division process is executed in one process. Specifically, the CPU 11 selects an area 8, and executes the re-division process sequentially for the selected area 8 until all areas 8 have been selected.
[0127] In step S100, the CPU 11 determines whether or not it is necessary to re-divide the input region 8. The determination as to whether or not it is necessary to re-divide the region 8 is made based on information about the shape of the object 2, such as which part of the three-dimensional shape of the object 2 the region 8 is intended to reproduce.
[0128] If there is no polygon 4 interfering with the region 8, the region 8 is considered to be a region 8 arranged outside or inside the object 2, not a region 8 arranged at a location that represents the contour of the object 2. In other words, even if the size of the region 8 is reduced by redividing the region 8, it is unlikely to lead to the three-dimensional shape of the object 2 being represented in greater detail than at the current time. Therefore, the CPU 11 considers that the size of the region 8 has reached a size required to reproduce the location of the three-dimensional shape of the object 2 corresponding to the region 8, determines that redivision of the region 8 is unnecessary, and proceeds to step S110. In other words, the redivision of the region 8 is stopped.
[0129] Furthermore, even if there is a polygon 4 interfering with region 8, if the three-dimensional shape of object 2 represented by polygon 4 interfering with region 8 can be defined using region 8 of its current size, CPU 11 determines that re-division of region 8 is not necessary and proceeds to step S110.
[0130] On the other hand, if there is a polygon 4 that interferes with region 8, and the three-dimensional shape of object 2 represented by the polygon 4 that interferes with region 8 cannot be defined using region 8 of its current size, CPU 11 determines that region 8 needs to be re-divided and proceeds to step S120.
[0131] An example of a method for determining whether or not the three-dimensional shape of the object 2 represented by the polygon 4 interfering with the area 8 can be defined in the area 8 of the current size will be specifically described.
[0132] When the polygon 4 interfering with the region 8 represents a plane in the three-dimensional shape of the object 2, the part of the three-dimensional shape of the object 2 represented by the polygon 4 can be defined by the current size of the region 8. Therefore, in such a case, the CPU 11 determines that the size of the region 8 has reached a size required to reproduce the part of the three-dimensional shape of the object 2 represented by the interfering polygon 4, and determines that further division of the region 8 is unnecessary. In other words, the further division of the region 8 is stopped.
[0133] Whether or not the polygon 4 interfering with the region 8 represents a plane in the three-dimensional shape of the object 2 is determined by the variance σ 2 The variance of the unit normal vector of polygon 4 interfering with region 8 is σ 2 If is 0, it means that even if there are multiple polygons 4 interfering with the region 8, each polygon 4 represents the same plane in the three-dimensional shape of the object 2. Note that the position information of the polygon 4 and the variance σ of the unit normal vector of the polygon 4 2 Considering that an error is included in the process of calculating, the CPU 11 calculates the variance σ 2 is a predetermined threshold value σ th If the threshold value σ th is the variance σ that polygon 4 can be considered to constitute the same plane. 2 should be set to the maximum value.
[0134] Additionally, the CPU 11 may determine that it is not necessary to re-divide the region 8 when the variation in the shape of the polygon 4 interfering with the region 8 is equal to or smaller than a threshold value. Note that the determination as to the necessity of re-dividing the region 8 may be made based on information on the attributes of the object 2, rather than on information on the shape of the object 2.
[0135] For example, when the variation in attribute value for each attribute within the range of the three-dimensional shape of object 2 represented by polygon 4 interfering with region 8 falls within a predetermined allowable range, CPU 11 determines that the size of region 8 has reached a size required to reproduce the attribute at the location of the three-dimensional shape of object 2 represented by interfering polygon 4, and determines that re-division of region 8 is unnecessary. In this case, the process proceeds to step S110, and the re-division of region 8 is stopped.
[0136] Here, an example focusing on the color of object 2 as an attribute of object 2 will be described. When there is a variation in color that exceeds an allowable range in the range of the three-dimensional shape of object 2 represented by polygon 4 interfering with region 8, it is not possible to define the color of object 2 in region 8 of the current size, since only one attribute value can be associated with one region 8 for each attribute. In order to represent the color variation that exceeds the allowable range, it is necessary to represent the color of the corresponding range in a region 8 smaller than the current size. Therefore, CPU 11 determines that re-division of region 8 is necessary, and proceeds to step S120.
[0137] On the other hand, if there is no variation beyond the allowable range in the colors within the range of the three-dimensional shape of object 2 represented by polygon 4 interfering with region 8, the colors within that range can be represented by region 8 of the current size. Therefore, CPU 11 determines that it is not necessary to re-divide region 8, and proceeds to step S110.
[0138] In this way, the CPU 11 may determine the necessity of re-division of the region 8 based on whether or not there is a variation in attribute value exceeding an allowable range in any attribute of the object 2 in the range of the three-dimensional shape of the object 2 represented by the polygon 4 interfering with the region 8. Naturally, when determining whether or not re-division of the region 8 is necessary using information on the attribute of the object 2, any type of attribute may be used as long as it is associated with the object 2 as an attribute of the object 2, such as not only the color of the object 2 but also the material of the object 2 or the area of the polygon 4 in the range interfering with the region 8. That is, the CPU 11 determines the necessity of re-division of the region 8 based on the variation in the characteristics of the region 8 and the polygon 4 interfering with the region 8. The difference between whether the polygon 4 interfering with the region 8 represents a plane or a curved surface in the three-dimensional shape of the object 2 shows an example of the variation in characteristics in the range of the polygon 4 interfering with the region 8.
[0139] Furthermore, the CPU 11 may determine the necessity of re-division of the region 8 by combining information on the shape of the object 2 and information on the attributes of the object 2. That is, the CPU 11 stops re-division of the region 8 when the size of the region 8 reaches a size required to reproduce the characteristics of the part of the three-dimensional shape of the object 2 represented by the interfering polygon 4, and proceeds to step S110. Otherwise, the CPU 11 proceeds to step S120.
[0140] In step S110, the CPU 11 determines whether or not the voxel 6 exists in the region 8. Determining whether or not the voxel 6 exists in the region 8 means determining whether or not the voxel 6 is to be placed in the region 8.
[0141] The CPU 11 determines whether or not to place a voxel 6 in the region 8, depending on the positional relationship between the region 8 and the polygon 4.
[0142] For example, when one or more polygons 4 intervene in region 8, CPU 11 may consider region 8 to correspond to a portion expressing the contour of object 2, and place voxel 6 in region 8. Placing voxel 6 in region 8 means placing voxel 6 in region 8 that is the same size and shape as region 8 after division.
[0143] If there is no polygon 4 interfering with region 8, region 8 corresponds to a portion that represents either the outside of object 2 away from the contour of object 2 so as not to interfere with the contour of object 2, or the inside of region 8 away from the contour of object 2 so as not to interfere with the contour of object 2. If region 8 corresponds to a portion that represents the outside of object 2, there is no need to place voxel 6 in region 8, but if region 8 corresponds to a portion that represents the inside of the object, it is better to place voxel 6 in region 8.
[0144] Therefore, when there is no polygon 4 interfering with region 8, after CPU 11 has completed determining the presence or absence of voxels 6 for all regions 8, it may determine the presence or absence of voxels 6 in region 8 based on the result of determining the presence or absence of voxels 6 in region 8B adjacent to region 8.
[0145] Specifically, the adjacent region 8B located on the opposite side of the normal vector of the polygon 4 is inside the three-dimensional shape whose outline is defined by the polygon 4, and all the regions 8 adjacent to the adjacent region 8B are determined to be inside until they are adjacent to the region 8 determined to have voxels next (Region Growing). Conversely, among the three-dimensional regions located at the edge of the three-dimensional space including the three-dimensional shape, the region 8 that does not interfere with any polygon 4 can be determined to be clearly outside the three-dimensional shape. The adjacent region 8B of this region 8 is determined to be outside until it is adjacent to the region 8 determined to have voxels next. Both of these processes may be performed, or after the inside determination process is completed, all the remaining regions 8 may be considered to be outside. The presence or absence of a polygon 4 interfering with the region 8 shows an example of the variation in characteristics within the range of the polygon 4 interfering with the region 8.
[0146] 5, the CPU 11 may calculate a signed distance field (SDF) from a reference point Q set in the region 8 to the nearest polygon 4 in order to specify whether or not the polygon 4 interferes with the region 8, and may determine the presence or absence of a voxel 6 in the region 8 according to the sign of the SDF. As described above, there is no restriction on the position of the reference point Q, and the reference point Q may be set, for example, to the center of the region 8 or a vertex of the region 8. When there are multiple reference points Q, for example, any one of the reference points Q may be selected as the reference point Q for calculating the SDF of the region 8, or a position obtained by averaging the positions of the reference points Q may be used as a new reference point Q for calculating the SDF of the region 8.
[0147] The sign of the SDF is set to positive when the reference point Q is inside the object 2, and set to negative when it is outside the object 2. The absolute value of the SDF (also called the "distance value") represents the distance from the reference point Q to the nearest polygon 4. That is, if the SDF of area 8 is 0 or more, the area 8 corresponds to a location inside the object 2, and if the SDF of area 8 is less than 0, the area 8 corresponds to a location outside the object 2. Note that the CPU 11 may define the meaning of the signs inversely, and may also manage information such as the distance value and the outside and inside of the object 2 separately.
[0148] If the SDF of the region 8 is equal to or greater than 0, the region 8 corresponds to a location inside the object 2, and the CPU 11 determines that the voxel 6 needs to be placed in the region 8.
[0149] The CPU 11 places the voxels 6 in each of the regions 8 determined to require the voxels 6, and configures the three-dimensional shape of the object 2. Then, the CPU 11 associates, with the placed voxels 6, at least one attribute and attribute value of the attribute of the polygon 4 interfering with the region 8 in which the voxels 6 are placed, and an attribute associated with the region 8 in which the voxels 6 are placed.
[0150] The types of attributes associated with the voxel 6 include, for example, the SDF, the material of the polygon 4 interfering with the region 8, the results of a structural analysis of the object 2 in the region 8, and the results of an analysis showing how heat is conducted in the object 2. The attribute value associated with the voxel 6 may be an average or representative value of the attribute values in the region 8 in which the voxel 6 is located.
[0151] As an example, here, voxel 6 is placed in each region 8 determined to require voxel 6, but CPU 11 does not necessarily need to place voxel 6 in a region determined to require placement of voxel 6. For example, instead of placing voxel 6 in region 8, CPU 11 may associate at least one attribute and attribute value of an attribute of polygon 4 interfering with region 8 in which voxel 6 is placed and an attribute associated with region 8 in which voxel 6 is placed.
[0152] Furthermore, the CPU 11 may also associate, with each region 8 for which it has been determined that the voxel 6 is unnecessary, that is, each region 8 meaning the outside of the three-dimensional shape, at least one attribute and attribute value of the attribute of the polygon 4 interfering with the region 8 and the attribute associated with the region 8. The attributes associated with the region 8 for which it has been determined that the voxel 6 is unnecessary include, for example, the temperature distribution in the three-dimensional space and the results of a fluid analysis of the air flowing around the object 2 obtained by a wind tunnel experiment.
[0153] Next, the cell block process of step S120 to which processing advances when it is determined in the determination process of step S100 in FIG. 13 that re-division of the region 8 is required will be described.
[0154] FIG. 14 is a flow chart showing an example of the flow of the cell block process in step S120 of FIG.
[0155] In the following explanation, since the region 8 before division and the divided region 8 are mixed, for convenience of explanation, the region 8 before division will be referred to as "region 8", and each region 8 obtained by dividing the region 8 before division will be referred to as "cell 8". Also, a set of divided regions 8 will be referred to as a cell block.
[0156] The size of the region 8 that has been the subject of cell block processing is not large enough to reproduce the characteristics of the portion of the three-dimensional shape of the object 2 represented by the polygon 4 that interferes with the region 8. Therefore, in step S200, the CPU 11 divides the region 8 into a plurality of cells 8 by a predetermined second division size. Step S200 is an example of processing related to division of the region 8.
[0157] In step S210, the CPU 11 selects one of the cells 8 divided in step S200. For ease of explanation, the cell 8 selected in step S210 will be referred to as the "selected cell 8."
[0158] In step S220, the CPU 11 determines whether or not the size of the selected cell 8 has reached a predetermined final arrival size. Note that the size of the cell 8 reaching the final arrival size means that the size of the cell 8 is equal to or smaller than the final arrival size.
[0159] When the size of the selected cell 8 has reached the final size, the characteristics of the part of the three-dimensional shape of the object 2 represented by the selected cell 8 can be reproduced with the size of the selected cell 8 at the current time. Therefore, the CPU 11 proceeds to step S250 without performing the process of step S230 for identifying the polygon 4 interfering with the selected cell 8 or the process of step S240 for determining whether or not redivision of the selected cell 8 is necessary for the selected cell 8 that has reached the final size. If redivision of the selected cell 8 is not necessary, the information of the polygon 4 interfering with the selected cell 8, which is information used for determining whether or not to redivision, becomes unnecessary. Therefore, before proceeding to step S250, the CPU 11 may erase information associating the index number of the selected cell 8 with the index numbers of all the polygons 4 interfering with the selected cell 8 from the RAM 13 to increase the free space of the RAM 13. Furthermore, before proceeding to step S250, the CPU 11 may release a storage area in the RAM 13 that has been reserved in advance for redivision of the selected cell 8.
[0160] In step S250, the same process as that described in step S110 of Fig. 13 is performed to determine whether or not to place a voxel 6 in the selected cell 8, and if it is determined that placement of the voxel 6 is necessary, the voxel 6 is placed in the selected cell 8. The various forms related to the placement of the voxel 6 described in step S110 are also applied to step S250. Step S250 is an example of a process related to the placement of the voxel 6 in the cell 8.
[0161] On the other hand, if it is determined in the determination process of step S220 that the size of the selected cell 8 has not reached the final reach size, the process proceeds to step S230.
[0162] In step S230, the CPU 11 identifies polygons 4 that interfere with the selected cell 8. Since the selected cell 8 is obtained by dividing the region 8, the polygons 4 that interfere with the selected cell 8 are necessarily included in the polygons 4 that interfere with the region 8. Therefore, the CPU 11 needs to identify polygons 4 that interfere with the cell 8 from among the polygons 4 that interfere with the region 8, not from among all the polygons 4 that represent the contour of the object 2, by using the method described in step S20 of FIG.
[0163] Specifically, the CPU 11 simply associates the index number of a polygon 4 that interferes with the region 8 and whose distance from the reference point Q of the selected cell 8 is less than or equal to the threshold th as the polygon 4 that interferes with the selected cell 8 with the index number of the selected cell 8.
[0164] In addition, the interference condition of the polygon 4 may be loosened or tightened compared to the interference condition in the previous hierarchy by changing the value of the threshold th or the range of collision judgment between the polygon 4 and the selected cell 8 for each division hierarchy. In addition, for example, in the previous hierarchy, the polygon 4 interfering with the selected cell 8 may be determined based on the relationship between the distance from the reference point Q of the selected cell 8 to the polygon 4 and the threshold th, and in the next hierarchy, the polygon 4 interfering with the selected cell 8 may be determined based on the collision judgment between the selected cell 8 and the polygon 4. In this way, the polygon 4 interfering with the selected cell 8 may be identified under an interference condition different from the interference condition in the previous hierarchy. In this way, step S230 is an example of a process related to the identification of the polygon 4 interfering with the cell 8.
[0165] In step S240, the CPU 11 determines whether or not further subdivision of the selected cell 8 is required.
[0166] The method described in step S100 of Fig. 13 is used to determine whether or not the selected cell 8 needs to be re-divided. In this case, for example, the variance σ 2 The threshold σ to be compared with th The value of may be changed to make the division conditions that require re-division looser or stricter than those of the previous hierarchy. Also, the tolerance range to be compared with the variation in attribute values for each attribute of polygon 4 or three-dimensional space in the range corresponding to selected cell 8 may be changed for each division hierarchy. Also, the division conditions may be changed for each division hierarchy, or the number of division conditions used to determine re-division may be increased or decreased.
[0167] If it is determined that the redivision of the selected cell 8 is not necessary, the process proceeds to step S250 already described, and the CPU 11 places a voxel 6 in the selected cell 8 in which it has been determined that placement of a voxel 6 is necessary.
[0168] The CPU 11 may change the criteria for determining whether or not to place a voxel 6 in the selected cell 8 for each division layer.
[0169] On the other hand, if it is determined that the selected cell 8 needs to be re-divided, the process proceeds to step S260.
[0170] In step S260, the CPU 11 executes the cell block process shown in Fig. 14. That is, the CPU 11 regards the selected cell 8 as a new region 8, and executes recursive processing to recursively perform the cell block process in order from the process of step S200 in Fig. 14.
[0171] If the division of the three-dimensional space before step S260 is performed is the Mth layer, the cell block process of step S260 performs division of the three-dimensional space to the (M+1)th layer, where "M" is an integer equal to or greater than 1.
[0172] In the recursive processing of the cell block processing, the “first division size” in the above description of step S200 becomes the “Mth division size” and the “second division size” becomes the “(M+1)th division size.” The recursive processing of the cell block processing is performed until it is determined that no further division is required for all selected cells 8.
[0173] When the process of step S250 and the process of step S260 are completed, the process proceeds to step S270.
[0174] In step S270, the CPU 11 judges whether or not all of the cells 8 generated by dividing the region 8 in step S200 have been selected in step S210. If there are any cells 8 that have not yet been selected, the process proceeds to step S210, where the CPU 11 selects one of the cells 8 that have not yet been selected. That is, for each cell 8, either a voxel 6 is placed in the cell 8 according to the determination result of the presence or absence of a voxel 6 without further subdivision, or the cell block process is recursively called until it is determined that further subdivision of the cell 8 is not necessary, and the process of placing a voxel 6 in each cell 8 after the subdivision according to the determination result of the presence or absence of a voxel 6 is completed, and the processes of steps S210 to S260 are repeatedly executed until the process is completed.
[0175] In this case, each time the cell block process is recursively executed, the CPU 11 may display the arrangement result of the voxels 6 arranged in the cells 8 according to the determination result of the presence or absence of the voxels 6 for each cell 8. Each time the cell block process is recursively called, the process in which the three-dimensional shape of the object 2 is constructed from larger voxels 6 to smaller voxels 6 is sequentially displayed on the display unit 18.
[0176] For example, when the final size of region 8 is not set in advance, or when it is known in advance that the number of division levels and the number of divided regions 8 will be greater than a standard, displaying the three-dimensional shape of object 2 made up of voxels 6 in stages for each level will reduce the waiting time experienced by the user until the division process of the three-dimensional space is completed, compared to when the division results are displayed after the division process of the three-dimensional space is completed.
[0177] If it is determined in step S270 that all of the cells 8 generated by dividing the area 8 in step S200 have been selected in step S210, the cell block process shown in FIG. 14 ends.
[0178] It is determined that the selected cell 8 whose size has reached the final size will not be further divided. Therefore, in the cell block process shown in Fig. 14 in the division hierarchy one level before the size of the cell 8 reaches the final size, the CPU 11 determines whether or not the size of the cell 8 will reach the final size in the next division hierarchy, and if the size of the cell 8 will reach the final size, for example, the processes of steps S230 and S240 in Fig. 14 may be omitted and the cell block process of step S260 may be performed to shorten the processing time of the division process of the three-dimensional space.
[0179] 14, cells 8 are selected in sequence to determine whether or not further division of the cell 8 is necessary. However, the process of step S270 may be deleted, and instead of selecting a cell 8 in step S210, the same number of processes as the number of divided cells 8 may be generated. Each process executes the processes of steps S220 to S260. CPU 11 inputs each divided cell 8 to each process, so that the processes of steps S220 to S260 are executed in parallel for each divided cell 8, including the cell block process recursively called in step S260.
[0180] 15 and 16 are diagrams showing an example of the results of executing the division process of the three-dimensional space shown in FIG. 5, in which the three-dimensional shape of object 2 at the same location as object 2 shown in FIG. 4 is represented by voxels 6.
[0181] Figure 15 shows an example of an object 2 in which three levels of division have been performed on the object 2, and the object 2 is composed of voxels 6 of three different sizes: voxel 6A represented by a 3.2 mm square cube corresponding to the first division size, voxel 6B represented by a 0.8 mm square cube corresponding to the second division size, and voxel 6C represented by a 0.2 mm square cube corresponding to the third division size.
[0182] Figure 16 shows an example of an object 2 in which four levels of division have been performed on the object 2, and the object 2 is composed of voxels 6 of four different sizes: a 3.2 voxel 6A corresponding to the first division size, a voxel 6B represented by a 0.8 mm square cube corresponding to the second division size, a voxel 6C represented by a 0.2 mm square cube corresponding to the third division size, and a voxel 6D represented by a 0.05 mm square cube corresponding to the fourth division size.
[0183] For example, by changing at least one of the conditions that affect the size of the region 8, such as the final reached size of the region 8, the number of levels into which the three-dimensional space is divided, the division size of the region 8, the interference condition of the polygon 4 that defines whether or not the polygon 4 interferes with the region 8, and the division condition of the region 8 that defines whether or not redivision of the region 8 is necessary, the size of the voxels 6 that make up the object 2 changes, as shown in Figures 15 and 16. Therefore, by setting the conditions that affect the size of the region 8 according to the characteristics of each location in the three-dimensional shape of the object 2, the size of the region 8 including each location can be set to the size required to reproduce the characteristics of the object 2 at each location.
[0184] 4, when it is determined that the subdivision of the region 8 is unnecessary, the CPU 11 determines whether or not the voxel 6 exists in the region 8. However, the timing of determining whether or not the voxel 6 exists is not limited to after it is determined that the subdivision of the region 8 is unnecessary.
[0185] For example, the region 8 determined to require re-division is more likely to be a region 8 corresponding to a portion expressing the contour of the object 2 than the region 8 determined not to require re-division. Therefore, the CPU 11 may determine that the voxel 6 is to be placed in the region 8 determined to require re-division. The CPU 11 may not immediately determine that the voxel 6 is to be placed in the region 8 determined to require re-division, but may determine whether or not to place the voxel 6 in the region 8 determined to require re-division depending on the number of cells 8 determined to be placed in the region 8 generated by re-division of the region 8, among the cells 8. Specifically, the CPU 11 may determine that the voxel 6 is to be placed in the region 8 from which the cell 8 is divided when the number of cells 8 determined to be placed in the region exceeds a reference value, or when the ratio of the cells 8 determined to be placed in the region 8 to the cells 8 divided from the region 8 exceeds a reference ratio.
[0186] Further, the CPU 11 may determine that all voxels 6 are unnecessary for the region 8 divided up to a predetermined layer, and determine the presence or absence of voxels 6 for the region 8 from the layer next to the predetermined layer.
[0187] In step S100 of FIG. 13 and step 240 of FIG. 14, it is determined whether or not a region 8 needs to be re-divided based only on the state of each individual region 8. However, there are cases in which it is better to determine whether or not a region 8 needs to be re-divided based on the continuity of the division with other regions 8.
[0188] For example, if it is determined that re-division at the second hierarchical level is not necessary in adjacent region 8B to specific region 8, and yet only specific region 8 is re-divided up to the tenth hierarchical level, it is believed that noise affecting the re-division determination is superimposed on specific region 8. Therefore, even if CPU 11 determines that re-division is necessary for specific region 8, if the number of hierarchical levels of division in specific region 8 exceeds the allowable number of hierarchical levels, which is set to be equal to or greater than the maximum number of hierarchical levels among the number of hierarchical levels of adjacent region 8B, CPU 11 may impose a restriction such as limiting the number of hierarchical levels of division in specific region 8 to the allowable number of hierarchical levels.
[0189] In the division process of the three-dimensional space shown in FIG. 5, the region 8 is re-divided when the division condition is satisfied. However, even if the region 8 satisfies the division condition, the CPU 11 may stop the re-division of the region 8 when the polygon 4 interfering with the region 8, the region 8, and at least one of the states of the polygon 4 and the region 8 satisfy a predetermined subdivision stop condition.
[0190] For example, by setting various information such as the curvature of the polygon 4 interfering with the region 8, the intersection state between the polygon 4 interfering with the region 8 and the region 8, the connection angle between adjacent polygons 4, and the continuity of attributes between adjacent polygons 4 as attributes of the voxel 6 placed in the region 8, the CPU 11 may determine that the subdivision stop condition is satisfied and stop the subdivision of the region 8 in a case where the polygon 4 interfering with the region 8 in which the voxel 6 is placed can be reproduced from the attributes of the voxel 6. Also, when a specific error related to the connection of the polygon 4, such as the inversion or discontinuity of the polygon 4, is detected, the CPU 11 may determine that the subdivision stop condition is satisfied and stop the subdivision of the region 8.
[0191] When placing a voxel 6 in a region 8 corresponding to a location determined to be inside an object 2 based on the code of the SDF, for example, attention should be paid to the following situation.
[0192] Fig. 17 is a diagram showing an example of a plurality of regions 8 generated by dividing into cubes a three-dimensional space including planar polygons 4A and 4B that represent the contour of an object 2. For convenience of explanation, Fig. 17 and Figs. 18 and 19 described later show two-dimensionally the state of the three-dimensional space when viewed from a direction perpendicular to the XZ plane.
[0193] Polygons 4A and 4B represent protruding portions of object 2, and a closed region surrounded by polygons 4A and 4B represents the interior of object 2, with reference point Q set at the center of region 8. Within region 8, the shaded region 8 is the region 8 in which voxels 6 are located.
[0194] Sphere 9C is centered on reference point Q of region 8C and represents the circumscribing sphere of region 8C with a radius set to threshold value th expressed by equation (1). Sphere 9C is the interference range of region 8C, and the range of polygon 4A that interferes with sphere 9C is represented by a dotted line. Similarly, sphere 9D is centered on reference point Q of region 8D and represents the circumscribing sphere of region 8D with a radius set to threshold value th expressed by equation (1). Sphere 9D is the interference range of region 8D, and the range of polygon 4B that interferes with sphere 9D is represented by a dotted line.
[0195] 13 is performed on region 8C, the only polygon 4 that interferes with sphere 9C is polygon 4A, and so in the determination process of step S100, region 8C is determined to be region 8 at a location corresponding to a plane in the contour of object 2. Therefore, it is determined that there is no need to re-divide region 8C, and the process proceeds to step S110.
[0196] On the other hand, in step S110, since the reference point Q of the region 8C is not included inside the object 2, the sign of the SDF of the region 8C is negative, and the voxel 6 is not placed in the region 8C.
[0197] Therefore, although it would be desirable to subdivide region 8C so as to approximate the three-dimensional shape of object 2 as shown in Fig. 18 and place voxels 6 in region 8 corresponding to the closed region surrounded by polygons 4A and 4B, as shown in Fig. 17, voxels 6 are not placed in region 8C, and the three-dimensional shape as shown in Fig. 18 is not reproduced. The same thing happens to region 8D.
[0198] Such a situation occurs when a polygon 4 passes between the reference points Q of adjacent regions 8. Therefore, the CPU 11 sets the interference range to be set for the reference point Q of the region 8 to be divided so as to include the reference points Q of the region 8 to be divided and the region 8 adjacent to the region 8 to be divided, and identifies the polygon 4 interfering with the set interference range as the polygon 4 interfering with the region 8 to be divided.
[0199] Fig. 19 is a diagram showing an example of a case where the range of a sphere 9A including a reference point Q of an area 8D is set as an interference range for the area 8C shown in Fig. 17. In the example of Fig. 19, a threshold value th defined by equation (2) is used to set the interference range.
[0200] <Number 2> th=√(Dx 2 +Dy 2 +Dz 2 )*(0.5+Ratio) ···(2)
[0201] The Ratio in the formula (2) is an adjustment ratio for adjusting the interference range represented by the threshold value th. In the example of Fig. 19, the CPU 11 sets the Ratio to 0.5 so that the interference range of the area 8C includes the reference point Q of the area 8D adjacent to the area 8C, but the magnitude of the Ratio may be set according to the distance between the reference points Q of the adjacent areas 8.
[0202] As shown in FIG. 19, by expanding the interference range of the area 8C, the number of polygons 4 interfering with the area 8C becomes two, polygon 4A and polygon 4B, and the variance σ 2 is the threshold σ th If the interference range of the polygons 4A and 4B exceeds the formula (2), it is determined that the polygons 4A and 4B interfering with the region 8C represent a portion of the object 2 other than the plane. Therefore, the CPU 11 determines that the region 8C needs to be re-divided. If the interference range of the region 8D is set similar to that of the region 8C according to the formula (2), it is determined that the region 8D needs to be re-divided.
[0203] Therefore, the regions 8C and 8D are re-divided as shown in FIG. 18, and the voxel 6 is placed in the region 8 corresponding to the closed region surrounded by the polygons 4A and 4B.
[0204] Note that we have already explained a method for gradually displaying the three-dimensional shape of an object 2 made up of voxels 6 each time the cell block processing shown in step S120 of FIG. 13 is recursively executed, but this method for gradually displaying an object 2 made up of voxels 6 may also be applied to Level of Detail (LOD) processing of the object 2.
[0205] For example, during an operation to move the position of object 2 composed of voxels 6 on display unit 18 of computer 10, the three-dimensional shape of object 2 is displayed as a three-dimensional shape based on the arrangement of voxels 6 when the size of area 8 is the initial division size, and after the operation is completed, the three-dimensional shape of object 2 is displayed as a three-dimensional shape based on the final arrangement of voxels 6 at the final layer where the size of area 8 has reached the final achieved size.
[0206] This reduces the drawing speed of object 2 and various processing times in computer 10 compared to when the three-dimensional shape of object 2 is always displayed as a three-dimensional shape based on the final placement result of voxels 6, regardless of whether any operations are being performed on object 2.
[0207] In addition, when CPU 11 associates an attribute value for a specific attribute with region 8, CPU 11 may interpolate the attribute value to be associated with region 8 from, for example, an attribute value for a specific attribute associated with region 8 before division from which region 8 was divided, or with cell 8 after region 8 is re-divided.
[0208] For example, if a specific area 8 has a structure divided into three hierarchical areas 8 represented by parent, child, and grandchild relationships, such as the Mth hierarchical level, the (M+1)th hierarchical level, and the (M+2)th hierarchical level, the CPU 11 does not associate an attribute value with the parent area 8 itself, but associates attribute values with the child and grandchild areas 8. Then, when an attribute value for a specific attribute is requested for the parent area 8, the CPU 11 may set an attribute value for the specific attribute in the parent area 8 using basic statistics such as the average and median of the attribute values for the specific attribute associated with the child or grandchild area 8.
[0209] Conversely, when an attribute value for a specific attribute is requested at a specific location within area 8 that has not been divided down to the child and grandchild hierarchies, for example, which corresponds to the division range when division corresponding to the child or grandchild hierarchies is made, CPU 11 may assume that the attribute value for the specific attribute associated with parent area 8 is associated throughout the entire parent area 8, and may use the attribute value for the specific attribute associated with parent area 8 as the attribute value for the specific location within area 8.
[0210] Although one aspect of the processing device 1 for three-dimensional shape data has been described above using the embodiment, the disclosed form of the processing device 1 is merely an example, and the form of the processing device 1 is not limited to the scope described in the embodiment. Various modifications or improvements can be made to the embodiment without departing from the gist of the present disclosure, and forms with such modifications or improvements are also included in the technical scope of the disclosure. For example, the order of the division process, re-division process, and cell block process of the three-dimensional space shown in Figures 5, 13, and 14, respectively, may be changed without departing from the gist of the present disclosure.
[0211] In addition, in the present disclosure, as an example, a form in which the division process, re-division process, and cell block process of a three-dimensional space are realized by software has been described. However, the processes equivalent to the flowcharts shown in Figures 5, 13, and 14 may be implemented in, for example, an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a PLD (Programmable Logic Device) and processed by hardware. In this case, the processing speed can be increased compared to when the division process, re-division process, and cell block process of a three-dimensional space are realized by software.
[0212] In this way, the CPU 11 of the processing device 1 may be replaced with a dedicated processor specialized for a particular process, such as an ASIC, an FPGA, a PLD, a GPU (Graphics Processing Unit), or an FPU (Foating Point Unit).
[0213] The processing of the processing device 1 may be performed by a combination of two or more processors of the same type or different types, such as a combination of a plurality of CPUs 11 or a combination of a CPU 11 and an FPGA, in addition to being performed by one CPU 11. Furthermore, the processing of the processing device 1 may be performed by cooperation of processors located outside the housing of the processing device 1 and located at physically separate locations.
[0214] In the embodiment, an example in which the processing program is stored in the ROM 12 of the processing device 1 has been described, but the storage destination of the processing program is not limited to the ROM 12. The processing program of the present disclosure can also be provided in a form recorded in a storage medium readable by the computer 10. For example, the processing program may be provided in a form recorded in an optical disk such as a CD-ROM (Compact Disk Read Only Memory) or a DVD-ROM (Digital Versatile Disk Read Only Memory). The processing program may also be provided in a form recorded in a portable semiconductor memory such as a USB (Universal Serial Bus) memory or a memory card. The ROM 12, the non-volatile memory 14, the CD-ROM, the DVD-ROM, the USB, and the memory card are examples of non-transitory storage media.
[0215] Furthermore, the processing device 1 may download a processing program from an external device through the communication unit 19 and store the downloaded processing program, for example, in the nonvolatile memory 14. In this case, the CPU 11 of the processing device 1 reads the processing program downloaded from the external device from the nonvolatile memory 14 and executes division processing, re-division processing, and cell block processing of the three-dimensional space. [Explanation of symbols]
[0216] 1 Processing device, 2 Object, 3 Cutting surface, 4 (4A, 4B) Polygon, 6 (6A-6D) Voxel, 8 (8C, 8D) Area (cell, selected cell), 8A Target area, 8B Adjacent area, 9 (9A, 9C, 9D) Sphere, 10 Computer, 11 CPU, 12 ROM, 13 RAM, 14 Non-volatile memory, 15 I / O, 16 Bus, 17 Operation unit, 18 Display unit, 19 Communication unit, Q Reference point, th Threshold
Claims
1. A processor is provided. The processor, Dividing a three-dimensional space including a three-dimensional shape formed using at least one of a plane surface and a curved surface into a plurality of three-dimensional regions having a specified size; Identifying the forming surface that interferes with the three-dimensional region for each of the divided three-dimensional regions; Subdividing each of the three-dimensional regions without using an octree until the size of the three-dimensional regions reaches a size required to reproduce the properties at the locations of the three-dimensional shape represented by the interfering forming surfaces. A device for processing three-dimensional shape data.
2. When the variation in characteristics in the range of the forming surface interfering with the three-dimensional region falls within a predetermined allowable range, the processor determines that the size of the three-dimensional region has reached a size required to reproduce the characteristics in the portion of the three-dimensional shape represented by the interfering forming surface, and stops redividing the three-dimensional region.
2. The three-dimensional shape data processing device according to claim 1.
3. When the forming surface interfering with the three-dimensional region constitutes one plane of the three-dimensional shape, or when there is no forming surface interfering with the three-dimensional region, the processor determines that the size of the three-dimensional region has reached a size required to reproduce characteristics at a portion of the three-dimensional shape represented by the interfering forming surface, and stops redividing the three-dimensional region.
3. The three-dimensional shape data processing device according to claim 2.
4. The processor considers each of the forming surfaces to constitute one plane of the three-dimensional shape when a variance of a normal vector in each of the forming surfaces interfering with the three-dimensional region is equal to or less than a predetermined threshold.
4. The three-dimensional shape data processing device according to claim 3.
5. The processor stops the subdivision of the three-dimensional area when at least one state of the forming surface, the three-dimensional area, and characteristics related to the forming surface and the three-dimensional area satisfy a predetermined subdivision stop condition even if the subdivision of the three-dimensional area is necessary. The three-dimensional shape data processing device according to any one of claims 1 to 4.
6. The processor places three-dimensional elements in the three-dimensional area involved in reproducing characteristics of the three-dimensional shape according to a positional relationship between the three-dimensional area and the forming surface. The three-dimensional shape data processing device according to any one of claims 1 to 5.
7. The processor places the three-dimensional element in the three-dimensional area where the subdivision has stopped when a reference point that is preset in the three-dimensional area where the subdivision has stopped exists inside the three-dimensional shape.
7. The three-dimensional shape data processing device according to claim 6.
8. When the three-dimensional area is re-divided, the processor executes a recursive process that recursively performs a process related to the identification of the forming surface for each of the divided three-dimensional areas and a process related to the arrangement of the three-dimensional element in the three-dimensional area.
8. The three-dimensional shape data processing device according to claim 6 or 7.
9. When the processor recursively re-divides the three-dimensional region, it identifies, for each of the re-divided three-dimensional regions, the forming surfaces that interfere with the re-divided three-dimensional region from among the forming surfaces that interfere with the original three-dimensional region. The three-dimensional shape data processing device according to claim 8.
10. The processor displays the arrangement result of the three-dimensional element each time the recursive process is executed. The three-dimensional shape data processing device according to claim 8 or 9.
11. The processor sequentially selects all of the forming surfaces that configure the three-dimensional shape, and for each of the selected forming surfaces, sets any one of the three-dimensional areas that interferes with the selected forming surface as a reference three-dimensional area, and then identifies whether each of the adjacent three-dimensional areas that are the three-dimensional areas adjacent to the reference three-dimensional area interferes with the selected forming surface; The adjacent three-dimensional region interfering with the selected forming surface is set as a new reference three-dimensional region until there is no more adjacent three-dimensional region interfering with the selected forming surface. For each of the remaining adjacent three-dimensional regions that are adjacent to the new reference three-dimensional region and that are excluding the adjacent three-dimensional region whose interference state with the selected forming surface has been determined, a process of identifying the adjacent three-dimensional region interfering with the selected forming surface is repeatedly performed to identify the forming surface that interferes with each of the three-dimensional regions. The three-dimensional shape data processing device according to any one of claims 1 to 10.
12. The processor sets an interference range to be set with respect to a reference point of the three-dimensional area so as to include the reference points of the adjacent three-dimensional areas, and identifies the forming surface that interferes with the set interference range as the forming surface that interferes with the three-dimensional area. The three-dimensional shape data processing device according to any one of claims 1 to 11.
13. The processor associates with each of the three-dimensional regions an attribute value representing an attribute of at least one of the forming surface and the space associated with the three-dimensional region. The three-dimensional shape data processing device according to any one of claims 1 to 12.
14. The processor causes each of the processes executing the process in parallel to perform a process of redividing each of the three-dimensional regions. The three-dimensional shape data processing device according to any one of claims 1 to 13.
15. On the computer, Dividing a three-dimensional space including a three-dimensional shape formed using at least one of a plane surface and a curved surface into a plurality of three-dimensional regions having a specified size; Identifying the forming surface that interferes with the three-dimensional region for each of the divided three-dimensional regions; performing a process of subdividing each of the three-dimensional regions without using an octree until the size of the three-dimensional regions reaches a size required to reproduce the characteristics at the portions of the three-dimensional shape represented by the interfering forming surfaces; A program for processing three-dimensional shape data.
Citation Information
Patent Citations
Multi-step lattice voxel method
JP2012088771A
Book detection device, book detection method, and computer program for book detection
JP2017146938A
JPP4208191B
System, computer-readable medium and method for 3D-differencing of 3D voxel models
US9600929B1
System, method and computer-readable medium for organizing and rendering 3D voxel models in a tree structure
US9754405B1
Cited By
Information processing device, simulation method, and execution program
JP7762329B1