discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Small Handle

L
larry
Tue, May 21, 2024 4:16 AM

I am trying to replicate a handle for a metal measuring cup that is
designed to look like a saucepan.

Attached is a picture of the handle. It's broken, but there's enough of
it left to let me see what it should look like.

I started off making a sphere in OpenSCAD, and used Inkscape to trace a
bitmap using the picture. I then imported the trace.

Attached is the OpenSCAD file that I have so far.

I'm am at a loss to figure out what to do next.

What I am trying to do is to make the upper right corner of the main
handle 11.5 mm high, and have it taper down to about 5mm high, centred
on the sphere,and maintaining a rounded edge.

My first problem is that I can't seem to linear_extrude the figure to
11.5mm. I have tried extruding the figure itself, before applying
projection(), but could not make that work.

I get the feeling that the right thing to do would be to use sweep()
following the path from the upper right to lower left corners, while
decreasing the height. Unfortunately, sweep() just baffles me.

If you comment out the '//left(47) fwd(16)' you'll see where I want the
end result to be.

Any guidance would be appreciated.

I am trying to replicate a handle for a metal measuring cup that is designed to look like a saucepan. Attached is a picture of the handle. It's broken, but there's enough of it left to let me see what it should look like. I started off making a sphere in OpenSCAD, and used Inkscape to trace a bitmap using the picture. I then imported the trace. Attached is the OpenSCAD file that I have so far. I'm am at a loss to figure out what to do next. What I am trying to do is to make the upper right corner of the main handle 11.5 mm high, and have it taper down to about 5mm high, centred on the sphere,and maintaining a rounded edge. My first problem is that I can't seem to linear_extrude the figure to 11.5mm. I have tried extruding the figure itself, before applying projection(), but could not make that work. I get the feeling that the right thing to do would be to use sweep() following the path from the upper right to lower left corners, while decreasing the height. Unfortunately, sweep() just baffles me. If you comment out the '//left(47) fwd(16)' you'll see where I want the end result to be. Any guidance would be appreciated.
HJ
Hugo Jackson
Tue, May 21, 2024 7:17 AM

it would be helpful if you attached del-pic.svg

On May 20, 2024, at 9:16 PM, larry via Discuss discuss@lists.openscad.org wrote:

I am trying to replicate a handle for a metal measuring cup that is
designed to look like a saucepan.

Attached is a picture of the handle. It's broken, but there's enough of
it left to let me see what it should look like.

I started off making a sphere in OpenSCAD, and used Inkscape to trace a
bitmap using the picture. I then imported the trace.

Attached is the OpenSCAD file that I have so far.

I'm am at a loss to figure out what to do next.

What I am trying to do is to make the upper right corner of the main
handle 11.5 mm high, and have it taper down to about 5mm high, centred
on the sphere,and maintaining a rounded edge.

My first problem is that I can't seem to linear_extrude the figure to
11.5mm. I have tried extruding the figure itself, before applying
projection(), but could not make that work.

I get the feeling that the right thing to do would be to use sweep()
following the path from the upper right to lower left corners, while
decreasing the height. Unfortunately, sweep() just baffles me.

If you comment out the '//left(47) fwd(16)' you'll see where I want the
end result to be.

Any guidance would be appreciated.
<del-pic.png><del-pot-handle.scad>_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

it would be helpful if you attached del-pic.svg > On May 20, 2024, at 9:16 PM, larry via Discuss <discuss@lists.openscad.org> wrote: > > I am trying to replicate a handle for a metal measuring cup that is > designed to look like a saucepan. > > Attached is a picture of the handle. It's broken, but there's enough of > it left to let me see what it should look like. > > I started off making a sphere in OpenSCAD, and used Inkscape to trace a > bitmap using the picture. I then imported the trace. > > Attached is the OpenSCAD file that I have so far. > > I'm am at a loss to figure out what to do next. > > What I am trying to do is to make the upper right corner of the main > handle 11.5 mm high, and have it taper down to about 5mm high, centred > on the sphere,and maintaining a rounded edge. > > My first problem is that I can't seem to linear_extrude the figure to > 11.5mm. I have tried extruding the figure itself, before applying > projection(), but could not make that work. > > I get the feeling that the right thing to do would be to use sweep() > following the path from the upper right to lower left corners, while > decreasing the height. Unfortunately, sweep() just baffles me. > > If you comment out the '//left(47) fwd(16)' you'll see where I want the > end result to be. > > Any guidance would be appreciated. > <del-pic.png><del-pot-handle.scad>_______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
MP
Marcus Poller
Tue, May 21, 2024 10:19 AM

