discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

example of fillets

SP
Sanjeev Prabhakar
Sat, Jan 22, 2022 3:35 PM

I have written a few functions which create fillets between 2 intersecting
solids.
It is showing a lot of warnings but it still works and renders
need confirmation in case this works on other systems as well.
I have macbook air M1 and 20220.1.21 version of OpenSCAD

I have written a few functions which create fillets between 2 intersecting solids. It is showing a lot of warnings but it still works and renders need confirmation in case this works on other systems as well. I have macbook air M1 and 20220.1.21 version of OpenSCAD
AM
Adrian Mariano
Sat, Jan 22, 2022 4:24 PM

The fillets looks nice.  How does your code work and what can it
actually do?  What are its limitations?  It looks like there is a
sphere-sphere routine and a cylinder-cylinder routine?  You might
consider a more readable and documented coding style for your
libraries if you are going to give your code to others.  Having all
your top level functions be cryptic 2 and 3 letter names makes it hard
to even guess what's going on.

The fillet connecting the U-shaped beam to the sphere is missing a row.

Also, I think the tons of warnings are slowing your code down quite a
bit.  It would be a significant improvement if the code didn't
generate warnings.  I strongly encourage you to do the following:  Go
to Preferences->Advanced and select "Stop on first warning", near the
bottom of the list.  This turns warnings into fatal errors and will
force you to fix the warnings.  It also makes it easier to fix them
since you don't get 200 warnings any more, just the first one.

On Sat, Jan 22, 2022 at 10:54 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I have written a few functions which create fillets between 2 intersecting solids.
It is showing a lot of warnings but it still works and renders
need confirmation in case this works on other systems as well.
I have macbook air M1 and 20220.1.21 version of OpenSCAD


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

The fillets looks nice. How does your code work and what can it actually do? What are its limitations? It looks like there is a sphere-sphere routine and a cylinder-cylinder routine? You might consider a more readable and documented coding style for your libraries if you are going to give your code to others. Having all your top level functions be cryptic 2 and 3 letter names makes it hard to even guess what's going on. The fillet connecting the U-shaped beam to the sphere is missing a row. Also, I think the tons of warnings are slowing your code down quite a bit. It would be a significant improvement if the code didn't generate warnings. I strongly encourage you to do the following: Go to Preferences->Advanced and select "Stop on first warning", near the bottom of the list. This turns warnings into fatal errors and will force you to fix the warnings. It also makes it easier to fix them since you don't get 200 warnings any more, just the first one. On Sat, Jan 22, 2022 at 10:54 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > I have written a few functions which create fillets between 2 intersecting solids. > It is showing a lot of warnings but it still works and renders > need confirmation in case this works on other systems as well. > I have macbook air M1 and 20220.1.21 version of OpenSCAD > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Sat, Jan 22, 2022 4:58 PM

Thank you so much for your kind suggestions.
I will try and improve on code readability and also the warning thing

Limitation of the function "ipf (intersection point for fillets)"  is when
the intersection angle is near parallel between the 2
intersecting solids, it doesn't work.
Logic used:
First identify the intersection point between the 2 solids (first one is
the solid which is intersected with and the 2nd one intersecting the first
one).
from these points trace the points and create the fillets.
I have tried in few cases and most of the cases it worked, where the
intersection lines are making an angle which is greater than 20 deg, best
would be 90 deg.

On Sat, 22 Jan 2022, 21:54 Adrian Mariano, avm4@cornell.edu wrote:

The fillets looks nice.  How does your code work and what can it
actually do?  What are its limitations?  It looks like there is a
sphere-sphere routine and a cylinder-cylinder routine?  You might
consider a more readable and documented coding style for your
libraries if you are going to give your code to others.  Having all
your top level functions be cryptic 2 and 3 letter names makes it hard
to even guess what's going on.

The fillet connecting the U-shaped beam to the sphere is missing a row.

Also, I think the tons of warnings are slowing your code down quite a
bit.  It would be a significant improvement if the code didn't
generate warnings.  I strongly encourage you to do the following:  Go
to Preferences->Advanced and select "Stop on first warning", near the
bottom of the list.  This turns warnings into fatal errors and will
force you to fix the warnings.  It also makes it easier to fix them
since you don't get 200 warnings any more, just the first one.

