discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

path extrude

SP
Sanjeev Prabhakar
Wed, Mar 29, 2023 2:48 AM

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]

Can this be achieved through path_extrude? I have tried various ways but could not achieve it. [image: Screenshot 2023-03-28 at 9.12.31 PM.png]
AM
Adrian Mariano
Wed, Mar 29, 2023 3:25 AM

It seems like it should be possible.  Supply the point list and profile and
I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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

It seems like it should be possible. Supply the point list and profile and I can try it. What problem do you have? On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Can this be achieved through path_extrude? > > I have tried various ways but could not achieve it. > > [image: Screenshot 2023-03-28 at 9.12.31 PM.png] > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Wed, Mar 29, 2023 4:38 AM

section should be a rectangle 5 x 1 with vertices [[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it should be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu wrote:

It seems like it should be possible.  Supply the point list and profile
and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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

section should be a rectangle 5 x 1 with vertices [[0,0],[5,0],[5,1],[0,1]] path is mainly a list of 4 vertices with a radius of 5 at each point [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] I dont have my computer with me right now, but this is what it should be On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> wrote: > It seems like it should be possible. Supply the point list and profile > and I can try it. What problem do you have? > > On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> Can this be achieved through path_extrude? >> >> I have tried various ways but could not achieve it. >> >> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GS
Guenther Sohler
Wed, Mar 29, 2023 6:22 AM

Hi Sanjeev,

is this what you are looking for?

[image: image.png]

just angle of 60 deg was guessed

https://imgpile.com/i/hxk8PC

On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

section should be a rectangle 5 x 1 with vertices [[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it should be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu wrote:

It seems like it should be possible.  Supply the point list and profile
and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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

Hi Sanjeev, is this what you are looking for? [image: image.png] just angle of 60 deg was guessed https://imgpile.com/i/hxk8PC On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > section should be a rectangle 5 x 1 with vertices [[0,0],[5,0],[5,1],[0,1]] > > path is mainly a list of 4 vertices with a radius of 5 at each point > > [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] > > I dont have my computer with me right now, but this is what it should be > > On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> wrote: > >> It seems like it should be possible. Supply the point list and profile >> and I can try it. What problem do you have? >> >> On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> Can this be achieved through path_extrude? >>> >>> I have tried various ways but could not achieve it. >>> >>> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >>> _______________________________________________ >>> 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
Wed, Mar 29, 2023 6:32 AM

If you look from -y direction, it should look like a 'V' shape

On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, guenther.sohler@gmail.com
wrote:

Hi Sanjeev,

is this what you are looking for?

[image: image.png]

just angle of 60 deg was guessed

https://imgpile.com/i/hxk8PC

On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

section should be a rectangle 5 x 1 with vertices
[[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it should be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu wrote:

It seems like it should be possible.  Supply the point list and profile
and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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

If you look from -y direction, it should look like a 'V' shape On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, <guenther.sohler@gmail.com> wrote: > Hi Sanjeev, > > is this what you are looking for? > > [image: image.png] > > just angle of 60 deg was guessed > > https://imgpile.com/i/hxk8PC > > On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> section should be a rectangle 5 x 1 with vertices >> [[0,0],[5,0],[5,1],[0,1]] >> >> path is mainly a list of 4 vertices with a radius of 5 at each point >> >> [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] >> >> I dont have my computer with me right now, but this is what it should be >> >> On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> wrote: >> >>> It seems like it should be possible. Supply the point list and profile >>> and I can try it. What problem do you have? >>> >>> On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < >>> sprabhakar2006@gmail.com> wrote: >>> >>>> Can this be achieved through path_extrude? >>>> >>>> I have tried various ways but could not achieve it. >>>> >>>> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >>>> _______________________________________________ >>>> 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
Wed, Mar 29, 2023 11:18 AM

Is there a path_extrude() in some version of OpenSCAD?

On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

If you look from -y direction, it should look like a 'V' shape

On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, guenther.sohler@gmail.com
wrote:

Hi Sanjeev,

is this what you are looking for?

[image: image.png]

just angle of 60 deg was guessed

https://imgpile.com/i/hxk8PC

On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

section should be a rectangle 5 x 1 with vertices
[[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it should be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu wrote:

It seems like it should be possible.  Supply the point list and profile
and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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

Is there a path_extrude() in some version of OpenSCAD? On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > If you look from -y direction, it should look like a 'V' shape > > On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, <guenther.sohler@gmail.com> > wrote: > >> Hi Sanjeev, >> >> is this what you are looking for? >> >> [image: image.png] >> >> just angle of 60 deg was guessed >> >> https://imgpile.com/i/hxk8PC >> >> On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> section should be a rectangle 5 x 1 with vertices >>> [[0,0],[5,0],[5,1],[0,1]] >>> >>> path is mainly a list of 4 vertices with a radius of 5 at each point >>> >>> [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] >>> >>> I dont have my computer with me right now, but this is what it should be >>> >>> On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> wrote: >>> >>>> It seems like it should be possible. Supply the point list and profile >>>> and I can try it. What problem do you have? >>>> >>>> On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < >>>> sprabhakar2006@gmail.com> wrote: >>>> >>>>> Can this be achieved through path_extrude? >>>>> >>>>> I have tried various ways but could not achieve it. >>>>> >>>>> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >>>>> _______________________________________________ >>>>> 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
Wed, Mar 29, 2023 11:38 AM

I don't think there is any path extrude in openscad.
Few developers have written this function.
The version I wrote could not handle this kind of problem.

On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, avm4@cornell.edu wrote:

Is there a path_extrude() in some version of OpenSCAD?

On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

If you look from -y direction, it should look like a 'V' shape

On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, <
guenther.sohler@gmail.com> wrote:

Hi Sanjeev,

is this what you are looking for?

[image: image.png]

just angle of 60 deg was guessed

https://imgpile.com/i/hxk8PC

On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

section should be a rectangle 5 x 1 with vertices
[[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it should be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu wrote:

It seems like it should be possible.  Supply the point list and
profile and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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

I don't think there is any path extrude in openscad. Few developers have written this function. The version I wrote could not handle this kind of problem. On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, <avm4@cornell.edu> wrote: > Is there a path_extrude() in some version of OpenSCAD? > > On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> If you look from -y direction, it should look like a 'V' shape >> >> On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, < >> guenther.sohler@gmail.com> wrote: >> >>> Hi Sanjeev, >>> >>> is this what you are looking for? >>> >>> [image: image.png] >>> >>> just angle of 60 deg was guessed >>> >>> https://imgpile.com/i/hxk8PC >>> >>> On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar < >>> sprabhakar2006@gmail.com> wrote: >>> >>>> section should be a rectangle 5 x 1 with vertices >>>> [[0,0],[5,0],[5,1],[0,1]] >>>> >>>> path is mainly a list of 4 vertices with a radius of 5 at each point >>>> >>>> [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] >>>> >>>> I dont have my computer with me right now, but this is what it should be >>>> >>>> On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> wrote: >>>> >>>>> It seems like it should be possible. Supply the point list and >>>>> profile and I can try it. What problem do you have? >>>>> >>>>> On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < >>>>> sprabhakar2006@gmail.com> wrote: >>>>> >>>>>> Can this be achieved through path_extrude? >>>>>> >>>>>> I have tried various ways but could not achieve it. >>>>>> >>>>>> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >>>>>> _______________________________________________ >>>>>> 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
Wed, Mar 29, 2023 3:42 PM

I have written the code which does this, but not with path_extrude, which I
tried initially.
This is a kind of folding or bending of a sheet, so this is not simple to
do in openscad

On Wed, 29 Mar 2023 at 17:08, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I don't think there is any path extrude in openscad.
Few developers have written this function.
The version I wrote could not handle this kind of problem.

On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, avm4@cornell.edu wrote:

Is there a path_extrude() in some version of OpenSCAD?

On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

If you look from -y direction, it should look like a 'V' shape

On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, <
guenther.sohler@gmail.com> wrote:

Hi Sanjeev,

is this what you are looking for?

[image: image.png]

just angle of 60 deg was guessed

https://imgpile.com/i/hxk8PC

On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

section should be a rectangle 5 x 1 with vertices
[[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it should
be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu wrote:

It seems like it should be possible.  Supply the point list and
profile and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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

I have written the code which does this, but not with path_extrude, which I tried initially. This is a kind of folding or bending of a sheet, so this is not simple to do in openscad On Wed, 29 Mar 2023 at 17:08, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I don't think there is any path extrude in openscad. > Few developers have written this function. > The version I wrote could not handle this kind of problem. > > > > On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, <avm4@cornell.edu> wrote: > >> Is there a path_extrude() in some version of OpenSCAD? >> >> On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> If you look from -y direction, it should look like a 'V' shape >>> >>> On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, < >>> guenther.sohler@gmail.com> wrote: >>> >>>> Hi Sanjeev, >>>> >>>> is this what you are looking for? >>>> >>>> [image: image.png] >>>> >>>> just angle of 60 deg was guessed >>>> >>>> https://imgpile.com/i/hxk8PC >>>> >>>> On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar < >>>> sprabhakar2006@gmail.com> wrote: >>>> >>>>> section should be a rectangle 5 x 1 with vertices >>>>> [[0,0],[5,0],[5,1],[0,1]] >>>>> >>>>> path is mainly a list of 4 vertices with a radius of 5 at each point >>>>> >>>>> [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] >>>>> >>>>> I dont have my computer with me right now, but this is what it should >>>>> be >>>>> >>>>> On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> wrote: >>>>> >>>>>> It seems like it should be possible. Supply the point list and >>>>>> profile and I can try it. What problem do you have? >>>>>> >>>>>> On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < >>>>>> sprabhakar2006@gmail.com> wrote: >>>>>> >>>>>>> Can this be achieved through path_extrude? >>>>>>> >>>>>>> I have tried various ways but could not achieve it. >>>>>>> >>>>>>> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >>>>>>> _______________________________________________ >>>>>>> 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 >> >
AM
Adrian Mariano
Wed, Mar 29, 2023 8:25 PM

I'm confused.  This seems to be a simple application of a path sweep
operation, though it would be better to figure out the angle in an
automated way.

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

p = [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]];
pround = round_corners(p,radius=5,closed=true);
profile = zrot(-20,rect([5,1]));

path_sweep(profile,pround,closed=true);

[image: image.png]

On Wed, Mar 29, 2023 at 11:43 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I have written the code which does this, but not with path_extrude, which
I tried initially.
This is a kind of folding or bending of a sheet, so this is not simple to
do in openscad

On Wed, 29 Mar 2023 at 17:08, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I don't think there is any path extrude in openscad.
Few developers have written this function.
The version I wrote could not handle this kind of problem.

On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, avm4@cornell.edu wrote:

Is there a path_extrude() in some version of OpenSCAD?

On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

If you look from -y direction, it should look like a 'V' shape

On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, <
guenther.sohler@gmail.com> wrote:

Hi Sanjeev,

is this what you are looking for?

[image: image.png]

just angle of 60 deg was guessed

https://imgpile.com/i/hxk8PC

On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

section should be a rectangle 5 x 1 with vertices
[[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it should
be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu wrote:

It seems like it should be possible.  Supply the point list and
profile and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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

I'm confused. This seems to be a simple application of a path sweep operation, though it would be better to figure out the angle in an automated way. include<BOSL2/std.scad> include<BOSL2/rounding.scad> p = [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]; pround = round_corners(p,radius=5,closed=true); profile = zrot(-20,rect([5,1])); path_sweep(profile,pround,closed=true); [image: image.png] On Wed, Mar 29, 2023 at 11:43 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I have written the code which does this, but not with path_extrude, which > I tried initially. > This is a kind of folding or bending of a sheet, so this is not simple to > do in openscad > > On Wed, 29 Mar 2023 at 17:08, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> I don't think there is any path extrude in openscad. >> Few developers have written this function. >> The version I wrote could not handle this kind of problem. >> >> >> >> On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, <avm4@cornell.edu> wrote: >> >>> Is there a path_extrude() in some version of OpenSCAD? >>> >>> On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar < >>> sprabhakar2006@gmail.com> wrote: >>> >>>> If you look from -y direction, it should look like a 'V' shape >>>> >>>> On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, < >>>> guenther.sohler@gmail.com> wrote: >>>> >>>>> Hi Sanjeev, >>>>> >>>>> is this what you are looking for? >>>>> >>>>> [image: image.png] >>>>> >>>>> just angle of 60 deg was guessed >>>>> >>>>> https://imgpile.com/i/hxk8PC >>>>> >>>>> On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar < >>>>> sprabhakar2006@gmail.com> wrote: >>>>> >>>>>> section should be a rectangle 5 x 1 with vertices >>>>>> [[0,0],[5,0],[5,1],[0,1]] >>>>>> >>>>>> path is mainly a list of 4 vertices with a radius of 5 at each point >>>>>> >>>>>> [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] >>>>>> >>>>>> I dont have my computer with me right now, but this is what it should >>>>>> be >>>>>> >>>>>> On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> wrote: >>>>>> >>>>>>> It seems like it should be possible. Supply the point list and >>>>>>> profile and I can try it. What problem do you have? >>>>>>> >>>>>>> On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < >>>>>>> sprabhakar2006@gmail.com> wrote: >>>>>>> >>>>>>>> Can this be achieved through path_extrude? >>>>>>>> >>>>>>>> I have tried various ways but could not achieve it. >>>>>>>> >>>>>>>> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >>>>>>>> _______________________________________________ >>>>>>>> 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
Thu, Mar 30, 2023 2:28 AM

This is close but not exactly what I wanted to do.

You can check my file and if you look from x+ direction, it is a perfect
'V'.

Path extrude function of Guenther and you seems to be quite similar.

On Thu, 30 Mar, 2023, 1:56 am Adrian Mariano, avm4@cornell.edu wrote:

I'm confused.  This seems to be a simple application of a path sweep
operation, though it would be better to figure out the angle in an
automated way.

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

p = [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]];
pround = round_corners(p,radius=5,closed=true);
profile = zrot(-20,rect([5,1]));

path_sweep(profile,pround,closed=true);

[image: image.png]

On Wed, Mar 29, 2023 at 11:43 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

I have written the code which does this, but not with path_extrude, which
I tried initially.
This is a kind of folding or bending of a sheet, so this is not simple to
do in openscad

On Wed, 29 Mar 2023 at 17:08, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I don't think there is any path extrude in openscad.
Few developers have written this function.
The version I wrote could not handle this kind of problem.

On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, avm4@cornell.edu wrote:

Is there a path_extrude() in some version of OpenSCAD?

On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

If you look from -y direction, it should look like a 'V' shape

On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, <
guenther.sohler@gmail.com> wrote:

Hi Sanjeev,

is this what you are looking for?

[image: image.png]

just angle of 60 deg was guessed

https://imgpile.com/i/hxk8PC

On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

section should be a rectangle 5 x 1 with vertices
[[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it
should be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu wrote:

It seems like it should be possible.  Supply the point list and
profile and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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


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

This is close but not exactly what I wanted to do. You can check my file and if you look from x+ direction, it is a perfect 'V'. Path extrude function of Guenther and you seems to be quite similar. On Thu, 30 Mar, 2023, 1:56 am Adrian Mariano, <avm4@cornell.edu> wrote: > I'm confused. This seems to be a simple application of a path sweep > operation, though it would be better to figure out the angle in an > automated way. > > include<BOSL2/std.scad> > include<BOSL2/rounding.scad> > > p = [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]; > pround = round_corners(p,radius=5,closed=true); > profile = zrot(-20,rect([5,1])); > > path_sweep(profile,pround,closed=true); > > > [image: image.png] > > > On Wed, Mar 29, 2023 at 11:43 AM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> I have written the code which does this, but not with path_extrude, which >> I tried initially. >> This is a kind of folding or bending of a sheet, so this is not simple to >> do in openscad >> >> On Wed, 29 Mar 2023 at 17:08, Sanjeev Prabhakar <sprabhakar2006@gmail.com> >> wrote: >> >>> I don't think there is any path extrude in openscad. >>> Few developers have written this function. >>> The version I wrote could not handle this kind of problem. >>> >>> >>> >>> On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, <avm4@cornell.edu> wrote: >>> >>>> Is there a path_extrude() in some version of OpenSCAD? >>>> >>>> On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar < >>>> sprabhakar2006@gmail.com> wrote: >>>> >>>>> If you look from -y direction, it should look like a 'V' shape >>>>> >>>>> On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, < >>>>> guenther.sohler@gmail.com> wrote: >>>>> >>>>>> Hi Sanjeev, >>>>>> >>>>>> is this what you are looking for? >>>>>> >>>>>> [image: image.png] >>>>>> >>>>>> just angle of 60 deg was guessed >>>>>> >>>>>> https://imgpile.com/i/hxk8PC >>>>>> >>>>>> On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar < >>>>>> sprabhakar2006@gmail.com> wrote: >>>>>> >>>>>>> section should be a rectangle 5 x 1 with vertices >>>>>>> [[0,0],[5,0],[5,1],[0,1]] >>>>>>> >>>>>>> path is mainly a list of 4 vertices with a radius of 5 at each point >>>>>>> >>>>>>> [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] >>>>>>> >>>>>>> I dont have my computer with me right now, but this is what it >>>>>>> should be >>>>>>> >>>>>>> On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> wrote: >>>>>>> >>>>>>>> It seems like it should be possible. Supply the point list and >>>>>>>> profile and I can try it. What problem do you have? >>>>>>>> >>>>>>>> On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < >>>>>>>> sprabhakar2006@gmail.com> wrote: >>>>>>>> >>>>>>>>> Can this be achieved through path_extrude? >>>>>>>>> >>>>>>>>> I have tried various ways but could not achieve it. >>>>>>>>> >>>>>>>>> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >>>>>>>>> _______________________________________________ >>>>>>>>> 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 >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Thu, Mar 30, 2023 3:19 AM

If it's supposed to be a perfect V then something like this:

include<BOSL2/std.scad>

module thing(){
path = round_corners(zrot(45, rect(40)), radius=5,closed=true);
path_sweep(rect([5,1]),path,closed=true);
}

right_half()yrot(-20)thing();
left_half()yrot(20)thing();

There was a post maybe a year ago about folding where someone wanted to
perform a sequence of folds.  It is a simpler thing than doing a path
sweep.  I do think that path sweep can make the shape you show, but you
have to control the normals and twist properly, which will be tricky to
do.  That is the general problem with path_sweep:  it's not a well-defined
operation.

[image: image.png]
Now that I think about it, the starting shape should have been simply a
difference of two rounded rectangles.  Or a tube.  But this works for a
large class of objects.

On Wed, Mar 29, 2023 at 10:30 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

This is close but not exactly what I wanted to do.

You can check my file and if you look from x+ direction, it is a perfect
'V'.

Path extrude function of Guenther and you seems to be quite similar.

On Thu, 30 Mar, 2023, 1:56 am Adrian Mariano, avm4@cornell.edu wrote:

I'm confused.  This seems to be a simple application of a path sweep
operation, though it would be better to figure out the angle in an
automated way.

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

p = [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]];
pround = round_corners(p,radius=5,closed=true);
profile = zrot(-20,rect([5,1]));

path_sweep(profile,pround,closed=true);

[image: image.png]

On Wed, Mar 29, 2023 at 11:43 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

I have written the code which does this, but not with path_extrude,
which I tried initially.
This is a kind of folding or bending of a sheet, so this is not simple
to do in openscad

On Wed, 29 Mar 2023 at 17:08, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

I don't think there is any path extrude in openscad.
Few developers have written this function.
The version I wrote could not handle this kind of problem.

On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, avm4@cornell.edu wrote:

Is there a path_extrude() in some version of OpenSCAD?

On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

If you look from -y direction, it should look like a 'V' shape

On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, <
guenther.sohler@gmail.com> wrote:

Hi Sanjeev,

is this what you are looking for?

[image: image.png]

just angle of 60 deg was guessed

https://imgpile.com/i/hxk8PC

On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

section should be a rectangle 5 x 1 with vertices
[[0,0],[5,0],[5,1],[0,1]]

path is mainly a list of 4 vertices with a radius of 5 at each point

[[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]

I dont have my computer with me right now, but this is what it
should be

On Wed, 29 Mar 2023, 08:56 Adrian Mariano, avm4@cornell.edu
wrote:

It seems like it should be possible.  Supply the point list and
profile and I can try it.  What problem do you have?

On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Can this be achieved through path_extrude?

I have tried various ways but could not achieve it.

[image: Screenshot 2023-03-28 at 9.12.31 PM.png]


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


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

If it's supposed to be a perfect V then something like this: include<BOSL2/std.scad> module thing(){ path = round_corners(zrot(45, rect(40)), radius=5,closed=true); path_sweep(rect([5,1]),path,closed=true); } right_half()yrot(-20)thing(); left_half()yrot(20)thing(); There was a post maybe a year ago about folding where someone wanted to perform a sequence of folds. It is a simpler thing than doing a path sweep. I do think that path sweep can make the shape you show, but you have to control the normals and twist properly, which will be tricky to do. That is the general problem with path_sweep: it's not a well-defined operation. [image: image.png] Now that I think about it, the starting shape should have been simply a difference of two rounded rectangles. Or a tube. But this works for a large class of objects. On Wed, Mar 29, 2023 at 10:30 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > This is close but not exactly what I wanted to do. > > You can check my file and if you look from x+ direction, it is a perfect > 'V'. > > Path extrude function of Guenther and you seems to be quite similar. > > > > > On Thu, 30 Mar, 2023, 1:56 am Adrian Mariano, <avm4@cornell.edu> wrote: > >> I'm confused. This seems to be a simple application of a path sweep >> operation, though it would be better to figure out the angle in an >> automated way. >> >> include<BOSL2/std.scad> >> include<BOSL2/rounding.scad> >> >> p = [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]]; >> pround = round_corners(p,radius=5,closed=true); >> profile = zrot(-20,rect([5,1])); >> >> path_sweep(profile,pround,closed=true); >> >> >> [image: image.png] >> >> >> On Wed, Mar 29, 2023 at 11:43 AM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> I have written the code which does this, but not with path_extrude, >>> which I tried initially. >>> This is a kind of folding or bending of a sheet, so this is not simple >>> to do in openscad >>> >>> On Wed, 29 Mar 2023 at 17:08, Sanjeev Prabhakar < >>> sprabhakar2006@gmail.com> wrote: >>> >>>> I don't think there is any path extrude in openscad. >>>> Few developers have written this function. >>>> The version I wrote could not handle this kind of problem. >>>> >>>> >>>> >>>> On Wed, 29 Mar, 2023, 4:50 pm Adrian Mariano, <avm4@cornell.edu> wrote: >>>> >>>>> Is there a path_extrude() in some version of OpenSCAD? >>>>> >>>>> On Wed, Mar 29, 2023 at 2:33 AM Sanjeev Prabhakar < >>>>> sprabhakar2006@gmail.com> wrote: >>>>> >>>>>> If you look from -y direction, it should look like a 'V' shape >>>>>> >>>>>> On Wed, 29 Mar, 2023, 11:52 am Guenther Sohler, < >>>>>> guenther.sohler@gmail.com> wrote: >>>>>> >>>>>>> Hi Sanjeev, >>>>>>> >>>>>>> is this what you are looking for? >>>>>>> >>>>>>> [image: image.png] >>>>>>> >>>>>>> just angle of 60 deg was guessed >>>>>>> >>>>>>> https://imgpile.com/i/hxk8PC >>>>>>> >>>>>>> On Wed, Mar 29, 2023 at 6:39 AM Sanjeev Prabhakar < >>>>>>> sprabhakar2006@gmail.com> wrote: >>>>>>> >>>>>>>> section should be a rectangle 5 x 1 with vertices >>>>>>>> [[0,0],[5,0],[5,1],[0,1]] >>>>>>>> >>>>>>>> path is mainly a list of 4 vertices with a radius of 5 at each point >>>>>>>> >>>>>>>> [[20,0,10],[0,20,0],[-20,0,10],[0,-20,0]] >>>>>>>> >>>>>>>> I dont have my computer with me right now, but this is what it >>>>>>>> should be >>>>>>>> >>>>>>>> On Wed, 29 Mar 2023, 08:56 Adrian Mariano, <avm4@cornell.edu> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> It seems like it should be possible. Supply the point list and >>>>>>>>> profile and I can try it. What problem do you have? >>>>>>>>> >>>>>>>>> On Tue, Mar 28, 2023 at 10:49 PM Sanjeev Prabhakar < >>>>>>>>> sprabhakar2006@gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Can this be achieved through path_extrude? >>>>>>>>>> >>>>>>>>>> I have tried various ways but could not achieve it. >>>>>>>>>> >>>>>>>>>> [image: Screenshot 2023-03-28 at 9.12.31 PM.png] >>>>>>>>>> _______________________________________________ >>>>>>>>>> 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 >>> >> _______________________________________________ >> 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
Thu, Mar 30, 2023 4:03 AM

below is the expected figure
[image: Screenshot 2023-03-30 at 9.30.08 AM.png]

[image: Screenshot 2023-03-30 at 9.32.55 AM.png]

below is the expected figure [image: Screenshot 2023-03-30 at 9.30.08 AM.png] [image: Screenshot 2023-03-30 at 9.32.55 AM.png] > >
GS
Guenther Sohler
Thu, Mar 30, 2023 9:16 AM

its great!

can you explain us the exact application ? is it a sealing ?

On Thu, Mar 30, 2023 at 6:05 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

below is the expected figure
[image: Screenshot 2023-03-30 at 9.30.08 AM.png]

[image: Screenshot 2023-03-30 at 9.32.55 AM.png]


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

its great! can you explain us the exact application ? is it a sealing ? On Thu, Mar 30, 2023 at 6:05 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > below is the expected figure > [image: Screenshot 2023-03-30 at 9.30.08 AM.png] > > [image: Screenshot 2023-03-30 at 9.32.55 AM.png] >> >> _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Thu, Mar 30, 2023 10:50 AM

No application just an arbitrary shape.

There are a lot of application for sheet bending to different shapes and
sizes.
This is probably a very simplistic example.

On Thu, 30 Mar, 2023, 2:46 pm Guenther Sohler, guenther.sohler@gmail.com
wrote:

its great!

can you explain us the exact application ? is it a sealing ?

On Thu, Mar 30, 2023 at 6:05 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

below is the expected figure
[image: Screenshot 2023-03-30 at 9.30.08 AM.png]

[image: Screenshot 2023-03-30 at 9.32.55 AM.png]


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

No application just an arbitrary shape. There are a lot of application for sheet bending to different shapes and sizes. This is probably a very simplistic example. On Thu, 30 Mar, 2023, 2:46 pm Guenther Sohler, <guenther.sohler@gmail.com> wrote: > its great! > > can you explain us the exact application ? is it a sealing ? > > On Thu, Mar 30, 2023 at 6:05 AM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> below is the expected figure >> [image: Screenshot 2023-03-30 at 9.30.08 AM.png] >> >> [image: Screenshot 2023-03-30 at 9.32.55 AM.png] >>> >>> _______________________________________________ >> 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 >
CA
Carsten Arnholm
Thu, Mar 30, 2023 4:46 PM

On 2023-03-30 12:50, Sanjeev Prabhakar wrote:

There are a lot of application for sheet bending to different shapes
and sizes.
This is probably a very simplistic example.

This model is most easily made by extruding a 2d profile with a
relatively dense mesh in the bend area. Then bend the model by rotating
nodes around y=constant. You can't do the last part in OpenSCAD though.

Carsten Arnholm

On 2023-03-30 12:50, Sanjeev Prabhakar wrote: > There are a lot of application for sheet bending to different shapes > and sizes. > This is probably a very simplistic example. This model is most easily made by extruding a 2d profile with a relatively dense mesh in the bend area. Then bend the model by rotating nodes around y=constant. You can't do the last part in OpenSCAD though. Carsten Arnholm
GS
Guenther Sohler
Thu, Mar 30, 2023 4:50 PM

hi Carsten,

can you please elaborate, what it exactly means:
rotating while y=contant. ?

I doubt you refer to rotation in X-Z plane ...

On Thu, Mar 30, 2023 at 6:47 PM Carsten Arnholm arnholm@arnholm.org wrote:

On 2023-03-30 12:50, Sanjeev Prabhakar wrote:

There are a lot of application for sheet bending to different shapes
and sizes.
This is probably a very simplistic example.

This model is most easily made by extruding a 2d profile with a
relatively dense mesh in the bend area. Then bend the model by rotating
nodes around y=constant. You can't do the last part in OpenSCAD though.

Carsten Arnholm


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

hi Carsten, can you please elaborate, what it exactly means: rotating while y=contant. ? I doubt you refer to rotation in X-Z plane ... On Thu, Mar 30, 2023 at 6:47 PM Carsten Arnholm <arnholm@arnholm.org> wrote: > On 2023-03-30 12:50, Sanjeev Prabhakar wrote: > > There are a lot of application for sheet bending to different shapes > > and sizes. > > This is probably a very simplistic example. > > This model is most easily made by extruding a 2d profile with a > relatively dense mesh in the bend area. Then bend the model by rotating > nodes around y=constant. You can't do the last part in OpenSCAD though. > > Carsten Arnholm > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
CA
Carsten Arnholm
Thu, Mar 30, 2023 5:55 PM

On 30.03.2023 18:50, Guenther Sohler wrote:

can you please elaborate, what it exactly means:
rotating while y=contant. ?

I doubt you refer to rotation in X-Z plane ...

I said rotate "around y=constant". That means in this case a rotation
axis parallel to the X axis. Obviously it is not a solid body rotation,
but a rotation of individual mesh nodes resulting in bending the model
when represented as a mesh.

Carsten Anrholm

On 30.03.2023 18:50, Guenther Sohler wrote: > can you please elaborate, what it exactly means: > rotating while y=contant. ? > > I doubt you refer to rotation in X-Z plane ... > I said rotate "around y=constant". That means in this case a rotation axis parallel to the X axis. Obviously it is not a solid body rotation, but a rotation of individual mesh nodes resulting in bending the model when represented as a mesh. Carsten Anrholm
AM
Adrian Mariano
Thu, Mar 30, 2023 8:31 PM

Actually the approach Carsten describes is possible in openscad if you are
working with points and not geometry.  In BOSL2 there is already vnf_bend()
which bends an arbitrary polyhedron around a cylinder.

https://github.com/revarbat/BOSL2/wiki/vnf.scad#function-vnf_bend

The task of "folding" with a rounded fold is very similar to this.  The
vnf_bend() function slices up the polyhedron so that you have a sufficient
sample rate to produce the desired curves.    I thought about trying to
implement the "folding" transform but it's tricky to write the function
that does the fold, so I'm probably not going to do it.  But here's an
example using BOSL2 where I took vnf_bend and removed the "bend" part and
made it into a generalized distortion module that can then apply an
arbitrary function to distort the given shape.  Supply the f() that
performs the bend that you want and you can bend shapes that you can build
as polyhedra that aren't too complicated.  (It's probably a long wait it
you have thousands of faces.)

include<BOSL2/std.scad>

function vnf_distort(vnf,f,steps=10,axis="Z") =
let(
chk_axis = assert(in_list(axis,["X","Y","Z"])),
verts = vnf[0],
bounds = pointlist_bounds(verts),
bmin = bounds[0],
bmax = bounds[1],
dflt = axis=="Z"?
max(abs(bmax.y), abs(bmin.y)) :
max(abs(bmax.z), abs(bmin.z)),
extent = axis=="X" ? [bmin.y, bmax.y] : [bmin.x, bmax.x]
)
let(
//steps = 1+ceil(segs(r) * (extent[1]-extent[0])/(2PIr)),
step = (extent[1]-extent[0]) / steps,
bend_at = [for(i = [1:1:steps-1]) i*step+extent[0]],
slicedir = axis=="X"? "Y" : "X",  // slice in y dir for X axis
case, and x dir otherwise
sliced = vnf_slice(vnf, slicedir, bend_at),
new_vert = [for(p=sliced[0]) f(p)]
) [new_vert,sliced[1]];

f = function(p)
[p.x, p.y, 7sin(4p.x)+p.z+45];

rgn = union(
rect([20,100]),
back(50, p=trapezoid(w1=40, w2=0, h=20, anchor=FRONT))
);
rgnr = zrot(90, p=rgn);
vnf0 = xrot(90,p=linear_sweep(rgnr, height=10));
vnf1 = fwd(50, p=vnf0);
vnf_polyhedron(vnf1);
bent1 = vnf_distort(vnf1,f,steps=32);
vnf_polyhedron(bent1);

Which produces the distorted wiggly arrow at the top from the straight
arrow at the bottom:

[image: image.png]

On Thu, Mar 30, 2023 at 1:56 PM Carsten Arnholm arnholm@arnholm.org wrote:

On 30.03.2023 18:50, Guenther Sohler wrote:

can you please elaborate, what it exactly means:
rotating while y=contant. ?

I doubt you refer to rotation in X-Z plane ...

I said rotate "around y=constant". That means in this case a rotation
axis parallel to the X axis. Obviously it is not a solid body rotation,
but a rotation of individual mesh nodes resulting in bending the model
when represented as a mesh.

Carsten Anrholm


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

Actually the approach Carsten describes is possible in openscad if you are working with points and not geometry. In BOSL2 there is already vnf_bend() which bends an arbitrary polyhedron around a cylinder. https://github.com/revarbat/BOSL2/wiki/vnf.scad#function-vnf_bend The task of "folding" with a rounded fold is very similar to this. The vnf_bend() function slices up the polyhedron so that you have a sufficient sample rate to produce the desired curves. I thought about trying to implement the "folding" transform but it's tricky to write the function that does the fold, so I'm probably not going to do it. But here's an example using BOSL2 where I took vnf_bend and removed the "bend" part and made it into a generalized distortion module that can then apply an arbitrary function to distort the given shape. Supply the f() that performs the bend that you want and you can bend shapes that you can build as polyhedra that aren't too complicated. (It's probably a long wait it you have thousands of faces.) include<BOSL2/std.scad> function vnf_distort(vnf,f,steps=10,axis="Z") = let( chk_axis = assert(in_list(axis,["X","Y","Z"])), verts = vnf[0], bounds = pointlist_bounds(verts), bmin = bounds[0], bmax = bounds[1], dflt = axis=="Z"? max(abs(bmax.y), abs(bmin.y)) : max(abs(bmax.z), abs(bmin.z)), extent = axis=="X" ? [bmin.y, bmax.y] : [bmin.x, bmax.x] ) let( //steps = 1+ceil(segs(r) * (extent[1]-extent[0])/(2*PI*r)), step = (extent[1]-extent[0]) / steps, bend_at = [for(i = [1:1:steps-1]) i*step+extent[0]], slicedir = axis=="X"? "Y" : "X", // slice in y dir for X axis case, and x dir otherwise sliced = vnf_slice(vnf, slicedir, bend_at), new_vert = [for(p=sliced[0]) f(p)] ) [new_vert,sliced[1]]; f = function(p) [p.x, p.y, 7*sin(4*p.x)+p.z+45]; rgn = union( rect([20,100]), back(50, p=trapezoid(w1=40, w2=0, h=20, anchor=FRONT)) ); rgnr = zrot(90, p=rgn); vnf0 = xrot(90,p=linear_sweep(rgnr, height=10)); vnf1 = fwd(50, p=vnf0); vnf_polyhedron(vnf1); bent1 = vnf_distort(vnf1,f,steps=32); vnf_polyhedron(bent1); Which produces the distorted wiggly arrow at the top from the straight arrow at the bottom: [image: image.png] On Thu, Mar 30, 2023 at 1:56 PM Carsten Arnholm <arnholm@arnholm.org> wrote: > On 30.03.2023 18:50, Guenther Sohler wrote: > > can you please elaborate, what it exactly means: > > rotating while y=contant. ? > > > > I doubt you refer to rotation in X-Z plane ... > > > I said rotate "around y=constant". That means in this case a rotation > axis parallel to the X axis. Obviously it is not a solid body rotation, > but a rotation of individual mesh nodes resulting in bending the model > when represented as a mesh. > > Carsten Anrholm > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Fri, Mar 31, 2023 1:06 AM

Thanks,

I have written something similar.

You don't need a dense mesh in this case, though in many cases it may be
required.

I have a very simplistic function for path_extrude, initially I thought
this could be done with path_extrude, but I realised later this may not
be possible by extruding a 2d shape.

On Thu, 30 Mar, 2023, 10:16 pm Carsten Arnholm, arnholm@arnholm.org wrote:

On 2023-03-30 12:50, Sanjeev Prabhakar wrote:

There are a lot of application for sheet bending to different shapes
and sizes.
This is probably a very simplistic example.

This model is most easily made by extruding a 2d profile with a
relatively dense mesh in the bend area. Then bend the model by rotating
nodes around y=constant. You can't do the last part in OpenSCAD though.

Carsten Arnholm

Thanks, I have written something similar. You don't need a dense mesh in this case, though in many cases it may be required. I have a very simplistic function for path_extrude, initially I thought this could be done with path_extrude, but I realised later this may not be possible by extruding a 2d shape. On Thu, 30 Mar, 2023, 10:16 pm Carsten Arnholm, <arnholm@arnholm.org> wrote: > On 2023-03-30 12:50, Sanjeev Prabhakar wrote: > > There are a lot of application for sheet bending to different shapes > > and sizes. > > This is probably a very simplistic example. > > This model is most easily made by extruding a 2d profile with a > relatively dense mesh in the bend area. Then bend the model by rotating > nodes around y=constant. You can't do the last part in OpenSCAD though. > > Carsten Arnholm >
SP
Sanjeev Prabhakar
Fri, Mar 31, 2023 1:12 AM

Looks great
Normally I bend a 2d shape first and then create a surface from that
through offset.

On Fri, 31 Mar, 2023, 2:02 am Adrian Mariano, avm4@cornell.edu wrote:

Actually the approach Carsten describes is possible in openscad if you are
working with points and not geometry.  In BOSL2 there is already vnf_bend()
which bends an arbitrary polyhedron around a cylinder.

https://github.com/revarbat/BOSL2/wiki/vnf.scad#function-vnf_bend

The task of "folding" with a rounded fold is very similar to this.  The
vnf_bend() function slices up the polyhedron so that you have a sufficient
sample rate to produce the desired curves.    I thought about trying to
implement the "folding" transform but it's tricky to write the function
that does the fold, so I'm probably not going to do it.  But here's an
example using BOSL2 where I took vnf_bend and removed the "bend" part and
made it into a generalized distortion module that can then apply an
arbitrary function to distort the given shape.  Supply the f() that
performs the bend that you want and you can bend shapes that you can build
as polyhedra that aren't too complicated.  (It's probably a long wait it
you have thousands of faces.)

include<BOSL2/std.scad>

function vnf_distort(vnf,f,steps=10,axis="Z") =
let(
chk_axis = assert(in_list(axis,["X","Y","Z"])),
verts = vnf[0],
bounds = pointlist_bounds(verts),
bmin = bounds[0],
bmax = bounds[1],
dflt = axis=="Z"?
max(abs(bmax.y), abs(bmin.y)) :
max(abs(bmax.z), abs(bmin.z)),
extent = axis=="X" ? [bmin.y, bmax.y] : [bmin.x, bmax.x]
)
let(
//steps = 1+ceil(segs(r) * (extent[1]-extent[0])/(2PIr)),
step = (extent[1]-extent[0]) / steps,
bend_at = [for(i = [1:1:steps-1]) i*step+extent[0]],
slicedir = axis=="X"? "Y" : "X",  // slice in y dir for X axis
case, and x dir otherwise
sliced = vnf_slice(vnf, slicedir, bend_at),
new_vert = [for(p=sliced[0]) f(p)]
) [new_vert,sliced[1]];

f = function(p)
[p.x, p.y, 7sin(4p.x)+p.z+45];

rgn = union(
rect([20,100]),
back(50, p=trapezoid(w1=40, w2=0, h=20, anchor=FRONT))
);
rgnr = zrot(90, p=rgn);
vnf0 = xrot(90,p=linear_sweep(rgnr, height=10));
vnf1 = fwd(50, p=vnf0);
vnf_polyhedron(vnf1);
bent1 = vnf_distort(vnf1,f,steps=32);
vnf_polyhedron(bent1);

Which produces the distorted wiggly arrow at the top from the straight
arrow at the bottom:

[image: image.png]

On Thu, Mar 30, 2023 at 1:56 PM Carsten Arnholm arnholm@arnholm.org
wrote:

On 30.03.2023 18:50, Guenther Sohler wrote:

can you please elaborate, what it exactly means:
rotating while y=contant. ?

I doubt you refer to rotation in X-Z plane ...

I said rotate "around y=constant". That means in this case a rotation
axis parallel to the X axis. Obviously it is not a solid body rotation,
but a rotation of individual mesh nodes resulting in bending the model
when represented as a mesh.

Carsten Anrholm


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

Looks great Normally I bend a 2d shape first and then create a surface from that through offset. On Fri, 31 Mar, 2023, 2:02 am Adrian Mariano, <avm4@cornell.edu> wrote: > Actually the approach Carsten describes is possible in openscad if you are > working with points and not geometry. In BOSL2 there is already vnf_bend() > which bends an arbitrary polyhedron around a cylinder. > > https://github.com/revarbat/BOSL2/wiki/vnf.scad#function-vnf_bend > > The task of "folding" with a rounded fold is very similar to this. The > vnf_bend() function slices up the polyhedron so that you have a sufficient > sample rate to produce the desired curves. I thought about trying to > implement the "folding" transform but it's tricky to write the function > that does the fold, so I'm probably not going to do it. But here's an > example using BOSL2 where I took vnf_bend and removed the "bend" part and > made it into a generalized distortion module that can then apply an > arbitrary function to distort the given shape. Supply the f() that > performs the bend that you want and you can bend shapes that you can build > as polyhedra that aren't too complicated. (It's probably a long wait it > you have thousands of faces.) > > include<BOSL2/std.scad> > > function vnf_distort(vnf,f,steps=10,axis="Z") = > let( > chk_axis = assert(in_list(axis,["X","Y","Z"])), > verts = vnf[0], > bounds = pointlist_bounds(verts), > bmin = bounds[0], > bmax = bounds[1], > dflt = axis=="Z"? > max(abs(bmax.y), abs(bmin.y)) : > max(abs(bmax.z), abs(bmin.z)), > extent = axis=="X" ? [bmin.y, bmax.y] : [bmin.x, bmax.x] > ) > let( > //steps = 1+ceil(segs(r) * (extent[1]-extent[0])/(2*PI*r)), > step = (extent[1]-extent[0]) / steps, > bend_at = [for(i = [1:1:steps-1]) i*step+extent[0]], > slicedir = axis=="X"? "Y" : "X", // slice in y dir for X axis > case, and x dir otherwise > sliced = vnf_slice(vnf, slicedir, bend_at), > new_vert = [for(p=sliced[0]) f(p)] > ) [new_vert,sliced[1]]; > > > f = function(p) > [p.x, p.y, 7*sin(4*p.x)+p.z+45]; > > > rgn = union( > rect([20,100]), > back(50, p=trapezoid(w1=40, w2=0, h=20, anchor=FRONT)) > ); > rgnr = zrot(90, p=rgn); > vnf0 = xrot(90,p=linear_sweep(rgnr, height=10)); > vnf1 = fwd(50, p=vnf0); > vnf_polyhedron(vnf1); > bent1 = vnf_distort(vnf1,f,steps=32); > vnf_polyhedron(bent1); > > > Which produces the distorted wiggly arrow at the top from the straight > arrow at the bottom: > > [image: image.png] > > > On Thu, Mar 30, 2023 at 1:56 PM Carsten Arnholm <arnholm@arnholm.org> > wrote: > >> On 30.03.2023 18:50, Guenther Sohler wrote: >> > can you please elaborate, what it exactly means: >> > rotating while y=contant. ? >> > >> > I doubt you refer to rotation in X-Z plane ... >> > >> I said rotate "around y=constant". That means in this case a rotation >> axis parallel to the X axis. Obviously it is not a solid body rotation, >> but a rotation of individual mesh nodes resulting in bending the model >> when represented as a mesh. >> >> Carsten Anrholm >> _______________________________________________ >> 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, Apr 2, 2023 5:12 AM

I was thinking about the path_extrude for a close loop path like below

[image: Screenshot 2023-04-02 at 10.36.49 AM.png]

should the extruded section along the path look like below?

[image: Screenshot 2023-04-02 at 10.32.35 AM.png]

I was thinking about the path_extrude for a close loop path like below [image: Screenshot 2023-04-02 at 10.36.49 AM.png] should the extruded section along the path look like below? [image: Screenshot 2023-04-02 at 10.32.35 AM.png]
GS
Guenther Sohler
Sun, Apr 2, 2023 7:11 AM

Hi sanjeev, IT appears that you have to Twist the path along the was in a
Special was to achieve this.

Sanjeev Prabhakar sprabhakar2006@gmail.com schrieb am So., 2. Apr. 2023,
07:13:

I was thinking about the path_extrude for a close loop path like below

[image: Screenshot 2023-04-02 at 10.36.49 AM.png]

should the extruded section along the path look like below?

[image: Screenshot 2023-04-02 at 10.32.35 AM.png]


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

Hi sanjeev, IT appears that you have to Twist the path along the was in a Special was to achieve this. Sanjeev Prabhakar <sprabhakar2006@gmail.com> schrieb am So., 2. Apr. 2023, 07:13: > I was thinking about the path_extrude for a close loop path like below > > [image: Screenshot 2023-04-02 at 10.36.49 AM.png] > > should the extruded section along the path look like below? > > [image: Screenshot 2023-04-02 at 10.32.35 AM.png] > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Sun, Apr 2, 2023 7:25 AM

Hi Guenther,

I added a twist angle to get this.

Earlier version of path extrude did not have this twist.

I was just wondering whether this is correct or not.

Regards

On Sun, 2 Apr, 2023, 12:42 pm Guenther Sohler, guenther.sohler@gmail.com
wrote:

Hi sanjeev, IT appears that you have to Twist the path along the was in a
Special was to achieve this.

Sanjeev Prabhakar sprabhakar2006@gmail.com schrieb am So., 2. Apr.
2023, 07:13:

I was thinking about the path_extrude for a close loop path like below

[image: Screenshot 2023-04-02 at 10.36.49 AM.png]

should the extruded section along the path look like below?

[image: Screenshot 2023-04-02 at 10.32.35 AM.png]


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

Hi Guenther, I added a twist angle to get this. Earlier version of path extrude did not have this twist. I was just wondering whether this is correct or not. Regards On Sun, 2 Apr, 2023, 12:42 pm Guenther Sohler, <guenther.sohler@gmail.com> wrote: > Hi sanjeev, IT appears that you have to Twist the path along the was in a > Special was to achieve this. > > Sanjeev Prabhakar <sprabhakar2006@gmail.com> schrieb am So., 2. Apr. > 2023, 07:13: > >> I was thinking about the path_extrude for a close loop path like below >> >> [image: Screenshot 2023-04-02 at 10.36.49 AM.png] >> >> should the extruded section along the path look like below? >> >> [image: Screenshot 2023-04-02 at 10.32.35 AM.png] >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GS
Guenther Sohler
Sun, Apr 2, 2023 7:50 AM

Hi sanjeev, very interesting.
Apparently you do Not Twist the path linearily along ITS was but  instead
follow a Special concept. How to get IT correctly to See exactly your
result? IS the Twist a piece-wise linear function along the path and you
did Dome trials on the pwl Points to get the result correct?

Sanjeev Prabhakar sprabhakar2006@gmail.com schrieb am So., 2. Apr. 2023,
09:26:

Hi Guenther,

I added a twist angle to get this.

Earlier version of path extrude did not have this twist.

I was just wondering whether this is correct or not.

Regards

On Sun, 2 Apr, 2023, 12:42 pm Guenther Sohler, guenther.sohler@gmail.com
wrote:

Hi sanjeev, IT appears that you have to Twist the path along the was in a
Special was to achieve this.

Sanjeev Prabhakar sprabhakar2006@gmail.com schrieb am So., 2. Apr.
2023, 07:13:

I was thinking about the path_extrude for a close loop path like below

[image: Screenshot 2023-04-02 at 10.36.49 AM.png]

should the extruded section along the path look like below?

[image: Screenshot 2023-04-02 at 10.32.35 AM.png]


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

Hi sanjeev, very interesting. Apparently you do Not Twist the path linearily along ITS was but instead follow a Special concept. How to get IT correctly to See exactly your result? IS the Twist a piece-wise linear function along the path and you did Dome trials on the pwl Points to get the result correct? Sanjeev Prabhakar <sprabhakar2006@gmail.com> schrieb am So., 2. Apr. 2023, 09:26: > Hi Guenther, > > I added a twist angle to get this. > > Earlier version of path extrude did not have this twist. > > I was just wondering whether this is correct or not. > > Regards > > On Sun, 2 Apr, 2023, 12:42 pm Guenther Sohler, <guenther.sohler@gmail.com> > wrote: > >> Hi sanjeev, IT appears that you have to Twist the path along the was in a >> Special was to achieve this. >> >> Sanjeev Prabhakar <sprabhakar2006@gmail.com> schrieb am So., 2. Apr. >> 2023, 07:13: >> >>> I was thinking about the path_extrude for a close loop path like below >>> >>> [image: Screenshot 2023-04-02 at 10.36.49 AM.png] >>> >>> should the extruded section along the path look like below? >>> >>> [image: Screenshot 2023-04-02 at 10.32.35 AM.png] >>> _______________________________________________ >>> 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, Apr 2, 2023 8:19 AM

Initially I wrote a very simple function to align a section to a vector

the function is:

def sec2vector1(v1,sec):
theta_y=ang((v1[0]**2+v1[1]2).5,v1[2])
theta_z=ang(v1[0],v1[1])
return q_rot(['x90','z-90',f'y{-theta_y}',f'z{theta_z}'],sec)

here q_rot is another function which rotates a section w.r.t. x, y, z axis
in any sequence provided

but you cannot define a twist,I feel (since there is no proof as yet)
because with only 1 vector you can not calculate the rate of change of a
curve, which probably would be required to define it.

now when you have a list of points in a curve, tangent at each point can be
calculated, also with the cross product of 2 consecutive tangent vectors, a
perpendicular vector at each point could be calculated.
angle between the vector [0,0,1] and this perpendicular vector would the
twist which needs to be added to the section.

Also the initial alignment of the section at each point is done with the
tangent vector at each point rather than vector at that point.

This is the process I followed to get the above result.

Although I am not 100% sure that this is the correct way to do path
extrude, this should be close enough to get started.

this fails when I give a circular path which is rotated 90 degrees, that is
if the circle is parallel to xz or yz axis, but then you can rotate the
extrude section in xy.

On Sun, 2 Apr 2023 at 13:21, Guenther Sohler guenther.sohler@gmail.com
wrote:

Hi sanjeev, very interesting.
Apparently you do Not Twist the path linearily along ITS was but  instead
follow a Special concept. How to get IT correctly to See exactly your
result? IS the Twist a piece-wise linear function along the path and you
did Dome trials on the pwl Points to get the result correct?

Sanjeev Prabhakar sprabhakar2006@gmail.com schrieb am So., 2. Apr.
2023, 09:26:

Hi Guenther,

I added a twist angle to get this.

Earlier version of path extrude did not have this twist.

I was just wondering whether this is correct or not.

Regards

On Sun, 2 Apr, 2023, 12:42 pm Guenther Sohler, guenther.sohler@gmail.com
wrote:

Hi sanjeev, IT appears that you have to Twist the path along the was in
a Special was to achieve this.

Sanjeev Prabhakar sprabhakar2006@gmail.com schrieb am So., 2. Apr.
2023, 07:13:

I was thinking about the path_extrude for a close loop path like below

[image: Screenshot 2023-04-02 at 10.36.49 AM.png]

should the extruded section along the path look like below?

[image: Screenshot 2023-04-02 at 10.32.35 AM.png]


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

Initially I wrote a very simple function to align a section to a vector the function is: def sec2vector1(v1,sec): theta_y=ang((v1[0]**2+v1[1]**2)**.5,v1[2]) theta_z=ang(v1[0],v1[1]) return q_rot(['x90','z-90',f'y{-theta_y}',f'z{theta_z}'],sec) here q_rot is another function which rotates a section w.r.t. x, y, z axis in any sequence provided but you cannot define a twist,I feel (since there is no proof as yet) because with only 1 vector you can not calculate the rate of change of a curve, which probably would be required to define it. now when you have a list of points in a curve, tangent at each point can be calculated, also with the cross product of 2 consecutive tangent vectors, a perpendicular vector at each point could be calculated. angle between the vector [0,0,1] and this perpendicular vector would the twist which needs to be added to the section. Also the initial alignment of the section at each point is done with the tangent vector at each point rather than vector at that point. This is the process I followed to get the above result. Although I am not 100% sure that this is the correct way to do path extrude, this should be close enough to get started. this fails when I give a circular path which is rotated 90 degrees, that is if the circle is parallel to xz or yz axis, but then you can rotate the extrude section in xy. On Sun, 2 Apr 2023 at 13:21, Guenther Sohler <guenther.sohler@gmail.com> wrote: > Hi sanjeev, very interesting. > Apparently you do Not Twist the path linearily along ITS was but instead > follow a Special concept. How to get IT correctly to See exactly your > result? IS the Twist a piece-wise linear function along the path and you > did Dome trials on the pwl Points to get the result correct? > > Sanjeev Prabhakar <sprabhakar2006@gmail.com> schrieb am So., 2. Apr. > 2023, 09:26: > >> Hi Guenther, >> >> I added a twist angle to get this. >> >> Earlier version of path extrude did not have this twist. >> >> I was just wondering whether this is correct or not. >> >> Regards >> >> On Sun, 2 Apr, 2023, 12:42 pm Guenther Sohler, <guenther.sohler@gmail.com> >> wrote: >> >>> Hi sanjeev, IT appears that you have to Twist the path along the was in >>> a Special was to achieve this. >>> >>> Sanjeev Prabhakar <sprabhakar2006@gmail.com> schrieb am So., 2. Apr. >>> 2023, 07:13: >>> >>>> I was thinking about the path_extrude for a close loop path like below >>>> >>>> [image: Screenshot 2023-04-02 at 10.36.49 AM.png] >>>> >>>> should the extruded section along the path look like below? >>>> >>>> [image: Screenshot 2023-04-02 at 10.32.35 AM.png] >>>> _______________________________________________ >>>> 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
Sun, Apr 2, 2023 1:07 PM

I worked a long time on path_sweep for BOSL2 and found it necessary to
implement several different schemes for controlling the orientation of the
sections.  I do not think there is a single "correct" way.  And there may
be methods I did not think of. The definition of path sweep (extrude) is
that you place the sections so that the section's normal is parallel to the
tangent of the curve.  But this leaves a degree of freedom: the twist.  The
path sweep problem is ill defined because twist is simply not specified.  I
prefer to think of this process as defining a coordinate frame for the
mapped section.  You must map the z axis of the section onto the path's
tangent direction.  And then you pick say the x axis and map that onto the
normal vector at each point in the path.  This is more intuitive than
talking about twist as an angle, at least to me. Then the question is how
did you come up with a normal vector?

Using the frenet frame is presumably the method that would have the best
claim for being "correct".  It doesn't tend to produce odd twist.  But it
can have problems when the curvature of the path is zero at any point, and
you can get abrupt changes in direction of the sections.  And you need to
be able to compute second derivatives.  So there is a class of paths it
doesn't work on.

A different approach is to map the tangent at point i to the tangent at
point i+1 by rotating along the minimal direction.  This will always
produce a result.  But it can introduce unexpected twisting.  With this
method there's no guarantee that a closed figure closes---that is, the
twist may be different at the end than the start.  So if you want to close
a figure you'll potentially have to add some twist to get the ends to
align.

Note that none of the method I have implemented seemed to give the answer
you wanted for your folding problem.

Using cross products to define the normal I get this, which has bad joins
along the straight sections, because there is twist, but no refinement to
represent it.

[image: image.png]

But if I subsample the straight sections, the cross product is zero there
because the consecutive segments are parallel.  I do not understand what
approach you used for defining the twist in your example above.  It looks
like you subdivided the straight section.  Did you interpolate the cross
product across that region where it is zero?

On Sun, Apr 2, 2023 at 4:20 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Initially I wrote a very simple function to align a section to a vector

the function is:

def sec2vector1(v1,sec):
theta_y=ang((v1[0]**2+v1[1]2).5,v1[2])
theta_z=ang(v1[0],v1[1])
return q_rot(['x90','z-90',f'y{-theta_y}',f'z{theta_z}'],sec)

here q_rot is another function which rotates a section w.r.t. x, y, z axis
in any sequence provided

but you cannot define a twist,I feel (since there is no proof as yet)
because with only 1 vector you can not calculate the rate of change of a
curve, which probably would be required to define it.

now when you have a list of points in a curve, tangent at each point can
be calculated, also with the cross product of 2 consecutive tangent
vectors, a perpendicular vector at each point could be calculated.
angle between the vector [0,0,1] and this perpendicular vector would the
twist which needs to be added to the section.

Also the initial alignment of the section at each point is done with the
tangent vector at each point rather than vector at that point.

This is the process I followed to get the above result.

Although I am not 100% sure that this is the correct way to do path
extrude, this should be close enough to get started.

this fails when I give a circular path which is rotated 90 degrees, that
is if the circle is parallel to xz or yz axis, but then you can rotate the
extrude section in xy.

On Sun, 2 Apr 2023 at 13:21, Guenther Sohler guenther.sohler@gmail.com
wrote:

Hi sanjeev, very interesting.
Apparently you do Not Twist the path linearily along ITS was but  instead
follow a Special concept. How to get IT correctly to See exactly your
result? IS the Twist a piece-wise linear function along the path and you
did Dome trials on the pwl Points to get the result correct?

Sanjeev Prabhakar sprabhakar2006@gmail.com schrieb am So., 2. Apr.
2023, 09:26:

Hi Guenther,

I added a twist angle to get this.

Earlier version of path extrude did not have this twist.

I was just wondering whether this is correct or not.

Regards

On Sun, 2 Apr, 2023, 12:42 pm Guenther Sohler, <
guenther.sohler@gmail.com> wrote:

Hi sanjeev, IT appears that you have to Twist the path along the was in
a Special was to achieve this.

Sanjeev Prabhakar sprabhakar2006@gmail.com schrieb am So., 2. Apr.
2023, 07:13:

I was thinking about the path_extrude for a close loop path like below

[image: Screenshot 2023-04-02 at 10.36.49 AM.png]

should the extruded section along the path look like below?

[image: Screenshot 2023-04-02 at 10.32.35 AM.png]


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

I worked a long time on path_sweep for BOSL2 and found it necessary to implement several different schemes for controlling the orientation of the sections. I do not think there is a single "correct" way. And there may be methods I did not think of. The definition of path sweep (extrude) is that you place the sections so that the section's normal is parallel to the tangent of the curve. But this leaves a degree of freedom: the twist. The path sweep problem is ill defined because twist is simply not specified. I prefer to think of this process as defining a coordinate frame for the mapped section. You must map the z axis of the section onto the path's tangent direction. And then you pick say the x axis and map that onto the normal vector at each point in the path. This is more intuitive than talking about twist as an angle, at least to me. Then the question is how did you come up with a normal vector? Using the frenet frame is presumably the method that would have the best claim for being "correct". It doesn't tend to produce odd twist. But it can have problems when the curvature of the path is zero at any point, and you can get abrupt changes in direction of the sections. And you need to be able to compute second derivatives. So there is a class of paths it doesn't work on. A different approach is to map the tangent at point i to the tangent at point i+1 by rotating along the minimal direction. This will always produce a result. But it can introduce unexpected twisting. With this method there's no guarantee that a closed figure closes---that is, the twist may be different at the end than the start. So if you want to close a figure you'll potentially have to add some twist to get the ends to align. Note that none of the method I have implemented seemed to give the answer you wanted for your folding problem. Using cross products to define the normal I get this, which has bad joins along the straight sections, because there is twist, but no refinement to represent it. [image: image.png] But if I subsample the straight sections, the cross product is zero there because the consecutive segments are parallel. I do not understand what approach you used for defining the twist in your example above. It looks like you subdivided the straight section. Did you interpolate the cross product across that region where it is zero? On Sun, Apr 2, 2023 at 4:20 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Initially I wrote a very simple function to align a section to a vector > > the function is: > > def sec2vector1(v1,sec): > theta_y=ang((v1[0]**2+v1[1]**2)**.5,v1[2]) > theta_z=ang(v1[0],v1[1]) > return q_rot(['x90','z-90',f'y{-theta_y}',f'z{theta_z}'],sec) > > here q_rot is another function which rotates a section w.r.t. x, y, z axis > in any sequence provided > > but you cannot define a twist,I feel (since there is no proof as yet) > because with only 1 vector you can not calculate the rate of change of a > curve, which probably would be required to define it. > > now when you have a list of points in a curve, tangent at each point can > be calculated, also with the cross product of 2 consecutive tangent > vectors, a perpendicular vector at each point could be calculated. > angle between the vector [0,0,1] and this perpendicular vector would the > twist which needs to be added to the section. > > Also the initial alignment of the section at each point is done with the > tangent vector at each point rather than vector at that point. > > This is the process I followed to get the above result. > > Although I am not 100% sure that this is the correct way to do path > extrude, this should be close enough to get started. > > this fails when I give a circular path which is rotated 90 degrees, that > is if the circle is parallel to xz or yz axis, but then you can rotate the > extrude section in xy. > > > > > > > On Sun, 2 Apr 2023 at 13:21, Guenther Sohler <guenther.sohler@gmail.com> > wrote: > >> Hi sanjeev, very interesting. >> Apparently you do Not Twist the path linearily along ITS was but instead >> follow a Special concept. How to get IT correctly to See exactly your >> result? IS the Twist a piece-wise linear function along the path and you >> did Dome trials on the pwl Points to get the result correct? >> >> Sanjeev Prabhakar <sprabhakar2006@gmail.com> schrieb am So., 2. Apr. >> 2023, 09:26: >> >>> Hi Guenther, >>> >>> I added a twist angle to get this. >>> >>> Earlier version of path extrude did not have this twist. >>> >>> I was just wondering whether this is correct or not. >>> >>> Regards >>> >>> On Sun, 2 Apr, 2023, 12:42 pm Guenther Sohler, < >>> guenther.sohler@gmail.com> wrote: >>> >>>> Hi sanjeev, IT appears that you have to Twist the path along the was in >>>> a Special was to achieve this. >>>> >>>> Sanjeev Prabhakar <sprabhakar2006@gmail.com> schrieb am So., 2. Apr. >>>> 2023, 07:13: >>>> >>>>> I was thinking about the path_extrude for a close loop path like below >>>>> >>>>> [image: Screenshot 2023-04-02 at 10.36.49 AM.png] >>>>> >>>>> should the extruded section along the path look like below? >>>>> >>>>> [image: Screenshot 2023-04-02 at 10.32.35 AM.png] >>>>> _______________________________________________ >>>>> 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
Sun, Apr 2, 2023 4:19 PM

So first of all, the curve has to be differentiable at each point,
otherwise it will not work and the regular path extrude is to be used. you
can say, points in straight line or nearly straight line needs to be
removed

This could be useful in a few cases  I suppose, which anyway needs to be
checked.

I calculated tangent at each point as simply the average of 2 vectors at
each point (1 incoming and 1 outgoing). I need to read the frenet method
for details.

the image posted by you looks similar to the way I was doing it.

I have added slices to make this look better.

for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be
drawn to that plane.
angle this normal makes with the z-axis is taken as twist. axis used for
rotating is the cross product of normal with z-axis.

So first of all, the curve has to be differentiable at each point, otherwise it will not work and the regular path extrude is to be used. you can say, points in straight line or nearly straight line needs to be removed This could be useful in a few cases I suppose, which anyway needs to be checked. I calculated tangent at each point as simply the average of 2 vectors at each point (1 incoming and 1 outgoing). I need to read the frenet method for details. the image posted by you looks similar to the way I was doing it. I have added slices to make this look better. for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be drawn to that plane. angle this normal makes with the z-axis is taken as twist. axis used for rotating is the cross product of normal with z-axis.
SP
Sanjeev Prabhakar
Sun, Apr 2, 2023 4:30 PM

another way i found effective in few cases like below is to align the
sections after the normal path extrude without twist.

path=cr_3d([[0,0,0,3],[15,0,0,4],[5,3,15,3],[0,10,0,3],[-5,3,-15,4],[-15,0,0,3]],10)
sec=pts([[-1.5,-1.25],[3,0],[-1.5,2.5]])
sol=path_extrudec(sec,path)

sol=slice_sol(sol,2)

sol=align_sol(sol,1)

sol=slice_sol(sol,10)

[image: Screenshot 2023-04-02 at 9.58.56 PM.png]

On Sun, 2 Apr 2023 at 21:49, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

So first of all, the curve has to be differentiable at each point,
otherwise it will not work and the regular path extrude is to be used. you
can say, points in straight line or nearly straight line needs to be
removed

This could be useful in a few cases  I suppose, which anyway needs to be
checked.

I calculated tangent at each point as simply the average of 2 vectors at
each point (1 incoming and 1 outgoing). I need to read the frenet method
for details.

the image posted by you looks similar to the way I was doing it.

I have added slices to make this look better.

for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be
drawn to that plane.
angle this normal makes with the z-axis is taken as twist. axis used for
rotating is the cross product of normal with z-axis.

another way i found effective in few cases like below is to align the sections after the normal path extrude without twist. path=cr_3d([[0,0,0,3],[15,0,0,4],[5,3,15,3],[0,10,0,3],[-5,3,-15,4],[-15,0,0,3]],10) sec=pts([[-1.5,-1.25],[3,0],[-1.5,2.5]]) sol=path_extrudec(sec,path) # sol=slice_sol(sol,2) sol=align_sol(sol,1) sol=slice_sol(sol,10) [image: Screenshot 2023-04-02 at 9.58.56 PM.png] On Sun, 2 Apr 2023 at 21:49, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > So first of all, the curve has to be differentiable at each point, > otherwise it will not work and the regular path extrude is to be used. you > can say, points in straight line or nearly straight line needs to be > removed > > This could be useful in a few cases I suppose, which anyway needs to be > checked. > > I calculated tangent at each point as simply the average of 2 vectors at > each point (1 incoming and 1 outgoing). I need to read the frenet method > for details. > > the image posted by you looks similar to the way I was doing it. > > I have added slices to make this look better. > > for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be > drawn to that plane. > angle this normal makes with the z-axis is taken as twist. axis used for > rotating is the cross product of normal with z-axis. > > > > > >
AM
Adrian Mariano
Sun, Apr 2, 2023 4:43 PM

In the example I posted above where I used cross product to define the
normal direction, I am not able to add slices, because then the slices have
a zero normal, so I don't have a way to align slices along the straight
section of the curve.

I get a good result with my incremental approach.  It's just not what you
were looking for, as shown below.  The frenet approach produces a good
result, maybe really the best possible result, if the curve has a defined
and nonzero second derivative at every point.  But in other cases,
including this one, the result isn't great.  Again, you wish you could add
more slices, but you can't because it creates zero second (and first)
derivative.

[image: image.png]

Also with this incremental approach, you can change the result by just
changing the first normal, so for example this:

[image: image.png]

On Sun, Apr 2, 2023 at 12:20 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

So first of all, the curve has to be differentiable at each point,
otherwise it will not work and the regular path extrude is to be used. you
can say, points in straight line or nearly straight line needs to be
removed

This could be useful in a few cases  I suppose, which anyway needs to be
checked.

I calculated tangent at each point as simply the average of 2 vectors at
each point (1 incoming and 1 outgoing). I need to read the frenet method
for details.

the image posted by you looks similar to the way I was doing it.

I have added slices to make this look better.

for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be
drawn to that plane.
angle this normal makes with the z-axis is taken as twist. axis used for
rotating is the cross product of normal with z-axis.


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

In the example I posted above where I used cross product to define the normal direction, I am not able to add slices, because then the slices have a zero normal, so I don't have a way to align slices along the straight section of the curve. I get a good result with my incremental approach. It's just not what you were looking for, as shown below. The frenet approach produces a good result, maybe really the best possible result, if the curve has a defined and nonzero second derivative at every point. But in other cases, including this one, the result isn't great. Again, you wish you could add more slices, but you can't because it creates zero second (and first) derivative. [image: image.png] Also with this incremental approach, you can change the result by just changing the first normal, so for example this: [image: image.png] On Sun, Apr 2, 2023 at 12:20 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > So first of all, the curve has to be differentiable at each point, > otherwise it will not work and the regular path extrude is to be used. you > can say, points in straight line or nearly straight line needs to be > removed > > This could be useful in a few cases I suppose, which anyway needs to be > checked. > > I calculated tangent at each point as simply the average of 2 vectors at > each point (1 incoming and 1 outgoing). I need to read the frenet method > for details. > > the image posted by you looks similar to the way I was doing it. > > I have added slices to make this look better. > > for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be > drawn to that plane. > angle this normal makes with the z-axis is taken as twist. axis used for > rotating is the cross product of normal with z-axis. > > > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Sun, Apr 2, 2023 4:51 PM

Note that there is no such thing as "without twist".  This notion assumes
that there is some kind of defined "true" answer.  But there is not.  So I
don't know what you mean by "without twist".  You also said something in
the previous message about using "the regular path_extrude" in the case of
non-differentiable paths.  I have no idea what the "regular" path extrude
is.  You can always compute a "tangent" at a point on the path.  If the
path is a square you presumably will get a 45 degree angle "tangent"
vector, which is reasonable.

I can't try your example because you gave code with dependencies you don't
supply.  I suggest just give final point lists with no dependencies that I
can cut and paste into my code if you want me to be able to see what my
code does with them.

On Sun, Apr 2, 2023 at 12:31 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

another way i found effective in few cases like below is to align the
sections after the normal path extrude without twist.

path=cr_3d([[0,0,0,3],[15,0,0,4],[5,3,15,3],[0,10,0,3],[-5,3,-15,4],[-15,0,0,3]],10)
sec=pts([[-1.5,-1.25],[3,0],[-1.5,2.5]])
sol=path_extrudec(sec,path)

sol=slice_sol(sol,2)

sol=align_sol(sol,1)

sol=slice_sol(sol,10)

[image: Screenshot 2023-04-02 at 9.58.56 PM.png]

On Sun, 2 Apr 2023 at 21:49, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

So first of all, the curve has to be differentiable at each point,
otherwise it will not work and the regular path extrude is to be used. you
can say, points in straight line or nearly straight line needs to be
removed

This could be useful in a few cases  I suppose, which anyway needs to be
checked.

I calculated tangent at each point as simply the average of 2 vectors at
each point (1 incoming and 1 outgoing). I need to read the frenet method
for details.

the image posted by you looks similar to the way I was doing it.

I have added slices to make this look better.

for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be
drawn to that plane.
angle this normal makes with the z-axis is taken as twist. axis used for
rotating is the cross product of normal with z-axis.


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

Note that there is no such thing as "without twist". This notion assumes that there is some kind of defined "true" answer. But there is not. So I don't know what you mean by "without twist". You also said something in the previous message about using "the regular path_extrude" in the case of non-differentiable paths. I have no idea what the "regular" path extrude is. You can always compute a "tangent" at a point on the path. If the path is a square you presumably will get a 45 degree angle "tangent" vector, which is reasonable. I can't try your example because you gave code with dependencies you don't supply. I suggest just give final point lists with no dependencies that I can cut and paste into my code if you want me to be able to see what my code does with them. On Sun, Apr 2, 2023 at 12:31 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > another way i found effective in few cases like below is to align the > sections after the normal path extrude without twist. > > > path=cr_3d([[0,0,0,3],[15,0,0,4],[5,3,15,3],[0,10,0,3],[-5,3,-15,4],[-15,0,0,3]],10) > sec=pts([[-1.5,-1.25],[3,0],[-1.5,2.5]]) > sol=path_extrudec(sec,path) > # sol=slice_sol(sol,2) > sol=align_sol(sol,1) > > sol=slice_sol(sol,10) > > [image: Screenshot 2023-04-02 at 9.58.56 PM.png] > > On Sun, 2 Apr 2023 at 21:49, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> >> So first of all, the curve has to be differentiable at each point, >> otherwise it will not work and the regular path extrude is to be used. you >> can say, points in straight line or nearly straight line needs to be >> removed >> >> This could be useful in a few cases I suppose, which anyway needs to be >> checked. >> >> I calculated tangent at each point as simply the average of 2 vectors at >> each point (1 incoming and 1 outgoing). I need to read the frenet method >> for details. >> >> the image posted by you looks similar to the way I was doing it. >> >> I have added slices to make this look better. >> >> for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be >> drawn to that plane. >> angle this normal makes with the z-axis is taken as twist. axis used for >> rotating is the cross product of normal with z-axis. >> >> >> >> >> >> _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Sun, Apr 2, 2023 4:57 PM

path=[[0.0, 2.9999981250011714, 0.0],

[0.04557795872724757, 2.479064525098582, 0.0],
[0.18092265616139303, 1.973959606584322, 0.0],
[0.4019217121586198, 1.500030726812025, 0.0],
[0.7018601822333728, 1.071677974973988, 0.0],
[1.0716245877486188, 0.7019166326778588, 0.0],
[1.499979824352594, 0.40198171120103776, 0.0],
[1.973910534939296, 0.18098658135820456, 0.0],
[2.4790165746880573, 0.04564606834070206, 0.0],
[2.999950552177103, 7.242515096361757e-05, 0.0],
[12.099187552219867, 0.0, 0.0],
[12.65509637693741, 0.007613493641616231, 0.038067468208081046],
[13.200214804551631, 0.030305087049944057, 0.15152543524972062],
[13.723962271902039, 0.06763434411953073, 0.33817172059765355],
[14.216173018893707, 0.11887671667487676, 0.594383583374384],
[14.667293402441022, 0.18303760770393795, 0.9151880385196898],
[15.068567329428587, 0.2588716761476394, 1.2943583807381955],
[15.412206209498649, 0.34490700854600564, 1.7245350427300288],
[15.691540128939252, 0.43947368837748657, 2.1973684418874324],
[15.901147311439434, 0.5407362085703173, 2.7036810428515854],
[19.228161875542945, 2.5368971253257677, 12.68448562662884],
[19.36876635809905, 2.6572574791390613, 13.106299074297166],
[19.501886368764612, 2.8442693705357547, 13.505659106293841],
[19.62438335818388, 3.0935236498446246, 13.873150074551646],
[19.733369234286403, 3.3991436884969897, 14.200107702859212],
[19.826274454375206, 3.7539239313654242, 14.478823363125626],
[19.900908606827002, 4.1494997809929615, 14.702725820481007],
[19.955512054079236, 4.576544808379272, 14.866536162237711],
[19.98879741932554, 5.024990640716432, 14.966392257976628],
[19.999979938794286, 5.484264341816033, 14.99993981638286],
[20.0, 10.515689129249957, 15.0],
[19.98881607411956, 10.974962312943832, 14.966448222358675],
[19.95552934408781, 11.423406953094897, 14.866588032263433],
[19.900924605853717, 11.850450141622732, 14.702773817561155],
[19.826289266660925, 12.246023549073882, 14.478867799982778],
[19.733382992051585, 12.600800804026825, 14.200148976154757],
[19.624396218511254, 12.906417379470202, 13.873188655533761],
[19.50189850989565, 13.155667801928118, 13.505695529686953],
[19.36877797523161, 13.342675533764252, 13.10633392569483],
[19.228173176229102, 13.463031523376682, 12.684519528687307],
[15.901238616768543, 15.459256829938873, 2.70371585030563],
[15.69162593995954, 15.56051891804428, 2.1974054097785958],
[15.412286885728209, 15.655085020227542, 1.724574898862285],
[15.068643330050053, 15.74111964062885, 1.2944017968557437],
[14.667365277388987, 15.816952876546274, 0.9152356172686229],
[14.216241398180685, 15.881112830678891, 0.594435846605537],
[13.724027853390131, 15.932354180152467, 0.33822909923765865],
[13.200278340407268, 15.969682347812627, 0.15158826093686217],
[12.655158659032047, 15.992372806628936, 0.03813596685531495],
[12.099249396760039, 15.999985142517989, 7.4287410054108e-05],
[2.999998000001333, 16.0, 0.0],
[2.4790644218042956, 15.954422043171833, 0.0],
[1.9739595243360597, 15.819077351377047, 0.0],
[1.5000306643107864, 15.598078304588107, 0.0],
[1.071677930320769, 15.298139847010782, 0.0],
[0.7019166034313518, 14.928375456902376, 0.0],
[0.40198169445181087, 14.500020238146524, 0.0],
[0.1809865738171026, 14.02608954730692, 0.0],
[0.04564606643878433, 13.52098352860423, 0.0],
[7.242514794603139e-05, 13.000049572820753, 0.0]]

sec=[[-1.5, -1.25], [1.5, -1.25], [0.0, 1.25]]

On Sun, 2 Apr 2023 at 22:22, Adrian Mariano avm4@cornell.edu wrote:

Note that there is no such thing as "without twist".  This notion assumes
that there is some kind of defined "true" answer.  But there is not.  So I
don't know what you mean by "without twist".  You also said something in
the previous message about using "the regular path_extrude" in the case of
non-differentiable paths.  I have no idea what the "regular" path extrude
is.  You can always compute a "tangent" at a point on the path.  If the
path is a square you presumably will get a 45 degree angle "tangent"
vector, which is reasonable.

I can't try your example because you gave code with dependencies you don't
supply.  I suggest just give final point lists with no dependencies that I
can cut and paste into my code if you want me to be able to see what my
code does with them.

On Sun, Apr 2, 2023 at 12:31 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

another way i found effective in few cases like below is to align the
sections after the normal path extrude without twist.

path=cr_3d([[0,0,0,3],[15,0,0,4],[5,3,15,3],[0,10,0,3],[-5,3,-15,4],[-15,0,0,3]],10)
sec=pts([[-1.5,-1.25],[3,0],[-1.5,2.5]])
sol=path_extrudec(sec,path)

sol=slice_sol(sol,2)

sol=align_sol(sol,1)

sol=slice_sol(sol,10)

[image: Screenshot 2023-04-02 at 9.58.56 PM.png]

On Sun, 2 Apr 2023 at 21:49, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

So first of all, the curve has to be differentiable at each point,
otherwise it will not work and the regular path extrude is to be used. you
can say, points in straight line or nearly straight line needs to be
removed

This could be useful in a few cases  I suppose, which anyway needs to be
checked.

I calculated tangent at each point as simply the average of 2 vectors at
each point (1 incoming and 1 outgoing). I need to read the frenet method
for details.

the image posted by you looks similar to the way I was doing it.

I have added slices to make this look better.

for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be
drawn to that plane.
angle this normal makes with the z-axis is taken as twist. axis used for
rotating is the cross product of normal with z-axis.


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

path=[[0.0, 2.9999981250011714, 0.0], [0.04557795872724757, 2.479064525098582, 0.0], [0.18092265616139303, 1.973959606584322, 0.0], [0.4019217121586198, 1.500030726812025, 0.0], [0.7018601822333728, 1.071677974973988, 0.0], [1.0716245877486188, 0.7019166326778588, 0.0], [1.499979824352594, 0.40198171120103776, 0.0], [1.973910534939296, 0.18098658135820456, 0.0], [2.4790165746880573, 0.04564606834070206, 0.0], [2.999950552177103, 7.242515096361757e-05, 0.0], [12.099187552219867, 0.0, 0.0], [12.65509637693741, 0.007613493641616231, 0.038067468208081046], [13.200214804551631, 0.030305087049944057, 0.15152543524972062], [13.723962271902039, 0.06763434411953073, 0.33817172059765355], [14.216173018893707, 0.11887671667487676, 0.594383583374384], [14.667293402441022, 0.18303760770393795, 0.9151880385196898], [15.068567329428587, 0.2588716761476394, 1.2943583807381955], [15.412206209498649, 0.34490700854600564, 1.7245350427300288], [15.691540128939252, 0.43947368837748657, 2.1973684418874324], [15.901147311439434, 0.5407362085703173, 2.7036810428515854], [19.228161875542945, 2.5368971253257677, 12.68448562662884], [19.36876635809905, 2.6572574791390613, 13.106299074297166], [19.501886368764612, 2.8442693705357547, 13.505659106293841], [19.62438335818388, 3.0935236498446246, 13.873150074551646], [19.733369234286403, 3.3991436884969897, 14.200107702859212], [19.826274454375206, 3.7539239313654242, 14.478823363125626], [19.900908606827002, 4.1494997809929615, 14.702725820481007], [19.955512054079236, 4.576544808379272, 14.866536162237711], [19.98879741932554, 5.024990640716432, 14.966392257976628], [19.999979938794286, 5.484264341816033, 14.99993981638286], [20.0, 10.515689129249957, 15.0], [19.98881607411956, 10.974962312943832, 14.966448222358675], [19.95552934408781, 11.423406953094897, 14.866588032263433], [19.900924605853717, 11.850450141622732, 14.702773817561155], [19.826289266660925, 12.246023549073882, 14.478867799982778], [19.733382992051585, 12.600800804026825, 14.200148976154757], [19.624396218511254, 12.906417379470202, 13.873188655533761], [19.50189850989565, 13.155667801928118, 13.505695529686953], [19.36877797523161, 13.342675533764252, 13.10633392569483], [19.228173176229102, 13.463031523376682, 12.684519528687307], [15.901238616768543, 15.459256829938873, 2.70371585030563], [15.69162593995954, 15.56051891804428, 2.1974054097785958], [15.412286885728209, 15.655085020227542, 1.724574898862285], [15.068643330050053, 15.74111964062885, 1.2944017968557437], [14.667365277388987, 15.816952876546274, 0.9152356172686229], [14.216241398180685, 15.881112830678891, 0.594435846605537], [13.724027853390131, 15.932354180152467, 0.33822909923765865], [13.200278340407268, 15.969682347812627, 0.15158826093686217], [12.655158659032047, 15.992372806628936, 0.03813596685531495], [12.099249396760039, 15.999985142517989, 7.4287410054108e-05], [2.999998000001333, 16.0, 0.0], [2.4790644218042956, 15.954422043171833, 0.0], [1.9739595243360597, 15.819077351377047, 0.0], [1.5000306643107864, 15.598078304588107, 0.0], [1.071677930320769, 15.298139847010782, 0.0], [0.7019166034313518, 14.928375456902376, 0.0], [0.40198169445181087, 14.500020238146524, 0.0], [0.1809865738171026, 14.02608954730692, 0.0], [0.04564606643878433, 13.52098352860423, 0.0], [7.242514794603139e-05, 13.000049572820753, 0.0]] sec=[[-1.5, -1.25], [1.5, -1.25], [0.0, 1.25]] On Sun, 2 Apr 2023 at 22:22, Adrian Mariano <avm4@cornell.edu> wrote: > Note that there is no such thing as "without twist". This notion assumes > that there is some kind of defined "true" answer. But there is not. So I > don't know what you mean by "without twist". You also said something in > the previous message about using "the regular path_extrude" in the case of > non-differentiable paths. I have no idea what the "regular" path extrude > is. You can always compute a "tangent" at a point on the path. If the > path is a square you presumably will get a 45 degree angle "tangent" > vector, which is reasonable. > > I can't try your example because you gave code with dependencies you don't > supply. I suggest just give final point lists with no dependencies that I > can cut and paste into my code if you want me to be able to see what my > code does with them. > > On Sun, Apr 2, 2023 at 12:31 PM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> another way i found effective in few cases like below is to align the >> sections after the normal path extrude without twist. >> >> >> path=cr_3d([[0,0,0,3],[15,0,0,4],[5,3,15,3],[0,10,0,3],[-5,3,-15,4],[-15,0,0,3]],10) >> sec=pts([[-1.5,-1.25],[3,0],[-1.5,2.5]]) >> sol=path_extrudec(sec,path) >> # sol=slice_sol(sol,2) >> sol=align_sol(sol,1) >> >> sol=slice_sol(sol,10) >> >> [image: Screenshot 2023-04-02 at 9.58.56 PM.png] >> >> On Sun, 2 Apr 2023 at 21:49, Sanjeev Prabhakar <sprabhakar2006@gmail.com> >> wrote: >> >>> >>> So first of all, the curve has to be differentiable at each point, >>> otherwise it will not work and the regular path extrude is to be used. you >>> can say, points in straight line or nearly straight line needs to be >>> removed >>> >>> This could be useful in a few cases I suppose, which anyway needs to be >>> checked. >>> >>> I calculated tangent at each point as simply the average of 2 vectors at >>> each point (1 incoming and 1 outgoing). I need to read the frenet method >>> for details. >>> >>> the image posted by you looks similar to the way I was doing it. >>> >>> I have added slices to make this look better. >>> >>> for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be >>> drawn to that plane. >>> angle this normal makes with the z-axis is taken as twist. axis used for >>> rotating is the cross product of normal with z-axis. >>> >>> >>> >>> >>> >>> _______________________________________________ >> 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, Apr 2, 2023 5:07 PM

With that input I get what looks very similar to your result if I use my
incremental method:

[image: image.png]
Method based on frenet frame has problems due to the flat regions:

[image: image.png]

On Sun, Apr 2, 2023 at 12:58 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

path=[[0.0, 2.9999981250011714, 0.0],

[0.04557795872724757, 2.479064525098582, 0.0],
[0.18092265616139303, 1.973959606584322, 0.0],
[0.4019217121586198, 1.500030726812025, 0.0],
[0.7018601822333728, 1.071677974973988, 0.0],
[1.0716245877486188, 0.7019166326778588, 0.0],
[1.499979824352594, 0.40198171120103776, 0.0],
[1.973910534939296, 0.18098658135820456, 0.0],
[2.4790165746880573, 0.04564606834070206, 0.0],
[2.999950552177103, 7.242515096361757e-05, 0.0],
[12.099187552219867, 0.0, 0.0],
[12.65509637693741, 0.007613493641616231, 0.038067468208081046],
[13.200214804551631, 0.030305087049944057, 0.15152543524972062],
[13.723962271902039, 0.06763434411953073, 0.33817172059765355],
[14.216173018893707, 0.11887671667487676, 0.594383583374384],
[14.667293402441022, 0.18303760770393795, 0.9151880385196898],
[15.068567329428587, 0.2588716761476394, 1.2943583807381955],
[15.412206209498649, 0.34490700854600564, 1.7245350427300288],
[15.691540128939252, 0.43947368837748657, 2.1973684418874324],
[15.901147311439434, 0.5407362085703173, 2.7036810428515854],
[19.228161875542945, 2.5368971253257677, 12.68448562662884],
[19.36876635809905, 2.6572574791390613, 13.106299074297166],
[19.501886368764612, 2.8442693705357547, 13.505659106293841],
[19.62438335818388, 3.0935236498446246, 13.873150074551646],
[19.733369234286403, 3.3991436884969897, 14.200107702859212],
[19.826274454375206, 3.7539239313654242, 14.478823363125626],
[19.900908606827002, 4.1494997809929615, 14.702725820481007],
[19.955512054079236, 4.576544808379272, 14.866536162237711],
[19.98879741932554, 5.024990640716432, 14.966392257976628],
[19.999979938794286, 5.484264341816033, 14.99993981638286],
[20.0, 10.515689129249957, 15.0],
[19.98881607411956, 10.974962312943832, 14.966448222358675],
[19.95552934408781, 11.423406953094897, 14.866588032263433],
[19.900924605853717, 11.850450141622732, 14.702773817561155],
[19.826289266660925, 12.246023549073882, 14.478867799982778],
[19.733382992051585, 12.600800804026825, 14.200148976154757],
[19.624396218511254, 12.906417379470202, 13.873188655533761],
[19.50189850989565, 13.155667801928118, 13.505695529686953],
[19.36877797523161, 13.342675533764252, 13.10633392569483],
[19.228173176229102, 13.463031523376682, 12.684519528687307],
[15.901238616768543, 15.459256829938873, 2.70371585030563],
[15.69162593995954, 15.56051891804428, 2.1974054097785958],
[15.412286885728209, 15.655085020227542, 1.724574898862285],
[15.068643330050053, 15.74111964062885, 1.2944017968557437],
[14.667365277388987, 15.816952876546274, 0.9152356172686229],
[14.216241398180685, 15.881112830678891, 0.594435846605537],
[13.724027853390131, 15.932354180152467, 0.33822909923765865],
[13.200278340407268, 15.969682347812627, 0.15158826093686217],
[12.655158659032047, 15.992372806628936, 0.03813596685531495],
[12.099249396760039, 15.999985142517989, 7.4287410054108e-05],
[2.999998000001333, 16.0, 0.0],
[2.4790644218042956, 15.954422043171833, 0.0],
[1.9739595243360597, 15.819077351377047, 0.0],
[1.5000306643107864, 15.598078304588107, 0.0],
[1.071677930320769, 15.298139847010782, 0.0],
[0.7019166034313518, 14.928375456902376, 0.0],
[0.40198169445181087, 14.500020238146524, 0.0],
[0.1809865738171026, 14.02608954730692, 0.0],
[0.04564606643878433, 13.52098352860423, 0.0],
[7.242514794603139e-05, 13.000049572820753, 0.0]]

sec=[[-1.5, -1.25], [1.5, -1.25], [0.0, 1.25]]

On Sun, 2 Apr 2023 at 22:22, Adrian Mariano avm4@cornell.edu wrote:

Note that there is no such thing as "without twist".  This notion assumes
that there is some kind of defined "true" answer.  But there is not.  So I
don't know what you mean by "without twist".  You also said something in
the previous message about using "the regular path_extrude" in the case of
non-differentiable paths.  I have no idea what the "regular" path extrude
is.  You can always compute a "tangent" at a point on the path.  If the
path is a square you presumably will get a 45 degree angle "tangent"
vector, which is reasonable.

I can't try your example because you gave code with dependencies you
don't supply.  I suggest just give final point lists with no dependencies
that I can cut and paste into my code if you want me to be able to see what
my code does with them.

On Sun, Apr 2, 2023 at 12:31 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

another way i found effective in few cases like below is to align the
sections after the normal path extrude without twist.

path=cr_3d([[0,0,0,3],[15,0,0,4],[5,3,15,3],[0,10,0,3],[-5,3,-15,4],[-15,0,0,3]],10)
sec=pts([[-1.5,-1.25],[3,0],[-1.5,2.5]])
sol=path_extrudec(sec,path)

sol=slice_sol(sol,2)

sol=align_sol(sol,1)

sol=slice_sol(sol,10)

[image: Screenshot 2023-04-02 at 9.58.56 PM.png]

On Sun, 2 Apr 2023 at 21:49, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

So first of all, the curve has to be differentiable at each point,
otherwise it will not work and the regular path extrude is to be used. you
can say, points in straight line or nearly straight line needs to be
removed

This could be useful in a few cases  I suppose, which anyway needs to
be checked.

I calculated tangent at each point as simply the average of 2 vectors
at each point (1 incoming and 1 outgoing). I need to read the frenet method
for details.

the image posted by you looks similar to the way I was doing it.

I have added slices to make this look better.

for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be
drawn to that plane.
angle this normal makes with the z-axis is taken as twist. axis used
for rotating is the cross product of normal with z-axis.


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

With that input I get what looks very similar to your result if I use my incremental method: [image: image.png] Method based on frenet frame has problems due to the flat regions: [image: image.png] On Sun, Apr 2, 2023 at 12:58 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > path=[[0.0, 2.9999981250011714, 0.0], > > [0.04557795872724757, 2.479064525098582, 0.0], > [0.18092265616139303, 1.973959606584322, 0.0], > [0.4019217121586198, 1.500030726812025, 0.0], > [0.7018601822333728, 1.071677974973988, 0.0], > [1.0716245877486188, 0.7019166326778588, 0.0], > [1.499979824352594, 0.40198171120103776, 0.0], > [1.973910534939296, 0.18098658135820456, 0.0], > [2.4790165746880573, 0.04564606834070206, 0.0], > [2.999950552177103, 7.242515096361757e-05, 0.0], > [12.099187552219867, 0.0, 0.0], > [12.65509637693741, 0.007613493641616231, 0.038067468208081046], > [13.200214804551631, 0.030305087049944057, 0.15152543524972062], > [13.723962271902039, 0.06763434411953073, 0.33817172059765355], > [14.216173018893707, 0.11887671667487676, 0.594383583374384], > [14.667293402441022, 0.18303760770393795, 0.9151880385196898], > [15.068567329428587, 0.2588716761476394, 1.2943583807381955], > [15.412206209498649, 0.34490700854600564, 1.7245350427300288], > [15.691540128939252, 0.43947368837748657, 2.1973684418874324], > [15.901147311439434, 0.5407362085703173, 2.7036810428515854], > [19.228161875542945, 2.5368971253257677, 12.68448562662884], > [19.36876635809905, 2.6572574791390613, 13.106299074297166], > [19.501886368764612, 2.8442693705357547, 13.505659106293841], > [19.62438335818388, 3.0935236498446246, 13.873150074551646], > [19.733369234286403, 3.3991436884969897, 14.200107702859212], > [19.826274454375206, 3.7539239313654242, 14.478823363125626], > [19.900908606827002, 4.1494997809929615, 14.702725820481007], > [19.955512054079236, 4.576544808379272, 14.866536162237711], > [19.98879741932554, 5.024990640716432, 14.966392257976628], > [19.999979938794286, 5.484264341816033, 14.99993981638286], > [20.0, 10.515689129249957, 15.0], > [19.98881607411956, 10.974962312943832, 14.966448222358675], > [19.95552934408781, 11.423406953094897, 14.866588032263433], > [19.900924605853717, 11.850450141622732, 14.702773817561155], > [19.826289266660925, 12.246023549073882, 14.478867799982778], > [19.733382992051585, 12.600800804026825, 14.200148976154757], > [19.624396218511254, 12.906417379470202, 13.873188655533761], > [19.50189850989565, 13.155667801928118, 13.505695529686953], > [19.36877797523161, 13.342675533764252, 13.10633392569483], > [19.228173176229102, 13.463031523376682, 12.684519528687307], > [15.901238616768543, 15.459256829938873, 2.70371585030563], > [15.69162593995954, 15.56051891804428, 2.1974054097785958], > [15.412286885728209, 15.655085020227542, 1.724574898862285], > [15.068643330050053, 15.74111964062885, 1.2944017968557437], > [14.667365277388987, 15.816952876546274, 0.9152356172686229], > [14.216241398180685, 15.881112830678891, 0.594435846605537], > [13.724027853390131, 15.932354180152467, 0.33822909923765865], > [13.200278340407268, 15.969682347812627, 0.15158826093686217], > [12.655158659032047, 15.992372806628936, 0.03813596685531495], > [12.099249396760039, 15.999985142517989, 7.4287410054108e-05], > [2.999998000001333, 16.0, 0.0], > [2.4790644218042956, 15.954422043171833, 0.0], > [1.9739595243360597, 15.819077351377047, 0.0], > [1.5000306643107864, 15.598078304588107, 0.0], > [1.071677930320769, 15.298139847010782, 0.0], > [0.7019166034313518, 14.928375456902376, 0.0], > [0.40198169445181087, 14.500020238146524, 0.0], > [0.1809865738171026, 14.02608954730692, 0.0], > [0.04564606643878433, 13.52098352860423, 0.0], > [7.242514794603139e-05, 13.000049572820753, 0.0]] > > > sec=[[-1.5, -1.25], [1.5, -1.25], [0.0, 1.25]] > > > > > On Sun, 2 Apr 2023 at 22:22, Adrian Mariano <avm4@cornell.edu> wrote: > >> Note that there is no such thing as "without twist". This notion assumes >> that there is some kind of defined "true" answer. But there is not. So I >> don't know what you mean by "without twist". You also said something in >> the previous message about using "the regular path_extrude" in the case of >> non-differentiable paths. I have no idea what the "regular" path extrude >> is. You can always compute a "tangent" at a point on the path. If the >> path is a square you presumably will get a 45 degree angle "tangent" >> vector, which is reasonable. >> >> I can't try your example because you gave code with dependencies you >> don't supply. I suggest just give final point lists with no dependencies >> that I can cut and paste into my code if you want me to be able to see what >> my code does with them. >> >> On Sun, Apr 2, 2023 at 12:31 PM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> another way i found effective in few cases like below is to align the >>> sections after the normal path extrude without twist. >>> >>> >>> path=cr_3d([[0,0,0,3],[15,0,0,4],[5,3,15,3],[0,10,0,3],[-5,3,-15,4],[-15,0,0,3]],10) >>> sec=pts([[-1.5,-1.25],[3,0],[-1.5,2.5]]) >>> sol=path_extrudec(sec,path) >>> # sol=slice_sol(sol,2) >>> sol=align_sol(sol,1) >>> >>> sol=slice_sol(sol,10) >>> >>> [image: Screenshot 2023-04-02 at 9.58.56 PM.png] >>> >>> On Sun, 2 Apr 2023 at 21:49, Sanjeev Prabhakar <sprabhakar2006@gmail.com> >>> wrote: >>> >>>> >>>> So first of all, the curve has to be differentiable at each point, >>>> otherwise it will not work and the regular path extrude is to be used. you >>>> can say, points in straight line or nearly straight line needs to be >>>> removed >>>> >>>> This could be useful in a few cases I suppose, which anyway needs to >>>> be checked. >>>> >>>> I calculated tangent at each point as simply the average of 2 vectors >>>> at each point (1 incoming and 1 outgoing). I need to read the frenet method >>>> for details. >>>> >>>> the image posted by you looks similar to the way I was doing it. >>>> >>>> I have added slices to make this look better. >>>> >>>> for a point "i" , p[i-1],p[i], p[i+1] makes a plane and a normal can be >>>> drawn to that plane. >>>> angle this normal makes with the z-axis is taken as twist. axis used >>>> for rotating is the cross product of normal with z-axis. >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>> 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, Apr 3, 2023 2:17 AM

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]

below is the picture of 3 vectors along the path tangent vector (blue color), normal vector (magenta) and orthogonal vector(cyan) now the challenge is to align the section based on these 3 vectors along the path. if the section is made on x-y plane -z axis should align with tangent vector y-axis should align with normal vector -x-axis should align with orthogonal vector [image: Screenshot 2023-04-03 at 7.39.18 AM.png]
AM
Adrian Mariano
Mon, Apr 3, 2023 2:24 AM

That's not a challenge.  The challenge is deciding what the normal vector
IS.
  Once you've computed the tangent vector and somehow selected a normal
vector, the map from the section onto the new coordinate system is fully
defined, and easily computed.  (You can directly write down the matrix for
this map based on the tangent vector, normal vector, and the third
orthogonal vector in the destination coordinate system.)  I have a
frame_map() function in BOSL2 that does this.

On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]


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

That's not a challenge. The challenge is deciding *what the normal vector IS.* Once you've computed the tangent vector and somehow selected a normal vector, the map from the section onto the new coordinate system is fully defined, and easily computed. (You can directly write down the matrix for this map based on the tangent vector, normal vector, and the third orthogonal vector in the destination coordinate system.) I have a frame_map() function in BOSL2 that does this. On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > below is the picture of 3 vectors along the path > tangent vector (blue color), normal vector (magenta) and orthogonal > vector(cyan) > now the challenge is to align the section based on these 3 vectors along > the path. > > if the section is made on x-y plane > -z axis should align with tangent vector > y-axis should align with normal vector > -x-axis should align with orthogonal vector > > [image: Screenshot 2023-04-03 at 7.39.18 AM.png] > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Mon, Apr 3, 2023 3:28 AM

OK
Great Thanks
Will try this

On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, avm4@cornell.edu wrote:

That's not a challenge.  The challenge is deciding what the normal vector
IS.
  Once you've computed the tangent vector and somehow selected a normal
vector, the map from the section onto the new coordinate system is fully
defined, and easily computed.  (You can directly write down the matrix for
this map based on the tangent vector, normal vector, and the third
orthogonal vector in the destination coordinate system.)  I have a
frame_map() function in BOSL2 that does this.

On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]


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

OK Great Thanks Will try this On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, <avm4@cornell.edu> wrote: > That's not a challenge. The challenge is deciding *what the normal vector > IS.* Once you've computed the tangent vector and somehow selected a normal > vector, the map from the section onto the new coordinate system is fully > defined, and easily computed. (You can directly write down the matrix for > this map based on the tangent vector, normal vector, and the third > orthogonal vector in the destination coordinate system.) I have a > frame_map() function in BOSL2 that does this. > > On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> >> below is the picture of 3 vectors along the path >> tangent vector (blue color), normal vector (magenta) and orthogonal >> vector(cyan) >> now the challenge is to align the section based on these 3 vectors along >> the path. >> >> if the section is made on x-y plane >> -z axis should align with tangent vector >> y-axis should align with normal vector >> -x-axis should align with orthogonal vector >> >> [image: Screenshot 2023-04-03 at 7.39.18 AM.png] >> _______________________________________________ >> 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 >
KE
Karl Exler
Mon, Apr 3, 2023 5:57 AM

I am following this "path extrude" thread a long time no with great
interest.
Could please someone paste an example here using the BOSL2 library?

Why? I can only learn reviewing examples. ;-)  All hints like "I have a
frame_map() function" is for me - a IT stranger---- spanish words

many thanks
Karl

Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar:

OK
Great Thanks
Will try this

On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, avm4@cornell.edu wrote:

 That's not a challenge.  The challenge is deciding *what the
 normal vector IS.*  Once you've computed the tangent vector and
 somehow selected a normal vector, the map from the section onto
 the new coordinate system is fully defined, and easily computed. 
 (You can directly write down the matrix for this map based on the
 tangent vector, normal vector, and the third orthogonal vector in
 the destination coordinate system.)  I have a frame_map() function
 in BOSL2 that does this.

 On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar
 <sprabhakar2006@gmail.com> wrote:


     below is the picture of 3 vectors along the path
     tangent vector (blue color), normal vector (magenta) and
     orthogonal vector(cyan)
     now the challenge is to align the section based on these 3
     vectors along the path.

     if the section is made on x-y plane
     -z axis should align with tangent vector
     y-axis should align with normal vector
     -x-axis should align with orthogonal vector

     Screenshot 2023-04-03 at 7.39.18 AM.png
     _______________________________________________
     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 todiscuss-leave@lists.openscad.org

I am following this "path extrude" thread a long time no with great interest. Could please someone paste an example here using the BOSL2 library? Why? I can only learn reviewing examples. ;-)  All hints like "I have a frame_map() function" is for me - a IT stranger---- spanish words many thanks Karl Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar: > OK > Great Thanks > Will try this > > On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, <avm4@cornell.edu> wrote: > > That's not a challenge.  The challenge is deciding *what the > normal vector IS.*  Once you've computed the tangent vector and > somehow selected a normal vector, the map from the section onto > the new coordinate system is fully defined, and easily computed.  > (You can directly write down the matrix for this map based on the > tangent vector, normal vector, and the third orthogonal vector in > the destination coordinate system.)  I have a frame_map() function > in BOSL2 that does this. > > On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > > below is the picture of 3 vectors along the path > tangent vector (blue color), normal vector (magenta) and > orthogonal vector(cyan) > now the challenge is to align the section based on these 3 > vectors along the path. > > if the section is made on x-y plane > -z axis should align with tangent vector > y-axis should align with normal vector > -x-axis should align with orthogonal vector > > Screenshot 2023-04-03 at 7.39.18 AM.png > _______________________________________________ > 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 todiscuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Mon, Apr 3, 2023 7:52 AM

I have resolved this issue and results are absolutely consistent with the 3
vectors along the path.

Will share my results in the evening India time.

On Mon, 3 Apr, 2023, 7:47 am Sanjeev Prabhakar, sprabhakar2006@gmail.com
wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]

I have resolved this issue and results are absolutely consistent with the 3 vectors along the path. Will share my results in the evening India time. On Mon, 3 Apr, 2023, 7:47 am Sanjeev Prabhakar, <sprabhakar2006@gmail.com> wrote: > > below is the picture of 3 vectors along the path > tangent vector (blue color), normal vector (magenta) and orthogonal > vector(cyan) > now the challenge is to align the section based on these 3 vectors along > the path. > > if the section is made on x-y plane > -z axis should align with tangent vector > y-axis should align with normal vector > -x-axis should align with orthogonal vector > > [image: Screenshot 2023-04-03 at 7.39.18 AM.png] >
SP
Sanjeev Prabhakar
Mon, Apr 3, 2023 8:56 AM

I am not using the BOSL2.
Maybe someone else can help you.
Regards

On Mon, 3 Apr, 2023, 11:27 am Karl Exler, karl.exler@meinklang.cc wrote:

I am following this "path extrude" thread a long time no with great
interest.
Could please someone paste an example here using the BOSL2 library?

Why? I can only learn reviewing examples. ;-)  All hints like "I have a
frame_map() function" is for me - a IT stranger---- spanish words

many thanks
Karl
Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar:

OK
Great Thanks
Will try this

On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, avm4@cornell.edu wrote:

That's not a challenge.  The challenge is deciding what the normal
vector IS.
  Once you've computed the tangent vector and somehow selected a
normal vector, the map from the section onto the new coordinate system is
fully defined, and easily computed.  (You can directly write down the
matrix for this map based on the tangent vector, normal vector, and the
third orthogonal vector in the destination coordinate system.)  I have a
frame_map() function in BOSL2 that does this.

On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]


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

I am not using the BOSL2. Maybe someone else can help you. Regards On Mon, 3 Apr, 2023, 11:27 am Karl Exler, <karl.exler@meinklang.cc> wrote: > I am following this "path extrude" thread a long time no with great > interest. > Could please someone paste an example here using the BOSL2 library? > > Why? I can only learn reviewing examples. ;-) All hints like "I have a > frame_map() function" is for me - a IT stranger---- spanish words > > many thanks > Karl > Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar: > > OK > Great Thanks > Will try this > > On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, <avm4@cornell.edu> wrote: > >> That's not a challenge. The challenge is deciding *what the normal >> vector IS.* Once you've computed the tangent vector and somehow selected a >> normal vector, the map from the section onto the new coordinate system is >> fully defined, and easily computed. (You can directly write down the >> matrix for this map based on the tangent vector, normal vector, and the >> third orthogonal vector in the destination coordinate system.) I have a >> frame_map() function in BOSL2 that does this. >> >> On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> >>> below is the picture of 3 vectors along the path >>> tangent vector (blue color), normal vector (magenta) and orthogonal >>> vector(cyan) >>> now the challenge is to align the section based on these 3 vectors along >>> the path. >>> >>> if the section is made on x-y plane >>> -z axis should align with tangent vector >>> y-axis should align with normal vector >>> -x-axis should align with orthogonal vector >>> >>> [image: Screenshot 2023-04-03 at 7.39.18 AM.png] >>> _______________________________________________ >>> 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, Apr 3, 2023 10:11 AM

Karl, there are 44 examples in the BOSL2 manual.  I don't see a reason to
repost them here on the mailing list.  Go to the link below, and if you
want to go straight to the examples, scroll down a ways until you see
them.

https://github.com/revarbat/BOSL2/wiki/skin.scad#functionmodule-path_sweep

The frame_map function is used internally in path_sweep.  You don't need
to use it.

On Mon, Apr 3, 2023 at 1:57 AM Karl Exler karl.exler@meinklang.cc wrote:

I am following this "path extrude" thread a long time no with great
interest.
Could please someone paste an example here using the BOSL2 library?

Why? I can only learn reviewing examples. ;-)  All hints like "I have a
frame_map() function" is for me - a IT stranger---- spanish words

many thanks
Karl
Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar:

OK
Great Thanks
Will try this

On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, avm4@cornell.edu wrote:

That's not a challenge.  The challenge is deciding what the normal
vector IS.
  Once you've computed the tangent vector and somehow selected a
normal vector, the map from the section onto the new coordinate system is
fully defined, and easily computed.  (You can directly write down the
matrix for this map based on the tangent vector, normal vector, and the
third orthogonal vector in the destination coordinate system.)  I have a
frame_map() function in BOSL2 that does this.

On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]


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

Karl, there are 44 examples in the BOSL2 manual. I don't see a reason to repost them here on the mailing list. Go to the link below, and if you want to go straight to the examples, scroll down a ways until you see them. https://github.com/revarbat/BOSL2/wiki/skin.scad#functionmodule-path_sweep The frame_map function is used internally in path_sweep. You don't need to use it. On Mon, Apr 3, 2023 at 1:57 AM Karl Exler <karl.exler@meinklang.cc> wrote: > I am following this "path extrude" thread a long time no with great > interest. > Could please someone paste an example here using the BOSL2 library? > > Why? I can only learn reviewing examples. ;-) All hints like "I have a > frame_map() function" is for me - a IT stranger---- spanish words > > many thanks > Karl > Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar: > > OK > Great Thanks > Will try this > > On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, <avm4@cornell.edu> wrote: > >> That's not a challenge. The challenge is deciding *what the normal >> vector IS.* Once you've computed the tangent vector and somehow selected a >> normal vector, the map from the section onto the new coordinate system is >> fully defined, and easily computed. (You can directly write down the >> matrix for this map based on the tangent vector, normal vector, and the >> third orthogonal vector in the destination coordinate system.) I have a >> frame_map() function in BOSL2 that does this. >> >> On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> >>> below is the picture of 3 vectors along the path >>> tangent vector (blue color), normal vector (magenta) and orthogonal >>> vector(cyan) >>> now the challenge is to align the section based on these 3 vectors along >>> the path. >>> >>> if the section is made on x-y plane >>> -z axis should align with tangent vector >>> y-axis should align with normal vector >>> -x-axis should align with orthogonal vector >>> >>> [image: Screenshot 2023-04-03 at 7.39.18 AM.png] >>> _______________________________________________ >>> 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 >
RW
Rogier Wolff
Mon, Apr 3, 2023 1:30 PM

