Grasshopper

algorithmic modeling for Rhino

Hello everyone,

I'm fairly new to grasshopper, and I'm trying to model a parametric chinese fan.

I would like to be able to fold and unfold it, using one slider. I managed to model the fan on an open position, but not quite sure how to control the rotation of each polyline, that will outline the folding surfaces of the fan, so i can then control the open or closed position.

I attach the files I am working with.

Any help or guidelines will be greatly appreciated.

Views: 2123

Attachments:

Replies to This Discussion

When you find yourself copy/pasting SO MUCH CODE(!), you're on the wrong track.  Not the GH way.

This was my first effort (fanv4_2017Mar12a.gh) - not quite right, but approximates the stack of sticks type of fan:

My second effort is the folded paper variety (fanv4_2017Mar12b.gh) - still not quite right because, like the first one, the length of the outer fan segment edges changes due to linear interpolation ('ReMap' point heights) instead of calculating those points correctly...  But I'm out of time for now.  Maybe you can fix that?

Attachments:

P.S.  I don't remember why, but I used two different methods for lofting the fan blades...

In fanv4_2017Mar12a.gh, I lofted all the lines into a single surface using 'Straight' in 'Loft options' (could have used 'Developable' as well).

In fanv4_2017Mar12b.gh, I lofted each fan blade separately, two lines at a time - then forgot to 'Join (Brep Join)' them together into a single surface:

Attachments:

Fixed the bug that calculates height of alternate points using the right triangle method:

Attachments:

Thank you very much Joseph!

This is really what i was going for!

Indeed copying too much code is not proper GH way..your definition makes it much more clear to me how I should be aiming to code. Also, thank you for clarifying the right triangle method, as i was unsuccessful in fixing that for the past day.

My real intention is to to connect the fan with some input data from firefly for grasshopper and an arduino circuit, controlling the aperture with light sensitivity. I will input what I have for firefly, and the definition you have provided me with, and will let you know how it goes.

Thank you for your time, your efforts and your quick reply!




Here is the updated definition, with my required aperture, and a dual fan (as I need for my project). For some reason, the expression for the Z value of the points, was not working with the Squared Root (Sqrt), so I had to type it differently like so: (pow(hyp,2) - pow(ArcL/blades,2))*.5 .

Next step will be elaborating with some structure around the fan, and adding the input data from the firefly components.

Attachments:
  1. Always a good idea to rename GH files slightly when they are modified.
  2. No clue why "sqrt(x)" doesn't work for you?!  But multiplying by 0.5 isn't the same thing.  This would work:
    pow(pow(hyp,2) - pow(ArcL/blades,2), 0.5)
  3. You didn't internalize your 'Mirror' curve parameter so not quite sure what that's about?
  4. "my required aperture"?  You mean 67.4 degrees max instead of 90?

P.S.  Is your mirror curve a line between the end points of the arc?  Best to avoid referring to "hard coded" geometry as much as possible:

Duly noted and shall rename GH file slightly when they are modified.

I tried writing the expression as you have suggested, however the surfaces disappear when they reach the maximum aperture (in this case, yes 67.4 degrees). I attach screenshots that show this.

The maximum aperture has to do with the dimension of the diagrid i would like to apply this double fan module on.

I was not quite sure how to internalise the 'Mirror' curve parameter..yes, the mirror curve is a line between the end points of the arc..thank you for identifying that for me, and for your feedback!

Attachments:

Sry for the double reply, but I have tried to plug in the 'Mirror' curve to the end points of the Arc and the whole of the mirrored fan is shifting positions (I attach photos). Is there a way to internalise the mirror line without the second fan shifting positions?

Attachments:

It wasn't immediately obvious how you broke my code so I started over with the last version I posted.

I found and fixed the error but will leave it to you to find it!  ;)

Not sure I've covered all your issues?  Next time, post your broken code instead of just screen shots.

Attachments:

Wassup?  I started to make a simple suggestion about using a '0 To 1' slider ("Fan Open" in blue group) multiplied by your max "aperture" value for the angle of the fan, then one thing led to another...  Is this more like what you have in mind?

There is a disabled orange group in the file using 'Mirror Curve' as before and a second mirror technique, but both have the effect of moving the mirrored fan's arc center.  I came up with a third method that mirrors around a line in the middle of each face of the box, so the points don't move.  The box/face dimension determines how far apart the mirrored fans are and how much they overlap.

I added a 1/2 angle counter rotation to the 'Arc' so that both edges move instead of just one.

While I was at it, I added code to allow multiple arbitrary planes to be used as the basis for the fan.

NOTE: I left a plane rotation you added in place (not shown) in a group labeled "Global" but can't see that it makes any sense?  So in that group the first 'PRot' can be by-passed; the second one is needed for the half-angle counter rotation.

Attachments:

This one removes the rotations completely.  Same code otherwise.

Attachments:

Wow, you really flexed what that module can do!

To be honest, it is very close to what i had in mind, but not exactly.

My last working code for exactly what i hand in mind was fanv4_2017Mar13b.gh, which i attached previously, and i attach again. Although the expression for the 'z' direction of the triangles is a bit botched, and the mirror line is not internalised, the generated geometry behaves exactly as I wanted it to.


The application for this dual fan module will be a reactive facade envelope, the aperture of which will be controlled by light intensity. On the actual structure of the facade (or building envelope), the left side of the diamond (looking at it in plan) will be fixed and not moving at all, while the right hand side, attached to two independent actuating rods, allows it to fan out and back in. The intention is to test this mechanism on a physical model, and see the actuation happening in the digital version as well.

Ideally I would like the same code, with the mirror line internalised, after which I can input the aperture data with a firefly sequence of code.

As always, thank you for your time and your efforts.



Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service