### Curve from Concavity

1505   2   3
Member
15 posts
Joined: Oct. 2021
Offline
Hey all, is there a way to have curves generated from Concavity? like shown below?

Attachments:
curve from cavity.JPG (165.6 KB)

Member
130 posts
Joined: Aug. 2017
Offline
labs Measure_Curvature , blur-concavity, -cluster points(concavity),
wrangle bbox detail
```v@size = getbbox_size(0);
```
extract edge prim wrangle
```i[]@pts = primpoints(0, @primnum);
i@cluster = -1;
int remove = 1;
for(int i=0; i < len(@pts); i++){
int pt = @pts[i];
i@tc = point(0, "cluster", pt);

if(@cluster == -1){
@cluster = @tc;
}else if(@cluster != @tc){
remove = 0;
@Cd = set(0, 0,0);
}
}
if(remove == 1){
removeprim(0, @primnum, 1);
}
```

wrangle outline on prim
```int neighs[] = polyneighbours(0, @primnum);

for(int i=0; i<len(neighs); i++){
int neigh = neighs[i];
vector pos = prim(0, "P", neigh);
int line = addprim(0, "polyline", pt, npt);
}

removeprim(0, @primnum, 1);
```

fuse
polypath
smooth

ray
Have Fun
Conservation of Momentum
Member
36 posts
Joined: Feb. 2016
Offline
Here's another way without any vex, but also utilizing the measure curvature node
It's not perfect, but should get the job done.

Attachments:
Screenshot 2022-01-19 223657.png (490.0 KB)
Curve_From_Concavity_01.hiplc (180.2 KB)