On Mon, Apr 3, 2023 at 1:57 AM Karl Exler karl.exler@meinklang.cc wrote:

I am following this "path extrude" thread a long time no with great
interest.

me too!

I've been thinking. It seems the different ways to do the orientation
of the 2D shape being extruded makes things difficult...

As a "path" we normally think of it as a continuous function. But the
way OpenScad works, such a path (like an openscad circle!) needs to be
split into discrete steps. Thus, it is logical that to be able to do
path-extrude, you need to provide a path and the normals (orientation)
for each point on the path.

Now, it becomes possible to separate the orientation problem, from the
path extrusion problem.

All existing extrusions simply become a path extrude with a nice
default for something.

simplification:

module rotate_extrude ()
{
path_extrude (path=path_circle, orientations=path_circle)
rotate ([90,0,0]) children ();
}

x(orientations can also be (repeated)  [0,0,1] as the reference vector.)

Roger. 

Could please someone paste an example here using the BOSL2 library?

Why? I can only learn reviewing examples. ;-)  All hints like "I have a
frame_map() function" is for me - a IT stranger---- spanish words

many thanks
Karl
Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar:

OK
Great Thanks
Will try this

On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, avm4@cornell.edu wrote:

That's not a challenge.  The challenge is deciding what the normal
vector IS.
  Once you've computed the tangent vector and somehow selected a
