discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

$fn offsets cylinders...?

N
naviathan
Thu, Oct 12, 2017 4:42 PM

Code posted below.

Notice when rendered that the holes are not evenly spaced even though the
translates are. I've figured out that if I get rid of the $fn=30 on the
cylinders the holes line up evenly. My understanding is that $fn creates a
more rounded cylinder, but why would it offset them in relation to the
translate coordinates?

module base(){
cube([168,55,5]);
}

module mountHoles(){
translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);

translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h = 5, r

= 1.6, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h = 5, r
= 1.6, $fn=30);
translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = 3, r =
3, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h = 3, r
= 3, $fn=30);
}

difference(){
base();
mountHoles();
}

--
Sent from: http://forum.openscad.org/

Code posted below. Notice when rendered that the holes are not evenly spaced even though the translates are. I've figured out that if I get rid of the $fn=30 on the cylinders the holes line up evenly. My understanding is that $fn creates a more rounded cylinder, but why would it offset them in relation to the translate coordinates? module base(){ cube([168,55,5]); } module mountHoles(){ translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, $fn=30); translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, $fn=30); translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3, $fn=30); translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3, $fn=30); translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h = 5, r = 1.6, $fn=30); translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h = 5, r = 1.6, $fn=30); translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = 3, r = 3, $fn=30); translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h = 3, r = 3, $fn=30); } difference(){ base(); mountHoles(); } -- Sent from: http://forum.openscad.org/
NH
nop head
Thu, Oct 12, 2017 5:12 PM

$fn doesn't affect the position of the hole centre but you want to keep it
a multiple of 4 to get symmetrical holes.

On 12 October 2017 at 17:42, naviathan naviathan@gmail.com wrote:

Code posted below.

Notice when rendered that the holes are not evenly spaced even though the
translates are. I've figured out that if I get rid of the $fn=30 on the
cylinders the holes line up evenly. My understanding is that $fn creates a
more rounded cylinder, but why would it offset them in relation to the
translate coordinates?

module base(){
cube([168,55,5]);
}

module mountHoles(){
translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);

 translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h = 5, r

= 1.6, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h = 5,
r
= 1.6, $fn=30);
translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = 3, r

3, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h = 3, r
= 3, $fn=30);
}

difference(){
base();
mountHoles();
}

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

$fn doesn't affect the position of the hole centre but you want to keep it a multiple of 4 to get symmetrical holes. On 12 October 2017 at 17:42, naviathan <naviathan@gmail.com> wrote: > Code posted below. > > Notice when rendered that the holes are not evenly spaced even though the > translates are. I've figured out that if I get rid of the $fn=30 on the > cylinders the holes line up evenly. My understanding is that $fn creates a > more rounded cylinder, but why would it offset them in relation to the > translate coordinates? > > module base(){ > cube([168,55,5]); > } > > module mountHoles(){ > translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, > $fn=30); > translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, > $fn=30); > translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3, > $fn=30); > translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3, > $fn=30); > > translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h = 5, r > = 1.6, $fn=30); > translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h = 5, > r > = 1.6, $fn=30); > translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = 3, r > = > 3, $fn=30); > translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h = 3, r > = 3, $fn=30); > } > > > > > difference(){ > base(); > mountHoles(); > } > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
JB
Jeremy Buseman
Thu, Oct 12, 2017 5:18 PM

Ok, I figured out where the issues was. I apologize. I pulled the code from
Josef Prusa's Rambo case for the MK2 (I'm just making a plate to adapt the
case to 2020 extrusion). His cylinders are set strangely for some reason.
Although the hinges and mounts on the case appear square, they must not be.

On Thu, Oct 12, 2017 at 1:12 PM, nop head nop.head@gmail.com wrote:

$fn doesn't affect the position of the hole centre but you want to keep it
a multiple of 4 to get symmetrical holes.

On 12 October 2017 at 17:42, naviathan naviathan@gmail.com wrote:

Code posted below.

Notice when rendered that the holes are not evenly spaced even though the
translates are. I've figured out that if I get rid of the $fn=30 on the
cylinders the holes line up evenly. My understanding is that $fn creates a
more rounded cylinder, but why would it offset them in relation to the
translate coordinates?

module base(){
cube([168,55,5]);
}

module mountHoles(){
translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);

 translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h = 5,

r
= 1.6, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h =
5, r
= 1.6, $fn=30);
translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = 3,
r =
3, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h = 3,
r
= 3, $fn=30);
}

