discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Where is "path_pos_from_start" in BOLS2 ?

AM
Adrian Mariano
Fri, Oct 14, 2022 8:02 PM

It is not so difficult to extend the tube for your particular case.  Truly
even the general case is not very difficult: you just need to extrapolate
the last segment  of p a tiny bit.  But in your case, the segments are
(almost) parallel to the x and y axes, so you can just add .01 to the
appropriate coordinate to make a p_inside shape which is a bit longer in
each direction.  It's a little bit ugly.  I wonder if it would be worth
adding a path_extrapolate function to BOSL2 for this kind of situation.
To do the general case you simply take unit(p[0]-p[1]) * tiny + p[0] to
create a new point at the start, and a similar thing at the end, where tiny
is some small number.

On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: Mr Yura Volodin yur_vol@yahoo.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?
Yes, now I use your separate code  to subtracte tubes.

Ah, I didn't notice that there was other stuff being subtracted.  In that
case, you just just use the tube() module as you were doing before, instead
of using fulltube().  I fixed tube() first before writing fulltube() as an
alternative.  (Using the approach in fulltube() is nicer if you don't need
to subtract other stuff, since you don't get z-fighting, and it should be
faster as well.)

*To really do it right, though, you should make the length of the last
segment a little longer at each end for the inside tube so the model
doesn't have z-fighting at the ends.  *

It seems complicated to extrapolate beyond bented end of tube.
In my case I increase thickness of internals HULLs and translated down a
bit.

---------- Forwarded message ----------
From: Mr Yura Volodin via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: Mr Yura Volodin yur_vol@yahoo.com
Bcc:
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?


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

It is not so difficult to extend the tube for your particular case. Truly even the general case is not very difficult: you just need to extrapolate the last segment of p a tiny bit. But in your case, the segments are (almost) parallel to the x and y axes, so you can just add .01 to the appropriate coordinate to make a p_inside shape which is a bit longer in each direction. It's a little bit ugly. I wonder if it would be worth adding a path_extrapolate function to BOSL2 for this kind of situation. To do the general case you simply take unit(p[0]-p[1]) * tiny + p[0] to create a new point at the start, and a similar thing at the end, where tiny is some small number. On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss < discuss@lists.openscad.org> wrote: > > > > ---------- Forwarded message ---------- > From: Mr Yura Volodin <yur_vol@yahoo.com> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: > Bcc: > Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) > Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? > Yes, now I use your separate code to subtracte tubes. > > * On Thursday, October 13, 2022 at 11:52:56 PM GMT+3, Adrian Mariano > <avm4@cornell.edu <avm4@cornell.edu>> wrote: * > > > *Ah, I didn't notice that there was other stuff being subtracted. In that > case, you just just use the tube() module as you were doing before, instead > of using fulltube(). I fixed tube() first before writing fulltube() as an > alternative. (Using the approach in fulltube() is nicer if you don't need > to subtract other stuff, since you don't get z-fighting, and it should be > faster as well.)* > > *To really do it right, though, you should make the length of the last > segment a little longer at each end for the inside tube so the model > doesn't have z-fighting at the ends. * > > It seems complicated to extrapolate beyond bented end of tube. > In my case I increase thickness of internals HULLs and translated down a > bit. > > > > ---------- Forwarded message ---------- > From: Mr Yura Volodin via Discuss <discuss@lists.openscad.org> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: Mr Yura Volodin <yur_vol@yahoo.com> > Bcc: > Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) > Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Sat, Oct 15, 2022 12:27 AM

Is this little longer to  do difference( )?

In these cases where the Inner and outer are same number of points,
difference ( ) command can be completely avoided and everything should be 1
polyhedron.

This make things much faster and simpler.

On Sat, 15 Oct, 2022, 1:34 am Adrian Mariano, avm4@cornell.edu wrote:

It is not so difficult to extend the tube for your particular case.  Truly
even the general case is not very difficult: you just need to extrapolate
the last segment  of p a tiny bit.  But in your case, the segments are
(almost) parallel to the x and y axes, so you can just add .01 to the
appropriate coordinate to make a p_inside shape which is a bit longer in
each direction.  It's a little bit ugly.  I wonder if it would be worth
adding a path_extrapolate function to BOSL2 for this kind of situation.
To do the general case you simply take unit(p[0]-p[1]) * tiny + p[0] to
create a new point at the start, and a similar thing at the end, where tiny
is some small number.

On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: Mr Yura Volodin yur_vol@yahoo.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?
Yes, now I use your separate code  to subtracte tubes.

Ah, I didn't notice that there was other stuff being subtracted.  In
that case, you just just use the tube() module as you were doing before,
instead of using fulltube().  I fixed tube() first before writing
fulltube() as an alternative.  (Using the approach in fulltube() is nicer
if you don't need to subtract other stuff, since you don't get z-fighting,
and it should be faster as well.)

*To really do it right, though, you should make the length of the last
segment a little longer at each end for the inside tube so the model
doesn't have z-fighting at the ends.  *

It seems complicated to extrapolate beyond bented end of tube.
In my case I increase thickness of internals HULLs and translated down a
bit.

---------- Forwarded message ----------
From: Mr Yura Volodin via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: Mr Yura Volodin yur_vol@yahoo.com
Bcc:
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?


OpenSCAD mailing list
To 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 this little longer to do difference( )? In these cases where the Inner and outer are same number of points, difference ( ) command can be completely avoided and everything should be 1 polyhedron. This make things much faster and simpler. On Sat, 15 Oct, 2022, 1:34 am Adrian Mariano, <avm4@cornell.edu> wrote: > It is not so difficult to extend the tube for your particular case. Truly > even the general case is not very difficult: you just need to extrapolate > the last segment of p a tiny bit. But in your case, the segments are > (almost) parallel to the x and y axes, so you can just add .01 to the > appropriate coordinate to make a p_inside shape which is a bit longer in > each direction. It's a little bit ugly. I wonder if it would be worth > adding a path_extrapolate function to BOSL2 for this kind of situation. > To do the general case you simply take unit(p[0]-p[1]) * tiny + p[0] to > create a new point at the start, and a similar thing at the end, where tiny > is some small number. > > > On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss < > discuss@lists.openscad.org> wrote: > >> >> >> >> ---------- Forwarded message ---------- >> From: Mr Yura Volodin <yur_vol@yahoo.com> >> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> >> Cc: >> Bcc: >> Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) >> Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? >> Yes, now I use your separate code to subtracte tubes. >> >> * On Thursday, October 13, 2022 at 11:52:56 PM GMT+3, Adrian Mariano >> <avm4@cornell.edu <avm4@cornell.edu>> wrote: * >> >> >> *Ah, I didn't notice that there was other stuff being subtracted. In >> that case, you just just use the tube() module as you were doing before, >> instead of using fulltube(). I fixed tube() first before writing >> fulltube() as an alternative. (Using the approach in fulltube() is nicer >> if you don't need to subtract other stuff, since you don't get z-fighting, >> and it should be faster as well.)* >> >> *To really do it right, though, you should make the length of the last >> segment a little longer at each end for the inside tube so the model >> doesn't have z-fighting at the ends. * >> >> It seems complicated to extrapolate beyond bented end of tube. >> In my case I increase thickness of internals HULLs and translated down a >> bit. >> >> >> >> ---------- Forwarded message ---------- >> From: Mr Yura Volodin via Discuss <discuss@lists.openscad.org> >> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> >> Cc: Mr Yura Volodin <yur_vol@yahoo.com> >> Bcc: >> Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) >> Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Sat, Oct 15, 2022 3:25 AM

You aren't paying attention.  I did it that way---combining the inner and
outer tube wall into a single polyhedron---but he is also using the
difference() operator to remove various objects that are passing through
the tube, so using a single polyhedron does not work in this case.

