Jump to content
BludArtworks

Delete point by distances from each other

Recommended Posts

Hello !

I'm struggling to analyse points from a mesh and only keep x number (like 4?) of the farthest points from each others.

I tried to grab the distances in vex then using delete node but its not working properly, didnt find a way to parse every point and compare between them. Tried average but then again I dont know how to compare each points from each other.

Thanks :)

 

poly.PNG

Share this post


Link to post
Share on other sites

not sure I understand what it is you want to do?

you want to find the 4 farthest points to each point?

Edited by Jesper Rahlff

Share this post


Link to post
Share on other sites

i struggled to understand this at first too...but now I remember doing ConnVerts (MCG in Max) which is like Plexus effect where each point connects to every other point.

So having that picture in my mind, I think effectively: make a line between all poss combos of 2 points, sort by line length, reverse, from then on it's just whatever flavour you prefer to make your group selection/deletion...

Share this post


Link to post
Share on other sites

dunno...something like this ? (hehe note the hillbilly approach again....no vex...coz I'm not good at it, ah well you just think a bit differently...)

 

 

 

deletebydist.hipnc

Edited by Noobini

Share this post


Link to post
Share on other sites

yeah that could work.

My approach would be to use nearpoints() to find all points.

Because nearpoints write to an array with the closest point first you could just remove everything except the last 4 entries and then you would have the 4 points furthest away. do this for all points, and you would have an array attached to each point.

I guess from there you could just select which point(s) you wanted and the array would hold the ptnum of the points.

Sorry for the vex talk again. My brain just works easiest that way, especially because I really strive to get better at it.

 

btw I know you all hate me for not uploading hip files but I can't unfortunately upload anything while I am at work. (restrictions and stuff).

 

Edited by Jesper Rahlff

Share this post


Link to post
Share on other sites

whatever approach, i'm still not 100% on the qualifications tho...so for a point X, if it's too close to point Y...let's assume it qualifies for deletion...but if point X is sooooo far away from point Z...should it be deleted or kept...which one wins out ? ie. shortest/longest distance, which one has priority ?

OP ?

Share this post


Link to post
Share on other sites

I am now following you? what do you mean priority?

28 minutes ago, Noobini said:

whatever approach, i'm still not 100% on the qualifications tho...so for a point X, if it's too close to point Y...let's assume it qualifies for deletion...but if point X is sooooo far away from point Z...should it be deleted or kept...which one wins out ? ie. shortest/longest distance, which one has priority ?

OP ?

 

Share this post


Link to post
Share on other sites

coz the OP says he wants to keep those points furthest from each other...so that sorta tells me that's his primary criteria...so if point X qualifies for deletion with the shortest distance to some neighbour but also qualifies to be kept coz it's so far away from some other neighbour....someone has to make an executive decision...:)

Share this post


Link to post
Share on other sites

ah okay yeah I understand now. That was actually my original question. Because it seemed strange to want to have the 4 furthest points on a per point level.. exactly for the same reason as you just describred.. @Noobini

Share this post


Link to post
Share on other sites

Hello there ! Its indeed a bit weird now I think about it, the idea is to distribute a precise number sphere on meshes point , picking the farthest point so the spheres dont overlap. then using theses to create selection groups ect ect..

Thanks for your replies and sorry for the confusion.

poly_01.PNG.9ad6339702890be6f5de7e5a4d5a3652.PNG

Edited by BludArtworks
image too big

Share this post


Link to post
Share on other sites
1 hour ago, BludArtworks said:

Hello there ! Its indeed a bit weird now I think about it, the idea is to distribute a precise number sphere on meshes point , picking the farthest point so the spheres dont overlap. then using theses to create selection groups ect ect..

Thanks for your replies and sorry for the confusion.

poly_01.PNG.9ad6339702890be6f5de7e5a4d5a3652.PNG

I am still confused where it all starts..

to find a distance you need a start and end points. end point in this case being the farthest point away from... ? each point on the mesh?

Share this post


Link to post
Share on other sites
15 hours ago, Jesper Rahlff said:

I am still confused where it all starts..

to find a distance you need a start and end points. end point in this case being the farthest point away from... ? each point on the mesh?

Precisely, but its just the way I found to distribute spheres on mesh based on points and making them not overlap. Using copy stamp.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×