difference(){
base();
mountHoles();
}

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Ok, I figured out where the issues was. I apologize. I pulled the code from Josef Prusa's Rambo case for the MK2 (I'm just making a plate to adapt the case to 2020 extrusion). His cylinders are set strangely for some reason. Although the hinges and mounts on the case appear square, they must not be. On Thu, Oct 12, 2017 at 1:12 PM, nop head <nop.head@gmail.com> wrote: > $fn doesn't affect the position of the hole centre but you want to keep it > a multiple of 4 to get symmetrical holes. > > On 12 October 2017 at 17:42, naviathan <naviathan@gmail.com> wrote: > >> Code posted below. >> >> Notice when rendered that the holes are not evenly spaced even though the >> translates are. I've figured out that if I get rid of the $fn=30 on the >> cylinders the holes line up evenly. My understanding is that $fn creates a >> more rounded cylinder, but why would it offset them in relation to the >> translate coordinates? >> >> module base(){ >> cube([168,55,5]); >> } >> >> module mountHoles(){ >> translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, >> $fn=30); >> translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, >> $fn=30); >> translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3, >> $fn=30); >> translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3, >> $fn=30); >> >> translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h = 5, >> r >> = 1.6, $fn=30); >> translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h = >> 5, r >> = 1.6, $fn=30); >> translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = 3, >> r = >> 3, $fn=30); >> translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h = 3, >> r >> = 3, $fn=30); >> } >> >> >> >> >> difference(){ >> base(); >> mountHoles(); >> } >> >> >> >> -- >> Sent from: http://forum.openscad.org/ >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
NH
nop head
Thu, Oct 12, 2017 5:50 PM

If you are going to 3D print it you probably don't want to set $fn so high
on small holes if you want them to come out the right size. See
http://hydraraptor.blogspot.co.uk/2011/02/polyholes.html

On 12 October 2017 at 18:18, Jeremy Buseman naviathan@gmail.com wrote:

Ok, I figured out where the issues was. I apologize. I pulled the code
from Josef Prusa's Rambo case for the MK2 (I'm just making a plate to adapt
the case to 2020 extrusion). His cylinders are set strangely for some
reason. Although the hinges and mounts on the case appear square, they must
not be.

On Thu, Oct 12, 2017 at 1:12 PM, nop head nop.head@gmail.com wrote:

$fn doesn't affect the position of the hole centre but you want to keep
it a multiple of 4 to get symmetrical holes.

On 12 October 2017 at 17:42, naviathan naviathan@gmail.com wrote:

Code posted below.

Notice when rendered that the holes are not evenly spaced even though the
translates are. I've figured out that if I get rid of the $fn=30 on the
cylinders the holes line up evenly. My understanding is that $fn creates
a
more rounded cylinder, but why would it offset them in relation to the
translate coordinates?

module base(){
cube([168,55,5]);
}

module mountHoles(){
translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);

 translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h =

5, r
= 1.6, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h =
5, r
= 1.6, $fn=30);
translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = 3,
r =
3, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h =
3, r
= 3, $fn=30);
}

difference(){
base();
mountHoles();
}

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

If you are going to 3D print it you probably don't want to set $fn so high on small holes if you want them to come out the right size. See http://hydraraptor.blogspot.co.uk/2011/02/polyholes.html On 12 October 2017 at 18:18, Jeremy Buseman <naviathan@gmail.com> wrote: > Ok, I figured out where the issues was. I apologize. I pulled the code > from Josef Prusa's Rambo case for the MK2 (I'm just making a plate to adapt > the case to 2020 extrusion). His cylinders are set strangely for some > reason. Although the hinges and mounts on the case appear square, they must > not be. > > On Thu, Oct 12, 2017 at 1:12 PM, nop head <nop.head@gmail.com> wrote: > >> $fn doesn't affect the position of the hole centre but you want to keep >> it a multiple of 4 to get symmetrical holes. >> >> On 12 October 2017 at 17:42, naviathan <naviathan@gmail.com> wrote: >> >>> Code posted below. >>> >>> Notice when rendered that the holes are not evenly spaced even though the >>> translates are. I've figured out that if I get rid of the $fn=30 on the >>> cylinders the holes line up evenly. My understanding is that $fn creates >>> a >>> more rounded cylinder, but why would it offset them in relation to the >>> translate coordinates? >>> >>> module base(){ >>> cube([168,55,5]); >>> } >>> >>> module mountHoles(){ >>> translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, >>> $fn=30); >>> translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, >>> $fn=30); >>> translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3, >>> $fn=30); >>> translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3, >>> $fn=30); >>> >>> translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h = >>> 5, r >>> = 1.6, $fn=30); >>> translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h = >>> 5, r >>> = 1.6, $fn=30); >>> translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = 3, >>> r = >>> 3, $fn=30); >>> translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h = >>> 3, r >>> = 3, $fn=30); >>> } >>> >>> >>> >>> >>> difference(){ >>> base(); >>> mountHoles(); >>> } >>> >>> >>> >>> -- >>> Sent from: http://forum.openscad.org/ >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
JB
Jeremy Buseman
Thu, Oct 12, 2017 6:13 PM

Thanks nop head. Nice blog.

On Oct 12, 2017 13:51, "nop head" nop.head@gmail.com wrote:

If you are going to 3D print it you probably don't want to set $fn so high
on small holes if you want them to come out the right size. See
http://hydraraptor.blogspot.co.uk/2011/02/polyholes.html

On 12 October 2017 at 18:18, Jeremy Buseman naviathan@gmail.com wrote:

Ok, I figured out where the issues was. I apologize. I pulled the code
from Josef Prusa's Rambo case for the MK2 (I'm just making a plate to adapt
the case to 2020 extrusion). His cylinders are set strangely for some
reason. Although the hinges and mounts on the case appear square, they must
not be.

