Make me a loaf of bread before I'm fired!
Charcoal, 35 33 30 bytes
Saved 2 bytes thanks to @ASCII-only
Saved 3 bytes thanks to @Neil by rearranging the order in which the lines where drawn
NωNηNδ↓η↗→×_ω↑η←\←ω↗δ→/ω↓\↓η↙δ
Try it online!
This is my first try at Charcoal. I heard it was good at ascii-art, so I tried it out.
Explanation (outdated)
NωNηNδ # Take the width, height and depth as input
↗¹ # Write 1 /
↗δ # Write depth times /
¶ω # Move the cursor down and write - width times
\ # Write \
↙↓η # Move the cursor one down and one left, and then write | height times
↙δ # Write / depth times
Now the back part of the loaf is complete. Now comes the front face.
↑↑η # Go up and write | height times
←\ # Write a \ and move 1 to the left
←ω # Write - width times
↓↓η # Go down and write | height times
↗P×_ω # Go northeast and write _ width times
C, 270 290 320 328 bytes
#define P printf(
p(n,s)char*s;{P s,--n&&p(n,s));}i,j,k;f(w,h,d){P "%*c",d+1,47);p(w,"-");P "\\\n");for(i=d,j=h,k=0;--i;)P "%*c%*c\n",i+1,47,w+d+1-i-k+!!k,j-->0?124:(++k>0)*47);P "/");p(w,"-");P "\\%*c\n",d-k,j-->0?124:47);for(k&&k++;++i<h;)P "|%*c%*c\n",w+1,124,d-k>!k?d+1-k-!k:0,j-->0?124:(++k>0)*47);P "|");p(w,"_");P "|/");}
Finally (after two three incorrect versions) it works correctly with large sizes also.
Try it online!
JS (ES6), 375 bytes
s=(s,t)=>s.repeat(t);(d,c,e)=>{z=" ",y=`
`,x="\\",w="/",v="|",u="-";a=s(z,e--);a=a+w+s(u,d);a+=x+y;for(b=0;b<e;b++)a+=s(z,e-b),b<c?(a+=w,a+=s(z,d+b+1),a+=v):(a+=w,a+=s(z,d+c+1),a+=w),a+=y;a=a+w+s(u,d);a+=x;f=0;b<c?(a+=s(z,e),a+=v):(a+=s(z,c-f),a+=w);b++;f++;a+=y;for(g=0;g<c;g++)a+=v,a+=s((g==c-1?"_":z),d),a+=v,b<c?(a+=s(z,e),a+=v):(a+=s(z,c-f),a+=w),b++,f++,a+=y;return a}
Ungolfed:
var proc = function(width, height, depth){
var str = "";
//Back of loaf (depth)
str += " ".repeat(depth);//initial padding before start of back of loaf
str += "/";//top left corner of back of loaf
str += "-".repeat(width);//top edge of back of loaf
str += "\\";//top left corner of back of loaf
str += "\n";//end line
//Depth lines
for(var i = 0; i < depth - 1; i++){
console.log(i)
str += " ".repeat(depth - i - 1);//space padding before start of left middle edge
if(i < height){
//str += " ".repeat(depth - i - 2);
str += "/";//left middle edge
str += " ".repeat(width + i + 1);//middle of loaf
str += "|";//end that edge
str += "\n";//end line
}else{
str += "/";//left middle edge
str += " ".repeat(width + height + 1);//between two /s
str += "/";//right middle edge
str += "\n";//end line
}
}
//front top edge of loaf
str += "/";//top left corner
str += "-".repeat(width);//top edge
str += "\\";//top right corner
var i3 = 0;
if(i < height){
str += " ".repeat(depth - 1);//space for the incoming far right edge
str += "|";//far right edge
i++;
i3++;
}else{
str += " ".repeat(height - i3);//space for the incoming far right edge
str += "/";//far right edge
i++;
i3++;
}
str += "\n";//newline
for(var i2 = 0; i2 < height; i2++){
str += "|";//left edge
str += (i2 === height - 1 ? "_" : " ").repeat(width);//if we are at the bottom, use underscores to mark that, otherwise spaces.
str += "|";
if(i < height){
str += " ".repeat(depth - 1);//space for the incoming far right edge
str += "|";//far right edge
i++;
i3++;
}else{
str += " ".repeat(height - i3);//space for the incoming far right edge
str += "/";//far right edge
i++;
i3++;
}
str += "\n";//newline
}
return str;
};
s=(s,t)=>s.repeat(t);
var bakeBread = (d,c,e)=>{z=" ",y=`
`,x="\\",w="/",v="|",u="-";a=s(z,e--);a=a+w+s(u,d);a+=x+y;for(b=0;b<e;b++)a+=s(z,e-b),b<c?(a+=w,a+=s(z,d+b+1),a+=v):(a+=w,a+=s(z,d+c+1),a+=w),a+=y;a=a+w+s(u,d);a+=x;f=0;b<c?(a+=s(z,e),a+=v):(a+=s(z,c-f),a+=w);b++;f++;a+=y;for(g=0;g<c;g++)a+=v,a+=s((g==c-1?"_":z),d),a+=v,b<c?(a+=s(z,e),a+=v):(a+=s(z,c-f),a+=w),b++,f++,a+=y;return a}
<input type = "number" id = "a1">
<br/>
<input type = "number" id = "a2">
<br/>
<input type = "number" id = "a3">
<br/>
<button onclick = "document.getElementById('textarea').innerText = bakeBread(+(document.getElementById('a1').value), +(document.getElementById('a2').value), +(document.getElementById('a3').value))">Bake Bread!</button>
<br/>
<textarea id = "textarea"></textarea>