Grasshopper

algorithmic modeling for Rhino

Hi All,

I am trying to create a persistent list (that is what I think it is called but I'm not a programmer by any means) of points which I can then fine-tune individually until I've got the proper location for each. I've setup a demonstration in the attached files to make it more obvious. Here are the steps:

  1. Choose the curve (in this case a circle) -> (D)
  2. Choose the number of points you would like on this curve -> (N)
  3. The algorithm chooses (N) random points on the curve
  4. Use the slider to choose a point from the list of randomly chosen points (from 0 to N -1)
  5. For each of these points use the slider to move the point behind or forward (between -5 to 5 points) along the curve

Now I want to be able to do this but keep the results of my adjustments. Is this actually possible?

Thanks,

Ali

Views: 4669

Attachments:

Replies to This Discussion

I've been racking my brains out trying to figure out how to extract the points on the top surface and bottom surface separately. I still don't understand the data tree manipulation system in Grasshopper.

What I understand is that Each of the meshes is located on the second level of the tree. The points on the top and bottom of each of the meshes are then at: bottom {0;mesh_count;0;0} and top {0;mesh_count;0;1}

I've tried to use two path mappers like this: bottom: {0;B;0;0}(i) -> {B}(i) and  top: {0;B;0;1}(i) -> {B}{i} to get lists of top and bottom surfaces. However the results are the same. So how do you take the nth branch of a every branch at a certain level into a separate tree?

Well, using a path shift and list split, I got the points for each surface. However, it seems like the top and bottom points follow a different sequence. That is, they don't start at the same point. I don't understand how the lofting works when the polylines have different start points but the output screws up when I bring it into my analysis program. I'll investigate this in the morning, it is 2:30 already :/Thanks a lot Danny

Mateusz Zwierzycki has made some great advances in incremental convex hull3d here

Thanks Michael. I saw that post while I was trying to understand how convex hull works.

However, I am not really trying to find the convex hull of the entire mesh in 3D. As I explained above, for my analysis I will be basically reducing the mesh to a prism (with 12 sides at the moment). The way to describe the prism would be through points on the top and bottom surfaces. My algorithm just tries to describe this prism in a systematic and consistent way considering the contact criteria I described before.

All that is a long way of saying that what I really need is to be able to take the convex hull of the top and bottom surface, find the corners and then I am done.

I am currently working on this idea. I will post what I've got a bit later. In the meantime let me know if I can make myself clearer on any of the points.

Bests,

Ali

Here's a definition that includes a perimeter sorting algorithm using a circle and CPs to get the points aligned better.

Attachments:

Thanks Danny, this is great. The only issue I have is that for the very deformed blocks, the alignment of the points is still off:

This sort of brings me back to my first issue which was being able to adjust the points. For the regular blocks this approach is good. But for the degraded ones, the approach of rotating by a set amount and finding an intersection seems to fail (the one on the left). I'm not sure if there is a way to fix this.

I think the way to overcome this is to find the central axis of the whole column and use that as the point to calculate spurs from and rotation.

In the image above the left hand average point is closer to undamaged side and therefore creating the error when rotating the line and intersecting. I'll get back to you later today hopefully with a solution.

I think you are right about this. I'll think about this as well.

What do you think of this approach: to create a best fit line through the plane centroid. However, do it in such a way to exclude incomplete drums. I achieved this by taking the average length of the drum curves. Then filtering out centre points corresponding to curves that are smaller than the average. This of course left the base surfaces. I think given the way the column bases are throughout the structure, it is best to exclude them always. Then using the reduced set of points, I find a best fit line through the centroids and then find the intersection of the line with the planes which gives me the location of the improved centres. With this I think we get a better result. What do you think?

I'm not sure the way I've don it is the most elegant. Also I am assuming that the list of surfaces is always from bottom up. But I guess this can change depending on how I select my meshes and can be a problem if I select two columns. I'll see maybe there is a way to filter then out based on z-coordinate!

Attachments:

Another idea I've been playing with is using the convex hull surface itself. The surface is like a rubber band around the column. So it captures the corners very well. I was thinking maybe this could be used. The problem I'm having is describing the centre of each of the corners.

I used a Reduce Polyline component and I was able to get good results. Of course the tolerance changes the behaviour and it sometimes doesn't pick up a corner when it is reduced. I'm not sure if this idea makes sense but I thought I would share it with you in case you have another brilliant idea about it.

Also I was thinking that the column capitals, that is the two meshes on top can be left out and handled with a separate algorithm for simplicity.

can you upload some mesh ?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service