
keep points instead of delete
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
keep points instead of delete
How can i invert this? So instead of deleting 0,2,4 etc. i want to keep them.


-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: keep points instead of delete
hi,
use the "not" node before the delete point
use the "not" node before the delete point
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
Re: keep points instead of delete
thanks, in the above case it works.
I also tried it in the compound i'm working on but i got a problem there.
There it sees the array as a "Array of Integer per Point" while i want a "Array of Integer per Object".
How can i force it to be per object?
Also the case where i don't use the "not" node works, but does this mean it loops over many times since it is "Array of Integer per Point"?
I also tried it in the compound i'm working on but i got a problem there.
There it sees the array as a "Array of Integer per Point" while i want a "Array of Integer per Object".
How can i force it to be per object?
Also the case where i don't use the "not" node works, but does this mean it loops over many times since it is "Array of Integer per Point"?
-
Chris_TC
- Posts: 411
- Joined: 22 Mar 2010, 16:43
Re: keep points instead of delete
The Delete Point node expects its input to be per point. If you have an array of IDs per object, you can plug it and a Get Point ID into a Select in Array. The output of this will be per point.clankill3r wrote:Also the case where i don't use the "not" node works, but does this mean it loops over many times since it is "Array of Integer per Point"?
But I may have misunderstood, you might have to clarify your problem.
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
Re: keep points instead of delete
I don't really well how to explain.
I expect a invert result but it doesn't.
Maybe someone can take a look
https://dl.dropbox.com/u/17630770/temp/Generate%203D%20Point%20Hexa%20Grid.xsicompound
make a empty pointcloud, create a ice tree and connect the compound.
Then make the Number in X and Number in Y both even, this works great as you can see.
Then set invert to true, nothing gets deleted.
To navigate where i dropped the "Not" node, explore the compound and go to the "Case Even Even" compound.
If you explore that one as well you should see 2 group comments, there is the delete and not node.
I expect a invert result but it doesn't.
Maybe someone can take a look
https://dl.dropbox.com/u/17630770/temp/Generate%203D%20Point%20Hexa%20Grid.xsicompound
make a empty pointcloud, create a ice tree and connect the compound.
Then make the Number in X and Number in Y both even, this works great as you can see.
Then set invert to true, nothing gets deleted.
To navigate where i dropped the "Not" node, explore the compound and go to the "Case Even Even" compound.
If you explore that one as well you should see 2 group comments, there is the delete and not node.
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: keep points instead of delete
I don't know what you're trying to do, but you are feeding per-point arrays into Find in Array, and then using that to Delete Points.
But not all of the points have any data in those per-point arrays.
Replace your Delete Points with Set Values and you'll see.
But not all of the points have any data in those per-point arrays.
Replace your Delete Points with Set Values and you'll see.
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
Re: keep points instead of delete
I try to create a node that looks a bit like the Generate 3D Point Grid node, only suited for using hexa shapes that line up correct.
To do that i first create the 3D grid with the Generate 3D Point Grid node and then delete the points i don't need.
Which points to delete depands on the Number in X and Number in Y, take a look at this example:

As you can see above, if we remove/keep all numbers that are odd then where done.
Now the next one has a even amount for Number in X, as you can see the points to delete are a bit harder.

This is how i did the first one where Number in X is odd and Number in Y is odd, which works good, also the inverse works.

The one where Number in X and Number in Y is both even works when you don't invert, if you invert it deletes nothing.
Probably if you don't invert it's wrong as well since it's array per point.
@steve, i don't see a Set Values node, if you mean Set Data, i tried that but it doesn't show a Array Per Point for me, or the array is filled with 1 value so it's not obvious...
To do that i first create the 3D grid with the Generate 3D Point Grid node and then delete the points i don't need.
Which points to delete depands on the Number in X and Number in Y, take a look at this example:

As you can see above, if we remove/keep all numbers that are odd then where done.
Now the next one has a even amount for Number in X, as you can see the points to delete are a bit harder.

This is how i did the first one where Number in X is odd and Number in Y is odd, which works good, also the inverse works.

The one where Number in X and Number in Y is both even works when you don't invert, if you invert it deletes nothing.
Probably if you don't invert it's wrong as well since it's array per point.
@steve, i don't see a Set Values node, if you mean Set Data, i tried that but it doesn't show a Array Per Point for me, or the array is filled with 1 value so it's not obvious...
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: keep points instead of delete
This is from your Case Even Even.
For half the points there's no data going into the Array port on Find in Array.
Nothing goes in, nothing is found, and nothing happens.
I replaced the Delete Points with Set Data nodes so I could see all the points.
Sorry, I don't have time to really dig into it any further.

For half the points there's no data going into the Array port on Find in Array.
Nothing goes in, nothing is found, and nothing happens.
I replaced the Delete Points with Set Data nodes so I could see all the points.
Sorry, I don't have time to really dig into it any further.

-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: keep points instead of delete
From my point of view you shoud work directly in the generate 3d point grid.
Take a look at values just after the second modulo for the x positions (before the integer to scalar), and also values after des divide integers nodes, theses, gives you just what you need ;-)
Then you can delete pair point on pair row and impair points on impair rows (or the inverse)
Take a look at values just after the second modulo for the x positions (before the integer to scalar), and also values after des divide integers nodes, theses, gives you just what you need ;-)
Then you can delete pair point on pair row and impair points on impair rows (or the inverse)
-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: keep points instead of delete
voila
il you are using Z data you need to add a third switch on the same principle
il you are using Z data you need to add a third switch on the same principle
You do not have the required permissions to view the files attached to this post.
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
Re: keep points instead of delete
How it worked looked really confusing but i will dig into it when i have time.
A answer of what goes wrong in mine is still welcome for the purpose of learning.
A answer of what goes wrong in mine is still welcome for the purpose of learning.
-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: keep points instead of delete
generate 3d point grid use internally temporary sorted "ID's" for the 3 axes.
for example the Y has 1,2,3,4 representing each Y rows, the same as X and Z.
Here, I just use that to filter and delete points
for example the Y has 1,2,3,4 representing each Y rows, the same as X and Z.
Here, I just use that to filter and delete points
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
Re: keep points instead of delete
I'm really tired atm but it looks promising, when the energy found me back i will look at it.
Handling the z shouldn't be that hard i guess.
thanks!
Handling the z shouldn't be that hard i guess.
thanks!
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
Re: keep points instead of delete
Looking at it now.
Just figured out that the original generate 3d point grid has wrong comments where X and Y are switched.
Just figured out that the original generate 3d point grid has wrong comments where X and Y are switched.
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: keep points instead of delete
Instead of deleting points in a 3d grid, I would be tempted to simply arrange the hexagons myself.