Author Topic: Weave different LIN commands?  (Read 124 times)

Nicholas Ziglio

  • Forum User
  • *
  • Posts: 15
    • View Profile
Weave different LIN commands?
« on: March 19, 2020, 07:33:25 PM »
How do you weave commands that you do not want to duplicate? It says I need to have as many elements as Input 1 (32 elements).
As you can see each set has 8 lists, I'd like it to perform the commands in those 8 lists. So the LIN movements in the following fashion:
List1 CMD1, List1 CMD2, List 1 CMD 3
List 2 CMD1, List2 CMD 2, List 2CMD 3
List 3 CMD 1, ...

I'm not used to working with data in grasshopper, any help would be appreciated

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1015
    • View Profile
    • Robots in Architecture
Re: Weave different LIN commands?
« Reply #1 on: March 20, 2020, 08:48:27 AM »
Hello Nicholas,

Basically you can use any of the many Grasshopper components to set the order of components, we just integrated the Command Weave to make some common applications easier.
In the default mode, it requires you to have the same number of items for each input. So if you've got 3 inputs with 2 items they will be output as follows...
Input 1, 1
Input 2, 1
Input 3, 1
Input 1, 2
Input 2, 2
Input 3, 2
That means that you might need to duplicate some commands. E.g. for a pick and place operation you might have three positions where elements are picked up and three positions where they are dropped off, but the Gripper Open and Gripper Close logic is always the same.

If you've got multiple commands there are some options. You can either Group them with the KUKA|prc Group component (not the Grasshopper standard Group component) or you can right-click the Command Weaver and enable the option to weave by tree branches. That way it will not take the first item, but the first tree branch. In that case, your data structure needs to have the same number of tree branches in order to work.

Hope that clears it up a bit!


Nicholas Ziglio

  • Forum User
  • *
  • Posts: 15
    • View Profile
Re: Weave different LIN commands?
« Reply #2 on: March 20, 2020, 11:26:55 AM »
Thanks a million Johannes!  :D
If anyone finds this thread in the future, the flip matrix component and the partition list comonent were very valuable to sort the data as I needed.

Flip matrix basically swaps the lists rows with its columns.
Partition List can split duplicated data into branches (each duplication in its own branch).

I might mention this to Karl or make a tutorial on it myself :)