normal vector, the map from the section onto the new coordinate system is
fully defined, and easily computed.  (You can directly write down the
matrix for this map based on the tangent vector, normal vector, and the
third orthogonal vector in the destination coordinate system.)  I have a
frame_map() function in BOSL2 that does this.

On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]


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


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


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


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


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

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

On Mon, Apr 3, 2023 at 1:57 AM Karl Exler <karl.exler@meinklang.cc> wrote: > I am following this "path extrude" thread a long time no with great > interest. me too! I've been thinking. It seems the different ways to do the orientation of the 2D shape being extruded makes things difficult... As a "path" we normally think of it as a continuous function. But the way OpenScad works, such a path (like an openscad circle!) needs to be split into discrete steps. Thus, it is logical that to be able to do path-extrude, you need to provide a path and the normals (orientation) for each point on the path. Now, it becomes possible to separate the orientation problem, from the path extrusion problem. All existing extrusions simply become a path extrude with a nice default for something. simplification: module rotate_extrude () { path_extrude (path=path_circle, orientations=path_circle) rotate ([90,0,0]) children (); } x(orientations can also be (repeated) [0,0,1] as the reference vector.) Roger. > > Could please someone paste an example here using the BOSL2 library? > > > > Why? I can only learn reviewing examples. ;-) All hints like "I have a > > frame_map() function" is for me - a IT stranger---- spanish words > > > > many thanks > > Karl > > Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar: > > > > OK > > Great Thanks > > Will try this > > > > On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, <avm4@cornell.edu> wrote: > > > >> That's not a challenge. The challenge is deciding *what the normal > >> vector IS.* Once you've computed the tangent vector and somehow selected a > >> normal vector, the map from the section onto the new coordinate system is > >> fully defined, and easily computed. (You can directly write down the > >> matrix for this map based on the tangent vector, normal vector, and the > >> third orthogonal vector in the destination coordinate system.) I have a > >> frame_map() function in BOSL2 that does this. > >> > >> On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar < > >> sprabhakar2006@gmail.com> wrote: > >> > >>> > >>> below is the picture of 3 vectors along the path > >>> tangent vector (blue color), normal vector (magenta) and orthogonal > >>> vector(cyan) > >>> now the challenge is to align the section based on these 3 vectors along > >>> the path. > >>> > >>> if the section is made on x-y plane > >>> -z axis should align with tangent vector > >>> y-axis should align with normal vector > >>> -x-axis should align with orthogonal vector > >>> > >>> [image: Screenshot 2023-04-03 at 7.39.18 AM.png] > >>> _______________________________________________ > >>> OpenSCAD mailing list > >>> To unsubscribe send an email to discuss-leave@lists.openscad.org > >>> > >> _______________________________________________ > >> OpenSCAD mailing list > >> To unsubscribe send an email to discuss-leave@lists.openscad.org > >> > > > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
SP
Sanjeev Prabhakar
Mon, Apr 3, 2023 3:25 PM

