  The interplay between symmetry and topology led to the concept of
symmetry-protected topological states, including all non-interacting and weakly
interacting topological quantum states. Among them, recently proposed nodal
line semimetal states with space-time inversion ($\mathcal{PT}$) symmetry which
are classified by the Stiefel-Whitney characteristic class associated with real
vector bundles and can carry a nontrivial $\mathbb{Z}_2$ monopole charge have
attracted widespread attention. However, we know less about such 3D
$\mathbb{Z}_2$ nodal line semimetals and do not know how to construct them. In
this work, we first extend the layer construction previously used to construct
topological insulating states to topological semimetallic systems. We construct
3D $\mathbb{Z}_2$ nodal line semimetals by stacking of 2D
$\mathcal{PT}$-symmetric Dirac semimetals via nonsymmorphic symmetries. Based
on our construction scheme, effective model and combined with first-principles
calculations, we predict two types of candidate electronic materials for
$\mathbb{Z}_2$ nodal line semimetals, namely 14 Si and Ge structures and 108
transition metal dichalcogenides $MX_2$ ($M$=Cr, Mo, W, $X$=S, Se, Te). Our
theoretical construction scheme can be directly applied to metamaterials and
circuit systems. Our work not only greatly enriches the candidate materials and
deepens the understanding of $\mathbb{Z}_2$ nodal line semimetal states but
also significantly extends the application scope of layer construction.
