mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-12-18 16:41:32 +02:00
cad/test2/button.scad: added overlaps to eliminate artefacts at coincident faces
This commit is contained in:
parent
326cd33967
commit
521f0315bb
@ -35,7 +35,8 @@ module fillet_line(x, r)
|
||||
{
|
||||
translate([-x/2, 0, 0])
|
||||
difference() {
|
||||
cube([x, r, r]);
|
||||
translate([0, -epsilon, -epsilon])
|
||||
cube([x, r+epsilon, r+epsilon]);
|
||||
translate([0, r, r])
|
||||
rotate([0, 90, 0])
|
||||
translate([0, 0, -epsilon])
|
||||
@ -191,10 +192,10 @@ module button_base()
|
||||
{
|
||||
translate([0, 0, -but_base_z])
|
||||
difference() {
|
||||
rbox(but_base_x, but_base_y, but_base_z, but_corner_r);
|
||||
rbox_chamfer_top(but_base_x, but_base_y, but_base_z,
|
||||
rbox(but_base_x, but_base_y, but_base_z+epsilon, but_corner_r);
|
||||
rbox_chamfer_top(but_base_x, but_base_y, but_base_z+epsilon,
|
||||
but_corner_r, but_chamfer_r);
|
||||
rbox_chamfer_bottom(but_base_x, but_base_y, but_base_z,
|
||||
rbox_chamfer_bottom(but_base_x, but_base_y, but_base_z+epsilon,
|
||||
but_corner_r, but_chamfer_r);
|
||||
}
|
||||
}
|
||||
@ -204,6 +205,8 @@ module button()
|
||||
{
|
||||
union() {
|
||||
button_top();
|
||||
|
||||
/* Comment out this line to make CSG previews work */
|
||||
button_base();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user