Exemplo n.º 1
0
function absPocket($x1, $y1, $x2, $y2)
{
    if($x1 < $x2)
    {
        $x = $x1;
        $w = $x2 - $x1;
    }
    else
    {
        $x = $x2;
        $w = $x1 - $x2;
    }
    if($y1 < $y2)
    {
        $y = $y1;
        $h = $y2 - $y1;
    }
    else
    {
        $y = $y2;
        $h = $y1 - $y2;
    }
    pocket($x, $y, $w, $h);
}
Exemplo n.º 2
0
	   $w-$th-$g,
	   $th+$g+0.125-R,
	   depth(0.75,0.125,DM));

// Top of sides
$q = 0.0625;
rect($th+$g+$q-R,$th+$g+$q-R, $w-$th-$g-$q+R, $h-$th-$g-$q+R, depth(0.75,0.5,DM));
$q = 0.125;
rect($th+$g+$q-R,$th+$g+$q-R, $w-$th-$g-$q+R, $h-$th-$g-$q+R, depth(0.75,0.5,DM));
$q = 0.1875;
rect($th+$g+$q-R,$th+$g+$q-R, $w-$th-$g-$q+R, $h-$th-$g-$q+R, depth(0.75,0.5,DM));

// Pocket Inside
pocket($th+$g+0.125+R,
	   $th+$g+0.125+R,
	   $w-$th-$g-0.125-R,
	   $h-$th-$g-0.125-R,
	   depth(0.75,0.125,DM));

/////////////////
// P I E C E S //
/////////////////
origin(0,0.75 + $h + R * 2.0 + $h + R * 2.0,0);

$q = $w / 4.0;
$r = 0.25;
$y = $r + R + R;

cutoutButton($q,$y,$r);
cutoutButton($w - $q,$y,$r);