[vtk-developers] New nonlinear celltypes

Soeren Gebbert soeren.gebbert at inpro.de
Tue Jan 10 12:14:23 EST 2006


David C. Thompson wrote:

>On Mon, 2006-01-09 at 08:17, Soeren Gebbert wrote:
>  
>
>>Im still developing the nonlinear cells. Tcl test running well. But i
>>still runing into a problem im not able to fix. I have implemented
>>contouring and clipping of the new cells. The methods for that are
>>quite similar. The contouring is working very well, but the clipping
>>produces strange output. I have attached some pictures of the
>>TriQuadraticHexahedron, to show you the point.
>>    
>>
>Two questions:
>1. Could you send the LinearHexs array? 
>2. Are the node numberings consistent with the figure below?
>               7              14             6
>               +--------------+--------------+
>              /:             /:             /|
>             / :            / :            / |
>            /  :           /  :           /  |
>         15/   :        25/   :        13/   |
>          +--------------+--------------+    |
>         /:    :        /     :        /|    |
>        / :  19+......./....23+......./.|....+18
>       /  :   .:      /       :      /  |   /|
>     4/   :  . :   12/        :    5/   |  / |
>     +--------------+--------------+    | /  |
>     |    :.   :    |   26    :    |    |/   |
>     |  20+    :    |    +    :    |  21+    |
>     |   .:    :    |       10:    |   /|    |
>     |  . :   3+....|.........+....|../.|....+
>     | .  :   .     |        .     | /  |   / 2
>     |.   :  .    22|       .    17|/   |  /
>  16 +--------------+--------------+    | /
>     |    :.        |     .        |    |/
>     |  11+.........|.24.+.........|....+
>     |   .          |   .          |   / 9
>     |  .           |  .           |  /
>     | .            | .            | /
>     |.             |.             |/
>     +--------------+--------------+
>     0              8              1
>
>Linear hexahedra should have nodes ordered like:
>  {0,8,24,11,16,22,26,20}
>for example. I'll be glad to check the consistency of the array if you
>send it. If LinearHexs is the same as the array in
>vtkQuadraticHexahedron, then you must have the mid-face points ordered
>as shown above. I don't see anything wrong with the clipping routine.
>
>Also, the two routines you sent have this comment:
>  
>
>>  //clip each linear quad separately
>>    
>>
>                       ^^^^ I assume you really mean hex here.
>
>	David
>
>
>  
>
Hi,
i choosed a different numbering:

               7              14             6
               +--------------+--------------+
              /:             /:             /|
             / :            / :            / |
            /  :           /  :           /  |
         15/   :        25/   :        13/   |
          +--------------+--------------+    |
         /:    :        /     :        /|    |
        / :  19+......./....22+......./.|....+18
       /  :   .:      /       :      /  |   /|
     4/   :  . :   12/        :    5/   |  / |
     +--------------+--------------+    | /  |
     |    :.   :    |   26    :    |    |/   |
     |  23+    :    |    +    :    |  21+    |
     |   .:    :    |       10:    |   /|    |
     |  . :   3+....|.........+....|../.|....+
     | .  :   .     |        .     | /  |   / 2
     |.   :  .    20|       .    17|/   |  /
  16 +--------------+--------------+    | /
     |    :.        |     .        |    |/
     |  11+.........|.24.+.........|....+
     |   .          |   .          |   / 9
     |  .           |  .           |  /
     | .            | .            | /
     |.             |.             |/
     +--------------+--------------+
     0              8              1

I count the first 4 midface nodes against the clock. Thats a question of taste i think.
MyNumbering == YourNumbering
20 == 22
21 == 21
22 == 23
23 == 20

My linear hex's are:

static int LinearHexs[8][8] = { 
{0, 8, 24, 11, 16, 20, 26, 23},
{8, 1, 9, 24, 20, 17, 21, 26},
{24, 9, 2, 10, 26, 21, 18, 22},
{11, 24, 10, 3, 23, 26, 22, 19},
{16, 20, 26, 23, 4, 12, 25, 15},
{20, 17, 21, 26, 12, 5, 13, 25},
{23, 26, 22, 19, 15, 25, 14, 7},
{26, 21, 18, 22, 25, 13, 6, 14}
};

I checked this many times, but maybe im blind, or i need better glases.

But anyway, i tried your numbering too, with the hope that this would 
solve the problem, (i have two version of TriQuadraticHex)
but the clipping still dont work. :(

With the vtkBiQuadraticQuadraticWedge i have the same problems, and this 
one has exactly
the same numbering like vtkQuadraticWedge:

//----------------------------------------------------------------------------
// We are using 8 linear wedge
static int LinearWedges[8][6] = { {0,6,8,12,15,17},
                                  {6,7,8,15,16,17},
                                  {6,1,7,15,13,16},
                                  {8,7,2,17,16,14},
                                  {12,15,17,3,9,11},
                                  {15,16,17,9,10,11},
                                  {15,13,16,9,4,10},
                                  {17,16,14,11,10,5} };

The contouring always worked, independently if i used your numbering, or 
my. Or if i interpolated the attributes or not!
No problems at all.
But the clipping never worked.

Maybe im seraching in the wrong direction? Maybe i made some mistakes 
earlier?
Maybe the search directions from vtkCell3d::Clip has a problem with the 
input?

Any suggestioins are welcome.

Thanks and best regards
Soeren



More information about the vtk-developers mailing list