I have made a handle for a cup.
I want the handle to be rounded on the edges.
I tried using minkowski() on the part with a sphere, but alas when I
preview, it goes into LA LA Land, and I have to eventually, kill the
process.
Here is my code:
module handle_outline() {
linear_extrude(height=6, convexity=2)
hull() {
circle(r=12, center=true);
translate([20,0,0]) circle(r=3, center=true);
}
}
module handle() {
intersection() {
difference() {
handle_outline();
translate([0,0,-2]) scale([0.65,0.65,2.0]) handle_outline();
}
translate([5,20,0]) cube([40,40,12], center=true);
}
}
scale([1,1.5,1]) handle();
Thanks,
Jerry
--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer
The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".- Isaac. Asimov
I
*f you give someone a program, you will frustrate them for a day; if you
teach them how to program, you will frustrate them for a lifetime. *-
Anonymous
If writing good code requires very little comments, then writing really
excellent code requires no comments at all!- Ken Thompson
It depends how you define La La Land and what you have $fn set to.
This previews in 45 seconds for me and looks reasonable:
minkowski() {
scale([1,1.5,1]) handle();
sphere(2, $fn = 32);
}
On 11 December 2015 at 18:09, Jerry Davis jdawgaz@gmail.com wrote:
I have made a handle for a cup.
I want the handle to be rounded on the edges.
I tried using minkowski() on the part with a sphere, but alas when I
preview, it goes into LA LA Land, and I have to eventually, kill the
process.
Here is my code:
module handle_outline() {
linear_extrude(height=6, convexity=2)
hull() {
circle(r=12, center=true);
translate([20,0,0]) circle(r=3, center=true);
}
}
module handle() {
intersection() {
difference() {
handle_outline();
translate([0,0,-2]) scale([0.65,0.65,2.0]) handle_outline();
}
translate([5,20,0]) cube([40,40,12], center=true);
}
}
scale([1,1.5,1]) handle();
Thanks,
Jerry
--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer
The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".- Isaac. Asimov
I
*f you give someone a program, you will frustrate them for a day; if you
teach them how to program, you will frustrate them for a lifetime. *-
Anonymous
If writing good code requires very little comments, then writing really
excellent code requires no comments at all!- Ken Thompson
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Increase $fn and fn_sphere slowly.
This takes 19 sec on my machine.
$fn=32;
fn_sphere=16;
module handle_outline() {
hull() {
circle(r=12, center=true);
translate([20,0,0]) circle(r=3, center=true);
}
}
module handle() {
scale([1,1.5,1])
linear_extrude(height=6, convexity=2)
difference() {
handle_outline();
translate([0,0,-2]) scale([0.65,0.65,2.0]) handle_outline();
translate([0,-40,0])square(80,true);
}
}
difference(){
minkowski(){
handle();
sphere(2,$fn=fn_sphere);
}
translate([0,-40,0])cube(80,true);
}
2015-12-11 19:09 GMT+01:00 Jerry Davis jdawgaz@gmail.com:
I have made a handle for a cup.
I want the handle to be rounded on the edges.
I tried using minkowski() on the part with a sphere, but alas when I
preview, it goes into LA LA Land, and I have to eventually, kill the
process.
Here is my code:
module handle_outline() {
linear_extrude(height=6, convexity=2)
hull() {
circle(r=12, center=true);
translate([20,0,0]) circle(r=3, center=true);
}
}
module handle() {
intersection() {
difference() {
handle_outline();
translate([0,0,-2]) scale([0.65,0.65,2.0]) handle_outline();
}
translate([5,20,0]) cube([40,40,12], center=true);
}
}
scale([1,1.5,1]) handle();
Thanks,
Jerry
--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer
The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".- Isaac. Asimov
I
*f you give someone a program, you will frustrate them for a day; if you
teach them how to program, you will frustrate them for a lifetime. *-
Anonymous
If writing good code requires very little comments, then writing really
excellent code requires no comments at all!- Ken Thompson
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On Fri, Dec 11, 2015 at 11:33 AM, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:
$fn=32;
fn_sphere=16;
great! that worked. I meant by la la land was that the process looked like
it went into a endless loop.
peter put me on the right track! thanks peter.
Here's my full code if anyone is interested:
$fn=50;
fn_sphere=16;
fn_cup = 100;
want_handle = true;
want_cup = true;
module handle_outline() {
linear_extrude(height=6, convexity=2)
hull() {
circle(r=15, center=true);
translate([20,0,0]) circle(r=3, center=true);
}
}
module handle() {
intersection() {
difference() {
handle_outline();
translate([0,0,-2]) scale([0.85,0.85,2.0]) handle_outline();
}
translate([5,20,0]) cube([40,40,12], center=true);
}
}
module cup() {
difference() {
union() {
translate([0,0,20]) rotate_extrude(angle=360, convexity=2)
translate([20,0,0]) circle(r=4, center=true, $fn=fn_cup);
translate([0,0,-20]) rotate_extrude(angle=360, convexity=2)
translate([20,0,0]) circle(r=4, center=true, $fn=fn_cup);
cylinder(r=23.5, h = 44, center=true, $fn=fn_cup);
}
cylinder(r=20, h=50, center=true, $fn=fn_cup);
}
translate([0,0,-22]) cylinder(r=22, h=3, center=true, $fn=fn_cup);
}
if (want_cup)
cup();
if (want_handle) {
translate([-3,22,5]) rotate([0,90,0]) scale([1,1.5,1])
difference(){
minkowski(){
handle();
sphere(2,$fn=fn_sphere);
}
translate([0,-40,0])cube(80,true);
}
}
--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer
The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".- Isaac. Asimov
I
*f you give someone a program, you will frustrate them for a day; if you
teach them how to program, you will frustrate them for a lifetime. *-
Anonymous
If writing good code requires very little comments, then writing really
excellent code requires no comments at all!- Ken Thompson
Anybody know: what is faster?
intersection or difference
2015-12-11 20:02 GMT+01:00 Jerry Davis jdawgaz@gmail.com:
On Fri, Dec 11, 2015 at 11:33 AM, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:
$fn=32;
fn_sphere=16;
great! that worked. I meant by la la land was that the process looked like
it went into a endless loop.
peter put me on the right track! thanks peter.
Here's my full code if anyone is interested:
$fn=50;
fn_sphere=16;
fn_cup = 100;
want_handle = true;
want_cup = true;
module handle_outline() {
linear_extrude(height=6, convexity=2)
hull() {
circle(r=15, center=true);
translate([20,0,0]) circle(r=3, center=true);
}
}
module handle() {
intersection() {
difference() {
handle_outline();
translate([0,0,-2]) scale([0.85,0.85,2.0]) handle_outline();
}
translate([5,20,0]) cube([40,40,12], center=true);
}
}
module cup() {
difference() {
union() {
translate([0,0,20]) rotate_extrude(angle=360, convexity=2)
translate([20,0,0]) circle(r=4, center=true, $fn=fn_cup);
translate([0,0,-20]) rotate_extrude(angle=360, convexity=2)
translate([20,0,0]) circle(r=4, center=true, $fn=fn_cup);
cylinder(r=23.5, h = 44, center=true, $fn=fn_cup);
}
cylinder(r=20, h=50, center=true, $fn=fn_cup);
}
translate([0,0,-22]) cylinder(r=22, h=3, center=true, $fn=fn_cup);
}
if (want_cup)
cup();
if (want_handle) {
translate([-3,22,5]) rotate([0,90,0]) scale([1,1.5,1])
difference(){
minkowski(){
handle();
sphere(2,$fn=fn_sphere);
}
translate([0,-40,0])cube(80,true);
}
}
--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer
The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".- Isaac. Asimov
I
*f you give someone a program, you will frustrate them for a day; if you
teach them how to program, you will frustrate them for a lifetime. *-
Anonymous
If writing good code requires very little comments, then writing really
excellent code requires no comments at all!- Ken Thompson
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org