Grasshopper

algorithmic modeling for Rhino

Hi everybody!

I'm creating this definition to model some buildings, by having a total control of BRep's points, edges, planes, etc..

I need to keep all parametric, without baking anything.. but I'd like to know if there's a way to simplify the definition and to reduce the amount of Number Sliders (without loosing the controls on the final shape).

Besides, as you can see from the second screenshot, there's an error: when I move some editable points in the XYZ directions it triplicate the BRep.

Suggestions?

Thank you all

Views: 2604

Attachments:

Replies to This Discussion

Hello Leonardo,

First of all the starting curve [boundary curve] is missing from your definition. You should either upload the rhino file as well, or internalize it inside the curve component.

So I guess this is just a rectangle you are starting with and, if I read your intentions correctly, you want to start with a box and be able to move its top vertices independently in x,y and z and also rotate them altogether (this seems a bit unnecessary since you already control each vertex independently but ok).

Starting from the beginning of your definition: You don't need to actually create the brep and then extract the vertices and move them and then re-create it. Instead you can just get the bottom vertices from the [Boundary curve], using [Discontinuity] and move them by a vectorZ equal to [Building Height]:

Next you want to create four vectors and move the four vertices. The only thing that could help reduce components here is to merge the four vectors into one list (since you already have the vertices in a list):

Then you can add the rotation just like you did in your definition:

and finally you can create the twisted box. At this point you have 2 lists of 4 points each. Like you did in your definition, you have to use a [List Item] component to get each vertex but instead of using 4 components you can use just one and create more outputs by zooming in and clicking the (+) icon at the bottom:

and you finally have this:

Hope this helps

ps. the reason you were getting 3 breps is because you were creating 3 seperate vectors (x,y,z) instead of one, so you were actually moving each vertex 3 times.

Attachments:

Hi Nikos!
Thank you for your answer, meanwhile I went on with the definition, solving the BRep's triplication error, and doing other stuff that you can see here:

There are still some error, for example as of the height's control on the roof points: the outer edge isn't linked to the inner edge, so when I change the value it override the internal court (as you can see in the screenshot above the values are all set to 0 for this reason).

However your definition seems a lot more effective than mine, I really like it and I'm gonna try it immediately! Thanks!!

Attachments:

Ok, after few minutes spent on your def. I think the easiest way to do what I want is: copy&paste your def, offset it in order to create the central core and then subtract it to the main volume to obtain a final shape like the one above. What do you think?

yes, probably something along these lines. The question is how you can create the brep to subtract, what would you offset?

For the bottom 4 points things are easy, you just have to offset the initial polyline and that's it.

But what about the top points? I believe the approach would be different depending on what you want.

Do you want the hole to be independent from the main volume? Then you would have to re-apply your whole definition to the offseted base curve. This, of course, means double the number of sliders in your definition.

Or do you want it to follow the shape of the main volume. Then you would have to decide about dependencies (what is parallel to what)

If you make these decisions we can then start thinking on the best way to achieve this.

This is the result.. It works, but I cannot tell at all satisfied because the amount of number slider is a little too high. I don't need controls both for the main volume's points and the core's points... For my needs is enough to keep independency between the lower edge and the upper, not between every single point in the three dimensions.

Wait, I mean.. Ok the controls for every single point on the main volume, but  the hole could follow the shape of the main volume. I was not sure I explained myself :)

ok, so some things to notice about your geometry:

the faces of your main volume are not planar, they are curved surfaces (it might not be visible at first because the edges are straight lines but if you orbit a bit you can see that).

This means that if you subtract another brep from it, the top edges of the gap will not be straight lines. the more twisted your box is, the more obvious this becomes.

Having said that, in order to "offset" the main volume inwards, you have to decide what exactly you should offset.

The first thing would obviously be the starting polyline. Then, I believe, your best bet would be to create vectors from the "vertical" edges of your brep and move the points of the offseted polyline by those vectors to find the top points of the hole.

BUT, some of these points might still be inside the volume of the brep and so you will not be able to subtract. So you could multiply those vectors (let's say by 2) to make sure the inside brep is taller than the outside. I hope all these make sense. here is an image that might explain it better:

Of course if you play around with the sliders you will see that, in some cases, the output is not acceptable (the hole brep folds into itself and can't be subtracted, etc...). But it generally works so I hope it is ok for your needs.

Attachments:

Your explanations are really helpful and useful, many many thanks!

At the beginning of this topic I was pretty satisfied, because I've created for the first time and on my own a huge definition like that.. I knew it could have been done a better work, more simple and effective, but when I saw your work I've felt really noob :D


It's completely normal for your first projects to be untidy. A good practice would be to take a backwards look at your definition after you have finished it and try to spot and eliminate the unnecessary steps. It is also really important to study data management (lists and trees). And of course, there is always this forum!

Good luck!

Nikos, I really don't want to take advantage of your patience and knowledge, but I've another problem that I'm not able to solve. I understand the logic behind it, but I cannot apply it to this case.

It concern the floor slabs. As you can see from the image below, I didn't have any problem in creating a single floor and multiply it along the Z direction, but when I transform the building's original geometry, all the slabs don't follow the transformation.. This obviously because I didn't told them to do so, and here is the problem: how to ensure that the slabs and the building is moving in unison?

I know, we've already saw the same problem when you helped me in connecting the outer shape to the central hole, but... eh eh.. I'm working on it from this morning with no positive results.
I've also tried to follow this tutorial: https://www.youtube.com/watch?v=QZaV4NtuXBU

hi Leonardo,

I don't have access to GH at the moment but try using the [contour] component on your final brep. It does exactly what you are after.

Ok, in this case the solution was easier than I thought.. Here it is:

Thanks again!!!

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