discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

odd shape import

JW
Joe Weinpert
Wed, Jan 12, 2022 8:49 PM

I have many, many odd 2D shapes that will be imported over the next few
months.

I have no problem importing or extruding them.

However, I do have the need for the top edge to be rounded around the whole
shape as it is imported or extruded.  In other words, a rounded chamfer
around the top.

The attached example 2D shape is about 5" wide overall in real-time and is
to be extruded to 1" high.  What can be done to have this extrusion contain
a small, 1/4" radius chamfer around the top?

Any ideas?

Joe Weinpert

I have many, many odd 2D shapes that will be imported over the next few months. I have no problem importing or extruding them. However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded. In other words, a rounded chamfer around the top. The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high. What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top? Any ideas? Joe Weinpert
AM
Adrian Mariano
Wed, Jan 12, 2022 10:51 PM

The only good way I know to do this is using offset_sweep() from BOSL2
as I already explained in the thread about adding a "dome" to the top.
(I actually wrote offset_sweep specifically to solve this problem of
adding a roundover to an arbitrary shape.)  Instead of importing the
SVG you will need to convert it somehow to a point list that you can
then embed into OpenSCAD.  The only fully general alternative I'm
aware of (that works on concave inputs) is to make a stair-step shape
by stacking a sequence of smaller and smaller layers.

On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert joe.weinpert@gmail.com wrote:

I have many, many odd 2D shapes that will be imported over the next few months.

I have no problem importing or extruding them.

However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded.  In other words, a rounded chamfer around the top.

The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high.  What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top?

Any ideas?

Joe Weinpert


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

The only good way I know to do this is using offset_sweep() from BOSL2 as I already explained in the thread about adding a "dome" to the top. (I actually wrote offset_sweep specifically to solve this problem of adding a roundover to an arbitrary shape.) Instead of importing the SVG you will need to convert it somehow to a point list that you can then embed into OpenSCAD. The only fully general alternative I'm aware of (that works on concave inputs) is to make a stair-step shape by stacking a sequence of smaller and smaller layers. On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert <joe.weinpert@gmail.com> wrote: > > I have many, many odd 2D shapes that will be imported over the next few months. > > I have no problem importing or extruding them. > > However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded. In other words, a rounded chamfer around the top. > > The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high. What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top? > > Any ideas? > > > > Joe Weinpert > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
RW
Raymond West
Wed, Jan 12, 2022 10:59 PM

A stair step solution I've used is at
https://www.thingiverse.com/thing:2461392/comments  but there was an
error (typo iirc) in the code, which was easy to correct. No idea if it
will work on the sort of shapes in the svg, and it is slow.

On 12/01/2022 22:51, Adrian Mariano wrote:

The only good way I know to do this is using offset_sweep() from BOSL2
as I already explained in the thread about adding a "dome" to the top.
(I actually wrote offset_sweep specifically to solve this problem of
adding a roundover to an arbitrary shape.)  Instead of importing the
SVG you will need to convert it somehow to a point list that you can
then embed into OpenSCAD.  The only fully general alternative I'm
aware of (that works on concave inputs) is to make a stair-step shape
by stacking a sequence of smaller and smaller layers.

On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert joe.weinpert@gmail.com wrote:

I have many, many odd 2D shapes that will be imported over the next few months.

I have no problem importing or extruding them.

However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded.  In other words, a rounded chamfer around the top.

The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high.  What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top?

Any ideas?

Joe Weinpert


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

A stair step solution I've used is at https://www.thingiverse.com/thing:2461392/comments  but there was an error (typo iirc) in the code, which was easy to correct. No idea if it will work on the sort of shapes in the svg, and it is slow. On 12/01/2022 22:51, Adrian Mariano wrote: > The only good way I know to do this is using offset_sweep() from BOSL2 > as I already explained in the thread about adding a "dome" to the top. > (I actually wrote offset_sweep specifically to solve this problem of > adding a roundover to an arbitrary shape.) Instead of importing the > SVG you will need to convert it somehow to a point list that you can > then embed into OpenSCAD. The only fully general alternative I'm > aware of (that works on concave inputs) is to make a stair-step shape > by stacking a sequence of smaller and smaller layers. > > On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert <joe.weinpert@gmail.com> wrote: >> I have many, many odd 2D shapes that will be imported over the next few months. >> >> I have no problem importing or extruding them. >> >> However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded. In other words, a rounded chamfer around the top. >> >> The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high. What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top? >> >> Any ideas? >> >> >> >> Joe Weinpert >> >> _______________________________________________ >> 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
JW
Joe Weinpert
Wed, Jan 12, 2022 11:00 PM

Thanks.  The 'step' procedure is something I've been experimenting with.
It is both good and bad.

Where can I find the BOSL2 library?

The 'point list' is what?  X/Y coordinates along the shape's edge?

On Wed, Jan 12, 2022, 5:51 PM Adrian Mariano avm4@cornell.edu wrote:

The only good way I know to do this is using offset_sweep() from BOSL2
as I already explained in the thread about adding a "dome" to the top.
(I actually wrote offset_sweep specifically to solve this problem of
adding a roundover to an arbitrary shape.)  Instead of importing the
SVG you will need to convert it somehow to a point list that you can
then embed into OpenSCAD.  The only fully general alternative I'm
aware of (that works on concave inputs) is to make a stair-step shape
by stacking a sequence of smaller and smaller layers.

On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert joe.weinpert@gmail.com
wrote:

I have many, many odd 2D shapes that will be imported over the next few

months.

I have no problem importing or extruding them.

However, I do have the need for the top edge to be rounded around the

whole shape as it is imported or extruded.  In other words, a rounded
chamfer around the top.

The attached example 2D shape is about 5" wide overall in real-time and

is to be extruded to 1" high.  What can be done to have this extrusion
contain a small, 1/4" radius chamfer around the top?

Any ideas?

Joe Weinpert


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. The 'step' procedure is something I've been experimenting with. It is both good and bad. Where can I find the BOSL2 library? The 'point list' is what? X/Y coordinates along the shape's edge? On Wed, Jan 12, 2022, 5:51 PM Adrian Mariano <avm4@cornell.edu> wrote: > The only good way I know to do this is using offset_sweep() from BOSL2 > as I already explained in the thread about adding a "dome" to the top. > (I actually wrote offset_sweep specifically to solve this problem of > adding a roundover to an arbitrary shape.) Instead of importing the > SVG you will need to convert it somehow to a point list that you can > then embed into OpenSCAD. The only fully general alternative I'm > aware of (that works on concave inputs) is to make a stair-step shape > by stacking a sequence of smaller and smaller layers. > > On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert <joe.weinpert@gmail.com> > wrote: > > > > I have many, many odd 2D shapes that will be imported over the next few > months. > > > > I have no problem importing or extruding them. > > > > However, I do have the need for the top edge to be rounded around the > whole shape as it is imported or extruded. In other words, a rounded > chamfer around the top. > > > > The attached example 2D shape is about 5" wide overall in real-time and > is to be extruded to 1" high. What can be done to have this extrusion > contain a small, 1/4" radius chamfer around the top? > > > > Any ideas? > > > > > > > > Joe Weinpert > > > > _______________________________________________ > > 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 >
JW
Joe Weinpert
Wed, Jan 12, 2022 11:07 PM

I shall look ... thanks

On Wed, Jan 12, 2022, 6:00 PM Raymond West raywest@raywest.com wrote:

A stair step solution I've used is at
https://www.thingiverse.com/thing:2461392/comments  but there was an
error (typo iirc) in the code, which was easy to correct. No idea if it
will work on the sort of shapes in the svg, and it is slow.

On 12/01/2022 22:51, Adrian Mariano wrote:

The only good way I know to do this is using offset_sweep() from BOSL2
as I already explained in the thread about adding a "dome" to the top.
(I actually wrote offset_sweep specifically to solve this problem of
adding a roundover to an arbitrary shape.)  Instead of importing the
SVG you will need to convert it somehow to a point list that you can
then embed into OpenSCAD.  The only fully general alternative I'm
aware of (that works on concave inputs) is to make a stair-step shape
by stacking a sequence of smaller and smaller layers.

On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert joe.weinpert@gmail.com

wrote:

I have many, many odd 2D shapes that will be imported over the next few

months.

I have no problem importing or extruding them.

However, I do have the need for the top edge to be rounded around the

whole shape as it is imported or extruded.  In other words, a rounded
chamfer around the top.

The attached example 2D shape is about 5" wide overall in real-time and

is to be extruded to 1" high.  What can be done to have this extrusion
contain a small, 1/4" radius chamfer around the top?

Any ideas?

Joe Weinpert


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

I shall look ... thanks On Wed, Jan 12, 2022, 6:00 PM Raymond West <raywest@raywest.com> wrote: > A stair step solution I've used is at > https://www.thingiverse.com/thing:2461392/comments but there was an > error (typo iirc) in the code, which was easy to correct. No idea if it > will work on the sort of shapes in the svg, and it is slow. > > On 12/01/2022 22:51, Adrian Mariano wrote: > > The only good way I know to do this is using offset_sweep() from BOSL2 > > as I already explained in the thread about adding a "dome" to the top. > > (I actually wrote offset_sweep specifically to solve this problem of > > adding a roundover to an arbitrary shape.) Instead of importing the > > SVG you will need to convert it somehow to a point list that you can > > then embed into OpenSCAD. The only fully general alternative I'm > > aware of (that works on concave inputs) is to make a stair-step shape > > by stacking a sequence of smaller and smaller layers. > > > > On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert <joe.weinpert@gmail.com> > wrote: > >> I have many, many odd 2D shapes that will be imported over the next few > months. > >> > >> I have no problem importing or extruding them. > >> > >> However, I do have the need for the top edge to be rounded around the > whole shape as it is imported or extruded. In other words, a rounded > chamfer around the top. > >> > >> The attached example 2D shape is about 5" wide overall in real-time and > is to be extruded to 1" high. What can be done to have this extrusion > contain a small, 1/4" radius chamfer around the top? > >> > >> Any ideas? > >> > >> > >> > >> Joe Weinpert > >> > >> _______________________________________________ > >> 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 >
AM
Adrian Mariano
Wed, Jan 12, 2022 11:18 PM

Personally I think the step procedure is pretty ugly.  If you are
trying to approximate a curve you need many steps, so it is also slow.
It works well only when the curve in convex, because in that case you
can use hull() to create sloped edges on the layers, and then the
result looks good.

BOSL2 is located here:

https://github.com/revarbat/BOSL2

And the specific function you need is this one:

https://github.com/revarbat/BOSL2/wiki/rounding.scad#functionmodule-offset_sweep

By point list, yes, you need the (x,y) coordinates along the shapes
edge.  So your code would look like

include<BOSL2/std.scad>
include<BOSL2/rounding.scad>

shape = [[3,4],[10,10],...etc];  // Shape defined as list of (x,y)
coordinates, without repeating the first point.

offset_sweep(shape, height=1INCH, top=os_circle(r=1/4INCH));  //
Assume model is in metric but you want inches

On Wed, Jan 12, 2022 at 6:00 PM Joe Weinpert joe.weinpert@gmail.com wrote:

Thanks.  The 'step' procedure is something I've been experimenting with.  It is both good and bad.

Where can I find the BOSL2 library?

The 'point list' is what?  X/Y coordinates along the shape's edge?

On Wed, Jan 12, 2022, 5:51 PM Adrian Mariano avm4@cornell.edu wrote:

The only good way I know to do this is using offset_sweep() from BOSL2
as I already explained in the thread about adding a "dome" to the top.
(I actually wrote offset_sweep specifically to solve this problem of
adding a roundover to an arbitrary shape.)  Instead of importing the
SVG you will need to convert it somehow to a point list that you can
then embed into OpenSCAD.  The only fully general alternative I'm
aware of (that works on concave inputs) is to make a stair-step shape
by stacking a sequence of smaller and smaller layers.

On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert joe.weinpert@gmail.com wrote:

I have many, many odd 2D shapes that will be imported over the next few months.

I have no problem importing or extruding them.

However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded.  In other words, a rounded chamfer around the top.

The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high.  What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top?

Any ideas?

Joe Weinpert


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

Personally I think the step procedure is pretty ugly. If you are trying to approximate a curve you need many steps, so it is also slow. It works well only when the curve in convex, because in that case you can use hull() to create sloped edges on the layers, and then the result looks good. BOSL2 is located here: https://github.com/revarbat/BOSL2 And the specific function you need is this one: https://github.com/revarbat/BOSL2/wiki/rounding.scad#functionmodule-offset_sweep By point list, yes, you need the (x,y) coordinates along the shapes edge. So your code would look like include<BOSL2/std.scad> include<BOSL2/rounding.scad> shape = [[3,4],[10,10],...etc]; // Shape defined as list of (x,y) coordinates, without repeating the first point. offset_sweep(shape, height=1*INCH, top=os_circle(r=1/4*INCH)); // Assume model is in metric but you want inches On Wed, Jan 12, 2022 at 6:00 PM Joe Weinpert <joe.weinpert@gmail.com> wrote: > > Thanks. The 'step' procedure is something I've been experimenting with. It is both good and bad. > > Where can I find the BOSL2 library? > > The 'point list' is what? X/Y coordinates along the shape's edge? > > > > On Wed, Jan 12, 2022, 5:51 PM Adrian Mariano <avm4@cornell.edu> wrote: >> >> The only good way I know to do this is using offset_sweep() from BOSL2 >> as I already explained in the thread about adding a "dome" to the top. >> (I actually wrote offset_sweep specifically to solve this problem of >> adding a roundover to an arbitrary shape.) Instead of importing the >> SVG you will need to convert it somehow to a point list that you can >> then embed into OpenSCAD. The only fully general alternative I'm >> aware of (that works on concave inputs) is to make a stair-step shape >> by stacking a sequence of smaller and smaller layers. >> >> On Wed, Jan 12, 2022 at 3:52 PM Joe Weinpert <joe.weinpert@gmail.com> wrote: >> > >> > I have many, many odd 2D shapes that will be imported over the next few months. >> > >> > I have no problem importing or extruding them. >> > >> > However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded. In other words, a rounded chamfer around the top. >> > >> > The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high. What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top? >> > >> > Any ideas? >> > >> > >> > >> > Joe Weinpert >> > >> > _______________________________________________ >> > 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
F
fred
Wed, Jan 12, 2022 11:23 PM

I'm not sure this is related, but the original mention referenced importing an SVG, and a following message suggested that would not work.I think that portion can be resolved with Inkscape (free, multi-platform) with the extension Paths to OpenSCAD. My experience is that the extension works with Inkscape 0.92 but I'm not sure if it works with Inkscape 1.x
If you have clean, closed SVG file, you specify thickness and the extension extrudes the shape defined by the SVG converting it to OpenSCAD code quite nicely.
If the SVG is a collection of closed shapes, fill the shape in order to keep empty space separated from filled shapes. If there are non-closed shapes (lines), use the thickness setting in the extension to ensure a result with thickness from the extrude.

The 'point list' is what?  X/Y coordinates along the shape's edge?

I'm not sure this is related, but the original mention referenced importing an SVG, and a following message suggested that would not work.I think that portion can be resolved with Inkscape (free, multi-platform) with the extension Paths to OpenSCAD. My experience is that the extension works with Inkscape 0.92 but I'm not sure if it works with Inkscape 1.x If you have clean, closed SVG file, you specify thickness and the extension extrudes the shape defined by the SVG converting it to OpenSCAD code quite nicely. If the SVG is a collection of closed shapes, fill the shape in order to keep empty space separated from filled shapes. If there are non-closed shapes (lines), use the thickness setting in the extension to ensure a result with thickness from the extrude. > The 'point list' is what?  X/Y coordinates along the shape's edge?
JB
Jordan Brown
Wed, Jan 12, 2022 11:57 PM

On 1/12/2022 12:49 PM, Joe Weinpert wrote:

I have many, many odd 2D shapes that will be imported over the next
few months.

I have no problem importing or extruding them.

However, I do have the need for the top edge to be rounded around the
whole shape as it is imported or extruded.  In other words, a rounded
chamfer around the top.

The attached example 2D shape is about 5" wide overall in real-time
and is to be extruded to 1" high.  What can be done to have this
extrusion contain a small, 1/4" radius chamfer around the top?

Any ideas?

If you can get the shape as a sequence of X,Y points P1, with a desired
height H, another strategy is to do it something like so:

  • Find an offset function that will offset P1 inward 1/4".  (I think
    BOSL2 has one.)  Call this path P2.
  • Sweep a 1/4" radius circle around P2, and translate it up by H minus
    1/4".  This forms your rounded edge.
  • Extrude P2 to height H.
  • Offset P2 outward 1/4".  This is mostly, but not quite, the same
    as the original.  Call this path P3.
  • Extrude P3 to H minus 1/4".

With respect to the "step" scheme... it's not that awful, for small
values, if the destination is 3D printing.  Remember that your printer
has finite resolution.  It only needs to be 1/4" tall, or about 6mm.  At
0.3mm layers, you only need ~21 layers.  At 0.1mm layers, ~64 layers.

On 1/12/2022 12:49 PM, Joe Weinpert wrote: > I have many, many odd 2D shapes that will be imported over the next > few months. > > I have no problem importing or extruding them. > > However, I do have the need for the top edge to be rounded around the > whole shape as it is imported or extruded.  In other words, a rounded > chamfer around the top. > > The attached example 2D shape is about 5" wide overall in real-time > and is to be extruded to 1" high.  What can be done to have this > extrusion contain a small, 1/4" radius chamfer around the top? > > Any ideas? If you can get the shape as a sequence of X,Y points P1, with a desired height H, another strategy is to do it something like so: * Find an offset function that will offset P1 inward 1/4".  (I think BOSL2 has one.)  Call this path P2. * Sweep a 1/4" radius circle around P2, and translate it up by H minus 1/4".  This forms your rounded edge. * Extrude P2 to height H. * Offset P2 *outward* 1/4".  This is mostly, but not quite, the same as the original.  Call this path P3. * Extrude P3 to H minus 1/4". With respect to the "step" scheme... it's not *that* awful, for small values, if the destination is 3D printing.  Remember that your printer has finite resolution.  It only needs to be 1/4" tall, or about 6mm.  At 0.3mm layers, you only need ~21 layers.  At 0.1mm layers, ~64 layers.
AM
Adrian Mariano
Thu, Jan 13, 2022 1:01 AM

The strategy you propose, of sweeping a circle around the edge, is
less robust than using offset_sweep() and I think also less efficient.
Note that offset_sweep() is basically a function that organizes calls
to offset() to make life easier.  The real work and real challenge is
in providing the offset() function.  But offset sweep is actually a
better behaved operation than path sweep.  It will almost always work.
With path_sweep, if P2 has high sampling rate or sharp turns you're
very likely to get a non-manifold result when sweeping a circle along
P2.  I actually wrote a limited path_sweep2d that avoids these
non-manifold issues by reinterpreting a path sweep as a set of offset
operations to exploit the increased robustness of offsetting.

You can call it a personal quirk, but I hate looking at the moire
pattern surfaces that arise when you pack in lots of layers to make a
bad approximation scheme (like stair stepping) give tolerable results.
I think it's hard to tell what those surfaces are actually doing.
(That matters less for a tiny roundover than in other contexts.)  I
agree, though, that it can work in practice when you go to print your
model.

On Wed, Jan 12, 2022 at 6:57 PM Jordan Brown
openscad@jordan.maileater.net wrote:

On 1/12/2022 12:49 PM, Joe Weinpert wrote:

I have many, many odd 2D shapes that will be imported over the next few months.

I have no problem importing or extruding them.

However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded.  In other words, a rounded chamfer around the top.

The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high.  What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top?

Any ideas?

If you can get the shape as a sequence of X,Y points P1, with a desired height H, another strategy is to do it something like so:

Find an offset function that will offset P1 inward 1/4".  (I think BOSL2 has one.)  Call this path P2.
Sweep a 1/4" radius circle around P2, and translate it up by H minus 1/4".  This forms your rounded edge.
Extrude P2 to height H.
Offset P2 outward 1/4".  This is mostly, but not quite, the same as the original.  Call this path P3.
Extrude P3 to H minus 1/4".

With respect to the "step" scheme... it's not that awful, for small values, if the destination is 3D printing.  Remember that your printer has finite resolution.  It only needs to be 1/4" tall, or about 6mm.  At 0.3mm layers, you only need ~21 layers.  At 0.1mm layers, ~64 layers.


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