On Sat, Jan 22, 2022 at 10:54 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I have written a few functions which create fillets between 2

intersecting solids.

It is showing a lot of warnings but it still works and renders
need confirmation in case this works on other systems as well.
I have macbook air M1 and 20220.1.21 version of OpenSCAD


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

Thank you so much for your kind suggestions. I will try and improve on code readability and also the warning thing Limitation of the function "ipf (intersection point for fillets)" is when the intersection angle is near parallel between the 2 intersecting solids, it doesn't work. Logic used: First identify the intersection point between the 2 solids (first one is the solid which is intersected with and the 2nd one intersecting the first one). from these points trace the points and create the fillets. I have tried in few cases and most of the cases it worked, where the intersection lines are making an angle which is greater than 20 deg, best would be 90 deg. On Sat, 22 Jan 2022, 21:54 Adrian Mariano, <avm4@cornell.edu> wrote: > The fillets looks nice. How does your code work and what can it > actually do? What are its limitations? It looks like there is a > sphere-sphere routine and a cylinder-cylinder routine? You might > consider a more readable and documented coding style for your > libraries if you are going to give your code to others. Having all > your top level functions be cryptic 2 and 3 letter names makes it hard > to even guess what's going on. > > The fillet connecting the U-shaped beam to the sphere is missing a row. > > Also, I think the tons of warnings are slowing your code down quite a > bit. It would be a significant improvement if the code didn't > generate warnings. I strongly encourage you to do the following: Go > to Preferences->Advanced and select "Stop on first warning", near the > bottom of the list. This turns warnings into fatal errors and will > force you to fix the warnings. It also makes it easier to fix them > since you don't get 200 warnings any more, just the first one. > > On Sat, Jan 22, 2022 at 10:54 AM Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > > > I have written a few functions which create fillets between 2 > intersecting solids. > > It is showing a lot of warnings but it still works and renders > > need confirmation in case this works on other systems as well. > > I have macbook air M1 and 20220.1.21 version of OpenSCAD > > > > > > _______________________________________________ > > 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
Sat, Jan 22, 2022 5:11 PM

I was looking more closely at the fillet between the U-bar and sphere,
and it appears that there is a funny irregularity.  I'm not sure what
is going on, but it looks like there is a jagged top edge and some
non-smooth areas on the fillet.  Perhaps the faces are being defined
incorrectly with an off-by-one error?  (Maybe this explains so many
warnings.)  I attach a picture showing the fillet by itself below.

Can you make a connection between two arbitrary prisms?  (Seems like
the base prism would need to be convex.)  I'm intrigued by this.  It
may inspire me to write something of my own.  In principle a parallel
connection is OK---the fillet is a trivial straight line segment.
It's when you have no connection that you're really in trouble.

On Sat, Jan 22, 2022 at 11:58 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

Thank you so much for your kind suggestions.
I will try and improve on code readability and also the warning thing

Limitation of the function "ipf (intersection point for fillets)"  is when the intersection angle is near parallel between the 2 intersecting solids, it doesn't work.
Logic used:
First identify the intersection point between the 2 solids (first one is the solid which is intersected with and the 2nd one intersecting the first one).
from these points trace the points and create the fillets.
I have tried in few cases and most of the cases it worked, where the intersection lines are making an angle which is greater than 20 deg, best would be 90 deg.

On Sat, 22 Jan 2022, 21:54 Adrian Mariano, avm4@cornell.edu wrote:

The fillets looks nice.  How does your code work and what can it
actually do?  What are its limitations?  It looks like there is a
sphere-sphere routine and a cylinder-cylinder routine?  You might
consider a more readable and documented coding style for your
libraries if you are going to give your code to others.  Having all
your top level functions be cryptic 2 and 3 letter names makes it hard
to even guess what's going on.

The fillet connecting the U-shaped beam to the sphere is missing a row.

