Zrozumialem diff

This commit is contained in:
Rafał Paluch 2025-11-13 21:10:04 +01:00
parent 39b3fb47be
commit 83183b483a
1 changed files with 34 additions and 32 deletions

View File

@ -1,5 +1,7 @@
include <BOSL2/std.scad> include <BOSL2/std.scad>
$fn = 100;
dlugosc = 152; dlugosc = 152;
szerokosc = 100; szerokosc = 100;
wysokosc = 40; wysokosc = 40;
@ -33,38 +35,38 @@ dlpattern = 130;
// BOX // BOX
diff(keep = "zostaw") /* diff() */
cuboid([dlugosc, szerokosc, wysokosc], rounding = zaokraglenie, anchor = CENTER + BOTTOM) { /* cuboid([dlugosc + 4, szerokosc + 4, wysokosc], rounding = zaokraglenie, edges = [FRONT+RIGHT, FRONT+LEFT, BACK+LEFT, BACK+RIGHT], anchor = CENTER + BOTTOM) { */
up(2) /* up(2) */
tag("remove") /* tag("remove") */
cuboid([dlugosc - 2, szerokosc - 2, wysokosc], rounding = zaokraglenie, anchor = CENTER); /* cuboid([dlugosc , szerokosc , wysokosc], rounding = zaokraglenie, edges = [FRONT+RIGHT, FRONT+LEFT, BACK+LEFT, BACK+RIGHT], anchor = CENTER); */
/* diff(keep = "zostaw") */ /* } */
/* xcopies(spacing = dlkoszyczek, l = dlpattern) { */
/* tag("zostaw") */
/* position(at = BACK) */ diff(keep="szescian")
/* diff() */ // 1. Obiekt Pozytywny (Główne Pudełko)
/* cube([dlkoszyczek, szerkoszyczek, wyskoszyczek], anchor = BACK) { */ cuboid([dlugosc + 4, szerokosc + 4, wysokosc],
/* tag("remove") */ rounding = zaokraglenie,
/* cube([dlkoszyczek - 2, szerkoszyczek - 2, wyskoszyczek], anchor = CENTER); */ edges = [FRONT+RIGHT, FRONT+LEFT, BACK+LEFT, BACK+RIGHT],
/* } */ anchor = CENTER + BOTTOM) {
/* ymove(-szerkoszyczek) */
/* tag("zostaw") */ // 2. Obiekt Negatywny (Wydrążenie pudełka)
/* position(at = BACK) */ // Domyślny diff() szuka "remove"
/* diff() */ up(2)
/* cube([dlkoszyczek, szerkoszyczek, wyskoszyczek], anchor = BACK) { */ tag("remove")
/* tag("remove") */ cuboid([dlugosc, szerokosc, wysokosc],
/* cube([dlkoszyczek - 2, szerkoszyczek - 2, wyskoszyczek], anchor = CENTER); */ rounding = zaokraglenie,
/* } */ edges = [FRONT+RIGHT, FRONT+LEFT, BACK+LEFT, BACK+RIGHT],
/* } */ anchor = CENTER);
tag("szescian")
diff("dziura_w_szescianie")
cuboid([20,20,20]){
tag("dziura_w_szescianie")position(TOP) cyl(20, anchor=TOP);
}
}
}
// Przykrywka
/* up(wysokosc) */
/* diff() */
/* cube([dlugosc + 4, szerokosc + 4, 15], anchor=CENTER) { */
/* tag("remove") cube([dlugosc + 0.5, szerokosc + 0.5, 15], anchor=CENTER + TOP); */
/* ymove(-5) */
/* position(at=TOP) tag("remove") text3d("JST XH2", h=1, size=20, anchor=CENTER); */
/* } */