### How to group sharp turned points on edges?

478   2   0
Member
3 posts
Joined: 4月 2021
Offline
How can I group those sharp turned points on edges like below?
Edited by magicom - 2023年3月9日 23:36:06

Attachments:
Screenshot 2023-03-10 122809.png (475.0 KB)

Member
4111 posts
Joined: 2月 2012
Offline
Hi,

You can use compare tangent angles like this:

```int pts [ ] = primpoints ( 0, @primnum );

int index = find ( pts, @ptnum );
int pt = pts [ index + 1 ];
vector tangent = point ( 0, "tangent", pt );

if ( dot ( v@tangent, tangent ) < ch("angle" ) )
i@group_pts = 1;
```

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

Member
3 posts
Joined: 4月 2021
Offline
animatrix_
Hi,

You can use compare tangent angles like this:

```int pts [ ] = primpoints ( 0, @primnum );

int index = find ( pts, @ptnum );
int pt = pts [ index + 1 ];
vector tangent = point ( 0, "tangent", pt );

if ( dot ( v@tangent, tangent ) < ch("angle" ) )
i@group_pts = 1;
```

Thank you! This is very helpful.

I achieved similar results by using a workaround after posting the question.