{"id":580,"date":"2022-06-03T10:00:52","date_gmt":"2022-06-03T17:00:52","guid":{"rendered":"http:\/\/fx-td.com\/houdiniandchill\/?p=580"},"modified":"2022-06-03T10:09:29","modified_gmt":"2022-06-03T17:09:29","slug":"archived-post-by-sniperjake945-11","status":"publish","type":"post","link":"http:\/\/fx-td.com\/houdiniandchill\/2022\/06\/03\/archived-post-by-sniperjake945-11\/","title":{"rendered":"Archived post by SniperJake945"},"content":{"rendered":"<p class=\"\">@Casey throw this in a prim wrangle (this code snippet group edges based on the interior angle of the two adjacent prims):<br \/>\n&#8220;`c vector edge(int h){     return   vector(point(0, &#8220;P&#8221;, hedge_dstpoint(0, h))) &#8211; vector(point(0, &#8220;P&#8221;, hedge_srcpoint(0, h))); }<br \/>\nint h = primhedge(0, @primnum); int test = h; do{     if(hedge_equivcount(0, h) > 1){         vector e = edge(h) * (hedge_primary(0,h) ? 1 : -1);         int prim1 = hedge_prim(0, h);         int prim2 = hedge_prim(0, hedge_nextequiv(0, h));         vector n1 = prim(0, &#8220;N&#8221;, prim1);         vector n2 = prim(0, &#8220;N&#8221;, prim2);         matrix3 m = dihedral(e, set(0,0, 1)); \/\/rotate e to be face up         n1 *= m;         n2 *= m;         n1.z *= 0; \/\/ensure our normal is 2d now, and normalize, probably overkill but whatever         n2.z *= 0;         n1 = normalize(n1);         n2 = normalize(n2);         float ang = atan2(n2.y*n1.x &#8211; n2.x*n1.y, n2.x*n1.x + n2.y*n1.y); \/\/angle between vectors in 2d         ang += M_PI; \/\/interior angle, from 0-2PI         if(ang <= radians(ch(\"interior_angle_maximum\"))){ \/\/our test is in degrees, typically we want to find interior angles lower than 100 degrees?             setedgegroup(0, \"peaks\", hedge_srcpoint(0, h), hedge_dstpoint(0, h), 1);         }     }     h = hedge_next(0, h); }while(h != test); ``` and then click the add parms button thing on the wrangle, for the geo you sent, it seems like an angle threshold of 100 degrees seems to work \ud83d\ude42<\/p>\n<p class=\"\">oh and you need to add prim normals with a normal sop<\/p>\n","protected":false},"excerpt":{"rendered":"<p>@Casey throw this in a prim wrangle (this code snippet group edges based on the interior angle of the two adjacent prims): &#8220;`c vector edge(int h){ return vector(point(0, &#8220;P&#8221;, hedge_dstpoint(0, h))) &#8211; vector(point(0, &#8220;P&#8221;, hedge_srcpoint(0, h))); } int h = primhedge(0, @primnum); int test = h; do{ if(hedge_equivcount(0, h) > 1){ vector e = edge(h) &hellip; <a href=\"http:\/\/fx-td.com\/houdiniandchill\/2022\/06\/03\/archived-post-by-sniperjake945-11\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Archived post by SniperJake945<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/580"}],"collection":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":0,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"wp:attachment":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}