discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

taper or round an edge?

K
Ken
Thu, May 9, 2024 8:16 AM

Below is my code for a simple box I need to make 20 off for putting
parts in in my workshop, but for the life of me I can't figure out how
to chamfer or radius the inside top edge. It only needs maybe a 1mm
chamfer/radius- but I have no idea how!

Any suggestions gratefully received.

include <BOSL2/std.scad>
$fa = 2;
$fs = 0.5;

module outer_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
 cuboid ([79,198,59.5], rounding=3);
}

module inner_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
 cuboid ([74,192,65], rounding=3);
}

difference()
{
outer_body_cube();
translate([0,0,6])
inner_body_cube();
translate([0,98.5,0])
cube ([16.2,3,16.2], center = true);
}

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!

Below is my code for a simple box I need to make 20 off for putting parts in in my workshop, but for the life of me I can't figure out how to chamfer or radius the inside top edge. It only needs maybe a 1mm chamfer/radius- but I have no idea how! Any suggestions gratefully received. include <BOSL2/std.scad> $fa = 2; $fs = 0.5; module outer_body_cube() { // color ("red") rotate([0,0,0]) translate([0,0,0])  cuboid ([79,198,59.5], rounding=3); } module inner_body_cube() { // color ("red") rotate([0,0,0]) translate([0,0,0])  cuboid ([74,192,65], rounding=3); } difference() { outer_body_cube(); translate([0,0,6]) inner_body_cube(); translate([0,98.5,0]) cube ([16.2,3,16.2], center = true); } -- Cheers, Ken bats059@gmail.com https://vk7krj.com https://vk7krj.com/running.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Your job as parents is to teach them to control all three. My job as a grandad is to tell you how you are doing it all wrong!
RW
Raymond West
Thu, May 9, 2024 10:44 AM

Hi Ken,  (You don't need a pattern for  a loco brass  name plate, or do
you?)

I can't help much, since I do not use bosl2, but for boxes I make them
parametric in case I need to use it again, but different size. For
rounding, I use Minkowski, with a sphere of the desired radius. The wall
thickness has to be reduced accordingly. If different radii are required
in different regions, the box has to be split apart. If it's just 
straight edges to be rounded,then I sort of extrude a cruciform, and
rotate/translate and difference that (arcs, similar).

So, given, say, the external dimensions, and wall thickness and fillet
radius (and you really need a large inside edges/corner fillet, too), I
would base everything on those parameters.

Best wishes,

Ray

On 09/05/2024 09:16, Ken via Discuss wrote:

Below is my code for a simple box I need to make 20 off for putting
parts in in my workshop, but for the life of me I can't figure out how
to chamfer or radius the inside top edge. It only needs maybe a 1mm
chamfer/radius- but I have no idea how!

Any suggestions gratefully received.

include <BOSL2/std.scad>
$fa = 2;
$fs = 0.5;

module outer_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
 cuboid ([79,198,59.5], rounding=3);
}

module inner_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
 cuboid ([74,192,65], rounding=3);
}

difference()
{
outer_body_cube();
translate([0,0,6])
inner_body_cube();
translate([0,98.5,0])
cube ([16.2,3,16.2], center = true);
}

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!


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

Hi Ken,  (You don't need a pattern for  a loco brass  name plate, or do you?) I can't help much, since I do not use bosl2, but for boxes I make them parametric in case I need to use it again, but different size. For rounding, I use Minkowski, with a sphere of the desired radius. The wall thickness has to be reduced accordingly. If different radii are required in different regions, the box has to be split apart. If it's just  straight edges to be rounded,then I sort of extrude a cruciform, and rotate/translate and difference that (arcs, similar). So, given, say, the external dimensions, and wall thickness and fillet radius (and you really need a large inside edges/corner fillet, too), I would base everything on those parameters. Best wishes, Ray On 09/05/2024 09:16, Ken via Discuss wrote: > > Below is my code for a simple box I need to make 20 off for putting > parts in in my workshop, but for the life of me I can't figure out how > to chamfer or radius the inside top edge. It only needs maybe a 1mm > chamfer/radius- but I have no idea how! > > Any suggestions gratefully received. > > > include <BOSL2/std.scad> > $fa = 2; > $fs = 0.5; > > module outer_body_cube() > { > // color ("red") > rotate([0,0,0]) > translate([0,0,0]) >  cuboid ([79,198,59.5], rounding=3); > } > > module inner_body_cube() > { > // color ("red") > rotate([0,0,0]) > translate([0,0,0]) >  cuboid ([74,192,65], rounding=3); > } > > > > difference() > { > outer_body_cube(); > translate([0,0,6]) > inner_body_cube(); > translate([0,98.5,0]) > cube ([16.2,3,16.2], center = true); > } > > -- > Cheers, Ken > bats059@gmail.com > https://vk7krj.com > https://vk7krj.com/running.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Your job as parents is to teach them to control all three. > My job as a grandad is to tell you how you are doing it all wrong! > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
GH
gene heskett
Thu, May 9, 2024 10:49 AM

On 5/9/24 04:16, Ken via Discuss wrote:

Below is my code for a simple box I need to make 20 off for putting
parts in in my workshop, but for the life of me I can't figure out how
to chamfer or radius the inside top edge. It only needs maybe a 1mm
chamfer/radius- but I have no idea how!

See minkowski in the help screen.
.

Any suggestions gratefully received.

include <BOSL2/std.scad>
$fa = 2;
$fs = 0.5;

module outer_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
 cuboid ([79,198,59.5], rounding=3);
}

module inner_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
 cuboid ([74,192,65], rounding=3);
}

difference()
{
outer_body_cube();
translate([0,0,6])
inner_body_cube();
translate([0,98.5,0])
cube ([16.2,3,16.2], center = true);
}

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!


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

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

  • Louis D. Brandeis
On 5/9/24 04:16, Ken via Discuss wrote: > Below is my code for a simple box I need to make 20 off for putting > parts in in my workshop, but for the life of me I can't figure out how > to chamfer or radius the inside top edge. It only needs maybe a 1mm > chamfer/radius- but I have no idea how! > See minkowski in the help screen. . > Any suggestions gratefully received. > > > include <BOSL2/std.scad> > $fa = 2; > $fs = 0.5; > > module outer_body_cube() > { > // color ("red") > rotate([0,0,0]) > translate([0,0,0]) >  cuboid ([79,198,59.5], rounding=3); > } > > module inner_body_cube() > { > // color ("red") > rotate([0,0,0]) > translate([0,0,0]) >  cuboid ([74,192,65], rounding=3); > } > > > > difference() > { > outer_body_cube(); > translate([0,0,6]) > inner_body_cube(); > translate([0,98.5,0]) > cube ([16.2,3,16.2], center = true); > } > > -- > Cheers, Ken > bats059@gmail.com > https://vk7krj.com > https://vk7krj.com/running.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Your job as parents is to teach them to control all three. > My job as a grandad is to tell you how you are doing it all wrong! > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis
MM
Michael Möller
Thu, May 9, 2024 11:06 AM

I added a ring of cylinders on the top, after suppressing the cuboid
rounding there. OK, the parameters are inelegant/fudged, but making it
nicer/parameterized is left as an exercise for the reader

include <BOSL2/std.scad>
$fa = 2;
$fs = 0.5;

module outer_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
cuboid ([79,198,59.5], rounding=3,except=TOP );
translate([0,198/2-2.5/2,59.2/2]) rotate([90,0,90])
cyl(l=79,d=2.5,rounding=2.5/2) ;
translate([0,-(198/2-2.5/2),59.2/2]) rotate([90,0,90])
cyl(l=79,d=2.5,rounding=2.5/2) ;
translate([79/2-2.5/2,0,59.2/2]) rotate([0,90,90])
cyl(l=198,d=2.5,rounding=2.5/2) ;
translate([-(79/2-2.5/2),0,59.2/2]) rotate([0,90,90])
cyl(l=198,d=2.5,rounding=2.5/2) ;
}

module inner_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
cuboid ([74,192,57], rounding=3,except=TOP);
}

difference()
{
outer_body_cube();
translate([0,0,2])
inner_body_cube();
translate([0,98.5,0])
cube ([16.2,3,16.2], center = true);
}

On Thu, 9 May 2024 at 10:16, Ken via Discuss discuss@lists.openscad.org
wrote:

Below is my code for a simple box I need to make 20 off for putting parts
in in my workshop, but for the life of me I can't figure out how to chamfer
or radius the inside top edge. It only needs maybe a 1mm chamfer/radius-
but I have no idea how!

Any suggestions gratefully received.

include <BOSL2/std.scad>
$fa = 2;
$fs = 0.5;

module outer_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
cuboid ([79,198,59.5], rounding=3);
}

module inner_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
cuboid ([74,192,65], rounding=3);
}

difference()
{
outer_body_cube();
translate([0,0,6])
inner_body_cube();
translate([0,98.5,0])
cube ([16.2,3,16.2], center = true);
}

--
Cheers, Kenbats059@gmail.comhttps://vk7krj.comhttps://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!


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

I added a ring of cylinders on the top, after suppressing the cuboid rounding there. OK, the parameters are inelegant/fudged, but making it nicer/parameterized is left as an exercise for the reader include <BOSL2/std.scad> $fa = 2; $fs = 0.5; module outer_body_cube() { // color ("red") rotate([0,0,0]) translate([0,0,0]) cuboid ([79,198,59.5], rounding=3,except=TOP ); translate([0,198/2-2.5/2,59.2/2]) rotate([90,0,90]) cyl(l=79,d=2.5,rounding=2.5/2) ; translate([0,-(198/2-2.5/2),59.2/2]) rotate([90,0,90]) cyl(l=79,d=2.5,rounding=2.5/2) ; translate([79/2-2.5/2,0,59.2/2]) rotate([0,90,90]) cyl(l=198,d=2.5,rounding=2.5/2) ; translate([-(79/2-2.5/2),0,59.2/2]) rotate([0,90,90]) cyl(l=198,d=2.5,rounding=2.5/2) ; } module inner_body_cube() { // color ("red") rotate([0,0,0]) translate([0,0,0]) cuboid ([74,192,57], rounding=3,except=TOP); } difference() { outer_body_cube(); translate([0,0,2]) inner_body_cube(); translate([0,98.5,0]) cube ([16.2,3,16.2], center = true); } On Thu, 9 May 2024 at 10:16, Ken via Discuss <discuss@lists.openscad.org> wrote: > Below is my code for a simple box I need to make 20 off for putting parts > in in my workshop, but for the life of me I can't figure out how to chamfer > or radius the inside top edge. It only needs maybe a 1mm chamfer/radius- > but I have no idea how! > > Any suggestions gratefully received. > > > include <BOSL2/std.scad> > $fa = 2; > $fs = 0.5; > > module outer_body_cube() > { > // color ("red") > rotate([0,0,0]) > translate([0,0,0]) > cuboid ([79,198,59.5], rounding=3); > } > > module inner_body_cube() > { > // color ("red") > rotate([0,0,0]) > translate([0,0,0]) > cuboid ([74,192,65], rounding=3); > } > > > > difference() > { > outer_body_cube(); > translate([0,0,6]) > inner_body_cube(); > translate([0,98.5,0]) > cube ([16.2,3,16.2], center = true); > } > > -- > Cheers, Kenbats059@gmail.comhttps://vk7krj.comhttps://vk7krj.com/running.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Your job as parents is to teach them to control all three. > My job as a grandad is to tell you how you are doing it all wrong! > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Thu, May 9, 2024 9:22 PM

The simplest way to fix your model in the BOSL2 context would be to replace
the inner_body with a rounded_prism call.  Something like this:

module inner_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,.03])
rounded_prism (rect([74,192]),height=59.5-12, joint_sides=2.5,
joint_bot=2.5, joint_top=-1.25,k=.9,anchor=CENTER);
}

You'll need to include rounding.scad. Note that you've got radius 3
roundings on a 2.5 thick edge where 1.25 is the max rounding that you can
apply from both sides before you make a corner, so you need to decrease
outer body's rounding to 1.25.  (The 12mm base is also a bit weird.)  Note
that rounded_prism does not round by radius (or even with circular arcs).

You might prefer to use rounded_prism for the outside as well because you
can easily set the top, sides and bottom roundings to different amounts.

Another option I use often is offset_sweep which can make teardrop bottoms
which print better than rounded bottoms.  By combining with rounded rect()
you can also get different roundings at the bottom, sides and top.  There
are examples in the wiki of making boxes with offset_sweep.

On Thu, May 9, 2024 at 4:16 AM Ken via Discuss discuss@lists.openscad.org
wrote:

Below is my code for a simple box I need to make 20 off for putting parts
in in my workshop, but for the life of me I can't figure out how to chamfer
or radius the inside top edge. It only needs maybe a 1mm chamfer/radius-
but I have no idea how!

Any suggestions gratefully received.

include <BOSL2/std.scad>
$fa = 2;
$fs = 0.5;

module outer_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
cuboid ([79,198,59.5], rounding=3);
}

module inner_body_cube()
{
// color ("red")
rotate([0,0,0])
translate([0,0,0])
cuboid ([74,192,65], rounding=3);
}

difference()
{
outer_body_cube();
translate([0,0,6])
inner_body_cube();
translate([0,98.5,0])
cube ([16.2,3,16.2], center = true);
}

--
Cheers, Kenbats059@gmail.comhttps://vk7krj.comhttps://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!


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

The simplest way to fix your model in the BOSL2 context would be to replace the inner_body with a rounded_prism call. Something like this: module inner_body_cube() { // color ("red") rotate([0,0,0]) translate([0,0,.03]) rounded_prism (rect([74,192]),height=59.5-12, joint_sides=2.5, joint_bot=2.5, joint_top=-1.25,k=.9,anchor=CENTER); } You'll need to include rounding.scad. Note that you've got radius 3 roundings on a 2.5 thick edge where 1.25 is the max rounding that you can apply from both sides before you make a corner, so you need to decrease outer body's rounding to 1.25. (The 12mm base is also a bit weird.) Note that rounded_prism does not round by radius (or even with circular arcs). You might prefer to use rounded_prism for the outside as well because you can easily set the top, sides and bottom roundings to different amounts. Another option I use often is offset_sweep which can make teardrop bottoms which print better than rounded bottoms. By combining with rounded rect() you can also get different roundings at the bottom, sides and top. There are examples in the wiki of making boxes with offset_sweep. On Thu, May 9, 2024 at 4:16 AM Ken via Discuss <discuss@lists.openscad.org> wrote: > Below is my code for a simple box I need to make 20 off for putting parts > in in my workshop, but for the life of me I can't figure out how to chamfer > or radius the inside top edge. It only needs maybe a 1mm chamfer/radius- > but I have no idea how! > > Any suggestions gratefully received. > > > include <BOSL2/std.scad> > $fa = 2; > $fs = 0.5; > > module outer_body_cube() > { > // color ("red") > rotate([0,0,0]) > translate([0,0,0]) > cuboid ([79,198,59.5], rounding=3); > } > > module inner_body_cube() > { > // color ("red") > rotate([0,0,0]) > translate([0,0,0]) > cuboid ([74,192,65], rounding=3); > } > > > > difference() > { > outer_body_cube(); > translate([0,0,6]) > inner_body_cube(); > translate([0,98.5,0]) > cube ([16.2,3,16.2], center = true); > } > > -- > Cheers, Kenbats059@gmail.comhttps://vk7krj.comhttps://vk7krj.com/running.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Your job as parents is to teach them to control all three. > My job as a grandad is to tell you how you are doing it all wrong! > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
K
Ken
Fri, May 10, 2024 12:22 AM

Thanks for all the suggestions gentlemen.

 I spent quite some time on minkowski (thanks Gene), and Michael's ring
of cylinders (thanks Michael) but couldn't get either of them to be
quite what I wanted.

I then had a play with Adrian's rounded_prism suggestion, and after a
considerable (for me) learning curve andalsousing his suggestion of
replacing the outer cube with rounded_prism as well, I finally have
exactly what I wanted. The top of my box now has a smoothly rounded
curve of exactly the right radius.

And Adrian, your comment "The 12mm base is also a bit weird" prompted me
to difference with a large cube to see a cross section of the box- it
now has a 3mm cross section all over- thanks!

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!

Thanks for all the suggestions gentlemen.  I spent quite some time on minkowski (thanks Gene), and Michael's ring of cylinders (thanks Michael) but couldn't get either of them to be quite what I wanted. I then had a play with Adrian's rounded_prism suggestion, and after a considerable (for me) learning curve andalsousing his suggestion of replacing the outer cube with rounded_prism as well, I finally have exactly what I wanted. The top of my box now has a smoothly rounded curve of exactly the right radius. And Adrian, your comment "The 12mm base is also a bit weird" prompted me to difference with a large cube to see a cross section of the box- it now has a 3mm cross section all over- thanks! -- Cheers, Ken bats059@gmail.com https://vk7krj.com https://vk7krj.com/running.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Your job as parents is to teach them to control all three. My job as a grandad is to tell you how you are doing it all wrong!