On Fri, Oct 14, 2022 at 8:28 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Is this little longer to  do difference( )?

In these cases where the Inner and outer are same number of points,
difference ( ) command can be completely avoided and everything should be 1
polyhedron.

This make things much faster and simpler.

On Sat, 15 Oct, 2022, 1:34 am Adrian Mariano, avm4@cornell.edu wrote:

It is not so difficult to extend the tube for your particular case.
Truly even the general case is not very difficult: you just need to
extrapolate the last segment  of p a tiny bit.  But in your case, the
segments are (almost) parallel to the x and y axes, so you can just add .01
to the appropriate coordinate to make a p_inside shape which is a bit
longer in each direction.  It's a little bit ugly.  I wonder if it would be
worth adding a path_extrapolate function to BOSL2 for this kind of
situation.  To do the general case you simply take unit(p[0]-p[1]) * tiny

  • p[0] to create a new point at the start, and a similar thing at the end,
    where tiny is some small number.

On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: Mr Yura Volodin yur_vol@yahoo.com
To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org

Cc:
Bcc:
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?
Yes, now I use your separate code  to subtracte tubes.

Ah, I didn't notice that there was other stuff being subtracted.  In
that case, you just just use the tube() module as you were doing before,
instead of using fulltube().  I fixed tube() first before writing
fulltube() as an alternative.  (Using the approach in fulltube() is nicer
if you don't need to subtract other stuff, since you don't get z-fighting,
and it should be faster as well.)

*To really do it right, though, you should make the length of the last
segment a little longer at each end for the inside tube so the model
doesn't have z-fighting at the ends.  *

It seems complicated to extrapolate beyond bented end of tube.
In my case I increase thickness of internals HULLs and translated down
a bit.

---------- Forwarded message ----------
From: Mr Yura Volodin via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org

Cc: Mr Yura Volodin yur_vol@yahoo.com
Bcc:
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?


OpenSCAD mailing list
To 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 aren't paying attention. I did it that way---combining the inner and outer tube wall into a single polyhedron---but he is also using the difference() operator to remove various objects that are passing through the tube, so using a single polyhedron does not work in this case. On Fri, Oct 14, 2022 at 8:28 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Is this little longer to do difference( )? > > In these cases where the Inner and outer are same number of points, > difference ( ) command can be completely avoided and everything should be 1 > polyhedron. > > This make things much faster and simpler. > > On Sat, 15 Oct, 2022, 1:34 am Adrian Mariano, <avm4@cornell.edu> wrote: > >> It is not so difficult to extend the tube for your particular case. >> Truly even the general case is not very difficult: you just need to >> extrapolate the last segment of p a tiny bit. But in your case, the >> segments are (almost) parallel to the x and y axes, so you can just add .01 >> to the appropriate coordinate to make a p_inside shape which is a bit >> longer in each direction. It's a little bit ugly. I wonder if it would be >> worth adding a path_extrapolate function to BOSL2 for this kind of >> situation. To do the general case you simply take unit(p[0]-p[1]) * tiny >> + p[0] to create a new point at the start, and a similar thing at the end, >> where tiny is some small number. >> >> >> On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss < >> discuss@lists.openscad.org> wrote: >> >>> >>> >>> >>> ---------- Forwarded message ---------- >>> From: Mr Yura Volodin <yur_vol@yahoo.com> >>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org >>> > >>> Cc: >>> Bcc: >>> Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) >>> Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? >>> Yes, now I use your separate code to subtracte tubes. >>> >>> * On Thursday, October 13, 2022 at 11:52:56 PM GMT+3, Adrian Mariano >>> <avm4@cornell.edu <avm4@cornell.edu>> wrote: * >>> >>> >>> *Ah, I didn't notice that there was other stuff being subtracted. In >>> that case, you just just use the tube() module as you were doing before, >>> instead of using fulltube(). I fixed tube() first before writing >>> fulltube() as an alternative. (Using the approach in fulltube() is nicer >>> if you don't need to subtract other stuff, since you don't get z-fighting, >>> and it should be faster as well.)* >>> >>> *To really do it right, though, you should make the length of the last >>> segment a little longer at each end for the inside tube so the model >>> doesn't have z-fighting at the ends. * >>> >>> It seems complicated to extrapolate beyond bented end of tube. >>> In my case I increase thickness of internals HULLs and translated down >>> a bit. >>> >>> >>> >>> ---------- Forwarded message ---------- >>> From: Mr Yura Volodin via Discuss <discuss@lists.openscad.org> >>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org >>> > >>> Cc: Mr Yura Volodin <yur_vol@yahoo.com> >>> Bcc: >>> Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) >>> Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Sat, Oct 15, 2022 4:56 AM

