# How can i make a T-shaped mesh

**URL:** https://community.freefem.org/t/how-can-i-make-a-t-shaped-mesh/1215
**Category:** General Discussion
**Created:** [September 21, 2021, 6:15am UTC](https://community.freefem.org/t/how-can-i-make-a-t-shaped-mesh/1215 "2021-09-21T06:15:59Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Emma87](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@Emma87](https://community.freefem.org/u/Emma87)
#### Post date: [September 23, 2021, 12:56pm UTC](https://community.freefem.org/t/how-can-i-make-a-t-shaped-mesh/1215/5 "2021-09-23T12:56:47Z")

</div>

Hi Daniela,  
You should generate the mesh counterclockwise, see the following example:

//  
border A(t=0,0.5){x=2+t;y=0; label=1;};  
border B(t=0,2.5){x=2.5;y=t;label=2;};  
border C(t=0,0.5){x=2.5+t;y=2.5;label=3;};  
border D(t=0,0.5){x=3;y=2.5+t;label=4;};  
border E(t=0,1){x=3-1.5\*t;y=3;label=5;};  
border F(t=0,0.5){x=1.5;y=3-t;label=6;};  
border G(t=0,0.5){x=1.5+t;y=2.5;label=7;};  
border H(t=0,2.5){x=2;y=2.5-t;label=8;};  
int n=10;  
mesh Th=buildmesh(A(n)+ B(n)+ C(n)+ D(n)+ E(n)+ F(n)+ G(n)+ H(n));  
plot(Th,wait=1

 ![mesh-T](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/21f98ba180290cec20ed9a2c11ba7485df03c814.png)  
);

---

_[View the full topic](https://community.freefem.org/t/how-can-i-make-a-t-shaped-mesh/1215)._
