Hi,

Guest

JJ

Julien Jacquet

Thu, May 12, 2022 2:20 PM

Hello,

I am stuck to build a twisted prism

https://www.polyhedra.net/en/pictures.php?type=twisted-prisms

I was thinking of just using :

linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)

```
circle(r=10,$fn=5);
```

But the result is not correct. I can't find a simple solution. In fact I

found files that were functional (with slices=1) before I updated OpenSCAD,

has there been a change since?

Is it possible?

Thanks for your help!

Hello,
I am stuck to build a twisted prism
https://www.polyhedra.net/en/pictures.php?type=twisted-prisms
I was thinking of just using :
linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)
> circle(r=10,$fn=5);
>
But the result is not correct. I can't find a simple solution. In fact I
found files that were functional (with slices=1) before I updated OpenSCAD,
has there been a change since?
Is it possible?
Thanks for your help!

JB

Jordan Brown

Thu, May 12, 2022 3:07 PM

On 5/12/2022 7:20 AM, Julien Jacquet wrote:

Hello,

I am stuck to build a twisted prism

https://www.polyhedra.net/en/pictures.php?type=twisted-prisms

I was thinking of just using :

```
linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)
circle(r=10,$fn=5);
```

But the result is not correct. I can't find a simple solution. In

fact I found files that were functional (with slices=1) before I

updated OpenSCAD, has there been a change since?

Looks related to pull request #3770.

https://github.com/openscad/openscad/pull/3770

Add "segments" parameter for linear_extrude.

I think the intent was to make the result be curvier.

Hopefully Hans will chime in, but it appears to me (based on

experimentation, not a real understanding of what's going on) that this

does what you want:

```
linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
circle(r=10,$fn=5);
```

That is, the first 72° ends up using the convex diagonal, but it turns

concave during the second 72°.

On 5/12/2022 7:20 AM, Julien Jacquet wrote:
> Hello,
> I am stuck to build a twisted prism
>
>
> https://www.polyhedra.net/en/pictures.php?type=twisted-prisms
>
> I was thinking of just using :
>
> linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)
> circle(r=10,$fn=5);
>
>
> But the result is not correct. I can't find a simple solution. In
> fact I found files that were functional (with slices=1) before I
> updated OpenSCAD, has there been a change since?
Looks related to pull request #3770.
https://github.com/openscad/openscad/pull/3770
Add "segments" parameter for linear_extrude.
I think the intent was to make the result be curvier.
Hopefully Hans will chime in, but it appears to me (based on
experimentation, not a real understanding of what's going on) that this
does what you want:
linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
circle(r=10,$fn=5);
That is, the first 72° ends up using the convex diagonal, but it turns
concave during the second 72°.

SP

Sanjeev Prabhakar

Thu, May 12, 2022 5:01 PM

something like this?[image: Screenshot 2022-05-12 at 10.30.16 PM.png]

On Thu, 12 May 2022 at 20:37, Jordan Brown openscad@jordan.maileater.net

wrote:

On 5/12/2022 7:20 AM, Julien Jacquet wrote:

Hello,

I am stuck to build a twisted prism

https://www.polyhedra.net/en/pictures.php?type=twisted-prisms

I was thinking of just using :

linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)

```
circle(r=10,$fn=5);
```

But the result is not correct. I can't find a simple solution. In fact I

found files that were functional (with slices=1) before I updated OpenSCAD,

has there been a change since?

Looks related to pull request #3770.

https://github.com/openscad/openscad/pull/3770

Add "segments" parameter for linear_extrude.

I think the intent was to make the result be curvier.

