ems in the same way. Lofting was particularly difficult, you had to have a separate loft component for every lofted surface that you wanted to generate because the component would/could only see one large list of inputs. Then came along the data structures in GH v0.6 which allowed for the segregation of multiple input sets.
If you go to Section 8: The Garden of Forking Paths of the Grasshopper Primer 2nd Edition you will find the image above describing the storing of data.
Here you will notice a similarity between the path {0;0;0;0}(N=6) and the pathmapper Mask {A;B;C;D}(i). A is a placeholder for all of the first Branch structures (in this case just 0). B is a place holder for all the second branch structures possibly either 0, 1 or 2 in this case. And so forth.
(i) is a place holder for the index of N. If you think of it like a for loop the i plays the same role. For the example {A;B;C;D}(i) --> {i\3}
{0;0;0;0}(0) --> {0\3} = {0}
{0;0;0;0}(1) --> {1\3} = {0}
{0;0;0;0}(2) --> {2\3} = {0}
{0;0;0;0}(3) --> {3\3} = {1}
{0;0;0;0}(4) --> {4\3} = {1}
{0;0;0;0}(5) --> {5\3} = {1}
{0;0;0;1}(0) --> {0\3} = {0}
{0;0;0;1}(1) --> {1\3} = {0}
{0;0;0;1}(2) --> {2\3} = {0}
{0;0;0;1}(3) --> {3\3} = {1}
{0;0;0;1}(4) --> {4\3} = {1}
{0;0;0;1}(5) --> {5\3} = {1}
{0;0;0;1}(6) --> {6\3} = {2}
{0;0;0;1}(7) --> {7\3} = {2}
{0;0;0;1}(8) --> {8\3} = {2}
...
{0;2;1;1}(8) --> {8\3} = {2}
I'm not entirely sure why you want to do this particular exercise but it goes some way towards describing the process.
The reason for the tidy up: every time the data stream passes through a component that influences the path structure it adds a branch. This can get very unwieldy if you let it go to far. some times I've ended up with structures like {0;0;1;0;0;0;3;0;0;0;14}(N=1) and by remapping the structure to {A;B;C} you get {0;0;1}(N=15) and is much neater to deal with.
If you ever need to see what the structure is there is a component called Param Viewer on the first Tab Param>Special Icon is a tree. It has two modes text and visual double click to switch between the two.
Have a look at this example of three scenarios in three situations to see how the data structure changes depending on what components are doing.
…
ld be the best UI.
I think difference is made by 'Slider = 10' vs 'Slider = 10.000' more than by simple input/component initialization so, why to stop when it could be even more powerful?
Slider = 0 To 5 --- Slider in [0, 5]
Slider = {3; 0 To 5}
Slider = {3;0;5}
Slider = 3;0;5
Slider = 3 0:5
Slider = 3,0,5
Slider = 3 0 5 --- Value and range (min max)
3 0.0 5 --- 3.0 0.0 5.0
3 0 5.0 --- 3.0 0.0 5.0
3.0 0 5 --- 3.0 0.0 5.0
-1 0 5 --- 0 0 5 (-1 -1 5)
6 0 5 --- 5 0 5 (6 0 6)
Slider = 0:2:6 --- Even numbers: 0, 2, 4, 6.
Slider = 1:2:7 --- Odd numbers: 1, 3, 5, 7.
0:2:5 --- 0:2:4 (or 0:2:6)
3:2:8 --- 3:2:7 (or 3:2:9)
3 1:2:7 --- 1 3 5 7 (value 3)
Bang! = 7 --- 7 outputs
Merge = 5 --- 5 inputs
What's your opinion about Bang! = 7? As it's setting number of inputs, should it use different format? Bang! 7? Bang! (7)? Bang! i7?
+ * - / \ % ^ & | ! = > --- Addition, Multiplication, Subtraction, Division, Integer Division, Modulus, Power, AND, OR, NOT, Larger than, &c.
= could be a problem.
\ Integer division or Set difference?
! could be NOT but also Factorial.
| could mean intersection.
& could mean concatenate.
1+ --- Addition: input A = 1
2* --- Multiplication: input A = 2
+{0,1,1} --- Addition: input B = {0,1,1}
0-, 1/, 2^, 10^, e^ have their own components
Flatten = {7} or Flatten = 7 --- Input P = {7} (off-topic: Why can’t P be a list?)
Pt = {1, 2, 3} --- Point XYZ, X = 1, Y = 2, Z = 3.
Swatch = 129,239,231 (102)
Swatch = 129 139 231 102
F2 = "x^2+y"
"List Length" and "List Insert" don't work properly: "Value List" is choosen. Why? What's the reason to this choice? Well, I'd like to know how the whole thing (search by keywords) works, David.
Name and nickname can be now used as keywords. "Larger" works for ">" but "greater" doesn't. Could it be improved? Could synonyms be used? Could a short description even be used (I know this could be a bit weird)?
more than --- >
more or less --- Similarity
more less --- Similarity
red green --- Sets.List components should be showed
lightning --- Split Tree
What about use Curve.Analysis or Math.Boolean to display those Tab.Panel components? Param, Math, Sets, Vector? Primitive, Special, Util? Tab, Panel, and Tab.Panel as keywords.
At the moment that I write this, I check that ignoring accents in keywords has almost been included (0.8.0009): p`anel, pañel, pánel --- panel (almost)
Shouldn’t 'Dom2' work for Dom²?
What about nested search? You type some keywords (say 'Params' or 'Params.Geometry', or 'red green', or 'lst') and then you make a fine-tunning search over previous results/keywords. Tab.Panel and/or nested geometry could be useful when search by plug-in is desired or when you want to search among .ghuser components (first 'ghuser' or 'Extra.MyPlugIn' or 'lst' keyword and then fine-tunning, specific, search).
Is 'list length' performing this nested search right now ('lst' > 'length')? Anyway, I am thinking about UI (graphical) changes; successive searches.
As I said, description (and even words from the help info) could be used to search. What about "some kind of tags"? I mean that if 'list l' to finally choose List Length has been used for a while, that could be learned. Eventually, an XML file could store these tags, so you could even edit them. That could implement description, name, nickname, help info, Tab.Panel, .ghuser, synonyms (lots of them), tags/shortcuts or wathever.
How could flatten/graft/reverse be used? Initialize graft+Simplify or graft+Bang! could be really useful.
What about expressions? I don't how could it be done properly: would Slider = x^2 (expression) work? I mean, aren't expressions parsed when initializing?
Is Panel somehow doing this? 'panel = wathever' always suppose that wathever is a string, so you can't use 'panel = <pi>'. Sets.Strings components also do this.
I've been about to write several paragraphs about height/width (resizable components: Panel, Graph Mapper, Slider, &c.), input/output names (Scripts, F components; or any component with editable input/output names), orientation (Scribble), type hint and access option, nickname, &c. but, to sum up: being able to set any property when initializing would be really useful. I'd like to know the best choice of syntax but I'm sure that, David, you're closer to the answer. What do you think about this?
Slider: 3 0 5 "MySlider" "Slider^2"
Panel: "This is the content" "This is the title"
VB: "N" List Integer 7 "r" Item Double
Addition: A 1 B 2
I guess that any unified syntax would be elegant and useful, but additional ad hoc syntax (per component) could be even better (cleaner).
What about use lists of values? I'm not sure about format: panel = ("Hello", "Bonjour", "Hola")? If any valid format/syntax is found, maybe more sophisticated fetaures could be achieved: panel = {0;0} ("A", "B", "C") {0;1} ("1", "2", "3") How would you like this to be implemented?
There is a much simpler and interesting feature that would be useful, in my opinion: being able to initialize more than one component. I mean say 7xSlider = 10.0 and get 7 sliders and I also mean multiline (multi-component) initialization: Ctrl+Intro when you want to start a new line and Intro (or even some Accept/Cancel buttons when you activate multiline mode) to initialize (every line/component), for example. I mean:
3 x Slider = 1
Panel
Mass addition
Panel
And the whole bunch of components that were in mind (pre-thinked definition) is initialized. It speeds up the workflow, making more dynamic to add components that are only available via the drop-down panels.
Should this multiplier be something like a text box adjacent to search field more than '7x'?
These are some of my thoughts about intitializing. Please let me know your opinion :]
…
angle has to be between 5° to 15°
-for color 2, the angle has to be between 20° to 30°
etc..
Can I subdivided the surface by type of color (exemple: color 1 will be 2 subdivision; color 2 will be 3 subdivision, ..)
many many thx for your help guys :)
…
he first problem:
1. Define 7 as the start point.
2. Iterate through the remaining list of points, find the closest point
3. Now, what do you do: find the next closest point from the previous one? Or stick testing from point 7? Note that if you stick with 7, how do you then deal with NOT creating a line between 6? (Or put another way, what will tell the computer its found all the shortest paths and to begin testing from the next set?) If you test each path as the alternative, you will end up with a diagram completely different to what you have drawn in numerous solutions, in fact, they would just be incorrect, not without an exhaustive and overly complex set of conditionals.
You could define zones - circular extents - but that again will produce results differently to what you have drawn, namely connections such as 2 & 3, 2 & 8, 3 & 4, and of course 1 & 2 would be problematic with this approach. Do you see why this isn't as simple to solve using a computer?
Mario, here's your moment....(i hope youre still young, it might take some time, and it needs to work for any possible combination, not just the one above! I'll pass)…
e
7. True
8. True <-- this one
9. True
10. False
11. True
12. False
13. True
14. True <-- this one
15. True
16. False
17. True
18. False
19. True
20. True <-- this one
21. True
22. False
23. True
24. False
25. True
26. True <-- this one
27. True
28. False
29. True
30. False
31. True
32. True <-- this one
33. True
Any idea how I can solve this?
Thanks!…
I am not sure if that's the file. Horster camera control has a tab with 3 components in my pc. I cant recall if horster tools had bundled camera controls with other tools.
and says "repeat every Nth element", meaning say if N was 3, I would get A B C C D E F F G H. I would also like to be able to then insert a list of 3 elements in between each of the repeats. For example, I wanted to insert: 1. 1
2. 2
3. 3 into the list, I would get A B C 1 2 3 C D E F 1 2 3 F G H. It seems like an easy task, but I cannot for the life of me figure out how to do it, I must be making a very basic mistake. I am new to grasshopper, so any and all help I could get would be GREATLY appreciated!…