OK
I missed to see there is no green color inside tube

On Sat, 15 Oct, 2022, 8:56 am Adrian Mariano, avm4@cornell.edu wrote:

You aren't paying attention.  I did it that way---combining the inner and
outer tube wall into a single polyhedron---but he is also using the
difference() operator to remove various objects that are passing through
the tube, so using a single polyhedron does not work in this case.

On Fri, Oct 14, 2022 at 8:28 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Is this little longer to  do difference( )?

In these cases where the Inner and outer are same number of points,
difference ( ) command can be completely avoided and everything should be 1
polyhedron.

This make things much faster and simpler.

On Sat, 15 Oct, 2022, 1:34 am Adrian Mariano, avm4@cornell.edu wrote:

It is not so difficult to extend the tube for your particular case.
Truly even the general case is not very difficult: you just need to
extrapolate the last segment  of p a tiny bit.  But in your case, the
segments are (almost) parallel to the x and y axes, so you can just add .01
to the appropriate coordinate to make a p_inside shape which is a bit
longer in each direction.  It's a little bit ugly.  I wonder if it would be
worth adding a path_extrapolate function to BOSL2 for this kind of
situation.  To do the general case you simply take unit(p[0]-p[1]) * tiny

  • p[0] to create a new point at the start, and a similar thing at the end,
    where tiny is some small number.

On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: Mr Yura Volodin yur_vol@yahoo.com
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc:
Bcc:
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?
Yes, now I use your separate code  to subtracte tubes.

Ah, I didn't notice that there was other stuff being subtracted.  In
that case, you just just use the tube() module as you were doing before,
instead of using fulltube().  I fixed tube() first before writing
fulltube() as an alternative.  (Using the approach in fulltube() is nicer
if you don't need to subtract other stuff, since you don't get z-fighting,
and it should be faster as well.)

*To really do it right, though, you should make the length of the last
segment a little longer at each end for the inside tube so the model
doesn't have z-fighting at the ends.  *

It seems complicated to extrapolate beyond bented end of tube.
In my case I increase thickness of internals HULLs and translated down
a bit.

---------- Forwarded message ----------
From: Mr Yura Volodin via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: Mr Yura Volodin yur_vol@yahoo.com
Bcc:
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?


OpenSCAD mailing list
To 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