When you import an svg, you will get a 2d shape. When you linear_extrude() it, you will go from 2d to 3d. When you projection(), you will go from 3d to 2d. You will end up where you started.

What is the intention of

projection() linear_extrude() import("svg.svg")

?

You will likely send your dev-pic.svg; As a general advice: Traced bitmaps may contain a lot of corners. I tried tracing dev-pic.png in Inkscape - it containes a lot of noise on the white background and your target shape ends up hollow. So I repainted the outline with Inkscapes primitives (sphere, rectangle, path->union) as well as a few corners moved by hand. You may use it if you like it. It is attached.

Cheers,
Marcus

When you import an svg, you will get a 2d shape. When you linear_extrude() it, you will go from 2d to 3d. When you projection(), you will go from 3d to 2d. You will end up where you started. What is the intention of projection() linear_extrude() import("svg.svg") ? You will likely send your dev-pic.svg; As a general advice: Traced bitmaps may contain *a lot* of corners. I tried tracing dev-pic.png in Inkscape - it containes a lot of noise on the white background and your target shape ends up hollow. So I repainted the outline with Inkscapes primitives (sphere, rectangle, path->union) as well as a few corners moved by hand. You may use it if you like it. It is attached. Cheers, Marcus
GH
gene heskett
Tue, May 21, 2024 12:35 PM

On 5/21/24 01:58, larry via Discuss wrote:

I am trying to replicate a handle for a metal measuring cup that is
designed to look like a saucepan.

Attached is a picture of the handle. It's broken, but there's enough of
it left to let me see what it should look like.

I started off making a sphere in OpenSCAD, and used Inkscape to trace a
bitmap using the picture. I then imported the trace.

Attached is the OpenSCAD file that I have so far.

I'm am at a loss to figure out what to do next.

What I am trying to do is to make the upper right corner of the main
handle 11.5 mm high, and have it taper down to about 5mm high, centred
on the sphere,and maintaining a rounded edge.

My first problem is that I can't seem to linear_extrude the figure to
11.5mm. I have tried extruding the figure itself, before applying
projection(), but could not make that work.

I get the feeling that the right thing to do would be to use sweep()
following the path from the upper right to lower left corners, while
decreasing the height. Unfortunately, sweep() just baffles me.

If you comment out the '//left(47) fwd(16)' you'll see where I want the
end result to be.

Any guidance would be appreciated.

Linuxcnc has the concept of what we call nurbs, where it draws an
artistic curve that encompasses a list of points it is to hit. If we
have a library that can do that, it might be able to do this. A 3d
scanner would be helpful too. In fact I think I'd try that first.


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/21/24 01:58, larry via Discuss wrote: > I am trying to replicate a handle for a metal measuring cup that is > designed to look like a saucepan. > > Attached is a picture of the handle. It's broken, but there's enough of > it left to let me see what it should look like. > > I started off making a sphere in OpenSCAD, and used Inkscape to trace a > bitmap using the picture. I then imported the trace. > > Attached is the OpenSCAD file that I have so far. > > I'm am at a loss to figure out what to do next. > > What I am trying to do is to make the upper right corner of the main > handle 11.5 mm high, and have it taper down to about 5mm high, centred > on the sphere,and maintaining a rounded edge. > > My first problem is that I can't seem to linear_extrude the figure to > 11.5mm. I have tried extruding the figure itself, before applying > projection(), but could not make that work. > > I get the feeling that the right thing to do would be to use sweep() > following the path from the upper right to lower left corners, while > decreasing the height. Unfortunately, sweep() just baffles me. > > If you comment out the '//left(47) fwd(16)' you'll see where I want the > end result to be. > > Any guidance would be appreciated. > Linuxcnc has the concept of what we call nurbs, where it draws an artistic curve that encompasses a list of points it is to hit. If we have a library that can do that, it might be able to do this. A 3d scanner would be helpful too. In fact I think I'd try that first. > > _______________________________________________ > 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
L
larry
Tue, May 21, 2024 9:00 PM

