Jump to content

Group hard edges


Recommended Posts

@papsphilip if you just somehow change your approach to model that roof... or ?

you can use this code.. to take points and promote to edge group..
its messy inside that HIp ..:wub:

string group_name = chs('group_name');
vector src_dir = chv('direction');
float treshold = chf('tresh');
int nb_pts[] = neighbours(0,@ptnum);
foreach ( int pt; nb_pts)
{
    if (@ptnum > pt) continue;
    vector pos = point(0,'P',pt);
    vector edge_dir = normalize(@P -pos);
    if(abs(dot(edge_dir, src_dir)) >=  treshold)
    {
        setedgegroup(0,group_name,@ptnum,pt,1);
     }
}



 

Link to comment
Share on other sites

nice! i tried your code unfortunately this wont work, i already some wrangles for grouping based on the angle between the edges and get only vertical or horizontal edges or anything in between but i cant seem to get the highlighted edges i am showing in the attached images. Or did i not understand something correctly? maybe i have to generate the mesh some other way to get those edges.

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