“`c //put this shit in a prim wrangle yo int h = primhedge(0, @primnum); int temp = h; int start_pt = hedge_srcpoint(0, h); int new_pts[]; float depth = ch(“depth”); float inset = 1 – ch(“inset”); do{ int pt_a = hedge_srcpoint(0, h); int pt_b = hedge_dstpoint(0, h); vector p_a = point(0, “P”, pt_a); vector p_b = point(0, “P”, pt_b); //inset p_a = (((p_a – @P) * inset) + @P); p_b = (((p_b – @P) * inset) + @P); p_a = p_a + v@N * depth; p_b = p_b + v@N * depth; int npt_a; if(h == temp){ //only runs on our first iteration npt_a = addpoint(0, p_a); append(new_pts, npt_a); }else{ //our current starting point is our previous destination point npt_a = new_pts[len(new_pts) – 1]; }
//add in our destination point, if we’re not back at the start int npt_b; if(start_pt != pt_b){ npt_b = addpoint(0, p_b); append(new_pts, npt_b); }else{ npt_b = new_pts[0]; } //add side walls addprim(0, “poly”, npt_b, npt_a, pt_a, pt_b);
h = hedge_next(0, h); }while(h != temp); addprim(0, “poly”, new_pts); “`
this is polyextrude with the `divide into` toggle set to individual components. if you want to do the connected components stuff, its a lot more effort, but i believe in you. believe in yourself <:meowpensivepray:814858736497590302> also this requires prim normals, so make sure u add those with a normal sop