Curve from Concavity

   1337   2   3
User Avatar
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)

User Avatar
Member
116 posts
Joined: Aug. 2017
Online
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);
int pt = addpoint(0, @P);

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

removeprim(0, @primnum, 1);

fuse
polypath
smooth

ray
Have Fun
Conservation of Momentum
User Avatar
Member
33 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)

https://behance.net/derya [behance.net]
  • Quick Links