#Java 8, 341 bytes
#Java 8, 341 bytes
Java 8, 341 bytes
#Java 8, 341 bytes
n->{int i=n.length*2,j=i+1,k=0,t;String l[]=new String[j],x;for(;j-->0;l[j]="");for(;i>0;l[i--]+=" "+x.substring(5,7),l[i--]+=x.substring(2,5),l[i]+=x.substring(0,2))for(x="/~~ ~~/ ~ ~ /~ / ~//~ /~ / ~~/~ / ~/~ // ~/~~//~ ~ /~~/~~//~~/~ /".replace('~','\\').substring(t=(n[k++]-48)*7,t+7),j=i-2;j-->0;)l[j]+=" ";return"".join("\n",l);} Port of @Shion's C# .NET answer, so make sure to upvote him as well!
Explanation:
n->{ // Method with character-array parameter and String return-type int i=n.length*2, // Two times the length of the input array j=i+1, // Index integer, starting at `i+1` k=0,t; // Temp integers String l[]=new String[j],// String-array for the rows, default filled with `null` x; // Temp-String for(;j-->0;l[j]=""); // Replace all `null` with empty Strings for(;i>0 // Loop `i` downwards in the range [`n.length*2`, 0) ; // After every iteration: l[i--]+= // Append the row at index `i` with: // (and decrease `i` by 1 afterwards with `i--`) " " // A space +x.substring(5,7),// And the 6th and 7th characters of temp-String `x` l[i--]+= // Append the row at index `i` with: // (and decrease `i` by 1 afterwards with `i--`) x.substring(2,5), // The 3rd, 4th and 5th characters of temp-String `x` l[i]+= // Append the row at index `i` with: x.substring(0,2)) // The 1st and 2nd characters of the temp-String `x` for(x="/~~ ~~/ ~ ~ /~ / ~//~ /~ / ~~/~ / ~/~ // ~/~~//~ ~ /~~/~~//~~/~ /".replace('~','\\') // String containing all digit-parts .substring(t=(n[k++]-48)*7,t+7), // and take the substring of 7 characters at index // `n[k]` as integer multiplied by 7 j=i-2;j-->0;) // Inner loop `j` in the range (`i`-2, 0] l[j]+=" "; // And append the rows at index `j` with two spaces return"".join("\n",l);} // Return the rows delimited with new-lines