Hopefully Hans will chime in, but it appears to me (based on

experimentation, not a real understanding of what's going on) that this

does what you want:

```
linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
circle(r=10,$fn=5);
```

That is, the first 72° ends up using the convex diagonal, but it turns

concave during the second 72°.

OpenSCAD mailing list

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

something like this?[image: Screenshot 2022-05-12 at 10.30.16 PM.png]
On Thu, 12 May 2022 at 20:37, Jordan Brown <openscad@jordan.maileater.net>
wrote:
> On 5/12/2022 7:20 AM, Julien Jacquet wrote:
>
> Hello,
> I am stuck to build a twisted prism
>
>
> https://www.polyhedra.net/en/pictures.php?type=twisted-prisms
>
> I was thinking of just using :
>
> linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)
>> circle(r=10,$fn=5);
>>
>
> But the result is not correct. I can't find a simple solution. In fact I
> found files that were functional (with slices=1) before I updated OpenSCAD,
> has there been a change since?
>
>
> Looks related to pull request #3770.
> https://github.com/openscad/openscad/pull/3770
> Add "segments" parameter for linear_extrude.
>
> I think the intent was to make the result be curvier.
>
> Hopefully Hans will chime in, but it appears to me (based on
> experimentation, not a real understanding of what's going on) that this
> does what you want:
>
> linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
> circle(r=10,$fn=5);
>
> That is, the first 72° ends up using the convex diagonal, but it turns
> concave during the second 72°.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>

SP

Sanjeev Prabhakar

Thu, May 12, 2022 5:16 PM

In case this is what you are looking for, here is the code for various

types of twists

include<dependencies.scad>

cir=cir(5,s=4);

prism=l_extrude(cir,h=20,a=90,steps=1);

swp(prism);

On Thu, 12 May 2022 at 22:31, Sanjeev Prabhakar sprabhakar2006@gmail.com

wrote:

something like this?[image: Screenshot 2022-05-12 at 10.30.16 PM.png]

On Thu, 12 May 2022 at 20:37, Jordan Brown openscad@jordan.maileater.net

wrote:

On 5/12/2022 7:20 AM, Julien Jacquet wrote:

Hello,

I am stuck to build a twisted prism

https://www.polyhedra.net/en/pictures.php?type=twisted-prisms

I was thinking of just using :

linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)

```
circle(r=10,$fn=5);
```

found files that were functional (with slices=1) before I updated OpenSCAD,

has there been a change since?

Looks related to pull request #3770.

https://github.com/openscad/openscad/pull/3770

Add "segments" parameter for linear_extrude.

I think the intent was to make the result be curvier.

Hopefully Hans will chime in, but it appears to me (based on

experimentation, not a real understanding of what's going on) that this

does what you want:

```
linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
circle(r=10,$fn=5);
```

That is, the first 72° ends up using the convex diagonal, but it turns

concave during the second 72°.

OpenSCAD mailing list

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

In case this is what you are looking for, here is the code for various
types of twists
include<dependencies.scad>
cir=cir(5,s=4);
prism=l_extrude(cir,h=20,a=90,steps=1);
swp(prism);
On Thu, 12 May 2022 at 22:31, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> something like this?[image: Screenshot 2022-05-12 at 10.30.16 PM.png]
>
> On Thu, 12 May 2022 at 20:37, Jordan Brown <openscad@jordan.maileater.net>
> wrote:
>
>> On 5/12/2022 7:20 AM, Julien Jacquet wrote:
>>
>> Hello,
>> I am stuck to build a twisted prism
>>
>>
>> https://www.polyhedra.net/en/pictures.php?type=twisted-prisms
>>
>> I was thinking of just using :
>>
>> linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)
>>> circle(r=10,$fn=5);
>>>
>>
>> But the result is not correct. I can't find a simple solution. In fact I
>> found files that were functional (with slices=1) before I updated OpenSCAD,
>> has there been a change since?
>>
>>
>> Looks related to pull request #3770.
>> https://github.com/openscad/openscad/pull/3770
>> Add "segments" parameter for linear_extrude.
>>
>> I think the intent was to make the result be curvier.
>>
>> Hopefully Hans will chime in, but it appears to me (based on
>> experimentation, not a real understanding of what's going on) that this
>> does what you want:
>>
>> linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
>> circle(r=10,$fn=5);
>>
>> That is, the first 72° ends up using the convex diagonal, but it turns
>> concave during the second 72°.
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
>

JJ

Julien Jacquet

Thu, May 12, 2022 6:43 PM

Thanks, it works :)

Le jeu. 12 mai 2022 à 19:02, Sanjeev Prabhakar sprabhakar2006@gmail.com a

écrit :

something like this?[image: Screenshot 2022-05-12 at 10.30.16 PM.png]

On Thu, 12 May 2022 at 20:37, Jordan Brown openscad@jordan.maileater.net