On Thu, Oct 12, 2017 at 1:12 PM, nop head nop.head@gmail.com wrote:

$fn doesn't affect the position of the hole centre but you want to keep
it a multiple of 4 to get symmetrical holes.

On 12 October 2017 at 17:42, naviathan naviathan@gmail.com wrote:

Code posted below.

Notice when rendered that the holes are not evenly spaced even though
the
translates are. I've figured out that if I get rid of the $fn=30 on the
cylinders the holes line up evenly. My understanding is that $fn
creates a
more rounded cylinder, but why would it offset them in relation to the
translate coordinates?

module base(){
cube([168,55,5]);
}

module mountHoles(){
translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r =
1.6,
$fn=30);
translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);

 translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h =

5, r
= 1.6, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h =
5, r
= 1.6, $fn=30);
translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h =
3, r =
3, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h =
3, r
= 3, $fn=30);
}

difference(){
base();
mountHoles();
}

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Thanks nop head. Nice blog. On Oct 12, 2017 13:51, "nop head" <nop.head@gmail.com> wrote: > If you are going to 3D print it you probably don't want to set $fn so high > on small holes if you want them to come out the right size. See > http://hydraraptor.blogspot.co.uk/2011/02/polyholes.html > > On 12 October 2017 at 18:18, Jeremy Buseman <naviathan@gmail.com> wrote: > >> Ok, I figured out where the issues was. I apologize. I pulled the code >> from Josef Prusa's Rambo case for the MK2 (I'm just making a plate to adapt >> the case to 2020 extrusion). His cylinders are set strangely for some >> reason. Although the hinges and mounts on the case appear square, they must >> not be. >> >> On Thu, Oct 12, 2017 at 1:12 PM, nop head <nop.head@gmail.com> wrote: >> >>> $fn doesn't affect the position of the hole centre but you want to keep >>> it a multiple of 4 to get symmetrical holes. >>> >>> On 12 October 2017 at 17:42, naviathan <naviathan@gmail.com> wrote: >>> >>>> Code posted below. >>>> >>>> Notice when rendered that the holes are not evenly spaced even though >>>> the >>>> translates are. I've figured out that if I get rid of the $fn=30 on the >>>> cylinders the holes line up evenly. My understanding is that $fn >>>> creates a >>>> more rounded cylinder, but why would it offset them in relation to the >>>> translate coordinates? >>>> >>>> module base(){ >>>> cube([168,55,5]); >>>> } >>>> >>>> module mountHoles(){ >>>> translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = 1.6, >>>> $fn=30); >>>> translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = >>>> 1.6, >>>> $fn=30); >>>> translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3, >>>> $fn=30); >>>> translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3, >>>> $fn=30); >>>> >>>> translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h = >>>> 5, r >>>> = 1.6, $fn=30); >>>> translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h = >>>> 5, r >>>> = 1.6, $fn=30); >>>> translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = >>>> 3, r = >>>> 3, $fn=30); >>>> translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h = >>>> 3, r >>>> = 3, $fn=30); >>>> } >>>> >>>> >>>> >>>> >>>> difference(){ >>>> base(); >>>> mountHoles(); >>>> } >>>> >>>> >>>> >>>> -- >>>> Sent from: http://forum.openscad.org/ >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> Discuss@lists.openscad.org >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>> >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >>> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
RW
Rob Ward
Thu, Oct 12, 2017 10:04 PM

Excellent article! Something about nothing, holes!! Thank you NopHead.

On 13 October 2017 5:13:38 am AEDT, Jeremy Buseman naviathan@gmail.com wrote:

Thanks nop head. Nice blog.

On Oct 12, 2017 13:51, "nop head" nop.head@gmail.com wrote:

If you are going to 3D print it you probably don't want to set $fn so

high

on small holes if you want them to come out the right size. See
http://hydraraptor.blogspot.co.uk/2011/02/polyholes.html

On 12 October 2017 at 18:18, Jeremy Buseman naviathan@gmail.com

wrote:

Ok, I figured out where the issues was. I apologize. I pulled the

code

from Josef Prusa's Rambo case for the MK2 (I'm just making a plate

to adapt

the case to 2020 extrusion). His cylinders are set strangely for