example 1:
[image: Screenshot 2023-04-03 at 7.39.18 AM.png]

[image: Screenshot 2023-04-03 at 8.41.00 PM.png]

example2:
[image: Screenshot 2023-04-03 at 8.46.06 PM.png]

[image: Screenshot 2023-04-03 at 8.46.51 PM.png]

example3:
[image: Screenshot 2023-04-03 at 8.48.36 PM.png]

[image: Screenshot 2023-04-03 at 8.49.10 PM.png]

In the example 1, the shape seems to be distorted, but it is still
consistent with the 3 vectors. the twist in this example can be corrected,
by aligning the section and the slices can be removed

[image: Screenshot 2023-04-03 at 8.54.47 PM.png]

On Mon, 3 Apr 2023 at 13:22, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I have resolved this issue and results are absolutely consistent with the
3 vectors along the path.

Will share my results in the evening India time.

On Mon, 3 Apr, 2023, 7:47 am Sanjeev Prabhakar, sprabhakar2006@gmail.com
wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors along
the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]

example 1: [image: Screenshot 2023-04-03 at 7.39.18 AM.png] [image: Screenshot 2023-04-03 at 8.41.00 PM.png] example2: [image: Screenshot 2023-04-03 at 8.46.06 PM.png] [image: Screenshot 2023-04-03 at 8.46.51 PM.png] example3: [image: Screenshot 2023-04-03 at 8.48.36 PM.png] [image: Screenshot 2023-04-03 at 8.49.10 PM.png] In the example 1, the shape seems to be distorted, but it is still consistent with the 3 vectors. the twist in this example can be corrected, by aligning the section and the slices can be removed [image: Screenshot 2023-04-03 at 8.54.47 PM.png] On Mon, 3 Apr 2023 at 13:22, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I have resolved this issue and results are absolutely consistent with the > 3 vectors along the path. > > Will share my results in the evening India time. > > > On Mon, 3 Apr, 2023, 7:47 am Sanjeev Prabhakar, <sprabhakar2006@gmail.com> > wrote: > >> >> below is the picture of 3 vectors along the path >> tangent vector (blue color), normal vector (magenta) and orthogonal >> vector(cyan) >> now the challenge is to align the section based on these 3 vectors along >> the path. >> >> if the section is made on x-y plane >> -z axis should align with tangent vector >> y-axis should align with normal vector >> -x-axis should align with orthogonal vector >> >> [image: Screenshot 2023-04-03 at 7.39.18 AM.png] >> >
AM
Adrian Mariano
Mon, Apr 3, 2023 9:46 PM

