discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: python support for openscad

SP
Sanjeev Prabhakar
Sun, Jul 23, 2023 4:07 PM

In the past I have shared few examples which probably are very difficult to
do in pure openscad.

Python is a very convenient, easy to learn and use language as per me.

Is probably not more than 2 years that I started learning python. I
wouldn't call myself proficient in the language but at the least I could
make few very complicated models through this.

In the past I have shared few examples which probably are very difficult to do in pure openscad. Python is a very convenient, easy to learn and use language as per me. Is probably not more than 2 years that I started learning python. I wouldn't call myself proficient in the language but at the least I could make few very complicated models through this.
SP
Sanjeev Prabhakar
Sun, Jul 23, 2023 4:34 PM

example attached where a fillet is created:
calculations for this are done in python.
[image: Screenshot 2023-07-22 at 9.41.49 PM.png]

On Sun, 23 Jul 2023 at 21:37, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

In the past I have shared few examples which probably are very difficult
to do in pure openscad.

Python is a very convenient, easy to learn and use language as per me.

Is probably not more than 2 years that I started learning python. I
wouldn't call myself proficient in the language but at the least I could
make few very complicated models through this.

example attached where a fillet is created: calculations for this are done in python. [image: Screenshot 2023-07-22 at 9.41.49 PM.png] On Sun, 23 Jul 2023 at 21:37, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > In the past I have shared few examples which probably are very difficult > to do in pure openscad. > > Python is a very convenient, easy to learn and use language as per me. > > Is probably not more than 2 years that I started learning python. I > wouldn't call myself proficient in the language but at the least I could > make few very complicated models through this. > > > >
TP
Torsten Paul
Sun, Jul 23, 2023 4:45 PM

On 23.07.23 18:34, Sanjeev Prabhakar wrote:

example attached where a fillet is created:
calculations for this are done in python.

That is great stuff, but in my view it would belong into the geometry
engine.

Maybe you can help with the calculation side of that?

ciao,
Torsten.

On 23.07.23 18:34, Sanjeev Prabhakar wrote: > example attached where a fillet is created: > calculations for this are done in python. That is great stuff, but in my view it would belong into the geometry engine. Maybe you can help with the calculation side of that? ciao, Torsten.
RW
Rogier Wolff
Sun, Jul 23, 2023 4:59 PM

On Sun, Jul 23, 2023 at 09:37:10PM +0530, Sanjeev Prabhakar wrote:

In the past I have shared few examples which probably are very difficult to
do in pure openscad.

Python is a very convenient, easy to learn and use language as per me.

Is probably not more than 2 years that I started learning python. I
wouldn't call myself proficient in the language but at the least I
could make few very complicated models through this.

I agree that a procedural language addition to openscad would be very
useful. Some things are much easier to express procedurally than the
way openscad would like you to formulate things.

For example building up an array element by element is awkward in
openscad, while "natural" in a procedural language.

It took me a long time to figure out why a module using a global
variable wouldn't instantiate in two different ways when I changed the
global variable between calls. (back then openscad didn't have the
warning that is generated nowadays).

I agree with the openscad folks that it is an advantage that an
openscad script is just "data": It cannot affect your computer beyond
bogging it down for a while while trying to render it. Just like a
"word processor documuent" should be.

How about allowing the python extension to be activated by a
commandline argument but also by using a different binary name.

pyopenscad, popenscad or maybe openpyscad. (That last one... might not
be such a good idea... ). And a different extension.

For those that are paranoid (and those that don't have python at
compile-time) it should remain possible to compile without python
support.

I'm hoping such a construction would satisfy both ends of this
discussion.

Roger.

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Sun, Jul 23, 2023 at 09:37:10PM +0530, Sanjeev Prabhakar wrote: > In the past I have shared few examples which probably are very difficult to > do in pure openscad. > > Python is a very convenient, easy to learn and use language as per me. > Is probably not more than 2 years that I started learning python. I > wouldn't call myself proficient in the language but at the least I > could make few very complicated models through this. I agree that a procedural language addition to openscad would be very useful. Some things are much easier to express procedurally than the way openscad would like you to formulate things. For example building up an array element by element is awkward in openscad, while "natural" in a procedural language. It took me a long time to figure out why a module using a global variable wouldn't instantiate in two different ways when I changed the global variable between calls. (back then openscad didn't have the warning that is generated nowadays). I agree with the openscad folks that it is an advantage that an openscad script is just "data": It cannot affect your computer beyond bogging it down for a while while trying to render it. Just like a "word processor documuent" should be. How about allowing the python extension to be activated by a commandline argument but also by using a different binary name. pyopenscad, popenscad or maybe openpyscad. (That last one... might not be such a good idea... ). And a different extension. For those that are paranoid (and those that don't have python at compile-time) it should remain possible to compile without python support. I'm hoping such a construction would satisfy both ends of this discussion. Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
SP
Sanjeev Prabhakar
Sun, Jul 23, 2023 4:59 PM

Thanks

It's a little complicated to explain,  but the main thing is calculating
the intersection line between 2 solids.

Once you get the intersection line,  then it's not so difficult to create
any fillet.

On Sun, 23 Jul 2023, 22:16 Torsten Paul, Torsten.Paul@gmx.de wrote:

On 23.07.23 18:34, Sanjeev Prabhakar wrote:

example attached where a fillet is created:
calculations for this are done in python.

That is great stuff, but in my view it would belong into the geometry
engine.

Maybe you can help with the calculation side of that?

ciao,
Torsten.


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

Thanks It's a little complicated to explain, but the main thing is calculating the intersection line between 2 solids. Once you get the intersection line, then it's not so difficult to create any fillet. On Sun, 23 Jul 2023, 22:16 Torsten Paul, <Torsten.Paul@gmx.de> wrote: > On 23.07.23 18:34, Sanjeev Prabhakar wrote: > > example attached where a fillet is created: > > calculations for this are done in python. > > That is great stuff, but in my view it would belong into the geometry > engine. > > Maybe you can help with the calculation side of that? > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Rogier Wolff
Sun, Jul 23, 2023 5:03 PM

On Sun, Jul 23, 2023 at 06:45:41PM +0200, Torsten Paul wrote:

On 23.07.23 18:34, Sanjeev Prabhakar wrote:

example attached where a fillet is created:
calculations for this are done in python.

That is great stuff, but in my view it would belong into the geometry
engine.

Maybe you can help with the calculation side of that?

This specific case of "a fillet" is something that might be welcome in
openscad. But that is not the point that Sanjeev is trying to make.

There are manythings that are relatively easy to do in
python-enhanced-openscad, that are hard to do in vanilla openscad. Not
just fillets. His example might make sense to "Oh, but we want that to
be possible in plain openscad". You can't keep saying that for
everything that anybody can come up with.

Roger. 

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Sun, Jul 23, 2023 at 06:45:41PM +0200, Torsten Paul wrote: > On 23.07.23 18:34, Sanjeev Prabhakar wrote: > > example attached where a fillet is created: > > calculations for this are done in python. > > That is great stuff, but in my view it would belong into the geometry > engine. > > Maybe you can help with the calculation side of that? This specific case of "a fillet" is something that might be welcome in openscad. But that is not the point that Sanjeev is trying to make. There are manythings that are relatively easy to do in python-enhanced-openscad, that are hard to do in vanilla openscad. Not just fillets. His example might make sense to "Oh, but we want that to be possible in plain openscad". You can't keep saying that for everything that anybody can come up with. Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
TP
Torsten Paul
Sun, Jul 23, 2023 5:04 PM

On 23.07.23 18:59, Sanjeev Prabhakar wrote:

Once you get the intersection line,  then it's not so difficult to create any fillet.

I have not looked at the details, but my understanding from some discussion
in the Manifold repository is there are IDs in the CSG output that detail to
which part the new faces belong. From that it should be possible to get the
information which vertices are that intersection line.

Maybe we can try some demo code separate from OpenSCAD to see if we can get
your algorithm into Manifold based C++ code.

ciao,
Torsten.

On 23.07.23 18:59, Sanjeev Prabhakar wrote: > Once you get the intersection line,  then it's not so difficult to create any fillet. I have not looked at the details, but my understanding from some discussion in the Manifold repository is there are IDs in the CSG output that detail to which part the new faces belong. From that it should be possible to get the information which vertices are that intersection line. Maybe we can try some demo code separate from OpenSCAD to see if we can get your algorithm into Manifold based C++ code. ciao, Torsten.
RW
Rogier Wolff
Sun, Jul 23, 2023 5:10 PM

On Sun, Jul 23, 2023 at 10:29:34PM +0530, Sanjeev Prabhakar wrote:

Thanks

It's a little complicated to explain,  but the main thing is calculating
the intersection line between 2 solids.

Once you get the intersection line,  then it's not so difficult to create
any fillet.

I'm guessing that it can become complicated.
Try this:

fillet_radius = 3;
dist = 10;
size = 10;

fillet (radius= fillet_radius) {
cube ([size2+dist, size, size]);
cube ([size, size, 2
size]);
translate ([size+dist, 0,0]) cube ([size, size, 2*size]);
}

Easy. But what if dist is reduced to below 2*fillet_radius ? You can
intersect the radii but then you'll get a sharp inside corner that the
fillet is supposed to be preventing.

And what if dist is reducted to below 1*fillet_radius ? Does the space
between the objects fill completely with fillet?

In the general case, this is quite hard.

Roger. 

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Sun, Jul 23, 2023 at 10:29:34PM +0530, Sanjeev Prabhakar wrote: > Thanks > > It's a little complicated to explain, but the main thing is calculating > the intersection line between 2 solids. > > Once you get the intersection line, then it's not so difficult to create > any fillet. I'm guessing that it can become complicated. Try this: fillet_radius = 3; dist = 10; size = 10; fillet (radius= fillet_radius) { cube ([size*2+dist, size, size]); cube ([size, size, 2*size]); translate ([size+dist, 0,0]) cube ([size, size, 2*size]); } Easy. But what if dist is reduced to below 2*fillet_radius ? You can intersect the radii but then you'll get a sharp inside corner that the fillet is supposed to be preventing. And what if dist is reducted to below 1*fillet_radius ? Does the space between the objects fill completely with fillet? In the general case, this is quite hard. Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
TP
Torsten Paul
Sun, Jul 23, 2023 5:11 PM

On 23.07.23 18:59, Rogier Wolff wrote:

I'm hoping such a construction would satisfy both ends of this
discussion.

The related logic is already merged into OpenSCAD master and the
PR adding the actual Python interface is accepted in spirit, just
pending some detailed code review. So it's only a matter of finding
the time, no general open discussion.

https://github.com/openscad/openscad/pull/4702

Getting builds to enable this feature is going to be a challenge,
as I mentioned before, but we'll have to see if we can get some
help with that.

ciao,
Torsten.

On 23.07.23 18:59, Rogier Wolff wrote: > I'm hoping such a construction would satisfy both ends of this > discussion. The related logic is already merged into OpenSCAD master and the PR adding the actual Python interface is accepted in spirit, just pending some detailed code review. So it's only a matter of finding the time, no general open discussion. https://github.com/openscad/openscad/pull/4702 Getting builds to enable this feature is going to be a challenge, as I mentioned before, but we'll have to see if we can get some help with that. ciao, Torsten.
SP
Sanjeev Prabhakar
Sun, Jul 23, 2023 5:13 PM

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.

Sure I will try to explain the logic maybe in a day or two for the benefit of all who maybe interested in geometry manipulations.
AM
Adrian Mariano
Sun, Jul 23, 2023 7:07 PM

