discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

How to round the differenced edge

BR
Bob Roos
Sat, Jun 4, 2022 6:22 PM

Hello Discuss,

I would like to have all the edges in this figure rounded like this, but this is way too slow.

include <BOSL2/std.scad>
include <BOSL2/rounding.scad>

$fn = 36;
minkowski(){
difference(){
cuboid([80,73,.5]);
translate([0,35,-.25])cylinder(d=70,h=3);
}
sphere(1);
}

Best regards,
Bob                          mailto:roosbob@wybatap.com

Hello Discuss, I would like to have all the edges in this figure rounded like this, but this is way too slow. include <BOSL2/std.scad> include <BOSL2/rounding.scad> $fn = 36; minkowski(){ difference(){ cuboid([80,73,.5]); translate([0,35,-.25])cylinder(d=70,h=3); } sphere(1); } -- Best regards, Bob mailto:roosbob@wybatap.com
AM
Adrian Mariano
Sat, Jun 4, 2022 8:27 PM

There is no general method other than minkowski that can round
arbitrary differences, though in practice if you give it an arbitrary
difference it'll take a couple hours, so it's a somewhat theoretical
capability.

Your figure looks like it's a pretty simple figure, though.  You could
round it by subtracting a cylinder with flaring ends.

$fn = 36;
difference(){
cuboid([80,73,2.5],rounding=1);
translate([0,35,0])
cyl(d=70,h=2.51,rounding=-1);
}

This doesn't round quite the same way as minkowski, since it leaves
corners where the cylinder cuts in.  If that's not OK you could use
round_corners() or path_join() to make a 2d point list that you pass
to offset_sweep().

On Sat, Jun 4, 2022 at 2:23 PM Bob Roos roosbob@wybatap.com wrote:

Hello Discuss,

I would like to have all the edges in this figure rounded like this, but this is way too slow.

include <BOSL2/std.scad>
include <BOSL2/rounding.scad>

$fn = 36;
minkowski(){
difference(){
cuboid([80,73,.5]);
translate([0,35,-.25])cylinder(d=70,h=3);
}
sphere(1);
}

Best regards,
Bob                          mailto:roosbob@wybatap.com


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

There is no general method other than minkowski that can round arbitrary differences, though in practice if you give it an arbitrary difference it'll take a couple hours, so it's a somewhat theoretical capability. Your figure looks like it's a pretty simple figure, though. You could round it by subtracting a cylinder with flaring ends. $fn = 36; difference(){ cuboid([80,73,2.5],rounding=1); translate([0,35,0]) cyl(d=70,h=2.51,rounding=-1); } This doesn't round quite the same way as minkowski, since it leaves corners where the cylinder cuts in. If that's not OK you could use round_corners() or path_join() to make a 2d point list that you pass to offset_sweep(). On Sat, Jun 4, 2022 at 2:23 PM Bob Roos <roosbob@wybatap.com> wrote: > > Hello Discuss, > > I would like to have all the edges in this figure rounded like this, but this is way too slow. > > include <BOSL2/std.scad> > include <BOSL2/rounding.scad> > > $fn = 36; > minkowski(){ > difference(){ > cuboid([80,73,.5]); > translate([0,35,-.25])cylinder(d=70,h=3); > } > sphere(1); > } > -- > Best regards, > Bob mailto:roosbob@wybatap.com > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
BR
Bob Roos
Sun, Jun 5, 2022 12:47 PM

Hi Adrian,

Thank you very much.  That is MUCH faster and it will hold the shower curtain up off the surround wall perfectly.

I did not know about flare (negative) rounding.

I will explore offset-sweep.  That looks it will require some serious study.

Bob Roos

Saturday, June 4, 2022, 4:27:31 PM, you wrote:

There is no general method other than minkowski that can round
arbitrary differences, though in practice if you give it an arbitrary
difference it'll take a couple hours, so it's a somewhat theoretical
capability.

Your figure looks like it's a pretty simple figure, though.  You could
round it by subtracting a cylinder with flaring ends.

$fn = 36;
difference(){
cuboid([80,73,2.5],rounding=1);
translate([0,35,0])
cyl(d=70,h=2.51,rounding=-1);
}

This doesn't round quite the same way as minkowski, since it leaves
corners where the cylinder cuts in.  If that's not OK you could use
round_corners() or path_join() to make a 2d point list that you pass
to offset_sweep().

On Sat, Jun 4, 2022 at 2:23 PM Bob Roos roosbob@wybatap.com wrote:

Hello Discuss,

I would like to have all the edges in this figure rounded like this, but this is way too slow.

include <BOSL2/std.scad>
include <BOSL2/rounding.scad>

$fn = 36;
minkowski(){
difference(){
cuboid([80,73,.5]);
translate([0,35,-.25])cylinder(d=70,h=3);
}
sphere(1);
}

Best regards,
Bob                          mailto:roosbob@wybatap.com


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

--
have Fun,
Bob                          mailto:roosbob@wybatap.com

Hi Adrian, Thank you very much. That is MUCH faster and it will hold the shower curtain up off the surround wall perfectly. I did not know about flare (negative) rounding. I will explore offset-sweep. That looks it will require some serious study. Bob Roos Saturday, June 4, 2022, 4:27:31 PM, you wrote: > There is no general method other than minkowski that can round > arbitrary differences, though in practice if you give it an arbitrary > difference it'll take a couple hours, so it's a somewhat theoretical > capability. > Your figure looks like it's a pretty simple figure, though. You could > round it by subtracting a cylinder with flaring ends. > $fn = 36; > difference(){ > cuboid([80,73,2.5],rounding=1); > translate([0,35,0]) > cyl(d=70,h=2.51,rounding=-1); > } > This doesn't round quite the same way as minkowski, since it leaves > corners where the cylinder cuts in. If that's not OK you could use > round_corners() or path_join() to make a 2d point list that you pass > to offset_sweep(). > On Sat, Jun 4, 2022 at 2:23 PM Bob Roos <roosbob@wybatap.com> wrote: >> >> Hello Discuss, >> >> I would like to have all the edges in this figure rounded like this, but this is way too slow. >> >> include <BOSL2/std.scad> >> include <BOSL2/rounding.scad> >> >> $fn = 36; >> minkowski(){ >> difference(){ >> cuboid([80,73,.5]); >> translate([0,35,-.25])cylinder(d=70,h=3); >> } >> sphere(1); >> } >> -- >> Best regards, >> Bob mailto:roosbob@wybatap.com >> _______________________________________________ >> 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 -- have Fun, Bob mailto:roosbob@wybatap.com