<p style='text-indent:20px;'>First, this paper provides a new proof for the expression of the generalized first order Melnikov function on piecewise smooth differential systems with multiply straight lines. Then, by using the Melnikov function, we consider the limit cycle bifurcation problem of a 3-piecewise near Hamiltonian system with two switching lines, obtaining <inline-formula><tex-math id="M1">\begin{document}$ 2n+3[\frac{n+1}{2}] $\end{document}</tex-math></inline-formula> limit cycles near the double generalized homoclinic loop.</p>