Let $C=\{p\in \mathbb{R^3}: \left\|p\right\|_{\infty}\le 1\}$ be a cube in $\mathbb{R}^3$. Let $X$ be a compact, path-connected topological space in $\mathbb{R}^3$ such that $X\subset C$, $\{z=1\}\cap X=(0, 0, 1)$ and $\{z=-1\}\cap X=(0, 0, -1)$.
Let $Y:=\bigcup_{n\in \mathbb{Z}} \{X+(0, 0, n)\}$.
For example if $X=S^2$, $Y$ is illustrated in the following picture 
If $\pi_1(X)=0$, it is easy to show that $\pi_1(Y)=0$.
Now suppose $\pi_1(X)\neq 0$, what can we say about $\pi_1(Y)$ ? I know this is a vague question: I'm particularly interested to know if it is true that $\pi_1(X)$ is not finitely generated, and to "compute" $\pi_1(Y)$ in the case $X\sim S^1\times S^1$.
My attempt to study $\pi_1(Y)$. Let the group $\mathbb{Z}$ act on $Y$ by traslation. The projection $p: Y\to Y/\mathbb{Z}$ is a covering map. We know that $p_*$ is injective, so $\pi_1(Y)\hookrightarrow \pi_1(Y/\mathbb{Z})$. Maybe, studying $\pi_1(Y/\mathbb{Z})$ we can have some information on $\pi_1(Y)$.