Also, I think the tons of warnings are slowing your code down quite a
bit.  It would be a significant improvement if the code didn't
generate warnings.  I strongly encourage you to do the following:  Go
to Preferences->Advanced and select "Stop on first warning", near the
bottom of the list.  This turns warnings into fatal errors and will
force you to fix the warnings.  It also makes it easier to fix them
since you don't get 200 warnings any more, just the first one.

On Sat, Jan 22, 2022 at 10:54 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I have written a few functions which create fillets between 2 intersecting solids.
It is showing a lot of warnings but it still works and renders
need confirmation in case this works on other systems as well.
I have macbook air M1 and 20220.1.21 version of OpenSCAD


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 was looking more closely at the fillet between the U-bar and sphere, and it appears that there is a funny irregularity. I'm not sure what is going on, but it looks like there is a jagged top edge and some non-smooth areas on the fillet. Perhaps the faces are being defined incorrectly with an off-by-one error? (Maybe this explains so many warnings.) I attach a picture showing the fillet by itself below. Can you make a connection between two arbitrary prisms? (Seems like the base prism would need to be convex.) I'm intrigued by this. It may inspire me to write something of my own. In principle a parallel connection is OK---the fillet is a trivial straight line segment. It's when you have *no* connection that you're really in trouble. On Sat, Jan 22, 2022 at 11:58 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > Thank you so much for your kind suggestions. > I will try and improve on code readability and also the warning thing > > Limitation of the function "ipf (intersection point for fillets)" is when the intersection angle is near parallel between the 2 intersecting solids, it doesn't work. > Logic used: > First identify the intersection point between the 2 solids (first one is the solid which is intersected with and the 2nd one intersecting the first one). > from these points trace the points and create the fillets. > I have tried in few cases and most of the cases it worked, where the intersection lines are making an angle which is greater than 20 deg, best would be 90 deg. > > > > > On Sat, 22 Jan 2022, 21:54 Adrian Mariano, <avm4@cornell.edu> wrote: >> >> The fillets looks nice. How does your code work and what can it >> actually do? What are its limitations? It looks like there is a >> sphere-sphere routine and a cylinder-cylinder routine? You might >> consider a more readable and documented coding style for your >> libraries if you are going to give your code to others. Having all >> your top level functions be cryptic 2 and 3 letter names makes it hard >> to even guess what's going on. >> >> The fillet connecting the U-shaped beam to the sphere is missing a row. >> >> Also, I think the tons of warnings are slowing your code down quite a >> bit. It would be a significant improvement if the code didn't >> generate warnings. I strongly encourage you to do the following: Go >> to Preferences->Advanced and select "Stop on first warning", near the >> bottom of the list. This turns warnings into fatal errors and will >> force you to fix the warnings. It also makes it easier to fix them >> since you don't get 200 warnings any more, just the first one. >> >> On Sat, Jan 22, 2022 at 10:54 AM Sanjeev Prabhakar >> <sprabhakar2006@gmail.com> wrote: >> > >> > I have written a few functions which create fillets between 2 intersecting solids. >> > It is showing a lot of warnings but it still works and renders >> > need confirmation in case this works on other systems as well. >> > I have macbook air M1 and 20220.1.21 version of OpenSCAD >> > >> > >> > _______________________________________________ >> > 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
SP
Sanjeev Prabhakar
Sun, Jan 23, 2022 12:36 AM

I have checked the jagged lines.
It may be due to angle between the 2 prisms at this location.
when you replace "z210" with "z180" in line number 8, these jagged lines go
away.
when you make it "z250", this becomes worse.
May be it is related to finding the intersection points correcly

On Sat, 22 Jan 2022 at 22:41, Adrian Mariano avm4@cornell.edu wrote:

I was looking more closely at the fillet between the U-bar and sphere,
and it appears that there is a funny irregularity.  I'm not sure what
is going on, but it looks like there is a jagged top edge and some
non-smooth areas on the fillet.  Perhaps the faces are being defined
incorrectly with an off-by-one error?  (Maybe this explains so many
warnings.)  I attach a picture showing the fillet by itself below.

