I have the following code.
Bk = {{{0, 0}, {62, 61}, 1}, {{0, 0}, {60, 50},
2}, {{0, 50}, {60, 100}, 2}, {{60, 50}, {120, 100}, 2}};
rec = {};
graficar[bk_List] := Module[{placas, lamina, medidas, dibujo,i},
placas = Max[bk[[;; , 3]]];
For[i = 1, i <= placas, i++,
lamina = Most[#] & /@ Cases[bk, {{_, _}, {_, _}, i}];
dibujo =
Graphics[
Prepend[Apply[Rectangle, lamina, 1], {Red,
Rectangle[{0, 0}, {120, 100}]}],
PlotLabel -> "Lámina número " <> ToString[i]];
AppendTo[rec, dibujo]
]
]
graficar[Bk]
and rec request I get the following graph
.
and I want something like:
Any Help is welcome,thanks in advance.