I have a hex with all sharp edges:
cylinder(h=GuardEdgeThickness,r=GuardRadius, $fn=6);
How can I round the edges a bit. Maybe 1 or 2 mm radius is all I need.
I think I may be forced to create two hexagonal arrays of spheres and hull
them.
Is there an easier way?
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
I've used "minkowski()" for that. It requires a bit of care as it will
"grow" the final object by the sum of the child objects, so one needs to
adjust dimensions and verify the result.
Assume your height was to be 5 and radius 20. This gives rounded corners:
minkowski(){
cylinder(h=2.5,r=18, $fn=6);
cylinder(h=2.5,r=1, $fn=32);
}
If you want all edges rounded:
minkowski(){
cylinder(h=3,r=18, $fn=6);
sphere(r=1, $fn=32);
}
Note how the dimensions add differently depending on the type of rounding
shape used.
Hope that helps.
On Thu, Jan 20, 2022 at 7:05 PM david vanhorn kc6ete@gmail.com wrote:
I have a hex with all sharp edges:
cylinder(h=GuardEdgeThickness,r=GuardRadius, $fn=6);
How can I round the edges a bit. Maybe 1 or 2 mm radius is all I need.
I think I may be forced to create two hexagonal arrays of spheres and hull
them.
Is there an easier way?
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Of course, you'd definitely want to use named constants and perform the
calculations so that the model was maintainable. You can also fix the
height of the rounding cylinder to add some symmetry to the code:
sw=1;
radius = 20;
height = 10;
scham_rad = 1; // the rounded edge radius
if(sw==1){
minkowski(){
cylinder(h=height-(scham_rad), r=radius-(1*scham_rad), $fn=6);
cylinder(h= scham_rad, r=scham_rad , $fn=32);
}
}
if(sw==2){
cylinder(h=height,r=radius, $fn=6);
}
Note that there is a slight difference in the size of the resulting shape
(you can see it by setting sw to 1 or 2 and recompiling). This is the
price of using minkowski and a low-order ($fn < 16) kernel shape. The
radius of the rounding shape adds differently across the x-axis points than
it does across the y-axis flats.
If you need the shape to be exactly as it was originally, my only other
option would be to difference() the corners with a cube and fill the
removed shape with precisely located cylinders. Tricky and painstaking.
If someone has a better solution than the above, I am also open to hearing
about it as I am always rounding or chamfering edges.
On Thu, Jan 20, 2022 at 7:16 PM FF Systems joeh@rollanet.org wrote:
I've used "minkowski()" for that. It requires a bit of care as it will
"grow" the final object by the sum of the child objects, so one needs to
adjust dimensions and verify the result.
Assume your height was to be 5 and radius 20. This gives rounded corners:
minkowski(){
cylinder(h=2.5,r=18, $fn=6);
cylinder(h=2.5,r=1, $fn=32);
}
If you want all edges rounded:
minkowski(){
cylinder(h=3,r=18, $fn=6);
sphere(r=1, $fn=32);
}
Note how the dimensions add differently depending on the type of rounding
shape used.
Hope that helps.
On Thu, Jan 20, 2022 at 7:05 PM david vanhorn kc6ete@gmail.com wrote:
I have a hex with all sharp edges:
cylinder(h=GuardEdgeThickness,r=GuardRadius, $fn=6);
How can I round the edges a bit. Maybe 1 or 2 mm radius is all I need.
I think I may be forced to create two hexagonal arrays of spheres and
hull them.
Is there an easier way?
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
There's nothing wrong with the hull of 12 sphere originally proposed,
though I think it might be slow if you don't use lazy union. But if
you want to branch out into totally different territory, here are two
ways to do this with BOSL2:
This example uses continuous curvature rounding, so the curves are not circular:
include<BOSL2/std.scad>
include<BOSL2/rounding.scad>
rounded_prism(circle(r=10,$fn=6), h=10, joint_top=1.5, joint_bot=1.5,
joint_sides=1.5);
or alternatively you can use offset_sweep which can do things like
teardrop rounding at the bottom for 3d printability, or you can
substitute os_circle for the bottom and get circles all around.
include<BOSL2/std.scad>
include<BOSL2/rounding.scad>
offset_sweep(hexagon(r=10,rounding=1,$fn=48), h=10,
top=os_circle(r=1), bottom=os_teardrop(r=1));
On Thu, Jan 20, 2022 at 8:40 PM FF Systems joeh@rollanet.org wrote:
Of course, you'd definitely want to use named constants and perform the calculations so that the model was maintainable. You can also fix the height of the rounding cylinder to add some symmetry to the code:
sw=1;
radius = 20;
height = 10;
scham_rad = 1; // the rounded edge radius
if(sw==1){
minkowski(){
cylinder(h=height-(scham_rad), r=radius-(1*scham_rad), $fn=6);
cylinder(h= scham_rad, r=scham_rad , $fn=32);
}
}
if(sw==2){
cylinder(h=height,r=radius, $fn=6);
}
Note that there is a slight difference in the size of the resulting shape (you can see it by setting sw to 1 or 2 and recompiling). This is the price of using minkowski and a low-order ($fn < 16) kernel shape. The radius of the rounding shape adds differently across the x-axis points than it does across the y-axis flats.
If you need the shape to be exactly as it was originally, my only other option would be to difference() the corners with a cube and fill the removed shape with precisely located cylinders. Tricky and painstaking.
If someone has a better solution than the above, I am also open to hearing about it as I am always rounding or chamfering edges.
On Thu, Jan 20, 2022 at 7:16 PM FF Systems joeh@rollanet.org wrote:
I've used "minkowski()" for that. It requires a bit of care as it will "grow" the final object by the sum of the child objects, so one needs to adjust dimensions and verify the result.
Assume your height was to be 5 and radius 20. This gives rounded corners:
minkowski(){
cylinder(h=2.5,r=18, $fn=6);
cylinder(h=2.5,r=1, $fn=32);
}If you want all edges rounded:
minkowski(){
cylinder(h=3,r=18, $fn=6);
sphere(r=1, $fn=32);
}Note how the dimensions add differently depending on the type of rounding shape used.
Hope that helps.
On Thu, Jan 20, 2022 at 7:05 PM david vanhorn kc6ete@gmail.com wrote:
I have a hex with all sharp edges:
cylinder(h=GuardEdgeThickness,r=GuardRadius, $fn=6);
How can I round the edges a bit. Maybe 1 or 2 mm radius is all I need.
I think I may be forced to create two hexagonal arrays of spheres and hull them.
Is there an easier way?--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
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
Rounding the hexagon’s corners is easy.
linear_extrude(GuardEdgeThickness) offset(2) offset(-2) circle(GuardRadius, $fn=6);
Rounding the ends is trickier. I’ve done it by using a for loop to produce a set of the above, some with larger radii and some with a larger height, then hulling them. It might seem more complicated than a Minkowski or hulling spheres, but I’m pretty sure it’s faster to render.
On Jan 20, 2022, 17:05 -0800, david vanhorn kc6ete@gmail.com, wrote:
I have a hex with all sharp edges:
cylinder(h=GuardEdgeThickness,r=GuardRadius, $fn=6);
How can I round the edges a bit. Maybe 1 or 2 mm radius is all I need.
I think I may be forced to create two hexagonal arrays of spheres and hull them.
Is there an easier way?
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I always connect spheres with cylinders to form the edge, then fill the
insides in whatever way is appropriate. Two extruded polygons will
usually do it.
There are fancier ways, and ways that work with edges that slant, but
this is a pretty simple way that works for a lot of useful cases.
On 1/20/2022 7:11 PM, Jordan Brown wrote:
I always connect spheres with cylinders to form the edge, then fill
the insides in whatever way is appropriate. Two extruded polygons
will usually do it.
And I have a pipe_polygon module that takes a series of points and
builds the edges.
I was about to say, the problem is the trig needed to find the points.
The OP made the shape with a cylinder(...$fn=6), so getting points is non trivial.
Hence Whosawhatsis's offset() solution.
But with the new render() it will not be too much work,
hex=render() circle(...$fn=6), then loop the points. No need for trig.
Still non-trivial compared to offset()...
From: Jordan Brown [mailto:openscad@jordan.maileater.net]
Sent: Fri, 21 Jan 2022 14:11
To: OpenSCAD general discussion; david vanhorn
Subject: [OpenSCAD] Re: Rounding the edges
I always connect spheres with cylinders to form the edge, then fill the insides in whatever way is appropriate. Two extruded polygons will usually do it.
There are fancier ways, and ways that work with edges that slant, but this is a pretty simple way that works for a lot of useful cases.
--
This email has been checked for viruses by AVG.
https://www.avg.com
Well, here's what I came up with. I won't say it's elegant or cleaned up
yet, but it does get me where I needed to go.
The divots were a subsequent complication, not sure if they will remain or
not.
HexRad = 1;// corner rounding radius
Hex = (360/6);// Despite what I was told all through school, reducing the
fraction is not always necessary. :)
// I could wrap these up in a for loop, but didn't want to fool with that
yet. I haven't actually used a for loop in OpenSCAD yet.
module Spheres(){
rotate([0,0,(Hex*0)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*1)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*2)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*3)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*4)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*5)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
}
module Hex(){
hull(){
union(){
Spheres();
translate([0,0,(GuardEdgeThickness-(HexRad/2))]){
Spheres();
}
}
}
}
module Divot(){
translate([0,0,10]){
rotate([20,0,0]){
cylinder(h=20,r=15,center =true);
}
}
}
module Divots(){
rotate([0,0,(Hex*0)]){
translate([0,(GuardRadius+9),0]){
Divot();
}
}
rotate([0,0,(Hex*1)]){
translate([0,(GuardRadius+9),0]){
Divot();
}
}
rotate([0,0,(Hex*2)]){
translate([0,(GuardRadius+9),0]){
//Divot(); // Turned two of these off deliberately to compare.
}
}
rotate([0,0,(Hex*3)]){
translate([0,(GuardRadius+9),0]){
Divot();
}
}
rotate([0,0,(Hex*4)]){
translate([0,(GuardRadius+9),0]){
Divot();
}
}
rotate([0,0,(Hex*5)]){
translate([0,(GuardRadius+9),0]){
//Divot();
}
}
}
// Once all the prelims are done, it's not too bad.
module HexDivot(){
difference(){
Hex();
rotate([0,0,(360/12)]){
Divots();
}
}
}
On Thu, Jan 20, 2022 at 9:01 PM MichaelAtOz oz.at.michael@gmail.com wrote:
I was about to say, the problem is the trig needed to find the points.
The OP made the shape with a cylinder(...$fn=6), so getting points is non
trivial.
Hence Whosawhatsis's offset() solution.
But with the new render() it will not be too much work,
hex=render() circle(...$fn=6), then loop the points. No need for trig.
Still non-trivial compared to offset()...
From: Jordan Brown [mailto:openscad@jordan.maileater.net]
Sent: Fri, 21 Jan 2022 14:11
To: OpenSCAD general discussion; david vanhorn
Subject: [OpenSCAD] Re: Rounding the edges
I always connect spheres with cylinders to form the edge, then fill the
insides in whatever way is appropriate. Two extruded polygons will usually
do it.
There are fancier ways, and ways that work with edges that slant, but this
is a pretty simple way that works for a lot of useful cases.
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_3472798860700649024_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
I'll have a look at the other solutions, I've not even read up on Minkowski
yet. There's always more to learn. When I stop learning, get a shovel.
On Fri, Jan 21, 2022 at 2:35 AM david vanhorn kc6ete@gmail.com wrote:
Well, here's what I came up with. I won't say it's elegant or cleaned up
yet, but it does get me where I needed to go.
The divots were a subsequent complication, not sure if they will remain or
not.
HexRad = 1;// corner rounding radius
Hex = (360/6);// Despite what I was told all through school, reducing the
fraction is not always necessary. :)
// I could wrap these up in a for loop, but didn't want to fool with that
yet. I haven't actually used a for loop in OpenSCAD yet.
module Spheres(){
rotate([0,0,(Hex*0)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*1)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*2)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*3)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*4)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
rotate([0,0,(Hex*5)]){
translate([0,GuardRadius,0]){
sphere(r=HexRad);
}
}
}
module Hex(){
hull(){
union(){
Spheres();
translate([0,0,(GuardEdgeThickness-(HexRad/2))]){
Spheres();
}
}
}
}
module Divot(){
translate([0,0,10]){
rotate([20,0,0]){
cylinder(h=20,r=15,center =true);
}
}
}
module Divots(){
rotate([0,0,(Hex*0)]){
translate([0,(GuardRadius+9),0]){
Divot();
}
}
rotate([0,0,(Hex*1)]){
translate([0,(GuardRadius+9),0]){
Divot();
}
}
rotate([0,0,(Hex*2)]){
translate([0,(GuardRadius+9),0]){
//Divot(); // Turned two of these off deliberately to compare.
}
}
rotate([0,0,(Hex*3)]){
translate([0,(GuardRadius+9),0]){
Divot();
}
}
rotate([0,0,(Hex*4)]){
translate([0,(GuardRadius+9),0]){
Divot();
}
}
rotate([0,0,(Hex*5)]){
translate([0,(GuardRadius+9),0]){
//Divot();
}
}
}
// Once all the prelims are done, it's not too bad.
module HexDivot(){
difference(){
Hex();
rotate([0,0,(360/12)]){
Divots();
}
}
}
On Thu, Jan 20, 2022 at 9:01 PM MichaelAtOz oz.at.michael@gmail.com
wrote:
I was about to say, the problem is the trig needed to find the points.
The OP made the shape with a cylinder(...$fn=6), so getting points is non
trivial.
Hence Whosawhatsis's offset() solution.
But with the new render() it will not be too much work,
hex=render() circle(...$fn=6), then loop the points. No need for trig.
Still non-trivial compared to offset()...
From: Jordan Brown [mailto:openscad@jordan.maileater.net]
Sent: Fri, 21 Jan 2022 14:11
To: OpenSCAD general discussion; david vanhorn
Subject: [OpenSCAD] Re: Rounding the edges
I always connect spheres with cylinders to form the edge, then fill the
insides in whatever way is appropriate. Two extruded polygons will usually
do it.
There are fancier ways, and ways that work with edges that slant, but
this is a pretty simple way that works for a lot of useful cases.
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_5890229625985161777_m_3472798860700649024_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15
--
K1FZY (WA4TPW) SK 9/29/37-4/13/15