algorithmic modeling for Rhino
Hi all,
i found some lines in a discussion and rebuilt it. its making a delaunay Mesh with an optional Plane. Now i would like to be able when having varoius curves that i have one mesh as output. Basically its unioning the lists inside a foreach loop i imagine but i dobt have any clue how to do it.
One reason i am doing this is simply to practice other is i have the hope to get a fster result once i compiled it in vs. You think it could run faster? I have a very big file to mesh(terrain).
Heres the discussion i grabbed the code from
http://www.grasshopper3d.com/forum/topics/c-delaunay-mesh-syntax-wi...
Heres a screencap of what ive done with it:
Ahh, also dont know where to put in tht it still works, when no plane is provided.
Thanks a lot to everybody whos taking a look into and a nice weekend!
Tags:
OK, make a BIG break > forget this, this (and that).
Data Tree time (The Torture):
Open the thing attached ("some" lines of code are removed [life sucks]) > take the challenges listed > start walking the walk.
Well now with a bit more time,
aim #1 would be:
understand how i can get the file i (the Flatten-Tree-one)uploaded to work:
learn how flatten a tree/flatten a list inside c#.
know when to use a tree/list,main differences.
aim #2 would be:
try to use the example above, saw it in the other thread, already thought it could be what i am looking for, but ways more complicated.
colclusion: for me it would be nice to get the simple one done and then step by step evolutionate to the precise, nicer one.
I think that the container ship case was not understood completely.
1. A List is a collection of bananas in a box: the banana-box. In that thing the only concern is what banana is N66 and what N666. Confusingly a List can hold bananas AND sardines AND cats AND dogs as well (you just put them "blindingly" in the box > this is the so called boxing [things of type object there]) ... but if you'll gonna "use" something you should know what that something is (the type of the thing > something more informative than "object" > this is the so called un-boxing). That said you may have paid for a banana-box ... but (blame fraud) it can contain null bananas: this is NOT a nothing thing, is a thing that tells you that there's no banana around.
2. Meaning that if the only concern that you have for a collection is the item indexing ... use Lists (there's other stuff available on that matter as well).
3. The moment that you have to deal with many banana-boxes (or boxes containing boxes or boxes containing boxes that contain boxes ...) you should use something else that can tell you:
This is a DataTree task: a thing designed by a certain David R in order to manage the @%$%$ banana-boxes, that is. Not sure if David likes bananas, mind.
Failing to FULLY understand a way to manage banana-boxes means that you should marry a rich girl and forget all that (the best option if you ask me).
Here's what happens if you @$#@$# things in the container ship case:
heey Peter!
thanks for your time! I think i got it,hehe.
You were changing from sardines to bananas hoping I understand it this time, haha!
We need to go back to the good ol sardines,
So a tree is a list in a list (and maybe in a list) and a flattenend tree is just one plane list, cause i can just access it by the Item index,right?
In this particular case(the delaunayMeshThing) I a could use a list, cause the next (last) operation would be doing a mesh and its unimportant to be able to get item X on branch Y from the tree .
So preferebly I use trees to can get higher hierachies just in some cases a list when i just want to store some data to use it immedetaly in a further step, without need of preserving datastucture(like the delaunayMeshThing).
BTW. Do you now we have pinkish/red bananas in mexico?
A tree IS NOT a List of a List of a List:
In some planet, in some country, in some terrain, in some banana plantation ... imagine a banana tree with branches having (or not) bananas. The DataTree is a way to manage all the paths (to bananas) meaning that you have a handy way to climb some banana tree (in some planet/country/terrain/plantation) and arrive to a particular banana "cluster" (the List) and therefor to a particular banana (the item in the List).
A flattened DataTree like the above enumerates all the bananas found in all branches and in all lists (by respecting the path dimensions hierarchy) ... meaning that the only thing that you can do is to eat a banana not knowing where it comes from (critical since in some planets they use wrong fertilizers).
ok thanks for your patience!
so i try now to climb the banana tree,will see later the example below.
i really appreciate your efforts, and collecting your exapmles to use them as reference, so even if i dont understand in the first moment for the advance of my understanding it is helping a lot.
But am i right, that in the particular case(delmesh) flatten the list would be sufficient? And if yes how would i do it.
And in case of using a tree could you show me in this delmesh case how to do it?
or you think its still more understanding of datatrees needed?
Well ... I think that actually you are born to live in Monaco (after marrying the rich girl, that is).
Why?
Because each ^$#@%$# curve of yours yields a List i(of points). This means that solely the indexing on a single List is NOT sufficient to describe the situation since there's many curves. Meaning that we need a DT with one dimension to sample the points (where branch count equals the N of curves) and then feed the D solver on a per list per branch basis.
All the above if we follow the politically correct way: a Method that does the points DT, another that does the mesh etc etc ... otherwise you do business within a Loop and make the meshes with no DT involved (avoid that way of thinking).
If is still unclear > Plan Z(illions) > quit C#/GH ASAP > go for the cash.
Your last chance (for NOT going to Monaco).
See how pointless is to sample what this thing does in Lists instead of Data Trees.
An this is maybe not a bad idea to study.
Still not looked well trough the files, just writing down the thoughts i had during work, after posting i will look closer.The dice on lists and trees seems to be really nice.
well my confusion was caused by the following:
si am getting for each curve a list as output(having the curve input as item access)
Than flatten it(what i wanted to archieve,why i created the thread) with the gh component or with following lines in c#(grabbed form another file from the loard)
what ended up in one mesh and confusion.The three lists look like a DT on the paramViewer.
Now i understand looping through like i did is not the correct way.
Will start from scratch putting all(pts,Mesh,...) in the corresponding DT.
Will upload any advance (will take some time,hehe).
best and thanks for your effort,really apreciated!
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
© 2024 Created by Scott Davidson. Powered by