Search - User list
Full Version: Connecting nearest points using nearpoints function
Root » Houdini Learning Materials » Connecting nearest points using nearpoints function
NaveenSaiNikhilBalam
Hi,
int npts = nearpoints(0, @p, ch(“Length”), 8);
foreach(int pt; npts)
{
if(pt >= @ptnum && pt != @ptnum){
addprim(npts, “polyline”, @ptnum, pt);
}
}

Above is the vex code I am using to connect points.But it is working only once. And I am trying to achive the connection as shown below.

Any help will be great.

Thank you.
CYTE
Hey NaveenSaiNikhilBalam,

nearpoints returns an array of points so you need to store them in an array. I think it's better to use pcopen as it returns the attribute you specified. in your case P.

Cheers
CYTE
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB