fogón

← CiudadObjeto 3Dfogon/ibc-tote

Tanque en jaula

de fogonCC09554 bloques
Tanque en jaulaArrastrá para girarlo
// «Tanque en jaula» · propio
// An IBC tote: a white translucent plastic cube tank inside a grey metal cage of crossed bars, a blue cap on top and a valve at the bottom front, standing on a plastic pallet.

// An IBC tote: a white plastic tank, half full, inside a cage of steel bars, on a plastic pallet. Valve at the front.
const PALLET = { base: "#34373c", light: "#4c5057", dark: "#25272b" };
const TANK = { dry: "#f3f5f4", dryShade: "#e4e8e7", wet: "#d3e3e8", wetShade: "#c1d5dc", level: "#a9c5cf" };
const CAGE = { base: "#9aa0a6", light: "#b9bfc5", dark: "#787e84" };
const BLUE = "#2f6fd0", BLUE_LIGHT = "#5a94ec", BLUE_DARK = "#2356a6";

// The pallet: nine feet and a deck.
for (const x0 of [7, 21, 35])
  for (const y0 of [7, 21, 35]) {
    box(x0, y0, 0, x0 + 5, y0 + 5, 3, PALLET.base);
    box(x0, y0, 0, x0 + 5, y0 + 5, 0, PALLET.dark);
  }
box(7, 7, 4, 40, 40, 4, PALLET.light);
box(8, 8, 4, 39, 39, 4, PALLET.base);

// The tank: a shell with rounded edges. The liquid shows through up to its level.
const LEVEL = 24;
for (let x = 9; x <= 38; x++)
  for (let y = 9; y <= 38; y++)
    for (let z = 5; z <= 35; z++) {
      const dx = Math.min(x - 9, 38 - x), dy = Math.min(y - 9, 38 - y), dz = Math.min(z - 5, 35 - z);
      if (Math.min(dx, dy, dz) > 0) continue; // hollow
      if ((dx === 0 && dy === 0) || (dx === 0 && dz === 0 && z > 5) || (dy === 0 && dz === 0 && z > 5)) continue; // rounded
      const wet = z < LEVEL, shade = rand() < 0.1;
      let c = wet ? (shade ? TANK.wetShade : TANK.wet) : shade ? TANK.dryShade : TANK.dry;
      if (z === LEVEL) c = TANK.level;
      if (z === 35) c = TANK.dry;
      set(x, y, z, c);
    }
// The filling cap, a little vent beside it.
for (let x = 18; x <= 29; x++)
  for (let y = 18; y <= 29; y++) {
    const r = Math.hypot(x - 23.5, y - 23.5);
    if (r <= 5.2) set(x, y, 36, BLUE_DARK);
    if (r <= 4.4) set(x, y, 37, r <= 2.4 ? BLUE_LIGHT : BLUE);
    if (r <= 4.4 && r > 3.4 && (x + y) % 2 === 0) set(x, y, 37, BLUE_DARK); // the grip around it
  }
box(32, 32, 36, 33, 33, 36, BLUE);

// The cage: bars up and bars across on the four sides, a rim at the top and two bars over the tank.
const bars = [8, 13, 18, 23, 24, 29, 34, 39];
for (let a = 8; a <= 39; a++)
  for (let z = 5; z <= 36; z++) {
    const up = bars.includes(a), across = (z - 5) % 5 === 0 || z === 36;
    if (!up && !across) continue;
    const c = up && across ? CAGE.light : across ? CAGE.base : CAGE.dark;
    set(a, 8, z, c); set(a, 39, z, c); set(8, a, z, c); set(39, a, z, c);
  }
for (const y of [16, 31]) box(8, y, 36, 39, y, 36, CAGE.base);
for (const [x, y] of [[8, 8], [39, 8], [8, 39], [39, 39]]) box(x, y, 5, x, y, 36, CAGE.light);

// A blank plate on the front and the valve below it, with its red handle.
box(17, 7, 18, 30, 7, 28, "#e9ebee");
box(17, 7, 26, 30, 7, 28, BLUE);
for (let x = 17; x <= 30; x++) { set(x, 7, 18, "#aab0b6"); }
box(21, 5, 6, 26, 8, 10, "#2b2d31");
box(22, 4, 7, 25, 4, 9, "#3b3e44");
box(23, 3, 7, 24, 3, 9, "#d9b23a");
box(20, 6, 11, 27, 7, 11, "#d2452f");
box(23, 6, 11, 24, 7, 12, "#b8372a");