Controlling twist more efficiently

Hi all,

I am attempting to control a twist within a square and my script seems to be quite long and may contain unnecessary steps. I was wondering if anyone had ideas to simplify the script. My thought process goes something like this:

Only two sides of the tower should twist. The other two should be straight. Hence I Equally dividing two sides of a rectangle and connecting creating a line for each division. This is so the twist remains within the constraints of the square.

Moving the curves in the z direction according to the division and lofting:

image

To create the full tower, I am isolating various points and edges and reconnecting them to create a final volume:

Here I am overusing the list item component to isolate specific vertices and edges to generate a final volume

This is a bit of a pain and works only with this specific rotation. Say I wanted to rotate the other direction at the beginning of the script, but due to the specific isolation of the list item component, it would not work.

I was wondering is there was an easier and more efficient thought process.
controlling twist.gh (22.2 KB)

Hi @serabouch,

Here a simple script.
twisted tower.gh (8.5 KB)

Hi Erik, thank for the response! I realize i wasnt clear in my explanation. Two sides of the facade should not twist.

Initially, I dug up a five year old GH model that is similar but yours is cooler so I worked on it. The white group looks complicated but that sort of thing is common in GH models to be truly parametric and not rely on sliders or text panels for index values to select faces, edges, points, etc. I have five text panels in this code for those purposes but if you look closely, great care is taken to be sure those index values will be accurate, even if the model changes. I’m sure I missed some things in that quest.


controlling twist_2022Oct25a.gh (37.0 KB)

P.S. I missed this part completely! Will take another look as time permits. Designing with that kind of variation in mind usually requires parameters to drive it, in this case:

  1. Bottom edge to start loft. (0 to 3)
  2. Clockwise or counter-clockwise rotation to get the top edge of the loft. (bottom edge value ± 1)
1 Like

Thanks for this example! Much more condensed and efficient. Will have a look at the white group and try and understand it. Good luck with the rotation:)

Two controls in the dark blue group allow twist to start on any side and be clockwise or counter-clockwise:


controlling twist_2022Oct25cc.gh (46.4 KB)

The red groups are pieces of the final structure, a ‘Closed Brep’ (“solid”).

3 Likes

Very interesting, thanks for the help:)