Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Raya 1-5 files #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions src/main/scad/yavuz-demirhan/Raya1.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
include <puzzlecad2.scad>
mnedeljko marked this conversation as resolved.
Show resolved Hide resolved

box_puzzle_scale = 15;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using a scale of 17 for this type of puzzle; I'd suggest we standardize on that for consistency

box_puzzle_border = 6;
$burr_inset = 0.16;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for going with 0.16 mm inset rather than 0.125 (as in other packing puzzles)? Was the smaller inset too tight on your prints?

(I'm not necessarily objecting to a larger inset, but we should be consistent... i.e. use the same value here as in Mushkila and the other packing puzzles, unless there's a good reason they should be different)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Aaron, on my printer 0.125 seems to be too tight for packing puzzles but I agree it should be standard. I will adjust to standard.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. I have gotten reports from other users that default tolerances are too tight.. it seems there is a lot of variation in tolerances by printer. I am thinking it might make sense to distribute two versions of every puzzle with different tolerances (as different STLs, built from the same .scad)...

long = box_puzzle_scale * 4; // voxels long
wide = box_puzzle_scale * 3; // voxels wide
high = box_puzzle_scale * 2; // voxels high
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This nomenclature seems a little confusing (there are two sets of dimensions defined with similar names). My suggestion is to declare like so:

interior_dim = [4, 3, 2] * box_puzzle_scale;

Then you can use interior_dim.x, interior_dim.y, and interior_dim.z to refer to the individual coordinate dimensions, if needed.


dimlong = long + box_puzzle_border * 2;
dimwide = wide + box_puzzle_border * 2;
height = high + box_puzzle_border;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you follow my suggestion above, this can become

dim = interior_dim + [box_puzzle_border * 2, box_puzzle_border * 2, box_puzzle_border];

Then dim.x, dim.y, dim.z will refer to the outer dimensions.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I did not know dimensions could be done as vectors. This is much better.


mid = box_puzzle_border / 2 + 0.5;
far = dimlong - mid;
far2 = dimwide - mid;

pieces();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have a * in front of it as well.

*box();
*cap();

module pieces() {
burr_plate([
["xx|xx"], //piece A
["x..|xxx"],//piece B
mnedeljko marked this conversation as resolved.
Show resolved Hide resolved
], $burr_scale = box_puzzle_scale,$plate_width = 150,$burr_bevel = 1.0);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code style: add a space after the commas (also applies below)

}

