# Physical Curves and Points from gmsh

**URL:** <https://fenicsproject.discourse.group/t/physical-curves-and-points-from-gmsh/16064>\
**Category:** I/O\
**Tags:** mesh\
**Created:** [October 18, 2024, 8:51am UTC](https://fenicsproject.discourse.group/t/physical-curves-and-points-from-gmsh/16064 "2024-10-18T08:51:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bay\_swiss](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/bay_swiss/32/8778_2.png) [@bay\_swiss](https://fenicsproject.discourse.group/u/bay_swiss)\
**Post date:** [October 18, 2024, 8:51am UTC](https://fenicsproject.discourse.group/t/physical-curves-and-points-from-gmsh/16064/1 "2024-10-18T08:51:54Z")

</div>

Good morning everyone,

I am aware that the `dolfinx.io.gmshio` functions `model_to_mesh` and `read_from_mesh` return (only) the triplet `(mesh, cell_tags, facet_tags)`, but I was wondering if there was an easy way to retrieve the equivalent tags for edges and points (from gmsh Physical Curves and Physical Points, respectively).

Thank you in advance, as always.

P.S. I am working with a 3D domain!

---

<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:** [October 18, 2024, 3:14pm UTC](https://fenicsproject.discourse.group/t/physical-curves-and-points-from-gmsh/16064/2 "2024-10-18T15:14:18Z")

</div>

@Henrik_Nicolay_Finsb has a function for this:

> <https://github.com/ComputationalPhysiology/cardiac-geometriesx/blob/f7d304600972992299ef6d3938adeebd4c4e2af2/src/cardiac_geometries/utils.py#L47>

---

<div class="post-metadata">

**Author:** ![bay\_swiss](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/bay_swiss/32/8778_2.png) [@bay\_swiss](https://fenicsproject.discourse.group/u/bay_swiss)\
**Post date:** [October 18, 2024, 4:05pm UTC](https://fenicsproject.discourse.group/t/physical-curves-and-points-from-gmsh/16064/3 "2024-10-18T16:05:46Z")

</div>

I was just wondering if I needed to extend the model\_to\_mesh function, but I see it has already been done! Thanks!

---

<div class="post-metadata">

**Author:** ![bay\_swiss](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/bay_swiss/32/8778_2.png) [@bay\_swiss](https://fenicsproject.discourse.group/u/bay_swiss)\
**Post date:** [October 22, 2024, 4:18pm UTC](https://fenicsproject.discourse.group/t/physical-curves-and-points-from-gmsh/16064/4 "2024-10-22T16:18:20Z")

</div>

@dokken This works flawlessly. May I ask why it is not implemented in main dolfinx?

---

<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:** [October 22, 2024, 6:37pm UTC](https://fenicsproject.discourse.group/t/physical-curves-and-points-from-gmsh/16064/5 "2024-10-22T18:37:41Z")

</div>

Mainly because I didn’t think it was needed at the time I added gmshio.  
It’s on the todo to propose adding it (but my todo is lengthy). Anyone else could propose it

---

<div class="post-metadata">

**Author:** ![bay\_swiss](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/bay_swiss/32/8778_2.png) [@bay\_swiss](https://fenicsproject.discourse.group/u/bay_swiss)\
**Post date:** [October 24, 2024, 8:14am UTC](https://fenicsproject.discourse.group/t/physical-curves-and-points-from-gmsh/16064/6 "2024-10-24T08:14:31Z")

</div>

I can do that. Maybe I could even start with contributing to the main dolfinx 😱