some

reason. Although the hinges and mounts on the case appear square,

they must

not be.

On Thu, Oct 12, 2017 at 1:12 PM, nop head nop.head@gmail.com

wrote:

$fn doesn't affect the position of the hole centre but you want to

keep

it a multiple of 4 to get symmetrical holes.

On 12 October 2017 at 17:42, naviathan naviathan@gmail.com wrote:

Code posted below.

Notice when rendered that the holes are not evenly spaced even

though

the
translates are. I've figured out that if I get rid of the $fn=30

on the

cylinders the holes line up evenly. My understanding is that $fn
creates a
more rounded cylinder, but why would it offset them in relation to

the

translate coordinates?

module base(){
cube([168,55,5]);
}

module mountHoles(){
translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r

= 1.6,

$fn=30);
translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r

=

1.6,
$fn=30);
translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r =

3,

$fn=30);
translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r

= 3,

$fn=30);

 translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder(

h =

5, r
= 1.6, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] )

cylinder( h =

5, r
= 1.6, $fn=30);
translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder(

h =

3, r =
3, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder(

h =

3, r
= 3, $fn=30);
}

difference(){
base();
mountHoles();
}

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org


OpenSCAD mailing list
Discuss@lists.openscad.org


OpenSCAD mailing list
Discuss@lists.openscad.org

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Excellent article! Something about nothing, holes!! Thank you NopHead. On 13 October 2017 5:13:38 am AEDT, Jeremy Buseman <naviathan@gmail.com> wrote: >Thanks nop head. Nice blog. > >On Oct 12, 2017 13:51, "nop head" <nop.head@gmail.com> wrote: > >> If you are going to 3D print it you probably don't want to set $fn so >high >> on small holes if you want them to come out the right size. See >> http://hydraraptor.blogspot.co.uk/2011/02/polyholes.html >> >> On 12 October 2017 at 18:18, Jeremy Buseman <naviathan@gmail.com> >wrote: >> >>> Ok, I figured out where the issues was. I apologize. I pulled the >code >>> from Josef Prusa's Rambo case for the MK2 (I'm just making a plate >to adapt >>> the case to 2020 extrusion). His cylinders are set strangely for >some >>> reason. Although the hinges and mounts on the case appear square, >they must >>> not be. >>> >>> On Thu, Oct 12, 2017 at 1:12 PM, nop head <nop.head@gmail.com> >wrote: >>> >>>> $fn doesn't affect the position of the hole centre but you want to >keep >>>> it a multiple of 4 to get symmetrical holes. >>>> >>>> On 12 October 2017 at 17:42, naviathan <naviathan@gmail.com> wrote: >>>> >>>>> Code posted below. >>>>> >>>>> Notice when rendered that the holes are not evenly spaced even >though >>>>> the >>>>> translates are. I've figured out that if I get rid of the $fn=30 >on the >>>>> cylinders the holes line up evenly. My understanding is that $fn >>>>> creates a >>>>> more rounded cylinder, but why would it offset them in relation to >the >>>>> translate coordinates? >>>>> >>>>> module base(){ >>>>> cube([168,55,5]); >>>>> } >>>>> >>>>> module mountHoles(){ >>>>> translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r >= 1.6, >>>>> $fn=30); >>>>> translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r >= >>>>> 1.6, >>>>> $fn=30); >>>>> translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = >3, >>>>> $fn=30); >>>>> translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r >= 3, >>>>> $fn=30); >>>>> >>>>> translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( >h = >>>>> 5, r >>>>> = 1.6, $fn=30); >>>>> translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) >cylinder( h = >>>>> 5, r >>>>> = 1.6, $fn=30); >>>>> translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( >h = >>>>> 3, r = >>>>> 3, $fn=30); >>>>> translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( >h = >>>>> 3, r >>>>> = 3, $fn=30); >>>>> } >>>>> >>>>> >>>>> >>>>> >>>>> difference(){ >>>>> base(); >>>>> mountHoles(); >>>>> } >>>>> >>>>> >>>>> >>>>> -- >>>>> Sent from: http://forum.openscad.org/ >>>>> >>>>> _______________________________________________ >>>>> OpenSCAD mailing list >>>>> Discuss@lists.openscad.org >>>>> >http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>> >>>> >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> Discuss@lists.openscad.org >>>> >http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>> >>>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> >http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >>> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
NH
nop head
Thu, Oct 12, 2017 10:53 PM

Thanks.

On 12 October 2017 at 23:04, Rob Ward rl.ward@bigpond.com wrote:

Excellent article! Something about nothing, holes!! Thank you NopHead.

On 13 October 2017 5:13:38 am AEDT, Jeremy Buseman naviathan@gmail.com
wrote:

Thanks nop head. Nice blog.

On Oct 12, 2017 13:51, "nop head" nop.head@gmail.com wrote:

If you are going to 3D print it you probably don't want to set $fn so
high on small holes if you want them to come out the right size. See
http://hydraraptor.blogspot.co.uk/2011/02/polyholes.html

On 12 October 2017 at 18:18, Jeremy Buseman naviathan@gmail.com wrote:

Ok, I figured out where the issues was. I apologize. I pulled the code
from Josef Prusa's Rambo case for the MK2 (I'm just making a plate to adapt
the case to 2020 extrusion). His cylinders are set strangely for some
reason. Although the hinges and mounts on the case appear square, they must
not be.

On Thu, Oct 12, 2017 at 1:12 PM, nop head nop.head@gmail.com wrote:

$fn doesn't affect the position of the hole centre but you want to
keep it a multiple of 4 to get symmetrical holes.

On 12 October 2017 at 17:42, naviathan naviathan@gmail.com wrote:

Code posted below.

Notice when rendered that the holes are not evenly spaced even though
the
translates are. I've figured out that if I get rid of the $fn=30 on
the
cylinders the holes line up evenly. My understanding is that $fn
creates a
more rounded cylinder, but why would it offset them in relation to the
translate coordinates?

module base(){
cube([168,55,5]);
}

module mountHoles(){
translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r =
1.6,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r =
1.6,
$fn=30);
translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);
translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3,
$fn=30);

 translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h

= 5, r
= 1.6, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h
= 5, r
= 1.6, $fn=30);
translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h =
3, r =
3, $fn=30);
translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h
= 3, r
= 3, $fn=30);
}

difference(){
base();
mountHoles();
}

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Thanks. On 12 October 2017 at 23:04, Rob Ward <rl.ward@bigpond.com> wrote: > Excellent article! Something about nothing, holes!! Thank you NopHead. > > On 13 October 2017 5:13:38 am AEDT, Jeremy Buseman <naviathan@gmail.com> > wrote: >> >> Thanks nop head. Nice blog. >> >> On Oct 12, 2017 13:51, "nop head" <nop.head@gmail.com> wrote: >> >>> If you are going to 3D print it you probably don't want to set $fn so >>> high on small holes if you want them to come out the right size. See >>> http://hydraraptor.blogspot.co.uk/2011/02/polyholes.html >>> >>> On 12 October 2017 at 18:18, Jeremy Buseman <naviathan@gmail.com> wrote: >>> >>>> Ok, I figured out where the issues was. I apologize. I pulled the code >>>> from Josef Prusa's Rambo case for the MK2 (I'm just making a plate to adapt >>>> the case to 2020 extrusion). His cylinders are set strangely for some >>>> reason. Although the hinges and mounts on the case appear square, they must >>>> not be. >>>> >>>> On Thu, Oct 12, 2017 at 1:12 PM, nop head <nop.head@gmail.com> wrote: >>>> >>>>> $fn doesn't affect the position of the hole centre but you want to >>>>> keep it a multiple of 4 to get symmetrical holes. >>>>> >>>>> On 12 October 2017 at 17:42, naviathan <naviathan@gmail.com> wrote: >>>>> >>>>>> Code posted below. >>>>>> >>>>>> Notice when rendered that the holes are not evenly spaced even though >>>>>> the >>>>>> translates are. I've figured out that if I get rid of the $fn=30 on >>>>>> the >>>>>> cylinders the holes line up evenly. My understanding is that $fn >>>>>> creates a >>>>>> more rounded cylinder, but why would it offset them in relation to the >>>>>> translate coordinates? >>>>>> >>>>>> module base(){ >>>>>> cube([168,55,5]); >>>>>> } >>>>>> >>>>>> module mountHoles(){ >>>>>> translate( [ (168 - 16.5) , 3.4 , -0.5 ] ) cylinder( h = 5, r = >>>>>> 1.6, >>>>>> $fn=30); >>>>>> translate( [ (168 - 110.5) , 4.4 , -0.5 ] ) cylinder( h = 5, r = >>>>>> 1.6, >>>>>> $fn=30); >>>>>> translate( [ (168 - 16.5) , 3.4 , 2.5 ] ) cylinder( h = 3, r = 3, >>>>>> $fn=30); >>>>>> translate( [ (168 - 110.5) , 4.4 , 2.5 ] ) cylinder( h = 3, r = 3, >>>>>> $fn=30); >>>>>> >>>>>> translate( [ (168 - 16.5) , (3.4 + 43.22) , -0.5 ] ) cylinder( h >>>>>> = 5, r >>>>>> = 1.6, $fn=30); >>>>>> translate( [ (168 - 110.5) , (4.4 + 43.22) , -0.5 ] ) cylinder( h >>>>>> = 5, r >>>>>> = 1.6, $fn=30); >>>>>> translate( [ (168 - 16.5) , (3.4 + 43.22) , 2.5 ] ) cylinder( h = >>>>>> 3, r = >>>>>> 3, $fn=30); >>>>>> translate( [ (168 - 110.5) , (4.4 + 43.22) , 2.5 ] ) cylinder( h >>>>>> = 3, r >>>>>> = 3, $fn=30); >>>>>> } >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> difference(){ >>>>>> base(); >>>>>> mountHoles(); >>>>>> } >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Sent from: http://forum.openscad.org/ >>>>>> >>>>>> _______________________________________________ >>>>>> OpenSCAD mailing list >>>>>> Discuss@lists.openscad.org >>>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> OpenSCAD mailing list >>>>> Discuss@lists.openscad.org >>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> Discuss@lists.openscad.org >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>> >>>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >>> > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
K
KarijnWessing
Sat, Oct 14, 2017 9:54 AM

You make a module for the base, but not for the mounthole, funny

I would make it like this:

plateHeight = 5;
plateWidth  = 168;
plateLength = 55;

// uncomment next line when defining the mountHole
// mountHole();

difference() {
base();
mountHoles();
}

module base() {
cube([plateWidth,plateLength, plateHeight]);
}

module mountHole() {
translate( [0 ,0 , 2.5 ] ) cylinder( h=3, r=3, $fn=30);
translate( [0 ,0 ,-0.5 ] ) cylinder( h=5, r=1.6, $fn=30);
}

module mountHoles() {
// maybe define some constants for 16.5, (110.5 - 16.5), ...
for(t = [ [(plateWidth - 16.5) , 3.4 , 0],
[(plateWidth - 110.5) , 4.4, 0],
[(plateWidth - 16.5) , (3.4 + 43.22), 0],
[(plateWidth - 110.5) , (4.4 + 43.22), 0]])
translate(t) mountHole();
}

--
Sent from: http://forum.openscad.org/

You make a module for the base, but not for the mounthole, funny I would make it like this: plateHeight = 5; plateWidth = 168; plateLength = 55; // uncomment next line when defining the mountHole // mountHole(); difference() { base(); mountHoles(); } module base() { cube([plateWidth,plateLength, plateHeight]); } module mountHole() { translate( [0 ,0 , 2.5 ] ) cylinder( h=3, r=3, $fn=30); translate( [0 ,0 ,-0.5 ] ) cylinder( h=5, r=1.6, $fn=30); } module mountHoles() { // maybe define some constants for 16.5, (110.5 - 16.5), ... for(t = [ [(plateWidth - 16.5) , 3.4 , 0], [(plateWidth - 110.5) , 4.4, 0], [(plateWidth - 16.5) , (3.4 + 43.22), 0], [(plateWidth - 110.5) , (4.4 + 43.22), 0]]) translate(t) mountHole(); } -- Sent from: http://forum.openscad.org/