[vtk-developers] Bug correction in vtkCutter deactivates a use case
TINGAUD Frederic
Frederic.TINGAUD at murex.com
Fri Mar 15 14:41:20 EDT 2013
Hi,
I just spent some time trying to understand why my vtkCutter on a
surface in a structured grid was no longer working while I remembered
seeing it work. The problem was in fact not in my incorrect use of the
cutter, but in a bug correction that was done in vtkCutter, in patch
8fb71b7fc469d4d24b7ca8b67db4087e88aea1c4:
Before the patch, we had the following, were everything except
UNSTRUCTURED_GRID eventually ended up in DataSetCutter:
if (input->GetDataObjectType() == VTK_STRUCTURED_POINTS ||
input->GetDataObjectType() == VTK_IMAGE_DATA)
...
if (input->GetDataObjectType() == VTK_STRUCTURED_GRID)
if (input->GetCell(0))
{
int dim = input->GetCell(0)->GetCellDimension();
// only do 3D structured grids (to be extended in the future)
if (dim >= 3)
{
...
}
}
if (input->GetDataObjectType() == VTK_RECTILINEAR_GRID)
...
if (input->GetDataObjectType() == VTK_UNSTRUCTURED_GRID)
...
else
{
vtkDebugMacro(<< "Executing DataSet Cutter");
this->DataSetCutter(input, output);
}
The patch consisted in changing all the leftmost "if" in "else if".
However, my use case, with a structured grid of dim < 3 is no longer
treated at all, while it previously was treated in the last else.
I am by no mean a specialist in 3D visualization and I don't know if
this DataSetCutter is in fact appropriate for the structured grid
surfaces (the resulting lines are not always visible, so perhaps it used
to work by pure luck). So I don't know if the previous behavior should
be reintroduced, by adding the dim>=3 in the main "else if" or if the
new behavior is intended, in which case a warning should at least be
displayed, to avoid having to debug to find the problem.
I can create the patch in any case, but I need a specialist opinion on
what is intended first.
Regards,
Frederic
*******************************
This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130315/2b2228e5/attachment.html>
More information about the vtk-developers
mailing list