Grasshopper

algorithmic modeling for Rhino

How to create a rectangle that contain a curve, out of this curve.

Hi everybody,

That's my first post here and I am basically a newby using grasshopper.

I have read the "Read this first" but I might have make some mistakes, I am sorry for that.

In addition I am french so there might be some mistakes here, please be understanding.

Let's get into the problem.

I want to build a house out of a floorplan (only the outline).

I managed to generate a gambrel roof with a regular rectangle a bit bigger than the floorplan (bigger cause I trim it later).

I Explode / Select one curve / Grasshopper

First Grasshopper build the gable (triangular part that hold the roof).

Then I select one other curve to extrude the Gable triangle and generate the gambrel roof.

To finish the house I select the floorplan and Grasshopper extrude it, high enough (I set it but I might be automatic) to intersect the roof.

I am just starting but doing this was really exciting for me.

Now I would like to improve it.

I would like to select the floorplan curve and let GH to build a rectangle big enough to contain the selected curve, but not too big.

My plan was :

Select the curve / find the center point / build a rectangle (center), lenght should be the distance in between the center point and the farest point of the curve.

I did not find a way to ask GH to do that.

Then I would like GH to ask me which side of the rectangle will be the bottom of the gable, and understand that the other side will be the vector for the extrude command that build the roof. If GH can't ask, maybe have a button that allows you to switch from one to another. Something like a "crossfader" with 2 positions (the longest side of the rectangle or the shortest).

When I say : I would like GH to ask me, I am wondering if it might be possible to GH to ask me the infos it needs to run. For my example, it would be first the curve (bottom of the gable), then the vector for the extrusion (other side of the rectangle), finally the floorplan curve.

This was a parallele question that does not concern my problem.

Then the last thing I would like to ask GH to do is :

"Moveface" the bottom face of the "Intersection" GH does in the end.


That would be perfect to find out how to tell GH that it should automaticaly pick up the bottom face.

My idea :

Make a list of the faces out of the intersection. Select the faces that are horizontals. There is only the bottom one. Then Moveface to z=0.

I don't find out how to do that.

You'll find attached the rhino file and the GH. I have cleaned them to have only the necessary informations.

Thank you for reading and give me some help.

Best,

Samy

Views: 1702

Attachments:

Replies to This Discussion

I manage to get the longest curve from a rectangle, that one that I want to use to build the gable. Then I found a way to create a vector out of the small side of the rectangle, that I use to extrude the gable (triangle) and build the roof.

Attachments:

hi, can this help you?

Attachments:

Hi, actually my version of GH is 0.8.0052 and I can not read your file. Could you save it for mine ? Thank you very much !

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service