{"id":779,"date":"2024-02-09T17:14:55","date_gmt":"2024-02-10T01:14:55","guid":{"rendered":"http:\/\/fx-td.com\/houdiniandchill\/?p=779"},"modified":"2024-02-09T17:36:21","modified_gmt":"2024-02-10T01:36:21","slug":"archived-post-by-bonsain-2","status":"publish","type":"post","link":"http:\/\/fx-td.com\/houdiniandchill\/2024\/02\/09\/archived-post-by-bonsain-2\/","title":{"rendered":"Archived post by bonsain"},"content":{"rendered":"<div class=\"postie-post\">\n<p class=\"\">I wasn&#8217;t aware of those functions, that&#8217;s cool! This seems to work quite nicely from a quick test&#8230; granted this is a curve with 4\/5 points \ud83d\ude42 Would be keen to see if this does what you need, @mattiasmalmer, and any performance issues you run into!<br \/>\nprim wrangle: &#8220;` function void insertvertex(int geohandle; int prim_num; int insertion_index; int point_num) {     int points[] = primpoints(0, prim_num);     insert(points, insertion_index, point_num);     foreach (int i; int point; points) {         setvertexpoint(0, prim_num, i, point);     } }<br \/>\nvector new_pos = point(1, &#8220;P&#8221;, 0); int new_pt = addpoint(0, new_pos);<br \/>\nint insertion_index = chi(&#8220;insertion_index&#8221;); insertvertex(0, <a href=\"mailto:i@primnum\" >i@primnum<\/a>, insertion_index, new_pt); &#8220;`<br \/>\nI made it into a  `insertvertex` function if you feel like reusing this via a custom vex library \ud83d\ude42 The last few lines is just me querying a point position from the wrangle&#8217;s second input and choosing which index to insert it on~<\/p>\n<p>Attachments in this post: <br \/><a href=\"http:\/\/fx-td.com\/houdiniandchill\/wp-content\/uploads\/discord\/20241402\/09\/24\/insert_vertex.gif\">http:\/\/fx-td.com\/houdiniandchill\/wp-content\/uploads\/discord\/20241402\/09\/24\/insert_vertex.gif<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I wasn&#8217;t aware of those functions, that&#8217;s cool! This seems to work quite nicely from a quick test&#8230; granted this is a curve with 4\/5 points \ud83d\ude42 Would be keen to see if this does what you need, @mattiasmalmer, and any performance issues you run into! prim wrangle: &#8220;` function void insertvertex(int geohandle; int prim_num; &hellip; <a href=\"http:\/\/fx-td.com\/houdiniandchill\/2024\/02\/09\/archived-post-by-bonsain-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Archived post by bonsain<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/779"}],"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=779"}],"version-history":[{"count":0,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/779\/revisions"}],"wp:attachment":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/media?parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/categories?post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/tags?post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}