[vtkusers] Fwd: vtkDecimatePro not fully working with vtkDouble polydata

pof jd379252 at gmail.com
Sat Nov 30 05:11:40 EST 2013


No answer yet on this question.

Just to mention this is a problem for me as I'm working on meshes 
expressed in geographical coordinates, i.e. sometimes having large 
values (typically over 1e7) which are unaccurately represented by float 
variables.

Any idea / comment ?


-------- Message original --------
Sujet: 	vtkDecimatePro not fully working with vtkDouble polydata
Date : 	Wed, 27 Nov 2013 18:58:52 +0100
De : 	pof <jd379252 at gmail.com>
Pour : 	vtkusers at vtk.org



Hi vtk'ers,

I have a mesh with points defined as vtkDouble:
     vtkPoints *MeshPoints = vtkPoints::New(VTK_DOUBLE);
and with a regular vtkCellArray:
     vtkCellArray *MeshCells = vtkCellArray::New();

The mesh is build as usual with:
     vtkPolyData *MeshPolyData;
     MeshPolyData->SetPoints(MeshPoints);
     MeshPolyData->SetPolys(MeshCells);

Now I need to perform a mesh decimation of this mesh, and I'm doing
nothing special:
     vtkDecimatePro *deci = vtkDecimatePro::New();
     deci->SetInput(MeshPolyData);
     deci->SetTargetReduction(DecimationFactor);
     deci->PreserveTopologyOn();
     deci->BoundaryVertexDeletionOn();
     deci->SetMaximumError(VTK_DOUBLE_MAX);
     deci->Update();

The problem I am facing is that the resulting decimated mesh is actually
based on vtkFloat:
     int type = deci->GetOutput()->GetPoints()->GetDataType();

i.e. type = 10 (VTK_FLOAT), wheras I would have expected 11 (VTK_DOUBLE)
as for the original mesh.

I would have though that the data type of the decimated mesh should have
been the same as the input mesh, which is not the case.
Is this a bug? Or have I missed something?

Thanks in advance for your help/advice.
Pof





---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131130/f78aba70/attachment.htm>


More information about the vtkusers mailing list