How does pcexport work?

   3013   1   1
User Avatar
Member
14 posts
Joined: Jan. 2009
Offline
I am trying to use pc export to write P back to a point cloud. The point cloud is being read in using op:`opinputpath('.', 1). The questions I have are:

1. Should pcexport work in this case?
2. If I pcexport “N” for a point in the cloud, the next time that point is found, will I get the value of N that I pcexport?

The code below is attempting to find the closest point, but can't use cloud points that have already found.

sop
proximity_reorder(
string file = “op:`opinputpath('.', 1)`”;
float radius = 0.3;
int maxpoints = 1000;
)
{
vector n_check = {-99,-99,-99};
vector n;

int handle = pcopen(file, “P”, P, radius, maxpoints);

while(pciterate(handle)) {
pcimport(handle, “N”, n);
if(n != n_check){
int chk = pcexport(handle, “N”, n_check);
pcimport(handle, “P”, P);
}
}
pcclose(handle);

}
User Avatar
Member
7710 posts
Joined: July 2005
Online
I don't think VEX will expand backticks.
  • Quick Links