I am not sure that it makes sense to say you can "separate the orientation
problem from the path extrusion problem".    When I wrote the code in BOSL2
I followed the approach from list-comprehension-demos, a library that was
written in 2015 when list comprehensions were first introduced.  The core
operation there, which they (and BOSL2) call "sweep" is to take a 2d
profile and a list of transformation matrices.  Then you write
sweep(profile, transform_list) and an object is created by linking together
successive transformed copies of the profile.

This is a very powerful framework.  The transformations can potentially do
anything (that gives you a valid polyhedron at the end) so you can change
the scale, you can add twist if you want, or really rotate any direction,
and you can translate around.  This sweep() function is also pretty easy
to write.  It seems like if OpenSCAD were to add a native function in this
general problem area, this is the one that should be added.  If we had
this form of generalized sweep but it could handle self-intersections that
would be great.

The path extrusion problem is a special case of this more general problem,
but what distinguishes the path extrusion problem is that you need to
construct the set of tangents and normals to the path.  This is the
orientation problem, and I think that the path_extrusion problem IS the
orientation problem, so I disagree that you can separate path extrusion
from orientation.  That a path in OpenSCAD is discrete really doesn't have
a huge consequence here.  You can estimate the tangent and normal from a
discrete path.  The huge complication is that the problem is ill defined,
so you may not know what the normal should be.  If you don't know what the
normal should be...you're going to have a hard time calculating it.

