discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

cinquefoil torus knot in openSCAD

LH
Lenore Horner
Wed, May 31, 2023 10:42 AM

If step is set to 0.003, there's a gap in the figure.  0.002 and 0.001 go back to no gap.  That's all I tried.  The difference is that 0.003 doesn't fit evenly into 1 so the for loop needs to be adjusted to compensate.
Lenore

On May 30, 2023, at 22:39, Adrian Mariano avm4@cornell.edu wrote:

include<BOSL2/std.scad>
$fn=32;

d = 10;
R = 27;
rr = 10;
n = 5;
step=0.005;

function onept(t) =
let(
r = R + rrsin (n360t),
x = r * sin (t * 2 * 360),
y = r * cos (t * 2 * 360),
z = rr * cos (n
360*t)
)
[x,y,z];

path = [for(t=[0:step:1]) onept(t)];

path_sweep(circle(d=d), path);

If step is set to 0.003, there's a gap in the figure. 0.002 and 0.001 go back to no gap. That's all I tried. The difference is that 0.003 doesn't fit evenly into 1 so the for loop needs to be adjusted to compensate. Lenore > On May 30, 2023, at 22:39, Adrian Mariano <avm4@cornell.edu> wrote: > > include<BOSL2/std.scad> > $fn=32; > > d = 10; > R = 27; > rr = 10; > n = 5; > step=0.005; > > function onept(t) = > let( > r = R + rr*sin (n*360*t), > x = r * sin (t * 2 * 360), > y = r * cos (t * 2 * 360), > z = rr * cos (n*360*t) > ) > [x,y,z]; > > path = [for(t=[0:step:1]) onept(t)]; > > path_sweep(circle(d=d), path);
AM
Adrian Mariano
Wed, May 31, 2023 11:22 AM

It will look better if the step size evenly divides the range, but if you
really want to use a stepsize that does not, add closed=true to the
path_sweep call in order to close the shape.  That will eliminate the gap.

On Wed, May 31, 2023 at 6:43 AM Lenore Horner lenorehorner@sbcglobal.net
wrote:

If step is set to 0.003, there's a gap in the figure.  0.002 and 0.001 go
back to no gap.  That's all I tried.  The difference is that 0.003 doesn't
fit evenly into 1 so the for loop needs to be adjusted to compensate.
Lenore

On May 30, 2023, at 22:39, Adrian Mariano avm4@cornell.edu wrote:

include<BOSL2/std.scad>
$fn=32;

d = 10;
R = 27;
rr = 10;
n = 5;
step=0.005;

function onept(t) =
let(
r = R + rrsin (n360t),
x = r * sin (t * 2 * 360),
y = r * cos (t * 2 * 360),
z = rr * cos (n
360*t)
)
[x,y,z];

path = [for(t=[0:step:1]) onept(t)];

path_sweep(circle(d=d), path);


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

It will look better if the step size evenly divides the range, but if you really want to use a stepsize that does not, add closed=true to the path_sweep call in order to close the shape. That will eliminate the gap. On Wed, May 31, 2023 at 6:43 AM Lenore Horner <lenorehorner@sbcglobal.net> wrote: > If step is set to 0.003, there's a gap in the figure. 0.002 and 0.001 go > back to no gap. That's all I tried. The difference is that 0.003 doesn't > fit evenly into 1 so the for loop needs to be adjusted to compensate. > Lenore > > On May 30, 2023, at 22:39, Adrian Mariano <avm4@cornell.edu> wrote: > > include<BOSL2/std.scad> > $fn=32; > > d = 10; > R = 27; > rr = 10; > n = 5; > step=0.005; > > function onept(t) = > let( > r = R + rr*sin (n*360*t), > x = r * sin (t * 2 * 360), > y = r * cos (t * 2 * 360), > z = rr * cos (n*360*t) > ) > [x,y,z]; > > path = [for(t=[0:step:1]) onept(t)]; > > path_sweep(circle(d=d), path); > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
K
Ken
Wed, May 31, 2023 1:34 PM