Can you make a connection between two arbitrary prisms?  (Seems like
the base prism would need to be convex.)  I'm intrigued by this.  It
may inspire me to write something of my own.  In principle a parallel
connection is OK---the fillet is a trivial straight line segment.
It's when you have no connection that you're really in trouble.

On Sat, Jan 22, 2022 at 11:58 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

Thank you so much for your kind suggestions.
I will try and improve on code readability and also the warning thing

Limitation of the function "ipf (intersection point for fillets)"  is

when the intersection angle is near parallel between the 2 intersecting
solids, it doesn't work.

Logic used:
First identify the intersection point between the 2 solids (first one is

the solid which is intersected with and the 2nd one intersecting the first
one).

from these points trace the points and create the fillets.
I have tried in few cases and most of the cases it worked, where the

intersection lines are making an angle which is greater than 20 deg, best
would be 90 deg.

I have checked the jagged lines. It may be due to angle between the 2 prisms at this location. when you replace "z210" with "z180" in line number 8, these jagged lines go away. when you make it "z250", this becomes worse. May be it is related to finding the intersection points correcly On Sat, 22 Jan 2022 at 22:41, Adrian Mariano <avm4@cornell.edu> wrote: > I was looking more closely at the fillet between the U-bar and sphere, > and it appears that there is a funny irregularity. I'm not sure what > is going on, but it looks like there is a jagged top edge and some > non-smooth areas on the fillet. Perhaps the faces are being defined > incorrectly with an off-by-one error? (Maybe this explains so many > warnings.) I attach a picture showing the fillet by itself below. > > Can you make a connection between two arbitrary prisms? (Seems like > the base prism would need to be convex.) I'm intrigued by this. It > may inspire me to write something of my own. In principle a parallel > connection is OK---the fillet is a trivial straight line segment. > It's when you have *no* connection that you're really in trouble. > > On Sat, Jan 22, 2022 at 11:58 AM Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > > > Thank you so much for your kind suggestions. > > I will try and improve on code readability and also the warning thing > > > > Limitation of the function "ipf (intersection point for fillets)" is > when the intersection angle is near parallel between the 2 intersecting > solids, it doesn't work. > > Logic used: > > First identify the intersection point between the 2 solids (first one is > the solid which is intersected with and the 2nd one intersecting the first > one). > > from these points trace the points and create the fillets. > > I have tried in few cases and most of the cases it worked, where the > intersection lines are making an angle which is greater than 20 deg, best > would be 90 deg. > > > >
SP
Sanjeev Prabhakar
Sun, Jan 23, 2022 1:23 AM

you can see the difference between intersection points at various angles
with following line
color("magenta")points(ip(prism1,prism),.5);

"ip" is the function that captures the intersection points between the 2
prisms.

On Sun, 23 Jan 2022 at 06:06, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I have checked the jagged lines.
It may be due to angle between the 2 prisms at this location.
when you replace "z210" with "z180" in line number 8, these jagged lines
go away.
when you make it "z250", this becomes worse.
May be it is related to finding the intersection points correcly

On Sat, 22 Jan 2022 at 22:41, Adrian Mariano avm4@cornell.edu wrote:

I was looking more closely at the fillet between the U-bar and sphere,
and it appears that there is a funny irregularity.  I'm not sure what
is going on, but it looks like there is a jagged top edge and some
non-smooth areas on the fillet.  Perhaps the faces are being defined
incorrectly with an off-by-one error?  (Maybe this explains so many
warnings.)  I attach a picture showing the fillet by itself below.

Can you make a connection between two arbitrary prisms?  (Seems like
the base prism would need to be convex.)  I'm intrigued by this.  It
may inspire me to write something of my own.  In principle a parallel
connection is OK---the fillet is a trivial straight line segment.
It's when you have no connection that you're really in trouble.

On Sat, Jan 22, 2022 at 11:58 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

Thank you so much for your kind suggestions.
I will try and improve on code readability and also the warning thing

Limitation of the function "ipf (intersection point for fillets)"  is

when the intersection angle is near parallel between the 2 intersecting
solids, it doesn't work.

Logic used:
First identify the intersection point between the 2 solids (first one

is the solid which is intersected with and the 2nd one intersecting the
first one).