wrote:

On 5/12/2022 7:20 AM, Julien Jacquet wrote:

Hello,

I am stuck to build a twisted prism

https://www.polyhedra.net/en/pictures.php?type=twisted-prisms

I was thinking of just using :

linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)

```
circle(r=10,$fn=5);
```

found files that were functional (with slices=1) before I updated OpenSCAD,

has there been a change since?

https://github.com/openscad/openscad/pull/3770

Add "segments" parameter for linear_extrude.

I think the intent was to make the result be curvier.

experimentation, not a real understanding of what's going on) that this

does what you want:

```
linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
circle(r=10,$fn=5);
```

concave during the second 72°.

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

Thanks, it works :)
Le jeu. 12 mai 2022 à 19:02, Sanjeev Prabhakar <sprabhakar2006@gmail.com> a
écrit :
> something like this?[image: Screenshot 2022-05-12 at 10.30.16 PM.png]
>
> On Thu, 12 May 2022 at 20:37, Jordan Brown <openscad@jordan.maileater.net>
> wrote:
>
>> On 5/12/2022 7:20 AM, Julien Jacquet wrote:
>>
>> Hello,
>> I am stuck to build a twisted prism
>>
>>
>> https://www.polyhedra.net/en/pictures.php?type=twisted-prisms
>>
>> I was thinking of just using :
>>
>> linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)
>>> circle(r=10,$fn=5);
>>>
>>
>> But the result is not correct. I can't find a simple solution. In fact I
>> found files that were functional (with slices=1) before I updated OpenSCAD,
>> has there been a change since?
>>
>>
>> Looks related to pull request #3770.
>> https://github.com/openscad/openscad/pull/3770
>> Add "segments" parameter for linear_extrude.
>>
>> I think the intent was to make the result be curvier.
>>
>> Hopefully Hans will chime in, but it appears to me (based on
>> experimentation, not a real understanding of what's going on) that this
>> does what you want:
>>
>> linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
>> circle(r=10,$fn=5);
>>
>> That is, the first 72° ends up using the convex diagonal, but it turns
>> concave during the second 72°.
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>

AM

Adrian Mariano

Thu, May 12, 2022 8:39 PM

You can also do this in BOSL2 using:

include<BOSL2/std.scad>

linear_sweep(pentagon(r=10), h=40, twist=30, slices=1);

If you actually want the twist to be smooth you can increase the

number of slices.

On Thu, May 12, 2022 at 2:44 PM Julien Jacquet jacquetjulien@gmail.com wrote:

Thanks, it works :)

Le jeu. 12 mai 2022 à 19:02, Sanjeev Prabhakar sprabhakar2006@gmail.com a écrit :

something like this?

On Thu, 12 May 2022 at 20:37, Jordan Brown openscad@jordan.maileater.net wrote:

On 5/12/2022 7:20 AM, Julien Jacquet wrote:

Hello,

I am stuck to build a twisted prismhttps://www.polyhedra.net/en/pictures.php?type=twisted-prisms

I was thinking of just using :

linear_extrude(height = 40, twist=72, slices=???, $fn=???)

circle(r=10,$fn=5);

https://github.com/openscad/openscad/pull/3770

Add "segments" parameter for linear_extrude.I think the intent was to make the result be curvier.

