Jump to content
Sign in to follow this  
Christoph_H

Grouping the outer 4 points of a primitive

Recommended Posts

Hi,
whats the best way to group the outer 4 points of a primitive?

I've tried this with bounding box but I don't know what to do.
I want to select with pos.
 

string grp = itoa(@primnum);

vector bbmin = getbbox_min(0,grp);
vector bbmax = getbbox_max(0,grp);
vector bbsize = getbbox_size(0,grp);

vector pos = set(bbmin.x, bbmin.y, bbmax.z);


An other way is to use pcfind. But the setting with the radius is problematic.
In my script I want to manipulate primitives. They can also be of different sizes and have different point arrangements on the inside. Therefore the pcfind radius should always be different

Finally, I always want access to the outer 4 corners.

 

However, I would be interested to know what is the best way to deal with this situation,
to create these new surfaces.


thanks.

plan.png

Share this post


Link to post
Share on other sites
Posted (edited)

i guess such a point always has 4 neighbours, so

Quote

//pointwrangle

@group_cornerPts = neighbourcount(0, @ptnum) == 4;

 

EDIT:

it's a bit diffuse how much control you have about the other points (are they grouped, etc)?
so my code above might not be what you want.

instead you could UV each quad and select the corner points based on their UVs ({0,0}, {0,1},{1,0},{1,1})

Edited by 3dome
  • Like 1

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
Sign in to follow this  

×