I've been working on BOSL2 for a while with Revar, and we have 60k lines of
OpenSCAD code.  Based on that experience, I think that the problem with the
OpenSCAD language is NOT fundamentally that it is functional.  The benefit
of python is NOT fundamentally that it is procedural.  There are two basic
problems with OpenSCAD for doing more complicated user space processing.
One is the inability to gain access to geometry, so to do user space
design, everything from the ground up has to be done "outside" of the
OpenSCAD geometry engine.  The second problem is about efficiency.
OpenSCAD has no data structures.  Graphics algorithms assume access to
sophisticated and efficient data structures like a priority queue or a tree
or other kinds of things that are impossible to implement efficiently in
OpenSCAD.  So, yeah, you can implement the data structure, but instead of
being O(log N) or whatever it will be O(N^2).  So then trying to implement
that process that uses that data structure in user space becomes
intractable.  It's not clear to me that this limitation is fundamentally
about the language being functional.

Note that the filleting process displayed by Sanjeev is straight forward to
implement in principle.  You just find the intersection of two things and
put a fillet there.  Two complications arise for doing this in userspace in
OpenSCAD.  The first is representing the things, because again, you can't
use the geometry engine to do it.  Now maybe a solution to that problem is
coming?  The second complication is dealing with self-intersections of the
resulting polyhedron, because that's intractable in OpenSCAD.  Really it
seems like OpenSCAD should have a primitive that accepts a series of
profiles and links them together into a polyhedron, even if it's
self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD
userspace.  There are many examples at the link below.  I show a single one
in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

[image: image.png]

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.


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

I've been working on BOSL2 for a while with Revar, and we have 60k lines of OpenSCAD code. Based on that experience, I think that the problem with the OpenSCAD language is NOT fundamentally that it is functional. The benefit of python is NOT fundamentally that it is procedural. There are two basic problems with OpenSCAD for doing more complicated user space processing. One is the inability to gain access to geometry, so to do user space design, everything from the ground up has to be done "outside" of the OpenSCAD geometry engine. The second problem is about efficiency. OpenSCAD has no data structures. Graphics algorithms assume access to sophisticated and efficient data structures like a priority queue or a tree or other kinds of things that are impossible to implement efficiently in OpenSCAD. So, yeah, you can implement the data structure, but instead of being O(log N) or whatever it will be O(N^2). So then trying to implement that process that uses that data structure in user space becomes intractable. It's not clear to me that this limitation is fundamentally about the language being functional. Note that the filleting process displayed by Sanjeev is straight forward to implement in principle. You just find the intersection of two things and put a fillet there. Two complications arise for doing this in userspace in OpenSCAD. The first is representing the things, because again, you can't use the geometry engine to do it. Now maybe a solution to that problem is coming? The second complication is dealing with self-intersections of the resulting polyhedron, because that's intractable in OpenSCAD. Really it seems like OpenSCAD should have a primitive that accepts a series of profiles and links them together into a polyhedron, even if it's self-intersecting. Here's examples of doing the fillet problem entirely in OpenSCAD userspace. There are many examples at the link below. I show a single one in this message. https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism [image: image.png] On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Sure > I will try to explain the logic maybe in a day or two for the benefit of > all who maybe interested in geometry manipulations. > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
NH
nop head
Sun, Jul 23, 2023 7:17 PM

I am not sure 3D fillets are any use in FDM printing because of the layers.
I only use 2D fillets to get rounded tool paths.

On Sun, 23 Jul 2023, 20:08 Adrian Mariano, avm4@cornell.edu wrote:

I've been working on BOSL2 for a while with Revar, and we have 60k lines
of OpenSCAD code.  Based on that experience, I think that the problem with
the OpenSCAD language is NOT fundamentally that it is functional.  The
benefit of python is NOT fundamentally that it is procedural.  There are
two basic problems with OpenSCAD for doing more complicated user space
processing.  One is the inability to gain access to geometry, so to do user
space design, everything from the ground up has to be done "outside" of the
OpenSCAD geometry engine.  The second problem is about efficiency.
OpenSCAD has no data structures.  Graphics algorithms assume access to
sophisticated and efficient data structures like a priority queue or a tree
or other kinds of things that are impossible to implement efficiently in
OpenSCAD.  So, yeah, you can implement the data structure, but instead of
being O(log N) or whatever it will be O(N^2).  So then trying to implement
that process that uses that data structure in user space becomes
intractable.  It's not clear to me that this limitation is fundamentally
about the language being functional.

Note that the filleting process displayed by Sanjeev is straight forward
to implement in principle.  You just find the intersection of two things
and put a fillet there.  Two complications arise for doing this in
userspace in OpenSCAD.  The first is representing the things, because
again, you can't use the geometry engine to do it.  Now maybe a solution to
that problem is coming?  The second complication is dealing with
self-intersections of the resulting polyhedron, because that's intractable
in OpenSCAD.  Really it seems like OpenSCAD should have a primitive that
accepts a series of profiles and links them together into a polyhedron,
even if it's self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD
userspace.  There are many examples at the link below.  I show a single one
in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

[image: image.png]

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.


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 am not sure 3D fillets are any use in FDM printing because of the layers. I only use 2D fillets to get rounded tool paths. On Sun, 23 Jul 2023, 20:08 Adrian Mariano, <avm4@cornell.edu> wrote: > I've been working on BOSL2 for a while with Revar, and we have 60k lines > of OpenSCAD code. Based on that experience, I think that the problem with > the OpenSCAD language is NOT fundamentally that it is functional. The > benefit of python is NOT fundamentally that it is procedural. There are > two basic problems with OpenSCAD for doing more complicated user space > processing. One is the inability to gain access to geometry, so to do user > space design, everything from the ground up has to be done "outside" of the > OpenSCAD geometry engine. The second problem is about efficiency. > OpenSCAD has no data structures. Graphics algorithms assume access to > sophisticated and efficient data structures like a priority queue or a tree > or other kinds of things that are impossible to implement efficiently in > OpenSCAD. So, yeah, you can implement the data structure, but instead of > being O(log N) or whatever it will be O(N^2). So then trying to implement > that process that uses that data structure in user space becomes > intractable. It's not clear to me that this limitation is fundamentally > about the language being functional. > > Note that the filleting process displayed by Sanjeev is straight forward > to implement in principle. You just find the intersection of two things > and put a fillet there. Two complications arise for doing this in > userspace in OpenSCAD. The first is representing the things, because > again, you can't use the geometry engine to do it. Now maybe a solution to > that problem is coming? The second complication is dealing with > self-intersections of the resulting polyhedron, because that's intractable > in OpenSCAD. Really it seems like OpenSCAD should have a primitive that > accepts a series of profiles and links them together into a polyhedron, > even if it's self-intersecting. > > Here's examples of doing the fillet problem entirely in OpenSCAD > userspace. There are many examples at the link below. I show a single one > in this message. > > > https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism > > [image: image.png] > > > On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> Sure >> I will try to explain the logic maybe in a day or two for the benefit of >> all who maybe interested in geometry manipulations. >> >> >> >> _______________________________________________ >> 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
Sun, Jul 23, 2023 7:23 PM

Are you thinking that the layers break the propagation of stress through
the model, causing stress to concentrate at each layer, instead of
concentrating at a corner?  Have you observed that models which fail by
layers shearing do so and random places in the model?

On Sun, Jul 23, 2023 at 3:18 PM nop head nop.head@gmail.com wrote:

I am not sure 3D fillets are any use in FDM printing because of the
layers. I only use 2D fillets to get rounded tool paths.

On Sun, 23 Jul 2023, 20:08 Adrian Mariano, avm4@cornell.edu wrote:

I've been working on BOSL2 for a while with Revar, and we have 60k lines
of OpenSCAD code.  Based on that experience, I think that the problem with
the OpenSCAD language is NOT fundamentally that it is functional.  The
benefit of python is NOT fundamentally that it is procedural.  There are
two basic problems with OpenSCAD for doing more complicated user space
processing.  One is the inability to gain access to geometry, so to do user
space design, everything from the ground up has to be done "outside" of the
OpenSCAD geometry engine.  The second problem is about efficiency.
OpenSCAD has no data structures.  Graphics algorithms assume access to
sophisticated and efficient data structures like a priority queue or a tree
or other kinds of things that are impossible to implement efficiently in
OpenSCAD.  So, yeah, you can implement the data structure, but instead of
being O(log N) or whatever it will be O(N^2).  So then trying to implement
that process that uses that data structure in user space becomes
intractable.  It's not clear to me that this limitation is fundamentally
about the language being functional.

Note that the filleting process displayed by Sanjeev is straight forward
to implement in principle.  You just find the intersection of two things
and put a fillet there.  Two complications arise for doing this in
userspace in OpenSCAD.  The first is representing the things, because
again, you can't use the geometry engine to do it.  Now maybe a solution to
that problem is coming?  The second complication is dealing with
self-intersections of the resulting polyhedron, because that's intractable
in OpenSCAD.  Really it seems like OpenSCAD should have a primitive that
accepts a series of profiles and links them together into a polyhedron,
even if it's self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD
userspace.  There are many examples at the link below.  I show a single one
in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

[image: image.png]

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.


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

Are you thinking that the layers break the propagation of stress through the model, causing stress to concentrate at each layer, instead of concentrating at a corner? Have you observed that models which fail by layers shearing do so and random places in the model? On Sun, Jul 23, 2023 at 3:18 PM nop head <nop.head@gmail.com> wrote: > I am not sure 3D fillets are any use in FDM printing because of the > layers. I only use 2D fillets to get rounded tool paths. > > On Sun, 23 Jul 2023, 20:08 Adrian Mariano, <avm4@cornell.edu> wrote: > >> I've been working on BOSL2 for a while with Revar, and we have 60k lines >> of OpenSCAD code. Based on that experience, I think that the problem with >> the OpenSCAD language is NOT fundamentally that it is functional. The >> benefit of python is NOT fundamentally that it is procedural. There are >> two basic problems with OpenSCAD for doing more complicated user space >> processing. One is the inability to gain access to geometry, so to do user >> space design, everything from the ground up has to be done "outside" of the >> OpenSCAD geometry engine. The second problem is about efficiency. >> OpenSCAD has no data structures. Graphics algorithms assume access to >> sophisticated and efficient data structures like a priority queue or a tree >> or other kinds of things that are impossible to implement efficiently in >> OpenSCAD. So, yeah, you can implement the data structure, but instead of >> being O(log N) or whatever it will be O(N^2). So then trying to implement >> that process that uses that data structure in user space becomes >> intractable. It's not clear to me that this limitation is fundamentally >> about the language being functional. >> >> Note that the filleting process displayed by Sanjeev is straight forward >> to implement in principle. You just find the intersection of two things >> and put a fillet there. Two complications arise for doing this in >> userspace in OpenSCAD. The first is representing the things, because >> again, you can't use the geometry engine to do it. Now maybe a solution to >> that problem is coming? The second complication is dealing with >> self-intersections of the resulting polyhedron, because that's intractable >> in OpenSCAD. Really it seems like OpenSCAD should have a primitive that >> accepts a series of profiles and links them together into a polyhedron, >> even if it's self-intersecting. >> >> Here's examples of doing the fillet problem entirely in OpenSCAD >> userspace. There are many examples at the link below. I show a single one >> in this message. >> >> >> https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism >> >> [image: image.png] >> >> >> On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> Sure >>> I will try to explain the logic maybe in a day or two for the benefit of >>> all who maybe interested in geometry manipulations. >>> >>> >>> >>> _______________________________________________ >>> 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 >
GS
Guenther Sohler
Sun, Jul 23, 2023 7:45 PM

