how do i do this in vex and group1 and group2 are Primitives.
group3 = group1 - group2
group3 = group1 minus group2
group3 = group1 minus group2 how do i do this in vex
3305 6 1- gfxfx
- Member
- 91 posts
- Joined: Oct. 2015
- Offline
- pabcou
- Member
- 61 posts
- Joined: April 2018
- Offline
In an Attribute Wrangle running over Primitives,
You can find more information here [www.sidefx.com], under section “Accessing group membership”.
@group_group3 = @group_group1 && !@group_group2;
You can find more information here [www.sidefx.com], under section “Accessing group membership”.
- tamte
- Member
- 8449 posts
- Joined: July 2007
- Online
- gfxfx
- Member
- 91 posts
- Joined: Oct. 2015
- Offline
i played a round with Group Combine before i post this and the documents on the Group Combine were bit confusing
Thank you pabcou that was very helpful can you show me were the “minus” was in @group_group3 = @group_group1 && !@group_group2;
i do not see a minus in the equation can you show me how do It with a “plus” i not c++ or vex programmer but i am kind of a novice python programmer.
bit break down would be useful
its only easy when you know how!!!
Thank you pabcou that was very helpful can you show me were the “minus” was in @group_group3 = @group_group1 && !@group_group2;
i do not see a minus in the equation can you show me how do It with a “plus” i not c++ or vex programmer but i am kind of a novice python programmer.
bit break down would be useful
its only easy when you know how!!!
Edited by gfxfx - Oct. 20, 2018 15:38:39
- MarXindia
- Member
- 32 posts
- Joined: Sept. 2013
- Offline
gfxfx
i played a round with Group Combine before i post this and the documents on the Group Combine were bit confusing
Thank you pabcou that was very helpful can you show me were the “minus” was in @group_group3 = @group_group1 && !@group_group2;
i do not see a minus in the equation can you show me how do It with a “plus” i not c++ or vex programmer but i am kind of a novice python programmer.
bit break down would be useful
its only easy when you know how!!!
gfxfx
i played a round with Group Combine before i post this and the documents on the Group Combine were bit confusing
Thank you pabcou that was very helpful can you show me were the “minus” was in @group_group3 = @group_group1 && !@group_group2;
i do not see a minus in the equation can you show me how do It with a “plus” i not c++ or vex programmer but i am kind of a novice python programmer.
bit break down would be useful
its only easy when you know how!!!
“@group_group3 = @group_group1 && !@group_group2;”
by putting @group_group3 = @group_group1 your have both the groups equal or say components of group3 are same as group1 ,now “&&” is the logic gate operator that executes only if both conditions LHS and RHS are satisfied,in this case group3 is not equal to group2(“!” is notation for not),which means put components in group3 if they are equal to group1 and at the same time not equal to group2,or say group1-group2.I hope I made myself clear.
- pabcou
- Member
- 61 posts
- Joined: April 2018
- Offline
gfxfxIf we have groups A and B, and we want the elements of A minus the elements of B, that is equivalent to taking the elements that are in A and not in B. This translates, in pseudocode, to “A && !B” (“&&” is Boolean AND, “!” is Boolean NOT). We can make use of this with the special attribute @group_*, which, when set for some point/primitive/etc., describes being in a group (value 1) or not being in that group (value 0). For example,
Thank you pabcou that was very helpful can you show me were the “minus” was in @group_group3 = @group_group1 && !@group_group2;
i do not see a minus in the equation can you show me how do It with a “plus” i not c++ or vex programmer but i am kind of a novice python programmer.
bit break down would be useful
@group_SomeGroup = 1;
Now, using code analogous to the one from the previous post:
@group_C = @group_A && !@group_B;
@group_C = 1 && !0;
@group_C = 1;
Edited by pabcou - Oct. 20, 2018 17:49:14
- gfxfx
- Member
- 91 posts
- Joined: Oct. 2015
- Offline
-
- Quick Links