from these points trace the points and create the fillets.
I have tried in few cases and most of the cases it worked, where the

intersection lines are making an angle which is greater than 20 deg, best
would be 90 deg.

you can see the difference between intersection points at various angles with following line color("magenta")points(ip(prism1,prism),.5); "ip" is the function that captures the intersection points between the 2 prisms. On Sun, 23 Jan 2022 at 06:06, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I have checked the jagged lines. > It may be due to angle between the 2 prisms at this location. > when you replace "z210" with "z180" in line number 8, these jagged lines > go away. > when you make it "z250", this becomes worse. > May be it is related to finding the intersection points correcly > > On Sat, 22 Jan 2022 at 22:41, Adrian Mariano <avm4@cornell.edu> wrote: > >> I was looking more closely at the fillet between the U-bar and sphere, >> and it appears that there is a funny irregularity. I'm not sure what >> is going on, but it looks like there is a jagged top edge and some >> non-smooth areas on the fillet. Perhaps the faces are being defined >> incorrectly with an off-by-one error? (Maybe this explains so many >> warnings.) I attach a picture showing the fillet by itself below. >> >> Can you make a connection between two arbitrary prisms? (Seems like >> the base prism would need to be convex.) I'm intrigued by this. It >> may inspire me to write something of my own. In principle a parallel >> connection is OK---the fillet is a trivial straight line segment. >> It's when you have *no* connection that you're really in trouble. >> >> On Sat, Jan 22, 2022 at 11:58 AM Sanjeev Prabhakar >> <sprabhakar2006@gmail.com> wrote: >> > >> > Thank you so much for your kind suggestions. >> > I will try and improve on code readability and also the warning thing >> > >> > Limitation of the function "ipf (intersection point for fillets)" is >> when the intersection angle is near parallel between the 2 intersecting >> solids, it doesn't work. >> > Logic used: >> > First identify the intersection point between the 2 solids (first one >> is the solid which is intersected with and the 2nd one intersecting the >> first one). >> > from these points trace the points and create the fillets. >> > I have tried in few cases and most of the cases it worked, where the >> intersection lines are making an angle which is greater than 20 deg, best >> would be 90 deg. >> > >> >>
AM
Adrian Mariano
Sun, Jan 23, 2022 2:16 AM

The jagged lines don't go away, exactly.  They move somewhere else.
They seem to be related to having two intersection points very close
to each other.  I thought some about how to design a fillet between a
cylinder and arbitrary prism and it's not obvious to me how to do it,
Such a fillet would naturally be created by offsetting the prism
cross section, but it seems like it needs to offset different amount
in different directions if the fillet is supposed to have a continuous
derivative.  Once you obtain the intersection of the prism with the
cylinder, say, how do you use that intersection to build the fillet?

On Sat, Jan 22, 2022 at 8:24 PM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

you can see the difference between intersection points at various angles with following line
color("magenta")points(ip(prism1,prism),.5);

"ip" is the function that captures the intersection points between the 2 prisms.

On Sun, 23 Jan 2022 at 06:06, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:

I have checked the jagged lines.
It may be due to angle between the 2 prisms at this location.
when you replace "z210" with "z180" in line number 8, these jagged lines go away.
when you make it "z250", this becomes worse.
May be it is related to finding the intersection points correcly

On Sat, 22 Jan 2022 at 22:41, Adrian Mariano avm4@cornell.edu wrote:

I was looking more closely at the fillet between the U-bar and sphere,
and it appears that there is a funny irregularity.  I'm not sure what
is going on, but it looks like there is a jagged top edge and some
non-smooth areas on the fillet.  Perhaps the faces are being defined
incorrectly with an off-by-one error?  (Maybe this explains so many
warnings.)  I attach a picture showing the fillet by itself below.

Can you make a connection between two arbitrary prisms?  (Seems like
the base prism would need to be convex.)  I'm intrigued by this.  It
may inspire me to write something of my own.  In principle a parallel
connection is OK---the fillet is a trivial straight line segment.
It's when you have no connection that you're really in trouble.

On Sat, Jan 22, 2022 at 11:58 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

