[vtkusers] [EXTERNAL] Higher order elements in VTU files

David Thompson dcthomp at sandia.gov
Thu Jun 21 19:29:15 EDT 2012


Hi Mikael,

>>>> NURBS are not implemented.
>>>
>>> Would NURBS be part of the unstructured grids?
>>
>> Should someone implement NURBS cells, the barrier that keeps a
>> vtkUnstructuredGrid from holding them is that
>> vtkGenericCell::InstantiateCell enumerates all of the subclasses of  
>> vtkCell
>> that are supported -- and Kitware is loathe to increase the number  
>> of cell
>> types here. Because vtkGenericCell(**) is the mechanism used by a  
>> lot of
>> filters to perform per-cell operations such as isocontouring,  
>> clipping, and
>> cutting, these operations fail when a mesh contains cells of a type  
>> it
>> cannot handle.
>
> I thought NURBS would go under for example
> VTK_PARAMETRIC_QUAD_SURFACE. If not, then what else are they for?

If you choose to use the vtkGenericDataSet API, then your subclass of  
vtkGenericAdaptorCell might override the GetType() method to return  
VTK_PARAMETRIC_QUAD_SURFACE.

If you choose to modify VTK's unstructured grid API, then your  
subclass of vtkCell might override the GetCellType() method to return  
VTK_PARAMETRIC_QUAD_SURFACE.

But currently no subclasses for cells of either mesh type return this  
value, so it is certainly not being tested. I did not add that value  
to Common/DataModel/vtkCellType.h, so I cannot say what its intended  
use is.

I agree that it makes sense for a 2-D NURBS patch to use this as its  
cell type -- but there is no implementation to go with the enumerant  
and thus vtkGenericCell::InstantiateCell cannot create an instance of  
some vtkCell subclass when passed VTK_PARAMETRIC_QUAD_SURFACE.

The vtkGenericAdaptorCell class does not create subclass instances per  
cell type (there is no equivalent to vtkGenericCell::InstantiateCell).  
This was done in order to allow new cell types without modifications  
to VTK; the new classes could be contained in a separate library and  
require no modifications to the vtkGenericAdaptorCell. However, again,  
there is no implementation. (See the Filters/Generic/Testing/Cxx/ 
vtkBridgeXXX classes for an example of what must be provided to use  
the vtkGenericDataSet API.)

	David




More information about the vtkusers mailing list