Jump to content

Selecting boundary points in a point-cloud, issue..!


Recommended Posts

Hi everyone,

I'm working with a point cloud and trying to select the boundary (or inverse boundary) points using VEX, similar to the image below.

My code works well when the points are not too close to each other, but I encounter issues when the points are very close, like in the image shown.
 

int handle = pcopen(0, "P", @P, chf("Max_Radius"), chi("Max_Points"));
v@getPositions = pcfilter(handle, "P");
float var = length(v@P - v@getPositions);
if(f@density = var > chf('threshold'))
{
    i@group_boundry = 1;
}

Does anyone have suggestions on how to address this?

 

Thanks for helping.

Select Boundry.jpg

Select Boundary Points 02.hip

Link to comment
Share on other sites

Forget about pccloud, pcopen, pcfilter

Triangulate the whole thing, convert to lines, remove the largest primitives according to length, triangulate2d again, this time with: Edges: *  and Flood from Convex Hull Boundary.

At that point you have a clean surface to work with.

Then you just throw a group points / unshared edges + groupExpand 

OR

Labs distance from border + group by distance

Remember that in term of rebuilding the outer edge of the point cloud, every surface is basically correct, because the information is lost.

Generally speaking, how do you know that the outer edge  is not jagged (zig zag, made of lots a spikes) ?

You can explore this concept here, 

https://doc.cgal.org/latest/Alpha_wrap_3/index.html

Maybe one day it will be implemented in Houdini.

 

jagged.png

distance.png

expand.png

  • Like 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...