discuss@lists.openscad.org

OpenSCAD general discussion

View all threads

rounding some edges

J
jon
Mon, Oct 18, 2021 12:08 PM

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
    intersection() {
        hull() {
            cube([wi, eps, ht]);
            translate([ra, de - ra, 0])
                cylinder(h = ht, r = ra);
            translate([wi - ra, de - ra, 0])
                cylinder(h = ht, r = ra);
            }
        rotate([-20, 0, 0])
            cube(100);
        }

main();

Can someone help me round some or all of the edges on this part, please? eps = 0.01; $fn = 100; inches =  25.4; ra = 15; wi = 55.6; ht = 12; de = 30; module main()     intersection() {         hull() {             cube([wi, eps, ht]);             translate([ra, de - ra, 0])                 cylinder(h = ht, r = ra);             translate([wi - ra, de - ra, 0])                 cylinder(h = ht, r = ra);             }         rotate([-20, 0, 0])             cube(100);         } main();
NH
nop head
Mon, Oct 18, 2021 12:56 PM

[image: image.png]

Do you want to round the bottom edges as well ?

On Mon, 18 Oct 2021 at 13:08, jon jon@jonbondy.com wrote:

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
intersection() {
hull() {
cube([wi, eps, ht]);
translate([ra, de - ra, 0])
cylinder(h = ht, r = ra);
translate([wi - ra, de - ra, 0])
cylinder(h = ht, r = ra);
}
rotate([-20, 0, 0])
cube(100);
}

main();


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

[image: image.png] Do you want to round the bottom edges as well ? On Mon, 18 Oct 2021 at 13:08, jon <jon@jonbondy.com> wrote: > Can someone help me round some or all of the edges on this part, please? > > eps = 0.01; > $fn = 100; > inches = 25.4; > > ra = 15; > wi = 55.6; > ht = 12; > de = 30; > > module main() > intersection() { > hull() { > cube([wi, eps, ht]); > translate([ra, de - ra, 0]) > cylinder(h = ht, r = ra); > translate([wi - ra, de - ra, 0]) > cylinder(h = ht, r = ra); > } > rotate([-20, 0, 0]) > cube(100); > } > > main(); > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Rogier Wolff
Mon, Oct 18, 2021 1:01 PM

The easy one is
rr = 1.0;
minkofsky () {
main ();
sphere (r = rr, $fn=40);
}
The problem is this makes the object 1mm larger in every direction.

More complicated seems to be:

module erode (e)
{
large_enough = 100;

difference () {
sphere (r=large_enough, $fn=8);
minkowski () {

  difference () {
sphere (large_enough, $fn=8);
children ();
  }
  sphere (r=e, $fn=20);
}

}
}

module round (r)
{
minkowski () {
erode (r) children ();
sphere (r=r, $fn=20);
}
}

This seems to work. Took me longer than intended because some
intermediates didn't render correctly on my computer.

