SP
Sanjeev Prabhakar
Sun, Oct 16, 2022 12:34 AM
Thanks for the explanation
Can you share a hand sketch of what will be the final expected figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein bottle,
and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic curve,
where a discrete set of points defines the actual path (center curve passes
through points) or the points serve as "control points". I forget the
technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve could also
be a smooth curve, following a similar strategy. Control points or actual
radii at sample points could determine the radius along every point of the
center curve.
So in essence what I'm proposing are two "smooth" functions in terms of
't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1] to a
point in 3-space and the smooth curve defined such is the center of your
"tube".
Second function D:[0,1] -> R maps every point in the interval [0,1] to a
real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace the
circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and radiuses for
each path point. This will create a polyhedron with multi_sections like the
example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Thanks for the explanation
Can you share a hand sketch of what will be the final expected figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
>
>
>
> ---------- Forwarded message ----------
> From: neri-engineering <neri-engineering@protonmail.com>
> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org>
> Cc:
> Bcc:
> Date: Sat, 15 Oct 2022 19:24:32 +0000
> Subject: [OpenSCAD] Re: multiple section extrude
> Long ago I wrote something similar, in order to generate a Klein bottle,
> and for that reason I can offer a suggestion.
>
> The "path of center" could be a smooth curve, e.g. Bezier or cubic curve,
> where a discrete set of points defines the actual path (center curve passes
> through points) or the points serve as "control points". I forget the
> technical name for these sorts of curve, I only remember that there are
> several variations, and I think they involved some sort of cubic curves.
>
> The radius as it varies as you travel through the center curve could also
> be a smooth curve, following a similar strategy. Control points or actual
> radii at sample points could determine the radius along every point of the
> center curve.
>
> So in essence what I'm proposing are two "smooth" functions in terms of
> 't' which is in the interval [0,1].
>
> First function C:[0,1] -> R3 maps every point in the interval [0,1] to a
> point in 3-space and the smooth curve defined such is the center of your
> "tube".
>
> Second function D:[0,1] -> R maps every point in the interval [0,1] to a
> real value, which is defined to be the radius of tube at that location.
>
> Of course you'd have to do things like figuring out how to trace the
> circle at every point, based on some simple vector calculations, to
> determine perpendiculars etc. Simple vector calculations, dot products,
> cross products, and the like.
>
> You'd get a very smooth tube which would be highly desirable.
>
> I'm only sharing this because I had great success with the idea.
>
> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>
> Sent with Proton Mail <https://proton.me/> secure email.
>
> ------- Original Message -------
> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
>
> I wrote a function "multiple section extrude"
>
> Idea is supply path points, sections for each path points and radiuses for
> each path point. This will create a polyhedron with multi_sections like the
> example picture shown below.
>
> I am sure the similar function can be written in original openscad
>
> example:
>
> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>
>
> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>
>
>
>
>
> ---------- Forwarded message ----------
> From: neri-engineering via Discuss <discuss@lists.openscad.org>
> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org>
> Cc: neri-engineering <neri-engineering@protonmail.com>
> Bcc:
> Date: Sat, 15 Oct 2022 19:24:32 +0000
> Subject: [OpenSCAD] Re: multiple section extrude
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
AM
Adrian Mariano
Sun, Oct 16, 2022 12:41 AM
neri-engineering is just talking about a basic sweep algorithm applied to a
circular cross section, which length-dependent scale. It's what the
original poster was donig with the neck1200 model. He was suggesting
creating the path with beziers or some other method to produce a smooth
path. Since he assumes a circular cross section, all the complications
having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein bottle,
and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic curve,
where a discrete set of points defines the actual path (center curve passes
through points) or the points serve as "control points". I forget the
technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve could also
be a smooth curve, following a similar strategy. Control points or actual
radii at sample points could determine the radius along every point of the
center curve.
So in essence what I'm proposing are two "smooth" functions in terms of
't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1] to a
point in 3-space and the smooth curve defined such is the center of your
"tube".
Second function D:[0,1] -> R maps every point in the interval [0,1] to a
real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace the
circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and radiuses
for each path point. This will create a polyhedron with multi_sections like
the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
neri-engineering is just talking about a basic sweep algorithm applied to a
circular cross section, which length-dependent scale. It's what the
original poster was donig with the neck1200 model. He was suggesting
creating the path with beziers or some other method to produce a smooth
path. Since he assumes a circular cross section, all the complications
having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> Thanks for the explanation
> Can you share a hand sketch of what will be the final expected figure.
> Maybe someone here has already written something similar.
>
> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
> discuss@lists.openscad.org> wrote:
>
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: neri-engineering <neri-engineering@protonmail.com>
>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org>
>> Cc:
>> Bcc:
>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>> Subject: [OpenSCAD] Re: multiple section extrude
>> Long ago I wrote something similar, in order to generate a Klein bottle,
>> and for that reason I can offer a suggestion.
>>
>> The "path of center" could be a smooth curve, e.g. Bezier or cubic curve,
>> where a discrete set of points defines the actual path (center curve passes
>> through points) or the points serve as "control points". I forget the
>> technical name for these sorts of curve, I only remember that there are
>> several variations, and I think they involved some sort of cubic curves.
>>
>> The radius as it varies as you travel through the center curve could also
>> be a smooth curve, following a similar strategy. Control points or actual
>> radii at sample points could determine the radius along every point of the
>> center curve.
>>
>> So in essence what I'm proposing are two "smooth" functions in terms of
>> 't' which is in the interval [0,1].
>>
>> First function C:[0,1] -> R3 maps every point in the interval [0,1] to a
>> point in 3-space and the smooth curve defined such is the center of your
>> "tube".
>>
>> Second function D:[0,1] -> R maps every point in the interval [0,1] to a
>> real value, which is defined to be the radius of tube at that location.
>>
>> Of course you'd have to do things like figuring out how to trace the
>> circle at every point, based on some simple vector calculations, to
>> determine perpendiculars etc. Simple vector calculations, dot products,
>> cross products, and the like.
>>
>> You'd get a very smooth tube which would be highly desirable.
>>
>> I'm only sharing this because I had great success with the idea.
>>
>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>
>> Sent with Proton Mail <https://proton.me/> secure email.
>>
>> ------- Original Message -------
>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>> sprabhakar2006@gmail.com> wrote:
>>
>> I wrote a function "multiple section extrude"
>>
>> Idea is supply path points, sections for each path points and radiuses
>> for each path point. This will create a polyhedron with multi_sections like
>> the example picture shown below.
>>
>> I am sure the similar function can be written in original openscad
>>
>> example:
>>
>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>
>>
>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>
>>
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org>
>> Cc: neri-engineering <neri-engineering@protonmail.com>
>> Bcc:
>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>> Subject: [OpenSCAD] Re: multiple section extrude
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
SP
Sanjeev Prabhakar
Sun, Oct 16, 2022 1:15 AM
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano avm4@cornell.edu wrote:
neri-engineering is just talking about a basic sweep algorithm applied to
a circular cross section, which length-dependent scale. It's what the
original poster was donig with the neck1200 model. He was suggesting
creating the path with beziers or some other method to produce a smooth
path. Since he assumes a circular cross section, all the complications
having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein bottle,
and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic
curve, where a discrete set of points defines the actual path (center curve
passes through points) or the points serve as "control points". I forget
the technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve could
also be a smooth curve, following a similar strategy. Control points or
actual radii at sample points could determine the radius along every point
of the center curve.
So in essence what I'm proposing are two "smooth" functions in terms of
't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1] to a
point in 3-space and the smooth curve defined such is the center of your
"tube".
Second function D:[0,1] -> R maps every point in the interval [0,1] to a
real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace the
circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and radiuses
for each path point. This will create a polyhedron with multi_sections like
the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano <avm4@cornell.edu> wrote:
> neri-engineering is just talking about a basic sweep algorithm applied to
> a circular cross section, which length-dependent scale. It's what the
> original poster was donig with the neck1200 model. He was suggesting
> creating the path with beziers or some other method to produce a smooth
> path. Since he assumes a circular cross section, all the complications
> having to do with twisting disappear.
>
> On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
>
>> Thanks for the explanation
>> Can you share a hand sketch of what will be the final expected figure.
>> Maybe someone here has already written something similar.
>>
>> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
>> discuss@lists.openscad.org> wrote:
>>
>>>
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: neri-engineering <neri-engineering@protonmail.com>
>>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org
>>> >
>>> Cc:
>>> Bcc:
>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>> Subject: [OpenSCAD] Re: multiple section extrude
>>> Long ago I wrote something similar, in order to generate a Klein bottle,
>>> and for that reason I can offer a suggestion.
>>>
>>> The "path of center" could be a smooth curve, e.g. Bezier or cubic
>>> curve, where a discrete set of points defines the actual path (center curve
>>> passes through points) or the points serve as "control points". I forget
>>> the technical name for these sorts of curve, I only remember that there are
>>> several variations, and I think they involved some sort of cubic curves.
>>>
>>> The radius as it varies as you travel through the center curve could
>>> also be a smooth curve, following a similar strategy. Control points or
>>> actual radii at sample points could determine the radius along every point
>>> of the center curve.
>>>
>>> So in essence what I'm proposing are two "smooth" functions in terms of
>>> 't' which is in the interval [0,1].
>>>
>>> First function C:[0,1] -> R3 maps every point in the interval [0,1] to a
>>> point in 3-space and the smooth curve defined such is the center of your
>>> "tube".
>>>
>>> Second function D:[0,1] -> R maps every point in the interval [0,1] to a
>>> real value, which is defined to be the radius of tube at that location.
>>>
>>> Of course you'd have to do things like figuring out how to trace the
>>> circle at every point, based on some simple vector calculations, to
>>> determine perpendiculars etc. Simple vector calculations, dot products,
>>> cross products, and the like.
>>>
>>> You'd get a very smooth tube which would be highly desirable.
>>>
>>> I'm only sharing this because I had great success with the idea.
>>>
>>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>>
>>> Sent with Proton Mail <https://proton.me/> secure email.
>>>
>>> ------- Original Message -------
>>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>>> sprabhakar2006@gmail.com> wrote:
>>>
>>> I wrote a function "multiple section extrude"
>>>
>>> Idea is supply path points, sections for each path points and radiuses
>>> for each path point. This will create a polyhedron with multi_sections like
>>> the example picture shown below.
>>>
>>> I am sure the similar function can be written in original openscad
>>>
>>> example:
>>>
>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>
>>>
>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>>
>>>
>>>
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org
>>> >
>>> Cc: neri-engineering <neri-engineering@protonmail.com>
>>> Bcc:
>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>> Subject: [OpenSCAD] Re: multiple section extrude
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
SP
Sanjeev Prabhakar
Sun, Oct 16, 2022 4:15 PM
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano avm4@cornell.edu wrote:
neri-engineering is just talking about a basic sweep algorithm applied to
a circular cross section, which length-dependent scale. It's what the
original poster was donig with the neck1200 model. He was suggesting
creating the path with beziers or some other method to produce a smooth
path. Since he assumes a circular cross section, all the complications
having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein
bottle, and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic
curve, where a discrete set of points defines the actual path (center curve
passes through points) or the points serve as "control points". I forget
the technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve could
also be a smooth curve, following a similar strategy. Control points or
actual radii at sample points could determine the radius along every point
of the center curve.
So in essence what I'm proposing are two "smooth" functions in terms of
't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1] to
a point in 3-space and the smooth curve defined such is the center of your
"tube".
Second function D:[0,1] -> R maps every point in the interval [0,1] to
a real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace the
circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and radiuses
for each path point. This will create a polyhedron with multi_sections like
the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
another example of multiple section extrude function.
It might seem trivial, but it is not.
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_sec_extrude_example2.scad
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
[image: Screenshot 2022-10-16 at 9.35.54 PM.png]
On Sun, 16 Oct 2022 at 06:45, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> OK, if that is the case then it is a bit simpler
>
> On Sun, 16 Oct 2022 at 06:12, Adrian Mariano <avm4@cornell.edu> wrote:
>
>> neri-engineering is just talking about a basic sweep algorithm applied to
>> a circular cross section, which length-dependent scale. It's what the
>> original poster was donig with the neck1200 model. He was suggesting
>> creating the path with beziers or some other method to produce a smooth
>> path. Since he assumes a circular cross section, all the complications
>> having to do with twisting disappear.
>>
>> On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
>> sprabhakar2006@gmail.com> wrote:
>>
>>> Thanks for the explanation
>>> Can you share a hand sketch of what will be the final expected figure.
>>> Maybe someone here has already written something similar.
>>>
>>> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
>>> discuss@lists.openscad.org> wrote:
>>>
>>>>
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: neri-engineering <neri-engineering@protonmail.com>
>>>> To: OpenSCAD general discussion Mailing-list <
>>>> discuss@lists.openscad.org>
>>>> Cc:
>>>> Bcc:
>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>> Long ago I wrote something similar, in order to generate a Klein
>>>> bottle, and for that reason I can offer a suggestion.
>>>>
>>>> The "path of center" could be a smooth curve, e.g. Bezier or cubic
>>>> curve, where a discrete set of points defines the actual path (center curve
>>>> passes through points) or the points serve as "control points". I forget
>>>> the technical name for these sorts of curve, I only remember that there are
>>>> several variations, and I think they involved some sort of cubic curves.
>>>>
>>>> The radius as it varies as you travel through the center curve could
>>>> also be a smooth curve, following a similar strategy. Control points or
>>>> actual radii at sample points could determine the radius along every point
>>>> of the center curve.
>>>>
>>>> So in essence what I'm proposing are two "smooth" functions in terms of
>>>> 't' which is in the interval [0,1].
>>>>
>>>> First function C:[0,1] -> R3 maps every point in the interval [0,1] to
>>>> a point in 3-space and the smooth curve defined such is the center of your
>>>> "tube".
>>>>
>>>> Second function D:[0,1] -> R maps every point in the interval [0,1] to
>>>> a real value, which is defined to be the radius of tube at that location.
>>>>
>>>> Of course you'd have to do things like figuring out how to trace the
>>>> circle at every point, based on some simple vector calculations, to
>>>> determine perpendiculars etc. Simple vector calculations, dot products,
>>>> cross products, and the like.
>>>>
>>>> You'd get a very smooth tube which would be highly desirable.
>>>>
>>>> I'm only sharing this because I had great success with the idea.
>>>>
>>>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>>>
>>>> Sent with Proton Mail <https://proton.me/> secure email.
>>>>
>>>> ------- Original Message -------
>>>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>>>> sprabhakar2006@gmail.com> wrote:
>>>>
>>>> I wrote a function "multiple section extrude"
>>>>
>>>> Idea is supply path points, sections for each path points and radiuses
>>>> for each path point. This will create a polyhedron with multi_sections like
>>>> the example picture shown below.
>>>>
>>>> I am sure the similar function can be written in original openscad
>>>>
>>>> example:
>>>>
>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>
>>>>
>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>>>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>>>> To: OpenSCAD general discussion Mailing-list <
>>>> discuss@lists.openscad.org>
>>>> Cc: neri-engineering <neri-engineering@protonmail.com>
>>>> Bcc:
>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>> _______________________________________________
>>>> OpenSCAD mailing list
>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
>
AM
Adrian Mariano
Sun, Oct 16, 2022 4:31 PM
The section changes scale in one axis, but otherwise remains the same, no?
On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano avm4@cornell.edu wrote:
neri-engineering is just talking about a basic sweep algorithm applied
to a circular cross section, which length-dependent scale. It's what the
original poster was donig with the neck1200 model. He was suggesting
creating the path with beziers or some other method to produce a smooth
path. Since he assumes a circular cross section, all the complications
having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein
bottle, and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic
curve, where a discrete set of points defines the actual path (center curve
passes through points) or the points serve as "control points". I forget
the technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve could
also be a smooth curve, following a similar strategy. Control points or
actual radii at sample points could determine the radius along every point
of the center curve.
So in essence what I'm proposing are two "smooth" functions in terms
of 't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1] to
a point in 3-space and the smooth curve defined such is the center of your
"tube".
Second function D:[0,1] -> R maps every point in the interval [0,1] to
a real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace the
circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and radiuses
for each path point. This will create a polyhedron with multi_sections like
the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
The section changes scale in one axis, but otherwise remains the same, no?
On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> another example of multiple section extrude function.
> It might seem trivial, but it is not.
>
>
> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_sec_extrude_example2.scad
>
>
> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
> [image: Screenshot 2022-10-16 at 9.35.54 PM.png]
>
> On Sun, 16 Oct 2022 at 06:45, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
> wrote:
>
>> OK, if that is the case then it is a bit simpler
>>
>> On Sun, 16 Oct 2022 at 06:12, Adrian Mariano <avm4@cornell.edu> wrote:
>>
>>> neri-engineering is just talking about a basic sweep algorithm applied
>>> to a circular cross section, which length-dependent scale. It's what the
>>> original poster was donig with the neck1200 model. He was suggesting
>>> creating the path with beziers or some other method to produce a smooth
>>> path. Since he assumes a circular cross section, all the complications
>>> having to do with twisting disappear.
>>>
>>> On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
>>> sprabhakar2006@gmail.com> wrote:
>>>
>>>> Thanks for the explanation
>>>> Can you share a hand sketch of what will be the final expected figure.
>>>> Maybe someone here has already written something similar.
>>>>
>>>> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
>>>> discuss@lists.openscad.org> wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: neri-engineering <neri-engineering@protonmail.com>
>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>> discuss@lists.openscad.org>
>>>>> Cc:
>>>>> Bcc:
>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>> Long ago I wrote something similar, in order to generate a Klein
>>>>> bottle, and for that reason I can offer a suggestion.
>>>>>
>>>>> The "path of center" could be a smooth curve, e.g. Bezier or cubic
>>>>> curve, where a discrete set of points defines the actual path (center curve
>>>>> passes through points) or the points serve as "control points". I forget
>>>>> the technical name for these sorts of curve, I only remember that there are
>>>>> several variations, and I think they involved some sort of cubic curves.
>>>>>
>>>>> The radius as it varies as you travel through the center curve could
>>>>> also be a smooth curve, following a similar strategy. Control points or
>>>>> actual radii at sample points could determine the radius along every point
>>>>> of the center curve.
>>>>>
>>>>> So in essence what I'm proposing are two "smooth" functions in terms
>>>>> of 't' which is in the interval [0,1].
>>>>>
>>>>> First function C:[0,1] -> R3 maps every point in the interval [0,1] to
>>>>> a point in 3-space and the smooth curve defined such is the center of your
>>>>> "tube".
>>>>>
>>>>> Second function D:[0,1] -> R maps every point in the interval [0,1] to
>>>>> a real value, which is defined to be the radius of tube at that location.
>>>>>
>>>>> Of course you'd have to do things like figuring out how to trace the
>>>>> circle at every point, based on some simple vector calculations, to
>>>>> determine perpendiculars etc. Simple vector calculations, dot products,
>>>>> cross products, and the like.
>>>>>
>>>>> You'd get a very smooth tube which would be highly desirable.
>>>>>
>>>>> I'm only sharing this because I had great success with the idea.
>>>>>
>>>>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>>>>
>>>>> Sent with Proton Mail <https://proton.me/> secure email.
>>>>>
>>>>> ------- Original Message -------
>>>>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>
>>>>> I wrote a function "multiple section extrude"
>>>>>
>>>>> Idea is supply path points, sections for each path points and radiuses
>>>>> for each path point. This will create a polyhedron with multi_sections like
>>>>> the example picture shown below.
>>>>>
>>>>> I am sure the similar function can be written in original openscad
>>>>>
>>>>> example:
>>>>>
>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>>
>>>>>
>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>>>>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>> discuss@lists.openscad.org>
>>>>> Cc: neri-engineering <neri-engineering@protonmail.com>
>>>>> Bcc:
>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>> _______________________________________________
>>>>> 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
>
SP
Sanjeev Prabhakar
Sun, Oct 16, 2022 5:11 PM
No it's not scale
There are 2 3d sections
Both the sections have same number of points
If you see the sections from top view both are rectangular, 1 larger and 1
smaller
If you view the sections from " -y" the larger section will be almost a
straight line and smaller section will be an arc (arc pointing on bottom
side).
I hope this could explain to some extent.
You can read the code for better understanding.
On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, avm4@cornell.edu wrote:
The section changes scale in one axis, but otherwise remains the same,
no?
On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano avm4@cornell.edu wrote:
neri-engineering is just talking about a basic sweep algorithm applied
to a circular cross section, which length-dependent scale. It's what the
original poster was donig with the neck1200 model. He was suggesting
creating the path with beziers or some other method to produce a smooth
path. Since he assumes a circular cross section, all the complications
having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein
bottle, and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic
curve, where a discrete set of points defines the actual path (center curve
passes through points) or the points serve as "control points". I forget
the technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve could
also be a smooth curve, following a similar strategy. Control points or
actual radii at sample points could determine the radius along every point
of the center curve.
So in essence what I'm proposing are two "smooth" functions in terms
of 't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1]
to a point in 3-space and the smooth curve defined such is the center of
your "tube".
Second function D:[0,1] -> R maps every point in the interval [0,1]
to a real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace the
circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and
radiuses for each path point. This will create a polyhedron with
multi_sections like the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
No it's not scale
There are 2 3d sections
Both the sections have same number of points
If you see the sections from top view both are rectangular, 1 larger and 1
smaller
If you view the sections from " -y" the larger section will be almost a
straight line and smaller section will be an arc (arc pointing on bottom
side).
I hope this could explain to some extent.
You can read the code for better understanding.
On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, <avm4@cornell.edu> wrote:
> The section changes scale in one axis, but otherwise remains the same,
> no?
>
> On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
>
>> another example of multiple section extrude function.
>> It might seem trivial, but it is not.
>>
>>
>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_sec_extrude_example2.scad
>>
>>
>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>> [image: Screenshot 2022-10-16 at 9.35.54 PM.png]
>>
>> On Sun, 16 Oct 2022 at 06:45, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
>> wrote:
>>
>>> OK, if that is the case then it is a bit simpler
>>>
>>> On Sun, 16 Oct 2022 at 06:12, Adrian Mariano <avm4@cornell.edu> wrote:
>>>
>>>> neri-engineering is just talking about a basic sweep algorithm applied
>>>> to a circular cross section, which length-dependent scale. It's what the
>>>> original poster was donig with the neck1200 model. He was suggesting
>>>> creating the path with beziers or some other method to produce a smooth
>>>> path. Since he assumes a circular cross section, all the complications
>>>> having to do with twisting disappear.
>>>>
>>>> On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
>>>> sprabhakar2006@gmail.com> wrote:
>>>>
>>>>> Thanks for the explanation
>>>>> Can you share a hand sketch of what will be the final expected figure.
>>>>> Maybe someone here has already written something similar.
>>>>>
>>>>> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
>>>>> discuss@lists.openscad.org> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------- Forwarded message ----------
>>>>>> From: neri-engineering <neri-engineering@protonmail.com>
>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>> discuss@lists.openscad.org>
>>>>>> Cc:
>>>>>> Bcc:
>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>> Long ago I wrote something similar, in order to generate a Klein
>>>>>> bottle, and for that reason I can offer a suggestion.
>>>>>>
>>>>>> The "path of center" could be a smooth curve, e.g. Bezier or cubic
>>>>>> curve, where a discrete set of points defines the actual path (center curve
>>>>>> passes through points) or the points serve as "control points". I forget
>>>>>> the technical name for these sorts of curve, I only remember that there are
>>>>>> several variations, and I think they involved some sort of cubic curves.
>>>>>>
>>>>>> The radius as it varies as you travel through the center curve could
>>>>>> also be a smooth curve, following a similar strategy. Control points or
>>>>>> actual radii at sample points could determine the radius along every point
>>>>>> of the center curve.
>>>>>>
>>>>>> So in essence what I'm proposing are two "smooth" functions in terms
>>>>>> of 't' which is in the interval [0,1].
>>>>>>
>>>>>> First function C:[0,1] -> R3 maps every point in the interval [0,1]
>>>>>> to a point in 3-space and the smooth curve defined such is the center of
>>>>>> your "tube".
>>>>>>
>>>>>> Second function D:[0,1] -> R maps every point in the interval [0,1]
>>>>>> to a real value, which is defined to be the radius of tube at that location.
>>>>>>
>>>>>> Of course you'd have to do things like figuring out how to trace the
>>>>>> circle at every point, based on some simple vector calculations, to
>>>>>> determine perpendiculars etc. Simple vector calculations, dot products,
>>>>>> cross products, and the like.
>>>>>>
>>>>>> You'd get a very smooth tube which would be highly desirable.
>>>>>>
>>>>>> I'm only sharing this because I had great success with the idea.
>>>>>>
>>>>>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>>>>>
>>>>>> Sent with Proton Mail <https://proton.me/> secure email.
>>>>>>
>>>>>> ------- Original Message -------
>>>>>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>
>>>>>> I wrote a function "multiple section extrude"
>>>>>>
>>>>>> Idea is supply path points, sections for each path points and
>>>>>> radiuses for each path point. This will create a polyhedron with
>>>>>> multi_sections like the example picture shown below.
>>>>>>
>>>>>> I am sure the similar function can be written in original openscad
>>>>>>
>>>>>> example:
>>>>>>
>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>>>
>>>>>>
>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>>>>>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------- Forwarded message ----------
>>>>>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>> discuss@lists.openscad.org>
>>>>>> Cc: neri-engineering <neri-engineering@protonmail.com>
>>>>>> Bcc:
>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>> _______________________________________________
>>>>>> 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
>
SP
Sanjeev Prabhakar
Mon, Oct 17, 2022 1:14 AM
for better understanding, see the picture
[image: Screenshot 2022-10-17 at 6.39.01 AM.png]
On Sun, 16 Oct 2022 at 22:41, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
No it's not scale
There are 2 3d sections
Both the sections have same number of points
If you see the sections from top view both are rectangular, 1 larger and
1 smaller
If you view the sections from " -y" the larger section will be almost a
straight line and smaller section will be an arc (arc pointing on bottom
side).
I hope this could explain to some extent.
You can read the code for better understanding.
On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, avm4@cornell.edu wrote:
The section changes scale in one axis, but otherwise remains the same,
no?
On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano avm4@cornell.edu wrote:
neri-engineering is just talking about a basic sweep algorithm applied
to a circular cross section, which length-dependent scale. It's what the
original poster was donig with the neck1200 model. He was suggesting
creating the path with beziers or some other method to produce a smooth
path. Since he assumes a circular cross section, all the complications
having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein
bottle, and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic
curve, where a discrete set of points defines the actual path (center curve
passes through points) or the points serve as "control points". I forget
the technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve could
also be a smooth curve, following a similar strategy. Control points or
actual radii at sample points could determine the radius along every point
of the center curve.
So in essence what I'm proposing are two "smooth" functions in terms
of 't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1]
to a point in 3-space and the smooth curve defined such is the center of
your "tube".
Second function D:[0,1] -> R maps every point in the interval [0,1]
to a real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace the
circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and
radiuses for each path point. This will create a polyhedron with
multi_sections like the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
for better understanding, see the picture
[image: Screenshot 2022-10-17 at 6.39.01 AM.png]
On Sun, 16 Oct 2022 at 22:41, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> No it's not scale
>
> There are 2 3d sections
>
> Both the sections have same number of points
>
> If you see the sections from top view both are rectangular, 1 larger and
> 1 smaller
>
> If you view the sections from " -y" the larger section will be almost a
> straight line and smaller section will be an arc (arc pointing on bottom
> side).
>
> I hope this could explain to some extent.
>
> You can read the code for better understanding.
>
>
>
>
>
> On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, <avm4@cornell.edu> wrote:
>
>> The section changes scale in one axis, but otherwise remains the same,
>> no?
>>
>> On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
>> sprabhakar2006@gmail.com> wrote:
>>
>>> another example of multiple section extrude function.
>>> It might seem trivial, but it is not.
>>>
>>>
>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_sec_extrude_example2.scad
>>>
>>>
>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>> [image: Screenshot 2022-10-16 at 9.35.54 PM.png]
>>>
>>> On Sun, 16 Oct 2022 at 06:45, Sanjeev Prabhakar <
>>> sprabhakar2006@gmail.com> wrote:
>>>
>>>> OK, if that is the case then it is a bit simpler
>>>>
>>>> On Sun, 16 Oct 2022 at 06:12, Adrian Mariano <avm4@cornell.edu> wrote:
>>>>
>>>>> neri-engineering is just talking about a basic sweep algorithm applied
>>>>> to a circular cross section, which length-dependent scale. It's what the
>>>>> original poster was donig with the neck1200 model. He was suggesting
>>>>> creating the path with beziers or some other method to produce a smooth
>>>>> path. Since he assumes a circular cross section, all the complications
>>>>> having to do with twisting disappear.
>>>>>
>>>>> On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>
>>>>>> Thanks for the explanation
>>>>>> Can you share a hand sketch of what will be the final expected figure.
>>>>>> Maybe someone here has already written something similar.
>>>>>>
>>>>>> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
>>>>>> discuss@lists.openscad.org> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------- Forwarded message ----------
>>>>>>> From: neri-engineering <neri-engineering@protonmail.com>
>>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>>> discuss@lists.openscad.org>
>>>>>>> Cc:
>>>>>>> Bcc:
>>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>>> Long ago I wrote something similar, in order to generate a Klein
>>>>>>> bottle, and for that reason I can offer a suggestion.
>>>>>>>
>>>>>>> The "path of center" could be a smooth curve, e.g. Bezier or cubic
>>>>>>> curve, where a discrete set of points defines the actual path (center curve
>>>>>>> passes through points) or the points serve as "control points". I forget
>>>>>>> the technical name for these sorts of curve, I only remember that there are
>>>>>>> several variations, and I think they involved some sort of cubic curves.
>>>>>>>
>>>>>>> The radius as it varies as you travel through the center curve could
>>>>>>> also be a smooth curve, following a similar strategy. Control points or
>>>>>>> actual radii at sample points could determine the radius along every point
>>>>>>> of the center curve.
>>>>>>>
>>>>>>> So in essence what I'm proposing are two "smooth" functions in terms
>>>>>>> of 't' which is in the interval [0,1].
>>>>>>>
>>>>>>> First function C:[0,1] -> R3 maps every point in the interval [0,1]
>>>>>>> to a point in 3-space and the smooth curve defined such is the center of
>>>>>>> your "tube".
>>>>>>>
>>>>>>> Second function D:[0,1] -> R maps every point in the interval [0,1]
>>>>>>> to a real value, which is defined to be the radius of tube at that location.
>>>>>>>
>>>>>>> Of course you'd have to do things like figuring out how to trace the
>>>>>>> circle at every point, based on some simple vector calculations, to
>>>>>>> determine perpendiculars etc. Simple vector calculations, dot products,
>>>>>>> cross products, and the like.
>>>>>>>
>>>>>>> You'd get a very smooth tube which would be highly desirable.
>>>>>>>
>>>>>>> I'm only sharing this because I had great success with the idea.
>>>>>>>
>>>>>>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>>>>>>
>>>>>>> Sent with Proton Mail <https://proton.me/> secure email.
>>>>>>>
>>>>>>> ------- Original Message -------
>>>>>>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>>
>>>>>>> I wrote a function "multiple section extrude"
>>>>>>>
>>>>>>> Idea is supply path points, sections for each path points and
>>>>>>> radiuses for each path point. This will create a polyhedron with
>>>>>>> multi_sections like the example picture shown below.
>>>>>>>
>>>>>>> I am sure the similar function can be written in original openscad
>>>>>>>
>>>>>>> example:
>>>>>>>
>>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>>>>
>>>>>>>
>>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>>>>>>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------- Forwarded message ----------
>>>>>>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>>> discuss@lists.openscad.org>
>>>>>>> Cc: neri-engineering <neri-engineering@protonmail.com>
>>>>>>> Bcc:
>>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>>> _______________________________________________
>>>>>>> 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
>>
>
AM
Adrian Mariano
Mon, Oct 17, 2022 4:25 AM
I think I understand, but I had a different approach for how to make the
shape. You don't need to build this from the curved section 2 that you
show, because you can create it as a series of slices of a rectangle: a
scaled path_sweep. I tried to roughly duplicate the shape using this idea
in BOSL2. (Note: this is unreleased code so it won't run yet on the posted
BOSL2, which doesn't support scaling.)
opath = [[0,0,0], [100,0,0], [200, 0, 33]];
path=subdivide_path(opath, 100,closed=false);
scales = [each repeat([1,1],50),
for(i=[1:-1/50:1/50]) [sqrt(i),1]
];
path_sweep(rect([150,10]),path,scale=scales);
The point is that the shape is just a rectangle scaled in its width with a
continuously decreasing width that approaches zero along a curved path for
the end.
[image: image.png]
On Sun, Oct 16, 2022 at 9:16 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
for better understanding, see the picture
[image: Screenshot 2022-10-17 at 6.39.01 AM.png]
On Sun, 16 Oct 2022 at 22:41, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
No it's not scale
There are 2 3d sections
Both the sections have same number of points
If you see the sections from top view both are rectangular, 1 larger and
1 smaller
If you view the sections from " -y" the larger section will be almost a
straight line and smaller section will be an arc (arc pointing on bottom
side).
I hope this could explain to some extent.
You can read the code for better understanding.
On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, avm4@cornell.edu wrote:
The section changes scale in one axis, but otherwise remains the same,
no?
On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano avm4@cornell.edu wrote:
neri-engineering is just talking about a basic sweep algorithm
applied to a circular cross section, which length-dependent scale. It's
what the original poster was donig with the neck1200 model. He was
suggesting creating the path with beziers or some other method to produce a
smooth path. Since he assumes a circular cross section, all the
complications having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected
figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein
bottle, and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic
curve, where a discrete set of points defines the actual path (center curve
passes through points) or the points serve as "control points". I forget
the technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve
could also be a smooth curve, following a similar strategy. Control points
or actual radii at sample points could determine the radius along every
point of the center curve.
So in essence what I'm proposing are two "smooth" functions in
terms of 't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval [0,1]
to a point in 3-space and the smooth curve defined such is the center of
your "tube".
Second function D:[0,1] -> R maps every point in the interval [0,1]
to a real value, which is defined to be the radius of tube at that location.
Of course you'd have to do things like figuring out how to trace
the circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and
radiuses for each path point. This will create a polyhedron with
multi_sections like the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I think I understand, but I had a different approach for how to make the
shape. You don't need to build this from the curved section 2 that you
show, because you can create it as a series of slices of a rectangle: a
scaled path_sweep. I tried to roughly duplicate the shape using this idea
in BOSL2. (Note: this is unreleased code so it won't run yet on the posted
BOSL2, which doesn't support scaling.)
opath = [[0,0,0], [100,0,0], [200, 0, 33]];
path=subdivide_path(opath, 100,closed=false);
scales = [each repeat([1,1],50),
for(i=[1:-1/50:1/50]) [sqrt(i),1]
];
path_sweep(rect([150,10]),path,scale=scales);
The point is that the shape is just a rectangle scaled in its width with a
continuously decreasing width that approaches zero along a curved path for
the end.
[image: image.png]
On Sun, Oct 16, 2022 at 9:16 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> for better understanding, see the picture
> [image: Screenshot 2022-10-17 at 6.39.01 AM.png]
>
> On Sun, 16 Oct 2022 at 22:41, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
> wrote:
>
>> No it's not scale
>>
>> There are 2 3d sections
>>
>> Both the sections have same number of points
>>
>> If you see the sections from top view both are rectangular, 1 larger and
>> 1 smaller
>>
>> If you view the sections from " -y" the larger section will be almost a
>> straight line and smaller section will be an arc (arc pointing on bottom
>> side).
>>
>> I hope this could explain to some extent.
>>
>> You can read the code for better understanding.
>>
>>
>>
>>
>>
>> On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, <avm4@cornell.edu> wrote:
>>
>>> The section changes scale in one axis, but otherwise remains the same,
>>> no?
>>>
>>> On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
>>> sprabhakar2006@gmail.com> wrote:
>>>
>>>> another example of multiple section extrude function.
>>>> It might seem trivial, but it is not.
>>>>
>>>>
>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_sec_extrude_example2.scad
>>>>
>>>>
>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>> [image: Screenshot 2022-10-16 at 9.35.54 PM.png]
>>>>
>>>> On Sun, 16 Oct 2022 at 06:45, Sanjeev Prabhakar <
>>>> sprabhakar2006@gmail.com> wrote:
>>>>
>>>>> OK, if that is the case then it is a bit simpler
>>>>>
>>>>> On Sun, 16 Oct 2022 at 06:12, Adrian Mariano <avm4@cornell.edu> wrote:
>>>>>
>>>>>> neri-engineering is just talking about a basic sweep algorithm
>>>>>> applied to a circular cross section, which length-dependent scale. It's
>>>>>> what the original poster was donig with the neck1200 model. He was
>>>>>> suggesting creating the path with beziers or some other method to produce a
>>>>>> smooth path. Since he assumes a circular cross section, all the
>>>>>> complications having to do with twisting disappear.
>>>>>>
>>>>>> On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>
>>>>>>> Thanks for the explanation
>>>>>>> Can you share a hand sketch of what will be the final expected
>>>>>>> figure.
>>>>>>> Maybe someone here has already written something similar.
>>>>>>>
>>>>>>> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
>>>>>>> discuss@lists.openscad.org> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------- Forwarded message ----------
>>>>>>>> From: neri-engineering <neri-engineering@protonmail.com>
>>>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>>>> discuss@lists.openscad.org>
>>>>>>>> Cc:
>>>>>>>> Bcc:
>>>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>>>> Long ago I wrote something similar, in order to generate a Klein
>>>>>>>> bottle, and for that reason I can offer a suggestion.
>>>>>>>>
>>>>>>>> The "path of center" could be a smooth curve, e.g. Bezier or cubic
>>>>>>>> curve, where a discrete set of points defines the actual path (center curve
>>>>>>>> passes through points) or the points serve as "control points". I forget
>>>>>>>> the technical name for these sorts of curve, I only remember that there are
>>>>>>>> several variations, and I think they involved some sort of cubic curves.
>>>>>>>>
>>>>>>>> The radius as it varies as you travel through the center curve
>>>>>>>> could also be a smooth curve, following a similar strategy. Control points
>>>>>>>> or actual radii at sample points could determine the radius along every
>>>>>>>> point of the center curve.
>>>>>>>>
>>>>>>>> So in essence what I'm proposing are two "smooth" functions in
>>>>>>>> terms of 't' which is in the interval [0,1].
>>>>>>>>
>>>>>>>> First function C:[0,1] -> R3 maps every point in the interval [0,1]
>>>>>>>> to a point in 3-space and the smooth curve defined such is the center of
>>>>>>>> your "tube".
>>>>>>>>
>>>>>>>> Second function D:[0,1] -> R maps every point in the interval [0,1]
>>>>>>>> to a real value, which is defined to be the radius of tube at that location.
>>>>>>>>
>>>>>>>> Of course you'd have to do things like figuring out how to trace
>>>>>>>> the circle at every point, based on some simple vector calculations, to
>>>>>>>> determine perpendiculars etc. Simple vector calculations, dot products,
>>>>>>>> cross products, and the like.
>>>>>>>>
>>>>>>>> You'd get a very smooth tube which would be highly desirable.
>>>>>>>>
>>>>>>>> I'm only sharing this because I had great success with the idea.
>>>>>>>>
>>>>>>>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>>>>>>>
>>>>>>>> Sent with Proton Mail <https://proton.me/> secure email.
>>>>>>>>
>>>>>>>> ------- Original Message -------
>>>>>>>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>>>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>>>
>>>>>>>> I wrote a function "multiple section extrude"
>>>>>>>>
>>>>>>>> Idea is supply path points, sections for each path points and
>>>>>>>> radiuses for each path point. This will create a polyhedron with
>>>>>>>> multi_sections like the example picture shown below.
>>>>>>>>
>>>>>>>> I am sure the similar function can be written in original openscad
>>>>>>>>
>>>>>>>> example:
>>>>>>>>
>>>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>>>>>
>>>>>>>>
>>>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>>>>>>>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------- Forwarded message ----------
>>>>>>>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>>>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>>>> discuss@lists.openscad.org>
>>>>>>>> Cc: neri-engineering <neri-engineering@protonmail.com>
>>>>>>>> Bcc:
>>>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>>>> _______________________________________________
>>>>>>>> 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
>>>
>> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
SP
Sanjeev Prabhakar
Mon, Oct 17, 2022 5:11 AM
OK
I was sharing various applications for multiple section extrude, so this is
one of them.
Method you are proposing is a good one
On Mon, 17 Oct, 2022, 9:56 am Adrian Mariano, avm4@cornell.edu wrote:
I think I understand, but I had a different approach for how to make the
shape. You don't need to build this from the curved section 2 that you
show, because you can create it as a series of slices of a rectangle: a
scaled path_sweep. I tried to roughly duplicate the shape using this idea
in BOSL2. (Note: this is unreleased code so it won't run yet on the posted
BOSL2, which doesn't support scaling.)
opath = [[0,0,0], [100,0,0], [200, 0, 33]];
path=subdivide_path(opath, 100,closed=false);
scales = [each repeat([1,1],50),
for(i=[1:-1/50:1/50]) [sqrt(i),1]
];
path_sweep(rect([150,10]),path,scale=scales);
The point is that the shape is just a rectangle scaled in its width with a
continuously decreasing width that approaches zero along a curved path for
the end.
[image: image.png]
On Sun, Oct 16, 2022 at 9:16 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
for better understanding, see the picture
[image: Screenshot 2022-10-17 at 6.39.01 AM.png]
On Sun, 16 Oct 2022 at 22:41, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
No it's not scale
There are 2 3d sections
Both the sections have same number of points
If you see the sections from top view both are rectangular, 1 larger
and 1 smaller
If you view the sections from " -y" the larger section will be almost a
straight line and smaller section will be an arc (arc pointing on bottom
side).
I hope this could explain to some extent.
You can read the code for better understanding.
On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, avm4@cornell.edu wrote:
The section changes scale in one axis, but otherwise remains the same,
no?
On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano avm4@cornell.edu
wrote:
neri-engineering is just talking about a basic sweep algorithm
applied to a circular cross section, which length-dependent scale. It's
what the original poster was donig with the neck1200 model. He was
suggesting creating the path with beziers or some other method to produce a
smooth path. Since he assumes a circular cross section, all the
complications having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected
figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein
bottle, and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or cubic
curve, where a discrete set of points defines the actual path (center curve
passes through points) or the points serve as "control points". I forget
the technical name for these sorts of curve, I only remember that there are
several variations, and I think they involved some sort of cubic curves.
The radius as it varies as you travel through the center curve
could also be a smooth curve, following a similar strategy. Control points
or actual radii at sample points could determine the radius along every
point of the center curve.
So in essence what I'm proposing are two "smooth" functions in
terms of 't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval
[0,1] to a point in 3-space and the smooth curve defined such is the center
of your "tube".
Second function D:[0,1] -> R maps every point in the interval
[0,1] to a real value, which is defined to be the radius of tube at that
location.
Of course you'd have to do things like figuring out how to trace
the circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and
radiuses for each path point. This will create a polyhedron with
multi_sections like the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OK
I was sharing various applications for multiple section extrude, so this is
one of them.
Method you are proposing is a good one
On Mon, 17 Oct, 2022, 9:56 am Adrian Mariano, <avm4@cornell.edu> wrote:
> I think I understand, but I had a different approach for how to make the
> shape. You don't need to build this from the curved section 2 that you
> show, because you can create it as a series of slices of a rectangle: a
> scaled path_sweep. I tried to roughly duplicate the shape using this idea
> in BOSL2. (Note: this is unreleased code so it won't run yet on the posted
> BOSL2, which doesn't support scaling.)
>
> opath = [[0,0,0], [100,0,0], [200, 0, 33]];
> path=subdivide_path(opath, 100,closed=false);
> scales = [each repeat([1,1],50),
> for(i=[1:-1/50:1/50]) [sqrt(i),1]
> ];
> path_sweep(rect([150,10]),path,scale=scales);
>
> The point is that the shape is just a rectangle scaled in its width with a
> continuously decreasing width that approaches zero along a curved path for
> the end.
>
> [image: image.png]
>
>
>
> On Sun, Oct 16, 2022 at 9:16 PM Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
>
>> for better understanding, see the picture
>> [image: Screenshot 2022-10-17 at 6.39.01 AM.png]
>>
>> On Sun, 16 Oct 2022 at 22:41, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
>> wrote:
>>
>>> No it's not scale
>>>
>>> There are 2 3d sections
>>>
>>> Both the sections have same number of points
>>>
>>> If you see the sections from top view both are rectangular, 1 larger
>>> and 1 smaller
>>>
>>> If you view the sections from " -y" the larger section will be almost a
>>> straight line and smaller section will be an arc (arc pointing on bottom
>>> side).
>>>
>>> I hope this could explain to some extent.
>>>
>>> You can read the code for better understanding.
>>>
>>>
>>>
>>>
>>>
>>> On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, <avm4@cornell.edu> wrote:
>>>
>>>> The section changes scale in one axis, but otherwise remains the same,
>>>> no?
>>>>
>>>> On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
>>>> sprabhakar2006@gmail.com> wrote:
>>>>
>>>>> another example of multiple section extrude function.
>>>>> It might seem trivial, but it is not.
>>>>>
>>>>>
>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_sec_extrude_example2.scad
>>>>>
>>>>>
>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>> [image: Screenshot 2022-10-16 at 9.35.54 PM.png]
>>>>>
>>>>> On Sun, 16 Oct 2022 at 06:45, Sanjeev Prabhakar <
>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>
>>>>>> OK, if that is the case then it is a bit simpler
>>>>>>
>>>>>> On Sun, 16 Oct 2022 at 06:12, Adrian Mariano <avm4@cornell.edu>
>>>>>> wrote:
>>>>>>
>>>>>>> neri-engineering is just talking about a basic sweep algorithm
>>>>>>> applied to a circular cross section, which length-dependent scale. It's
>>>>>>> what the original poster was donig with the neck1200 model. He was
>>>>>>> suggesting creating the path with beziers or some other method to produce a
>>>>>>> smooth path. Since he assumes a circular cross section, all the
>>>>>>> complications having to do with twisting disappear.
>>>>>>>
>>>>>>> On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
>>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>>
>>>>>>>> Thanks for the explanation
>>>>>>>> Can you share a hand sketch of what will be the final expected
>>>>>>>> figure.
>>>>>>>> Maybe someone here has already written something similar.
>>>>>>>>
>>>>>>>> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
>>>>>>>> discuss@lists.openscad.org> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------- Forwarded message ----------
>>>>>>>>> From: neri-engineering <neri-engineering@protonmail.com>
>>>>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>>>>> discuss@lists.openscad.org>
>>>>>>>>> Cc:
>>>>>>>>> Bcc:
>>>>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>>>>> Long ago I wrote something similar, in order to generate a Klein
>>>>>>>>> bottle, and for that reason I can offer a suggestion.
>>>>>>>>>
>>>>>>>>> The "path of center" could be a smooth curve, e.g. Bezier or cubic
>>>>>>>>> curve, where a discrete set of points defines the actual path (center curve
>>>>>>>>> passes through points) or the points serve as "control points". I forget
>>>>>>>>> the technical name for these sorts of curve, I only remember that there are
>>>>>>>>> several variations, and I think they involved some sort of cubic curves.
>>>>>>>>>
>>>>>>>>> The radius as it varies as you travel through the center curve
>>>>>>>>> could also be a smooth curve, following a similar strategy. Control points
>>>>>>>>> or actual radii at sample points could determine the radius along every
>>>>>>>>> point of the center curve.
>>>>>>>>>
>>>>>>>>> So in essence what I'm proposing are two "smooth" functions in
>>>>>>>>> terms of 't' which is in the interval [0,1].
>>>>>>>>>
>>>>>>>>> First function C:[0,1] -> R3 maps every point in the interval
>>>>>>>>> [0,1] to a point in 3-space and the smooth curve defined such is the center
>>>>>>>>> of your "tube".
>>>>>>>>>
>>>>>>>>> Second function D:[0,1] -> R maps every point in the interval
>>>>>>>>> [0,1] to a real value, which is defined to be the radius of tube at that
>>>>>>>>> location.
>>>>>>>>>
>>>>>>>>> Of course you'd have to do things like figuring out how to trace
>>>>>>>>> the circle at every point, based on some simple vector calculations, to
>>>>>>>>> determine perpendiculars etc. Simple vector calculations, dot products,
>>>>>>>>> cross products, and the like.
>>>>>>>>>
>>>>>>>>> You'd get a very smooth tube which would be highly desirable.
>>>>>>>>>
>>>>>>>>> I'm only sharing this because I had great success with the idea.
>>>>>>>>>
>>>>>>>>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>>>>>>>>
>>>>>>>>> Sent with Proton Mail <https://proton.me/> secure email.
>>>>>>>>>
>>>>>>>>> ------- Original Message -------
>>>>>>>>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>>>>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>> I wrote a function "multiple section extrude"
>>>>>>>>>
>>>>>>>>> Idea is supply path points, sections for each path points and
>>>>>>>>> radiuses for each path point. This will create a polyhedron with
>>>>>>>>> multi_sections like the example picture shown below.
>>>>>>>>>
>>>>>>>>> I am sure the similar function can be written in original openscad
>>>>>>>>>
>>>>>>>>> example:
>>>>>>>>>
>>>>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>>>>>>>>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------- Forwarded message ----------
>>>>>>>>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>>>>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>>>>> discuss@lists.openscad.org>
>>>>>>>>> Cc: neri-engineering <neri-engineering@protonmail.com>
>>>>>>>>> Bcc:
>>>>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>>>>> _______________________________________________
>>>>>>>>> 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
>>>>
>>> _______________________________________________
>> 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
Sat, Oct 22, 2022 7:56 AM
OK
I was sharing various applications for multiple section extrude, so this
is one of them.
Method you are proposing is a good one
On Mon, 17 Oct, 2022, 9:56 am Adrian Mariano, avm4@cornell.edu wrote:
I think I understand, but I had a different approach for how to make the
shape. You don't need to build this from the curved section 2 that you
show, because you can create it as a series of slices of a rectangle: a
scaled path_sweep. I tried to roughly duplicate the shape using this idea
in BOSL2. (Note: this is unreleased code so it won't run yet on the posted
BOSL2, which doesn't support scaling.)
opath = [[0,0,0], [100,0,0], [200, 0, 33]];
path=subdivide_path(opath, 100,closed=false);
scales = [each repeat([1,1],50),
for(i=[1:-1/50:1/50]) [sqrt(i),1]
];
path_sweep(rect([150,10]),path,scale=scales);
The point is that the shape is just a rectangle scaled in its width with
a continuously decreasing width that approaches zero along a curved path
for the end.
[image: image.png]
On Sun, Oct 16, 2022 at 9:16 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
for better understanding, see the picture
[image: Screenshot 2022-10-17 at 6.39.01 AM.png]
On Sun, 16 Oct 2022 at 22:41, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
No it's not scale
There are 2 3d sections
Both the sections have same number of points
If you see the sections from top view both are rectangular, 1 larger
and 1 smaller
If you view the sections from " -y" the larger section will be almost
a straight line and smaller section will be an arc (arc pointing on bottom
side).
I hope this could explain to some extent.
You can read the code for better understanding.
On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, avm4@cornell.edu
wrote:
The section changes scale in one axis, but otherwise remains the same,
no?
On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
OK, if that is the case then it is a bit simpler
On Sun, 16 Oct 2022 at 06:12, Adrian Mariano avm4@cornell.edu
wrote:
neri-engineering is just talking about a basic sweep algorithm
applied to a circular cross section, which length-dependent scale. It's
what the original poster was donig with the neck1200 model. He was
suggesting creating the path with beziers or some other method to produce a
smooth path. Since he assumes a circular cross section, all the
complications having to do with twisting disappear.
On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
Thanks for the explanation
Can you share a hand sketch of what will be the final expected
figure.
Maybe someone here has already written something similar.
On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
discuss@lists.openscad.org> wrote:
---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc:
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
Long ago I wrote something similar, in order to generate a Klein
bottle, and for that reason I can offer a suggestion.
The "path of center" could be a smooth curve, e.g. Bezier or
cubic curve, where a discrete set of points defines the actual path (center
curve passes through points) or the points serve as "control points". I
forget the technical name for these sorts of curve, I only remember that
there are several variations, and I think they involved some sort of cubic
curves.
The radius as it varies as you travel through the center curve
could also be a smooth curve, following a similar strategy. Control points
or actual radii at sample points could determine the radius along every
point of the center curve.
So in essence what I'm proposing are two "smooth" functions in
terms of 't' which is in the interval [0,1].
First function C:[0,1] -> R3 maps every point in the interval
[0,1] to a point in 3-space and the smooth curve defined such is the center
of your "tube".
Second function D:[0,1] -> R maps every point in the interval
[0,1] to a real value, which is defined to be the radius of tube at that
location.
Of course you'd have to do things like figuring out how to trace
the circle at every point, based on some simple vector calculations, to
determine perpendiculars etc. Simple vector calculations, dot products,
cross products, and the like.
You'd get a very smooth tube which would be highly desirable.
I'm only sharing this because I had great success with the idea.
https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
Sent with Proton Mail https://proton.me/ secure email.
------- Original Message -------
On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I wrote a function "multiple section extrude"
Idea is supply path points, sections for each path points and
radiuses for each path point. This will create a polyhedron with
multi_sections like the example picture shown below.
I am sure the similar function can be written in original openscad
example:
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
[image: Screenshot 2022-10-15 at 10.14.37 PM.png]
---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Sat, 15 Oct 2022 19:24:32 +0000
Subject: [OpenSCAD] Re: multiple section extrude
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
another example of multiple section extrude
https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_sec_extrude_ex3.scad
[image: Screenshot 2022-10-22 at 1.18.25 PM.png]
On Mon, 17 Oct 2022 at 10:41, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> OK
> I was sharing various applications for multiple section extrude, so this
> is one of them.
> Method you are proposing is a good one
>
>
> On Mon, 17 Oct, 2022, 9:56 am Adrian Mariano, <avm4@cornell.edu> wrote:
>
>> I think I understand, but I had a different approach for how to make the
>> shape. You don't need to build this from the curved section 2 that you
>> show, because you can create it as a series of slices of a rectangle: a
>> scaled path_sweep. I tried to roughly duplicate the shape using this idea
>> in BOSL2. (Note: this is unreleased code so it won't run yet on the posted
>> BOSL2, which doesn't support scaling.)
>>
>> opath = [[0,0,0], [100,0,0], [200, 0, 33]];
>> path=subdivide_path(opath, 100,closed=false);
>> scales = [each repeat([1,1],50),
>> for(i=[1:-1/50:1/50]) [sqrt(i),1]
>> ];
>> path_sweep(rect([150,10]),path,scale=scales);
>>
>> The point is that the shape is just a rectangle scaled in its width with
>> a continuously decreasing width that approaches zero along a curved path
>> for the end.
>>
>> [image: image.png]
>>
>>
>>
>> On Sun, Oct 16, 2022 at 9:16 PM Sanjeev Prabhakar <
>> sprabhakar2006@gmail.com> wrote:
>>
>>> for better understanding, see the picture
>>> [image: Screenshot 2022-10-17 at 6.39.01 AM.png]
>>>
>>> On Sun, 16 Oct 2022 at 22:41, Sanjeev Prabhakar <
>>> sprabhakar2006@gmail.com> wrote:
>>>
>>>> No it's not scale
>>>>
>>>> There are 2 3d sections
>>>>
>>>> Both the sections have same number of points
>>>>
>>>> If you see the sections from top view both are rectangular, 1 larger
>>>> and 1 smaller
>>>>
>>>> If you view the sections from " -y" the larger section will be almost
>>>> a straight line and smaller section will be an arc (arc pointing on bottom
>>>> side).
>>>>
>>>> I hope this could explain to some extent.
>>>>
>>>> You can read the code for better understanding.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sun, 16 Oct, 2022, 10:02 pm Adrian Mariano, <avm4@cornell.edu>
>>>> wrote:
>>>>
>>>>> The section changes scale in one axis, but otherwise remains the same,
>>>>> no?
>>>>>
>>>>> On Sun, Oct 16, 2022 at 12:16 PM Sanjeev Prabhakar <
>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>
>>>>>> another example of multiple section extrude function.
>>>>>> It might seem trivial, but it is not.
>>>>>>
>>>>>>
>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_sec_extrude_example2.scad
>>>>>>
>>>>>>
>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>>> [image: Screenshot 2022-10-16 at 9.35.54 PM.png]
>>>>>>
>>>>>> On Sun, 16 Oct 2022 at 06:45, Sanjeev Prabhakar <
>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>
>>>>>>> OK, if that is the case then it is a bit simpler
>>>>>>>
>>>>>>> On Sun, 16 Oct 2022 at 06:12, Adrian Mariano <avm4@cornell.edu>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> neri-engineering is just talking about a basic sweep algorithm
>>>>>>>> applied to a circular cross section, which length-dependent scale. It's
>>>>>>>> what the original poster was donig with the neck1200 model. He was
>>>>>>>> suggesting creating the path with beziers or some other method to produce a
>>>>>>>> smooth path. Since he assumes a circular cross section, all the
>>>>>>>> complications having to do with twisting disappear.
>>>>>>>>
>>>>>>>> On Sat, Oct 15, 2022 at 8:36 PM Sanjeev Prabhakar <
>>>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Thanks for the explanation
>>>>>>>>> Can you share a hand sketch of what will be the final expected
>>>>>>>>> figure.
>>>>>>>>> Maybe someone here has already written something similar.
>>>>>>>>>
>>>>>>>>> On Sun, 16 Oct, 2022, 12:55 am neri-engineering via Discuss, <
>>>>>>>>> discuss@lists.openscad.org> wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------- Forwarded message ----------
>>>>>>>>>> From: neri-engineering <neri-engineering@protonmail.com>
>>>>>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>>>>>> discuss@lists.openscad.org>
>>>>>>>>>> Cc:
>>>>>>>>>> Bcc:
>>>>>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>>>>>> Long ago I wrote something similar, in order to generate a Klein
>>>>>>>>>> bottle, and for that reason I can offer a suggestion.
>>>>>>>>>>
>>>>>>>>>> The "path of center" could be a smooth curve, e.g. Bezier or
>>>>>>>>>> cubic curve, where a discrete set of points defines the actual path (center
>>>>>>>>>> curve passes through points) or the points serve as "control points". I
>>>>>>>>>> forget the technical name for these sorts of curve, I only remember that
>>>>>>>>>> there are several variations, and I think they involved some sort of cubic
>>>>>>>>>> curves.
>>>>>>>>>>
>>>>>>>>>> The radius as it varies as you travel through the center curve
>>>>>>>>>> could also be a smooth curve, following a similar strategy. Control points
>>>>>>>>>> or actual radii at sample points could determine the radius along every
>>>>>>>>>> point of the center curve.
>>>>>>>>>>
>>>>>>>>>> So in essence what I'm proposing are two "smooth" functions in
>>>>>>>>>> terms of 't' which is in the interval [0,1].
>>>>>>>>>>
>>>>>>>>>> First function C:[0,1] -> R3 maps every point in the interval
>>>>>>>>>> [0,1] to a point in 3-space and the smooth curve defined such is the center
>>>>>>>>>> of your "tube".
>>>>>>>>>>
>>>>>>>>>> Second function D:[0,1] -> R maps every point in the interval
>>>>>>>>>> [0,1] to a real value, which is defined to be the radius of tube at that
>>>>>>>>>> location.
>>>>>>>>>>
>>>>>>>>>> Of course you'd have to do things like figuring out how to trace
>>>>>>>>>> the circle at every point, based on some simple vector calculations, to
>>>>>>>>>> determine perpendiculars etc. Simple vector calculations, dot products,
>>>>>>>>>> cross products, and the like.
>>>>>>>>>>
>>>>>>>>>> You'd get a very smooth tube which would be highly desirable.
>>>>>>>>>>
>>>>>>>>>> I'm only sharing this because I had great success with the idea.
>>>>>>>>>>
>>>>>>>>>> https://odysee.com/@Neri_Engineering/cyclist-on-klein-bottle
>>>>>>>>>>
>>>>>>>>>> Sent with Proton Mail <https://proton.me/> secure email.
>>>>>>>>>>
>>>>>>>>>> ------- Original Message -------
>>>>>>>>>> On Saturday, October 15th, 2022 at 12:04 PM, Sanjeev Prabhakar <
>>>>>>>>>> sprabhakar2006@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>> I wrote a function "multiple section extrude"
>>>>>>>>>>
>>>>>>>>>> Idea is supply path points, sections for each path points and
>>>>>>>>>> radiuses for each path point. This will create a polyhedron with
>>>>>>>>>> multi_sections like the example picture shown below.
>>>>>>>>>>
>>>>>>>>>> I am sure the similar function can be written in original openscad
>>>>>>>>>>
>>>>>>>>>> example:
>>>>>>>>>>
>>>>>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.ipynb
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/multiple_section_extrude.scad
>>>>>>>>>> [image: Screenshot 2022-10-15 at 10.14.37 PM.png]
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------- Forwarded message ----------
>>>>>>>>>> From: neri-engineering via Discuss <discuss@lists.openscad.org>
>>>>>>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>>>>>>> discuss@lists.openscad.org>
>>>>>>>>>> Cc: neri-engineering <neri-engineering@protonmail.com>
>>>>>>>>>> Bcc:
>>>>>>>>>> Date: Sat, 15 Oct 2022 19:24:32 +0000
>>>>>>>>>> Subject: [OpenSCAD] Re: multiple section extrude
>>>>>>>>>> _______________________________________________
>>>>>>>>>> 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
>>>>>
>>>> _______________________________________________
>>> 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
>>
>