diff --git a/Dom/Wiedzmin_stary_swiat/na_karty.scad b/Dom/Wiedzmin_stary_swiat/na_karty.scad new file mode 100644 index 0000000..4a16656 --- /dev/null +++ b/Dom/Wiedzmin_stary_swiat/na_karty.scad @@ -0,0 +1,62 @@ +include + +// EDITABLE VARIABLES + +$fn = 36; + +// [wysokość pliku kart, "tekst", rozmiar tekstu], +tab = [ + [35, "Karty Akcji", 10], + [19, "Karty Akcji postaci", 8], + // [4, "Atrybuty", 10], // za małe + [14, "Eksploracja Miasta", 8], + [14, "Eksploracja Dziczy", 8], + [21, "Zdarzenia", 10], + [11, "Eliksiry", 10], + [7.5 + 4 + 6, "Trofea szkół + Atrybuty + INNE", 5], + [18, "Potwory i ataki", 10] + // [6, "INNE", 10] +]; + +// rozmiar karty +card = [65,100]; +t = 2; + +// END OF EDITABLE VARIABLES + +out = [card[0]+2*t, card[1]+2*t]; + +module box(h,txt, txt_size) { + // bottom box + difference() { + // main body + cuboid([each out, h],anchor=BOTTOM, rounding=t/2); + text3d(txt, h=t, orient=DOWN, center=true, spin=90, size=txt_size); + // hole for cards + up(t) cuboid([each card, h-t], anchor=BOTTOM); + // cutouts + up(t) cuboid([card[0]/2 + t, card[1]*2, h-t], anchor=BOTTOM, rounding=-t, edges=TOP); + up(t) cuboid([card[0]*2, card[1]/2 + t, h-t], anchor=BOTTOM, rounding=-t, edges=TOP); + } + // top cover + fwd(out[1] + 10) + union() { + // cover + difference() { + cuboid([each out, t],anchor=BOTTOM, rounding=t/2); + text3d(txt, h=t, orient=DOWN, center=true, spin=90, size=txt_size); + } + up(t/2) cuboid([each card, t],anchor=BOTTOM, chamfer=t/2); + // side wings + left(out[0]/2 - t/2) cuboid([t,card[1]/2,h/2], anchor=BOTTOM, rounding=t/2); + right(out[0]/2 - t/2) cuboid([t,card[1]/2,h/2], anchor=BOTTOM, rounding=t/2); + + fwd(out[1]/2 - t/2) cuboid([card[0]/2,t,h/2], anchor=BOTTOM, rounding=t/2); + back(out[1]/2 - t/2) cuboid([card[0]/2,t,h/2], anchor=BOTTOM, rounding=t/2); + + } +} + +for(i=[0:len(tab)-1]) { + left((out[0] + t)*i) box(tab[i][0], tab[i][1], tab[i][2]); +} \ No newline at end of file