# A problem about 3D mesh generation

**URL:** <https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821>\
**Category:** General Discussion\
**Created:** [June 19, 2022, 2:59am UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821 "2022-06-19T02:59:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [June 19, 2022, 2:59am UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821/1 "2022-06-19T02:59:49Z")

</div>

Hi,everyone,

I have a question about `tetgreconstruction`. I give two files as follows, The difference between them is only the parameter **hsize**. However, `test2.edp` gives a wrong result. I’m confused about this.

Thank you in advance.  
[test1.edp](https://community.freefem.org/uploads/short-url/lQTh6q0bIE2AicVJ3LDKTZZhHrF.edp) (1.8 KB)  
[test2.edp](https://community.freefem.org/uploads/short-url/sAVbG6cwOsEOl0um9r0sHQ9tClM.edp) (1.8 KB)

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [June 19, 2022, 3:13pm UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821/2 "2022-06-19T15:13:51Z")

</div>

I sorry on my computer I get the same result,

What is wrong!

---

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [June 19, 2022, 4:13pm UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821/3 "2022-06-19T16:13:56Z")

</div>

Thank you Prof. Hecht.

I get the following results, the first picture is the result of `test1.edp`, which is correct. But the second picture displays nothing, and it give **nan** in terminal.

 ![test1](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/c/c3681bf2f4ee2d75f957b5f0ee368240eeae290e.png)  
 ![test2](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/9/9e1403acbd57d90e3a77b465ef537129d1e27d9a.png)

---

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [June 19, 2022, 4:18pm UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821/4 "2022-06-19T16:18:59Z")

</div>

The installed version in my computer is 4.7, the problem maybe this?

---

<div class="post-metadata">

**Author:** ![RYP](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RYP](https://community.freefem.org/u/RYP)\
**Post date:** [June 20, 2022, 9:52am UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821/5 "2022-06-20T09:52:19Z")

</div>

Thank you very much Prof. Hecht.

I install the latest version 4.11, the problem is solved.

---

<div class="post-metadata">

**Author:** ![qingYang](https://avatars.discourse-cdn.com/v4/letter/q/9f8e36/32.png) [@qingYang](https://community.freefem.org/u/qingYang)\
**Post date:** [December 17, 2023, 1:54am UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821/6 "2023-12-17T01:54:26Z")

</div>

Good morning，Prof. Hecht.I am a beginner at FreeFEM. Without external import, can the 3D mesh provided by this software only generate layer meshes?

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [December 18, 2023, 9:16am UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821/7 "2023-12-18T09:16:35Z")

</div>

Yes, the function buildlayer do this !

---

<div class="post-metadata">

**Author:** ![qingYang](https://avatars.discourse-cdn.com/v4/letter/q/9f8e36/32.png) [@qingYang](https://community.freefem.org/u/qingYang)\
**Post date:** [December 18, 2023, 10:00am UTC](https://community.freefem.org/t/a-problem-about-3d-mesh-generation/1821/8 "2023-12-18T10:00:54Z")

</div>

```
Prof. Hecht,I am very honored to receive your reply. I have tried “buildlayers mesh” to build a 3D mesh, but now I am encountering a new problem. For an externally imported 3D mesh (read mesh), I want to obtain its bottom mesh (2D mesh), and then use this 2D mesh to build layers mesh. I would like to receive your suggestions on how to implement it.
Thank you again and look forward to your reply

```