`linear_extrude(height = 40, twist=72*2, slices=1, segments=0) circle(r=10,$fn=5);`

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 can also do this in BOSL2 using:
include<BOSL2/std.scad>
linear_sweep(pentagon(r=10), h=40, twist=30, slices=1);
If you actually want the twist to be smooth you can increase the
number of slices.
On Thu, May 12, 2022 at 2:44 PM Julien Jacquet <jacquetjulien@gmail.com> wrote:
>
> Thanks, it works :)
>
> Le jeu. 12 mai 2022 à 19:02, Sanjeev Prabhakar <sprabhakar2006@gmail.com> a écrit :
>>
>> something like this?
>>
>> On Thu, 12 May 2022 at 20:37, Jordan Brown <openscad@jordan.maileater.net> wrote:
>>>
>>> On 5/12/2022 7:20 AM, Julien Jacquet wrote:
>>>
>>> Hello,
>>> I am stuck to build a twisted prism
>>>
>>>
>>> https://www.polyhedra.net/en/pictures.php?type=twisted-prisms
>>>
>>> I was thinking of just using :
>>>
>>>> linear_extrude(height = 40, twist=72, slices=???, $fn=???)
>>>> circle(r=10,$fn=5);
>>>
>>>
>>> But the result is not correct. I can't find a simple solution. In fact I found files that were functional (with slices=1) before I updated OpenSCAD, has there been a change since?
>>>
>>>
>>> Looks related to pull request #3770.
>>> https://github.com/openscad/openscad/pull/3770
>>> Add "segments" parameter for linear_extrude.
>>>
>>> I think the intent was to make the result be curvier.
>>>
>>> Hopefully Hans will chime in, but it appears to me (based on experimentation, not a real understanding of what's going on) that this does what you want:
>>>
>>> linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
>>> circle(r=10,$fn=5);
>>>
>>> That is, the first 72° ends up using the convex diagonal, but it turns concave during the second 72°.
>>>
>>> _______________________________________________
>>> 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

HL

Hans L

Sat, May 14, 2022 2:49 AM

On Thu, May 12, 2022 at 10:07 AM Jordan Brown openscad@jordan.maileater.net

wrote:

On 5/12/2022 7:20 AM, Julien Jacquet wrote:

Hello,

I am stuck to build a twisted prism

https://www.polyhedra.net/en/pictures.php?type=twisted-prisms

I was thinking of just using :

linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)

```
circle(r=10,$fn=5);
```

found files that were functional (with slices=1) before I updated OpenSCAD,

has there been a change since?

https://github.com/openscad/openscad/pull/3770

Add "segments" parameter for linear_extrude.

I think the intent was to make the result be curvier.

experimentation, not a real understanding of what's going on) that this

does what you want:

```
linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
circle(r=10,$fn=5);
```

concave during the second 72°.

Yep, everything Jordan says here is correct, except that it's actually

related to my earlier PR #3351

https://github.com/openscad/openscad/pull/3351

And as he points out, you can force the "older style" more jagged folding

by twisting it beyond (360 / n) degrees. This is a case specific to

centered, regular polygons with n sides.

The "slices" and "segments" arguments act as ultimate overrides. That is to

say, they take precedence over any calculations involving $fn, $fs or $fa,

so it's not required to provide those.

And segments=0 just means not to subdivide the 2d outline at all, leaving

the edges unmodified.

On Thu, May 12, 2022 at 10:07 AM Jordan Brown <openscad@jordan.maileater.net>
wrote:
> On 5/12/2022 7:20 AM, Julien Jacquet wrote:
>
> Hello,
> I am stuck to build a twisted prism
>
>
> https://www.polyhedra.net/en/pictures.php?type=twisted-prisms
>
> I was thinking of just using :
>
> linear_extrude(height = 40, twist=72, slices=*???*, $fn=*???*)
>> circle(r=10,$fn=5);
>>
>
> But the result is not correct. I can't find a simple solution. In fact I
> found files that were functional (with slices=1) before I updated OpenSCAD,
> has there been a change since?
>
>
> Looks related to pull request #3770.
> https://github.com/openscad/openscad/pull/3770
> Add "segments" parameter for linear_extrude.
>
> I think the intent was to make the result be curvier.
>
> Hopefully Hans will chime in, but it appears to me (based on
> experimentation, not a real understanding of what's going on) that this
> does what you want:
>
> linear_extrude(height = 40, twist=72*2, slices=1, segments=0)
> circle(r=10,$fn=5);
>
> That is, the first 72° ends up using the convex diagonal, but it turns
> concave during the second 72°.
>
Yep, everything Jordan says here is correct, except that it's actually
related to my earlier PR #3351
https://github.com/openscad/openscad/pull/3351
And as he points out, you can force the "older style" more jagged folding
by twisting it beyond (360 / n) degrees. This is a case specific to
centered, regular polygons with n sides.
The "slices" and "segments" arguments act as ultimate overrides. That is to
say, they take precedence over any calculations involving $fn, $fs or $fa,
so it's not required to provide those.
And segments=0 just means not to subdivide the 2d outline at all, leaving
the edges unmodified.

Replying to:

Empathy v1.0
2023 ©Harmonylists.com