discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

path extrude

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.