Dear all,
what is the preferred way to round edges of standard objects e.g an
cylinder(h=3,r=5) ?
Many thanks
Karl
On Sep 30, 2023, at 6:02 AM, Karl Exler <karl.exler@meinklang.cc> wrote:
what is the preferred way to round edges of standard objects e.g an cylinder(h=3,r=5) ?
With the BOSL2 library, you do it like this:
cyl(h=3, r=5, rounding=1, $fn=24);
-Revar
On 9/30/2023 6:02 AM, Karl Exler wrote:
what is the preferred way to round edges of standard objects e.g an
cylinder(h=3,r=5) ?
As Revar says, using BOSL2 is the easiest.
If you want to DIY for some reason, the usual rounding techniques
involve positioning round things and then either hulling them or filling
in between them.
Here are two ways to make a rounded cylinder:
module roundcyl_hull(r, h, roundr) {
hull() {
for (z = [roundr, h-roundr]) {
translate([0,0,z]) rotate_extrude()
translate([r-roundr, 0]) circle(r=roundr);
}
}
}
roundcyl_hull(10, 20, 2);
module roundcyl_fill(r, h, roundr) {
for (z = [roundr, h-roundr]) {
translate([0,0,z]) rotate_extrude()
translate([r-roundr, 0]) circle(r=roundr);
}
cylinder(h=h, r=r-roundr);
translate([0,0,roundr]) cylinder(h=h-roundr*2, r=r);
}
translate([20,0,0]) roundcyl_fill(10, 20, 2);
Note that the "fill" variant (on the right) has a slight ridge at the
top and bottom. That's because the circle being extruded has only 7
sides, and doesn't have a vertex pointing up that extends all the way to
the actual radius, while the fill cylinder does extend to the full
height. This can be addressed by forcing the circle to have a multiple
of four sides.
Note also that there are several corner cases that this doesn't attempt
to address. Both will, for instance, get into trouble if the cylinder
radius or height are less than twice the rounding radius.
Is there some law about not using Minkowsk?
Only that it is glacialy slow if the shape is not convex.
On Tue, 3 Oct 2023, 10:48 Raymond West, raywest@raywest.com wrote:
Is there some law about not using Minkowsk?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
One of my early models used minkowski. It was 20 minutes to preview. Is
minkowski reliably fast on convex objects?
On Tue, Oct 3, 2023 at 5:51 AM nop head nop.head@gmail.com wrote:
Only that it is glacialy slow if the shape is not convex.
On Tue, 3 Oct 2023, 10:48 Raymond West, raywest@raywest.com wrote:
Is there some law about not using Minkowsk?
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
On Tue, Oct 03, 2023 at 10:48:30AM +0100, Raymond West wrote:
Is there some law about not using Minkowsk?
It is so unbelievably slow that in practice you can't use it outside
of trival examples.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a is going up. -- Chris Hadfield about flying up the space shuttle.
minkowski is at the top of my list when it comes to functionality & simplicity in OpenSCAD where it gives a correct preview. However, it is at the bottom when rendering, because I have very rarely had scenarios in which it renders successfully. Because of this, I generally avoid it, because I see no point in writing code that cannot be rendered, since I cannot export & print models that cannot be rendered. These same statements usually apply to hull().
Nathan Sokalski
njsokalski@hotmail.commailto:njsokalski@hotmail.com
From: Adrian Mariano avm4@cornell.edu
Sent: Tuesday, October 3, 2023 6:52 AM
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Subject: [OpenSCAD] Re: rounding of standard objects
One of my early models used minkowski. It was 20 minutes to preview. Is minkowski reliably fast on convex objects?
On Tue, Oct 3, 2023 at 5:51 AM nop head <nop.head@gmail.commailto:nop.head@gmail.com> wrote:
Only that it is glacialy slow if the shape is not convex.
On Tue, 3 Oct 2023, 10:48 Raymond West, <raywest@raywest.commailto:raywest@raywest.com> wrote:
Is there some law about not using Minkowsk?
[X]
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
On 02.10.23 19:28, Jordan Brown wrote:
On 9/30/2023 6:02 AM, Karl Exler wrote:
what is the preferred way to round edges of standard objects e.g an
cylinder(h=3,r=5) ?
As Revar says, using BOSL2 is the easiest.
I do object.
Constructive lib is the easiest :) , something like like chamfer(-1,-1)
tube(d=10,wall=4,h=20)
it is chamfering not quite rounding (mainly for openscad performance
reasons), but in many cases this is what you actually want.