Adriano, thank you for your input
I appreciate your work with Revar on BOSL2 and I understand your reasoning
that BOSL2 could become obsolete,
but I am sure it will not. When openscad becomes more powerful, BOSL code
might be able to code with fewer lines, but  BOSL2 is still very important
to openscad.

Yes, I would appreciate OpenSCAD to have access to the internal vertices to
read them and work with the coordinates.

Unfortunately this is not as easy, because often a model is developed in
OpenCSG and there are no coordinates available in OpenSCG.
If you accept the fact that a full render has to be performed to get
coordinates of a submodule. It's just a matter of a PR.
If somebody guarantees,  that such a PR will actually be accepted/merged,
time to develop on such a PR would not be an issue.

My Main Problem with SCAD language is that variables cannot be reassigned,
once they are set -> could probably be solved with most other interpreter
languages.
The main benefit I see with python is not the opposite of the previous
statement.  Python is just any interpreter language choice. but its very
easy to learn and very easy to read.
PLUS: it has many accompanying libraries which will help you to do fancy
stuff with OpenSCAD.
for example this one:

http://guenther-sohler.net/openscad/examples/qrcode.txt
these few lines of code creates an qr code display object , which you can
scan  with your mobile. (Yes, i have seen openscad qr code libs, but this
one appears easier and has more options)

And your second statement : OpenSCAD has datastructures is also valid.
Polyhedra are composed of triangles which are stored as coordinates only!
It would be much better to compose triangles from
indices into a global vertex array. This is something I am right now
working on.(some ctests are not passed for my PR)
Information which could also be stored with the  "indexed " polygons is: a
lookup table from point -> which triangles use this point.

And Yes, I like your fillet and I personally appreciate , if Sanjeev's
knowledge could go into GeomtryEvaluator.cc

In the End, I'd like to see openscad become more powerful by being able to
change variables once they are set and to use external libs.
And yes, I know that I am aware that people might see this as a security
risk, but those people can stay safe and do not even need to bother when
not activating it.
The rest and the interested people instead can leverage the new power
coming from python.

Thank you for reading

On Sun, Jul 23, 2023 at 9:08 PM Adrian Mariano avm4@cornell.edu wrote:

I've been working on BOSL2 for a while with Revar, and we have 60k lines
of OpenSCAD code.  Based on that experience, I think that the problem with
the OpenSCAD language is NOT fundamentally that it is functional.  The
benefit of python is NOT fundamentally that it is procedural.  There are
two basic problems with OpenSCAD for doing more complicated user space
processing.  One is the inability to gain access to geometry, so to do user
space design, everything from the ground up has to be done "outside" of the
OpenSCAD geometry engine.  The second problem is about efficiency.
OpenSCAD has no data structures.  Graphics algorithms assume access to
sophisticated and efficient data structures like a priority queue or a tree
or other kinds of things that are impossible to implement efficiently in
OpenSCAD.  So, yeah, you can implement the data structure, but instead of
being O(log N) or whatever it will be O(N^2).  So then trying to implement
that process that uses that data structure in user space becomes
intractable.  It's not clear to me that this limitation is fundamentally
about the language being functional.

Note that the filleting process displayed by Sanjeev is straight forward
to implement in principle.  You just find the intersection of two things
and put a fillet there.  Two complications arise for doing this in
userspace in OpenSCAD.  The first is representing the things, because
again, you can't use the geometry engine to do it.  Now maybe a solution to
that problem is coming?  The second complication is dealing with
self-intersections of the resulting polyhedron, because that's intractable
in OpenSCAD.  Really it seems like OpenSCAD should have a primitive that
accepts a series of profiles and links them together into a polyhedron,
even if it's self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD
userspace.  There are many examples at the link below.  I show a single one
in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

[image: image.png]

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.


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

Adriano, thank you for your input I appreciate your work with Revar on BOSL2 and I understand your reasoning that BOSL2 could become obsolete, but I am sure it will not. When openscad becomes more powerful, BOSL code might be able to code with fewer lines, but BOSL2 is still very important to openscad. Yes, I would appreciate OpenSCAD to have access to the internal vertices to read them and work with the coordinates. Unfortunately this is not as easy, because often a model is developed in OpenCSG and there are no coordinates available in OpenSCG. If you accept the fact that a full render has to be performed to get coordinates of a submodule. It's just a matter of a PR. If somebody guarantees, that such a PR will actually be accepted/merged, time to develop on such a PR would not be an issue. My Main Problem with SCAD language is that variables cannot be reassigned, once they are set -> could probably be solved with most other interpreter languages. The main benefit I see with python is not the opposite of the previous statement. Python is just any interpreter language choice. but its very easy to learn and very easy to read. PLUS: it has many accompanying libraries which will help you to do fancy stuff with OpenSCAD. for example this one: http://guenther-sohler.net/openscad/examples/qrcode.txt these few lines of code creates an qr code display object , which you can scan with your mobile. (Yes, i have seen openscad qr code libs, but this one appears easier and has more options) And your second statement : OpenSCAD has datastructures is also valid. Polyhedra are composed of triangles which are stored as coordinates only! It would be much better to compose triangles from indices into a global vertex array. This is something I am right now working on.(some ctests are not passed for my PR) Information which could also be stored with the "indexed " polygons is: a lookup table from point -> which triangles use this point. And Yes, I like your fillet and I personally appreciate , if Sanjeev's knowledge could go into GeomtryEvaluator.cc In the End, I'd like to see openscad become more powerful by being able to change variables once they are set and to use external libs. And yes, I know that I am aware that people might see this as a security risk, but those people can stay safe and do not even need to bother when not activating it. The rest and the interested people instead can leverage the new power coming from python. Thank you for reading On Sun, Jul 23, 2023 at 9:08 PM Adrian Mariano <avm4@cornell.edu> wrote: > I've been working on BOSL2 for a while with Revar, and we have 60k lines > of OpenSCAD code. Based on that experience, I think that the problem with > the OpenSCAD language is NOT fundamentally that it is functional. The > benefit of python is NOT fundamentally that it is procedural. There are > two basic problems with OpenSCAD for doing more complicated user space > processing. One is the inability to gain access to geometry, so to do user > space design, everything from the ground up has to be done "outside" of the > OpenSCAD geometry engine. The second problem is about efficiency. > OpenSCAD has no data structures. Graphics algorithms assume access to > sophisticated and efficient data structures like a priority queue or a tree > or other kinds of things that are impossible to implement efficiently in > OpenSCAD. So, yeah, you can implement the data structure, but instead of > being O(log N) or whatever it will be O(N^2). So then trying to implement > that process that uses that data structure in user space becomes > intractable. It's not clear to me that this limitation is fundamentally > about the language being functional. > > Note that the filleting process displayed by Sanjeev is straight forward > to implement in principle. You just find the intersection of two things > and put a fillet there. Two complications arise for doing this in > userspace in OpenSCAD. The first is representing the things, because > again, you can't use the geometry engine to do it. Now maybe a solution to > that problem is coming? The second complication is dealing with > self-intersections of the resulting polyhedron, because that's intractable > in OpenSCAD. Really it seems like OpenSCAD should have a primitive that > accepts a series of profiles and links them together into a polyhedron, > even if it's self-intersecting. > > Here's examples of doing the fillet problem entirely in OpenSCAD > userspace. There are many examples at the link below. I show a single one > in this message. > > > https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism > > [image: image.png] > > > On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> Sure >> I will try to explain the logic maybe in a day or two for the benefit of >> all who maybe interested in geometry manipulations. >> >> >> >> _______________________________________________ >> 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 >
NH
nop head
Sun, Jul 23, 2023 8:00 PM

The fact that prints always break along layer lines means adding a fillet
that is made of layers hardly affects the strength in my opinion.

On Sun, 23 Jul 2023, 20:24 Adrian Mariano, avm4@cornell.edu wrote:

Are you thinking that the layers break the propagation of stress through
the model, causing stress to concentrate at each layer, instead of
concentrating at a corner?  Have you observed that models which fail by
layers shearing do so and random places in the model?

On Sun, Jul 23, 2023 at 3:18 PM nop head nop.head@gmail.com wrote:

I am not sure 3D fillets are any use in FDM printing because of the
layers. I only use 2D fillets to get rounded tool paths.

On Sun, 23 Jul 2023, 20:08 Adrian Mariano, avm4@cornell.edu wrote:

I've been working on BOSL2 for a while with Revar, and we have 60k lines
of OpenSCAD code.  Based on that experience, I think that the problem with
the OpenSCAD language is NOT fundamentally that it is functional.  The
benefit of python is NOT fundamentally that it is procedural.  There are
two basic problems with OpenSCAD for doing more complicated user space
processing.  One is the inability to gain access to geometry, so to do user
space design, everything from the ground up has to be done "outside" of the
OpenSCAD geometry engine.  The second problem is about efficiency.
OpenSCAD has no data structures.  Graphics algorithms assume access to
sophisticated and efficient data structures like a priority queue or a tree
or other kinds of things that are impossible to implement efficiently in
OpenSCAD.  So, yeah, you can implement the data structure, but instead of
being O(log N) or whatever it will be O(N^2).  So then trying to implement
that process that uses that data structure in user space becomes
intractable.  It's not clear to me that this limitation is fundamentally
about the language being functional.

Note that the filleting process displayed by Sanjeev is straight forward
to implement in principle.  You just find the intersection of two things
and put a fillet there.  Two complications arise for doing this in
userspace in OpenSCAD.  The first is representing the things, because
again, you can't use the geometry engine to do it.  Now maybe a solution to
that problem is coming?  The second complication is dealing with
self-intersections of the resulting polyhedron, because that's intractable
in OpenSCAD.  Really it seems like OpenSCAD should have a primitive that
accepts a series of profiles and links them together into a polyhedron,
even if it's self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD
userspace.  There are many examples at the link below.  I show a single one
in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

[image: image.png]

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit
of all who maybe interested in geometry manipulations.


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


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

The fact that prints always break along layer lines means adding a fillet that is made of layers hardly affects the strength in my opinion. On Sun, 23 Jul 2023, 20:24 Adrian Mariano, <avm4@cornell.edu> wrote: > Are you thinking that the layers break the propagation of stress through > the model, causing stress to concentrate at each layer, instead of > concentrating at a corner? Have you observed that models which fail by > layers shearing do so and random places in the model? > > > On Sun, Jul 23, 2023 at 3:18 PM nop head <nop.head@gmail.com> wrote: > >> I am not sure 3D fillets are any use in FDM printing because of the >> layers. I only use 2D fillets to get rounded tool paths. >> >> On Sun, 23 Jul 2023, 20:08 Adrian Mariano, <avm4@cornell.edu> wrote: >> >>> I've been working on BOSL2 for a while with Revar, and we have 60k lines >>> of OpenSCAD code. Based on that experience, I think that the problem with >>> the OpenSCAD language is NOT fundamentally that it is functional. The >>> benefit of python is NOT fundamentally that it is procedural. There are >>> two basic problems with OpenSCAD for doing more complicated user space >>> processing. One is the inability to gain access to geometry, so to do user >>> space design, everything from the ground up has to be done "outside" of the >>> OpenSCAD geometry engine. The second problem is about efficiency. >>> OpenSCAD has no data structures. Graphics algorithms assume access to >>> sophisticated and efficient data structures like a priority queue or a tree >>> or other kinds of things that are impossible to implement efficiently in >>> OpenSCAD. So, yeah, you can implement the data structure, but instead of >>> being O(log N) or whatever it will be O(N^2). So then trying to implement >>> that process that uses that data structure in user space becomes >>> intractable. It's not clear to me that this limitation is fundamentally >>> about the language being functional. >>> >>> Note that the filleting process displayed by Sanjeev is straight forward >>> to implement in principle. You just find the intersection of two things >>> and put a fillet there. Two complications arise for doing this in >>> userspace in OpenSCAD. The first is representing the things, because >>> again, you can't use the geometry engine to do it. Now maybe a solution to >>> that problem is coming? The second complication is dealing with >>> self-intersections of the resulting polyhedron, because that's intractable >>> in OpenSCAD. Really it seems like OpenSCAD should have a primitive that >>> accepts a series of profiles and links them together into a polyhedron, >>> even if it's self-intersecting. >>> >>> Here's examples of doing the fillet problem entirely in OpenSCAD >>> userspace. There are many examples at the link below. I show a single one >>> in this message. >>> >>> >>> https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism >>> >>> [image: image.png] >>> >>> >>> On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar < >>> sprabhakar2006@gmail.com> wrote: >>> >>>> Sure >>>> I will try to explain the logic maybe in a day or two for the benefit >>>> of all who maybe interested in geometry manipulations. >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GS
Guenther Sohler
Sun, Jul 23, 2023 8:07 PM

