# Using exported XDMF mesh file from FreeCAD on FEniCS

**URL:** <https://fenicsproject.discourse.group/t/using-exported-xdmf-mesh-file-from-freecad-on-fenics/5070>\
**Category:** Uncategorized\
**Created:** [February 10, 2021, 8:37pm UTC](https://fenicsproject.discourse.group/t/using-exported-xdmf-mesh-file-from-freecad-on-fenics/5070 "2021-02-10T20:37:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [February 10, 2021, 9:07pm UTC](https://fenicsproject.discourse.group/t/using-exported-xdmf-mesh-file-from-freecad-on-fenics/5070/2 "2021-02-10T21:07:30Z")

</div>

There are many post on this throughout the forum (simply search for Measure or XDMFFile) and you Get results such as:

> [@Gmsh mesh volume (and surface) is worth 0](https://fenicsproject.discourse.group/t/gmsh-mesh-volume-and-surface-is-worth-0/4944):
>
> I am facing another mesh problem, which I used to solve by using an old mesh format with gmsh (msh2), but this time this won’t fix the problem. I have the following mesh.geo: SetFactory("OpenCASCADE"); Box(1) = {0, 0, 0, 1e-2, 5e-3, 1e-4}; //+ Box(2) = {2.5e-3, 2.5e-3, 1e-4, 5e-3, 1e-4, 1e-4}; //+ BooleanFragments{ Volume{1}; Delete; }{ Volume{2}; Delete; } //+ Physical Volume("the\_box") = {1}; //+ Physical Volume("thin box") = {2}; //+ Physical Surface("end\_left") = {7}; //+ Physical Surface(…

and

> [@Different results for the same mesh created differently (Hyperelasticity)](https://fenicsproject.discourse.group/t/different-results-for-the-same-mesh-created-differently-hyperelasticity/3944/2):
>
> I claim that the meshes are not the same, see attached picture: } I would also recommend you not to use xml to load meshes, as it has been deprecated for a while. The suggested way of converting a mesh from gmsh is by using meshio. Also, to make sure that your visualization is P2 data is saved, use xdmf.write\_checkpoint. Here is a script doing all of the suggested actions: from dolfin import \* import meshio import numpy as np class Left(SubDomain): def inside(self, x,…

---

_[View the full topic](https://fenicsproject.discourse.group/t/using-exported-xdmf-mesh-file-from-freecad-on-fenics/5070)._
