discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

BOSL2 Rounded Cuboid Different Rounding

ME
Mark Erbaugh
Sun, Apr 19, 2026 5:41 PM

Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm corner radius (vertical) and a small radius or chamfer on the bottom and top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle, but would that be computationally expensive?

Thanks,
Mark

Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges? For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm corner radius (vertical) and a small radius or chamfer on the bottom and top faces. I suppose I could do a Minkowski using a rounded 2d rectangle, but would that be computationally expensive? Thanks, Mark
AM
Adrian Mariano
Sun, Apr 19, 2026 6:19 PM

Easiest way to do what you want in BOSL2 is to use rounded_prism().  If you
want actual circular roundings you can do it using multiple uses of
edge_profile(), but the corner blending won't be as nice.

On Sun, Apr 19, 2026 at 1:42 PM Mark Erbaugh via Discuss <
discuss@lists.openscad.org> wrote:

Is it possible with BOSL2 or something else to create a cubed with a
different corner radius on the vertical edges versus the horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm
corner radius (vertical) and a small radius or chamfer on the bottom and
top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle, but would
that be computationally expensive?

Thanks,
Mark


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

Easiest way to do what you want in BOSL2 is to use rounded_prism(). If you want actual circular roundings you can do it using multiple uses of edge_profile(), but the corner blending won't be as nice. On Sun, Apr 19, 2026 at 1:42 PM Mark Erbaugh via Discuss < discuss@lists.openscad.org> wrote: > Is it possible with BOSL2 or something else to create a cubed with a > different corner radius on the vertical edges versus the horizontal edges? > > For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm > corner radius (vertical) and a small radius or chamfer on the bottom and > top faces. > > I suppose I could do a Minkowski using a rounded 2d rectangle, but would > that be computationally expensive? > > > Thanks, > Mark > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Sun, Apr 19, 2026 6:20 PM

Forgot also you can do this with offset_sweep which can give you circular
roundings with a nice blend if you want that, but might be slower.

On Sun, Apr 19, 2026 at 2:19 PM Adrian Mariano avm4@cornell.edu wrote:

Easiest way to do what you want in BOSL2 is to use rounded_prism().  If
you want actual circular roundings you can do it using multiple uses of
edge_profile(), but the corner blending won't be as nice.

On Sun, Apr 19, 2026 at 1:42 PM Mark Erbaugh via Discuss <
discuss@lists.openscad.org> wrote:

Is it possible with BOSL2 or something else to create a cubed with a
different corner radius on the vertical edges versus the horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm
corner radius (vertical) and a small radius or chamfer on the bottom and
top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle, but would
that be computationally expensive?

Thanks,
Mark


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

Forgot also you can do this with offset_sweep which can give you circular roundings with a nice blend if you want that, but might be slower. On Sun, Apr 19, 2026 at 2:19 PM Adrian Mariano <avm4@cornell.edu> wrote: > Easiest way to do what you want in BOSL2 is to use rounded_prism(). If > you want actual circular roundings you can do it using multiple uses of > edge_profile(), but the corner blending won't be as nice. > > On Sun, Apr 19, 2026 at 1:42 PM Mark Erbaugh via Discuss < > discuss@lists.openscad.org> wrote: > >> Is it possible with BOSL2 or something else to create a cubed with a >> different corner radius on the vertical edges versus the horizontal edges? >> >> For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm >> corner radius (vertical) and a small radius or chamfer on the bottom and >> top faces. >> >> I suppose I could do a Minkowski using a rounded 2d rectangle, but would >> that be computationally expensive? >> >> >> Thanks, >> Mark >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >
RW
Raymond West
Sun, Apr 19, 2026 7:11 PM

d= 20;

module corner(){
cylinder(d=d,h=2,center=true);
translate([0,0,1])
cylinder(d1=d,d2=0,h=d/2);
translate([0,0,-11])
cylinder(d2=d,d1=0,h=d/2);
}

module big(){
hull(){
translate([75/2,45/2,0])corner();
translate([-75/2,45/2,0])corner();
translate([75/2,-45/2,0])corner();
translate([-75/2,-45/2,0])corner();
}
}

module final(){
intersection(){
big();
cube([100,100,3],center=true);
}
}

final();

On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote:

Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm corner radius (vertical) and a small radius or chamfer on the bottom and top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle, but would that be computationally expensive?