nop head, this might be true with  an original print.
But if you e.g. handle ABS with acetone this is no longer the case.
In that case objects with  fillets will break far less than an inbound
sharp corner

cylinder(d=20,h=2);
cylinder(d=5,h=20);

the "edge" between the cylinder might very easily break, but you improve
the strength dramatically when you add a fillet instead.

On Sun, Jul 23, 2023 at 10:00 PM nop head nop.head@gmail.com wrote:

The fact that prints always break along layer lines means adding a fillet
that is made of layers hardly affects the strength in my opinion.

On Sun, 23 Jul 2023, 20:24 Adrian Mariano, avm4@cornell.edu wrote:

Are you thinking that the layers break the propagation of stress through
the model, causing stress to concentrate at each layer, instead of
concentrating at a corner?  Have you observed that models which fail by
layers shearing do so and random places in the model?

On Sun, Jul 23, 2023 at 3:18 PM nop head nop.head@gmail.com wrote:

I am not sure 3D fillets are any use in FDM printing because of the
layers. I only use 2D fillets to get rounded tool paths.

On Sun, 23 Jul 2023, 20:08 Adrian Mariano, avm4@cornell.edu wrote:

I've been working on BOSL2 for a while with Revar, and we have 60k
lines of OpenSCAD code.  Based on that experience, I think that the problem
with the OpenSCAD language is NOT fundamentally that it is functional.  The
benefit of python is NOT fundamentally that it is procedural.  There are
two basic problems with OpenSCAD for doing more complicated user space
processing.  One is the inability to gain access to geometry, so to do user
space design, everything from the ground up has to be done "outside" of the
OpenSCAD geometry engine.  The second problem is about efficiency.
OpenSCAD has no data structures.  Graphics algorithms assume access to
sophisticated and efficient data structures like a priority queue or a tree
or other kinds of things that are impossible to implement efficiently in
OpenSCAD.  So, yeah, you can implement the data structure, but instead of
being O(log N) or whatever it will be O(N^2).  So then trying to implement
that process that uses that data structure in user space becomes
intractable.  It's not clear to me that this limitation is fundamentally
about the language being functional.

Note that the filleting process displayed by Sanjeev is straight
forward to implement in principle.  You just find the intersection of two
things and put a fillet there.  Two complications arise for doing this in
userspace in OpenSCAD.  The first is representing the things, because
again, you can't use the geometry engine to do it.  Now maybe a solution to
that problem is coming?  The second complication is dealing with
self-intersections of the resulting polyhedron, because that's intractable
in OpenSCAD.  Really it seems like OpenSCAD should have a primitive that
accepts a series of profiles and links them together into a polyhedron,
even if it's self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD
userspace.  There are many examples at the link below.  I show a single one
in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

[image: image.png]

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit
of all who maybe interested in geometry manipulations.


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


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

nop head, this might be true with an original print. But if you e.g. handle ABS with acetone this is no longer the case. In that case objects with fillets will break far less than an inbound sharp corner cylinder(d=20,h=2); cylinder(d=5,h=20); the "edge" between the cylinder might very easily break, but you improve the strength dramatically when you add a fillet instead. On Sun, Jul 23, 2023 at 10:00 PM nop head <nop.head@gmail.com> wrote: > The fact that prints always break along layer lines means adding a fillet > that is made of layers hardly affects the strength in my opinion. > > On Sun, 23 Jul 2023, 20:24 Adrian Mariano, <avm4@cornell.edu> wrote: > >> Are you thinking that the layers break the propagation of stress through >> the model, causing stress to concentrate at each layer, instead of >> concentrating at a corner? Have you observed that models which fail by >> layers shearing do so and random places in the model? >> >> >> On Sun, Jul 23, 2023 at 3:18 PM nop head <nop.head@gmail.com> wrote: >> >>> I am not sure 3D fillets are any use in FDM printing because of the >>> layers. I only use 2D fillets to get rounded tool paths. >>> >>> On Sun, 23 Jul 2023, 20:08 Adrian Mariano, <avm4@cornell.edu> wrote: >>> >>>> I've been working on BOSL2 for a while with Revar, and we have 60k >>>> lines of OpenSCAD code. Based on that experience, I think that the problem >>>> with the OpenSCAD language is NOT fundamentally that it is functional. The >>>> benefit of python is NOT fundamentally that it is procedural. There are >>>> two basic problems with OpenSCAD for doing more complicated user space >>>> processing. One is the inability to gain access to geometry, so to do user >>>> space design, everything from the ground up has to be done "outside" of the >>>> OpenSCAD geometry engine. The second problem is about efficiency. >>>> OpenSCAD has no data structures. Graphics algorithms assume access to >>>> sophisticated and efficient data structures like a priority queue or a tree >>>> or other kinds of things that are impossible to implement efficiently in >>>> OpenSCAD. So, yeah, you can implement the data structure, but instead of >>>> being O(log N) or whatever it will be O(N^2). So then trying to implement >>>> that process that uses that data structure in user space becomes >>>> intractable. It's not clear to me that this limitation is fundamentally >>>> about the language being functional. >>>> >>>> Note that the filleting process displayed by Sanjeev is straight >>>> forward to implement in principle. You just find the intersection of two >>>> things and put a fillet there. Two complications arise for doing this in >>>> userspace in OpenSCAD. The first is representing the things, because >>>> again, you can't use the geometry engine to do it. Now maybe a solution to >>>> that problem is coming? The second complication is dealing with >>>> self-intersections of the resulting polyhedron, because that's intractable >>>> in OpenSCAD. Really it seems like OpenSCAD should have a primitive that >>>> accepts a series of profiles and links them together into a polyhedron, >>>> even if it's self-intersecting. >>>> >>>> Here's examples of doing the fillet problem entirely in OpenSCAD >>>> userspace. There are many examples at the link below. I show a single one >>>> in this message. >>>> >>>> >>>> https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism >>>> >>>> [image: image.png] >>>> >>>> >>>> On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar < >>>> sprabhakar2006@gmail.com> wrote: >>>> >>>>> Sure >>>>> I will try to explain the logic maybe in a day or two for the benefit >>>>> of all who maybe interested in geometry manipulations. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >> _______________________________________________ >> 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 >
SL
Steve Lelievre
Sun, Jul 23, 2023 8:14 PM

I'm confused...

On 2023-07-23 12:45 p.m., Guenther Sohler wrote:

Polyhedra are composed of triangles which are stored as coordinates
only! It would be much better to compose triangles from
indices into a global vertex array. This is something I am right now
working on.

I must have misunderstood your statement as it seems to me to say that
you're working on something that OpenSCAD's polyhedron command already
does: it takes a single list of vertices and each face is defined by a
list of vertex indices.

Could you clarify for me, please.

Steve

I'm confused... On 2023-07-23 12:45 p.m., Guenther Sohler wrote: > Polyhedra are composed of triangles which are stored as coordinates > only! It would be much better to compose triangles from > indices into a global vertex array. This is something I am right now > working on. I must have misunderstood your statement as it seems to me to say that you're working on something that OpenSCAD's polyhedron command already does: it takes a single list of vertices and each face is defined by a list of vertex indices. Could you clarify for me, please. Steve
GS
Guenther Sohler
Sun, Jul 23, 2023 8:23 PM

Sorry Steve,

I actually did not express myself very well.

you you create  cube in openscad, its stored internal as
6 faces, each containing 4 vertices and each vertices contains 3 values
representing x/y/z

the internal representation of openscad is actually triangles containing
coordinates instead of indices.

if you use openscad  polyhedron command in openscad of course you specity a
point list and a faces list containing indices.
but its immediately translated to this stupid coordinate-only format.

it would be much better if openscad object would interally contain:

  • a list of vertices
  • a list of polygons whereas each polygon is just a list of indices.

This is what i am currently working on and Marius appears to appreciate it,
but he wants a "Polygon Builder" in addition.

On Sun, Jul 23, 2023 at 10:15 PM Steve Lelievre <
steve.lelievre.canada@gmail.com> wrote:

I'm confused...

On 2023-07-23 12:45 p.m., Guenther Sohler wrote:

Polyhedra are composed of triangles which are stored as coordinates
only! It would be much better to compose triangles from
indices into a global vertex array. This is something I am right now
working on.

I must have misunderstood your statement as it seems to me to say that
you're working on something that OpenSCAD's polyhedron command already
does: it takes a single list of vertices and each face is defined by a
list of vertex indices.

Could you clarify for me, please.

Steve


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

Sorry Steve, I actually did not express myself very well. you you create cube in openscad, its stored internal as 6 faces, each containing 4 vertices and each vertices contains 3 values representing x/y/z the internal representation of openscad is actually triangles containing coordinates instead of indices. if you use openscad polyhedron command in openscad of course you specity a point list and a faces list containing indices. but its immediately translated to this stupid coordinate-only format. it would be much better if openscad object would interally contain: * a list of vertices * a list of polygons whereas each polygon is just a list of indices. This is what i am currently working on and Marius appears to appreciate it, but he wants a "Polygon Builder" in addition. On Sun, Jul 23, 2023 at 10:15 PM Steve Lelievre < steve.lelievre.canada@gmail.com> wrote: > I'm confused... > > On 2023-07-23 12:45 p.m., Guenther Sohler wrote: > > Polyhedra are composed of triangles which are stored as coordinates > > only! It would be much better to compose triangles from > > indices into a global vertex array. This is something I am right now > > working on. > > I must have misunderstood your statement as it seems to me to say that > you're working on something that OpenSCAD's polyhedron command already > does: it takes a single list of vertices and each face is defined by a > list of vertex indices. > > Could you clarify for me, please. > > Steve > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SL
Steve Lelievre
Sun, Jul 23, 2023 8:25 PM

Ah, now I understand.

Thanks

On Sun, Jul 23, 2023 at 13:23, Guenther Sohler guenther.sohler@gmail.com
wrote:

Sorry Steve,

I actually did not express myself very well.

you you create  cube in openscad, its stored internal as
6 faces, each containing 4 vertices and each vertices contains 3 values
representing x/y/z

the internal representation of openscad is actually triangles containing
coordinates instead of indices.

