# [Gmsh] Issue with if statements and planes

Jimmie Lahti jimmie.lahti at malags.se
Tue Feb 9 08:08:53 CET 2016

```Hello,

I have been trying to solve an issue where I can decide if the 2d plane shall have a hollow structure or not. Please note that I have tried changing numbering  and if I comment any half of the if statement it works. So the issue seems to be the double definition of the Plane.

The error message I get is:
"""
Info    : Running 'gmsh -2 hollowbowtie.geo' [Gmsh 2.10.1, 1 node, max. 1 thread]
Info    : Started on Mon Feb  8 14:47:23 2016
Info    : Reading 'hollowbowtie.geo'...
Error   : 'hollowbowtie.geo', line 118 : syntax error (Plane)
Info    : Done reading 'hollowbowtie.geo'
"""

The code:
"""
106 If (hollow_length > 0)
107         Circle(9) = {9, 21, 10};
108         Circle(10) = {11, 19, 12};
109         Circle(11) = {12, 18, 13};
110         Circle(12) = {13, 20, 14};
111         Line(13) = {9, 14};
112         Line(14) = {11, 10};
113         Line Loop(16) = {13, -12, -11, -10, 14, -9};
114
115         Plane Surface(17) = {15, 16};
116         Physical Surface(18) = {17};
117 Else
118         Plane Surface(30) = {15};
119         Physical Surface(31) = {30};
120 EndIf
"""

Thanks for your help,
Jimmie Lahti
Electronic engineer

Mobile No number
Direct +46 953 34 565
jimmie.lahti at guidelinegeo.com<mailto:jimmie.lahti at guidelinegeo.com>

Guideline Geo AB
http://www.guidelinegeo.com<http://www.guidelinegeo.com/>
http://www.abem.se<http://www.abem.se/>
http://www.malags.se<http://www.malags.se/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20160209/1e7ec4ee/attachment.html>
```

More information about the gmsh mailing list