Thanks,
Mark


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

d= 20; module corner(){ cylinder(d=d,h=2,center=true); translate([0,0,1]) cylinder(d1=d,d2=0,h=d/2); translate([0,0,-11]) cylinder(d2=d,d1=0,h=d/2); } module big(){ hull(){ translate([75/2,45/2,0])corner(); translate([-75/2,45/2,0])corner(); translate([75/2,-45/2,0])corner(); translate([-75/2,-45/2,0])corner(); } } module final(){ intersection(){ big(); cube([100,100,3],center=true); } } final(); On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote: > Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges? > > For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm corner radius (vertical) and a small radius or chamfer on the bottom and top faces. > > I suppose I could do a Minkowski using a rounded 2d rectangle, but would that be computationally expensive? > > > Thanks, > Mark > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
ME
Mark Erbaugh
Sun, Apr 19, 2026 9:39 PM

Thanks for all the replies.

I came up with the hull() approach shortly after my post.

module base(x,y,z,rv,rh)
{
hull()
for (ix=[-1,1], iy=[-1,1])
translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
cyl(r=rv,h=z,rounding=rh, anchor=BOT);
}

On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss discuss@lists.openscad.org wrote:

d= 20;

module corner(){
cylinder(d=d,h=2,center=true);
translate([0,0,1])
cylinder(d1=d,d2=0,h=d/2);
translate([0,0,-11])
cylinder(d2=d,d1=0,h=d/2);
}

module big(){
hull(){
translate([75/2,45/2,0])corner();
translate([-75/2,45/2,0])corner();
translate([75/2,-45/2,0])corner();
translate([-75/2,-45/2,0])corner();
}
}

module final(){
intersection(){
big();
cube([100,100,3],center=true);
}
}

final();

On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote:

Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm corner radius (vertical) and a small radius or chamfer on the bottom and top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle, but would that be computationally expensive?

Thanks,
Mark


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

Thanks for all the replies. I came up with the hull() approach shortly after my post. > module base(x,y,z,rv,rh) > { > hull() > for (ix=[-1,1], iy=[-1,1]) > translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) > cyl(r=rv,h=z,rounding=rh, anchor=BOT); > } > On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss <discuss@lists.openscad.org> wrote: > > d= 20; > > module corner(){ > cylinder(d=d,h=2,center=true); > translate([0,0,1]) > cylinder(d1=d,d2=0,h=d/2); > translate([0,0,-11]) > cylinder(d2=d,d1=0,h=d/2); > } > > > module big(){ > hull(){ > translate([75/2,45/2,0])corner(); > translate([-75/2,45/2,0])corner(); > translate([75/2,-45/2,0])corner(); > translate([-75/2,-45/2,0])corner(); > } > } > > > module final(){ > intersection(){ > big(); > cube([100,100,3],center=true); > } > } > > final(); > > On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote: >> Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges? >> >> For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm corner radius (vertical) and a small radius or chamfer on the bottom and top faces. >> >> I suppose I could do a Minkowski using a rounded 2d rectangle, but would that be computationally expensive? >> >> >> Thanks, >> Mark >> _______________________________________________ >> 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
TA
Todd Allen
Sun, Apr 19, 2026 11:29 PM

