Analogy between the twist-bend nematic and the smectic A phases and coarse-grained description of the macroscopic NTB properties