Jump to content

Grouping the outer 4 points of a primitive


Christoph_H

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 weeks later...

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