discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

cylinder correct rotate

H
Hendrik
Thu, Mar 3, 2022 8:33 PM
<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:11.0pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} .MsoChpDefault {mso-style-type:export-only;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;} div.WordSection1 {page:WordSection1;} -->Hi

With the new coordination system learning I am trying to figure out how to correctly rotate a cylinder to cut out wholes on the side of a upright cylinder.

Say I want to cut wholes in my hollowed out cylinder that is upright must I rotate around the x or z to make the whole cylinder horizontal left to right or the x axis?

And for instance I need to cut front and bck wholes on the y axis so the cylinder is laying front to back or back to front so the cylinder head faces me and the other side faces away from me. Sorry it sounds trivial but struggling to get my head around it.

Thank you.

Sent from Mail for Windows

FH
Father Horton
Thu, Mar 3, 2022 8:45 PM

In the first case, you want to rotate around the y axis.

On Thu, Mar 3, 2022 at 2:33 PM Hendrik blindguydiy@gmail.com wrote:

Hi

With the new coordination system learning I am trying to figure out how to
correctly rotate a cylinder to cut out wholes on the side of a upright
cylinder.

Say I want to cut wholes in my hollowed out cylinder that is upright must
I rotate around the x or z to make the whole cylinder horizontal left to
right or the x axis?

And for instance I need to cut front and bck wholes on the y axis so the
cylinder is laying front to back or back to front so the cylinder head
faces me and the other side faces away from me.  Sorry it sounds trivial
but struggling to get my head around it.

Thank you.

Sent from Mail https://go.microsoft.com/fwlink/?LinkId=550986 for
Windows


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

In the first case, you want to rotate around the y axis. On Thu, Mar 3, 2022 at 2:33 PM Hendrik <blindguydiy@gmail.com> wrote: > Hi > > > > With the new coordination system learning I am trying to figure out how to > correctly rotate a cylinder to cut out wholes on the side of a upright > cylinder. > > > > Say I want to cut wholes in my hollowed out cylinder that is upright must > I rotate around the x or z to make the whole cylinder horizontal left to > right or the x axis? > > And for instance I need to cut front and bck wholes on the y axis so the > cylinder is laying front to back or back to front so the cylinder head > faces me and the other side faces away from me. Sorry it sounds trivial > but struggling to get my head around it. > > > > Thank you. > > > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Fri, Mar 4, 2022 12:39 AM

On 3/3/2022 12:33 PM, Hendrik wrote:

With the new coordination system learning I am trying to figure out
how to correctly rotate a cylinder to cut out wholes on the side of a
upright cylinder.

You'll have a vertical cylinder, and then you'll want to subtract a
horizontal cylinder.  To get a horizontal cylinder you can rotate around
either the X axis (yields a cylinder along the Y axis), or around the Y
axis (yields a cylinder along the X axis).

Let's say that you want a 10-unit-radius cylinder that's 40 units tall,
and you want to cut out a 5-unit-radius hole.

It's simplest if you do this with everything centered on the origin. 
More general cases will require translation - if, for instance, you want
to cut two holes.

Here's your base cylinder:

cylinder(h=40, r=10, center=true);

Here's the horizontal cylinder that you want to subtract from it.  This
one runs left-right.  The height is not important, except that it's got
to be taller than the diameter of the cylinder you're subtracting from.

rotate([0,90,0]) cylinder(h=20, r=5, center=true);

and here's subtracting them:

difference() {
    cylinder(h=40, r=10, center=true);
    rotate([0,90,0]) cylinder(h=20, r=5, center=true);
}
On 3/3/2022 12:33 PM, Hendrik wrote: > > With the new coordination system learning I am trying to figure out > how to correctly rotate a cylinder to cut out wholes on the side of a > upright cylinder. > You'll have a vertical cylinder, and then you'll want to subtract a horizontal cylinder.  To get a horizontal cylinder you can rotate around either the X axis (yields a cylinder along the Y axis), or around the Y axis (yields a cylinder along the X axis). Let's say that you want a 10-unit-radius cylinder that's 40 units tall, and you want to cut out a 5-unit-radius hole. It's simplest if you do this with everything centered on the origin.  More general cases will require translation - if, for instance, you want to cut *two* holes. Here's your base cylinder: cylinder(h=40, r=10, center=true); Here's the horizontal cylinder that you want to subtract from it.  This one runs left-right.  The height is not important, except that it's got to be taller than the diameter of the cylinder you're subtracting from. rotate([0,90,0]) cylinder(h=20, r=5, center=true); and here's subtracting them: difference() { cylinder(h=40, r=10, center=true); rotate([0,90,0]) cylinder(h=20, r=5, center=true); }