So yes, you can toss that ill-definition off to the user and force the user
to supply the normals.  That makes a lot of work for the user.  How is the
user to manage this?  And what is gained by separating it as an extra step
for the user?  It seems to me like it's a complication, and deterrent to
using the code.  I submit that the user usually doesn't want to bother with
having to figure out how to construct the orientation and would rather have
the path_sweep module do it.  In BOSL2 I do give you the option of
actually specifying the normals yourself.  There is an example of using
this feature to extrude a shape on the surface of a knot.  But in truth,
the user wants help making these normals, and that is the job of the
path_sweep() operation in BOSL2.  Basically what path_sweep does in BOSL2
is it computes the tangents, somehow constructs normals (depending on the
selected method), applies user specified twist, and if necessary, adjusts
twist so that closed paths meet up properly.  Then it passes that info to
sweep().

On Mon, Apr 3, 2023 at 9:31 AM Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Mon, Apr 3, 2023 at 1:57 AM Karl Exler karl.exler@meinklang.cc wrote:

I am following this "path extrude" thread a long time no with great
interest.

me too!

I've been thinking. It seems the different ways to do the orientation
of the 2D shape being extruded makes things difficult...

As a "path" we normally think of it as a continuous function. But the
way OpenScad works, such a path (like an openscad circle!) needs to be
split into discrete steps. Thus, it is logical that to be able to do
path-extrude, you need to provide a path and the normals (orientation)
for each point on the path.

Now, it becomes possible to separate the orientation problem, from the
path extrusion problem.

All existing extrusions simply become a path extrude with a nice
default for something.

simplification:

module rotate_extrude ()
{
path_extrude (path=path_circle, orientations=path_circle)
rotate ([90,0,0]) children ();
}

x(orientations can also be (repeated)  [0,0,1] as the reference vector.)

     Roger.

Could please someone paste an example here using the BOSL2 library?

Why? I can only learn reviewing examples. ;-)  All hints like "I have a
frame_map() function" is for me - a IT stranger---- spanish words

many thanks
Karl
Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar:

OK
Great Thanks
Will try this

On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, avm4@cornell.edu wrote:

That's not a challenge.  The challenge is deciding what the normal
vector IS.
  Once you've computed the tangent vector and somehow

selected a

normal vector, the map from the section onto the new coordinate

system is

fully defined, and easily computed.  (You can directly write down the
matrix for this map based on the tangent vector, normal vector, and

the

third orthogonal vector in the destination coordinate system.)  I

have a

frame_map() function in BOSL2 that does this.

On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

below is the picture of 3 vectors along the path
tangent vector (blue color), normal vector (magenta) and orthogonal
vector(cyan)
now the challenge is to align the section based on these 3 vectors

along

the path.

if the section is made on x-y plane
-z axis should align with tangent vector
y-axis should align with normal vector
-x-axis should align with orthogonal vector

[image: Screenshot 2023-04-03 at 7.39.18 AM.png]


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


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


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


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


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

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


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

