Jump to content

pcfind function question


MadMax50

Recommended Posts

Hi,I have a  question in regards to the pcfind function. 

I notice that when I look up the @P attribute I get a random  point order in my array vs when I look up the @Cd attribute.

Why am I getting a random point order in my array when I use @P vs when I use @Cd. 

The expressions im using is this:

i[]@test = pcfind(1,"P",@P,100,5); 

returns:

[ 29, 15, 6, 20, 22 ]

[ 19, 4, 12, 20, 8 ]

[ 28, 2, 18, 11, 35 ]

[ 28, 2, 14, 18, 22 ]

...

...

 

i[]@test = pcfind(1,"P",@Cd,100,5); 

returns:

[ 29, 15, 6, 20, 22 ]

[ 29, 15, 6, 20, 22 ]

[ 29, 15, 6, 20, 22 ]

[ 29, 15, 6, 20, 22 ]

...

...

 

As you can see, The @Cd lookup is returning all the same point order in the array , whereas the @P lookup is giving me a random point order. 

Why is this ?

I will attach my file for anyone that wants to see. 

Thank you

 

pcfind_attributes.hipnc

Edited by MadMax50
Link to comment
Share on other sites

it's not random order, it's ordered by proximity

you are looking up n-points in 2nd input whose "P" attrib value is within certain radius from certain value

1. from value of @P, which is different for each point, therefore you will get different points that are closest to that value @P ordered from closest

2. from value of @Cd, which is the same for each point (since nonexistent on first input it's the default value of) {1, 1, 1}, therefore for each point you will get the same array of points ordered by proximity to {1, 1, 1}

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...