minkowski is a very compute-intensive operation. The preview seems to
take over a minute to render on my computer. Caching seems to help
render small changes quickly (but probably changes to the actual model
will require you to wait long again.

Roger. 

On Mon, Oct 18, 2021 at 08:08:26AM -0400, jon wrote:

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
    intersection() {
        hull() {
            cube([wi, eps, ht]);
            translate([ra, de - ra, 0])
                cylinder(h = ht, r = ra);
            translate([wi - ra, de - ra, 0])
                cylinder(h = ht, r = ra);
            }
        rotate([-20, 0, 0])
            cube(100);
        }

main();


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

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

The easy one is rr = 1.0; minkofsky () { main (); sphere (r = rr, $fn=40); } The problem is this makes the object 1mm larger in every direction. More complicated seems to be: module erode (e) { large_enough = 100; difference () { sphere (r=large_enough, $fn=8); minkowski () { difference () { sphere (large_enough, $fn=8); children (); } sphere (r=e, $fn=20); } } } module round (r) { minkowski () { erode (r) children (); sphere (r=r, $fn=20); } } This seems to work. Took me longer than intended because some intermediates didn't render correctly on my computer. minkowski is a very compute-intensive operation. The preview seems to take over a minute to render on my computer. Caching seems to help render small changes quickly (but probably changes to the actual model will require you to wait long again. Roger. On Mon, Oct 18, 2021 at 08:08:26AM -0400, jon wrote: > Can someone help me round some or all of the edges on this part, please? > > eps = 0.01; > $fn = 100; > inches =  25.4; > > ra = 15; > wi = 55.6; > ht = 12; > de = 30; > > module main() >     intersection() { >         hull() { >             cube([wi, eps, ht]); >             translate([ra, de - ra, 0]) >                 cylinder(h = ht, r = ra); >             translate([wi - ra, de - ra, 0]) >                 cylinder(h = ht, r = ra); >             } >         rotate([-20, 0, 0]) >             cube(100); >         } > > main(); > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
NH
nop head
Mon, Oct 18, 2021 1:11 PM

Here is a fully rounded version that renders in less than 2 seconds with
$fn set to 100.

[image: image.png]

On Mon, 18 Oct 2021 at 14:02, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

The easy one is
rr = 1.0;
minkofsky () {
main ();
sphere (r = rr, $fn=40);
}
The problem is this makes the object 1mm larger in every direction.

More complicated seems to be:

module erode (e)
{
large_enough = 100;

difference () {
sphere (r=large_enough, $fn=8);
minkowski () {

   difference () {
     sphere (large_enough, $fn=8);
     children ();
   }
   sphere (r=e, $fn=20);
 }

}
}

module round (r)
{
minkowski () {
erode (r) children ();
sphere (r=r, $fn=20);
}
}

This seems to work. Took me longer than intended because some
intermediates didn't render correctly on my computer.

minkowski is a very compute-intensive operation. The preview seems to
take over a minute to render on my computer. Caching seems to help
render small changes quickly (but probably changes to the actual model
will require you to wait long again.

     Roger.

On Mon, Oct 18, 2021 at 08:08:26AM -0400, jon wrote:

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
intersection() {
hull() {
cube([wi, eps, ht]);
translate([ra, de - ra, 0])
cylinder(h = ht, r = ra);
translate([wi - ra, de - ra, 0])
cylinder(h = ht, r = ra);
}
rotate([-20, 0, 0])
cube(100);
}

main();


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

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.


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

Here is a fully rounded version that renders in less than 2 seconds with $fn set to 100. [image: image.png] On Mon, 18 Oct 2021 at 14:02, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > > The easy one is > rr = 1.0; > minkofsky () { > main (); > sphere (r = rr, $fn=40); > } > The problem is this makes the object 1mm larger in every direction. > > More complicated seems to be: > > > module erode (e) > { > large_enough = 100; > > difference () { > sphere (r=large_enough, $fn=8); > minkowski () { > > difference () { > sphere (large_enough, $fn=8); > children (); > } > sphere (r=e, $fn=20); > } > } > } > > module round (r) > { > minkowski () { > erode (r) children (); > sphere (r=r, $fn=20); > } > } > > This seems to work. Took me longer than intended because some > intermediates didn't render correctly on my computer. > > minkowski is a very compute-intensive operation. The preview seems to > take over a minute to render on my computer. Caching seems to help > render small changes quickly (but probably changes to the actual model > will require you to wait long again. > > Roger. > > > > > > On Mon, Oct 18, 2021 at 08:08:26AM -0400, jon wrote: > > Can someone help me round some or all of the edges on this part, please? > > > > eps = 0.01; > > $fn = 100; > > inches = 25.4; > > > > ra = 15; > > wi = 55.6; > > ht = 12; > > de = 30; > > > > module main() > > intersection() { > > hull() { > > cube([wi, eps, ht]); > > translate([ra, de - ra, 0]) > > cylinder(h = ht, r = ra); > > translate([wi - ra, de - ra, 0]) > > cylinder(h = ht, r = ra); > > } > > rotate([-20, 0, 0]) > > cube(100); > > } > > > > main(); > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > -- > ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 > ** > ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** > f equals m times a. When your f is steady, and your m is going down > your a is going up. -- Chris Hadfield about flying up the space shuttle. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
T
Terry
Mon, Oct 18, 2021 1:36 PM

Nophead: I think I've carefully reproduced your code (I've pasted it below). But
my result looks like the attached. Or here:
https://www.dropbox.com/s/ghfr5wbrvn5osx8/RoundedExampleNophead-T.jpg?raw=1

It's as if I'm not using your library, despite earlier examples from it working
a while ago. If I comment out your Use statement the result is unchanged.

Errors shown:
WARNING: undefined operation (undefined - number) in file
RoundExample-Nophead.scad, line 28
WARNING: Ignoring unknown variable 'wi' in file ../RoundExample-Nophead.scad,
line 30
WARNING: undefined operation (undefined - number) in file
RoundExample-Nophead.scad, line 30
WARNING: Unable to convert translate([undef, 7.36764, 9]) parameter to a vec3 or
vec2 of numbers in file ../RoundExample-Nophead.scad, line 30

Here's my copy of your code:

// My entry of Nophead's code:

use <NOPSCAD1ib/utils/rounded cylinder.scad>

eps = 0.01;
$fn = 100;
inches = 25.4;

ra = 15;
vi = 55.6;
ht = 12;
de = 30;

rad = 3;

module main() {
hull() {
translate([ra, de - ra, 0])
rotate(90)
rounded_cylinder(r = ra, h = ht, r2 = rad, angle = 90);
translate([wi - ra, de - ra, 0])
rounded_cylinder(r = ra, h = ht, r2 = rad, angle = 90);
translate([rad, rad])
cylinder(h = eps, r = rad);
translate([rad, rad + ht * tan(20), ht - rad])
sphere(rad);
translate([wi - rad, rad])
cylinder(h = eps, r = rad);
translate([wi - rad, rad + ht * tan(20), ht - rad])
sphere(rad);
}
}
main();

Terry

On Mon, 18 Oct 2021 13:56:50 +0100, you wrote:

[image: image.png]

Do you want to round the bottom edges as well ?

On Mon, 18 Oct 2021 at 13:08, jon jon@jonbondy.com wrote:

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
intersection() {
hull() {
cube([wi, eps, ht]);
translate([ra, de - ra, 0])
cylinder(h = ht, r = ra);
translate([wi - ra, de - ra, 0])
cylinder(h = ht, r = ra);
}
rotate([-20, 0, 0])
cube(100);
}

main();


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

Nophead: I think I've carefully reproduced your code (I've pasted it below). But my result looks like the attached. Or here: https://www.dropbox.com/s/ghfr5wbrvn5osx8/RoundedExampleNophead-T.jpg?raw=1 It's as if I'm not using your library, despite earlier examples from it working a while ago. If I comment out your Use statement the result is unchanged. Errors shown: WARNING: undefined operation (undefined - number) in file RoundExample-Nophead.scad, line 28 WARNING: Ignoring unknown variable 'wi' in file ../RoundExample-Nophead.scad, line 30 WARNING: undefined operation (undefined - number) in file RoundExample-Nophead.scad, line 30 WARNING: Unable to convert translate([undef, 7.36764, 9]) parameter to a vec3 or vec2 of numbers in file ../RoundExample-Nophead.scad, line 30 Here's my copy of your code: -------------------- // My entry of Nophead's code: use <NOPSCAD1ib/utils/rounded cylinder.scad> eps = 0.01; $fn = 100; inches = 25.4; ra = 15; vi = 55.6; ht = 12; de = 30; rad = 3; module main() { hull() { translate([ra, de - ra, 0]) rotate(90) rounded_cylinder(r = ra, h = ht, r2 = rad, angle = 90); translate([wi - ra, de - ra, 0]) rounded_cylinder(r = ra, h = ht, r2 = rad, angle = 90); translate([rad, rad]) cylinder(h = eps, r = rad); translate([rad, rad + ht * tan(20), ht - rad]) sphere(rad); translate([wi - rad, rad]) cylinder(h = eps, r = rad); translate([wi - rad, rad + ht * tan(20), ht - rad]) sphere(rad); } } main(); -------------------- Terry On Mon, 18 Oct 2021 13:56:50 +0100, you wrote: >[image: image.png] > >Do you want to round the bottom edges as well ? > >On Mon, 18 Oct 2021 at 13:08, jon <jon@jonbondy.com> wrote: > >> Can someone help me round some or all of the edges on this part, please? >> >> eps = 0.01; >> $fn = 100; >> inches = 25.4; >> >> ra = 15; >> wi = 55.6; >> ht = 12; >> de = 30; >> >> module main() >> intersection() { >> hull() { >> cube([wi, eps, ht]); >> translate([ra, de - ra, 0]) >> cylinder(h = ht, r = ra); >> translate([wi - ra, de - ra, 0]) >> cylinder(h = ht, r = ra); >> } >> rotate([-20, 0, 0]) >> cube(100); >> } >> >> main(); >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >>
T
Terry
Mon, Oct 18, 2021 1:46 PM