if you use openscad  polyhedron command in openscad of course you specity
a point list and a faces list containing indices.
but its immediately translated to this stupid coordinate-only format.

it would be much better if openscad object would interally contain:

  • a list of vertices
  • a list of polygons whereas each polygon is just a list of indices.

This is what i am currently working on and Marius appears to appreciate
it, but he wants a "Polygon Builder" in addition.

On Sun, Jul 23, 2023 at 10:15 PM Steve Lelievre <
steve.lelievre.canada@gmail.com> wrote:

I'm confused...

On 2023-07-23 12:45 p.m., Guenther Sohler wrote:

Polyhedra are composed of triangles which are stored as coordinates
only! It would be much better to compose triangles from
indices into a global vertex array. This is something I am right now
working on.

I must have misunderstood your statement as it seems to me to say that
you're working on something that OpenSCAD's polyhedron command already
does: it takes a single list of vertices and each face is defined by a
list of vertex indices.

Could you clarify for me, please.

Steve


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

--
Cell +1 778 837 5771

Ah, now I understand. Thanks On Sun, Jul 23, 2023 at 13:23, Guenther Sohler <guenther.sohler@gmail.com> wrote: > Sorry Steve, > > I actually did not express myself very well. > > you you create cube in openscad, its stored internal as > 6 faces, each containing 4 vertices and each vertices contains 3 values > representing x/y/z > > the internal representation of openscad is actually triangles containing > coordinates instead of indices. > > if you use openscad polyhedron command in openscad of course you specity > a point list and a faces list containing indices. > but its immediately translated to this stupid coordinate-only format. > > it would be much better if openscad object would interally contain: > > * a list of vertices > * a list of polygons whereas each polygon is just a list of indices. > > This is what i am currently working on and Marius appears to appreciate > it, but he wants a "Polygon Builder" in addition. > > > > On Sun, Jul 23, 2023 at 10:15 PM Steve Lelievre < > steve.lelievre.canada@gmail.com> wrote: > >> I'm confused... >> >> On 2023-07-23 12:45 p.m., Guenther Sohler wrote: >> > Polyhedra are composed of triangles which are stored as coordinates >> > only! It would be much better to compose triangles from >> > indices into a global vertex array. This is something I am right now >> > working on. >> >> I must have misunderstood your statement as it seems to me to say that >> you're working on something that OpenSCAD's polyhedron command already >> does: it takes a single list of vertices and each face is defined by a >> list of vertex indices. >> >> Could you clarify for me, please. >> >> Steve >> _______________________________________________ >> 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 > -- Cell +1 778 837 5771
RW
Rogier Wolff
Sun, Jul 23, 2023 8:34 PM

On Sun, Jul 23, 2023 at 09:00:06PM +0100, nop head wrote:

The fact that prints always break along layer lines means adding a fillet
that is made of layers hardly affects the strength in my opinion.

In some cases, you can print it so that the largest load ends up in
the X or Y direction and then a fillet perpendicular to that ends up
being printed in one layer in the XY plane. This can benefit from the
fillet from strength.

That said: I think also a fillet in the other direction will help with
strength. I have seen objects delaminate exactly in the stresspoint
where a fillet would have helped.

And even if it doesn't help, it looks nice and less "openscad-like".

Roger. 

On Sun, 23 Jul 2023, 20:24 Adrian Mariano, avm4@cornell.edu wrote:

Are you thinking that the layers break the propagation of stress through
the model, causing stress to concentrate at each layer, instead of
concentrating at a corner?  Have you observed that models which fail by
layers shearing do so and random places in the model?

On Sun, Jul 23, 2023 at 3:18 PM nop head nop.head@gmail.com wrote:

I am not sure 3D fillets are any use in FDM printing because of the
layers. I only use 2D fillets to get rounded tool paths.

On Sun, 23 Jul 2023, 20:08 Adrian Mariano, avm4@cornell.edu wrote:

I've been working on BOSL2 for a while with Revar, and we have 60k lines
of OpenSCAD code.  Based on that experience, I think that the problem with
the OpenSCAD language is NOT fundamentally that it is functional.  The
benefit of python is NOT fundamentally that it is procedural.  There are
two basic problems with OpenSCAD for doing more complicated user space
processing.  One is the inability to gain access to geometry, so to do user
space design, everything from the ground up has to be done "outside" of the
OpenSCAD geometry engine.  The second problem is about efficiency.
OpenSCAD has no data structures.  Graphics algorithms assume access to
sophisticated and efficient data structures like a priority queue or a tree
or other kinds of things that are impossible to implement efficiently in
OpenSCAD.  So, yeah, you can implement the data structure, but instead of
being O(log N) or whatever it will be O(N^2).  So then trying to implement
that process that uses that data structure in user space becomes
intractable.  It's not clear to me that this limitation is fundamentally
about the language being functional.

Note that the filleting process displayed by Sanjeev is straight forward
to implement in principle.  You just find the intersection of two things
and put a fillet there.  Two complications arise for doing this in
userspace in OpenSCAD.  The first is representing the things, because
again, you can't use the geometry engine to do it.  Now maybe a solution to
that problem is coming?  The second complication is dealing with
self-intersections of the resulting polyhedron, because that's intractable
in OpenSCAD.  Really it seems like OpenSCAD should have a primitive that
accepts a series of profiles and links them together into a polyhedron,
even if it's self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD
userspace.  There are many examples at the link below.  I show a single one
in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

[image: image.png]

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit
of all who maybe interested in geometry manipulations.


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


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

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Sun, Jul 23, 2023 at 09:00:06PM +0100, nop head wrote: > The fact that prints always break along layer lines means adding a fillet > that is made of layers hardly affects the strength in my opinion. In some cases, you can print it so that the largest load ends up in the X or Y direction and then a fillet perpendicular to that ends up being printed in one layer in the XY plane. This can benefit from the fillet from strength. That said: I think also a fillet in the other direction will help with strength. I have seen objects delaminate exactly in the stresspoint where a fillet would have helped. And even if it doesn't help, it looks nice and less "openscad-like". Roger. > > On Sun, 23 Jul 2023, 20:24 Adrian Mariano, <avm4@cornell.edu> wrote: > > > Are you thinking that the layers break the propagation of stress through > > the model, causing stress to concentrate at each layer, instead of > > concentrating at a corner? Have you observed that models which fail by > > layers shearing do so and random places in the model? > > > > > > On Sun, Jul 23, 2023 at 3:18 PM nop head <nop.head@gmail.com> wrote: > > > >> I am not sure 3D fillets are any use in FDM printing because of the > >> layers. I only use 2D fillets to get rounded tool paths. > >> > >> On Sun, 23 Jul 2023, 20:08 Adrian Mariano, <avm4@cornell.edu> wrote: > >> > >>> I've been working on BOSL2 for a while with Revar, and we have 60k lines > >>> of OpenSCAD code. Based on that experience, I think that the problem with > >>> the OpenSCAD language is NOT fundamentally that it is functional. The > >>> benefit of python is NOT fundamentally that it is procedural. There are > >>> two basic problems with OpenSCAD for doing more complicated user space > >>> processing. One is the inability to gain access to geometry, so to do user > >>> space design, everything from the ground up has to be done "outside" of the > >>> OpenSCAD geometry engine. The second problem is about efficiency. > >>> OpenSCAD has no data structures. Graphics algorithms assume access to > >>> sophisticated and efficient data structures like a priority queue or a tree > >>> or other kinds of things that are impossible to implement efficiently in > >>> OpenSCAD. So, yeah, you can implement the data structure, but instead of > >>> being O(log N) or whatever it will be O(N^2). So then trying to implement > >>> that process that uses that data structure in user space becomes > >>> intractable. It's not clear to me that this limitation is fundamentally > >>> about the language being functional. > >>> > >>> Note that the filleting process displayed by Sanjeev is straight forward > >>> to implement in principle. You just find the intersection of two things > >>> and put a fillet there. Two complications arise for doing this in > >>> userspace in OpenSCAD. The first is representing the things, because > >>> again, you can't use the geometry engine to do it. Now maybe a solution to > >>> that problem is coming? The second complication is dealing with > >>> self-intersections of the resulting polyhedron, because that's intractable > >>> in OpenSCAD. Really it seems like OpenSCAD should have a primitive that > >>> accepts a series of profiles and links them together into a polyhedron, > >>> even if it's self-intersecting. > >>> > >>> Here's examples of doing the fillet problem entirely in OpenSCAD > >>> userspace. There are many examples at the link below. I show a single one > >>> in this message. > >>> > >>> > >>> https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism > >>> > >>> [image: image.png] > >>> > >>> > >>> On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar < > >>> sprabhakar2006@gmail.com> wrote: > >>> > >>>> Sure > >>>> I will try to explain the logic maybe in a day or two for the benefit > >>>> of all who maybe interested in geometry manipulations. > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> 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 > >> > > _______________________________________________ > > 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 -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
RD
Revar Desmera
Sun, Jul 23, 2023 9:36 PM

3D fillets aren’t only for strength, though. Sometimes they are just nice for aesthetic reasons.

-Revar

On Jul 23, 2023, at 1:00 PM, nop head <nop.head@gmail.com> wrote:

The fact that prints always break along layer lines means adding a fillet that is made of layers hardly affects the strength in my opinion.

On Sun, 23 Jul 2023, 20:24 Adrian Mariano, <avm4@cornell.edu> wrote:

Are you thinking that the layers break the propagation of stress through the model, causing stress to concentrate at each layer, instead of concentrating at a corner? Have you observed that models which fail by layers shearing do so and random places in the model?

On Sun, Jul 23, 2023 at 3:18 PM nop head <nop.head@gmail.com> wrote:

I am not sure 3D fillets are any use in FDM printing because of the layers. I only use 2D fillets to get rounded tool paths.

On Sun, 23 Jul 2023, 20:08 Adrian Mariano, <avm4@cornell.edu> wrote:

I've been working on BOSL2 for a while with Revar, and we have 60k lines of OpenSCAD code. Based on that experience, I think that the problem with the OpenSCAD language is NOT fundamentally that it is functional. The benefit of python is NOT fundamentally that it is procedural. There are two basic problems with OpenSCAD for doing more complicated user space processing. One is the inability to gain access to geometry, so to do user space design, everything from the ground up has to be done "outside" of the OpenSCAD geometry engine. The second problem is about efficiency. OpenSCAD has no data structures. Graphics algorithms assume access to sophisticated and efficient data structures like a priority queue or a tree or other kinds of things that are impossible to implement efficiently in OpenSCAD. So, yeah, you can implement the data structure, but instead of being O(log N) or whatever it will be O(N^2). So then trying to implement that process that uses that data structure in user space becomes intractable. It's not clear to me that this limitation is fundamentally about the language being functional.

Note that the filleting process displayed by Sanjeev is straight forward to implement in principle. You just find the intersection of two things and put a fillet there. Two complications arise for doing this in userspace in OpenSCAD. The first is representing the things, because again, you can't use the geometry engine to do it. Now maybe a solution to that problem is coming? The second complication is dealing with self-intersections of the resulting polyhedron, because that's intractable in OpenSCAD. Really it seems like OpenSCAD should have a primitive that accepts a series of profiles and links them together into a polyhedron, even if it's self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD userspace. There are many examples at the link below. I show a single one in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

<image.png>

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:

SureI will try to explain the logic maybe in a day or two for the benefit of all who maybe interested in geometry manipulations.

_______________________________________________
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

_______________________________________________
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

RD
Revar Desmera
Sun, Jul 23, 2023 9:44 PM