Adrian, I added closed=true and it threw up a syntax error. So I updated
my bosl2 from github- no difference. If I change it to closed=false it's
happy, but it won't work with closed=false.
Any ideas?

On 2023-05-31 21:22, Adrian Mariano wrote:

It will look better if the step size evenly divides the range, but if
you really want to use a stepsize that does not, add closed=true to
the path_sweep call in order to close the shape.  That will eliminate
the gap.

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!

Adrian, I added closed=true and it threw up a syntax error. So I updated my bosl2 from github- no difference. If I change it to closed=false it's happy, but it won't work with closed=false. Any ideas? On 2023-05-31 21:22, Adrian Mariano wrote: > It will look better if the step size evenly divides the range, but if > you really want to use a stepsize that does not, add closed=true to > the path_sweep call in order to close the shape.  That will eliminate > the gap. > > -- Cheers, Ken bats059@gmail.com https://vk7krj.com https://vk7krj.com/running.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Your job as parents is to teach them to control all three. My job as a grandad is to tell you how you are doing it all wrong!
LH
Lenore Horner
Wed, May 31, 2023 1:57 PM

I got an error when I used closed=true with a step that divides evenly into 1 but when the step doesn't divide evenly into 1 the closed=true works (no error message and no gap in the structure).
Lenore

On May 31, 2023, at 09:34, Ken bats059@gmail.com wrote:

Adrian, I added closed=true and it threw up a syntax error. So I updated my bosl2 from github- no difference. If I change it to closed=false it's happy, but it won't work with closed=false.
Any ideas?

On 2023-05-31 21:22, Adrian Mariano wrote:

It will look better if the step size evenly divides the range, but if you really want to use a stepsize that does not, add closed=true to the path_sweep call in order to close the shape.  That will eliminate the gap.

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!


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

I got an error when I used closed=true with a step that divides evenly into 1 but when the step doesn't divide evenly into 1 the closed=true works (no error message and no gap in the structure). Lenore > On May 31, 2023, at 09:34, Ken <bats059@gmail.com> wrote: > > Adrian, I added closed=true and it threw up a syntax error. So I updated my bosl2 from github- no difference. If I change it to closed=false it's happy, but it won't work with closed=false. > Any ideas? > > On 2023-05-31 21:22, Adrian Mariano wrote: >> It will look better if the step size evenly divides the range, but if you really want to use a stepsize that does not, add closed=true to the path_sweep call in order to close the shape. That will eliminate the gap. >> >> > > -- > Cheers, Ken > bats059@gmail.com > https://vk7krj.com > https://vk7krj.com/running.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Your job as parents is to teach them to control all three. > My job as a grandad is to tell you how you are doing it all wrong! > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
K
Ken
Wed, May 31, 2023 3:30 PM

Thanks Lenore, that fixed it.

On 2023-05-31 23:57, Lenore Horner wrote:

I got an error when I used closed=true with a step that divides evenly into 1 but when the step doesn't divide evenly into 1 the closed=true works (no error message and no gap in the structure).
Lenore

On May 31, 2023, at 09:34, Kenbats059@gmail.com  wrote:

Adrian, I added closed=true and it threw up a syntax error. So I updated my bosl2 from github- no difference. If I change it to closed=false it's happy, but it won't work with closed=false.
Any ideas?

On 2023-05-31 21:22, Adrian Mariano wrote:

It will look better if the step size evenly divides the range, but if you really want to use a stepsize that does not, add closed=true to the path_sweep call in order to close the shape.  That will eliminate the gap.

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!


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

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!

