# Geometry Plotting Issue

**URL:** <https://fluka-forum.web.cern.ch/t/geometry-plotting-issue/2031>\
**Category:** Flair\
**Created:** [14 July 2021 13:15 UTC](https://fluka-forum.web.cern.ch/t/geometry-plotting-issue/2031 "2021-07-14T13:15:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnikolop](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/n/d9b06d/32.png) [@nnikolop](https://fluka-forum.web.cern.ch/u/nnikolop)\
**Post date:** [14 July 2021 13:15 UTC](https://fluka-forum.web.cern.ch/t/geometry-plotting-issue/2031/1 "2021-07-14T13:15:40Z")

</div>

Dear Community,

I am facing a plotting issue of a similar nature to the one described by @makeclean on the following topic:

[“plotting problem”](https://fluka-forum.web.cern.ch/t/plotting-problem/1138).

In particular, I have replicated the example that can be found under the “Worked Example” section of the link:

[“worked example”](http://svalinn.github.io/DAGMC/usersguide/uw2.html)

and successfully simulated it using flair and the mainfludag executable.

The problem is that I am unable to plot the geometry using the plot panel of flair (Gnuplot). I have selected intervals such that the predefined geometry is enclosed by the plotted area.

In my understanding after hitting the plot button a temporary input file is produced along with a PLOTGEOM.STORE file which is converted to a gnuplot readable file (with a .dat extension if I am not mistaken).

Even though a PLOTGEOM.store file is produced in my case thanks to the PLOTGEO card I defined in the input file, hitting the plot button produces the error depicted in the attached screenshot. After inspecting the temporary input files produced by flair they seem to be incomplete (second screenshot attached), which is strange.

I am also attaching to this post all files I used for this simulation (i.e. .flair, .inp, .h5m) as well as the files produced after attempting to plot the geometry. Any suggestions on how to plot my geometry using gnuplot are more than welcome.

Kind regards,  
Nikos.

 ![PLOT_&_OUTPUT_TABS](https://fluka-forum.web.cern.ch/uploads/default/original/2X/4/464cb994821b61b11e6fedbc987e8ffd876ee9b6.png)

 ![TEMPORARY_INPUT_FILE](https://fluka-forum.web.cern.ch/uploads/default/original/2X/e/ea0b81ca3ff97646301fd1cb08898eb3bae8f756.png)

[flair\_generated\_files.zip](https://fluka-forum.web.cern.ch/uploads/short-url/amq4Gzx2NOmVpVPvpiRAM9Nz4mK.zip) (103.2 KB)  
[flair\_input\_files.zip](https://fluka-forum.web.cern.ch/uploads/short-url/zr6Ng1Vn1Hfn29fbGIGBBlPFDpD.zip) (9.5 KB)

---

<div class="post-metadata">

**Author:** ![makeclean](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/c5a1d2/32.png) [@makeclean](https://fluka-forum.web.cern.ch/u/makeclean)\
**Post date:** [14 July 2021 13:36 UTC](https://fluka-forum.web.cern.ch/t/geometry-plotting-issue/2031/3 "2021-07-14T13:36:35Z")

</div>

Hi @nnikolop you need to apply a small patch/correction to Flair, in fluka/input.py

Starting with line 2576, comment out the if flugg line and add the if not flugg line

```auto
		self.write(geoline[0]+"\n")
# if flugg:                                                                 
# self.close()                                                      
# return None                                                       

	        # If VOXELS are present, write the first active one                       
	        if "VOXELS" in self.cards:
                        for card in self.cards["VOXELS"]:
				if card.notIgnore():
	                                self.write(card.toStr(fmt=FlukaCard.FORMAT_FREE)+\
"\n")
	                                break

		if not flugg:
		        self.write(geoline[1]+"\n") # Write title   

```

Then you should be fine

Thanks

Andy

---

<div class="post-metadata">

**Author:** ![nnikolop](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/n/d9b06d/32.png) [@nnikolop](https://fluka-forum.web.cern.ch/u/nnikolop)\
**Post date:** [14 July 2021 15:37 UTC](https://fluka-forum.web.cern.ch/t/geometry-plotting-issue/2031/4 "2021-07-14T15:37:16Z")

</div>

Hi @makeclean,

thank you for providing the patch for flair, I went ahead and edited the input.py python script like so:

 ![input.py_EDITED](https://fluka-forum.web.cern.ch/uploads/default/original/2X/1/13dc46daaaeab786754d6848c947241b5ea3cede.png).

I still get a similar error (i.e. no PLOTGEOM.store file produced):

 ![PLOT_&_OUTPUT_TABS](https://fluka-forum.web.cern.ch/uploads/default/original/2X/b/b6f639821c7b668f12a1dc5e89ca36b3b873c6f4.png).

Also, the temporary input file looks like this (the double end statement may be causing trouble here):

 ![TEMPORARY_INPUT_FILE](https://fluka-forum.web.cern.ch/uploads/default/original/2X/f/ffc8039bede143bb5b9668529bb94a6676672e18.png)

the temporary file with a .err extension contains this message: **Geoinp: unknown input card END**.

Thanks again,  
Nikos.

---

<div class="post-metadata">

**Author:** ![makeclean](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/c5a1d2/32.png) [@makeclean](https://fluka-forum.web.cern.ch/u/makeclean)\
**Post date:** [14 July 2021 19:50 UTC](https://fluka-forum.web.cern.ch/t/geometry-plotting-issue/2031/5 "2021-07-14T19:50:58Z")

</div>

Sorry Nikos, i didnt test this before I sent it to you, this came from memory, let me test it this time, then get back to you

---

<div class="post-metadata">

**Author:** ![makeclean](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/c5a1d2/32.png) [@makeclean](https://fluka-forum.web.cern.ch/u/makeclean)\
**Post date:** [14 July 2021 19:55 UTC](https://fluka-forum.web.cern.ch/t/geometry-plotting-issue/2031/6 "2021-07-14T19:55:05Z")

</div>

Sorry Nikos, one extra thing, you need indent the \_\_write\_geometry line too.

So

```auto
                if not flugg:
                        self.write(geoline[1]+"\n") # Write title             

		self._writeGeometry(FlukaCard.FORMAT_FREE, FlukaCard.FORMAT_FREE)

```

becomes

```auto
                if not flugg:
                        self.write(geoline[1]+"\n") # Write title             
                        self._writeGeometry(FlukaCard.FORMAT_FREE, FlukaCard.FORMAT_FREE)

```

---

<div class="post-metadata">

**Author:** ![rversaci](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@rversaci](https://fluka-forum.web.cern.ch/u/rversaci)\
**Post date:** [13 August 2021 06:24 UTC](https://fluka-forum.web.cern.ch/t/geometry-plotting-issue/2031/7 "2021-08-13T06:24:13Z")

</div>

Closed on 13 August 2021 06:24 UTC