On Tue, 2024-05-21 at 12:19 +0200, Marcus Poller wrote:

When you import an svg, you will get a 2d shape. When you
linear_extrude() it, you will go from 2d to 3d. When you
projection(), you will go from 3d to 2d. You will end up where you
started.
What is the intention of
    projection() linear_extrude() import("svg.svg")
?

It was the only way I could get ANY linear extrusion at all. However,
after reading your post and trying the files you provided, I found my
error.

I had the scale and linear_extrude switched, so it did the
linear_extrude, but the amount of the extrusion made it look like a 2D
object.

So now it looks like:

linear_extrude(11.5) scale([.097,.097,0])
# import("/media/larry/Modata/make/3d/OpenSCAD/del-pic2.svg");

Thank you very much for pointing out the problem with 'trace bitmap'.
I will now just import the image to Inkscape and use bezier curves to
'trace' the picture, delete the bitmap, resize the path, and save it
for importing to OpenSCAD.

Being fully confident that I can do that, I now come back to my main
question; how can I make the upper right corner start off the same
height and rounded like the cylinder, then moving along the path of the
figure counter-clockwise, smoothly decrease the height to about 7mm?

You will likely send your dev-pic.svg; As a general advice: Traced
bitmaps may contain a lot of corners. I tried tracing dev-pic.png
in Inkscape - it containes a lot of noise on the white background and
your target shape ends up hollow. So I repainted the outline with
Inkscapes primitives (sphere, rectangle, path->union) as well as a
few corners moved by hand. You may use it if you like it. It is
attached.

Cheers,
Marcus

On Tue, 2024-05-21 at 12:19 +0200, Marcus Poller wrote: > When you import an svg, you will get a 2d shape. When you > linear_extrude() it, you will go from 2d to 3d. When you > projection(), you will go from 3d to 2d. You will end up where you > started. > What is the intention of >     projection() linear_extrude() import("svg.svg") > ? It was the only way I could get ANY linear extrusion at all. However, after reading your post and trying the files you provided, I found my error. I had the scale and linear_extrude switched, so it did the linear_extrude, but the amount of the extrusion made it look like a 2D object. So now it looks like: linear_extrude(11.5) scale([.097,.097,0]) # import("/media/larry/Modata/make/3d/OpenSCAD/del-pic2.svg"); Thank you very much for pointing out the problem with 'trace bitmap'. I will now just import the image to Inkscape and use bezier curves to 'trace' the picture, delete the bitmap, resize the path, and save it for importing to OpenSCAD. Being fully confident that I can do that, I now come back to my main question; how can I make the upper right corner start off the same height and rounded like the cylinder, then moving along the path of the figure counter-clockwise, smoothly decrease the height to about 7mm? > You will likely send your dev-pic.svg; As a general advice: Traced > bitmaps may contain *a lot* of corners. I tried tracing dev-pic.png > in Inkscape - it containes a lot of noise on the white background and > your target shape ends up hollow. So I repainted the outline with > Inkscapes primitives (sphere, rectangle, path->union) as well as a > few corners moved by hand. You may use it if you like it. It is > attached. > > Cheers, > Marcus > >
JB
Jordan Brown
Tue, May 21, 2024 9:09 PM

I would think in terms of joining together a number of Bézier patches,
but it wouldn't be fun.

https://github.com/BelfrySCAD/BOSL2/wiki/Topics#bezier-patches

I would think in terms of joining together a number of Bézier patches, but it wouldn't be fun. https://github.com/BelfrySCAD/BOSL2/wiki/Topics#bezier-patches
AM
Adrian Mariano
Wed, May 22, 2024 12:42 AM

It seems like you could get a shape somewhat like that by using a
path_sweep with a scale argument to shrink it in one axis along its
length.  You might be able to even get the rounding at the rounded end by
scaling down at that end as well if you give a scale at every point in the
path.

On Tue, May 21, 2024 at 5:14 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:

I would think in terms of joining together a number of Bézier patches, but
it wouldn't be fun.

https://github.com/BelfrySCAD/BOSL2/wiki/Topics#bezier-patches


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

It seems like you could get a shape somewhat like that by using a path_sweep with a scale argument to shrink it in one axis along its length. You might be able to even get the rounding at the rounded end by scaling down at that end as well if you give a scale at every point in the path. On Tue, May 21, 2024 at 5:14 PM Jordan Brown via Discuss < discuss@lists.openscad.org> wrote: > I would think in terms of joining together a number of Bézier patches, but > it wouldn't be fun. > > https://github.com/BelfrySCAD/BOSL2/wiki/Topics#bezier-patches > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
MP
Marcus Poller
Wed, May 22, 2024 9:51 AM

Dear Larry,

Being fully confident that I can do that, I now come back to my main
question; how can I make the upper right corner start off the same
height and rounded like the cylinder, then moving along the path of the
figure counter-clockwise, smoothly decrease the height to about 7mm?

It is not obvious to me  what the final shape is supposed to look like.
It is not clear to me from the picture where the handle attaches to its pot.
Maybe you care about other properties such as printing on an FDM printer, in which case a flat surface for the printing bed would be required.

If you want to have a functioning handle, use a cylinder.
If you want to have a fancy rounded surface item, draw a through-cut surface. Use this surface with

hull()

I attached an example of that approach. The cut-through-surface is called

droplet()

I modelled the handle as two half ellipsis.
Even the circular cylinder-like-shape can be approximated with hull() oder minkowski().

You need to supply what properties are important to you (needs to attach to pot with screw size X at point y, I fear scratching my palm when touching the handle close to the screw) and then simplify the object as much as possible.

WARNING: handle.scad is very CPU intense, try handle2.scad first!

Cheers,
Marcus

Dear Larry, > Being fully confident that I can do that, I now come back to my main > question; how can I make the upper right corner start off the same > height and rounded like the cylinder, then moving along the path of the > figure counter-clockwise, smoothly decrease the height to about 7mm? It is not obvious to me what the final shape is supposed to look like. It is not clear to me from the picture where the handle attaches to its pot. Maybe you care about other properties such as printing on an FDM printer, in which case a flat surface for the printing bed would be required. If you want to have a functioning handle, use a cylinder. If you want to have a fancy rounded surface item, draw a through-cut surface. Use this surface with hull() I attached an example of that approach. The cut-through-surface is called droplet() I modelled the handle as two half ellipsis. Even the circular cylinder-like-shape can be approximated with hull() oder minkowski(). You need to supply what properties are important to you (needs to attach to pot with screw size X at point y, I fear scratching my palm when touching the handle close to the screw) and then simplify the object as much as possible. WARNING: handle.scad is very CPU intense, try handle2.scad first! Cheers, Marcus
HK
Hilbrand Klaver Gmail
Wed, May 22, 2024 10:24 AM

Dear gents,

For "soft" shapes like these I make use of a hullSeries() module to do
hull() operations stepwise.

Maybe of use.

Regards

Hilbrand

On 22-May-24 11:51 AM, Marcus Poller via Discuss wrote:

Dear Larry,

Being fully confident that I can do that, I now come back to my main
question; how can I make the upper right corner start off the same
height and rounded like the cylinder, then moving along the path of the
figure counter-clockwise, smoothly decrease the height to about 7mm?

It is not obvious to me  what the final shape is supposed to look like.
It is not clear to me from the picture where the handle attaches to its pot.
Maybe you care about other properties such as printing on an FDM printer, in which case a flat surface for the printing bed would be required.

If you want to have a functioning handle, use a cylinder.
If you want to have a fancy rounded surface item, draw a through-cut surface. Use this surface with

  hull()

I attached an example of that approach. The cut-through-surface is called

  droplet()

I modelled the handle as two half ellipsis.
Even the circular cylinder-like-shape can be approximated with hull() oder minkowski().

You need to supply what properties are important to you (needs to attach to pot with screw size X at point y, I fear scratching my palm when touching the handle close to the screw) and then simplify the object as much as possible.

WARNING: handle.scad is very CPU intense, try handle2.scad first!

Cheers,
Marcus


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

Dear gents, For "soft" shapes like these I make use of a hullSeries() module to do hull() operations stepwise. Maybe of use. Regards Hilbrand On 22-May-24 11:51 AM, Marcus Poller via Discuss wrote: > Dear Larry, > >> Being fully confident that I can do that, I now come back to my main >> question; how can I make the upper right corner start off the same >> height and rounded like the cylinder, then moving along the path of the >> figure counter-clockwise, smoothly decrease the height to about 7mm? > It is not obvious to me what the final shape is supposed to look like. > It is not clear to me from the picture where the handle attaches to its pot. > Maybe you care about other properties such as printing on an FDM printer, in which case a flat surface for the printing bed would be required. > > If you want to have a functioning handle, use a cylinder. > If you want to have a fancy rounded surface item, draw a through-cut surface. Use this surface with > > hull() > > I attached an example of that approach. The cut-through-surface is called > > droplet() > > I modelled the handle as two half ellipsis. > Even the circular cylinder-like-shape can be approximated with hull() oder minkowski(). > > You need to supply what properties are important to you (needs to attach to pot with screw size X at point y, I fear scratching my palm when touching the handle close to the screw) and then simplify the object as much as possible. > > WARNING: handle.scad is very CPU intense, try handle2.scad first! > > Cheers, > Marcus > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
L
larry
Thu, May 23, 2024 7:21 PM

On Wed, 2024-05-22 at 11:51 +0200, Marcus Poller wrote:

It is not obvious to me  what the final shape is supposed to look
like.

It is not clear to me from the picture where the handle attaches to
its pot.

In handle1.jpg, there are two holes. They are 41mm apart. This is not a
pot for cooking, but is a 1 cup measuring cup. The left hole takes a
metal ring to act as a hanger, and the right hole had a rivet to attach
to a tang on the metal 'pot'. I'll be using a very short 3 or 4mm
screw, and possibly a nut. A rectangular cavity at the screw end will
take the tang.

Maybe you care about other properties such as printing on an FDM
printer, in which case a flat surface for the printing bed would be
required.

I will be making the edge to the right of the rivet hole flat, which
will print just fine with a brim.

If you want to have a functioning handle, use a cylinder.

I'd like to replicate the original as close as possible. It has
sentimental value for the one I am making it for.

I was hoping to use path-sweep() to generate the part to be attached to
the cylinder, and I (finally) realized that my initial idea was wrong,
and that I need to use a profile that scales from the cylinder to the
screw end.

Here's a profile that (when scaled), should do the trick.


include <BOSL2/std.scad>
$fn=60;

projection()
hull() {
  sphere(6);
  right(24) sphere(4);
}

However, I am at a loss as to how I can generate the path.

Thanks for the help.

On Wed, 2024-05-22 at 11:51 +0200, Marcus Poller wrote: > It is not obvious to me  what the final shape is supposed to look > like. > It is not clear to me from the picture where the handle attaches to > its pot. In handle1.jpg, there are two holes. They are 41mm apart. This is not a pot for cooking, but is a 1 cup measuring cup. The left hole takes a metal ring to act as a hanger, and the right hole had a rivet to attach to a tang on the metal 'pot'. I'll be using a very short 3 or 4mm screw, and possibly a nut. A rectangular cavity at the screw end will take the tang. > Maybe you care about other properties such as printing on an FDM > printer, in which case a flat surface for the printing bed would be > required. I will be making the edge to the right of the rivet hole flat, which will print just fine with a brim. > If you want to have a functioning handle, use a cylinder. I'd like to replicate the original as close as possible. It has sentimental value for the one I am making it for. I was hoping to use path-sweep() to generate the part to be attached to the cylinder, and I (finally) realized that my initial idea was wrong, and that I need to use a profile that scales from the cylinder to the screw end. Here's a profile that (when scaled), should do the trick. --------- include <BOSL2/std.scad> $fn=60; projection() hull() {   sphere(6);   right(24) sphere(4); } However, I am at a loss as to how I can generate the path. Thanks for the help.