Thanks Lenore, that fixed it. On 2023-05-31 23:57, Lenore Horner wrote: > I got an error when I used closed=true with a step that divides evenly into 1 but when the step doesn't divide evenly into 1 the closed=true works (no error message and no gap in the structure). > Lenore > >> On May 31, 2023, at 09:34, Ken<bats059@gmail.com> wrote: >> >> Adrian, I added closed=true and it threw up a syntax error. So I updated my bosl2 from github- no difference. If I change it to closed=false it's happy, but it won't work with closed=false. >> Any ideas? >> >> On 2023-05-31 21:22, Adrian Mariano wrote: >>> It will look better if the step size evenly divides the range, but if you really want to use a stepsize that does not, add closed=true to the path_sweep call in order to close the shape. That will eliminate the gap. >>> >>> >> -- >> Cheers, Ken >> bats059@gmail.com >> https://vk7krj.com >> https://vk7krj.com/running.html >> ---------------------------------------- >> A baby can be defined as an ego with a noise at one end and a smell at the other. >> Your job as parents is to teach them to control all three. >> My job as a grandad is to tell you how you are doing it all wrong! >> _______________________________________________ >> 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 -- Cheers, Ken bats059@gmail.com https://vk7krj.com https://vk7krj.com/running.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Your job as parents is to teach them to control all three. My job as a grandad is to tell you how you are doing it all wrong!
SP
Sanjeev Prabhakar
Wed, May 31, 2023 4:16 PM

path=[for(t=[0:359])
[10cos(2t)(3+cos(11t)),
10sin(2t)(3+cos(11t)),
10sin(11t) ]];

keep increasing the number 5t -> 7t ->11*t and you can see more
interesting knots

On Sat, 27 May 2023, 19:00 Sanjeev Prabhakar, sprabhakar2006@gmail.com
wrote:

hull is not very neat in this case

for finer models you would need some modules like path_extrude, which
extrudes the circular section along the path.

long back i wrote this function which is in the file dependencies.scad
now mostly i work in python
if you try that, it would be a very smooth knot:

include<dependencies.scad>

path=[for(t=[0:359])
[10cos(2t)(3+cos(5t)),
10sin(2t)(3+cos(5t)),
10sin(5t) ]];

sec=circle(4);

sol=path_extrudec(sec,path); // extrudec means closed extrusion
swp(sol); // module to render the extruded solid "sweep"

On Sat, 27 May 2023 at 18:27, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Sat, May 27, 2023 at 01:36:39PM +0100, terrypingm@gmail.com wrote:

Brilliant, can’t wait to see how it’s done!

My code is 400 times smaller (*):


d = 10;

R = 27;
rr = 10;
n = 5;

module onesphere (t)
{
r = R + rrsin (n360t);
x = r * sin (t * 2 * 360);
y = r * cos (t * 2 * 360);
z = rr * cos (n
360*t);
translate ([x,y,z]) sphere (d=d);
}

step=0.005;

for (t = [0:step:1]) {
hull () {
onesphere (t);
onesphere (t+step);
}
}

(less typing, i'd say :-) )

(Try n=3, 7, and 9 too! )

     Roger.

(*) Measured BEFORE I made it generic for n=...)

BTW, I’d expect it will be interesting to MANY not FEW. ;-)

--
Terry

On 27 May 2023, at 12:46, Sanjeev Prabhakar sprabhakar2006@gmail.com

wrote:


I thought this would be interesting for few of you

scad file can be downloaded from here:

<Screenshot 2023-05-27 at 5.03.47 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

--
** 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