Thank you so much for your kind suggestions.
I will try and improve on code readability and also the warning thing

Limitation of the function "ipf (intersection point for fillets)"  is when the intersection angle is near parallel between the 2 intersecting solids, it doesn't work.
Logic used:
First identify the intersection point between the 2 solids (first one is the solid which is intersected with and the 2nd one intersecting the first one).
from these points trace the points and create the fillets.
I have tried in few cases and most of the cases it worked, where the intersection lines are making an angle which is greater than 20 deg, best would be 90 deg.


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

The jagged lines don't go away, exactly. They move somewhere else. They seem to be related to having two intersection points very close to each other. I thought some about how to design a fillet between a cylinder and arbitrary prism and it's not obvious to me how to do it, Such a fillet would naturally be created by offsetting the prism cross section, but it seems like it needs to offset different amount in different directions if the fillet is supposed to have a continuous derivative. Once you obtain the intersection of the prism with the cylinder, say, how do you use that intersection to build the fillet? On Sat, Jan 22, 2022 at 8:24 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > you can see the difference between intersection points at various angles with following line > color("magenta")points(ip(prism1,prism),.5); > > "ip" is the function that captures the intersection points between the 2 prisms. > > > On Sun, 23 Jan 2022 at 06:06, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: >> >> I have checked the jagged lines. >> It may be due to angle between the 2 prisms at this location. >> when you replace "z210" with "z180" in line number 8, these jagged lines go away. >> when you make it "z250", this becomes worse. >> May be it is related to finding the intersection points correcly >> >> On Sat, 22 Jan 2022 at 22:41, Adrian Mariano <avm4@cornell.edu> wrote: >>> >>> I was looking more closely at the fillet between the U-bar and sphere, >>> and it appears that there is a funny irregularity. I'm not sure what >>> is going on, but it looks like there is a jagged top edge and some >>> non-smooth areas on the fillet. Perhaps the faces are being defined >>> incorrectly with an off-by-one error? (Maybe this explains so many >>> warnings.) I attach a picture showing the fillet by itself below. >>> >>> Can you make a connection between two arbitrary prisms? (Seems like >>> the base prism would need to be convex.) I'm intrigued by this. It >>> may inspire me to write something of my own. In principle a parallel >>> connection is OK---the fillet is a trivial straight line segment. >>> It's when you have *no* connection that you're really in trouble. >>> >>> On Sat, Jan 22, 2022 at 11:58 AM Sanjeev Prabhakar >>> <sprabhakar2006@gmail.com> wrote: >>> > >>> > Thank you so much for your kind suggestions. >>> > I will try and improve on code readability and also the warning thing >>> > >>> > Limitation of the function "ipf (intersection point for fillets)" is when the intersection angle is near parallel between the 2 intersecting solids, it doesn't work. >>> > Logic used: >>> > First identify the intersection point between the 2 solids (first one is the solid which is intersected with and the 2nd one intersecting the first one). >>> > from these points trace the points and create the fillets. >>> > I have tried in few cases and most of the cases it worked, where the intersection lines are making an angle which is greater than 20 deg, best would be 90 deg. >>> > >>> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Sun, Jan 23, 2022 8:32 AM

written most of the functions again.
no warnings
this is much faster now

On Sun, 23 Jan 2022 at 07:47, Adrian Mariano avm4@cornell.edu wrote:

The jagged lines don't go away, exactly.  They move somewhere else.
They seem to be related to having two intersection points very close
to each other.  I thought some about how to design a fillet between a
cylinder and arbitrary prism and it's not obvious to me how to do it,
Such a fillet would naturally be created by offsetting the prism
cross section, but it seems like it needs to offset different amount
in different directions if the fillet is supposed to have a continuous
derivative.  Once you obtain the intersection of the prism with the
cylinder, say, how do you use that intersection to build the fillet?

