I don't know if this might be a problem later, but you are saying here that a that finite element that is a line with 2 nodes (or a Quad4 or a Hex8) is always isoparametric. 
I don't know the mathematical background for this code but is this still true if you have a line mesh that "randomly" twists in 3D space and has line-elements of different length?