discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

what is wrong with this code ?

KE
Karl Exler
Tue, Aug 20, 2024 9:01 AM

dear all,

I started to use the function round3d()... but this ends deadly with my
Lenovo i5, 4cores and 16 GB of RAM.. running on Linux Mint latest.

Is ist the function? Or my code?
F5 takes crazy long for a preview.. Can you recommend an easier way to
round the corners of e.g. a cylinder?

many thanks
Karl

include <bosl2/std.scad>
include <bosl2/screws.scad>

bohrung();
*
*

module bohrung()

*round3d(or=1.5) *

{
    diff()
    cylinder(d=25,h=7,center=true)
    {
         tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, thread=true);
    };
};

dear all, I started to use the function round3d()... but this ends deadly with my Lenovo i5, 4cores and 16 GB of RAM.. running on Linux Mint latest. Is ist the function? Or my code? F5 takes crazy long for a preview.. Can you recommend an easier way to round the corners of e.g. a cylinder? many thanks Karl include <bosl2/std.scad> include <bosl2/screws.scad> bohrung(); * * module bohrung() *round3d(or=1.5) * {     diff()     cylinder(d=25,h=7,center=true)     {          tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, thread=true);     }; };
AM
Adrian Mariano
Tue, Aug 20, 2024 10:21 AM

The round3d() module uses 3 calls to minkowski and hence is extremely
slow.  I've heard minkowski is faster with manifold?  I have suggested to
Revar that round3d() be removed from the library because it's not actually
useful in practice, but he disagrees.

To do what you want, use cyl() and use its rounding options.

diff()
cyl(d=25,h=7,rounding=1.5)
{
tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, thread=true);
};

On Tue, Aug 20, 2024 at 5:07 AM Karl Exler via Discuss <
discuss@lists.openscad.org> wrote:

dear all,

I started to use the function round3d()... but this ends deadly with my
Lenovo i5, 4cores and 16 GB of RAM.. running on Linux Mint latest.

Is ist the function? Or my code?
F5 takes crazy long for a preview.. Can you recommend an easier way to
round the corners of e.g. a cylinder?

many thanks
Karl

include <bosl2/std.scad>
include <bosl2/screws.scad>

bohrung();

module bohrung()

*round3d(or=1.5) *

{
diff()
cylinder(d=25,h=7,center=true)
{
tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, thread=true);
};
};


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

The round3d() module uses 3 calls to minkowski and hence is extremely slow. I've heard minkowski is faster with manifold? I have suggested to Revar that round3d() be removed from the library because it's not actually useful in practice, but he disagrees. To do what you want, use cyl() and use its rounding options. diff() cyl(d=25,h=7,rounding=1.5) { tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, thread=true); }; On Tue, Aug 20, 2024 at 5:07 AM Karl Exler via Discuss < discuss@lists.openscad.org> wrote: > dear all, > > I started to use the function round3d()... but this ends deadly with my > Lenovo i5, 4cores and 16 GB of RAM.. running on Linux Mint latest. > > Is ist the function? Or my code? > F5 takes crazy long for a preview.. Can you recommend an easier way to > round the corners of e.g. a cylinder? > > many thanks > Karl > > > > include <bosl2/std.scad> > include <bosl2/screws.scad> > > > bohrung(); > > module bohrung() > > *round3d(or=1.5) * > > { > diff() > cylinder(d=25,h=7,center=true) > { > tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, thread=true); > }; > }; > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Tue, Aug 20, 2024 10:34 AM

I tried the original code in the dev version and it finishes preview in 55s
on my machine.  But even if you want to wait you have another problem:  it
destroys the screw threads:

[image: image.png]

You can add a bevel to the screw hole, but not a rounding, though if you
use radius 1.5 it doesn't leave much thread on a 7mm hole.

diff()
cyl(d=25,h=7,rounding=1.5)
{
tag ("remove") screw_hole("M6x1.5,7.01",anchor=CENTER,
thread=true,bevel=0.5);
};

[image: image.png]

On Tue, Aug 20, 2024 at 6:21 AM Adrian Mariano avm4@cornell.edu wrote:

The round3d() module uses 3 calls to minkowski and hence is extremely
slow.  I've heard minkowski is faster with manifold?  I have suggested to
Revar that round3d() be removed from the library because it's not actually
useful in practice, but he disagrees.

To do what you want, use cyl() and use its rounding options.

diff()
cyl(d=25,h=7,rounding=1.5)
{
tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, thread=true);
};

On Tue, Aug 20, 2024 at 5:07 AM Karl Exler via Discuss <
discuss@lists.openscad.org> wrote:

dear all,

I started to use the function round3d()... but this ends deadly with my
Lenovo i5, 4cores and 16 GB of RAM.. running on Linux Mint latest.

Is ist the function? Or my code?
F5 takes crazy long for a preview.. Can you recommend an easier way to
round the corners of e.g. a cylinder?

many thanks
Karl

include <bosl2/std.scad>
include <bosl2/screws.scad>

bohrung();

module bohrung()

*round3d(or=1.5) *

{
diff()
cylinder(d=25,h=7,center=true)
{
tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER,
thread=true);
};
};


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

I tried the original code in the dev version and it finishes preview in 55s on my machine. But even if you want to wait you have another problem: it destroys the screw threads: [image: image.png] You can add a bevel to the screw hole, but not a rounding, though if you use radius 1.5 it doesn't leave much thread on a 7mm hole. diff() cyl(d=25,h=7,rounding=1.5) { tag ("remove") screw_hole("M6x1.5,7.01",anchor=CENTER, thread=true,bevel=0.5); }; [image: image.png] On Tue, Aug 20, 2024 at 6:21 AM Adrian Mariano <avm4@cornell.edu> wrote: > The round3d() module uses 3 calls to minkowski and hence is extremely > slow. I've heard minkowski is faster with manifold? I have suggested to > Revar that round3d() be removed from the library because it's not actually > useful in practice, but he disagrees. > > To do what you want, use cyl() and use its rounding options. > > diff() > cyl(d=25,h=7,rounding=1.5) > { > tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, thread=true); > }; > > On Tue, Aug 20, 2024 at 5:07 AM Karl Exler via Discuss < > discuss@lists.openscad.org> wrote: > >> dear all, >> >> I started to use the function round3d()... but this ends deadly with my >> Lenovo i5, 4cores and 16 GB of RAM.. running on Linux Mint latest. >> >> Is ist the function? Or my code? >> F5 takes crazy long for a preview.. Can you recommend an easier way to >> round the corners of e.g. a cylinder? >> >> many thanks >> Karl >> >> >> >> include <bosl2/std.scad> >> include <bosl2/screws.scad> >> >> >> bohrung(); >> >> module bohrung() >> >> *round3d(or=1.5) * >> >> { >> diff() >> cylinder(d=25,h=7,center=true) >> { >> tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, >> thread=true); >> }; >> }; >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >
RW
Raymond West
Tue, Aug 20, 2024 12:04 PM

This is quick enough. (not bothered with OP dimensions, nor thread)

On 20/08/2024 11:21, Adrian Mariano via Discuss wrote:

The round3d() module uses 3 calls to minkowski and hence is extremely
slow.  I've heard minkowski is faster with manifold?   I have
suggested to Revar that round3d() be removed from the library because
it's not actually useful in practice, but he disagrees.

To do what you want, use cyl() and use its rounding options.

  diff()
    cyl(d=25,h=7,rounding=1.5)
    {
         tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER,
thread=true);
    };

On Tue, Aug 20, 2024 at 5:07 AM Karl Exler via Discuss
discuss@lists.openscad.org wrote:

 dear all,

 I started to use the function round3d()... but this ends deadly
 with my Lenovo i5, 4cores and 16 GB of RAM.. running on Linux Mint
 latest.

 Is ist the function? Or my code?
 F5 takes crazy long for a preview.. Can you recommend an easier
 way to round the corners of e.g. a cylinder?

 many thanks
 Karl



 include <bosl2/std.scad>
 include <bosl2/screws.scad>


 bohrung();
 *
 *

 module bohrung()

 *round3d(or=1.5) *

 {
     diff()
     cylinder(d=25,h=7,center=true)
     {
          tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER,
 thread=true);
     };
 };

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

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

This is quick enough. (not bothered with OP dimensions, nor thread) On 20/08/2024 11:21, Adrian Mariano via Discuss wrote: > The round3d() module uses 3 calls to minkowski and hence is extremely > slow.  I've heard minkowski is faster with manifold?   I have > suggested to Revar that round3d() be removed from the library because > it's not actually useful in practice, but he disagrees. > > To do what you want, use cyl() and use its rounding options. > >   diff() >     cyl(d=25,h=7,rounding=1.5) >     { >          tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, > thread=true); >     }; > > On Tue, Aug 20, 2024 at 5:07 AM Karl Exler via Discuss > <discuss@lists.openscad.org> wrote: > > dear all, > > I started to use the function round3d()... but this ends deadly > with my Lenovo i5, 4cores and 16 GB of RAM.. running on Linux Mint > latest. > > Is ist the function? Or my code? > F5 takes crazy long for a preview.. Can you recommend an easier > way to round the corners of e.g. a cylinder? > > many thanks > Karl > > > > include <bosl2/std.scad> > include <bosl2/screws.scad> > > > bohrung(); > * > * > > module bohrung() > > *round3d(or=1.5) * > > { >     diff() >     cylinder(d=25,h=7,center=true) >     { >          tag ("remove") screw_hole("M6x1.5,35",anchor=CENTER, > thread=true); >     }; > }; > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org