module base(x,y,z,rv,rh)
{
hull()
for (ix=[-1,1], iy=[-1,1])
translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
cyl(r=rv,h=z,rounding=rh, anchor=BOT);

Yet another way to do this.

module mybase(x,y,z,rv,rh) {
convex_offset_extrude(top=os_circle(rh), bottom=os_circle(rh), height=z)
rect([x,y], rounding=rv);
}

This also allows specifying a different radius or chamfer for each corner
of the rect() and more choices of treatments for the top and bottom.  Also
it is possible implement convex_offset_extrude() using roof() instead of
hull() and have offset_extrude() for non convex stuff such as text.

On Sun, Apr 19, 2026 at 4:39 PM Mark Erbaugh via Discuss <
discuss@lists.openscad.org> wrote:

Thanks for all the replies.

I came up with the hull() approach shortly after my post.

module base(x,y,z,rv,rh)
{
hull()
for (ix=[-1,1], iy=[-1,1])
translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
cyl(r=rv,h=z,rounding=rh, anchor=BOT);
}

On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss <

d= 20;

module corner(){
cylinder(d=d,h=2,center=true);
translate([0,0,1])
cylinder(d1=d,d2=0,h=d/2);
translate([0,0,-11])
cylinder(d2=d,d1=0,h=d/2);
}

module big(){
hull(){
translate([75/2,45/2,0])corner();
translate([-75/2,45/2,0])corner();
translate([75/2,-45/2,0])corner();
translate([-75/2,-45/2,0])corner();
}
}

module final(){
intersection(){
big();
cube([100,100,3],center=true);
}
}

final();

On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote:

Is it possible with BOSL2 or something else to create a cubed with a

different corner radius on the vertical edges versus the horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm

corner radius (vertical) and a small radius or chamfer on the bottom and
top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle, but

would that be computationally expensive?

Thanks,
Mark


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


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

> module base(x,y,z,rv,rh) > { > hull() > for (ix=[-1,1], iy=[-1,1]) > translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) > cyl(r=rv,h=z,rounding=rh, anchor=BOT); Yet another way to do this. module mybase(x,y,z,rv,rh) { convex_offset_extrude(top=os_circle(rh), bottom=os_circle(rh), height=z) rect([x,y], rounding=rv); } This also allows specifying a different radius or chamfer for each corner of the rect() and more choices of treatments for the top and bottom. Also it is possible implement convex_offset_extrude() using roof() instead of hull() and have offset_extrude() for non convex stuff such as text. On Sun, Apr 19, 2026 at 4:39 PM Mark Erbaugh via Discuss < discuss@lists.openscad.org> wrote: > Thanks for all the replies. > > I came up with the hull() approach shortly after my post. > > > module base(x,y,z,rv,rh) > > { > > hull() > > for (ix=[-1,1], iy=[-1,1]) > > translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) > > cyl(r=rv,h=z,rounding=rh, anchor=BOT); > > } > > > > On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss < > discuss@lists.openscad.org> wrote: > > > > d= 20; > > > > module corner(){ > > cylinder(d=d,h=2,center=true); > > translate([0,0,1]) > > cylinder(d1=d,d2=0,h=d/2); > > translate([0,0,-11]) > > cylinder(d2=d,d1=0,h=d/2); > > } > > > > > > module big(){ > > hull(){ > > translate([75/2,45/2,0])corner(); > > translate([-75/2,45/2,0])corner(); > > translate([75/2,-45/2,0])corner(); > > translate([-75/2,-45/2,0])corner(); > > } > > } > > > > > > module final(){ > > intersection(){ > > big(); > > cube([100,100,3],center=true); > > } > > } > > > > final(); > > > > On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote: > >> Is it possible with BOSL2 or something else to create a cubed with a > different corner radius on the vertical edges versus the horizontal edges? > >> > >> For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm > corner radius (vertical) and a small radius or chamfer on the bottom and > top faces. > >> > >> I suppose I could do a Minkowski using a rounded 2d rectangle, but > would that be computationally expensive? > >> > >> > >> Thanks, > >> Mark > >> _______________________________________________ > >> 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 > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jon Bondy
Mon, Apr 20, 2026 12:32 AM

The code compiles, but I've never heard of "convex_offset_extrude" and
it's not in the Cheat Sheet.

Jon

On 4/19/2026 7:29 PM, Todd Allen via Discuss wrote:

module base(x,y,z,rv,rh)
{
     hull()
     for (ix=[-1,1], iy=[-1,1])
         translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
         cyl(r=rv,h=z,rounding=rh, anchor=BOT);

Yet another way to do this.

module mybase(x,y,z,rv,rh) {
    convex_offset_extrude(top=os_circle(rh), bottom=os_circle(rh),
height=z)
        rect([x,y], rounding=rv);
}

This also allows specifying a different radius or chamfer for each
corner of the rect() and more choices of treatments for the top and
bottom.  Also it is possible implement convex_offset_extrude() using
roof() instead of hull() and have offset_extrude() for non convex
stuff such as text.

On Sun, Apr 19, 2026 at 4:39 PM Mark Erbaugh via Discuss
discuss@lists.openscad.org wrote:

 Thanks for all the replies.

 I came up with the hull() approach shortly after my post.

module base(x,y,z,rv,rh)
{
     hull()
     for (ix=[-1,1], iy=[-1,1])
         translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
         cyl(r=rv,h=z,rounding=rh, anchor=BOT);
}

On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss

 <discuss@lists.openscad.org> wrote:

d= 20;

module corner(){
cylinder(d=d,h=2,center=true);
translate([0,0,1])
cylinder(d1=d,d2=0,h=d/2);
translate([0,0,-11])
cylinder(d2=d,d1=0,h=d/2);
}

module big(){
hull(){
translate([75/2,45/2,0])corner();
translate([-75/2,45/2,0])corner();
translate([75/2,-45/2,0])corner();
translate([-75/2,-45/2,0])corner();
}
}

module final(){
intersection(){
big();
cube([100,100,3],center=true);
}
}

final();

On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote:

Is it possible with BOSL2 or something else to create a cubed

 with a different corner radius on the vertical edges versus the
 horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a

 10mm corner radius (vertical) and a small radius or chamfer on the
 bottom and top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle,

 but would that be computationally expensive?

Thanks,
Mark


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

 _______________________________________________
 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.orga

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

The code compiles, but I've never heard of "convex_offset_extrude" and it's not in the Cheat Sheet. Jon On 4/19/2026 7:29 PM, Todd Allen via Discuss wrote: > > module base(x,y,z,rv,rh) > > { > >     hull() > >     for (ix=[-1,1], iy=[-1,1]) > >         translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) > >         cyl(r=rv,h=z,rounding=rh, anchor=BOT); > > Yet another way to do this. > > module mybase(x,y,z,rv,rh) { >     convex_offset_extrude(top=os_circle(rh), bottom=os_circle(rh), > height=z) >         rect([x,y], rounding=rv); > } > > This also allows specifying a different radius or chamfer for each > corner of the rect() and more choices of treatments for the top and > bottom.  Also it is possible implement convex_offset_extrude() using > roof() instead of hull() and have offset_extrude() for non convex > stuff such as text. > > On Sun, Apr 19, 2026 at 4:39 PM Mark Erbaugh via Discuss > <discuss@lists.openscad.org> wrote: > > Thanks for all the replies. > > I came up with the hull() approach shortly after my post. > > > module base(x,y,z,rv,rh) > > { > >     hull() > >     for (ix=[-1,1], iy=[-1,1]) > >         translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) > >         cyl(r=rv,h=z,rounding=rh, anchor=BOT); > > } > > > > On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss > <discuss@lists.openscad.org> wrote: > > > > d= 20; > > > > module corner(){ > > cylinder(d=d,h=2,center=true); > > translate([0,0,1]) > > cylinder(d1=d,d2=0,h=d/2); > > translate([0,0,-11]) > > cylinder(d2=d,d1=0,h=d/2); > > } > > > > > > module big(){ > > hull(){ > > translate([75/2,45/2,0])corner(); > > translate([-75/2,45/2,0])corner(); > > translate([75/2,-45/2,0])corner(); > > translate([-75/2,-45/2,0])corner(); > > } > > } > > > > > > module final(){ > > intersection(){ > > big(); > > cube([100,100,3],center=true); > > } > > } > > > > final(); > > > > On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote: > >> Is it possible with BOSL2 or something else to create a cubed > with a different corner radius on the vertical edges versus the > horizontal edges? > >> > >> For example, I want to create a cuboid [85,55,3] (x,y,z) with a > 10mm corner radius (vertical) and a small radius or chamfer on the > bottom and top faces. > >> > >> I suppose I could do a Minkowski using a rounded 2d rectangle, > but would that be computationally expensive? > >> > >> > >> Thanks, > >> Mark > >> _______________________________________________ > >> 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 > _______________________________________________ > 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.orga -- This email has been checked for viruses by AVG antivirus software. www.avg.com
TA
Todd Allen
Mon, Apr 20, 2026 1:10 AM

convex_offset_extrude() is a BOSL2 module.

On Sun, Apr 19, 2026, 7:32 PM Jon Bondy jon@jonbondy.com wrote:

The code compiles, but I've never heard of "convex_offset_extrude" and
it's not in the Cheat Sheet.

Jon
On 4/19/2026 7:29 PM, Todd Allen via Discuss wrote:

module base(x,y,z,rv,rh)
{
hull()
for (ix=[-1,1], iy=[-1,1])
translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
cyl(r=rv,h=z,rounding=rh, anchor=BOT);

Yet another way to do this.

module mybase(x,y,z,rv,rh) {
convex_offset_extrude(top=os_circle(rh), bottom=os_circle(rh),
height=z)
rect([x,y], rounding=rv);
}

This also allows specifying a different radius or chamfer for each corner
of the rect() and more choices of treatments for the top and bottom.  Also
it is possible implement convex_offset_extrude() using roof() instead of
hull() and have offset_extrude() for non convex stuff such as text.

On Sun, Apr 19, 2026 at 4:39 PM Mark Erbaugh via Discuss <
discuss@lists.openscad.org> wrote:

Thanks for all the replies.

I came up with the hull() approach shortly after my post.

module base(x,y,z,rv,rh)
{
hull()
for (ix=[-1,1], iy=[-1,1])
translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
cyl(r=rv,h=z,rounding=rh, anchor=BOT);
}

On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss <

d= 20;

module corner(){
cylinder(d=d,h=2,center=true);
translate([0,0,1])
cylinder(d1=d,d2=0,h=d/2);
translate([0,0,-11])
cylinder(d2=d,d1=0,h=d/2);
}

module big(){
hull(){
translate([75/2,45/2,0])corner();
translate([-75/2,45/2,0])corner();
translate([75/2,-45/2,0])corner();
translate([-75/2,-45/2,0])corner();
}
}

module final(){
intersection(){
big();
cube([100,100,3],center=true);
}
}

final();

On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote:

Is it possible with BOSL2 or something else to create a cubed with a

different corner radius on the vertical edges versus the horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm

corner radius (vertical) and a small radius or chamfer on the bottom and
top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle, but

would that be computationally expensive?

Thanks,
Mark


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


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

convex_offset_extrude() is a BOSL2 module. On Sun, Apr 19, 2026, 7:32 PM Jon Bondy <jon@jonbondy.com> wrote: > The code compiles, but I've never heard of "convex_offset_extrude" and > it's not in the Cheat Sheet. > > Jon > On 4/19/2026 7:29 PM, Todd Allen via Discuss wrote: > > > module base(x,y,z,rv,rh) > > { > > hull() > > for (ix=[-1,1], iy=[-1,1]) > > translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) > > cyl(r=rv,h=z,rounding=rh, anchor=BOT); > > Yet another way to do this. > > module mybase(x,y,z,rv,rh) { > convex_offset_extrude(top=os_circle(rh), bottom=os_circle(rh), > height=z) > rect([x,y], rounding=rv); > } > > This also allows specifying a different radius or chamfer for each corner > of the rect() and more choices of treatments for the top and bottom. Also > it is possible implement convex_offset_extrude() using roof() instead of > hull() and have offset_extrude() for non convex stuff such as text. > > On Sun, Apr 19, 2026 at 4:39 PM Mark Erbaugh via Discuss < > discuss@lists.openscad.org> wrote: > >> Thanks for all the replies. >> >> I came up with the hull() approach shortly after my post. >> >> > module base(x,y,z,rv,rh) >> > { >> > hull() >> > for (ix=[-1,1], iy=[-1,1]) >> > translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) >> > cyl(r=rv,h=z,rounding=rh, anchor=BOT); >> > } >> >> >> > On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss < >> discuss@lists.openscad.org> wrote: >> > >> > d= 20; >> > >> > module corner(){ >> > cylinder(d=d,h=2,center=true); >> > translate([0,0,1]) >> > cylinder(d1=d,d2=0,h=d/2); >> > translate([0,0,-11]) >> > cylinder(d2=d,d1=0,h=d/2); >> > } >> > >> > >> > module big(){ >> > hull(){ >> > translate([75/2,45/2,0])corner(); >> > translate([-75/2,45/2,0])corner(); >> > translate([75/2,-45/2,0])corner(); >> > translate([-75/2,-45/2,0])corner(); >> > } >> > } >> > >> > >> > module final(){ >> > intersection(){ >> > big(); >> > cube([100,100,3],center=true); >> > } >> > } >> > >> > final(); >> > >> > On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote: >> >> Is it possible with BOSL2 or something else to create a cubed with a >> different corner radius on the vertical edges versus the horizontal edges? >> >> >> >> For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm >> corner radius (vertical) and a small radius or chamfer on the bottom and >> top faces. >> >> >> >> I suppose I could do a Minkowski using a rounded 2d rectangle, but >> would that be computationally expensive? >> >> >> >> >> >> Thanks, >> >> Mark >> >> _______________________________________________ >> >> 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 >> _______________________________________________ >> 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.orga > > > > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free.www.avg.com > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_7775406021453536901_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >
JJ
jon jonbondy.com
Mon, Apr 20, 2026 1:55 AM

Interesting.

Your code, as shown, without an invocation of base(), survived an F5 without comment, implying to me that convex_offset_extrude() was "OK", known.  I guess that is not the case, since I did not use BOSL2.

Thanks

On 4/19/2026 9:10 PM, Todd Allen wrote:
convex_offset_extrude() is a BOSL2 module.

On Sun, Apr 19, 2026, 7:32 PM Jon Bondy <jon@jonbondy.commailto:jon@jonbondy.com> wrote:

The code compiles, but I've never heard of "convex_offset_extrude" and it's not in the Cheat Sheet.

Jon

On 4/19/2026 7:29 PM, Todd Allen via Discuss wrote:

module base(x,y,z,rv,rh)
{
hull()
for (ix=[-1,1], iy=[-1,1])
translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
cyl(r=rv,h=z,rounding=rh, anchor=BOT);

Yet another way to do this.

module mybase(x,y,z,rv,rh) {
convex_offset_extrude(top=os_circle(rh), bottom=os_circle(rh), height=z)
rect([x,y], rounding=rv);
}

This also allows specifying a different radius or chamfer for each corner of the rect() and more choices of treatments for the top and bottom.  Also it is possible implement convex_offset_extrude() using roof() instead of hull() and have offset_extrude() for non convex stuff such as text.

On Sun, Apr 19, 2026 at 4:39 PM Mark Erbaugh via Discuss <discuss@lists.openscad.orgmailto:discuss@lists.openscad.org> wrote:
Thanks for all the replies.

I came up with the hull() approach shortly after my post.

module base(x,y,z,rv,rh)
{
hull()
for (ix=[-1,1], iy=[-1,1])
translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)])
cyl(r=rv,h=z,rounding=rh, anchor=BOT);
}

On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss <discuss@lists.openscad.orgmailto:discuss@lists.openscad.org> wrote:

d= 20;

module corner(){
cylinder(d=d,h=2,center=true);
translate([0,0,1])
cylinder(d1=d,d2=0,h=d/2);
translate([0,0,-11])
cylinder(d2=d,d1=0,h=d/2);
}

module big(){
hull(){
translate([75/2,45/2,0])corner();
translate([-75/2,45/2,0])corner();
translate([75/2,-45/2,0])corner();
translate([-75/2,-45/2,0])corner();
}
}

module final(){
intersection(){
big();
cube([100,100,3],center=true);
}
}

final();

On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote:

Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges?

For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm corner radius (vertical) and a small radius or chamfer on the bottom and top faces.

I suppose I could do a Minkowski using a rounded 2d rectangle, but would that be computationally expensive?

Thanks,
Mark


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


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


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


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

[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-green-avg-v1.png]https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=L4yZv7uj9a_UBI7YSkXY6xRPNcxvIEdVttNpIhkpzhTkPS66UnGMpydU3XdKxSLN&s=SSpMCh5S_Dkt_52AdbYI2yYMf6Ibl8tCst6Qgh756N8&e=      Virus-free.www.avg.comhttps://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=L4yZv7uj9a_UBI7YSkXY6xRPNcxvIEdVttNpIhkpzhTkPS66UnGMpydU3XdKxSLN&s=SSpMCh5S_Dkt_52AdbYI2yYMf6Ibl8tCst6Qgh756N8&e=

Interesting. Your code, as shown, without an invocation of base(), survived an F5 without comment, implying to me that convex_offset_extrude() was "OK", known. I guess that is not the case, since I did not use BOSL2. Thanks On 4/19/2026 9:10 PM, Todd Allen wrote: convex_offset_extrude() is a BOSL2 module. On Sun, Apr 19, 2026, 7:32 PM Jon Bondy <jon@jonbondy.com<mailto:jon@jonbondy.com>> wrote: The code compiles, but I've never heard of "convex_offset_extrude" and it's not in the Cheat Sheet. Jon On 4/19/2026 7:29 PM, Todd Allen via Discuss wrote: > module base(x,y,z,rv,rh) > { > hull() > for (ix=[-1,1], iy=[-1,1]) > translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) > cyl(r=rv,h=z,rounding=rh, anchor=BOT); Yet another way to do this. module mybase(x,y,z,rv,rh) { convex_offset_extrude(top=os_circle(rh), bottom=os_circle(rh), height=z) rect([x,y], rounding=rv); } This also allows specifying a different radius or chamfer for each corner of the rect() and more choices of treatments for the top and bottom. Also it is possible implement convex_offset_extrude() using roof() instead of hull() and have offset_extrude() for non convex stuff such as text. On Sun, Apr 19, 2026 at 4:39 PM Mark Erbaugh via Discuss <discuss@lists.openscad.org<mailto:discuss@lists.openscad.org>> wrote: Thanks for all the replies. I came up with the hull() approach shortly after my post. > module base(x,y,z,rv,rh) > { > hull() > for (ix=[-1,1], iy=[-1,1]) > translate(0.5 * [ix * (x - 2 * rv), iy * (y - 2 * rv)]) > cyl(r=rv,h=z,rounding=rh, anchor=BOT); > } > On Apr 19, 2026, at 3:11 PM, Raymond West via Discuss <discuss@lists.openscad.org<mailto:discuss@lists.openscad.org>> wrote: > > d= 20; > > module corner(){ > cylinder(d=d,h=2,center=true); > translate([0,0,1]) > cylinder(d1=d,d2=0,h=d/2); > translate([0,0,-11]) > cylinder(d2=d,d1=0,h=d/2); > } > > > module big(){ > hull(){ > translate([75/2,45/2,0])corner(); > translate([-75/2,45/2,0])corner(); > translate([75/2,-45/2,0])corner(); > translate([-75/2,-45/2,0])corner(); > } > } > > > module final(){ > intersection(){ > big(); > cube([100,100,3],center=true); > } > } > > final(); > > On 19/04/2026 18:41, Mark Erbaugh via Discuss wrote: >> Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges? >> >> For example, I want to create a cuboid [85,55,3] (x,y,z) with a 10mm corner radius (vertical) and a small radius or chamfer on the bottom and top faces. >> >> I suppose I could do a Minkowski using a rounded 2d rectangle, but would that be computationally expensive? >> >> >> Thanks, >> Mark >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org<mailto:discuss-leave@lists.openscad.org> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org<mailto:discuss-leave@lists.openscad.org> _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org<mailto:discuss-leave@lists.openscad.org> _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.orga<mailto:discuss-leave@lists.openscad.orga> [https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-green-avg-v1.png]<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=L4yZv7uj9a_UBI7YSkXY6xRPNcxvIEdVttNpIhkpzhTkPS66UnGMpydU3XdKxSLN&s=SSpMCh5S_Dkt_52AdbYI2yYMf6Ibl8tCst6Qgh756N8&e=> Virus-free.www.avg.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=L4yZv7uj9a_UBI7YSkXY6xRPNcxvIEdVttNpIhkpzhTkPS66UnGMpydU3XdKxSLN&s=SSpMCh5S_Dkt_52AdbYI2yYMf6Ibl8tCst6Qgh756N8&e=>
JB
Jordan Brown
Mon, Apr 20, 2026 5:45 PM

On 4/19/2026 10:41 AM, Mark Erbaugh via Discuss wrote:

Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges?

I expect that BOSL2 has something better and easier, but in bare
OpenSCAD I found that what I needed was to do a hull of eight toruses. 
The major radius controls the rounding in one axis; the minor radius
controls the rounding in the other two.

Right now it is hurting my brain trying to figure out what it means if
the minor radius is larger than the major radius. Visualizing, I don't
see a problem with it, but I'm pretty sure the geometry falls apart and
that suggests that there is a problem.

On 4/19/2026 10:41 AM, Mark Erbaugh via Discuss wrote: > Is it possible with BOSL2 or something else to create a cubed with a different corner radius on the vertical edges versus the horizontal edges? I expect that BOSL2 has something better and easier, but in bare OpenSCAD I found that what I needed was to do a hull of eight toruses.  The major radius controls the rounding in one axis; the minor radius controls the rounding in the other two. Right now it is hurting my brain trying to figure out what it means if the minor radius is larger than the major radius. Visualizing, I don't see a problem with it, but I'm pretty sure the geometry falls apart and that suggests that there is a problem.