discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

mirroring a chamfered cylinder in this part - how to?

J
jdawgaz
Wed, Mar 11, 2015 4:50 PM

I have the following code, which works well. And does what I want.
What I am having trouble with is, I want the 3rd cylinder to be not only
pointed up from the bottom, as it is now, but I also want to do it pointed
down from the top side. Leaving both sides cylinders "chamfered". So what I
need is a 4th cylinder that points downward from the top.

I can't seem to be able to do this. Can someone help me? Thanks.

$fn=60;

difference() {
cylinder(h = 8, r = 44);

for (i = [1:16]) {
rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r =
2);
rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r1 =
5, r2=0);
}
}

--
View this message in context: http://forum.openscad.org/mirroring-a-chamfered-cylinder-in-this-part-how-to-tp11964.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I have the following code, which works well. And does what I want. What I am having trouble with is, I want the 3rd cylinder to be not only pointed up from the bottom, as it is now, but I also want to do it pointed down from the top side. Leaving both sides cylinders "chamfered". So what I need is a 4th cylinder that points downward from the top. I can't seem to be able to do this. Can someone help me? Thanks. $fn=60; difference() { cylinder(h = 8, r = 44); for (i = [1:16]) { rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r = 2); rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r1 = 5, r2=0); } } -- View this message in context: http://forum.openscad.org/mirroring-a-chamfered-cylinder-in-this-part-how-to-tp11964.html Sent from the OpenSCAD mailing list archive at Nabble.com.
IN
Ian Nichols
Wed, Mar 11, 2015 4:59 PM

On 11 March 2015 at 16:50, jdawgaz jdawgaz@gmail.com wrote:

I have the following code, which works well. And does what I want.
What I am having trouble with is, I want the 3rd cylinder to be not only
pointed up from the bottom, as it is now, but I also want to do it pointed
down from the top side. Leaving both sides cylinders "chamfered". So what I
need is a 4th cylinder that points downward from the top.

I can't seem to be able to do this. Can someone help me? Thanks.

$fn=60;

difference() {
cylinder(h = 8, r = 44);

for (i = [1:16]) {
rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r =
2);
rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r1

5, r2=0);
}
}

adding:

 rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r1

= 0, r2=5);

inside the loop seems to work, or have I misunderstood - swapping the
values of r1 and r2 and setting the z translation so that the top of the
chamfer is 2mm above the big disc (which, coincidentally, is the same as
for the bottom chamfers).

Ian

--
Stand firm for what you believe in, until and unless logic and experience
prove you wrong.  Remember: when the emperor looks naked, the emperor is
naked, the truth and a lie are not "sort-of the same thing" and there is
no aspect, no facet, no moment of life that can't be improved with pizza.

-Daria Morgendorffer

On 11 March 2015 at 16:50, jdawgaz <jdawgaz@gmail.com> wrote: > I have the following code, which works well. And does what I want. > What I am having trouble with is, I want the 3rd cylinder to be not only > pointed up from the bottom, as it is now, but I also want to do it pointed > down from the top side. Leaving both sides cylinders "chamfered". So what I > need is a 4th cylinder that points downward from the top. > > I can't seem to be able to do this. Can someone help me? Thanks. > > $fn=60; > > difference() { > cylinder(h = 8, r = 44); > > for (i = [1:16]) { > rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r = > 2); > rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r1 > = > 5, r2=0); > } > } > > adding: > rotate(i * 360/16, [0,0,1]) translate([0, 35, -2]) cylinder(h = 12, r1 > = 0, r2=5); > > > inside the loop seems to work, or have I misunderstood - swapping the > values of r1 and r2 and setting the z translation so that the top of the > chamfer is 2mm above the big disc (which, coincidentally, is the same as > for the bottom chamfers). > Ian > > -- > View this message in context: > http://forum.openscad.org/mirroring-a-chamfered-cylinder-in-this-part-how-to-tp11964.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- Stand firm for what you believe in, until and unless logic and experience prove you wrong. Remember: when the emperor looks naked, the emperor *is* naked, the truth and a lie are not "sort-of the same thing" and there is no aspect, no facet, no moment of life that can't be improved with pizza. -Daria Morgendorffer
J
jdawgaz
Wed, Mar 11, 2015 5:08 PM

Ian,

I never thought of what you did, I was trying to use mirror() but it just
didn't seem to work.

Your code made me do a head-bang, for its simplicity!

Thanks a bunch!

Jerry

--
View this message in context: http://forum.openscad.org/mirroring-a-chamfered-cylinder-in-this-part-how-to-tp11964p11967.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Ian, I never thought of what you did, I was trying to use mirror() but it just didn't seem to work. Your code made me do a head-bang, for its simplicity! Thanks a bunch! Jerry -- View this message in context: http://forum.openscad.org/mirroring-a-chamfered-cylinder-in-this-part-how-to-tp11964p11967.html Sent from the OpenSCAD mailing list archive at Nabble.com.
IN
Ian Nichols
Wed, Mar 11, 2015 6:33 PM

On 11 March 2015 at 17:08, jdawgaz jdawgaz@gmail.com wrote:

Ian,

I never thought of what you did, I was trying to use mirror() but it just
didn't seem to work.

Your code made me do a head-bang, for its simplicity!

Thanks a bunch!

You're welcome.  I'm nothing if not simplistic.  Sometimes excessively so ;)

Ian

--
Stand firm for what you believe in, until and unless logic and experience
prove you wrong.  Remember: when the emperor looks naked, the emperor is
naked, the truth and a lie are not "sort-of the same thing" and there is
no aspect, no facet, no moment of life that can't be improved with pizza.

-Daria Morgendorffer

On 11 March 2015 at 17:08, jdawgaz <jdawgaz@gmail.com> wrote: > Ian, > > I never thought of what you did, I was trying to use mirror() but it just > didn't seem to work. > > Your code made me do a head-bang, for its simplicity! > > Thanks a bunch! You're welcome. I'm nothing if not simplistic. Sometimes excessively so ;) Ian -- Stand firm for what you believe in, until and unless logic and experience prove you wrong. Remember: when the emperor looks naked, the emperor *is* naked, the truth and a lie are not "sort-of the same thing" and there is no aspect, no facet, no moment of life that can't be improved with pizza. -Daria Morgendorffer