I could care less if BOSL2 becomes obsolete or not. If efficient data structures and geometry access finally become available in OpenSCAD, then BOSL3 will be rewritten to use them. I will celebrate the improvements.

-Revar

On Jul 23, 2023, at 12:45 PM, Guenther Sohler <guenther.sohler@gmail.com> wrote:

Adriano, thank you for your input

I appreciate your work with Revar on BOSL2 and I understand your reasoning that BOSL2 could become obsolete,

but I am sure it will not. When openscad becomes more powerful, BOSL code might be able to code with fewer lines, but BOSL2 is still very important to openscad.

Yes, I would appreciate OpenSCAD to have access to the internal vertices to read them and work with the coordinates.

Unfortunately this is not as easy, because often a model is developed in OpenCSG and there are no coordinates available in OpenSCG.

If you accept the fact that a full render has to be performed to get coordinates of a submodule. It's just a matter of a PR.

If somebody guarantees, that such a PR will actually be accepted/merged, time to develop on such a PR would not be an issue.

My Main Problem with SCAD language is that variables cannot be reassigned, once they are set -> could probably be solved with most other interpreter languages.

The main benefit I see with python is not the opposite of the previous statement. Python is just any interpreter language choice. but its very easy to learn and very easy to read.

PLUS: it has many accompanying libraries which will help you to do fancy stuff with OpenSCAD.

for example this one:

http://guenther-sohler.net/openscad/examples/qrcode.txt

these few lines of code creates an qr code display object , which you can scan with your mobile. (Yes, i have seen openscad qr code libs, but this one appears easier and has more options)

And your second statement : OpenSCAD has datastructures is also valid. Polyhedra are composed of triangles which are stored as coordinates only! It would be much better to compose triangles from

indices into a global vertex array. This is something I am right now working on.(some ctests are not passed for my PR)

Information which could also be stored with the "indexed " polygons is: a lookup table from point -> which triangles use this point.

And Yes, I like your fillet and I personally appreciate , if Sanjeev's knowledge could go into GeomtryEvaluator.cc

In the End, I'd like to see openscad become more powerful by being able to change variables once they are set and to use external libs.

And yes, I know that I am aware that people might see this as a security risk, but those people can stay safe and do not even need to bother when not activating it.

The rest and the interested people instead can leverage the new power coming from python.

Thank you for reading

On Sun, Jul 23, 2023 at 9:08 PM Adrian Mariano <avm4@cornell.edu> wrote:

I've been working on BOSL2 for a while with Revar, and we have 60k lines of OpenSCAD code. Based on that experience, I think that the problem with the OpenSCAD language is NOT fundamentally that it is functional. The benefit of python is NOT fundamentally that it is procedural. There are two basic problems with OpenSCAD for doing more complicated user space processing. One is the inability to gain access to geometry, so to do user space design, everything from the ground up has to be done "outside" of the OpenSCAD geometry engine. The second problem is about efficiency. OpenSCAD has no data structures. Graphics algorithms assume access to sophisticated and efficient data structures like a priority queue or a tree or other kinds of things that are impossible to implement efficiently in OpenSCAD. So, yeah, you can implement the data structure, but instead of being O(log N) or whatever it will be O(N^2). So then trying to implement that process that uses that data structure in user space becomes intractable. It's not clear to me that this limitation is fundamentally about the language being functional.

Note that the filleting process displayed by Sanjeev is straight forward to implement in principle. You just find the intersection of two things and put a fillet there. Two complications arise for doing this in userspace in OpenSCAD. The first is representing the things, because again, you can't use the geometry engine to do it. Now maybe a solution to that problem is coming? The second complication is dealing with self-intersections of the resulting polyhedron, because that's intractable in OpenSCAD. Really it seems like OpenSCAD should have a primitive that accepts a series of profiles and links them together into a polyhedron, even if it's self-intersecting.

Here's examples of doing the fillet problem entirely in OpenSCAD userspace. There are many examples at the link below. I show a single one in this message.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-join_prism

<image.png>

On Sun, Jul 23, 2023 at 1:14 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:

SureI will try to explain the logic maybe in a day or two for the benefit of all who maybe interested in geometry manipulations.

_______________________________________________
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
Mon, Jul 24, 2023 4:31 PM

please see the explanation.
Although it seems quite complicated, but it takes around 1 sec to compute
and display the results
I hope this helps

On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.

please see the explanation. Although it seems quite complicated, but it takes around 1 sec to compute and display the results I hope this helps On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Sure > I will try to explain the logic maybe in a day or two for the benefit of > all who maybe interested in geometry manipulations. > > > >
RW
Rogier Wolff
Mon, Jul 24, 2023 5:05 PM

On Mon, Jul 24, 2023 at 10:01:22PM +0530, Sanjeev Prabhakar wrote:

please see the explanation.
Although it seems quite complicated, but it takes around 1 sec to compute
and display the results
I hope this helps

Thanks for your nice explanation of the algorithm.

But what happens if I try to fillet this with radius of about 5:

cube ([40,40,10]);
translate ([0,20,12]) rotate ([0,90,0]) cylinder (d1=15, d2=0, h=40);

?

At x=0... the intersection line is not a line, but a plane. Or the
curve is not closed as you expect.

Near x=0, there is probably no problem.

But as x increases... ehh actually, directly from the start: the
bezier will partially lie INSIDE the orginal object. This means that
if you take that curve instead of the original object you'll have
taken material AWAY from the object. That is something that you don't
want to happen with a fillet.Think of adding a fillet as adding putty
to the sharp corner between the objects. This only ADDS to the
objects, never subtracts.

Roger. 

On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.


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

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Mon, Jul 24, 2023 at 10:01:22PM +0530, Sanjeev Prabhakar wrote: > please see the explanation. > Although it seems quite complicated, but it takes around 1 sec to compute > and display the results > I hope this helps Thanks for your nice explanation of the algorithm. But what happens if I try to fillet this with radius of about 5: cube ([40,40,10]); translate ([0,20,12]) rotate ([0,90,0]) cylinder (d1=15, d2=0, h=40); ? At x=0... the intersection line is not a line, but a plane. Or the curve is not closed as you expect. Near x=0, there is probably no problem. But as x increases... ehh actually, directly from the start: the bezier will partially lie INSIDE the orginal object. This means that if you take that curve instead of the original object you'll have taken material AWAY from the object. That is something that you don't want to happen with a fillet.Think of adding a fillet as adding putty to the sharp corner between the objects. This only ADDS to the objects, never subtracts. Roger. > On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > > > Sure > > I will try to explain the logic maybe in a day or two for the benefit of > > all who maybe interested in geometry manipulations. > > > > > > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
SP
Sanjeev Prabhakar
Mon, Jul 24, 2023 6:06 PM

The approach explained in my earlier message will not work in such cases.

[image: Screenshot 2023-07-24 at 11.32.15 PM.png]

On Mon, 24 Jul 2023 at 22:35, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Mon, Jul 24, 2023 at 10:01:22PM +0530, Sanjeev Prabhakar wrote:

please see the explanation.
Although it seems quite complicated, but it takes around 1 sec to compute
and display the results
I hope this helps

Thanks for your nice explanation of the algorithm.

But what happens if I try to fillet this with radius of about 5:

cube ([40,40,10]);
translate ([0,20,12]) rotate ([0,90,0]) cylinder (d1=15, d2=0, h=40);

?

At x=0... the intersection line is not a line, but a plane. Or the
curve is not closed as you expect.

Near x=0, there is probably no problem.

But as x increases... ehh actually, directly from the start: the
bezier will partially lie INSIDE the orginal object. This means that
if you take that curve instead of the original object you'll have
taken material AWAY from the object. That is something that you don't
want to happen with a fillet.Think of adding a fillet as adding putty
to the sharp corner between the objects. This only ADDS to the
objects, never subtracts.

     Roger.

On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar <

wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit

of

all who maybe interested in geometry manipulations.


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

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.


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

The approach explained in my earlier message will not work in such cases. [image: Screenshot 2023-07-24 at 11.32.15 PM.png] On Mon, 24 Jul 2023 at 22:35, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > On Mon, Jul 24, 2023 at 10:01:22PM +0530, Sanjeev Prabhakar wrote: > > please see the explanation. > > Although it seems quite complicated, but it takes around 1 sec to compute > > and display the results > > I hope this helps > > Thanks for your nice explanation of the algorithm. > > But what happens if I try to fillet this with radius of about 5: > > cube ([40,40,10]); > translate ([0,20,12]) rotate ([0,90,0]) cylinder (d1=15, d2=0, h=40); > > ? > > At x=0... the intersection line is not a line, but a plane. Or the > curve is not closed as you expect. > > Near x=0, there is probably no problem. > > But as x increases... ehh actually, directly from the start: the > bezier will partially lie INSIDE the orginal object. This means that > if you take that curve instead of the original object you'll have > taken material AWAY from the object. That is something that you don't > want to happen with a fillet.Think of adding a fillet as adding putty > to the sharp corner between the objects. This only ADDS to the > objects, never subtracts. > > > > > Roger. > > > On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar < > sprabhakar2006@gmail.com> > > wrote: > > > > > Sure > > > I will try to explain the logic maybe in a day or two for the benefit > of > > > all who maybe interested in geometry manipulations. > > > > > > > > > > > > > > > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > -- > ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 > ** > ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** > f equals m times a. When your f is steady, and your m is going down > your a is going up. -- Chris Hadfield about flying up the space shuttle. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
TP
Torsten Paul
Mon, Jul 24, 2023 7:05 PM

On 24.07.23 20:06, Sanjeev Prabhakar wrote:

The approach explained in my earlier message will not work in such cases.

Thanks for the explanation, this is nicely visualized. I suppose
subdividing some of the surfaces might also be needed?

Are there solutions that are more general? For the experienced user
it's probably fine to give a couple of strategies and let them decide,
but for the casual user that could be difficult to select what to use
and when.

What do GUI CAD systems come up with for this example with the cone?

ciao,
Torsten.

On 24.07.23 20:06, Sanjeev Prabhakar wrote: > The approach explained in my earlier message will not work in such cases. Thanks for the explanation, this is nicely visualized. I suppose subdividing some of the surfaces might also be needed? Are there solutions that are more general? For the experienced user it's probably fine to give a couple of strategies and let them decide, but for the casual user that could be difficult to select what to use and when. What do GUI CAD systems come up with for this example with the cone? ciao, Torsten.
GH
gene heskett
Mon, Jul 24, 2023 9:33 PM

On 7/24/23 12:32, Sanjeev Prabhakar wrote:

please see the explanation.
Although it seems quite complicated, but it takes around 1 sec to compute
and display the results
I hope this helps

On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.

And this looks as if a set of tool paths could be defined in gcode from
it, RS-274-D IOW, respecting the machines spindle power & rpm ability
for depth of cut. # of loops and final finish accuracy determined by how
close the radius of the fillet matches the tool nose radius. If this can
be done in a useful time frame, the finished code to do this for
subtractive machining would be a good src of funds to bank for your
retirement.

Cheers, Gene Heskett.

"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.

On 7/24/23 12:32, Sanjeev Prabhakar wrote: > please see the explanation. > Although it seems quite complicated, but it takes around 1 sec to compute > and display the results > I hope this helps > > On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> Sure >> I will try to explain the logic maybe in a day or two for the benefit of >> all who maybe interested in geometry manipulations. >> And this looks as if a set of tool paths could be defined in gcode from it, RS-274-D IOW, respecting the machines spindle power & rpm ability for depth of cut. # of loops and final finish accuracy determined by how close the radius of the fillet matches the tool nose radius. If this can be done in a useful time frame, the finished code to do this for subtractive machining would be a good src of funds to bank for your retirement. Cheers, Gene Heskett. -- "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 Genes Web page <http://geneslinuxbox.net:6309/>
SP
Sanjeev Prabhakar
Tue, Jul 25, 2023 12:48 AM

Haha, thanks
retirement is nearby also

On Tue, 25 Jul 2023 at 03:03, gene heskett gheskett@shentel.net wrote:

On 7/24/23 12:32, Sanjeev Prabhakar wrote:

please see the explanation.
Although it seems quite complicated, but it takes around 1 sec to compute
and display the results
I hope this helps

On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar <

wrote:

Sure
I will try to explain the logic maybe in a day or two for the benefit of
all who maybe interested in geometry manipulations.

And this looks as if a set of tool paths could be defined in gcode from
it, RS-274-D IOW, respecting the machines spindle power & rpm ability
for depth of cut. # of loops and final finish accuracy determined by how
close the radius of the fillet matches the tool nose radius. If this can
be done in a useful time frame, the finished code to do this for
subtractive machining would be a good src of funds to bank for your
retirement.

Cheers, Gene Heskett.

"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.


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

Haha, thanks retirement is nearby also On Tue, 25 Jul 2023 at 03:03, gene heskett <gheskett@shentel.net> wrote: > On 7/24/23 12:32, Sanjeev Prabhakar wrote: > > please see the explanation. > > Although it seems quite complicated, but it takes around 1 sec to compute > > and display the results > > I hope this helps > > > > On Sun, 23 Jul 2023 at 22:43, Sanjeev Prabhakar < > sprabhakar2006@gmail.com> > > wrote: > > > >> Sure > >> I will try to explain the logic maybe in a day or two for the benefit of > >> all who maybe interested in geometry manipulations. > >> > And this looks as if a set of tool paths could be defined in gcode from > it, RS-274-D IOW, respecting the machines spindle power & rpm ability > for depth of cut. # of loops and final finish accuracy determined by how > close the radius of the fillet matches the tool nose radius. If this can > be done in a useful time frame, the finished code to do this for > subtractive machining would be a good src of funds to bank for your > retirement. > > Cheers, Gene Heskett. > -- > "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 > Genes Web page <http://geneslinuxbox.net:6309/> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Tue, Jul 25, 2023 12:51 AM

rather than exactly matching the cone base with the cube it can be offset
to get the 3 lines and then shave off the extra cone.
This could be one solution I can think off
[image: Screenshot 2023-07-25 at 6.16.28 AM.png]

On Tue, 25 Jul 2023 at 00:36, Torsten Paul Torsten.Paul@gmx.de wrote:

On 24.07.23 20:06, Sanjeev Prabhakar wrote:

The approach explained in my earlier message will not work in such cases.

Thanks for the explanation, this is nicely visualized. I suppose
subdividing some of the surfaces might also be needed?

Are there solutions that are more general? For the experienced user
it's probably fine to give a couple of strategies and let them decide,
but for the casual user that could be difficult to select what to use
and when.

What do GUI CAD systems come up with for this example with the cone?

ciao,
Torsten.


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

rather than exactly matching the cone base with the cube it can be offset to get the 3 lines and then shave off the extra cone. This could be one solution I can think off [image: Screenshot 2023-07-25 at 6.16.28 AM.png] On Tue, 25 Jul 2023 at 00:36, Torsten Paul <Torsten.Paul@gmx.de> wrote: > On 24.07.23 20:06, Sanjeev Prabhakar wrote: > > The approach explained in my earlier message will not work in such cases. > > Thanks for the explanation, this is nicely visualized. I suppose > subdividing some of the surfaces might also be needed? > > Are there solutions that are more general? For the experienced user > it's probably fine to give a couple of strategies and let them decide, > but for the casual user that could be difficult to select what to use > and when. > > What do GUI CAD systems come up with for this example with the cone? > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GH
gene heskett
Tue, Jul 25, 2023 2:11 AM

On 7/24/23 20:49, Sanjeev Prabhakar wrote:

Haha, thanks
retirement is nearby also

While I as I look to my 89th in a couple months will be retired for 23
years. I am a C.E.T. with an 8th grade education, and don't have the
math skills to do what you are doing. Rather precocious electronically
before I was a teenager, my 8th grade algebra teacher thought he was a
George Carlin and far more interested in what was in the girls panties
than he was in actually teaching the algebra class he was being paid to
do. So I quit school and went to work fixing what was then a brand new
tech, TV's at 14 yo. You would not be far wrong to say I grew up with a
hot soldering iron in one hand and a scope probe in the other by the
time I hit 17.  But real math? Nope...  What little I can do was taught
to me by a TI SR51 or a log-log-duplex Pickett slipstick. What you are
doing might as well be black magic to me.

But if you have an electronics problem, I can probably help.

[...]

Cheers, Gene Heskett.

"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.

On 7/24/23 20:49, Sanjeev Prabhakar wrote: > Haha, thanks > retirement is nearby also > While I as I look to my 89th in a couple months will be retired for 23 years. I am a C.E.T. with an 8th grade education, and don't have the math skills to do what you are doing. Rather precocious electronically before I was a teenager, my 8th grade algebra teacher thought he was a George Carlin and far more interested in what was in the girls panties than he was in actually teaching the algebra class he was being paid to do. So I quit school and went to work fixing what was then a brand new tech, TV's at 14 yo. You would not be far wrong to say I grew up with a hot soldering iron in one hand and a scope probe in the other by the time I hit 17. But real math? Nope... What little I can do was taught to me by a TI SR51 or a log-log-duplex Pickett slipstick. What you are doing might as well be black magic to me. But if you have an electronics problem, I can probably help. [...] Cheers, Gene Heskett. -- "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 Genes Web page <http://geneslinuxbox.net:6309/>
SP
Sanjeev Prabhakar
Tue, Jul 25, 2023 3:09 AM

Hi Gene,
You don't need to know the maths involved here,  there are functions
written to do all the maths and you need to just know how to use them.
Regards

On Tue, 25 Jul, 2023, 7:42 am gene heskett, gheskett@shentel.net wrote:

On 7/24/23 20:49, Sanjeev Prabhakar wrote:

Haha, thanks
retirement is nearby also

While I as I look to my 89th in a couple months will be retired for 23
years. I am a C.E.T. with an 8th grade education, and don't have the
math skills to do what you are doing. Rather precocious electronically
before I was a teenager, my 8th grade algebra teacher thought he was a
George Carlin and far more interested in what was in the girls panties
than he was in actually teaching the algebra class he was being paid to
do. So I quit school and went to work fixing what was then a brand new
tech, TV's at 14 yo. You would not be far wrong to say I grew up with a
hot soldering iron in one hand and a scope probe in the other by the
time I hit 17.  But real math? Nope...  What little I can do was taught
to me by a TI SR51 or a log-log-duplex Pickett slipstick. What you are
doing might as well be black magic to me.

But if you have an electronics problem, I can probably help.

[...]

Cheers, Gene Heskett.

"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.


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

Hi Gene, You don't need to know the maths involved here, there are functions written to do all the maths and you need to just know how to use them. Regards On Tue, 25 Jul, 2023, 7:42 am gene heskett, <gheskett@shentel.net> wrote: > On 7/24/23 20:49, Sanjeev Prabhakar wrote: > > Haha, thanks > > retirement is nearby also > > > While I as I look to my 89th in a couple months will be retired for 23 > years. I am a C.E.T. with an 8th grade education, and don't have the > math skills to do what you are doing. Rather precocious electronically > before I was a teenager, my 8th grade algebra teacher thought he was a > George Carlin and far more interested in what was in the girls panties > than he was in actually teaching the algebra class he was being paid to > do. So I quit school and went to work fixing what was then a brand new > tech, TV's at 14 yo. You would not be far wrong to say I grew up with a > hot soldering iron in one hand and a scope probe in the other by the > time I hit 17. But real math? Nope... What little I can do was taught > to me by a TI SR51 or a log-log-duplex Pickett slipstick. What you are > doing might as well be black magic to me. > > But if you have an electronics problem, I can probably help. > > [...] > > Cheers, Gene Heskett. > -- > "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 > Genes Web page <http://geneslinuxbox.net:6309/> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Rogier Wolff
Tue, Jul 25, 2023 9:04 AM

On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar wrote:

The approach explained in my earlier message will not work in such cases.

Isn't fillet about the same as:

minkovski with a sphere of the fillet radius, Then invert, again
minkovski with that sphere and then invert again.

That would at least give a defined result for my "difficult case".

Roger. 

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar wrote: > The approach explained in my earlier message will not work in such cases. Isn't fillet about the same as: minkovski with a sphere of the fillet radius, Then invert, again minkovski with that sphere and then invert again. That would at least give a defined result for my "difficult case". Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
SP
Sanjeev Prabhakar
Tue, Jul 25, 2023 2:55 PM

I have not used minkowski method in openscad, maybe someone else can comment

On Tue, 25 Jul 2023 at 14:34, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar wrote:

The approach explained in my earlier message will not work in such cases.

Isn't fillet about the same as:

minkovski with a sphere of the fillet radius, Then invert, again
minkovski with that sphere and then invert again.

That would at least give a defined result for my "difficult case".

     Roger.

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.


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

I have not used minkowski method in openscad, maybe someone else can comment On Tue, 25 Jul 2023 at 14:34, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar wrote: > > The approach explained in my earlier message will not work in such cases. > > Isn't fillet about the same as: > > minkovski with a sphere of the fillet radius, Then invert, again > minkovski with that sphere and then invert again. > > That would at least give a defined result for my "difficult case". > > Roger. > > -- > ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 > ** > ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** > f equals m times a. When your f is steady, and your m is going down > your a is going up. -- Chris Hadfield about flying up the space shuttle. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
NH
nop head
Tue, Jul 25, 2023 3:18 PM

Three minkowskis of any non-trivial shape takes forever. This example takes
more than 5 minutes:

[image: round.png]

On Tue, 25 Jul 2023 at 15:56, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I have not used minkowski method in openscad, maybe someone else can
comment

On Tue, 25 Jul 2023 at 14:34, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar wrote:

The approach explained in my earlier message will not work in such

cases.

Isn't fillet about the same as:

minkovski with a sphere of the fillet radius, Then invert, again
minkovski with that sphere and then invert again.

That would at least give a defined result for my "difficult case".

     Roger.

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233
**
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.


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

Three minkowskis of any non-trivial shape takes forever. This example takes more than 5 minutes: [image: round.png] On Tue, 25 Jul 2023 at 15:56, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I have not used minkowski method in openscad, maybe someone else can > comment > > On Tue, 25 Jul 2023 at 14:34, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > >> On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar wrote: >> > The approach explained in my earlier message will not work in such >> cases. >> >> Isn't fillet about the same as: >> >> minkovski with a sphere of the fillet radius, Then invert, again >> minkovski with that sphere and then invert again. >> >> That would at least give a defined result for my "difficult case". >> >> Roger. >> >> -- >> ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 >> ** >> ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 >> ** >> f equals m times a. When your f is steady, and your m is going down >> your a is going up. -- Chris Hadfield about flying up the space shuttle. >> _______________________________________________ >> 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 >
TP
Torsten Paul
Tue, Jul 25, 2023 3:36 PM

On 25.07.23 17:18, nop head wrote:

Three minkowskis of any non-trivial shape takes forever. This example takes more than 5 minutes.

What's the code for this example?

ciao,
Torsten.

On 25.07.23 17:18, nop head wrote: > Three minkowskis of any non-trivial shape takes forever. This example takes more than 5 minutes. What's the code for this example? ciao, Torsten.
NH
nop head
Tue, Jul 25, 2023 4:55 PM

It is the round_3D test from NopSCADLib. I have distilled it out to this:

$fa = 6;
$fs = 0.25;
inf = 1e10;      // very big
eps = 1/128;    // small fudge factor to stop CSG barfing on coincident
faces.
layer_height    = 0.25;
teardrop_angle  = 45;

function r2sides(r) = $fn ? $fn : ceil(max(min(360/ $fa, r * 2 * PI / $fs),
5));    //! Replicates the OpenSCAD logic to calculate the number of sides
from the radius
function r2sides4n(r) = floor((r2sides(r) + 3) / 4) * 4;
//! Round up the number of sides to a multiple of 4 to ensure
points land on all axes

module circle4n(r, d = undef) {                    //! Circle with
multiple of 4 vertices
R = is_undef(d) ? r : d / 2;
circle(R, $fn = r2sides4n(R));
}

module extrude_if(h, center = true)                //! Extrudes 2D object
to 3D when h is nonzero, otherwise leaves it 2D
if(h)
linear_extrude(h, center = center, convexity = 5) // 3D
children();
else
children();                                // 2D

module teardrop(h, r, center = true, truncate = true, chamfer = 0,
chamfer_both_ends = true, plus = false) { //! For making horizontal holes
that don't need support material, set truncate = false to make
traditional RepRap teardrops that don't even need bridging
module teardrop_2d(r, truncate) {
er = layer_height / 2 - eps;    // Extrusion edge radius
R = plus ? r + er : r;          // Corrected radius
offset = plus ? -er : 0;        // Offset inwards
hull()
for(side = [0 : 1])
mirror([side, 0, 0])
intersection() {
hull()
translate([offset, 0]) {
circle4n(R);

                            if (teardrop_angle > 0) {
                                x = R * tan(teardrop_angle / 2);
                                if(truncate)
                                    translate([0, R / 2])
                                        square([2 * x, R], center =

true);
else
polygon([[0, 0], [eps, 0], [0, R +
x * tan(min(teardrop_angle, 90 - eps))]]);
}
}
translate([0, -2 * R])
square([R, 4 * R]);
}
}

render(convexity = 5)
    extrude_if(h, center)
        teardrop_2d(r, truncate);

}

module offset_3D(r, chamfer_base = false) { //! Offset 3D shape by
specified radius r, positive or negative.
module ball(r)
if(chamfer_base)
rotate_extrude()
intersection() {
rotate(180)
teardrop(0, r);

                translate([0, -r])
                    square([r, 2 * r]);
            }
    else
        sphere(r);

if(r > 0)
    minkowski() {
        children();

        ball(r);
    }
else
    if(r < 0)
        render() difference() {
            cube(inf / 2, center = true);

            minkowski() {
                difference() {
                    cube(inf, center = true);

                    children();
                }
                ball(-r);
            }
        }
    else
        children();

}

module round_3D(r, ir = undef, or = undef, chamfer_base = false) { //!
Round a 3D child single radius or separate inside and outside radii
IR = is_undef(ir) ? r : ir;
OR = is_undef(or) ? r : or;
offset_3D(OR, chamfer_base)
offset_3D(-OR -IR, chamfer_base)
offset_3D(IR, chamfer_base)
children();
}

module shape()
difference() {
square(40, center = true);

    square([20, 20], center = true);
}

module rounds() {
translate([50, 0])
round_3D(or = 4, ir = 2, chamfer_base = true, $fn = 16)
linear_extrude(40, center = true)
shape();
}

rounds();

On Tue, 25 Jul 2023 at 16:37, Torsten Paul Torsten.Paul@gmx.de wrote:

On 25.07.23 17:18, nop head wrote:

Three minkowskis of any non-trivial shape takes forever. This example

takes more than 5 minutes.

What's the code for this example?

ciao,
Torsten.


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

It is the round_3D test from NopSCADLib. I have distilled it out to this: $fa = 6; $fs = 0.25; inf = 1e10; // very big eps = 1/128; // small fudge factor to stop CSG barfing on coincident faces. layer_height = 0.25; teardrop_angle = 45; function r2sides(r) = $fn ? $fn : ceil(max(min(360/ $fa, r * 2 * PI / $fs), 5)); //! Replicates the OpenSCAD logic to calculate the number of sides from the radius function r2sides4n(r) = floor((r2sides(r) + 3) / 4) * 4; //! Round up the number of sides to a multiple of 4 to ensure points land on all axes module circle4n(r, d = undef) { //! Circle with multiple of 4 vertices R = is_undef(d) ? r : d / 2; circle(R, $fn = r2sides4n(R)); } module extrude_if(h, center = true) //! Extrudes 2D object to 3D when `h` is nonzero, otherwise leaves it 2D if(h) linear_extrude(h, center = center, convexity = 5) // 3D children(); else children(); // 2D module teardrop(h, r, center = true, truncate = true, chamfer = 0, chamfer_both_ends = true, plus = false) { //! For making horizontal holes that don't need support material, set `truncate = false` to make traditional RepRap teardrops that don't even need bridging module teardrop_2d(r, truncate) { er = layer_height / 2 - eps; // Extrusion edge radius R = plus ? r + er : r; // Corrected radius offset = plus ? -er : 0; // Offset inwards hull() for(side = [0 : 1]) mirror([side, 0, 0]) intersection() { hull() translate([offset, 0]) { circle4n(R); if (teardrop_angle > 0) { x = R * tan(teardrop_angle / 2); if(truncate) translate([0, R / 2]) square([2 * x, R], center = true); else polygon([[0, 0], [eps, 0], [0, R + x * tan(min(teardrop_angle, 90 - eps))]]); } } translate([0, -2 * R]) square([R, 4 * R]); } } render(convexity = 5) extrude_if(h, center) teardrop_2d(r, truncate); } module offset_3D(r, chamfer_base = false) { //! Offset 3D shape by specified radius `r`, positive or negative. module ball(r) if(chamfer_base) rotate_extrude() intersection() { rotate(180) teardrop(0, r); translate([0, -r]) square([r, 2 * r]); } else sphere(r); if(r > 0) minkowski() { children(); ball(r); } else if(r < 0) render() difference() { cube(inf / 2, center = true); minkowski() { difference() { cube(inf, center = true); children(); } ball(-r); } } else children(); } module round_3D(r, ir = undef, or = undef, chamfer_base = false) { //! Round a 3D child single radius or separate inside and outside radii IR = is_undef(ir) ? r : ir; OR = is_undef(or) ? r : or; offset_3D(OR, chamfer_base) offset_3D(-OR -IR, chamfer_base) offset_3D(IR, chamfer_base) children(); } module shape() difference() { square(40, center = true); square([20, 20], center = true); } module rounds() { translate([50, 0]) round_3D(or = 4, ir = 2, chamfer_base = true, $fn = 16) linear_extrude(40, center = true) shape(); } rounds(); On Tue, 25 Jul 2023 at 16:37, Torsten Paul <Torsten.Paul@gmx.de> wrote: > On 25.07.23 17:18, nop head wrote: > > Three minkowskis of any non-trivial shape takes forever. This example > takes more than 5 minutes. > > What's the code for this example? > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Wed, Jul 26, 2023 1:05 AM

here is another approach for filleting such type of intersection, it was
suggested by someone earlier, I did some modification and it is super
efficient.
it took 0.4 sec to render.
But it works only for convex intersections.
fillet here is 5 mm
[image: Screenshot 2023-07-26 at 6.33.44 AM.png]

On Tue, 25 Jul 2023 at 20:25, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I have not used minkowski method in openscad, maybe someone else can
comment

On Tue, 25 Jul 2023 at 14:34, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar wrote:

The approach explained in my earlier message will not work in such

cases.

Isn't fillet about the same as:

minkovski with a sphere of the fillet radius, Then invert, again
minkovski with that sphere and then invert again.

That would at least give a defined result for my "difficult case".

     Roger.

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233
**
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.


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

here is another approach for filleting such type of intersection, it was suggested by someone earlier, I did some modification and it is super efficient. it took 0.4 sec to render. But it works only for convex intersections. fillet here is 5 mm [image: Screenshot 2023-07-26 at 6.33.44 AM.png] On Tue, 25 Jul 2023 at 20:25, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I have not used minkowski method in openscad, maybe someone else can > comment > > On Tue, 25 Jul 2023 at 14:34, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > >> On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar wrote: >> > The approach explained in my earlier message will not work in such >> cases. >> >> Isn't fillet about the same as: >> >> minkovski with a sphere of the fillet radius, Then invert, again >> minkovski with that sphere and then invert again. >> >> That would at least give a defined result for my "difficult case". >> >> Roger. >> >> -- >> ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 >> ** >> ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 >> ** >> f equals m times a. When your f is steady, and your m is going down >> your a is going up. -- Chris Hadfield about flying up the space shuttle. >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >
L
larry
Wed, Jul 26, 2023 3:43 AM

On Wed, 2023-07-26 at 06:35 +0530, Sanjeev Prabhakar wrote:

here is another approach for filleting such type of intersection, it
was suggested by someone earlier, I did some modification and it is
super efficient.
it took 0.4 sec to render.

On my machine...

F5: Total rendering time: 0:00:00.789
F6: Total rendering time: 0:00:00.290

Ubuntu MATE,
OpenSCAD version 2023.02.15.ai13654

But it works only for convex intersections.
fillet here is 5 mm
Screenshot 2023-07-26 at 6.33.44 AM.png

On Tue, 25 Jul 2023 at 20:25, Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I have not used minkowski method in openscad, maybe someone else
can comment

On Tue, 25 Jul 2023 at 14:34, Rogier Wolff R.E.Wolff@bitwizard.nl
wrote:

On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar
wrote:

The approach explained in my earlier message will not work in
such cases.

Isn't fillet about the same as:

minkovski with a sphere of the fillet radius, Then invert, again
minkovski with that sphere and then invert again.

That would at least give a defined result for my "difficult
case".

        Roger.


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

On Wed, 2023-07-26 at 06:35 +0530, Sanjeev Prabhakar wrote: > here is another approach for filleting such type of intersection, it > was suggested by someone earlier, I did some modification and it is > super efficient. > it took 0.4 sec to render. On my machine... F5: Total rendering time: 0:00:00.789 F6: Total rendering time: 0:00:00.290 Ubuntu MATE, OpenSCAD version 2023.02.15.ai13654 > But it works only for convex intersections. > fillet here is 5 mm > Screenshot 2023-07-26 at 6.33.44 AM.png > On Tue, 25 Jul 2023 at 20:25, Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > I have not used minkowski method in openscad, maybe someone else > > can comment > > > > On Tue, 25 Jul 2023 at 14:34, Rogier Wolff <R.E.Wolff@bitwizard.nl> > > wrote: > > > On Mon, Jul 24, 2023 at 11:36:35PM +0530, Sanjeev Prabhakar > > > wrote: > > > > The approach explained in my earlier message will not work in > > > > such cases. > > > > > > Isn't fillet about the same as: > > > > > > minkovski with a sphere of the fillet radius, Then invert, again > > > minkovski with that sphere and then invert again. > > > > > > That would at least give a defined result for my "difficult > > > case". > > > > > >         Roger. > > > > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org