OK I missed to see there is no green color inside tube On Sat, 15 Oct, 2022, 8:56 am Adrian Mariano, <avm4@cornell.edu> wrote: > You aren't paying attention. I did it that way---combining the inner and > outer tube wall into a single polyhedron---but he is also using the > difference() operator to remove various objects that are passing through > the tube, so using a single polyhedron does not work in this case. > > > > On Fri, Oct 14, 2022 at 8:28 PM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> Is this little longer to do difference( )? >> >> In these cases where the Inner and outer are same number of points, >> difference ( ) command can be completely avoided and everything should be 1 >> polyhedron. >> >> This make things much faster and simpler. >> >> On Sat, 15 Oct, 2022, 1:34 am Adrian Mariano, <avm4@cornell.edu> wrote: >> >>> It is not so difficult to extend the tube for your particular case. >>> Truly even the general case is not very difficult: you just need to >>> extrapolate the last segment of p a tiny bit. But in your case, the >>> segments are (almost) parallel to the x and y axes, so you can just add .01 >>> to the appropriate coordinate to make a p_inside shape which is a bit >>> longer in each direction. It's a little bit ugly. I wonder if it would be >>> worth adding a path_extrapolate function to BOSL2 for this kind of >>> situation. To do the general case you simply take unit(p[0]-p[1]) * tiny >>> + p[0] to create a new point at the start, and a similar thing at the end, >>> where tiny is some small number. >>> >>> >>> On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss < >>> discuss@lists.openscad.org> wrote: >>> >>>> >>>> >>>> >>>> ---------- Forwarded message ---------- >>>> From: Mr Yura Volodin <yur_vol@yahoo.com> >>>> To: OpenSCAD general discussion Mailing-list < >>>> discuss@lists.openscad.org> >>>> Cc: >>>> Bcc: >>>> Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) >>>> Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? >>>> Yes, now I use your separate code to subtracte tubes. >>>> >>>> * On Thursday, October 13, 2022 at 11:52:56 PM GMT+3, Adrian Mariano >>>> <avm4@cornell.edu <avm4@cornell.edu>> wrote: * >>>> >>>> >>>> *Ah, I didn't notice that there was other stuff being subtracted. In >>>> that case, you just just use the tube() module as you were doing before, >>>> instead of using fulltube(). I fixed tube() first before writing >>>> fulltube() as an alternative. (Using the approach in fulltube() is nicer >>>> if you don't need to subtract other stuff, since you don't get z-fighting, >>>> and it should be faster as well.)* >>>> >>>> *To really do it right, though, you should make the length of the last >>>> segment a little longer at each end for the inside tube so the model >>>> doesn't have z-fighting at the ends. * >>>> >>>> It seems complicated to extrapolate beyond bented end of tube. >>>> In my case I increase thickness of internals HULLs and translated down >>>> a bit. >>>> >>>> >>>> >>>> ---------- Forwarded message ---------- >>>> From: Mr Yura Volodin via Discuss <discuss@lists.openscad.org> >>>> To: OpenSCAD general discussion Mailing-list < >>>> discuss@lists.openscad.org> >>>> Cc: Mr Yura Volodin <yur_vol@yahoo.com> >>>> Bcc: >>>> Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) >>>> Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> To 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 >
MY
Mr Yura Volodin
Mon, Oct 17, 2022 1:08 PM
On Saturday, October 15, 2022 at 03:28:06 AM GMT+3, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:  

Is this little longer to  do difference( )?
In these cases where the Inner and outer are same number of points, difference ( ) command can be completely avoided and everything should be 1 polyhedron.
This make things much faster and simpler.

Yes if it only the goal. But in my case I need tonehole rims and other details.They must not affect internals. So I am forced to use difference()...

On Sat, 15 Oct, 2022, 1:34 am Adrian Mariano, avm4@cornell.edu wrote:

It is not so difficult to extend the tube for your particular case.  Truly even the general case is not very difficult: you just need to extrapolate the last segment  of p a tiny bit.  But in your case, the segments are (almost) parallel to the x and y axes, so you can just add .01 to the appropriate coordinate to make a p_inside shape which is a bit longer in each direction.  It's a little bit ugly.  I wonder if it would be worth adding a path_extrapolate function to BOSL2 for this kind of situation.   To do the general case you simply take unit(p[0]-p[1]) * tiny + p[0] to create a new point at the start, and a similar thing at the end, where tiny is some small number. 

On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss discuss@lists.openscad.org wrote:

---------- Forwarded message ----------
From: Mr Yura Volodin yur_vol@yahoo.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: 
Bcc: 
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?
Yes, now I use your separate code  to subtracte tubes.
On Thursday, October 13, 2022 at 11:52:56 PM GMT+3, Adrian Mariano avm4@cornell.edu wrote:

Ah, I didn't notice that there was other stuff being subtracted.  In that case, you just just use the tube() module as you were doing before, instead of using fulltube().   I fixed tube() first before writing fulltube() as an alternative.   (Using the approach in fulltube() is nicer if you don't need to subtract other stuff, since you don't get z-fighting, and it should be faster as well.)

To really do it right, though, you should make the length of the last segment a little longer at each end for the inside tube so the model doesn't have z-fighting at the ends. 

It seems complicated to extrapolate beyond bented end of tube. In my case I increase thickness of internals HULLs and translated down a bit.

---------- Forwarded message ----------
From: Mr Yura Volodin via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: Mr Yura Volodin yur_vol@yahoo.com
Bcc: 
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?


OpenSCAD mailing list
To 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

>>>>> On Saturday, October 15, 2022 at 03:28:06 AM GMT+3, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: Is this little longer to  do difference( )? In these cases where the Inner and outer are same number of points, difference ( ) command can be completely avoided and everything should be 1 polyhedron. This make things much faster and simpler. Yes if it only the goal. But in my case I need tonehole rims and other details.They must not affect internals. So I am forced to use difference()... On Sat, 15 Oct, 2022, 1:34 am Adrian Mariano, <avm4@cornell.edu> wrote: It is not so difficult to extend the tube for your particular case.  Truly even the general case is not very difficult: you just need to extrapolate the last segment  of p a tiny bit.  But in your case, the segments are (almost) parallel to the x and y axes, so you can just add .01 to the appropriate coordinate to make a p_inside shape which is a bit longer in each direction.  It's a little bit ugly.  I wonder if it would be worth adding a path_extrapolate function to BOSL2 for this kind of situation.   To do the general case you simply take unit(p[0]-p[1]) * tiny + p[0] to create a new point at the start, and a similar thing at the end, where tiny is some small number.  On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss <discuss@lists.openscad.org> wrote: ---------- Forwarded message ---------- From: Mr Yura Volodin <yur_vol@yahoo.com> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> Cc:  Bcc:  Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? Yes, now I use your separate code  to subtracte tubes. On Thursday, October 13, 2022 at 11:52:56 PM GMT+3, Adrian Mariano <avm4@cornell.edu> wrote: Ah, I didn't notice that there was other stuff being subtracted.  In that case, you just just use the tube() module as you were doing before, instead of using fulltube().   I fixed tube() first before writing fulltube() as an alternative.   (Using the approach in fulltube() is nicer if you don't need to subtract other stuff, since you don't get z-fighting, and it should be faster as well.) To really do it right, though, you should make the length of the last segment a little longer at each end for the inside tube so the model doesn't have z-fighting at the ends.  It seems complicated to extrapolate beyond bented end of tube. In my case I increase thickness of internals HULLs and translated down a bit. ---------- Forwarded message ---------- From: Mr Yura Volodin via Discuss <discuss@lists.openscad.org> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> Cc: Mr Yura Volodin <yur_vol@yahoo.com> Bcc:  Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? _______________________________________________ OpenSCAD mailing list To 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
MY
Mr Yura Volodin
Mon, Oct 17, 2022 1:12 PM

I solved it playing with thickness of hull's cylinders.
Much more interesting is to get constant wall thickness. We need to calculate derivative from diameter curve and increase thinkness correspondently.
Usually thickness difference not very noticable but except flare. I am thinking how to do better.
On Friday, October 14, 2022 at 11:03:19 PM GMT+3, Adrian Mariano avm4@cornell.edu wrote:

It is not so difficult to extend the tube for your particular case.  Truly even the general case is not very difficult: you just need to extrapolate the last segment  of p a tiny bit.  But in your case, the segments are (almost) parallel to the x and y axes, so you can just add .01 to the appropriate coordinate to make a p_inside shape which is a bit longer in each direction.  It's a little bit ugly.  I wonder if it would be worth adding a path_extrapolate function to BOSL2 for this kind of situation.   To do the general case you simply take unit(p[0]-p[1]) * tiny + p[0] to create a new point at the start, and a similar thing at the end, where tiny is some small number. 

On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss discuss@lists.openscad.org wrote:

---------- Forwarded message ----------
From: Mr Yura Volodin yur_vol@yahoo.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: 
Bcc: 
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?
Yes, now I use your separate code  to subtracte tubes.
On Thursday, October 13, 2022 at 11:52:56 PM GMT+3, Adrian Mariano avm4@cornell.edu wrote:

Ah, I didn't notice that there was other stuff being subtracted.  In that case, you just just use the tube() module as you were doing before, instead of using fulltube().   I fixed tube() first before writing fulltube() as an alternative.   (Using the approach in fulltube() is nicer if you don't need to subtract other stuff, since you don't get z-fighting, and it should be faster as well.)

To really do it right, though, you should make the length of the last segment a little longer at each end for the inside tube so the model doesn't have z-fighting at the ends. 

It seems complicated to extrapolate beyond bented end of tube. In my case I increase thickness of internals HULLs and translated down a bit.

---------- Forwarded message ----------
From: Mr Yura Volodin via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: Mr Yura Volodin yur_vol@yahoo.com
Bcc: 
Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC)
Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ?


OpenSCAD mailing list
To 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 solved it playing with thickness of hull's cylinders. Much more interesting is to get constant wall thickness. We need to calculate derivative from diameter curve and increase thinkness correspondently. Usually thickness difference not very noticable but except flare. I am thinking how to do better. On Friday, October 14, 2022 at 11:03:19 PM GMT+3, Adrian Mariano <avm4@cornell.edu> wrote: It is not so difficult to extend the tube for your particular case.  Truly even the general case is not very difficult: you just need to extrapolate the last segment  of p a tiny bit.  But in your case, the segments are (almost) parallel to the x and y axes, so you can just add .01 to the appropriate coordinate to make a p_inside shape which is a bit longer in each direction.  It's a little bit ugly.  I wonder if it would be worth adding a path_extrapolate function to BOSL2 for this kind of situation.   To do the general case you simply take unit(p[0]-p[1]) * tiny + p[0] to create a new point at the start, and a similar thing at the end, where tiny is some small number.  On Fri, Oct 14, 2022 at 10:13 AM Mr Yura Volodin via Discuss <discuss@lists.openscad.org> wrote: ---------- Forwarded message ---------- From: Mr Yura Volodin <yur_vol@yahoo.com> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> Cc:  Bcc:  Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? Yes, now I use your separate code  to subtracte tubes. On Thursday, October 13, 2022 at 11:52:56 PM GMT+3, Adrian Mariano <avm4@cornell.edu> wrote: Ah, I didn't notice that there was other stuff being subtracted.  In that case, you just just use the tube() module as you were doing before, instead of using fulltube().   I fixed tube() first before writing fulltube() as an alternative.   (Using the approach in fulltube() is nicer if you don't need to subtract other stuff, since you don't get z-fighting, and it should be faster as well.) To really do it right, though, you should make the length of the last segment a little longer at each end for the inside tube so the model doesn't have z-fighting at the ends.  It seems complicated to extrapolate beyond bented end of tube. In my case I increase thickness of internals HULLs and translated down a bit. ---------- Forwarded message ---------- From: Mr Yura Volodin via Discuss <discuss@lists.openscad.org> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> Cc: Mr Yura Volodin <yur_vol@yahoo.com> Bcc:  Date: Fri, 14 Oct 2022 14:12:38 +0000 (UTC) Subject: [OpenSCAD] Re: Where is "path_pos_from_start" in BOLS2 ? _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org