I am not sure that it makes sense to say you can "separate the orientation problem from the path extrusion problem". When I wrote the code in BOSL2 I followed the approach from list-comprehension-demos, a library that was written in 2015 when list comprehensions were first introduced. The core operation there, which they (and BOSL2) call "sweep" is to take a 2d profile and a list of transformation matrices. Then you write sweep(profile, transform_list) and an object is created by linking together successive transformed copies of the profile. This is a very powerful framework. The transformations can potentially do anything (that gives you a valid polyhedron at the end) so you can change the scale, you can add twist if you want, or really rotate any direction, and you can translate around. This sweep() function is also pretty easy to write. It seems like if OpenSCAD were to add a native function in this general problem area, this is the one that should be added. If we had this form of generalized sweep but it could handle self-intersections that would be great. The path extrusion problem is a special case of this more general problem, but what distinguishes the path extrusion problem is that you need to construct the set of tangents and normals to the path. This is the orientation problem, and I think that the path_extrusion problem **IS** the orientation problem, so I disagree that you can separate path extrusion from orientation. That a path in OpenSCAD is discrete really doesn't have a huge consequence here. You can estimate the tangent and normal from a discrete path. The huge complication is that the problem is ill defined, so you may not know what the normal should be. If you don't know what the normal should be...you're going to have a hard time calculating it. So yes, you can toss that ill-definition off to the user and force the user to supply the normals. That makes a lot of work for the user. How is the user to manage this? And what is gained by separating it as an extra step for the user? It seems to me like it's a complication, and deterrent to using the code. I submit that the user usually doesn't want to bother with having to figure out how to construct the orientation and would rather have the path_sweep module do it. In BOSL2 I do give you the option of actually specifying the normals yourself. There is an example of using this feature to extrude a shape on the surface of a knot. But in truth, the user wants help making these normals, and that is the job of the path_sweep() operation in BOSL2. Basically what path_sweep does in BOSL2 is it computes the tangents, somehow constructs normals (depending on the selected method), applies user specified twist, and if necessary, adjusts twist so that closed paths meet up properly. Then it passes that info to sweep(). On Mon, Apr 3, 2023 at 9:31 AM Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > > On Mon, Apr 3, 2023 at 1:57 AM Karl Exler <karl.exler@meinklang.cc> wrote: > > > I am following this "path extrude" thread a long time no with great > > interest. > > me too! > > I've been thinking. It seems the different ways to do the orientation > of the 2D shape being extruded makes things difficult... > > As a "path" we normally think of it as a continuous function. But the > way OpenScad works, such a path (like an openscad circle!) needs to be > split into discrete steps. Thus, it is logical that to be able to do > path-extrude, you need to provide a path and the normals (orientation) > for each point on the path. > > Now, it becomes possible to separate the orientation problem, from the > path extrusion problem. > > All existing extrusions simply become a path extrude with a nice > default for something. > > > simplification: > > module rotate_extrude () > { > path_extrude (path=path_circle, orientations=path_circle) > rotate ([90,0,0]) children (); > } > > x(orientations can also be (repeated) [0,0,1] as the reference vector.) > > Roger. > > > > > Could please someone paste an example here using the BOSL2 library? > > > > > > Why? I can only learn reviewing examples. ;-) All hints like "I have a > > > frame_map() function" is for me - a IT stranger---- spanish words > > > > > > many thanks > > > Karl > > > Am 03.04.23 um 05:28 schrieb Sanjeev Prabhakar: > > > > > > OK > > > Great Thanks > > > Will try this > > > > > > On Mon, 3 Apr, 2023, 7:55 am Adrian Mariano, <avm4@cornell.edu> wrote: > > > > > >> That's not a challenge. The challenge is deciding *what the normal > > >> vector IS.* Once you've computed the tangent vector and somehow > selected a > > >> normal vector, the map from the section onto the new coordinate > system is > > >> fully defined, and easily computed. (You can directly write down the > > >> matrix for this map based on the tangent vector, normal vector, and > the > > >> third orthogonal vector in the destination coordinate system.) I > have a > > >> frame_map() function in BOSL2 that does this. > > >> > > >> On Sun, Apr 2, 2023 at 10:17 PM Sanjeev Prabhakar < > > >> sprabhakar2006@gmail.com> wrote: > > >> > > >>> > > >>> below is the picture of 3 vectors along the path > > >>> tangent vector (blue color), normal vector (magenta) and orthogonal > > >>> vector(cyan) > > >>> now the challenge is to align the section based on these 3 vectors > along > > >>> the path. > > >>> > > >>> if the section is made on x-y plane > > >>> -z axis should align with tangent vector > > >>> y-axis should align with normal vector > > >>> -x-axis should align with orthogonal vector > > >>> > > >>> [image: Screenshot 2023-04-03 at 7.39.18 AM.png] > > >>> _______________________________________________ > > >>> OpenSCAD mailing list > > >>> To unsubscribe send an email to discuss-leave@lists.openscad.org > > >>> > > >> _______________________________________________ > > >> OpenSCAD mailing list > > >> To unsubscribe send an email to discuss-leave@lists.openscad.org > > >> > > > > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > > > > > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > -- > ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 > ** > ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** > f equals m times a. When your f is steady, and your m is going down > your a is going up. -- Chris Hadfield about flying up the space shuttle. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
KE
Karl Exler
Tue, Apr 4, 2023 9:32 AM

Gentlemen! For me as novice it is really hard to create nuts and bolts.
All the "/libraries/" and "/includes/" and "/use/"... that makes me
really nervous. What I tried today:

went to Github and fetched

  • list-comprehension-demos-master.zip
  • scad-utils-master.zip
  • agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file
"/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do
not want to create exotic stuff, only the basics... ??? many thanks for
your help Karl

Gentlemen! For me as novice it is really hard to create nuts and bolts. All the "/libraries/" and "/includes/" and "/use/"... that makes me really nervous. *What I tried today:* went to Github and fetched * list-comprehension-demos-master.zip * scad-utils-master.zip * agent-scad.zip extracted them to ~/local/shared/OpenScad/libraries (took care that the "master" is removed) used a file from Github to create a screw, which again uses the above mentioned libraries: use <agentscad/mx-screw.scad> use <agentscad/mx-thread.scad> // Precision $fn=50; mxBoltHexagonalThreaded( M6() ); Bingo: I receive an error message, which refers to ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", *line 507*: syntax error within this file I can find a function at line 507: function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); And now I am at the end with my small IT latin :-( and I end with the question: "what is the most easiest way to create nuts and bolts. I do not want to create exotic stuff, only the basics... ??? many thanks for your help Karl
RW
Raymond West
Tue, Apr 4, 2023 10:06 AM

If I want to create an stl file, say, of a nut and bolt, then I use
NopHead's library. But generally i use purchased hardware, and only need
to create the parts to fit them to, which is much simpler than fiddling
with thread profiles in 3d printing.

Hexagon heads /sockets created by a cylinder with $fn=6. Plenty of
charts available for the standard sizes, just allow something for
fitting tolerances, if inserting nuts. But, use insets, or self tappers.
The standard machine screw threads are not designed for soft materials.
(assuming the end product is 3d printed, not machined from solid)

On 04/04/2023 10:32, Karl Exler wrote:

Gentlemen! For me as novice it is really hard to create nuts and
bolts. All the "/libraries/" and "/includes/" and "/use/"... that
makes me really nervous. What I tried today:

went to Github and fetched

  • list-comprehension-demos-master.zip
  • scad-utils-master.zip
  • agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file
"/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do
not want to create exotic stuff, only the basics... ??? many thanks
for your help Karl


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

If I want to create an stl file, say, of a nut and bolt, then I use NopHead's library. But generally i use purchased hardware, and only need to create the parts to fit them to, which is much simpler than fiddling with thread profiles in 3d printing. Hexagon heads /sockets created by a cylinder with $fn=6. Plenty of charts available for the standard sizes, just allow something for fitting tolerances, if inserting nuts. But, use insets, or self tappers. The standard machine screw threads are not designed for soft materials. (assuming the end product is 3d printed, not machined from solid) On 04/04/2023 10:32, Karl Exler wrote: > > Gentlemen! For me as novice it is really hard to create nuts and > bolts. All the "/libraries/" and "/includes/" and "/use/"... that > makes me really nervous. *What I tried today:* > > went to Github and fetched > > * list-comprehension-demos-master.zip > * scad-utils-master.zip > * agent-scad.zip > > extracted them to ~/local/shared/OpenScad/libraries > > (took care that the "master" is removed) > > used a file from Github to create a screw, which again uses the above > mentioned libraries: > > use <agentscad/mx-screw.scad> > use <agentscad/mx-thread.scad> > > // Precision > $fn=50; > > mxBoltHexagonalThreaded( M6() ); > > Bingo: I receive an error message, which refers to > > ERROR: Parser error in file > "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", > *line 507*: syntax error > > within this file I can find a function at line 507: > > function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); > > > > And now I am at the end with my small IT latin :-( and I end with the > question: "what is the most easiest way to create nuts and bolts. I do > not want to create exotic stuff, only the basics... ??? many thanks > for your help Karl > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
AM
Adrian Mariano
Tue, Apr 4, 2023 10:16 AM

Why do libraries make you really nervous?  BOSL2 can create nuts and bolts
with a single library.  If you want to use list-comprehension-demos you
need a version that's been patched to work with recent copies of OpenSCAD.
Your error message above suggests that your OpenSCAD might be too old for
the library you're trying to use.  (The line 507 looks OK, but has a
function literal, which I think requires 2021.01.

BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

Another solution is threadlib:  https://github.com/adrianschlatter/threadlib,
which also depends on several other things, but not agent-scad

On Tue, Apr 4, 2023 at 5:32 AM Karl Exler karl.exler@meinklang.cc wrote:

Gentlemen! For me as novice it is really hard to create nuts and bolts.
All the "libraries" and "includes" and "use"... that makes me
really nervous. What I tried today:

went to Github and fetched

- list-comprehension-demos-master.zip
- scad-utils-master.zip
- agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do not
want to create exotic stuff, only the basics... ??? many thanks for your
help Karl


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

Why do libraries make you really nervous? BOSL2 can create nuts and bolts with a single library. If you want to use list-comprehension-demos you need a version that's been patched to work with recent copies of OpenSCAD. Your error message above suggests that your OpenSCAD might be too old for the library you're trying to use. (The line 507 looks OK, but has a function literal, which I think requires 2021.01. BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad Another solution is threadlib: https://github.com/adrianschlatter/threadlib, which also depends on several other things, but not agent-scad On Tue, Apr 4, 2023 at 5:32 AM Karl Exler <karl.exler@meinklang.cc> wrote: > Gentlemen! For me as novice it is really hard to create nuts and bolts. > All the "*libraries*" and "*includes*" and "*use*"... that makes me > really nervous. *What I tried today:* > > went to Github and fetched > > - list-comprehension-demos-master.zip > - scad-utils-master.zip > - agent-scad.zip > > extracted them to ~/local/shared/OpenScad/libraries > > (took care that the "master" is removed) > > used a file from Github to create a screw, which again uses the above > mentioned libraries: > > use <agentscad/mx-screw.scad> > use <agentscad/mx-thread.scad> > > // Precision > $fn=50; > > mxBoltHexagonalThreaded( M6() ); > > Bingo: I receive an error message, which refers to > > ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", *line 507*: syntax error > > within this file I can find a function at line 507: > > function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); > > > > > And now I am at the end with my small IT latin :-( and I end with the > question: "what is the most easiest way to create nuts and bolts. I do not > want to create exotic stuff, only the basics... ??? many thanks for your > help Karl > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
NH
nop head
Tue, Apr 4, 2023 11:12 AM

The line you showed has a function literal in it, so you need at least the
latest release of OpenSCAD because it is a fairly recent addition.

On Tue, 4 Apr 2023 at 11:17, Adrian Mariano avm4@cornell.edu wrote:

Why do libraries make you really nervous?  BOSL2 can create nuts and bolts
with a single library.  If you want to use list-comprehension-demos you
need a version that's been patched to work with recent copies of OpenSCAD.
Your error message above suggests that your OpenSCAD might be too old for
the library you're trying to use.  (The line 507 looks OK, but has a
function literal, which I think requires 2021.01.

BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

Another solution is threadlib:
https://github.com/adrianschlatter/threadlib, which also depends on
several other things, but not agent-scad

On Tue, Apr 4, 2023 at 5:32 AM Karl Exler karl.exler@meinklang.cc wrote:

Gentlemen! For me as novice it is really hard to create nuts and bolts.
All the "libraries" and "includes" and "use"... that makes me
really nervous. What I tried today:

went to Github and fetched

- list-comprehension-demos-master.zip
- scad-utils-master.zip
- agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do not
want to create exotic stuff, only the basics... ??? many thanks for your
help Karl


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


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

The line you showed has a function literal in it, so you need at least the latest release of OpenSCAD because it is a fairly recent addition. On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: > Why do libraries make you really nervous? BOSL2 can create nuts and bolts > with a single library. If you want to use list-comprehension-demos you > need a version that's been patched to work with recent copies of OpenSCAD. > Your error message above suggests that your OpenSCAD might be too old for > the library you're trying to use. (The line 507 looks OK, but has a > function literal, which I think requires 2021.01. > > BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad > > Another solution is threadlib: > https://github.com/adrianschlatter/threadlib, which also depends on > several other things, but not agent-scad > > On Tue, Apr 4, 2023 at 5:32 AM Karl Exler <karl.exler@meinklang.cc> wrote: > >> Gentlemen! For me as novice it is really hard to create nuts and bolts. >> All the "*libraries*" and "*includes*" and "*use*"... that makes me >> really nervous. *What I tried today:* >> >> went to Github and fetched >> >> - list-comprehension-demos-master.zip >> - scad-utils-master.zip >> - agent-scad.zip >> >> extracted them to ~/local/shared/OpenScad/libraries >> >> (took care that the "master" is removed) >> >> used a file from Github to create a screw, which again uses the above >> mentioned libraries: >> >> use <agentscad/mx-screw.scad> >> use <agentscad/mx-thread.scad> >> >> // Precision >> $fn=50; >> >> mxBoltHexagonalThreaded( M6() ); >> >> Bingo: I receive an error message, which refers to >> >> ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", *line 507*: syntax error >> >> within this file I can find a function at line 507: >> >> function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); >> >> >> >> >> And now I am at the end with my small IT latin :-( and I end with the >> question: "what is the most easiest way to create nuts and bolts. I do not >> want to create exotic stuff, only the basics... ??? many thanks for your >> help Karl >> >> _______________________________________________ >> 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 >
KE
Karl Exler
Wed, Apr 5, 2023 7:12 AM

Dear Gentlemen
Due to your help I made big advances yesterday and I produced my first
set of screw and nut today: (jupidoo)

threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel =
true, $fn = 64);
threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4,
$slop=0.05, $fa=1, $fs=1);

And -as expected- it doesn work at the first time. It is really perfect,
but too narrow.

Is it d and id?? I took the same values, but I guess, that was not so
good. Is there a factor with whoch I have to make the "id" smaller than
"d" ?
Many thanks
Karl

Am 04.04.23 um 13:12 schrieb nop head:

The line you showed has a function literal in it, so you need at least
the latest release of OpenSCAD because it is a fairly recent addition.

On Tue, 4 Apr 2023 at 11:17, Adrian Mariano avm4@cornell.edu wrote:

 Why do libraries make you really nervous?  BOSL2 can create nuts
 and bolts with a single library.   If you want to use
 list-comprehension-demos you need a version that's been patched to
 work with recent copies of OpenSCAD.  Your error message above
 suggests that your OpenSCAD might be too old for the library
 you're trying to use.  (The line 507 looks OK, but has a function
 literal, which I think requires 2021.01.

 BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

 Another solution is threadlib:
 https://github.com/adrianschlatter/threadlib, which also depends
 on several other things, but not agent-scad

 On Tue, Apr 4, 2023 at 5:32 AM Karl Exler
 <karl.exler@meinklang.cc> wrote:

     Gentlemen! For me as novice it is really hard to create nuts
     and bolts. All the "/libraries/" and "/includes/" and
     "/use/"... that makes me really nervous. *What I tried today:*

     went to Github and fetched

       * list-comprehension-demos-master.zip
       * scad-utils-master.zip
       * agent-scad.zip

     extracted them to ~/local/shared/OpenScad/libraries

     (took care that the "master" is removed)

     used a file from Github to create a screw, which again uses
     the above mentioned libraries:

     use <agentscad/mx-screw.scad>
     use <agentscad/mx-thread.scad>

     // Precision
     $fn=50;

     mxBoltHexagonalThreaded( M6() );

     Bingo: I receive an error message, which refers to

     ERROR: Parser error in file
     "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
     *line 507*: syntax error

     within this file I can find a function at line 507:

     function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);



     And now I am at the end with my small IT latin :-( and I end
     with the question: "what is the most easiest way to create
     nuts and bolts. I do not want to create exotic stuff, only the
     basics... ??? many thanks for your help Karl

     _______________________________________________
     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 todiscuss-leave@lists.openscad.org

Dear Gentlemen Due to your help I made big advances yesterday and I produced my first set of screw and nut today: (jupidoo) threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel = true, $fn = 64); threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4, $slop=0.05, $fa=1, $fs=1); And -as expected- it doesn work at the first time. It is really perfect, but too narrow. Is it d and id?? I took the same values, but I guess, that was not so good. Is there a factor with whoch I have to make the "id" smaller than "d" ? Many thanks Karl Am 04.04.23 um 13:12 schrieb nop head: > The line you showed has a function literal in it, so you need at least > the latest release of OpenSCAD because it is a fairly recent addition. > > > On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: > > Why do libraries make you really nervous?  BOSL2 can create nuts > and bolts with a single library.   If you want to use > list-comprehension-demos you need a version that's been patched to > work with recent copies of OpenSCAD.  Your error message above > suggests that your OpenSCAD might be too old for the library > you're trying to use.  (The line 507 looks OK, but has a function > literal, which I think requires 2021.01. > > BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad > > Another solution is threadlib: > https://github.com/adrianschlatter/threadlib, which also depends > on several other things, but not agent-scad > > On Tue, Apr 4, 2023 at 5:32 AM Karl Exler > <karl.exler@meinklang.cc> wrote: > > Gentlemen! For me as novice it is really hard to create nuts > and bolts. All the "/libraries/" and "/includes/" and > "/use/"... that makes me really nervous. *What I tried today:* > > went to Github and fetched > > * list-comprehension-demos-master.zip > * scad-utils-master.zip > * agent-scad.zip > > extracted them to ~/local/shared/OpenScad/libraries > > (took care that the "master" is removed) > > used a file from Github to create a screw, which again uses > the above mentioned libraries: > > use <agentscad/mx-screw.scad> > use <agentscad/mx-thread.scad> > > // Precision > $fn=50; > > mxBoltHexagonalThreaded( M6() ); > > Bingo: I receive an error message, which refers to > > ERROR: Parser error in file > "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", > *line 507*: syntax error > > within this file I can find a function at line 507: > > function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); > > > > And now I am at the end with my small IT latin :-( and I end > with the question: "what is the most easiest way to create > nuts and bolts. I do not want to create exotic stuff, only the > basics... ??? many thanks for your help Karl > > _______________________________________________ > 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 todiscuss-leave@lists.openscad.org
J
jon
Wed, Apr 5, 2023 11:54 AM

I often include a variable called "slop" which I set to 0.1 or 0.2 in
order to get printed parts to fit correctly.  I subtract it from ODs and
add it to IDs.

Jon

On 4/5/2023 3:12 AM, Karl Exler wrote:

Dear Gentlemen
Due to your help I made big advances yesterday and I produced my first
set of screw and nut today: (jupidoo)

threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel =
true, $fn = 64);
threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4,
$slop=0.05, $fa=1, $fs=1);

And -as expected- it doesn work at the first time. It is really
perfect, but too narrow.

Is it d and id?? I took the same values, but I guess, that was not so
good. Is there a factor with whoch I have to make the "id" smaller
than "d" ?
Many thanks
Karl

Am 04.04.23 um 13:12 schrieb nop head:

The line you showed has a function literal in it, so you need at
least the latest release of OpenSCAD because it is a fairly
recent addition.

