SL
Steve Lelievre
Tue, Nov 18, 2025 9:52 PM
I have a shape that looks somewhat like a section sliced off the end of
a tube. My project involves getting it CNC cut from brass. A concern is
that the upper part of the shape will have sharp edges. For safety, I
would like to bevel the inner and outer rims (it will be part of a
public sculpture so often touched by people).
I don't want to cut into the shape but I add extra material above and
cut a bevel in the extra height. Unfortunately, I can't figure out how
to do that - roof is for 2D and I can't think of a Minkowski 'tool' that
would do the job. Not yet anyway.
The few lines of code given below produce an approximation of the shape
involved. Although it demonstrates the general shape, the actual shape
is a single polyhedron generated externally using Javascript and does
not involve any primitive shapes.
I realise that because I have the coordinates of all the points that
define the top face of the polyhedron, I could add to my Javascript code
to generate extra faces inclined at 45 degrees to the top of the inner
and outer walls. I'm making this post in case someone can suggest of a
convenient shortcut within OpenSCAD.
Cheers,
Steve
$fn = 120;
intersection() {
rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
translate([0,0,-7])scale([1.5,1,1])difference() {
cylinder(r=30, h =20, center=true);
cylinder(r=28, h =30,center=true);
}
}
I have a shape that looks somewhat like a section sliced off the end of
a tube. My project involves getting it CNC cut from brass. A concern is
that the upper part of the shape will have sharp edges. For safety, I
would like to bevel the inner and outer rims (it will be part of a
public sculpture so often touched by people).
I don't want to cut into the shape but I add extra material above and
cut a bevel in the extra height. Unfortunately, I can't figure out how
to do that - roof is for 2D and I can't think of a Minkowski 'tool' that
would do the job. Not yet anyway.
The few lines of code given below produce an approximation of the shape
involved. Although it demonstrates the general shape, the actual shape
is a single polyhedron generated externally using Javascript and does
not involve any primitive shapes.
I realise that because I have the coordinates of all the points that
define the top face of the polyhedron, I could add to my Javascript code
to generate extra faces inclined at 45 degrees to the top of the inner
and outer walls. I'm making this post in case someone can suggest of a
convenient shortcut within OpenSCAD.
Cheers,
Steve
$fn = 120;
intersection() {
rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
translate([0,0,-7])scale([1.5,1,1])difference() {
cylinder(r=30, h =20, center=true);
cylinder(r=28, h =30,center=true);
}
}
JH
Joe H
Tue, Nov 18, 2025 10:42 PM
So, simple solution here…
difference(){
union(){
cylinder(r=od, h=height-cham, $fn=cylgranularity);
translate([0,0,height]) cylinder(r1=od, r2=od-chamr, h=cham,
$fn=cylgranularity);
}
cylinder(r=id, h=3*height, $fn=cylgranularity, center=true);
translate([0,0,height+cham])
cylinder(r2=od, r1=od-chamr, h=cham, $fn=cylgranularity);
}
The named constants (aka variables) are left to the reader. I may have r2
and r1 transposed (I always have to cut and try before I get those right).
The idea is to create a tube with an outer chamfer then use an stunted cone
to diff out the inner cham.
Sorry, mashing this on my cell, so I haven’t been able to test the above,
so there are likely syntax errors.
Cheers,
Joe
On Tue, Nov 18, 2025 at 15:53 Steve Lelievre via Discuss <
discuss@lists.openscad.org> wrote:
I have a shape that looks somewhat like a section sliced off the end of a
tube. My project involves getting it CNC cut from brass. A concern is that
the upper part of the shape will have sharp edges. For safety, I would like
to bevel the inner and outer rims (it will be part of a public sculpture so
often touched by people).
I don't want to cut into the shape but I add extra material above and cut
a bevel in the extra height. Unfortunately, I can't figure out how to do
that - roof is for 2D and I can't think of a Minkowski 'tool' that would do
the job. Not yet anyway.
The few lines of code given below produce an approximation of the shape
involved. Although it demonstrates the general shape, the actual shape is a
single polyhedron generated externally using Javascript and does not
involve any primitive shapes.
I realise that because I have the coordinates of all the points that
define the top face of the polyhedron, I could add to my Javascript code to
generate extra faces inclined at 45 degrees to the top of the inner and
outer walls. I'm making this post in case someone can suggest of a
convenient shortcut within OpenSCAD.
Cheers,
Steve
$fn = 120;
intersection() {
rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
translate([0,0,-7])scale([1.5,1,1])difference() {
cylinder(r=30, h =20, center=true);
cylinder(r=28, h =30,center=true);
}
}
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
So, simple solution here…
difference(){
union(){
cylinder(r=od, h=height-cham, $fn=cylgranularity);
translate([0,0,height]) cylinder(r1=od, r2=od-chamr, h=cham,
$fn=cylgranularity);
}
cylinder(r=id, h=3*height, $fn=cylgranularity, center=true);
translate([0,0,height+cham])
cylinder(r2=od, r1=od-chamr, h=cham, $fn=cylgranularity);
}
The named constants (aka variables) are left to the reader. I may have r2
and r1 transposed (I always have to cut and try before I get those right).
The idea is to create a tube with an outer chamfer then use an stunted cone
to diff out the inner cham.
Sorry, mashing this on my cell, so I haven’t been able to test the above,
so there are likely syntax errors.
Cheers,
Joe
On Tue, Nov 18, 2025 at 15:53 Steve Lelievre via Discuss <
discuss@lists.openscad.org> wrote:
> I have a shape that looks somewhat like a section sliced off the end of a
> tube. My project involves getting it CNC cut from brass. A concern is that
> the upper part of the shape will have sharp edges. For safety, I would like
> to bevel the inner and outer rims (it will be part of a public sculpture so
> often touched by people).
>
> I don't want to cut into the shape but I add extra material above and cut
> a bevel in the extra height. Unfortunately, I can't figure out how to do
> that - roof is for 2D and I can't think of a Minkowski 'tool' that would do
> the job. Not yet anyway.
>
> The few lines of code given below produce an approximation of the shape
> involved. Although it demonstrates the general shape, the actual shape is a
> single polyhedron generated externally using Javascript and does not
> involve any primitive shapes.
>
> I realise that because I have the coordinates of all the points that
> define the top face of the polyhedron, I could add to my Javascript code to
> generate extra faces inclined at 45 degrees to the top of the inner and
> outer walls. I'm making this post in case someone can suggest of a
> convenient shortcut within OpenSCAD.
>
> Cheers,
>
> Steve
>
> $fn = 120;
> intersection() {
> rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
> translate([0,0,-7])scale([1.5,1,1])difference() {
> cylinder(r=30, h =20, center=true);
> cylinder(r=28, h =30,center=true);
> }
> }
>
>
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
LH
Lenore Horner
Wed, Nov 19, 2025 2:43 AM
Does the following do something like what you want?
$fa=5; $fs=0.05;
wall=1;
height=10;
io=10;
ang=25;
difference(){
hull(){
rotate_extrude(angle=180,convexity=10) // flip circle on edge, trace through semicircular arc
translate([10,0])circle(d=wall); // move circle to radius of cylinder
rotate([ang,0,0]) // tilt
scale([1,1.105,1]) // slanted slice of cylinder is ellipse; ellipses are rescaled circles; 1.105 is eyeballed
rotate_extrude(angle=180,convexity=10)translate([10,0])circle(d=wall); // same cylinder bent in semicircle
}
translate([0,0,-1])cylinder(r=io-wall/2,h=height+2); // hollow out inside that got filled by hull
Lenore
On Nov 18, 2025, at 16:52, Steve Lelievre via Discuss discuss@lists.openscad.org wrote:
I have a shape that looks somewhat like a section sliced off the end of a tube. My project involves getting it CNC cut from brass. A concern is that the upper part of the shape will have sharp edges. For safety, I would like to bevel the inner and outer rims (it will be part of a public sculpture so often touched by people).
I don't want to cut into the shape but I add extra material above and cut a bevel in the extra height. Unfortunately, I can't figure out how to do that - roof is for 2D and I can't think of a Minkowski 'tool' that would do the job. Not yet anyway.
The few lines of code given below produce an approximation of the shape involved. Although it demonstrates the general shape, the actual shape is a single polyhedron generated externally using Javascript and does not involve any primitive shapes.
I realise that because I have the coordinates of all the points that define the top face of the polyhedron, I could add to my Javascript code to generate extra faces inclined at 45 degrees to the top of the inner and outer walls. I'm making this post in case someone can suggest of a convenient shortcut within OpenSCAD.
Cheers,
Steve
<xt1p69rHMp0D5eHZ.png>
$fn = 120;
intersection() {
rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
translate([0,0,-7])scale([1.5,1,1])difference() {
cylinder(r=30, h =20, center=true);
cylinder(r=28, h =30,center=true);
}
}
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Does the following do something like what you want?
$fa=5; $fs=0.05;
wall=1;
height=10;
io=10;
ang=25;
difference(){
hull(){
rotate_extrude(angle=180,convexity=10) // flip circle on edge, trace through semicircular arc
translate([10,0])circle(d=wall); // move circle to radius of cylinder
rotate([ang,0,0]) // tilt
scale([1,1.105,1]) // slanted slice of cylinder is ellipse; ellipses are rescaled circles; 1.105 is eyeballed
rotate_extrude(angle=180,convexity=10)translate([10,0])circle(d=wall); // same cylinder bent in semicircle
}
translate([0,0,-1])cylinder(r=io-wall/2,h=height+2); // hollow out inside that got filled by hull
Lenore
> On Nov 18, 2025, at 16:52, Steve Lelievre via Discuss <discuss@lists.openscad.org> wrote:
>
> I have a shape that looks somewhat like a section sliced off the end of a tube. My project involves getting it CNC cut from brass. A concern is that the upper part of the shape will have sharp edges. For safety, I would like to bevel the inner and outer rims (it will be part of a public sculpture so often touched by people).
>
> I don't want to cut into the shape but I add extra material above and cut a bevel in the extra height. Unfortunately, I can't figure out how to do that - roof is for 2D and I can't think of a Minkowski 'tool' that would do the job. Not yet anyway.
>
> The few lines of code given below produce an approximation of the shape involved. Although it demonstrates the general shape, the actual shape is a single polyhedron generated externally using Javascript and does not involve any primitive shapes.
>
> I realise that because I have the coordinates of all the points that define the top face of the polyhedron, I could add to my Javascript code to generate extra faces inclined at 45 degrees to the top of the inner and outer walls. I'm making this post in case someone can suggest of a convenient shortcut within OpenSCAD.
>
> Cheers,
>
> Steve
>
> <xt1p69rHMp0D5eHZ.png>
>
> $fn = 120;
> intersection() {
> rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
> translate([0,0,-7])scale([1.5,1,1])difference() {
> cylinder(r=30, h =20, center=true);
> cylinder(r=28, h =30,center=true);
> }
> }
>
>
>
>
>
>
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
DP
Dan Perry
Wed, Nov 19, 2025 9:35 AM
You can use 'roof() projection(cut=true)' if you rotate the 3d shape so
that the top surface is parallel to the x-y plane. Another technique could
be path_sweep() in BOSL2 library if your javascript can output just the top
edge. In that case your top edge need not be planar.
Dan
On Tue, Nov 18, 2025 at 9:53 PM Steve Lelievre via Discuss <
discuss@lists.openscad.org> wrote:
I have a shape that looks somewhat like a section sliced off the end of a
tube. My project involves getting it CNC cut from brass. A concern is that
the upper part of the shape will have sharp edges. For safety, I would like
to bevel the inner and outer rims (it will be part of a public sculpture so
often touched by people).
I don't want to cut into the shape but I add extra material above and cut
a bevel in the extra height. Unfortunately, I can't figure out how to do
that - roof is for 2D and I can't think of a Minkowski 'tool' that would do
the job. Not yet anyway.
The few lines of code given below produce an approximation of the shape
involved. Although it demonstrates the general shape, the actual shape is a
single polyhedron generated externally using Javascript and does not
involve any primitive shapes.
I realise that because I have the coordinates of all the points that
define the top face of the polyhedron, I could add to my Javascript code to
generate extra faces inclined at 45 degrees to the top of the inner and
outer walls. I'm making this post in case someone can suggest of a
convenient shortcut within OpenSCAD.
Cheers,
Steve
$fn = 120;
intersection() {
rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
translate([0,0,-7])scale([1.5,1,1])difference() {
cylinder(r=30, h =20, center=true);
cylinder(r=28, h =30,center=true);
}
}
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
You can use 'roof() projection(cut=true)' if you rotate the 3d shape so
that the top surface is parallel to the x-y plane. Another technique could
be path_sweep() in BOSL2 library if your javascript can output just the top
edge. In that case your top edge need not be planar.
Dan
On Tue, Nov 18, 2025 at 9:53 PM Steve Lelievre via Discuss <
discuss@lists.openscad.org> wrote:
> I have a shape that looks somewhat like a section sliced off the end of a
> tube. My project involves getting it CNC cut from brass. A concern is that
> the upper part of the shape will have sharp edges. For safety, I would like
> to bevel the inner and outer rims (it will be part of a public sculpture so
> often touched by people).
>
> I don't want to cut into the shape but I add extra material above and cut
> a bevel in the extra height. Unfortunately, I can't figure out how to do
> that - roof is for 2D and I can't think of a Minkowski 'tool' that would do
> the job. Not yet anyway.
>
> The few lines of code given below produce an approximation of the shape
> involved. Although it demonstrates the general shape, the actual shape is a
> single polyhedron generated externally using Javascript and does not
> involve any primitive shapes.
>
> I realise that because I have the coordinates of all the points that
> define the top face of the polyhedron, I could add to my Javascript code to
> generate extra faces inclined at 45 degrees to the top of the inner and
> outer walls. I'm making this post in case someone can suggest of a
> convenient shortcut within OpenSCAD.
>
> Cheers,
>
> Steve
>
> $fn = 120;
> intersection() {
> rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
> translate([0,0,-7])scale([1.5,1,1])difference() {
> cylinder(r=30, h =20, center=true);
> cylinder(r=28, h =30,center=true);
> }
> }
>
>
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Wed, Nov 19, 2025 5:59 PM
is this what you want:
it can be a smooth radius instead of a chamfer here
[image: Screenshot 2025-11-19 at 11.25.08 PM.png]
I wrote a small python code for the same, but may not be very useful for
people who have not much idea about it. output file is attached just for
reference
On Wed, 19 Nov 2025 at 03:23, Steve Lelievre via Discuss <
discuss@lists.openscad.org> wrote:
I have a shape that looks somewhat like a section sliced off the end of a
tube. My project involves getting it CNC cut from brass. A concern is that
the upper part of the shape will have sharp edges. For safety, I would like
to bevel the inner and outer rims (it will be part of a public sculpture so
often touched by people).
I don't want to cut into the shape but I add extra material above and cut
a bevel in the extra height. Unfortunately, I can't figure out how to do
that - roof is for 2D and I can't think of a Minkowski 'tool' that would do
the job. Not yet anyway.
The few lines of code given below produce an approximation of the shape
involved. Although it demonstrates the general shape, the actual shape is a
single polyhedron generated externally using Javascript and does not
involve any primitive shapes.
I realise that because I have the coordinates of all the points that
define the top face of the polyhedron, I could add to my Javascript code to
generate extra faces inclined at 45 degrees to the top of the inner and
outer walls. I'm making this post in case someone can suggest of a
convenient shortcut within OpenSCAD.
Cheers,
Steve
$fn = 120;
intersection() {
rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
translate([0,0,-7])scale([1.5,1,1])difference() {
cylinder(r=30, h =20, center=true);
cylinder(r=28, h =30,center=true);
}
}
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
is this what you want:
it can be a smooth radius instead of a chamfer here
[image: Screenshot 2025-11-19 at 11.25.08 PM.png]
I wrote a small python code for the same, but may not be very useful for
people who have not much idea about it. output file is attached just for
reference
On Wed, 19 Nov 2025 at 03:23, Steve Lelievre via Discuss <
discuss@lists.openscad.org> wrote:
> I have a shape that looks somewhat like a section sliced off the end of a
> tube. My project involves getting it CNC cut from brass. A concern is that
> the upper part of the shape will have sharp edges. For safety, I would like
> to bevel the inner and outer rims (it will be part of a public sculpture so
> often touched by people).
>
> I don't want to cut into the shape but I add extra material above and cut
> a bevel in the extra height. Unfortunately, I can't figure out how to do
> that - roof is for 2D and I can't think of a Minkowski 'tool' that would do
> the job. Not yet anyway.
>
> The few lines of code given below produce an approximation of the shape
> involved. Although it demonstrates the general shape, the actual shape is a
> single polyhedron generated externally using Javascript and does not
> involve any primitive shapes.
>
> I realise that because I have the coordinates of all the points that
> define the top face of the polyhedron, I could add to my Javascript code to
> generate extra faces inclined at 45 degrees to the top of the inner and
> outer walls. I'm making this post in case someone can suggest of a
> convenient shortcut within OpenSCAD.
>
> Cheers,
>
> Steve
>
> $fn = 120;
> intersection() {
> rotate(-25,[1,0,0])translate([0,0,50])cube(100,center=true);
> translate([0,0,-7])scale([1.5,1,1])difference() {
> cylinder(r=30, h =20, center=true);
> cylinder(r=28, h =30,center=true);
> }
> }
>
>
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
SL
Steve Lelievre
Wed, Nov 19, 2025 7:05 PM
Hi all,
Sanjeev's differenced polyhedrons - right at the start of his code
sample - that give the exact kind of straight chamfering I want. The
BOSL2 path_sweep mentioned by Dan seems to be the easiest way to create
the the two subtracted polyhedrons (with a diamond as the swept 2D
shape.) I can easily adjust the Javascript program that builds my shape,
adding some height to the wall so that the bevel doesn't cut the below
the existing top, and I can easily output the two upper edge paths as
the point vectors for path_sweep.
Combining those two replies gives me a viable way forward but my thanks
go equally to everyone else who offered suggestions.
Cheers,
Steve
On 2025-11-19 9:59 a.m., Sanjeev Prabhakar wrote:
is this what you want:
it can be a smooth radius instead of a chamfer here
Screenshot 2025-11-19 at 11.25.08 PM.png
I wrote a small python code for the same, but may not be very useful
for people who have not much idea about it. output file is attached
just for reference
On Wed, 19 Nov 2025 at 03:23, Steve Lelievre via Discuss
discuss@lists.openscad.org wrote:
I have a shape that looks somewhat like a section sliced off the
end of a tube. My project involves getting it CNC cut from brass.
A concern is that the upper part of the shape will have sharp
edges. For safety, I would like to bevel the inner and outer rims
(it will be part of a public sculpture so often touched by people).
I don't want to cut into the shape but I add extra material above
and cut a bevel in the extra height. Unfortunately, I can't figure
out how to do that - roof is for 2D and I can't think of a
Minkowski 'tool' that would do the job. Not yet anyway.
Hi all,
Sanjeev's differenced polyhedrons - right at the start of his code
sample - that give the exact kind of straight chamfering I want. The
BOSL2 path_sweep mentioned by Dan seems to be the easiest way to create
the the two subtracted polyhedrons (with a diamond as the swept 2D
shape.) I can easily adjust the Javascript program that builds my shape,
adding some height to the wall so that the bevel doesn't cut the below
the existing top, and I can easily output the two upper edge paths as
the point vectors for path_sweep.
Combining those two replies gives me a viable way forward but my thanks
go equally to everyone else who offered suggestions.
Cheers,
Steve
On 2025-11-19 9:59 a.m., Sanjeev Prabhakar wrote:
> is this what you want:
> it can be a smooth radius instead of a chamfer here
> Screenshot 2025-11-19 at 11.25.08 PM.png
>
> I wrote a small python code for the same, but may not be very useful
> for people who have not much idea about it. output file is attached
> just for reference
>
> On Wed, 19 Nov 2025 at 03:23, Steve Lelievre via Discuss
> <discuss@lists.openscad.org> wrote:
>
> I have a shape that looks somewhat like a section sliced off the
> end of a tube. My project involves getting it CNC cut from brass.
> A concern is that the upper part of the shape will have sharp
> edges. For safety, I would like to bevel the inner and outer rims
> (it will be part of a public sculpture so often touched by people).
>
> I don't want to cut into the shape but I add extra material above
> and cut a bevel in the extra height. Unfortunately, I can't figure
> out how to do that - roof is for 2D and I can't think of a
> Minkowski 'tool' that would do the job. Not yet anyway.
>
>