1. Field of the Invention
This invention relates to generating a recognition model from an inputted 3-dimensional shape, and more particularly to a shape generation apparatus, a control method to allow a computer apparatus to operate as a shape generation apparatus and computer executable programs to cause a computer apparatus to execute the control method, which can smoothly generate a recognition model by guaranteeing topology consistency of cluster data in the case that cluster data is generated from an input model of a 3-dimensional shape and then a recognition model is formed.
2. Background Art
As one of hexahedral mesh generation methods, which target finite element analysis, there is a method using approximation solids, which is called as a recognition model. The recognition model is a solid defined in the integer coordinates space called as ijk space. This recognition model is constituted of planes that are perpendicular to either of three axes, and a model that approximates a solid by accumulating unit cubes. The surface topology of the unit cube is constituted of 2-dimensional manifolds. Once, if a recognition model that geometrically approximates an original solid is generated, the recognition model can easily be transformed into a structured mesh constituted of elements of unit cube. Boundary planes of the acquired structured mesh are mapped onto the surfaces of the original solid and smoothing is performed on it to acquire a hexahedral structured mesh corresponding to the original solid.
Hereafter, the outline of a conventional method to generate a recognition model will be explained. For example, as a method to generate a recognition model, a method to divide the surfaces of a 3-dimensional shape into clusters. In this case, inputted values are mesh data that expresses the surfaces of a solid as a group of 2-dimensional (2D) elements (triangles or quadrangles). The inputted 2D elements are gradually gathered into a unit referred as a cluster considering an angle with an axis of coordinates, a dihedral angle with an adjacency element and a shape of an area (the planarity). Each cluster is assigned with either of three directions of i, j and k, which are directions of a Cartesian coordinates system and a positive/negative value corresponding to each direction. If a state in which all elements belong to either of three kinds of clusters is finally acquired, each cluster is considered to be a surface of the recognition model, and topology construction of the recognition model is completed.
After clustering, an optimization problem, the parameters of which are the number of division of each edge in the recognition model (corresponds to the length), is set up, and then the integer programming problem is solved to geometrically determine a structured mesh of the recognition model. A structured mesh generation apparatus using a conventional clustering method generally includes the following functions:
The problem of the above-described conventional clustering method is that it is not guaranteed to generate a recognition model provided with topological consistency after completion of cluster construction. For example, if a shape, such as a quadrilateral pyramid, is intuitively clustered, a plane does not exist at the apex, so that an independent surface cluster cannot be assigned and clusters of the bottom and its corresponding upper surface are not generated. Such a clustering provides a recognition model without shape consistency, which cannot regenerate an input model. Therefore, appropriate data cannot be provided to mesh generating processing at the next stage, or if a mesh can be generated, it is recognized as a completely different 3-dimensional shape.
In the view of vertex of a recognition model, structures, which are allowed as cluster directions surrounding a vertex, are restricted to at most several combinations. Therefore, in determination of cluster directions (i, j, k) (hereafter, refer to them as “color” in this invention), if a vertex that is contrary to a restriction occurs, its portion may be processed later. However, such a method cannot solve the problem of a quadrilateral pyramid.
In addition, if seemingly consistent clustering is achieved, a solution may not exist at the stage of assigning the number of division (positive integer) to each edge. The cause is that clustering itself gives inconsistency that is inappropriate for automatic shape recognition by a computer apparatus.
[Problems to Be Solved by the Invention]
In conventional clustering of an input model, there remain the following problems:
In the above-described problems, only topological consistency is extracted, but to provide a correct recognition model, not only topology consistency but also the degree of geometrical approximation are important. However, without topology consistency, geometrical accuracy cannot be provided. In this invention, if topology consistency is satisfied and clusterings associated with an original clustering can be listed as many as possible, in the case that a geometrically correct recognition model is selected after that, efficient selection can be performed.
In this invention, a shape generation apparatus is constituted of a cluster coupling part, a topology judgment part, which judges topological consistency, and a topology operation part to receive output from the topology judgment part and to provide an appropriate topology to a cluster. The topology judgment part examines and judges the topology of cluster data during or after clustering to judge the consistency of cluster data. Subsequently, the topology judgment part transmits the judgment result of consistency, labels of the judged clusters and inconsistency data to consistency to the topology operation part.
The shape generation apparatus of this invention includes topology information to judge topology consistency. The topology operation part refers to the topology information that includes topology change rules to change the topology of cluster data, analyzes inconsistency data, and judges the contents of inconsistency. In addition, the topology operation part selects topology conditions to be allowed in response to the judgment, changes the topology of cluster data, and returns the cluster data that its topology consistency is allowed to a cluster generation part.
By adopting the structure of this invention, for input shapes that cannot correctly be processed with conventional clustering methods, 3-dimensional shapes that their structure meshs can finally be generated, can be provided.
Therefore, according to this invention, a shape generation apparatus for 3-dimensional objects using a computer apparatus, including:
The topology judgment part of this invention reads out the adjacency graph data and judges topology of arcs and nodes of the adjacency graph data. In response to the judgment, the topology judgment part allows the topology operation part to acquire corresponding adjacency graph data.
The topology judgment part of this invention includes direction identification data, which identifies an arc that crosses from a specified node of the adjacency graph data to another node and indicates the crossing direction of the arc, and an axis direction graph data generation part, which generates axis direction graph data that corresponds the specified node to the other. The shape generation apparatus includes an axis direction graph storage part to store generated axis direction graph data.
The topology judgment part of this invention reads out axis direction graph data from the axis direction graph storage part and judges the existence of cycle or loop between the nodes using the direction identification data. In response to the judgment, the topology judgment part allows the topology operation part to acquire corresponding adjacency graph data.
The topology operation part of this invention changes node or arc data of the acquired adjacency graph data with reference to a topology table, and updates data in the adjacency graph data storage part using the changed adjacency graph data.
The cluster coupling part of this invention judges update of the adjacency graph data and acquires the updated adjacency graph data.
In addition, according to this invention, a control method to control a computer apparatus as a shape generation apparatus for 3-dimensional objects, allows the computer apparatus to execute:
In this invention, the control method allows the computer apparatus to execute:
The topology judgment part of this invention includes an axis direction graph data generation part, and the control method allows the axis direction graph data generation part to execute:
In this invention, the control method allows the topology judgment part to execute:
In this invention, the control method allows the topology operation part to execute: a step of changing node or arc data of the acquired adjacency graph data based on topology information to change adjacency graph data; and
In this invention, the control method allows the cluster coupling part to execute:
Furthermore, according to this invention, computer executable programs, which allow a computer apparatus to execute the above-described control methods, are provided.
[Preferred Embodiment]
Hereafter, this invention will be explained in detail with preferred embodiment shown in the drawings, however, this invention is not restricted to the preferred embodiment shown in the drawings.
A. Clustering Expression By Adjacency Graph
Hereafter, terms to be used as common concepts in this invention and clustering expression method will be explained.
In this invention, while clustering is made to go on from the first state that only unclassified elements (triangle and quadrilateral) exist to the state that clustering is completed, clustering is consistently expressed using adjacency graph. Adjacency graph to be used in this invention is a graph, in which faces of a polyhedron are transposed to vertices and then adjacency of faces are transposed to edges connecting vertices corresponding to the faces. In addition, in adjacency graph of this invention, term “node” indicates cluster in a real model, and term “arc” indicates adjacency relation between clusters (that is, whether or not edges are shared).
In this invention, for adjacency graph, terms “node”, “arc” and “face (polygon or n-gon) are always used, and in the case of referring to a real model, “vertex”, “edge” and “cluster” are used. In the state before beginning clustering, each element is considered to be one cluster (or at first, elements are gathered up to some extent and glanularity is set to be coarse).
Nodes and arcs in adjacency graphs have attribute values that reflect corresponding clusters and edges in a real model, respectively. These attribute values are shown collectively below:
(I) Node Attribute (Cluster Attribute)
The above-described concave and convex of an edge are determined corresponding to an angle in a recognition model.
In an algorithm of a cluster method, at first, directions (i+, i−, j+, j−, k+, k−) for several clusters, which have clear normal directions, are determined. Subsequently, clusters, the directions of which are not determined, are merged to adjacency clusters from the appropriate one, and then “color” is assigned to them.
In adjacency graphs, it is not permitted that the same kinds of nodes are adjoined through arcs except the case of nodes of “unknown.” When this state occurs, arcs are immediately degenerated and nodes at both ends are unified so as to be one.
The unified node indicates the merged area of the clusters indicated by the two original nodes, and the direction is the original one.
B. Consistency Conditions on Adjacency Graphs
In this invention, the consistency judgment of a recognition model is performed with a sequential processings on adjacency graphs using adjacency graphs and derived “axis direction graphs.” In consistency judgment, local conditions, which are ones for processing consistency between nodes or arcs, and global conditions, which are ones for processing sequential consistency between nodes are used. The local and global conditions can be defined as follows.
(a) Local Conditions
If it is determined that the edge can be coupled at step S22 (yes), at step S24, edge data between position coordinates of ends of corresponding edge is deleted, and data of new merge cluster is generated to couple cluster. Then, data of the coupled cluster is registered in memory. At step S28, topology examination and operation processing is executed and topology consistency is changed.
On the other hand, at step S20, if it is determined that there is not an edge (no), the processing progresses to step S26 and at step S26, colors of clusters, the colors of which have not been determined and can be determined, are determined. In addition, at step S22, if it is determined that coupling is impossible (no), the processing is returned to step S18 and next cluster edge is read out to repeat processing. At step S30, it is determined whether or not all of the clusters registered in memory are processed based on existence of clusters, the colors of which are “unknown”. At step S30, if clustering is determined to be completed (yes), the processing progresses to step S32 and the processing of this invention is completed. On the other hand, at step S30, if clustering is not completed (no), the processing is returned to step S14 and data is updated reflecting the data of coupled clusters generated through steps from S14 to S28. Subsequently, processing of steps from S16 to S30 is repeated again.
As shown in
If surfaces surround a specified vertex V to form a cube in a relation rather than this, a recognition model permitted topologically cannot be formed. In examination of topology consistency in this invention, surface data as shown in
Furthermore, the topology examination and operation processing at step S28 in this invention will be explained in detail.
At step S42, if the local condition (a-1) are not satisfied (no), the processing progresses to step S46 and topology operations 1 or 2 as will be described later are executed for clusters that are processed at this point. Then, the processing is returned to the judgment at step S42. In addition, at step S44, if the local condition (a-2) are not satisfied (no), the processing progresses to step S48 and topology operations 3 as will be described later are executed for clusters that are processed at this point. Then, the processing is returned to step S42, and the processing is repeated until the local conditions are satisfied.
If the local conditions are satisfied for specified clusters, the topology examination and operation processing shown in
D. Details of Judgment Processing of Topology Consistency
D-1<Locally Consistency Conditions: Topology Information>
The judgment of the conditions for every adjacency graph surface (a-1) is executed using data, in which the row of clusters around a vertex listed in
In the case of the adjacency graph shown with a triangle in
In addition, for patterns of one adjacency graph, if there are a plurality of nodes that have the same color, the nodes can be attached with a label, such as “1” or “2”, to mutually distinguish marks of nodes. As shown in
In addition, the condition (a-2) for every node of adjacency graph correspond to ones for every cluster in a real model, so that the conditions can be put another way as will be described below:
That is, there are four or more arcs (the degree of node is four or more).
In the above-described judgment, as long as nodes, the colors of which are not determined, are not listed in the judge, the judgment of the local condition (a-1) and (a-2) is impossible, so that parts, which do not satisfy with the local conditions topologically, can easily be specified from a pair relation of adjacency graphs. A Part, which does not more specifically satisfy with the local conditions, can be specified as a vertex in a real model for the local condition (a-1) and as a surface for the local condition (a-2).
In addition, among patterns of adjacency graphs (the local condition (a-1)) shown in FIGS. 7(d) to (f), arcs, such as (i+, i−), which connect nodes that have the same color and different signs, do not exist. Thereby, arcs that connect nodes having different signs, can be removed before all colors of nodes, which share a surface boundary in adjacency graph, are determined.
D-2<Sufficiency Method of the Local Conditions>
If local consistency conditions are not satisfied during or after clustering, adjacency graphs that satisfy with local consistency conditions can be generated by sequentially applying the following operations. However, in the correction process to be explained below, colors of related nodes are assumed not to be “unknown.” If “unknown”, the processing can progress by not adding corresponding elements into a judgment list before the colors are determined.
As shown in
In addition, the topology operation 2 is constituted of two operations a and b. The topology operation 2a supplies polygons of adjacency graph, and processes polygons that do not satisfy with patterns in
In addition, the topology operation 2b to be applied in the same way is an operation, in which a diagonal arc is generated into an adjacency graph. This is shown in
2b (i): In the case of that both ends of a diagonal are different kinds (different two among i, j and k), two polygons that use a diagonal arc are generated. If triangles are generated, the condition (a-1) are surely satisfied. If quadrangle or more, it is determined whether or not the condition (a-1) are satisfied using the above-described method. If not satisfied, for the generated polygons, processing of the above-described topology operation 2(b) is applied again (
2b (ii): If both ends of a diagonal have the same color and different signs, a diagonal arc is not added into the combination (
2b (iii): In addition, if both ends of a diagonal have the same color and the same sign, degeneration is immediately produced between diagonals by inserting a diagonal arc. After merging, polygons (triangle or more) or arcs are generated by two in total. In this case, as long as that arcs are generated, the degree is decreased by one for a node in the opposite side of the arc (
In addition, for adjacency graph, for which the degree problem of a node (the local condition (ii)) is judged, the topology operation 1 is performed in advance, so that the node and that that has the same color do not adjoin. Thereby, it is specified that colors of nodes, which adjoin each other, are one or two. Specifically, processing of the degree of a node in the local conditions is performed as will be explained below.
<Change of Node Color>
If the color of an adjacency node is one, its own color and sign are made to match with that of the adjacency node. Immediately, arc degeneration occurs, inconsistency is removed.
<Splitting of Adjacency Node>
The state in
In this invention, adjacency graph data of clustering that satisfies with the above-described local consistency conditions is stored in memory, and each adjacency graph data is read out. Subsequently, cluster boundary is geometrically determined in a real model using a pair relation, and finally, an appropriate solution is selected among them to determine a recognition model, so that the recognition model in accordance with local conditions can be provided.
E. Global Consistency Conditions
With the above-described method, clustering that satisfies with local conditions can be acquired. However, it is presumed that a problem, in which the consistent number of divisions is not assigned to an edge as a recognition model, remains.
[Expression 1]
za+zb+zc=zd
za=zd (1)
From the above formula (1), zb+zc=0 is introduced. On the other hand, it is assumed that parameters are positive integers, so that a solution that satisfies restrictions of the above formula (1) does not exist.
For example, in a method using integer programming, division processing that satisfies the above-described restrictions is simultaneously performed with minimizing of a target function, such as the following formula (2). In the following formula (2), the capital letter indicates the number of ideal division for each edge, which is determined from an original shape model.
[Expression 2]
minimized (|za-Za|+|zb-Zb|+|zc-Zc|+|zd-Zd|) (2)
Despite using or not using integer programming, solving problems that include inconsistency is a waste of calculation cost. Furthermore, at the stage, in which it is clear that the problems cannot be solved, specifying a cluster part that causes inconsistency is not easy.
Therefore, in this invention, the existence of inconsistency in restrictions of parameters (the number of edge division) is judged by generating “axis direction graph” from adjacency graph.
That is, if the above-described inconsistency occurs in axis direction graph, there is a circulation relation among elements of axis direction graph (hereafter, simply referred as “cycle” in this invention). For formulation of axis direction graph, various methods can be adopted, however, formulation of the axis direction graph shown in
[Expression 3]
(K0, za, zb, K2, zb, zc, K1) (3)
In the above formula (3), existence of the cycle of Zb and Zc between K2 and K1 can be judged by checking whether or not any minus element exits between Km and Kn, which are adjoined face identifiers, in a data set of axis direction graph. In addition, besides this, loop edge is also one form of cycles.
[Expression 4]
(K2, zb, K1, zc, K2): the case of FIG. 12
(K, zx, K): the case of FIG. 13 (4)
In FIGS. 11 to 13, explanation is described using the specific and intuitively understandable embodiments.
An actual generation procedure of axis direction graph will be described below.
(1) one direction of i, j, k is selected (it is assumed that k is selected, however, the other two also are same), and all nodes (clusters) in the k direction are extracted from adjacency graph to be temporarily stored in a buffer memory as nodes of axis direction graph, such as K0, K1 and K2.
(2) For an arc that connects nodes, the colors of which are neither “unknown” nor k, in adjacency graph, a corresponding cluster edge is searched. The cluster edge corresponds to a geometrical edge, with which a cluster of a different color in an original real model contacts, and is shown with an arrow in
[Expression 5]
(k1, L1,2, k2, k3, L3,4, k4, k5, L5,6, k6, . . . , k1-1, L1-1, k1) (5)
The above-described direction identification data Li,j is shown with a short arrow intersecting with an arc in
At this point, if positive/negative of the k axis direction is “unknown”, a problem occurs. In this case, by not inserting the direction identification data Li,j, processing corresponding to not attaching with the arrow in
(2-2) For a node pair corresponding to a face in the k direction that leads to both ends of a cluster edge, vector expression data to give axis direction graph is generated to be stored in memory. In this processing, a starting node and a terminal node of axis direction graph are selected, and then direction identification data Li,j near the starting node is selected. Subsequently, a next node is selected, and then next direction identification data Li,j is selected. The nodes and data are sequentially registered into a buffer memory and the vector expression data is generated. This processing can be traced in
[Expression 6]
(k1, La, Lb, K2) (6)
So as to be easily judged if comparing the above formula (6) with the formulas (3) and (4), the arc za of axis direction graph is specified by the direction identification data Li,j, and the codes in the direction identification data Li,j can be used to judge the cycle. In addition, axis direction graph data can be introduced from the above-described processing of adjacency graph.
An axis direction graph in the k direction generated using the real model in
The judgment of global inconsistency using the above-described axis direction graph can be applied for ongoing clustering. That is, if nodes, the colors of which are not determined, remain in adjacency graph but processing is performed only for nodes that “color” information specified with i, j and k is registered, the existence of inconsistency within the determined range is judged.
F. <Sufficiency Method of Global Consistency>
It has been indicated that the cycle in an axis direction graph is judged using the data structure explained above. Topology operations to satisfy global consistency solve a cycle or a loop that is formed with one or a plurality of nodes, and correspond to operations that provide consistency of a real model. As a simple topological method, the topology operations can be introduced as the inverse of an arc direction in a cycle or a loop, or node splitting (cluster splitting). However, the inverse of arcs may greatly change geometrical consistency in an original recognition model. Thereby, the method to inverse arc direction may be used in this invention, however, it cannot generally be used considering geometrical meaning. Therefore, in the preferred embodiments of this invention, as processing to satisfy global topology consistency, the processing that satisfies global topology consistency using node splitting is performed.
In this invention, various splitting methods can be used to solve cycles or loops by node splitting. The number of selection methods of nodes to be splitted is the number of nodes, and for splitting methods for a particular node (cluster), there may be a plurality of methods. In this invention, it is an object to be able to perform geometrical selections by providing all possible topological solutions, so that it is preferable to use an appropriate method with as few restrictions as possible.
Generally, splitting an n-gon into two corresponds to splitting n vertexes, which constitute the n-gon, (that is, n edges to connect) into two groups (splitting, in which a vertex of a polygon is splitted, is excluded). That is, two edges are selected from n ones that constitute faces, and then they are splitted so as to be intersected. Therefore, the number of selections is at most nC2. In the purpose of this invention, selection methods of two edges of a polygon to be splitted have the following restrictions: the two edges have the same direction among three directions of i, j and k; and one edge has the positive direction for an axis and the other has the negative one considering the direction when turning around the perimeter of a cluster in fixed direction. Under the above-described restrictions, two edges to be permitted are only some of nC2 kinds.
To solve the left cycle (between K1 and K2) of the axis direction graph in
From the above-described point, one of edges intersected when splitting a cluster as shown in
The nodes influenced by this pattern are J1, J2, K2′ and K2″. The number of arcs of adjacency graph connected to each of the nodes increases by two. Since the number of arcs does not decrease, theses nodes do not break the condition (a-2). The newly generated node Ix also satisfies the condition (a-2). In addition, three new triangles are generated in the adjacency graph shown in
In addition, the global conditions (b) are satisfied by this splitting in the k axis direction. For other axis directions, the new node Ix is inserted, so that the global conditions (b) must be judged in the following examination for condition check.
The splitting method shown in
With reference to
In addition, the computer apparatus 12 is connected with an input model storage part 20, an adjacency graph data storage part 22 and an axis direction graph storage part 24, and provides each data to the computer apparatus 12 if required. On the screen of the display device 16, real model data provided by topological operations immediately performed is displayed and the state of topology operations is displayed to a user.
The topology judgment part 30 reads the updated cluster data from the memory 32, and calculates adjacency graph using a pair relation to store the adjacency graph data into an adjacency graph storage part 22 that is constituted of a hard disk or other devices. Furthermore, the topology judgment part 30 reads the adjacency graph data from the adjacency graph storage part 22, and executes judgment of the local and global consistency conditions to transmit the result to a topology operation part 34. The topology operation part 34 processes the adjacency graph data so as to satisfy the local conditions, and then transmits the processed adjacency graph data to the topology judgment part 32 again to execute judgment of the global consistency conditions.
In the judgment of the global consistency conditions, the topology judgment part 30 includes an axis direction graph data generation part 30a to generate an axis direction graph from the received adjacency graph data, and allows the axis direction graph data storage part 22 to store the axis direction graph data. The topology judgment part 30 judges the global consistency conditions using the axis direction graph data, and if the global consistency conditions are not satisfied, allows the topology operation part 34 to read the corresponding adjacency graph data and to perform splitting processing for the adjacency graph data so as to satisfy the global consistency conditions. The splitting processed adjacency graph data is stored into the adjacency graph data storage part 22, and its data is updated. Then, the cluster coupling part 28 reads out the updated adjacency graph data, and generates cluster data that satisfies the local and global consistency conditions. Subsequently, the cluster coupling part 28 transmits the cluster data improved with consistency conditions to the cluster coupling processing part again to execute processing.
All of the topology operations performed in this process act in a direction, in which inconsistency is eliminated, so that the tree dose not become large infinitely. In addition, the length of a branch indicates the number of added topology operations, so that the length of a branch can be restricted to avoid clustering that is too much different from its original shape topologically. In either way, since inconsistency that occurs in real problems is small, trees do not become too large.
An input model used for processing has global inconsistency and is the same as the input model shown in
A set of clustering having consistency generated by the processing of this invention includes all clusterings that can be generated with a series of topology operations. Therefore, the most geometrically appropriate clustering (that can structure a recognition model of the high degree of approximation) can be selected from them through graphical interface in a computer apparatus.
[Advantages of the Invention]
The conventional method, in which triangle (and quadrilateral) elements that constitute the faces of a shape model are splitted into clusters to construct the topology of a recognition model, has a problem that consistency cannot be guaranteed and mesh generation processing is not progressed. In this invention, a topology structure of clustering is structured with two graphs, such as adjacency graph and axis direction graph, and conditions are judged using attributes provided to nodes and arcs to judge local and global consistency and to locate its cause.
Furthermore, there is indicated the method to mechanically acquire topology structures that satisfy consistency conditions by applying a series of operations on adjacency graph for both local and global inconsistencies. Using these methods, there can be provided with a plurality of candidate solutions for a recognition model guaranteed with topology consistency. Thereby, without troubles on topology problems, a user can acquire one solution considering only geometrical criteria, and if automation of geometrically narrowing down to one solution is realized, automation of whole processing can be expected.
The proposed judgment and correction operations can also be applied during clustering. By applying these operations in an early stage of processing, the possibility to reach more desirable clustering can be raised.
<Bibliography>
Number | Date | Country | Kind |
---|---|---|---|
2003-165609 | Jun 2003 | JP | national |