On Tue, 4 Apr 2023 at 11:17, Adrian Mariano avm4@cornell.edu wrote:

 Why do libraries make you really nervous?  BOSL2 can create nuts
 and bolts with a single library.   If you want to use
 list-comprehension-demos you need a version that's been patched
 to work with recent copies of OpenSCAD.  Your error message above
 suggests that your OpenSCAD might be too old for the library
 you're trying to use.  (The line 507 looks OK, but has a function
 literal, which I think requires 2021.01.

 BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

 Another solution is threadlib:
 https://github.com/adrianschlatter/threadlib, which also depends
 on several other things, but not agent-scad

 On Tue, Apr 4, 2023 at 5:32 AM Karl Exler
 <karl.exler@meinklang.cc> wrote:

     Gentlemen! For me as novice it is really hard to create nuts
     and bolts. All the "/libraries/" and "/includes/" and
     "/use/"... that makes me really nervous. *What I tried today:*

     went to Github and fetched

       * list-comprehension-demos-master.zip
       * scad-utils-master.zip
       * agent-scad.zip

     extracted them to ~/local/shared/OpenScad/libraries

     (took care that the "master" is removed)

     used a file from Github to create a screw, which again uses
     the above mentioned libraries:

     use <agentscad/mx-screw.scad>
     use <agentscad/mx-thread.scad>

     // Precision
     $fn=50;

     mxBoltHexagonalThreaded( M6() );

     Bingo: I receive an error message, which refers to

     ERROR: Parser error in file
     "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
     *line 507*: syntax error

     within this file I can find a function at line 507:

     function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);



     And now I am at the end with my small IT latin :-( and I end
     with the question: "what is the most easiest way to create
     nuts and bolts. I do not want to create exotic stuff, only
     the basics... ??? many thanks for your help Karl

     _______________________________________________
     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 todiscuss-leave@lists.openscad.org


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

I often include a variable called "slop" which I set to 0.1 or 0.2 in order to get printed parts to fit correctly.  I subtract it from ODs and add it to IDs. Jon On 4/5/2023 3:12 AM, Karl Exler wrote: > > Dear Gentlemen > Due to your help I made big advances yesterday and I produced my first > set of screw and nut today: (jupidoo) > > threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel = > true, $fn = 64); > threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4, > $slop=0.05, $fa=1, $fs=1); > > And -as expected- it doesn work at the first time. It is really > perfect, but too narrow. > > Is it d and id?? I took the same values, but I guess, that was not so > good. Is there a factor with whoch I have to make the "id" smaller > than "d" ? > Many thanks > Karl > > Am 04.04.23 um 13:12 schrieb nop head: >> The line you showed has a function literal in it, so you need at >> least the latest release of OpenSCAD because it is a fairly >> recent addition. >> >> >> On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: >> >> Why do libraries make you really nervous?  BOSL2 can create nuts >> and bolts with a single library.   If you want to use >> list-comprehension-demos you need a version that's been patched >> to work with recent copies of OpenSCAD.  Your error message above >> suggests that your OpenSCAD might be too old for the library >> you're trying to use.  (The line 507 looks OK, but has a function >> literal, which I think requires 2021.01. >> >> BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad >> >> Another solution is threadlib: >> https://github.com/adrianschlatter/threadlib, which also depends >> on several other things, but not agent-scad >> >> On Tue, Apr 4, 2023 at 5:32 AM Karl Exler >> <karl.exler@meinklang.cc> wrote: >> >> Gentlemen! For me as novice it is really hard to create nuts >> and bolts. All the "/libraries/" and "/includes/" and >> "/use/"... that makes me really nervous. *What I tried today:* >> >> went to Github and fetched >> >> * list-comprehension-demos-master.zip >> * scad-utils-master.zip >> * agent-scad.zip >> >> extracted them to ~/local/shared/OpenScad/libraries >> >> (took care that the "master" is removed) >> >> used a file from Github to create a screw, which again uses >> the above mentioned libraries: >> >> use <agentscad/mx-screw.scad> >> use <agentscad/mx-thread.scad> >> >> // Precision >> $fn=50; >> >> mxBoltHexagonalThreaded( M6() ); >> >> Bingo: I receive an error message, which refers to >> >> ERROR: Parser error in file >> "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", >> *line 507*: syntax error >> >> within this file I can find a function at line 507: >> >> function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); >> >> >> >> And now I am at the end with my small IT latin :-( and I end >> with the question: "what is the most easiest way to create >> nuts and bolts. I do not want to create exotic stuff, only >> the basics... ??? many thanks for your help Karl >> >> _______________________________________________ >> 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 todiscuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
AM
Adrian Mariano
Wed, Apr 5, 2023 1:20 PM

You have not given any allowance of space between the parts.  Real screw
standards will specify that the rod is undersized compared to nominal
diameter to allow for clearance so that the screw can actually fit
together.  If your printer was VERY accurate you might get away with the
.05 allowance you're introducing using the $slop parameter, maybe.  But you
might try printing test pieces that are simple cylinders and holes to get a
feeling for what kind of clearance you need.  I'm not quite sure what
you're trying to make, but it looks sort of like an oversized 1/2-13 bolt,
so if a 1/2-13 would suffice you could also try screw("1/2-13,1/2") which
might get you off to a better start.  If you set the tolerance to the
loosest option (1A for bolts, 1B for nuts) and a $slop suitable for your
printer the parts should fit easily.  (The loose tolerance is in fact loose
enough that I believe on my MK3S, the parts fit with a $slop of zero.)

Note that clearance and slop are meant to be two different concepts:
clearance is the actual space between parts, whereas slop is an adjustment
for inaccuracy of the printer.  Correct setting of $slop is intended to
produce parts that are the exactly specified size.  But you can abuse $slop
to introduce clearance so the parts fit.  If you want to do that, probably
trying 0.2 is a reasonable starting point.

On Wed, Apr 5, 2023 at 3:12 AM Karl Exler karl.exler@meinklang.cc wrote:

Dear Gentlemen
Due to your help I made big advances yesterday and I produced my first set
of screw and nut today: (jupidoo)

threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel =
true, $fn = 64);
threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4,
$slop=0.05, $fa=1, $fs=1);

And -as expected- it doesn work at the first time. It is really perfect,
but too narrow.

Is it d and id?? I took the same values, but I guess, that was not so
good. Is there a factor with whoch I have to make the "id" smaller than "d"
?
Many thanks
Karl
Am 04.04.23 um 13:12 schrieb nop head:

The line you showed has a function literal in it, so you need at least the
latest release of OpenSCAD because it is a fairly recent addition.

On Tue, 4 Apr 2023 at 11:17, Adrian Mariano avm4@cornell.edu wrote:

Why do libraries make you really nervous?  BOSL2 can create nuts and
bolts with a single library.  If you want to use list-comprehension-demos
you need a version that's been patched to work with recent copies of
OpenSCAD.  Your error message above suggests that your OpenSCAD might be
too old for the library you're trying to use.  (The line 507 looks OK, but
has a function literal, which I think requires 2021.01.

BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

Another solution is threadlib:
https://github.com/adrianschlatter/threadlib, which also depends on
several other things, but not agent-scad

On Tue, Apr 4, 2023 at 5:32 AM Karl Exler karl.exler@meinklang.cc
wrote:

Gentlemen! For me as novice it is really hard to create nuts and bolts.
All the "libraries" and "includes" and "use"... that makes me
really nervous. What I tried today:

went to Github and fetched

- list-comprehension-demos-master.zip
- scad-utils-master.zip
- agent-scad.zip

extracted them to ~/local/shared/OpenScad/libraries

(took care that the "master" is removed)

used a file from Github to create a screw, which again uses the above
mentioned libraries:

use <agentscad/mx-screw.scad>
use <agentscad/mx-thread.scad>

// Precision
$fn=50;

mxBoltHexagonalThreaded( M6() );

Bingo: I receive an error message, which refers to

ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", line 507: syntax error

within this file I can find a function at line 507:

function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);

And now I am at the end with my small IT latin :-( and I end with the
question: "what is the most easiest way to create nuts and bolts. I do not
want to create exotic stuff, only the basics... ??? many thanks for your
help Karl


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

You have not given any allowance of space between the parts. Real screw standards will specify that the rod is undersized compared to nominal diameter to allow for clearance so that the screw can actually fit together. If your printer was VERY accurate you might get away with the .05 allowance you're introducing using the $slop parameter, maybe. But you might try printing test pieces that are simple cylinders and holes to get a feeling for what kind of clearance you need. I'm not quite sure what you're trying to make, but it looks sort of like an oversized 1/2-13 bolt, so if a 1/2-13 would suffice you could also try screw("1/2-13,1/2") which might get you off to a better start. If you set the tolerance to the loosest option (1A for bolts, 1B for nuts) and a $slop suitable for your printer the parts should fit easily. (The loose tolerance is in fact loose enough that I believe on my MK3S, the parts fit with a $slop of zero.) Note that clearance and slop are meant to be two different concepts: clearance is the actual space between parts, whereas slop is an adjustment for inaccuracy of the printer. Correct setting of $slop is intended to produce parts that are the exactly specified size. But you can abuse $slop to introduce clearance so the parts fit. If you want to do that, probably trying 0.2 is a reasonable starting point. On Wed, Apr 5, 2023 at 3:12 AM Karl Exler <karl.exler@meinklang.cc> wrote: > Dear Gentlemen > Due to your help I made big advances yesterday and I produced my first set > of screw and nut today: (jupidoo) > > threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, bevel = > true, $fn = 64); > threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4, > $slop=0.05, $fa=1, $fs=1); > > And -as expected- it doesn work at the first time. It is really perfect, > but too narrow. > > Is it d and id?? I took the same values, but I guess, that was not so > good. Is there a factor with whoch I have to make the "id" smaller than "d" > ? > Many thanks > Karl > Am 04.04.23 um 13:12 schrieb nop head: > > The line you showed has a function literal in it, so you need at least the > latest release of OpenSCAD because it is a fairly recent addition. > > > On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: > >> Why do libraries make you really nervous? BOSL2 can create nuts and >> bolts with a single library. If you want to use list-comprehension-demos >> you need a version that's been patched to work with recent copies of >> OpenSCAD. Your error message above suggests that your OpenSCAD might be >> too old for the library you're trying to use. (The line 507 looks OK, but >> has a function literal, which I think requires 2021.01. >> >> BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad >> >> Another solution is threadlib: >> https://github.com/adrianschlatter/threadlib, which also depends on >> several other things, but not agent-scad >> >> On Tue, Apr 4, 2023 at 5:32 AM Karl Exler <karl.exler@meinklang.cc> >> wrote: >> >>> Gentlemen! For me as novice it is really hard to create nuts and bolts. >>> All the "*libraries*" and "*includes*" and "*use*"... that makes me >>> really nervous. *What I tried today:* >>> >>> went to Github and fetched >>> >>> - list-comprehension-demos-master.zip >>> - scad-utils-master.zip >>> - agent-scad.zip >>> >>> extracted them to ~/local/shared/OpenScad/libraries >>> >>> (took care that the "master" is removed) >>> >>> used a file from Github to create a screw, which again uses the above >>> mentioned libraries: >>> >>> use <agentscad/mx-screw.scad> >>> use <agentscad/mx-thread.scad> >>> >>> // Precision >>> $fn=50; >>> >>> mxBoltHexagonalThreaded( M6() ); >>> >>> Bingo: I receive an error message, which refers to >>> >>> ERROR: Parser error in file "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", *line 507*: syntax error >>> >>> within this file I can find a function at line 507: >>> >>> function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); >>> >>> >>> >>> >>> And now I am at the end with my small IT latin :-( and I end with the >>> question: "what is the most easiest way to create nuts and bolts. I do not >>> want to create exotic stuff, only the basics... ??? many thanks for your >>> help Karl >>> _______________________________________________ >>> 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 >
KE
Karl Exler
Wed, Apr 5, 2023 3:46 PM

Dear Adrian
By now I am not making anything. I learn and try and so I have my
troubles. But many thanks to your help.

  1. I would prefer to use the screw function.. but this ends at M12.. And
    I would like to make larger threads and nuts

  2. so, due my humble understanding I have to use the "threaded_rod"
    function :-( About that I am very sad, as e.g. the tolerance, the head
    and some other parameters do not exist for this function. Please peg me,
    if I use wrong termini technici...

  3. I will use my tools only for 3D-Printing and there I only use PLA or
    PETG. No massive force, only bla bla to connect quick and easy. High
    pitch, big diameter, sometimes with a hole, sometimes with an head -
    very very less tolerance.

What does the community thing about this demands?
Thanks
Karl

Am 05.04.23 um 15:20 schrieb Adrian Mariano:

You have not given any allowance of space between the parts.  Real
screw standards will specify that the rod is undersized compared to
nominal diameter to allow for clearance so that the screw can actually
fit together.   If your printer was VERY accurate you might get away
with the .05 allowance you're introducing using the $slop parameter,
maybe.  But you might try printing test pieces that are simple
cylinders and holes to get a feeling for what kind of clearance you
need. I'm not quite sure what you're trying to make, but it looks sort
of like an oversized 1/2-13 bolt, so if a 1/2-13 would suffice you
could also try screw("1/2-13,1/2") which might get you off to a better
start.  If you set the tolerance to the loosest option (1A for bolts,
1B for nuts) and a $slop suitable for your printer the parts should
fit easily.  (The loose tolerance is in fact loose enough that I
believe on my MK3S, the parts fit with a $slop of zero.)

Note that clearance and slop are meant to be two different concepts: 
clearance is the actual space between parts, whereas slop is an
adjustment for inaccuracy of the printer. Correct setting of $slop is
intended to produce parts that are the exactly specified size.  But
you can abuse $slop to introduce clearance so the parts fit.  If you
want to do that, probably trying 0.2 is a reasonable starting point.

On Wed, Apr 5, 2023 at 3:12 AM Karl Exler karl.exler@meinklang.cc wrote:

 Dear Gentlemen
 Due to your help I made big advances yesterday and I produced my
 first set of screw and nut today: (jupidoo)

 threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT,
 bevel = true, $fn = 64);
 threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4,
 $slop=0.05, $fa=1, $fs=1);

 And -as expected- it doesn work at the first time. It is really
 perfect, but too narrow.

 Is it d and id?? I took the same values, but I guess, that was not
 so good. Is there a factor with whoch I have to make the "id"
 smaller than "d" ?
 Many thanks
 Karl

 Am 04.04.23 um 13:12 schrieb nop head:
 The line you showed has a function literal in it, so you need at
 least the latest release of OpenSCAD because it is a fairly
 recent addition.


 On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote:

     Why do libraries make you really nervous? BOSL2 can create
     nuts and bolts with a single library.   If you want to use
     list-comprehension-demos you need a version that's been
     patched to work with recent copies of OpenSCAD.  Your error
     message above suggests that your OpenSCAD might be too old
     for the library you're trying to use.  (The line 507 looks
     OK, but has a function literal, which I think requires 2021.01.

     BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad

     Another solution is threadlib:
     https://github.com/adrianschlatter/threadlib, which also
     depends on several other things, but not agent-scad

     On Tue, Apr 4, 2023 at 5:32 AM Karl Exler
     <karl.exler@meinklang.cc> wrote:

         Gentlemen! For me as novice it is really hard to create
         nuts and bolts. All the "/libraries/" and "/includes/"
         and "/use/"... that makes me really nervous. *What I
         tried today:*

         went to Github and fetched

           * list-comprehension-demos-master.zip
           * scad-utils-master.zip
           * agent-scad.zip

         extracted them to ~/local/shared/OpenScad/libraries

         (took care that the "master" is removed)

         used a file from Github to create a screw, which again
         uses the above mentioned libraries:

         use <agentscad/mx-screw.scad>
         use <agentscad/mx-thread.scad>

         // Precision
         $fn=50;

         mxBoltHexagonalThreaded( M6() );

         Bingo: I receive an error message, which refers to

         ERROR: Parser error in file
         "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad",
         *line 507*: syntax error

         within this file I can find a function at line 507:

         function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text);



         And now I am at the end with my small IT latin :-( and I
         end with the question: "what is the most easiest way to
         create nuts and bolts. I do not want to create exotic
         stuff, only the basics... ??? many thanks for your help Karl

         _______________________________________________
         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 todiscuss-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 todiscuss-leave@lists.openscad.org

Dear Adrian By now I am not making anything. I learn and try and so I have my troubles. But many thanks to your help. 1) I would prefer to use the screw function.. but this ends at M12.. And I would like to make larger threads and nuts 2) so, due my humble understanding I have to use the "threaded_rod" function :-( About that I am very sad, as e.g. the tolerance, the head and some other parameters do not exist for this function. Please peg me, if I use wrong termini technici... 3) I will use my tools only for 3D-Printing and there I only use PLA or PETG. No massive force, only bla bla to connect quick and easy. High pitch, big diameter, sometimes with a hole, sometimes with an head - very very less tolerance. What does the community thing about this demands? Thanks Karl Am 05.04.23 um 15:20 schrieb Adrian Mariano: > You have not given any allowance of space between the parts.  Real > screw standards will specify that the rod is undersized compared to > nominal diameter to allow for clearance so that the screw can actually > fit together.   If your printer was VERY accurate you might get away > with the .05 allowance you're introducing using the $slop parameter, > maybe.  But you might try printing test pieces that are simple > cylinders and holes to get a feeling for what kind of clearance you > need. I'm not quite sure what you're trying to make, but it looks sort > of like an oversized 1/2-13 bolt, so if a 1/2-13 would suffice you > could also try screw("1/2-13,1/2") which might get you off to a better > start.  If you set the tolerance to the loosest option (1A for bolts, > 1B for nuts) and a $slop suitable for your printer the parts should > fit easily.  (The loose tolerance is in fact loose enough that I > believe on my MK3S, the parts fit with a $slop of zero.) > > Note that clearance and slop are meant to be two different concepts:  > clearance is the actual space between parts, whereas slop is an > adjustment for inaccuracy of the printer. Correct setting of $slop is > intended to produce parts that are the exactly specified size.  But > you can abuse $slop to introduce clearance so the parts fit.  If you > want to do that, probably trying 0.2 is a reasonable starting point. > > > > On Wed, Apr 5, 2023 at 3:12 AM Karl Exler <karl.exler@meinklang.cc> wrote: > > Dear Gentlemen > Due to your help I made big advances yesterday and I produced my > first set of screw and nut today: (jupidoo) > > threaded_rod(d = 13.65, l = 12.45, pitch = 7.82/4, anchor=BOT, > bevel = true, $fn = 64); > threaded_nut(nutwidth=17, anchor=BOT, id=13.65, h=5, pitch=7.82/4, > $slop=0.05, $fa=1, $fs=1); > > And -as expected- it doesn work at the first time. It is really > perfect, but too narrow. > > Is it d and id?? I took the same values, but I guess, that was not > so good. Is there a factor with whoch I have to make the "id" > smaller than "d" ? > Many thanks > Karl > > Am 04.04.23 um 13:12 schrieb nop head: >> The line you showed has a function literal in it, so you need at >> least the latest release of OpenSCAD because it is a fairly >> recent addition. >> >> >> On Tue, 4 Apr 2023 at 11:17, Adrian Mariano <avm4@cornell.edu> wrote: >> >> Why do libraries make you really nervous? BOSL2 can create >> nuts and bolts with a single library.   If you want to use >> list-comprehension-demos you need a version that's been >> patched to work with recent copies of OpenSCAD.  Your error >> message above suggests that your OpenSCAD might be too old >> for the library you're trying to use.  (The line 507 looks >> OK, but has a function literal, which I think requires 2021.01. >> >> BOSL2: https://github.com/revarbat/BOSL2/wiki/screws.scad >> >> Another solution is threadlib: >> https://github.com/adrianschlatter/threadlib, which also >> depends on several other things, but not agent-scad >> >> On Tue, Apr 4, 2023 at 5:32 AM Karl Exler >> <karl.exler@meinklang.cc> wrote: >> >> Gentlemen! For me as novice it is really hard to create >> nuts and bolts. All the "/libraries/" and "/includes/" >> and "/use/"... that makes me really nervous. *What I >> tried today:* >> >> went to Github and fetched >> >> * list-comprehension-demos-master.zip >> * scad-utils-master.zip >> * agent-scad.zip >> >> extracted them to ~/local/shared/OpenScad/libraries >> >> (took care that the "master" is removed) >> >> used a file from Github to create a screw, which again >> uses the above mentioned libraries: >> >> use <agentscad/mx-screw.scad> >> use <agentscad/mx-thread.scad> >> >> // Precision >> $fn=50; >> >> mxBoltHexagonalThreaded( M6() ); >> >> Bingo: I receive an error message, which refers to >> >> ERROR: Parser error in file >> "/home/karl/.local/share/OpenSCAD/libraries/agentscad/lib-screw.scad", >> *line 507*: syntax error >> >> within this file I can find a function at line 507: >> >> function alignRight(text, width) = let(padding=accumulate(function(a,n) str(a," "),width-len(text), "")) str(padding,text); >> >> >> >> And now I am at the end with my small IT latin :-( and I >> end with the question: "what is the most easiest way to >> create nuts and bolts. I do not want to create exotic >> stuff, only the basics... ??? many thanks for your help Karl >> >> _______________________________________________ >> 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 todiscuss-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 todiscuss-leave@lists.openscad.org