[Paraview] Unable to write out EnSight format with VTK_POLYHEDRON

kenichiro yoshimi rccm.kyoshimi at gmail.com
Thu Dec 8 20:04:00 EST 2011


Thanks so much for your answer. I have reported bug with attached on Mantis:
  http://www.vtk.org/Bug/view.php?id=12782
I'm glad you confirm this.

Regards,
yoshimi

2011/12/7 Robert Maynard <robert.maynard at kitware.com>:
> Hi,
>
> Can you create a bug report with the code attached as a patch please.
>
> On Thu, Dec 1, 2011 at 9:23 PM, kenichiro yoshimi
> <rccm.kyoshimi at gmail.com> wrote:
>> Hello,
>>
>> I tried to save data including VTK_POLYHEDRON meshes through "Save
>> Data" with "EnSight format", but the polyhedrons couldn't be written.
>> Probably, the reason is that vtkEnSightWriter doesn't support
>> VTK_POLYHEDRON. In my case, I change the following and work well:
>>  1. replace all "VTK_CONVEX_POINT_SET" with "VTK_POLYHEDRON".
>>  2. vtkEnSightWriter.cxx: l.620
>>  //element conenctivity information
>>  for (k=0;k<CellsByElement[elementType].size();k++)
>>    {
>>    int CellId=CellsByElement[elementType][k];
>>    vtkIdList *PointIds=input->GetCell(CellId)->GetPointIds();
>>    for (int m=0;m<PointIds->GetNumberOfIds();m++)
>>      {
>>      int PointId=PointIds->GetId(m);
>>      this->WriteIntToFile(NodeIdToOrder[PointId],fd);
>>      }
>>    }
>> ----------------------->
>>  if (elementType != VTK_POLYHEDRON)
>>    {
>>    //element conenctivity information
>>    for (k=0;k<CellsByElement[elementType].size();k++)
>>      {
>>      int CellId=CellsByElement[elementType][k];
>>      vtkIdList *PointIds=input->GetCell(CellId)->GetPointIds();
>>      for (int m=0;m<PointIds->GetNumberOfIds();m++)
>>        {
>>        int PointId=PointIds->GetId(m);
>>        this->WriteIntToFile(NodeIdToOrder[PointId],fd);
>>        }
>>      }
>>    }
>>  else
>>    {
>>    //number of faces per elements
>>    for (k=0;k<CellsByElement[elementType].size();k++)
>>      {
>>      int CellId=CellsByElement[elementType][k];
>>      int numFaces=input->GetCell(CellId)->GetNumberOfFaces();
>>      this->WriteIntToFile(numFaces,fd);
>>      }
>>    //number of nodes per faces
>>    for (k=0;k<CellsByElement[elementType].size();k++)
>>      {
>>      int CellId=CellsByElement[elementType][k];
>>      vtkCell *cell = input->GetCell(CellId);
>>      for (int m=0;m<cell->GetNumberOfFaces();m++)
>>        {
>>        int numNodes=cell->GetFace(m)->GetNumberOfPoints();
>>        this->WriteIntToFile(numNodes,fd);
>>        }
>>      }
>>      //element connectivity information
>>      for (k=0;k<CellsByElement[elementType].size();k++)
>>        {
>>        int CellId=CellsByElement[elementType][k];
>>        vtkCell *cell = input->GetCell(CellId);
>>        for (int m=0;m<cell->GetNumberOfFaces();m++)
>>          {
>>          vtkIdList *PointIds=cell->GetFace(m)->GetPointIds();
>>          for (int n=0;n<PointIds->GetNumberOfIds();n++)
>>            {
>>            int PointId=PointIds->GetId(n);
>>            this->WriteIntToFile(NodeIdToOrder[PointId],fd);
>>            }
>>          }
>>        }
>>      }
>> ------------------------------------------------------------------
>>
>> Can anyone tell me if these modifications are correct?
>>
>> Please advice
>> Thanks,
>> yoshimi
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>
>
>
> --
> Robert Maynard


More information about the ParaView mailing list