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:
Now I want to be able to do this but keep the results of my adjustments. Is this actually possible?
Thanks,
Ali
Tags:
When you say:
Now I want to be able to do this but keep the results of my adjustments. Is this actually possible?
Do you mean you want to store the values that created this specific case for recollection in the future?
If so then yes there are ways to achieve this, one of which is built in to the user interface of Grasshopper called Save States in the solution menu.
Alternatively you can create a string of variables for all your user settings and Internalise them in a String Param when you are satisfied with the results.
Don't forget to include any seed values used in your Random Components as this will have an effect on your ability to repeat randomness.
Hi Danny,
Thanks for the reply. Well actually repeatability is not what I'm after. In fact the random picking of points is for this demonstration. In my project I will use another algorithm to pick some points on the curve. However, my algorithm isn't producing the exact result I want so I was thinking that I could have a manual override mechanism by which I could tweek each of the points left or right and then use the set of tweaked points to carry out my other calculations.
Now in this example this would mean I would use the third slider to choose a point (say 3 which is displayed in the panel on the side) and then use the fourth slider to manipulate its location. This works fine. However, when I move on to the next point (by using the third slider) everything gets reset to the original positions. Looking at the code it is obvious why this happens. What I want to find out is how to keep my changes as I go along changing each of the points.
I don't think states would work because then each state would only represent the position of a single point and I would have to manually record and apply everything.
Any other ideas? Is my explanation any clearer?
Regards,
Ali
use list item and assign different movement values and vectors to each assigned point.
I thought you had a slider per point. So no it would not work the way you describe.
What is the criteria that you are satisfying when a point is good? Can this be worked into the definition so that there is no user interaction?
Hi Danny,
Sorry for the delay in replying. I was trying to clean up my file so that I can post it and let you see what I'm working on. I think your point about removing user interaction is a good one. This is the actual reason I'm going through all this. I want to develop an algorithm that can be applied consistently and produce good results.
Here is a a little background. I'm working on my master's thesis in structural analysis. My thesis is on seismic behaviour of a roman temple in Portugal. I will be using a method of analysis suitable for block structures called the discrete element method. I am using a commercial code called 3DEC for this.
Now in order to the analysis I need to construct a 3D block model of my structure. I received a 3D scan of the entire structure (in *.wrl) format and spent a week trying to clean it up and slice it into the blocks that make up the structure. Now I want to use the scanned geometry of the blocks and describe a simplified prism around each that will represent the block in my analysis. I've attached a file with one of the columns in the temple. I think (at least with my tests so far) that it is representative of the all the blocks I'm dealing with.
Now my criteria for creation of the blocks:
I order to satisfy all these requirements, I've done the following in my grasshopper file:
Now the problems are as follows:
I'm really sorry about the long post and complicated question. I hope someone can give some pointers on what I could try. I understand that this is not an easy question and that it is more a question of doing something rather than asking about grasshopper itself. My goal is to have an algorithm that I can explain as a general method for others to use in the future when dealing with these structures. This is only a small minor part of my thesis (the analysis is what is important) but it is taking a lot of time to figure out.
If you have any other questions, I would be more than happy to provide a better explanation. In the file I have created a region with all my input parameters. You can choose a different mesh from that point and change various settings. I hope that is self-explanatory.
Thanks for all your help,
Ali
BTW: I'm really sorry for the poor way I've done this stuff so far. I'm not a programmer and apart from some small macros in Excel I don't know much about this stuff. To add to that, I've just started with Rhino and Grasshopper about five days ago after almost pulling out all my hair trying to do this with AutoCAD!
Hi all,
I have been thinking about this and I think using a curve created using the convex hull algorithm might be the "ticket" here. I have been trying to see how I can identify the location of the corners on the convex hull surface.
My current idea is to evaluate the derivative of the points along the curve, shift the list of derivatives by 1 and subtract it from the original list of derivatives. This step is proving very difficult. I tried to use the List Shift component with wrapping enabled to shift the list. But upon subtracting, I get zero results.
If I can get this part fixed, then the next challenge is how to go through this list of differences and identify and separate out maximum points. I can't use sort because some of the points on the curve will have sharper corners than others. I have to parse the list one by one. I don't know how to do this with GH components. I may have to do it in VB.
Any ideas?
Ali
When you say block what do you mean?
is it a closed nurbs surface ?
I know it is a bit confusing. So I have the actual closed meshes which represent the column drums.
Through the GH algorithm I want to derive two surfaces on top and bottom having the same number of nodes. I supply these points to the program and it generates a prism. That constitutes the block inside the program. I mimic this behaviour in the algorithm by creating the top and bottom polyline and then creating lines between points on the top and bottom and lofting over top. It is basically the right most part of my algorithm.
The main point of the algorithm is to come up with a "good" definition of the top and bottom surfaces. I'm not interested in stuff in between. If I want to take into account holes in the middle of a drum, I can break it into two blocks for analysis purposes.
Are you restricted to any number of points to define the surfaces?
can they be trimmed surfaces?
I'm not restricted on the number of points. However, in order to save computational effort in my analysis, the goal is to minimize the number of vertices. So my idea was to stick with 12 points on each surface, equal to the number of flutes (ribs) on the columns. The thing is that the number of points on top and bottom must be the same and defined in the same order.
I'm not sure what you mean by trimmed surfaces. The top and bottom will have to be flat. The surfaces must be convex and the resulting prism must also be convex (it has to do with computational effort in evaluating contacts). Does that help?
Here's what I've got so far, to see if any of this is along the right lines.
It doesn't work so well at the top though
This is amazing! It is so much neater and simpler. I'm trying to understand what is happening at the moment. But I think this is exactly what I had in mind. I'm not sure if you are doing a comparison of contact areas in this, but that is something I can try and figure out how to build into this (without messing it up too much).
I'm trying to output the coordinates into the analysis software to see if everything works. I'll let you know as soon as possible.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by