The strategy you propose, of sweeping a circle around the edge, is less robust than using offset_sweep() and I think also less efficient. Note that offset_sweep() is basically a function that organizes calls to offset() to make life easier. The real work and real challenge is in providing the offset() function. But offset sweep is actually a better behaved operation than path sweep. It will almost always work. With path_sweep, if P2 has high sampling rate or sharp turns you're very likely to get a non-manifold result when sweeping a circle along P2. I actually wrote a limited path_sweep2d that avoids these non-manifold issues by reinterpreting a path sweep as a set of offset operations to exploit the increased robustness of offsetting. You can call it a personal quirk, but I hate looking at the moire pattern surfaces that arise when you pack in lots of layers to make a bad approximation scheme (like stair stepping) give tolerable results. I think it's hard to tell what those surfaces are actually doing. (That matters less for a tiny roundover than in other contexts.) I agree, though, that it can work in practice when you go to print your model. On Wed, Jan 12, 2022 at 6:57 PM Jordan Brown <openscad@jordan.maileater.net> wrote: > > On 1/12/2022 12:49 PM, Joe Weinpert wrote: > > I have many, many odd 2D shapes that will be imported over the next few months. > > I have no problem importing or extruding them. > > However, I do have the need for the top edge to be rounded around the whole shape as it is imported or extruded. In other words, a rounded chamfer around the top. > > The attached example 2D shape is about 5" wide overall in real-time and is to be extruded to 1" high. What can be done to have this extrusion contain a small, 1/4" radius chamfer around the top? > > Any ideas? > > > If you can get the shape as a sequence of X,Y points P1, with a desired height H, another strategy is to do it something like so: > > Find an offset function that will offset P1 inward 1/4". (I think BOSL2 has one.) Call this path P2. > Sweep a 1/4" radius circle around P2, and translate it up by H minus 1/4". This forms your rounded edge. > Extrude P2 to height H. > Offset P2 *outward* 1/4". This is mostly, but not quite, the same as the original. Call this path P3. > Extrude P3 to H minus 1/4". > > > With respect to the "step" scheme... it's not *that* awful, for small values, if the destination is 3D printing. Remember that your printer has finite resolution. It only needs to be 1/4" tall, or about 6mm. At 0.3mm layers, you only need ~21 layers. At 0.1mm layers, ~64 layers. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Thu, Jan 13, 2022 2:16 AM

I think someone with good advance understanding of openscad should make
video tutorials with some test cases.
That will really help a lot of us learn faster.
The videos available seem to be quite old and not very helpful for some
advance modeling purpose

On Thu, 13 Jan 2022, 06:32 Adrian Mariano, avm4@cornell.edu wrote:

The strategy you propose, of sweeping a circle around the edge, is
less robust than using offset_sweep() and I think also less efficient.
Note that offset_sweep() is basically a function that organizes calls
to offset() to make life easier.  The real work and real challenge is
in providing the offset() function.  But offset sweep is actually a
better behaved operation than path sweep.  It will almost always work.
With path_sweep, if P2 has high sampling rate or sharp turns you're
very likely to get a non-manifold result when sweeping a circle along
P2.  I actually wrote a limited path_sweep2d that avoids these
non-manifold issues by reinterpreting a path sweep as a set of offset
operations to exploit the increased robustness of offsetting.

You can call it a personal quirk, but I hate looking at the moire
pattern surfaces that arise when you pack in lots of layers to make a
bad approximation scheme (like stair stepping) give tolerable results.
I think it's hard to tell what those surfaces are actually doing.
(That matters less for a tiny roundover than in other contexts.)  I
agree, though, that it can work in practice when you go to print your
model.

I think someone with good advance understanding of openscad should make video tutorials with some test cases. That will really help a lot of us learn faster. The videos available seem to be quite old and not very helpful for some advance modeling purpose On Thu, 13 Jan 2022, 06:32 Adrian Mariano, <avm4@cornell.edu> wrote: > The strategy you propose, of sweeping a circle around the edge, is > less robust than using offset_sweep() and I think also less efficient. > Note that offset_sweep() is basically a function that organizes calls > to offset() to make life easier. The real work and real challenge is > in providing the offset() function. But offset sweep is actually a > better behaved operation than path sweep. It will almost always work. > With path_sweep, if P2 has high sampling rate or sharp turns you're > very likely to get a non-manifold result when sweeping a circle along > P2. I actually wrote a limited path_sweep2d that avoids these > non-manifold issues by reinterpreting a path sweep as a set of offset > operations to exploit the increased robustness of offsetting. > > You can call it a personal quirk, but I hate looking at the moire > pattern surfaces that arise when you pack in lots of layers to make a > bad approximation scheme (like stair stepping) give tolerable results. > I think it's hard to tell what those surfaces are actually doing. > (That matters less for a tiny roundover than in other contexts.) I > agree, though, that it can work in practice when you go to print your > model. > > >