module box() {

difference() {
beveled_cube([dimwide, dimlong, height]);
translate([box_puzzle_border - $burr_inset, box_puzzle_border - $burr_inset, box_puzzle_border- $burr_inset])
cube([
wide + $burr_inset * 2,
long + $burr_inset * 2,
high + $burr_inset * 1]);
mnedeljko marked this conversation as resolved.
Show resolved Hide resolved
}
translate([mid, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([mid, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);

}

module cap() {
render(convexity = 2)
translate([0,0,height])
difference() {
beveled_cube([dimwide, dimlong, box_puzzle_border]);
//first cutout removal
translate([box_puzzle_border - $burr_inset,box_puzzle_border+.5*box_puzzle_scale-$burr_inset,0])
cube([box_puzzle_scale*2 + $burr_inset * 2,box_puzzle_scale*3+ $burr_inset * 2,box_puzzle_border]);
// second cutout removal
translate([box_puzzle_border-$burr_inset +2*box_puzzle_scale,box_puzzle_border+1.5*box_puzzle_scale-$burr_inset,0])
cube([box_puzzle_scale+2*$burr_inset,box_puzzle_scale+2*$burr_inset,box_puzzle_border]);

// now remove the pins
translate([mid, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([mid, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
}// end of main difference


}
64 changes: 64 additions & 0 deletions src/main/scad/yavuz-demirhan/Raya2.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
include <puzzlecad2.scad>

box_puzzle_scale = 15;
box_puzzle_border = 6;
$burr_inset = 0.16;
long = box_puzzle_scale * 4; // voxels long
wide = box_puzzle_scale * 3; // voxels wide
high = box_puzzle_scale * 2; // voxels high

dimlong = long + box_puzzle_border * 2;
dimwide = wide + box_puzzle_border * 2;
height = high + box_puzzle_border;

mid = box_puzzle_border / 2 + 0.5;
far = dimlong - mid;
far2 = dimwide - mid;

pieces();
*box();
*cap();

module pieces() {
burr_plate([
["x..|xxx"],//piece A-B-C
[".x.|xxx"],//Piece D-E-F
], $burr_scale = box_puzzle_scale,$plate_width = 150,$burr_bevel = 1.0);
}

module box() {

difference() {
beveled_cube([dimwide, dimlong, height]);
translate([box_puzzle_border - $burr_inset, box_puzzle_border - $burr_inset, box_puzzle_border-$burr_inset])
cube([
wide + $burr_inset * 2,
long + $burr_inset * 2,
high + $burr_inset * 1]);
}
translate([mid, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([mid, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);

}

module cap() {
render(convexity = 2)
translate([0,0,height])
difference() {
beveled_cube([dimwide, dimlong, box_puzzle_border]);
translate([box_puzzle_border+box_puzzle_scale - $burr_inset,box_puzzle_border- $burr_inset,0])
cube([box_puzzle_scale + $burr_inset * 2,long+ $burr_inset * 2,box_puzzle_border]);
translate([box_puzzle_border- $burr_inset,box_puzzle_border+1*box_puzzle_scale-$burr_inset,0])
cube([wide+2*$burr_inset,box_puzzle_scale+2*$burr_inset,box_puzzle_border]);

// now remove the pins
translate([mid, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([mid, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
}// end of main difference


}
67 changes: 67 additions & 0 deletions src/main/scad/yavuz-demirhan/Raya3.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
include <puzzlecad2.scad>

box_puzzle_scale = 15;
box_puzzle_border = 6;
$burr_inset = 0.16;
long = box_puzzle_scale * 4; // voxels long
wide = box_puzzle_scale * 3; // voxels wide
high = box_puzzle_scale * 2; // voxels high

dimlong = long + box_puzzle_border * 2;
dimwide = wide + box_puzzle_border * 2;
height = high + box_puzzle_border;

mid = box_puzzle_border / 2 + 0.5;
far = dimlong - mid;
far2 = dimwide - mid;

*pieces();
*box();
cap();

module pieces() {
burr_plate([
["x..|xxx"],//piece A-B
[".x.|xxx"],//pieces C-D-E-F

], $burr_scale = box_puzzle_scale,$plate_width = 150,$burr_bevel = 1.0);
}

module box() {

difference() {
beveled_cube([dimwide, dimlong, height]);
translate([box_puzzle_border - $burr_inset, box_puzzle_border - $burr_inset, box_puzzle_border- $burr_inset])
cube([
wide + $burr_inset * 2,
long + $burr_inset * 2,
high + $burr_inset * 1]);
}
translate([mid, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([mid, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);

}

module cap() {
render(convexity = 2)
translate([0,0,height])
difference() {
beveled_cube([dimwide, dimlong, box_puzzle_border]);
//first cutout removal
translate([box_puzzle_border-$burr_inset,box_puzzle_border-$burr_inset+box_puzzle_scale,0])
cube([wide + $burr_inset * 2,box_puzzle_scale*2+ $burr_inset * 2,box_puzzle_border]);
// second cutout removal
translate([box_puzzle_border-$burr_inset +1*box_puzzle_scale-$burr_inset,box_puzzle_border-$burr_inset+.5*box_puzzle_scale-$burr_inset,0])
cube([box_puzzle_scale+2*$burr_inset,3*box_puzzle_scale+2*$burr_inset,box_puzzle_border]);

// now remove the pins
translate([mid, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([mid, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
}// end of main difference


}
68 changes: 68 additions & 0 deletions src/main/scad/yavuz-demirhan/Raya4.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
include <puzzlecad3.scad>

box_puzzle_scale = 15;
box_puzzle_border = 6;
$burr_inset = 0.16;
long = box_puzzle_scale * 4; // voxels long
wide = box_puzzle_scale * 3; // voxels wide
high = box_puzzle_scale * 2; // voxels high

dimlong = long + box_puzzle_border * 2;
dimwide = wide + box_puzzle_border * 2;
height = high + box_puzzle_border;

mid = box_puzzle_border / 2 + 0.5;
far = dimlong - mid;
far2 = dimwide - mid;

*pieces();
*box();
cap();

module pieces() {
burr_plate([
// ["xx|xx"],//piece A-B
// ["x..|xxx"],//piece C-D
[".x.|xxx"],//pieces E-F

], $burr_scale = box_puzzle_scale,$plate_width = 150,$burr_bevel = 0.7,$unit_beveled = false);
}

module box() {

difference() {
beveled_cube([dimwide, dimlong, height]);
translate([box_puzzle_border - $burr_inset, box_puzzle_border - $burr_inset, box_puzzle_border- $burr_inset])
cube([
wide + $burr_inset * 2,
long + $burr_inset * 2,
high + $burr_inset * 1]);
}
translate([mid, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([mid, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);

}

module cap() {
render(convexity = 2)
translate([0,0,height])
difference(){
translate([dimwide/2,dimlong/2,box_puzzle_border/2])
difference() {
beveled_cube([dimwide, dimlong, box_puzzle_border],center = true);
//first cutout removal
cube([wide + $burr_inset * 2,box_puzzle_scale*2+ $burr_inset * 2,box_puzzle_border],center=true);
// second cutout removal
cube([box_puzzle_scale+2*$burr_inset,4*box_puzzle_scale+2*$burr_inset,box_puzzle_border],center=true);
}
// now remove the pins
translate([mid, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([mid, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
}// end of main difference


}
68 changes: 68 additions & 0 deletions src/main/scad/yavuz-demirhan/Raya5.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
include <puzzlecad3.scad>

box_puzzle_scale = 15;
box_puzzle_border = 6;
$burr_inset = 0.16;
long = box_puzzle_scale * 4; // voxels long
wide = box_puzzle_scale * 3; // voxels wide
high = box_puzzle_scale * 2; // voxels high

dimlong = long + box_puzzle_border * 2;
dimwide = wide + box_puzzle_border * 2;
height = high + box_puzzle_border;

mid = box_puzzle_border / 2 + 0.5;
far = dimlong - mid;
far2 = dimwide - mid;

*pieces();
*box();
cap();

module pieces() {
burr_plate([
// ["xx|xx"],//piece A-B
// ["x..|xxx"],//piece C-D
[".x.|xxx"],//pieces E-F

], $burr_scale = box_puzzle_scale,$plate_width = 150,$burr_bevel = 0.7,$unit_beveled = false);
}

module box() {

difference() {
beveled_cube([dimwide, dimlong, height]);
translate([box_puzzle_border - $burr_inset, box_puzzle_border - $burr_inset, box_puzzle_border- $burr_inset])
cube([
wide + $burr_inset * 2,
long + $burr_inset * 2,
high + $burr_inset * 1]);
}
translate([mid, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([mid, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, far, height]) cylinder(r = 2.2, h = 2, $fn = 32);
translate([far2, mid, height]) cylinder(r = 2.2, h = 2, $fn = 32);

}

module cap() {
render(convexity = 2)
translate([0,0,height])
difference(){
translate([dimwide/2,dimlong/2,box_puzzle_border/2])
difference() {
beveled_cube([dimwide, dimlong, box_puzzle_border],center = true);
//first cutout removal
cube([wide + $burr_inset * 2,box_puzzle_scale*2+ $burr_inset * 2,box_puzzle_border],center=true);
// second cutout removal
cube([box_puzzle_scale+2*$burr_inset,4*box_puzzle_scale+2*$burr_inset,box_puzzle_border],center=true);
}
// now remove the pins
translate([mid, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([mid, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, far, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
translate([far2, mid, 0]) cylinder(r = 2.4, h = 2.15, $fn = 32);
}// end of main difference


}