# Axis swapped with XDMF TopologyType="3DCORECTMesh"

**URL:** https://discourse.paraview.org/t/axis-swapped-with-xdmf-topologytype-3dcorectmesh/3059
**Category:** ParaView Support
**Created:** [November 27, 2019, 2:09pm UTC](https://discourse.paraview.org/t/axis-swapped-with-xdmf-topologytype-3dcorectmesh/3059 "2019-11-27T14:09:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![illecitnom](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/i/a8b319/32.png) [@illecitnom](https://discourse.paraview.org/u/illecitnom)
#### Post date: [November 27, 2019, 2:09pm UTC](https://discourse.paraview.org/t/axis-swapped-with-xdmf-topologytype-3dcorectmesh/3059/1 "2019-11-27T14:09:08Z")

</div>

Dear all,  
I have a naive question which has probably been addressed in the past, but I was not able to find any reference about. When I import the following XDMF file in Paraview

\<?xml version="1.0" ?\> 

```
  <Topology TopologyType="3DCORECTMesh" NumberOfElements=" 81 41 21"/>
  <Geometry GeometryType="ORIGIN_DXDYDZ">
    <DataItem Name="Origin" Dimensions="3" NumberType="Float" Precision="4" Format="XML">
       0.000000 0.000000 0.000000
    </DataItem>
    <DataItem Name="Spacing" Dimensions="3" NumberType="Float" Precision="4" Format="XML">
       0.025000 0.025000 0.025000
    </DataItem>
  </Geometry>

</Grid>

```

the x- and z-axis are erroneously swapped. I guess this is not a visualization problem but a wrong data import, as in the “Information” tab I read

X Extent: 0 to 20 (should be 0 to 80)  
Z Extent: 0 to 80 (should be 0 to 20)

X Range: 0 to 0.5 (should be 0 to 2)  
Z Range: 0 to 2 (should be 0 to 0.5)

Any hint? I’m using Paraview 5.7.0 on Ubuntu 18.04

Thanks in advance

---

<div class="post-metadata">

### Author: ![stebo](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/35a633/32.png) [@stebo](https://discourse.paraview.org/u/stebo)
#### Post date: [October 28, 2020, 12:19pm UTC](https://discourse.paraview.org/t/axis-swapped-with-xdmf-topologytype-3dcorectmesh/3059/2 "2020-10-28T12:19:15Z")

</div>

I can confirm that odd behaviour, saying, that I too see that the x- and z-axis are swapped when reading in 3D data from an HDF5 file via an XDMF file using the TopologyType 3DCoRectMesh. This finally results in mirrored visualisation of the given data. I actually believe, that this swapping of data axes is a bug in Paraview. Can anyone else confirm this? Will this be solved in future versions?

Regards

---

<div class="post-metadata">

### Author: ![reox](https://discourse.paraview.org/user_avatar/discourse.paraview.org/reox/32/16237_2.png) [@reox](https://discourse.paraview.org/u/reox)
#### Post date: [July 26, 2024, 10:57am UTC](https://discourse.paraview.org/t/axis-swapped-with-xdmf-topologytype-3dcorectmesh/3059/4 "2024-07-26T10:57:06Z")

</div>

This seems to be quite a trap, as the documentation ([XDMF Model and Format - XdmfWeb](https://www.xdmf.org/index.php/XDMF_Model_and_Format#Geometry)) says the values are x,y,z - but apparently they are swapped in the reader, for example: [VTK/IO/Xdmf2/vtkXdmfReaderInternal.cxx at ff6e52da50e3b29f5c18de6d7a9e14d39548c8bb · Kitware/VTK · GitHub](https://github.com/Kitware/VTK/blob/ff6e52da50e3b29f5c18de6d7a9e14d39548c8bb/IO/Xdmf2/vtkXdmfReaderInternal.cxx#L434-L448)

Is that just an error in the documentation?