written most of the functions again. no warnings this is much faster now On Sun, 23 Jan 2022 at 07:47, Adrian Mariano <avm4@cornell.edu> wrote: > The jagged lines don't go away, exactly. They move somewhere else. > They seem to be related to having two intersection points very close > to each other. I thought some about how to design a fillet between a > cylinder and arbitrary prism and it's not obvious to me how to do it, > Such a fillet would naturally be created by offsetting the prism > cross section, but it seems like it needs to offset different amount > in different directions if the fillet is supposed to have a continuous > derivative. Once you obtain the intersection of the prism with the > cylinder, say, how do you use that intersection to build the fillet? > > > >
AM
Adrian Mariano
Sun, Jan 23, 2022 1:31 PM

Your latest version refers to dependencies in some directory.  You
might want to treat your dependencies file as a library and put it on
the OpenSCAD library path.  Then you can just write
include<dependencies.scad> from any file and the dependencies will be
found.  You may not be aware that your revised code requires a recent
dev snapshot, which is perhaps not ideal for code you're going to
distribute.  But you should let people know about it so the syntax
errors aren't mysterious.  (The new feature you're using is trailing
commas in let statements.)  This fits right in with the thread I
started about required versions.

I was studying the fillet and noticed that it has some places where it
pulls away from the mating shape.  Yet somehow it renders.  I don't
understand how this renders, unless the fillet is an entire
self-contained polyhedron?  But it certainly seems undesirable to have
that gap.

On Sun, Jan 23, 2022 at 3:35 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

written most of the functions again.
no warnings
this is much faster now

On Sun, 23 Jan 2022 at 07:47, Adrian Mariano avm4@cornell.edu wrote:

The jagged lines don't go away, exactly.  They move somewhere else.
They seem to be related to having two intersection points very close
to each other.  I thought some about how to design a fillet between a
cylinder and arbitrary prism and it's not obvious to me how to do it,
Such a fillet would naturally be created by offsetting the prism
cross section, but it seems like it needs to offset different amount
in different directions if the fillet is supposed to have a continuous
derivative.  Once you obtain the intersection of the prism with the
cylinder, say, how do you use that intersection to build the fillet?


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

