# Surface: "None"-slice produces a gap

Hello,
The project I am working on calculates many cylinders and displays them. I noticed that the add_traces function takes a lot of time to add the many cylinders.
So I started (as an optimization measure) to join the individual cylinders before adding them using numpy.vstack, and then add the joined â€śsuperbodyâ€ť with a single call to add_traces.
This creates transition surfaces (see blue cylinders), which I want to avoid since I donâ€™t want all the cylinders to be directly contiguous.
The transition surfaces do not arise if I put a â€śNoneâ€ť slice between each â€ścylinder data stackâ€ť. However, this creates a gap in the display (see green cylinders) .

Is this a bug or am I doing something wrong?

Hereâ€™s an examplary code:

``````import numpy as np
import plotly.graph_objects as go

def cylinder(r, h, a=0):
theta, v = np.meshgrid(
np.linspace(0, 2*np.pi, 100),
np.linspace(a, a+h, 50)
)
x = r*np.cos(theta)
y = r*np.sin(theta)
z = v
return x, y, z

x1, y1, z1 = cylinder(2, 5, 0)
x2, y2, z2 = cylinder(4, 5, 5)

cyl1 = go.Surface(
x=x1, y=y1, z=z1,
colorscale = [[0, 'red'],[1, 'red']],
showscale=False,
opacity=0.5)

cyl2 = go.Surface(
x=x2, y=y2, z=z2,
colorscale = [[0, 'red'],[1, 'red']],
showscale=False,
opacity=0.7)

TestCombi_x = np.vstack((x1, x2))
TestCombi_y = np.vstack((y1, y2))
TestCombi_z = np.vstack((z1, z2))

TestCombi_1 = go.Surface(
x=np.vstack((x1, x2)),
y=np.vstack((y1+10, y2 + 10)),
z=np.vstack((z1, z2)),
colorscale = [[0, 'blue'],[1, 'blue']],
showscale=False,
opacity=0.7
)

NoneSlice=np.full((1,x1.shape[1]),None)

TestCombi_2 = go.Surface(
x=np.vstack((np.vstack((x1+10, NoneSlice)), x2 + 10)),
y=np.vstack((np.vstack((y1, NoneSlice)), y2)),
z=np.vstack((np.vstack((z1, NoneSlice)), z2)),
colorscale = [[0, 'green'],[1, 'green']],
showscale=False,
opacity=0.7
)

layout = go.Layout(scene_xaxis_visible=True, scene_yaxis_visible=False, scene_zaxis_visible=True)
fig =  go.Figure(data=[cyl1, cyl2, TestCombi_1, TestCombi_2], layout=layout)

fig.update_layout(scene_camera_eye_z= 0.55)

fig.show()
``````