0
Jelly, 5 bytes
Takes input in the form \$[[x_1,x_2],[y_1,y_2],[z_1,z_2]]\$. If you want them to be two lists of x-y-z coordinates, just prepend Z to the beginning of the program.
ṁ4ÆḊƝ
Try it online!
Here is an explanation of how this works. I'll migrate it to SE markdown shortly.