path=[for(t=[0:359]) [10*cos(2*t)*(3+cos(11*t)), 10*sin(2*t)*(3+cos(11*t)), 10*sin(11*t) ]]; keep increasing the number 5*t -> 7*t ->11*t and you can see more interesting knots On Sat, 27 May 2023, 19:00 Sanjeev Prabhakar, <sprabhakar2006@gmail.com> wrote: > hull is not very neat in this case > > for finer models you would need some modules like path_extrude, which > extrudes the circular section along the path. > > long back i wrote this function which is in the file dependencies.scad > now mostly i work in python > if you try that, it would be a very smooth knot: > > include<dependencies.scad> > > path=[for(t=[0:359]) > [10*cos(2*t)*(3+cos(5*t)), > 10*sin(2*t)*(3+cos(5*t)), > 10*sin(5*t) ]]; > > sec=circle(4); > > sol=path_extrudec(sec,path); // extrudec means closed extrusion > swp(sol); // module to render the extruded solid "sweep" > > > > > On Sat, 27 May 2023 at 18:27, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > >> On Sat, May 27, 2023 at 01:36:39PM +0100, terrypingm@gmail.com wrote: >> > Brilliant, can’t wait to see how it’s done! >> >> My code is 400 times smaller (*): >> >> --------------------------- >> d = 10; >> >> R = 27; >> rr = 10; >> n = 5; >> >> module onesphere (t) >> { >> r = R + rr*sin (n*360*t); >> x = r * sin (t * 2 * 360); >> y = r * cos (t * 2 * 360); >> z = rr * cos (n*360*t); >> translate ([x,y,z]) sphere (d=d); >> } >> >> step=0.005; >> >> for (t = [0:step:1]) { >> hull () { >> onesphere (t); >> onesphere (t+step); >> } >> } >> ------------------------------- >> >> (less typing, i'd say :-) ) >> >> (Try n=3, 7, and 9 too! ) >> >> Roger. >> >> (*) Measured BEFORE I made it generic for n=...) >> >> > >> > BTW, I’d expect it will be interesting to MANY not FEW. ;-) >> > >> > -- >> > Terry >> > >> > On 27 May 2023, at 12:46, Sanjeev Prabhakar <sprabhakar2006@gmail.com> >> wrote: >> > >> >  >> > I thought this would be interesting for few of you >> > >> > scad file can be downloaded from here: >> > >> https://github.com/sprabhakar2006/openSCAD/blob/main/cinquefoil%20torus%20knot.scad >> > >> > <Screenshot 2023-05-27 at 5.03.47 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 >> >> >> -- >> ** 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 >> >
SP
Sanjeev Prabhakar
Wed, May 31, 2023 5:35 PM

more generally the equation will be of the form

a=6;
p=6;
q=11;

path=[for(t=[0:359])
[10cos(pt)(a+cos(qt)),
10sin(pt)(a+cos(qt)),
-10sin(qt)] ];

you can vary the values of a, p and q

with above values of a,p and q the result is attached

more generally the equation will be of the form a=6; p=6; q=11; path=[for(t=[0:359]) [10*cos(p*t)*(a+cos(q*t)), 10*sin(p*t)*(a+cos(q*t)), -10*sin(q*t)] ]; you can vary the values of a, p and q with above values of a,p and q the result is attached
DP
David Phillip Oster
Wed, May 31, 2023 5:42 PM

I've been having a lot of fun playing around in Customizer:

// Sanjeev Prabhakar via emwd.com 5/27/2023

include<dependencies.scad>

// 1 for single twist, 2 for double, 3 for triple was:2 good: 5

alp = 2;

// larger increases radius of the 'ring' was:3 good: 4

plu = 3;

// was: 5 larger is number of minor 'cycles' around the 'torus' good: 13

mul = 5;

sec = circle(4);

path2 = [for(t=[0:359])

[10cos(alpt)(plu+cos(mult)),

10sin(alpt)(plu+cos(mult)),

10sin(mult) ]];

sol2 = path_extrudec(sec, path2); // extrudec means closed extrusion

swp(sol2); // module to render the extruded solid "sweep"

On Wed, May 31, 2023 at 9:18 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

path=[for(t=[0:359])
[10cos(2t)(3+cos(11t)),
10sin(2t)(3+cos(11t)),
10sin(11t) ]];

keep increasing the number 5t -> 7t ->11*t and you can see more
interesting knots

On Sat, 27 May 2023, 19:00 Sanjeev Prabhakar, sprabhakar2006@gmail.com
wrote:

hull is not very neat in this case

for finer models you would need some modules like path_extrude, which
extrudes the circular section along the path.

long back i wrote this function which is in the file dependencies.scad
now mostly i work in python
if you try that, it would be a very smooth knot:

include<dependencies.scad>

path=[for(t=[0:359])
[10cos(2t)(3+cos(5t)),
10sin(2t)(3+cos(5t)),
10sin(5t) ]];

sec=circle(4);

sol=path_extrudec(sec,path); // extrudec means closed extrusion
swp(sol); // module to render the extruded solid "sweep"

On Sat, 27 May 2023 at 18:27, Rogier Wolff R.E.Wolff@bitwizard.nl
wrote:

On Sat, May 27, 2023 at 01:36:39PM +0100, terrypingm@gmail.com wrote:

Brilliant, can’t wait to see how it’s done!

My code is 400 times smaller (*):


d = 10;

R = 27;
rr = 10;
n = 5;

module onesphere (t)
{
r = R + rrsin (n360t);
x = r * sin (t * 2 * 360);
y = r * cos (t * 2 * 360);
z = rr * cos (n
360*t);
translate ([x,y,z]) sphere (d=d);
}

step=0.005;

for (t = [0:step:1]) {
hull () {
onesphere (t);
onesphere (t+step);
}
}

(less typing, i'd say :-) )

(Try n=3, 7, and 9 too! )

     Roger.

(*) Measured BEFORE I made it generic for n=...)

BTW, I’d expect it will be interesting to MANY not FEW. ;-)

--
Terry

On 27 May 2023, at 12:46, Sanjeev Prabhakar sprabhakar2006@gmail.com

wrote:


I thought this would be interesting for few of you

scad file can be downloaded from here:

<Screenshot 2023-05-27 at 5.03.47 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

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


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


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

I've been having a lot of fun playing around in Customizer: // Sanjeev Prabhakar via emwd.com 5/27/2023 include<dependencies.scad> // 1 for single twist, 2 for double, 3 for triple was:2 good: 5 alp = 2; // larger increases radius of the 'ring' was:3 good: 4 plu = 3; // was: 5 larger is number of minor 'cycles' around the 'torus' good: 13 mul = 5; sec = circle(4); path2 = [for(t=[0:359]) [10*cos(alp*t)*(plu+cos(mul*t)), 10*sin(alp*t)*(plu+cos(mul*t)), 10*sin(mul*t) ]]; sol2 = path_extrudec(sec, path2); // extrudec means closed extrusion swp(sol2); // module to render the extruded solid "sweep" On Wed, May 31, 2023 at 9:18 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > path=[for(t=[0:359]) > [10*cos(2*t)*(3+cos(11*t)), > 10*sin(2*t)*(3+cos(11*t)), > 10*sin(11*t) ]]; > > keep increasing the number 5*t -> 7*t ->11*t and you can see more > interesting knots > > > > On Sat, 27 May 2023, 19:00 Sanjeev Prabhakar, <sprabhakar2006@gmail.com> > wrote: > >> hull is not very neat in this case >> >> for finer models you would need some modules like path_extrude, which >> extrudes the circular section along the path. >> >> long back i wrote this function which is in the file dependencies.scad >> now mostly i work in python >> if you try that, it would be a very smooth knot: >> >> include<dependencies.scad> >> >> path=[for(t=[0:359]) >> [10*cos(2*t)*(3+cos(5*t)), >> 10*sin(2*t)*(3+cos(5*t)), >> 10*sin(5*t) ]]; >> >> sec=circle(4); >> >> sol=path_extrudec(sec,path); // extrudec means closed extrusion >> swp(sol); // module to render the extruded solid "sweep" >> >> >> >> >> On Sat, 27 May 2023 at 18:27, Rogier Wolff <R.E.Wolff@bitwizard.nl> >> wrote: >> >>> On Sat, May 27, 2023 at 01:36:39PM +0100, terrypingm@gmail.com wrote: >>> > Brilliant, can’t wait to see how it’s done! >>> >>> My code is 400 times smaller (*): >>> >>> --------------------------- >>> d = 10; >>> >>> R = 27; >>> rr = 10; >>> n = 5; >>> >>> module onesphere (t) >>> { >>> r = R + rr*sin (n*360*t); >>> x = r * sin (t * 2 * 360); >>> y = r * cos (t * 2 * 360); >>> z = rr * cos (n*360*t); >>> translate ([x,y,z]) sphere (d=d); >>> } >>> >>> step=0.005; >>> >>> for (t = [0:step:1]) { >>> hull () { >>> onesphere (t); >>> onesphere (t+step); >>> } >>> } >>> ------------------------------- >>> >>> (less typing, i'd say :-) ) >>> >>> (Try n=3, 7, and 9 too! ) >>> >>> Roger. >>> >>> (*) Measured BEFORE I made it generic for n=...) >>> >>> > >>> > BTW, I’d expect it will be interesting to MANY not FEW. ;-) >>> > >>> > -- >>> > Terry >>> > >>> > On 27 May 2023, at 12:46, Sanjeev Prabhakar <sprabhakar2006@gmail.com> >>> wrote: >>> > >>> >  >>> > I thought this would be interesting for few of you >>> > >>> > scad file can be downloaded from here: >>> > >>> https://github.com/sprabhakar2006/openSCAD/blob/main/cinquefoil%20torus%20knot.scad >>> > >>> > <Screenshot 2023-05-27 at 5.03.47 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 >>> >>> >>> -- >>> ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** >>> +31-15-2049110 ** >>> ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 >>> ** >>> f equals m times a. When your f is steady, and your m is going down >>> your a is going up. -- Chris Hadfield about flying up the space shuttle. >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Rogier Wolff
Thu, Jun 1, 2023 11:40 AM