Your latest version refers to dependencies in some directory. You might want to treat your dependencies file as a library and put it on the OpenSCAD library path. Then you can just write include<dependencies.scad> from any file and the dependencies will be found. You may not be aware that your revised code requires a recent dev snapshot, which is perhaps not ideal for code you're going to distribute. But you should let people know about it so the syntax errors aren't mysterious. (The new feature you're using is trailing commas in let statements.) This fits right in with the thread I started about required versions. I was studying the fillet and noticed that it has some places where it pulls away from the mating shape. Yet somehow it renders. I don't understand how this renders, unless the fillet is an entire self-contained polyhedron? But it certainly seems undesirable to have that gap. On Sun, Jan 23, 2022 at 3:35 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > written most of the functions again. > no warnings > this is much faster now > > On Sun, 23 Jan 2022 at 07:47, Adrian Mariano <avm4@cornell.edu> wrote: >> >> The jagged lines don't go away, exactly. They move somewhere else. >> They seem to be related to having two intersection points very close >> to each other. I thought some about how to design a fillet between a >> cylinder and arbitrary prism and it's not obvious to me how to do it, >> Such a fillet would naturally be created by offsetting the prism >> cross section, but it seems like it needs to offset different amount >> in different directions if the fillet is supposed to have a continuous >> derivative. Once you obtain the intersection of the prism with the >> cylinder, say, how do you use that intersection to build the fillet? >> >> >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Sun, Jan 23, 2022 2:00 PM

Thanks for pointing out.
In the new version, extra comma at the end of let() statement doesnt show
an error, so mostly miss  to correct it.
gap at the end can be filled and will do that.

Is there a way to improve the smoothness of fillets.
The logic for fillets followed here is as follows:
1- find the intersection points between 2 prisms
2- for each intersecting point take all the nearby points. also add a new
point in the same vector, which is intersecting the first prism by any
random distance, here it is considered as fillet radius
3- now make an axis of rotation by joining the intersecting point and the
next intersecting point.
4- create a half circle with starting point added in step 2, with axis of
rotation created in step 3 (option=0 is cw semi-circle, option=1 is ccw)
5. find the intersection of this circle created with the first prism.
6 Now there are 3 points (original intersection point, point added in step
2 and intersection point added in step 5.
7. with these 3 points, both fillet and chamfer can be drawn.

On Sun, 23 Jan 2022 at 19:01, Adrian Mariano avm4@cornell.edu wrote:

Your latest version refers to dependencies in some directory.  You
might want to treat your dependencies file as a library and put it on
the OpenSCAD library path.  Then you can just write
include<dependencies.scad> from any file and the dependencies will be
found.  You may not be aware that your revised code requires a recent
dev snapshot, which is perhaps not ideal for code you're going to
distribute.  But you should let people know about it so the syntax
errors aren't mysterious.  (The new feature you're using is trailing
commas in let statements.)  This fits right in with the thread I
started about required versions.

I was studying the fillet and noticed that it has some places where it
pulls away from the mating shape.  Yet somehow it renders.  I don't
understand how this renders, unless the fillet is an entire
self-contained polyhedron?  But it certainly seems undesirable to have
that gap.

On Sun, Jan 23, 2022 at 3:35 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

written most of the functions again.
no warnings
this is much faster now

On Sun, 23 Jan 2022 at 07:47, Adrian Mariano avm4@cornell.edu wrote:

The jagged lines don't go away, exactly.  They move somewhere else.
They seem to be related to having two intersection points very close
to each other.  I thought some about how to design a fillet between a
cylinder and arbitrary prism and it's not obvious to me how to do it,
Such a fillet would naturally be created by offsetting the prism
cross section, but it seems like it needs to offset different amount
in different directions if the fillet is supposed to have a continuous
derivative.  Once you obtain the intersection of the prism with the
cylinder, say, how do you use that intersection to build the fillet?


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 for pointing out. In the new version, extra comma at the end of let() statement doesnt show an error, so mostly miss to correct it. gap at the end can be filled and will do that. Is there a way to improve the smoothness of fillets. The logic for fillets followed here is as follows: 1- find the intersection points between 2 prisms 2- for each intersecting point take all the nearby points. also add a new point in the same vector, which is intersecting the first prism by any random distance, here it is considered as fillet radius 3- now make an axis of rotation by joining the intersecting point and the next intersecting point. 4- create a half circle with starting point added in step 2, with axis of rotation created in step 3 (option=0 is cw semi-circle, option=1 is ccw) 5. find the intersection of this circle created with the first prism. 6 Now there are 3 points (original intersection point, point added in step 2 and intersection point added in step 5. 7. with these 3 points, both fillet and chamfer can be drawn. - On Sun, 23 Jan 2022 at 19:01, Adrian Mariano <avm4@cornell.edu> wrote: > Your latest version refers to dependencies in some directory. You > might want to treat your dependencies file as a library and put it on > the OpenSCAD library path. Then you can just write > include<dependencies.scad> from any file and the dependencies will be > found. You may not be aware that your revised code requires a recent > dev snapshot, which is perhaps not ideal for code you're going to > distribute. But you should let people know about it so the syntax > errors aren't mysterious. (The new feature you're using is trailing > commas in let statements.) This fits right in with the thread I > started about required versions. > > I was studying the fillet and noticed that it has some places where it > pulls away from the mating shape. Yet somehow it renders. I don't > understand how this renders, unless the fillet is an entire > self-contained polyhedron? But it certainly seems undesirable to have > that gap. > > > On Sun, Jan 23, 2022 at 3:35 AM Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > > > written most of the functions again. > > no warnings > > this is much faster now > > > > On Sun, 23 Jan 2022 at 07:47, Adrian Mariano <avm4@cornell.edu> wrote: > >> > >> The jagged lines don't go away, exactly. They move somewhere else. > >> They seem to be related to having two intersection points very close > >> to each other. I thought some about how to design a fillet between a > >> cylinder and arbitrary prism and it's not obvious to me how to do it, > >> Such a fillet would naturally be created by offsetting the prism > >> cross section, but it seems like it needs to offset different amount > >> in different directions if the fillet is supposed to have a continuous > >> derivative. Once you obtain the intersection of the prism with the > >> cylinder, say, how do you use that intersection to build the fillet? > >> > >> > >> > > _______________________________________________ > > 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 >