Corrected my error wi (not vi) = 55.6 and therefore getting closer, but ...

====================

Nophead: I think I've carefully reproduced your code (I've pasted it below). But
my result looks like the attached. Or here:
https://www.dropbox.com/s/ghfr5wbrvn5osx8/RoundedExampleNophead-T.jpg?raw=1

It's as if I'm not using your library, despite earlier examples from it working
a while ago. If I comment out your Use statement the result is unchanged.

Errors shown:
WARNING: undefined operation (undefined - number) in file
RoundExample-Nophead.scad, line 28
WARNING: Ignoring unknown variable 'wi' in file ../RoundExample-Nophead.scad,
line 30
WARNING: undefined operation (undefined - number) in file
RoundExample-Nophead.scad, line 30
WARNING: Unable to convert translate([undef, 7.36764, 9]) parameter to a vec3 or
vec2 of numbers in file ../RoundExample-Nophead.scad, line 30

Here's my copy of your code:

// My entry of Nophead's code:

use <NOPSCAD1ib/utils/rounded cylinder.scad>

eps = 0.01;
$fn = 100;
inches = 25.4;

ra = 15;
vi = 55.6;
ht = 12;
de = 30;

rad = 3;

module main() {
hull() {
translate([ra, de - ra, 0])
rotate(90)
rounded_cylinder(r = ra, h = ht, r2 = rad, angle = 90);
translate([wi - ra, de - ra, 0])
rounded_cylinder(r = ra, h = ht, r2 = rad, angle = 90);
translate([rad, rad])
cylinder(h = eps, r = rad);
translate([rad, rad + ht * tan(20), ht - rad])
sphere(rad);
translate([wi - rad, rad])
cylinder(h = eps, r = rad);
translate([wi - rad, rad + ht * tan(20), ht - rad])
sphere(rad);
}
}
main();

Terry

On Mon, 18 Oct 2021 13:56:50 +0100, you wrote:

[image: image.png]

Do you want to round the bottom edges as well ?

On Mon, 18 Oct 2021 at 13:08, jon jon@jonbondy.com wrote:

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
intersection() {
hull() {
cube([wi, eps, ht]);
translate([ra, de - ra, 0])
cylinder(h = ht, r = ra);
translate([wi - ra, de - ra, 0])
cylinder(h = ht, r = ra);
}
rotate([-20, 0, 0])
cube(100);
}

main();


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

Corrected my error wi (not vi) = 55.6 and therefore getting closer, but ... ==================== Nophead: I think I've carefully reproduced your code (I've pasted it below). But my result looks like the attached. Or here: https://www.dropbox.com/s/ghfr5wbrvn5osx8/RoundedExampleNophead-T.jpg?raw=1 It's as if I'm not using your library, despite earlier examples from it working a while ago. If I comment out your Use statement the result is unchanged. Errors shown: WARNING: undefined operation (undefined - number) in file RoundExample-Nophead.scad, line 28 WARNING: Ignoring unknown variable 'wi' in file ../RoundExample-Nophead.scad, line 30 WARNING: undefined operation (undefined - number) in file RoundExample-Nophead.scad, line 30 WARNING: Unable to convert translate([undef, 7.36764, 9]) parameter to a vec3 or vec2 of numbers in file ../RoundExample-Nophead.scad, line 30 Here's my copy of your code: -------------------- // My entry of Nophead's code: use <NOPSCAD1ib/utils/rounded cylinder.scad> eps = 0.01; $fn = 100; inches = 25.4; ra = 15; vi = 55.6; ht = 12; de = 30; rad = 3; module main() { hull() { translate([ra, de - ra, 0]) rotate(90) rounded_cylinder(r = ra, h = ht, r2 = rad, angle = 90); translate([wi - ra, de - ra, 0]) rounded_cylinder(r = ra, h = ht, r2 = rad, angle = 90); translate([rad, rad]) cylinder(h = eps, r = rad); translate([rad, rad + ht * tan(20), ht - rad]) sphere(rad); translate([wi - rad, rad]) cylinder(h = eps, r = rad); translate([wi - rad, rad + ht * tan(20), ht - rad]) sphere(rad); } } main(); -------------------- Terry On Mon, 18 Oct 2021 13:56:50 +0100, you wrote: >[image: image.png] > >Do you want to round the bottom edges as well ? > >On Mon, 18 Oct 2021 at 13:08, jon <jon@jonbondy.com> wrote: > >> Can someone help me round some or all of the edges on this part, please? >> >> eps = 0.01; >> $fn = 100; >> inches = 25.4; >> >> ra = 15; >> wi = 55.6; >> ht = 12; >> de = 30; >> >> module main() >> intersection() { >> hull() { >> cube([wi, eps, ht]); >> translate([ra, de - ra, 0]) >> cylinder(h = ht, r = ra); >> translate([wi - ra, de - ra, 0]) >> cylinder(h = ht, r = ra); >> } >> rotate([-20, 0, 0]) >> cube(100); >> } >> >> main(); >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >>
T
Terry
Mon, Oct 18, 2021 2:30 PM

The dominant error was
WARNING: Can't open library 'NOPSCAD1ib/utils/rounded_cylinder.scad'.
I have my library path properly specified and it contains NopSCAD.lib so it was
puzzling. But I eventually resolved it by manually typing in much of your code
image (for which I'd mainly used a OCR tool initially). I think that one or more
of the 'l' (EL) characters had become '1' (ONE).

What font do others use to avoid that ambiguity please? How do i change it?


As usual I see none of my posts, so I hope they have indeed appeared in the
list, as informed by the automated message.

Terry

====================

On Mon, 18 Oct 2021 13:56:50 +0100, you wrote:

[image: image.png]

Do you want to round the bottom edges as well ?

On Mon, 18 Oct 2021 at 13:08, jon jon@jonbondy.com wrote:

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
intersection() {
hull() {
cube([wi, eps, ht]);
translate([ra, de - ra, 0])
cylinder(h = ht, r = ra);
translate([wi - ra, de - ra, 0])
cylinder(h = ht, r = ra);
}
rotate([-20, 0, 0])
cube(100);
}

main();


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

The dominant error was WARNING: Can't open library 'NOPSCAD1ib/utils/rounded_cylinder.scad'. I have my library path properly specified and it contains NopSCAD.lib so it was puzzling. But I eventually resolved it by manually typing in much of your code image (for which I'd mainly used a OCR tool initially). I think that one or more of the 'l' (EL) characters had become '1' (ONE). What font do others use to avoid that ambiguity please? How do i change it? -------------------- As usual I see none of my posts, so I hope they have indeed appeared in the list, as informed by the automated message. Terry ==================== On Mon, 18 Oct 2021 13:56:50 +0100, you wrote: >[image: image.png] > >Do you want to round the bottom edges as well ? > >On Mon, 18 Oct 2021 at 13:08, jon <jon@jonbondy.com> wrote: > >> Can someone help me round some or all of the edges on this part, please? >> >> eps = 0.01; >> $fn = 100; >> inches = 25.4; >> >> ra = 15; >> wi = 55.6; >> ht = 12; >> de = 30; >> >> module main() >> intersection() { >> hull() { >> cube([wi, eps, ht]); >> translate([ra, de - ra, 0]) >> cylinder(h = ht, r = ra); >> translate([wi - ra, de - ra, 0]) >> cylinder(h = ht, r = ra); >> } >> rotate([-20, 0, 0]) >> cube(100); >> } >> >> main(); >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >>
NH
nop head
Mon, Oct 18, 2021 2:58 PM

This is the code I used.

use <NopSCADlib/utils/rounded_cylinder.scad>

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

rad = 3;

module main() {
hull() {
translate([ra, de - ra, ht / 2])
rotate(90)
rounded_cylinder(r = ra, h = ht / 2, r2 = rad, angle = 90);

    translate([ra, de - ra, ht / 2])
        rotate([180, 0, 180])
            rounded_cylinder(r = ra, h = ht / 2, r2 = rad, angle = 90);

    translate([wi - ra, de - ra, ht / 2])
        rounded_cylinder(r = ra, h = ht / 2, r2 = rad, angle = 90);

    translate([wi - ra, de - ra, ht / 2])
        rotate([180, 0, 90])
            rounded_cylinder(r = ra, h = ht / 2, r2 = rad, angle = 90);

    translate([rad, rad, rad])
        sphere(rad);

    translate([rad, rad + ht * tan(20), ht - rad])
        sphere(rad);

    translate([wi - rad, rad, rad])
        sphere(rad);

    translate([wi - rad, rad + ht * tan(20), ht - rad])
        sphere(rad);
}

}

main();

On Mon, 18 Oct 2021 at 15:30, Terry terrypingm@gmail.com wrote:

The dominant error was
WARNING: Can't open library 'NOPSCAD1ib/utils/rounded_cylinder.scad'.
I have my library path properly specified and it contains NopSCAD.lib so
it was
puzzling. But I eventually resolved it by manually typing in much of your
code
image (for which I'd mainly used a OCR tool initially). I think that one
or more
of the 'l' (EL) characters had become '1' (ONE).

What font do others use to avoid that ambiguity please? How do i change it?


As usual I see none of my posts, so I hope they have indeed appeared in the
list, as informed by the automated message.

Terry

====================

On Mon, 18 Oct 2021 13:56:50 +0100, you wrote:

[image: image.png]

Do you want to round the bottom edges as well ?

On Mon, 18 Oct 2021 at 13:08, jon jon@jonbondy.com wrote:

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
intersection() {
hull() {
cube([wi, eps, ht]);
translate([ra, de - ra, 0])
cylinder(h = ht, r = ra);
translate([wi - ra, de - ra, 0])
cylinder(h = ht, r = ra);
}
rotate([-20, 0, 0])
cube(100);
}

main();


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


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

This is the code I used. use <NopSCADlib/utils/rounded_cylinder.scad> eps = 0.01; $fn = 100; inches = 25.4; ra = 15; wi = 55.6; ht = 12; de = 30; rad = 3; module main() { hull() { translate([ra, de - ra, ht / 2]) rotate(90) rounded_cylinder(r = ra, h = ht / 2, r2 = rad, angle = 90); translate([ra, de - ra, ht / 2]) rotate([180, 0, 180]) rounded_cylinder(r = ra, h = ht / 2, r2 = rad, angle = 90); translate([wi - ra, de - ra, ht / 2]) rounded_cylinder(r = ra, h = ht / 2, r2 = rad, angle = 90); translate([wi - ra, de - ra, ht / 2]) rotate([180, 0, 90]) rounded_cylinder(r = ra, h = ht / 2, r2 = rad, angle = 90); translate([rad, rad, rad]) sphere(rad); translate([rad, rad + ht * tan(20), ht - rad]) sphere(rad); translate([wi - rad, rad, rad]) sphere(rad); translate([wi - rad, rad + ht * tan(20), ht - rad]) sphere(rad); } } main(); On Mon, 18 Oct 2021 at 15:30, Terry <terrypingm@gmail.com> wrote: > The dominant error was > WARNING: Can't open library 'NOPSCAD1ib/utils/rounded_cylinder.scad'. > I have my library path properly specified and it contains NopSCAD.lib so > it was > puzzling. But I eventually resolved it by manually typing in much of your > code > image (for which I'd mainly used a OCR tool initially). I think that one > or more > of the 'l' (EL) characters had become '1' (ONE). > > What font do others use to avoid that ambiguity please? How do i change it? > > -------------------- > > As usual I see none of my posts, so I hope they have indeed appeared in the > list, as informed by the automated message. > > Terry > > ==================== > > > On Mon, 18 Oct 2021 13:56:50 +0100, you wrote: > > >[image: image.png] > > > >Do you want to round the bottom edges as well ? > > > >On Mon, 18 Oct 2021 at 13:08, jon <jon@jonbondy.com> wrote: > > > >> Can someone help me round some or all of the edges on this part, please? > >> > >> eps = 0.01; > >> $fn = 100; > >> inches = 25.4; > >> > >> ra = 15; > >> wi = 55.6; > >> ht = 12; > >> de = 30; > >> > >> module main() > >> intersection() { > >> hull() { > >> cube([wi, eps, ht]); > >> translate([ra, de - ra, 0]) > >> cylinder(h = ht, r = ra); > >> translate([wi - ra, de - ra, 0]) > >> cylinder(h = ht, r = ra); > >> } > >> rotate([-20, 0, 0]) > >> cube(100); > >> } > >> > >> main(); > >> _______________________________________________ > >> OpenSCAD mailing list > >> To unsubscribe send an email to discuss-leave@lists.openscad.org > >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Mon, Oct 18, 2021 4:33 PM

On 10/18/2021 7:30 AM, Terry wrote:

[ l vs 1 ambiguity ]

What font do others use to avoid that ambiguity please? How do i change it?

First, of course, if you find yourself trying to OCR an image of a
program, something is already very wrong.

For OCR of programs, I wouldn't be optimistic.  The OCR can't know very
much about the context.  For OCR of English text, it can know that
"English" is a word and "Eng1ish" is not, and guess correctly most of
the time.

I generally find that most monospace fonts do a decent job of conveying
the distinction between l, 1, and I.  I (capital I) is usually not a
problem, because they usually give it crossbars.  Sans-serif fonts, on
the other hand, tend to be just awful; in the font I'm typing in right
now the lower-case ell and the upper-case eye are basically
indistinguishable.  In programming, I think that mostly I just don't
make one-vs-ell typos, and by convention I don't use an ell by itself as
a variable name.  In most cases it is like English text:  I know which
one it is by the context.

I dimly remember a slashed-one or slashed-ell convention, but that was
never very popular.  Another convention that was never very popular was
to show an ell in a script form, with a visible loop.

Oh and zero have similar problems.  Long ago it was common to put a
slash across a zero; today it seems that the convention is much more
subtle, making the zero a bit narrower.

As usual I see none of my posts, so I hope they have indeed appeared in the
list, as informed by the automated message.

That's Gmail's fault.

https://support.google.com/a/answer/1703601?hl=en
has a hackish workaround.  (Why they don't make this a preference I
don't know.)

One would hope that mostly, like 1:1 email, if you sent it and it didn't
bounce, it went through OK.

On 10/18/2021 7:30 AM, Terry wrote: > [ l vs 1 ambiguity ] > > What font do others use to avoid that ambiguity please? How do i change it? First, of course, if you find yourself trying to OCR an image of a program, something is already very wrong. For OCR of programs, I wouldn't be optimistic.  The OCR can't know very much about the context.  For OCR of English text, it can know that "English" is a word and "Eng1ish" is not, and guess correctly most of the time. I generally find that most monospace fonts do a decent job of conveying the distinction between l, 1, and I.  I (capital I) is usually not a problem, because they usually give it crossbars.  Sans-serif fonts, on the other hand, tend to be just awful; in the font I'm typing in right now the lower-case ell and the upper-case eye are basically indistinguishable.  In programming, I think that mostly I just don't make one-vs-ell typos, and by convention I don't use an ell by itself as a variable name.  In most cases it is like English text:  I know which one it is by the context. I dimly remember a slashed-one or slashed-ell convention, but that was never very popular.  Another convention that was never very popular was to show an ell in a script form, with a visible loop. Oh and zero have similar problems.  Long ago it was common to put a slash across a zero; today it seems that the convention is much more subtle, making the zero a bit narrower. > As usual I see none of my posts, so I hope they have indeed appeared in the > list, as informed by the automated message. That's Gmail's fault. https://support.google.com/a/answer/1703601?hl=en has a hackish workaround.  (Why they don't make this a preference I don't know.) One would hope that mostly, like 1:1 email, if you sent it and it didn't bounce, it went through OK.
RW
Ray West
Mon, Oct 18, 2021 6:58 PM

I use DejaVu Sans Mono in the editor, and also in the console of
openscad. (It was about the best I found to distinguish 1,I,l  and it
puts a dot in the zero) at a reasonably small font size. The console was
the main problem, had to install a later (beta?) version of openscad to
let me change that font.

On 18/10/2021 15:30, Terry wrote:

The dominant error was
WARNING: Can't open library 'NOPSCAD1ib/utils/rounded_cylinder.scad'.
I have my library path properly specified and it contains NopSCAD.lib so it was
puzzling. But I eventually resolved it by manually typing in much of your code
image (for which I'd mainly used a OCR tool initially). I think that one or more
of the 'l' (EL) characters had become '1' (ONE).

What font do others use to avoid that ambiguity please? How do i change it?


As usual I see none of my posts, so I hope they have indeed appeared in the
list, as informed by the automated message.

Terry

====================

On Mon, 18 Oct 2021 13:56:50 +0100, you wrote:

[image: image.png]

Do you want to round the bottom edges as well ?

On Mon, 18 Oct 2021 at 13:08, jon jon@jonbondy.com wrote:

Can someone help me round some or all of the edges on this part, please?

eps = 0.01;
$fn = 100;
inches =  25.4;

ra = 15;
wi = 55.6;
ht = 12;
de = 30;

module main()
intersection() {
hull() {
cube([wi, eps, ht]);
translate([ra, de - ra, 0])
cylinder(h = ht, r = ra);
translate([wi - ra, de - ra, 0])
cylinder(h = ht, r = ra);
}
rotate([-20, 0, 0])
cube(100);
}

main();


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


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

I use DejaVu Sans Mono in the editor, and also in the console of openscad. (It was about the best I found to distinguish 1,I,l  and it puts a dot in the zero) at a reasonably small font size. The console was the main problem, had to install a later (beta?) version of openscad to let me change that font. On 18/10/2021 15:30, Terry wrote: > The dominant error was > WARNING: Can't open library 'NOPSCAD1ib/utils/rounded_cylinder.scad'. > I have my library path properly specified and it contains NopSCAD.lib so it was > puzzling. But I eventually resolved it by manually typing in much of your code > image (for which I'd mainly used a OCR tool initially). I think that one or more > of the 'l' (EL) characters had become '1' (ONE). > > What font do others use to avoid that ambiguity please? How do i change it? > > -------------------- > > As usual I see none of my posts, so I hope they have indeed appeared in the > list, as informed by the automated message. > > Terry > > ==================== > > > On Mon, 18 Oct 2021 13:56:50 +0100, you wrote: > >> [image: image.png] >> >> Do you want to round the bottom edges as well ? >> >> On Mon, 18 Oct 2021 at 13:08, jon <jon@jonbondy.com> wrote: >> >>> Can someone help me round some or all of the edges on this part, please? >>> >>> eps = 0.01; >>> $fn = 100; >>> inches = 25.4; >>> >>> ra = 15; >>> wi = 55.6; >>> ht = 12; >>> de = 30; >>> >>> module main() >>> intersection() { >>> hull() { >>> cube([wi, eps, ht]); >>> translate([ra, de - ra, 0]) >>> cylinder(h = ht, r = ra); >>> translate([wi - ra, de - ra, 0]) >>> cylinder(h = ht, r = ra); >>> } >>> rotate([-20, 0, 0]) >>> cube(100); >>> } >>> >>> main(); >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org