On Wed, May 31, 2023 at 07:22:47AM -0400, Adrian Mariano wrote:

It will look better if the step size evenly divides the range, but if you
really want to use a stepsize that does not, add closed=true to the
path_sweep call in order to close the shape.  That will eliminate the gap.

If step is set to 0.003, there's a gap in the figure.  0.002 and 0.001 go
back to no gap.  That's all I tried.  The difference is that 0.003 doesn't
fit evenly into 1 so the for loop needs to be adjusted to compensate.

If you start out with:

numsteps = 200;
step = 1/numsteps;

it'll be obvious if you put in a non-integer.

Roger. 

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

On Wed, May 31, 2023 at 07:22:47AM -0400, Adrian Mariano wrote: > It will look better if the step size evenly divides the range, but if you > really want to use a stepsize that does not, add closed=true to the > path_sweep call in order to close the shape. That will eliminate the gap. > > If step is set to 0.003, there's a gap in the figure. 0.002 and 0.001 go > > back to no gap. That's all I tried. The difference is that 0.003 doesn't > > fit evenly into 1 so the for loop needs to be adjusted to compensate. If you start out with: numsteps = 200; step = 1/numsteps; it'll be obvious if you put in a non-integer. Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
SP
Sanjeev Prabhakar
Wed, Jun 7, 2023 4:36 PM

refer to the file attached
added some explanation
this is quite interesting
[image: Screenshot 2023-06-07 at 10.01.40 PM.png]

On Thu, 1 Jun 2023 at 17:11, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Wed, May 31, 2023 at 07:22:47AM -0400, Adrian Mariano wrote:

It will look better if the step size evenly divides the range, but if you
really want to use a stepsize that does not, add closed=true to the
path_sweep call in order to close the shape.  That will eliminate the

gap.

If step is set to 0.003, there's a gap in the figure.  0.002 and 0.001

go

back to no gap.  That's all I tried.  The difference is that 0.003

doesn't

fit evenly into 1 so the for loop needs to be adjusted to compensate.

If you start out with:

numsteps = 200;
step = 1/numsteps;

it'll be obvious if you put in a non-integer.

     Roger.

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


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

refer to the file attached added some explanation this is quite interesting [image: Screenshot 2023-06-07 at 10.01.40 PM.png] On Thu, 1 Jun 2023 at 17:11, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > On Wed, May 31, 2023 at 07:22:47AM -0400, Adrian Mariano wrote: > > It will look better if the step size evenly divides the range, but if you > > really want to use a stepsize that does not, add closed=true to the > > path_sweep call in order to close the shape. That will eliminate the > gap. > > > > If step is set to 0.003, there's a gap in the figure. 0.002 and 0.001 > go > > > back to no gap. That's all I tried. The difference is that 0.003 > doesn't > > > fit evenly into 1 so the for loop needs to be adjusted to compensate. > > If you start out with: > > numsteps = 200; > step = 1/numsteps; > > it'll be obvious if you put in a non-integer. > > Roger. > > -- > ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 > ** > ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** > f equals m times a. When your f is steady, and your m is going down > your a is going up. -- Chris Hadfield about flying up the space shuttle. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >