[vtkusers] Sub-dividing vtkHexahedron

Bikash Kanungo bikash at umich.edu
Mon Mar 19 22:56:33 EDT 2018


Hi,

Is there a way to sub-divide a given vtkHexahedron (say parent hex) into 8
child hexes? Currently, I'm extracting the parent hex's corner vertices and
determining the edge centers, face centers and body center. Next, I use
these various vertices to define the vertices of each of the 8 child hexes.
This works fine. But it doesn't form a maintainable piece of code as the
algorithm relies on a specifiv indexing of vtkHexahedron to identify the
pairs and quadraplets that form an edge and a face, respectively. The
indexing as mentioned in the vtkHexahedron description is:

*" The hexahedron is defined by the eight points (0-7) where (0,1,2,3) is
the base of the hexahedron which, using the right hand rule, forms a
quadrilaterial whose normal points in the direction of the opposite face
(4,5,6,7)."*

I'm worried that if this indexing changes internally in later releases of
vtk then it might lead to a very difficult to find bug.

Any ideas about making it independent of the underlying indexing and/or
making it more maintainable upon linking to a new vtk releases?

Thanks,
Bikash

-- 
Bikash S. Kanungo
PhD Student
Computational Materials Physics Group
Mechanical Engineering
University of Michigan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180319/7d405b42/attachment.html>


More information about the vtkusers mailing list