# Error while taking the union of different volume elements

Hi,
I’m trying to create a finite element mesh which consists of a cylindrical part upon which several smaller cylindrical branches are attached. I’m using the `python` API of `netgen/Ngsolve` for this. However during the meshing process, the code remains stuck at a particular position and hence the meshing is not successful. I have tried a lot and could not find a solution to the problem. The situation is more difficult as there is no particular error message produced.

Below is a minimum working example of the code which I used

``````import numpy
from netgen.csg import *

# a list containing the end points of the cylinders [p1,p2]
dataPoints =[[[0, 0, 323.31615074619043], [40, 40, 282.9016319029166]],
[[0, 0, 484.9742261192857], [40, 40, 444.55970727601186]],
[[0, 0, 646.6323014923809], [40, 40, 606.2177826491071]],
[[0, 0, 808.2903768654761], [40, 40, 767.8758580222024]],
[[0, 0, 969.9484522385713], [40, 40, 929.5339333952975]],
[[0, 0, 1131.6065276116665], [40, 40, 1091.1920087683927]]]

# A function which creates a cylinder using Netgen
pnt1 = Pnt(p1, p1, p1)
pnt2 = Pnt(p2, p2, p2)
dir1 = numpy.subtract(p1, p2)
dir2 = numpy.subtract(p2, p1)
vec1 = Vec(dir1, dir1, dir1)
vec2 = Vec(dir2, dir2, dir2)
plane1 = Plane(pnt1, vec1)
plane2 = Plane(pnt2, vec2)
return cyl * plane1 * plane2

#Initializing the geo object by creating the trunk structure

# going through  the list hence attaching each cylinder to the main branch
for i in range(0, 6):
print("i = ", i)
i_pnt = dataPoints[i]